Skip to content

Commit

Permalink
Fix Underworld build, fix some MISRA rules
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIndra55 committed Aug 20, 2022
1 parent 0221317 commit 921c0e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Hooking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void __cdecl EVENT_FontPrint(char* fmt, ...)
va_start(vl, fmt);
char str[1024]; // size same as game buffer
vsprintf_s(str, fmt, vl);
va_end(vl);

FONT_PrintFormatted(str);
}
Expand Down
1 change: 1 addition & 0 deletions game/font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void FONT_Print(const char* fmt, ...)

va_start(va, fmt);
vsprintf_s(formatted, fmt, va);
va_end(va);

Font__PrintFormatted(gMainFont, formatted, false);
}
Expand Down
4 changes: 3 additions & 1 deletion game/font.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ void FONT_SetCursor(float x, float y);
#define gMainFont *(void**)0x7D1800
#elif TR7
#define gMainFont *(void**)ADDR(0x1088A2C, 0x107F680)
#endif
#elif TR8
#define gMainFont *(void**)0x9DE6D4
#endif

0 comments on commit 921c0e4

Please sign in to comment.