From 620a25d75c2a9a307543b5abf2612c2ea38d5967 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 17 Sep 2020 21:44:13 +0100 Subject: [PATCH] Made `out` ASM-accurate It just so happens that a path buffer and a FILE pointer both take up the right amount of stack space *and* have the correct stack frame ordering, so maybe this is actually what the original source code did. --- src/Draw.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Draw.cpp b/src/Draw.cpp index db2964fd..a08a4cd9 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -730,13 +730,15 @@ 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 surface_identifier) +BOOL out(char surface_identifier) { - char str[0x100]; + // The actual name (and type) of these two variables are unknown + char path[MAX_PATH]; + FILE *fp; - // The actual name of these two variables are unknown (void)surface_identifier; - (void)str; + (void)path; + (void)fp; // There may have been some kind of 'OutputDebugStringA' call here, // like the one in 'EnumDevices_Callback' in 'Input.cpp'.