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];