diff --git a/Makefile.port b/Makefile.port index ddd32fa38..5aec2e320 100644 --- a/Makefile.port +++ b/Makefile.port @@ -100,8 +100,15 @@ else $(error ROM version $(VERSION) is not supported) endif +VERSION_HASH := $(shell git rev-parse --short HEAD) +VERSION_TARGET := $(TARGET_PLATFORM) +VERSION_ROMID := $(ROMID) + DEFINES := \ VERSION=$(VERSION) \ + VERSION_HASH=\"$(VERSION_HASH)\" \ + VERSION_TARGET=\"$(VERSION_TARGET)\" \ + VERSION_ROMID=\"$(VERSION_ROMID)\" \ MATCHING=0 \ PAL=0 \ PIRACYCHECKS=0 \ diff --git a/src/game/title.c b/src/game/title.c index 21a601153..9cfffb551 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -258,6 +258,9 @@ struct legalelement { s16 unused06; s16 type; u16 textid; +#ifndef PLATFORM_N64 + const char *textptr; +#endif }; struct legalelement g_LegalElements[] = { @@ -351,6 +354,11 @@ Gfx *titleRenderLegal(Gfx *gdl) case LEGALELEMENTTYPE_BLUETEXTLG: font1 = g_CharsHandelGothicLg; font2 = g_FontHandelGothicLg; +#if !defined(PLATFORM_N64) && defined(VERSION_HASH) + if (elem->textid == L_OPTIONS_084) { + elem->textptr = VERSION_HASH " (" VERSION_TARGET ")"; + } +#endif break; case LEGALELEMENTTYPE_WHITETEXTLG: font1 = g_CharsHandelGothicLg; @@ -484,7 +492,12 @@ Gfx *titleRenderLegal(Gfx *gdl) #else x = elem->x; y = elem->y; +#ifdef PLATFORM_N64 gdl = textRenderProjected(gdl, &x, &y, langGet(elem->textid), font1, font2, colour, viGetWidth(), viGetHeight(), 0, 0); +#else + const char *textptr = elem->textptr ? elem->textptr : langGet(elem->textid); + gdl = textRenderProjected(gdl, &x, &y, textptr, font1, font2, colour, viGetWidth(), viGetHeight(), 0, 0); +#endif #endif } }