Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-09-17 22:10:24 +01:00
commit d3e18d795d
3 changed files with 24 additions and 16 deletions

View file

@ -18,12 +18,15 @@ static unsigned long color_black;
// TODO - Another function that has an incorrect stack frame // TODO - Another function that has an incorrect stack frame
BOOL InitBack(const char *fName, int type) BOOL InitBack(const char *fName, int type)
{ {
std::string path;
FILE *fp;
color_black = GetCortBoxColor(RGB(0, 0, 0x10)); // Unused. This may have once been used by background type 4 (the solid black background) color_black = GetCortBoxColor(RGB(0, 0, 0x10)); // Unused. This may have once been used by background type 4 (the solid black background)
// We're not actually loading the bitmap here - we're just reading its width/height and making sure it's really a BMP file // We're not actually loading the bitmap here - we're just reading its width/height and making sure it's really a BMP file
std::string path = gDataPath + '/' + fName + ".pbm"; path = gDataPath + '/' + fName + ".pbm";
FILE *fp = fopen(path.c_str(), "rb"); fp = fopen(path.c_str(), "rb");
if (fp == NULL) if (fp == NULL)
return FALSE; return FALSE;

View file

@ -582,23 +582,24 @@ void CortBox2(const RECT *rect, unsigned long col, SurfaceID surf_no)
// Dummied-out log function // Dummied-out log function
// According to the Mac port, its name really is just "out". // According to the Mac port, its name really is just "out".
BOOL out(int unknown) BOOL out(char surface_identifier)
{ {
char unknown2[0x100]; // The actual name (and type) of these two variables are unknown
int unknown3; std::string path;
int unknown4; FILE *fp;
int unknown5;
(void)unknown; (void)surface_identifier;
(void)unknown2; (void)path;
(void)unknown3; (void)fp;
(void)unknown4;
(void)unknown5; // 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; return TRUE;
} }
// TODO - Probably not the original variable name (this is an educated guess) // TODO - Probably not the original function name (this is an educated guess)
int RestoreSurfaces(void) int RestoreSurfaces(void)
{ {
int s; int s;

View file

@ -292,8 +292,12 @@ BOOL LoadGenericData(void)
pt_size += MakePixToneObject(&gPtpTable[138], 1, 7); pt_size += MakePixToneObject(&gPtpTable[138], 1, 7);
// Commented-out, since ints *technically* have an undefined length // Commented-out, since ints *technically* have an undefined length
// char str[0x40]; /*
// sprintf(str, "PixTone = %d byte", pt_size); char str[0x40];
// There must have been some kind of console print function here or something sprintf(str, "PixTone = %d byte", pt_size);
// There must have once been a 'OutputDebugStringA' call here or something.
// See 'EnumDevices_Callback' in 'Input.cpp' for an example of this.
*/
return TRUE; return TRUE;
} }