diff options
| author | Baoulettes <perlouzerie@hotmail.fr> | 2022-05-29 17:43:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-29 11:43:58 -0400 |
| commit | 78b3c1ae47b3177072fbd1f728a301494ba8396b (patch) | |
| tree | 3e1fed303f596e62e13406d5e6d19135aaa54286 /soh/src/code | |
| parent | 40f13ff2e6467e9c2e5d802d8b91e88cb9dbdadd (diff) | |
Return button translation for GER/FRA (#287)
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_parameter.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index dcfcdb05b..a9e9e4f9e 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2884,7 +2884,26 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - + + //There is probably a more elegant way to do it. + char* doAction = actionsTbl[3]; + char newName[512]; + if (gSaveContext.language != LANGUAGE_ENG) { + size_t length = strlen(doAction); + strcpy(newName, doAction); + if (gSaveContext.language == LANGUAGE_FRA) { + newName[length - 6] = 'F'; + newName[length - 5] = 'R'; + newName[length - 4] = 'A'; + } else if (gSaveContext.language == LANGUAGE_GER) { + newName[length - 6] = 'G'; + newName[length - 5] = 'E'; + newName[length - 4] = 'R'; + } + doAction = newName; + } + memcpy(interfaceCtx->doActionSegment + DO_ACTION_TEX_SIZE * 2, ResourceMgr_LoadTexByName(doAction), DO_ACTION_TEX_SIZE); + gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->doActionSegment + DO_ACTION_TEX_SIZE * 2, G_IM_FMT_IA, DO_ACTION_TEX_WIDTH, DO_ACTION_TEX_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); |
