Document some leftover debug-related code
This commit is contained in:
parent
c0a6441bcb
commit
3a3530252b
3 changed files with 23 additions and 15 deletions
19
src/Draw.cpp
19
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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue