From e91151052321fb330d94964ad7516d67c2a16739 Mon Sep 17 00:00:00 2001 From: Matti Date: Thu, 12 Dec 2024 00:19:19 +0100 Subject: [PATCH] Remove Unused Code --- Aufg9/DiabloByteReader.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/Aufg9/DiabloByteReader.cpp b/Aufg9/DiabloByteReader.cpp index 4d20fa5..36ba362 100644 --- a/Aufg9/DiabloByteReader.cpp +++ b/Aufg9/DiabloByteReader.cpp @@ -19,32 +19,21 @@ void Aufg9Main() { try { std::string fileName = "../Aufg9/IO-Files/charakter.d2s"; std::ifstream stream(fileName); - auto header = readFromStream(stream, dest); - - printf("I read something!\n%X\n", header); - - for (int i = 0; i < 1024; i++) { - std::cout << dest[i] << std::endl; - } - - long *test = reinterpret_cast(dest); - printf("Verification Code: %X\n", *test); - - char *fuckery = (char *)test; - printf("Fuckery: %X\n", fuckery); + readFromStream(stream, dest); // Name char *byte20 = &dest[20]; std::cout << "Name: "; for (int i = 0; i < 16; i++) { - std::cout << byte20[i]; + // std::cout << byte20[i]; + std::cout << dest[20 + i]; } std::cout << std::endl; // Status char* byte36 = &dest[36]; std::cout << "Status: " << (((int)(*byte36))%8)/4 << std::endl; // geh zu Byte 36, lies genau 1 byte, interpretiere es als int, berechne mod 8 -> wegwerfen der linken Bits, /4 -> wegwerfen der rechten beiden Bits -> Tada, nur das 3. Bit von Rechts bleibt übrig - // 0 -> Not HardCore? + // 0 -> Player is not HardCore? // Klasse bool *byte40 = (bool*) &dest[40];