Display all game versions in build info (#1982)

This commit is contained in:
GaryOderNichts 2022-11-20 20:13:54 +01:00 committed by GitHub
commit 5dcc7e41b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 21 deletions

View file

@ -15,7 +15,7 @@
#include "time.h"
const char* GetGameVersionString();
const char* GetGameVersionString(s32 index);
char* quote;
void Title_PrintBuildInfo(Gfx** gfxp) {
@ -23,8 +23,6 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
//GfxPrint* printer;
GfxPrint printer;
const char* gameVersionStr = GetGameVersionString();
g = *gfxp;
g = func_8009411C(g);
//printer = alloca(sizeof(GfxPrint));
@ -41,9 +39,22 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
GfxPrint_Printf(&printer, "GCC SHIP");
#endif
GfxPrint_SetPos(&printer, 1, 4);
GfxPrint_Printf(&printer, "Game Version: %s", gameVersionStr);
GfxPrint_SetPos(&printer, 1, 5);
s32 pos = 4;
GfxPrint_SetPos(&printer, 1, pos);
GfxPrint_Printf(&printer, "Game Versions:");
u32 numVersions = ResourceMgr_GetNumGameVersions();
if (!numVersions) {
GfxPrint_SetPos(&printer, 16, pos++);
GfxPrint_Printf(&printer, "Unknown");
} else {
for (u32 i = 0; i < numVersions; i++) {
GfxPrint_SetPos(&printer, 16, pos++);
GfxPrint_Printf(&printer, "%s", GetGameVersionString(i));
}
}
GfxPrint_SetPos(&printer, 1, pos);
GfxPrint_Printf(&printer, "Release Version: %s", gBuildVersion);
GfxPrint_SetColor(&printer, 255, 255, 255, 255);
@ -78,8 +89,8 @@ const char* SetQuote() {
return quotes[randomQuote];
}
const char* GetGameVersionString() {
uint32_t gameVersion = ResourceMgr_GetGameVersion();
const char* GetGameVersionString(s32 index) {
uint32_t gameVersion = ResourceMgr_GetGameVersion(index);
switch (gameVersion) {
case OOT_NTSC_10:
return "N64 NTSC 1.0";