diff --git a/src/Draw.cpp b/src/Draw.cpp index 6293a63e..db2964fd 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -730,18 +730,17 @@ void CortBox2(const RECT *rect, unsigned long col, SurfaceID surf_no) // Dummied-out log function // According to the Mac port, its name really is just "out". -BOOL out(int unknown) +BOOL out(int surface_identifier) { - char unknown2[0x100]; - int unknown3; - int unknown4; - int unknown5; + char str[0x100]; - (void)unknown; - (void)unknown2; - (void)unknown3; - (void)unknown4; - (void)unknown5; + // The actual name of these two variables are unknown + (void)surface_identifier; + (void)str; + + // There may have been some kind of 'OutputDebugStringA' call here, + // like the one in 'EnumDevices_Callback' in 'Input.cpp'. + // Pixel may have kept them wrapped in '#ifdef DEBUG' blocks. return TRUE; } diff --git a/src/GenericLoad.cpp b/src/GenericLoad.cpp index a72f5dc3..d64e6f42 100644 --- a/src/GenericLoad.cpp +++ b/src/GenericLoad.cpp @@ -295,6 +295,8 @@ BOOL LoadGenericData(void) char str[0x40]; sprintf(str, "PixTone = %d byte", pt_size); - // There must have been some kind of console print function here or something + // There must have once been a 'OutputDebugStringA' call here or something. + // See 'EnumDevices_Callback' in 'Input.cpp' for an example of this. + return TRUE; } diff --git a/src/Input.cpp b/src/Input.cpp index f2db63cd..5a32ab7b 100644 --- a/src/Input.cpp +++ b/src/Input.cpp @@ -150,13 +150,20 @@ BOOL CALLBACK EnumDevices_Callback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) directinput_objects->device = _joystick; - char string[0x100]; + // This is interesting: there are at least two places in the game + // where it seems like there's meant to be a debug print just like + // this one: these are the 'out' function in 'Draw.cpp', and the + // 'LoadGenericData' function in 'GenericLoad.cpp'. + // Perhaps Pixel kept them wrapped in '#ifdef DEBUG' blocks, and + // simply forgot to do the same here. + + char str[0x100]; #ifdef FIX_MAJOR_BUGS - sprintf(string, "DeviceGUID = %08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X\n", lpddi->guidInstance.Data1, lpddi->guidInstance.Data2, lpddi->guidInstance.Data3, lpddi->guidInstance.Data4[0], lpddi->guidInstance.Data4[1], lpddi->guidInstance.Data4[2], lpddi->guidInstance.Data4[3], lpddi->guidInstance.Data4[4], lpddi->guidInstance.Data4[5], lpddi->guidInstance.Data4[6], lpddi->guidInstance.Data4[7]); + sprintf(str, "DeviceGUID = %08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X\n", lpddi->guidInstance.Data1, lpddi->guidInstance.Data2, lpddi->guidInstance.Data3, lpddi->guidInstance.Data4[0], lpddi->guidInstance.Data4[1], lpddi->guidInstance.Data4[2], lpddi->guidInstance.Data4[3], lpddi->guidInstance.Data4[4], lpddi->guidInstance.Data4[5], lpddi->guidInstance.Data4[6], lpddi->guidInstance.Data4[7]); #else - sprintf(string, "DeviceGUID = %x\n", lpddi->guidInstance); // Tries to print a struct as an int + sprintf(str, "DeviceGUID = %x\n", lpddi->guidInstance); // Tries to print a struct as an int #endif - OutputDebugStringA(string); + OutputDebugStringA(str); return DIENUM_STOP; }