Remove Unused Code

This commit is contained in:
Matti 2024-12-12 00:19:19 +01:00
parent ff499e51d8
commit e911510523

View File

@ -19,32 +19,21 @@ void Aufg9Main() {
try { try {
std::string fileName = "../Aufg9/IO-Files/charakter.d2s"; std::string fileName = "../Aufg9/IO-Files/charakter.d2s";
std::ifstream stream(fileName); std::ifstream stream(fileName);
auto header = readFromStream<long>(stream, dest); readFromStream<long>(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<long *>(dest);
printf("Verification Code: %X\n", *test);
char *fuckery = (char *)test;
printf("Fuckery: %X\n", fuckery);
// Name // Name
char *byte20 = &dest[20]; char *byte20 = &dest[20];
std::cout << "Name: "; std::cout << "Name: ";
for (int i = 0; i < 16; i++) { for (int i = 0; i < 16; i++) {
std::cout << byte20[i]; // std::cout << byte20[i];
std::cout << dest[20 + i];
} }
std::cout << std::endl; std::cout << std::endl;
// Status // Status
char* byte36 = &dest[36]; 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 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 // Klasse
bool *byte40 = (bool*) &dest[40]; bool *byte40 = (bool*) &dest[40];