mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 03:12:18 -05:00
Return button translation for GER/FRA (#287)
This commit is contained in:
parent
40f13ff2e6
commit
78b3c1ae47
@ -2885,6 +2885,25 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user