mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 01:40:47 +00:00
Set up build system and disassembly for gc-us (#1982)
* Build gc-us * Set up gc-us disassembly * Don't disasm unchanged overlays * Fix gc-eu-mq BSS * romalign link_animetion for NTSC * Explicitly set CPP defines to 0/1 * Add #ifs to segment_symbols.h * Add sButtonTextures now * Fix message _SHIFTL usage * Don't ifdef LANGUAGE_MAX
This commit is contained in:
parent
baf1e8c174
commit
bf3339a16d
32 changed files with 14124 additions and 205 deletions
|
@ -897,7 +897,15 @@ static void* sFileInfoBoxTextures[] = {
|
|||
gFileSelFileInfoBox4Tex, gFileSelFileInfoBox5Tex,
|
||||
};
|
||||
|
||||
static void* sTitleLabels[3][9] = {
|
||||
static void* sTitleLabels[][9] = {
|
||||
#if OOT_NTSC
|
||||
{ gFileSelPleaseSelectAFileJPNTex, gFileSelOpenThisFileJPNTex, gFileSelCopyWhichFileJPNTex,
|
||||
gFileSelCopyToWhichFileJPNTex, gFileSelAreYouSureJPNTex, gFileSelFileCopiedJPNTex, gFileSelEraseWhichFileJPNTex,
|
||||
gFileSelAreYouSure2JPNTex, gFileSelFileErasedJPNTex },
|
||||
{ gFileSelPleaseSelectAFileENGTex, gFileSelOpenThisFileENGTex, gFileSelCopyWhichFileENGTex,
|
||||
gFileSelCopyToWhichFileENGTex, gFileSelAreYouSureENGTex, gFileSelFileCopiedENGTex, gFileSelEraseWhichFileENGTex,
|
||||
gFileSelAreYouSure2ENGTex, gFileSelFileErasedENGTex },
|
||||
#else
|
||||
{ gFileSelPleaseSelectAFileENGTex, gFileSelOpenThisFileENGTex, gFileSelCopyWhichFileENGTex,
|
||||
gFileSelCopyToWhichFileENGTex, gFileSelAreYouSureENGTex, gFileSelFileCopiedENGTex, gFileSelEraseWhichFileENGTex,
|
||||
gFileSelAreYouSure2ENGTex, gFileSelFileErasedENGTex },
|
||||
|
@ -907,34 +915,49 @@ static void* sTitleLabels[3][9] = {
|
|||
{ gFileSelPleaseSelectAFileFRATex, gFileSelOpenThisFileFRATex, gFileSelCopyWhichFileFRATex,
|
||||
gFileSelCopyToWhichFileFRATex, gFileSelAreYouSureFRATex, gFileSelFileCopiedFRATex, gFileSelEraseWhichFileFRATex,
|
||||
gFileSelAreYouSure2FRATex, gFileSelFileErasedFRATex }
|
||||
#endif
|
||||
};
|
||||
|
||||
static void* sWarningLabels[3][5] = {
|
||||
static void* sWarningLabels[][5] = {
|
||||
#if OOT_NTSC
|
||||
{ gFileSelNoFileToCopyJPNTex, gFileSelNoFileToEraseJPNTex, gFileSelNoEmptyFileJPNTex, gFileSelFileEmptyJPNTex,
|
||||
gFileSelFileInUseJPNTex },
|
||||
{ gFileSelNoFileToCopyENGTex, gFileSelNoFileToEraseENGTex, gFileSelNoEmptyFileENGTex, gFileSelFileEmptyENGTex,
|
||||
gFileSelFileInUseENGTex },
|
||||
#else
|
||||
{ gFileSelNoFileToCopyENGTex, gFileSelNoFileToEraseENGTex, gFileSelNoEmptyFileENGTex, gFileSelFileEmptyENGTex,
|
||||
gFileSelFileInUseENGTex },
|
||||
{ gFileSelNoFileToCopyGERTex, gFileSelNoFileToEraseGERTex, gFileSelNoEmptyFileGERTex, gFileSelFileEmptyGERTex,
|
||||
gFileSelFileInUseGERTex },
|
||||
{ gFileSelNoFileToCopyFRATex, gFileSelNoFileToEraseFRATex, gFileSelNoEmptyFileFRATex, gFileSelFileEmptyFRATex,
|
||||
gFileSelFileInUseFRATex },
|
||||
#endif
|
||||
};
|
||||
|
||||
static void* sFileButtonTextures[3][3] = {
|
||||
static void* sFileButtonTextures[][3] = {
|
||||
#if OOT_NTSC
|
||||
{ gFileSelFile1ButtonJPNTex, gFileSelFile2ButtonJPNTex, gFileSelFile3ButtonJPNTex },
|
||||
{ gFileSelFile1ButtonENGTex, gFileSelFile2ButtonENGTex, gFileSelFile3ButtonENGTex },
|
||||
#else
|
||||
{ gFileSelFile1ButtonENGTex, gFileSelFile2ButtonENGTex, gFileSelFile3ButtonENGTex },
|
||||
{ gFileSelFile1ButtonGERTex, gFileSelFile2ButtonGERTex, gFileSelFile3ButtonGERTex },
|
||||
{ gFileSelFile1ButtonFRATex, gFileSelFile2ButtonFRATex, gFileSelFile3ButtonFRATex },
|
||||
#endif
|
||||
};
|
||||
|
||||
static void* sActionButtonTextures[3][4] = {
|
||||
static void* sActionButtonTextures[][4] = {
|
||||
#if OOT_NTSC
|
||||
{ gFileSelCopyButtonJPNTex, gFileSelEraseButtonJPNTex, gFileSelYesButtonJPNTex, gFileSelQuitButtonJPNTex },
|
||||
{ gFileSelCopyButtonENGTex, gFileSelEraseButtonENGTex, gFileSelYesButtonENGTex, gFileSelQuitButtonENGTex },
|
||||
#else
|
||||
{ gFileSelCopyButtonENGTex, gFileSelEraseButtonENGTex, gFileSelYesButtonENGTex, gFileSelQuitButtonENGTex },
|
||||
{ gFileSelCopyButtonGERTex, gFileSelEraseButtonGERTex, gFileSelYesButtonGERTex, gFileSelQuitButtonGERTex },
|
||||
{ gFileSelCopyButtonFRATex, gFileSelEraseButtonFRATex, gFileSelYesButtonFRATex, gFileSelQuitButtonFRATex },
|
||||
#endif
|
||||
};
|
||||
|
||||
static void* sOptionsButtonTextures[] = {
|
||||
gFileSelOptionsButtonENGTex,
|
||||
gFileSelOptionsButtonGERTex,
|
||||
gFileSelOptionsButtonENGTex,
|
||||
};
|
||||
static void* sOptionsButtonTextures[] = LANGUAGE_ARRAY(gFileSelOptionsButtonJPNTex, gFileSelOptionsButtonENGTex,
|
||||
gFileSelOptionsButtonGERTex, gFileSelOptionsButtonENGTex);
|
||||
|
||||
/**
|
||||
* Draw most window contents including buttons, labels, and icons.
|
||||
|
@ -1597,11 +1620,8 @@ static void (*sFileSelectUpdateFuncs[])(GameState*) = {
|
|||
};
|
||||
|
||||
void FileSelect_Main(GameState* thisx) {
|
||||
static void* controlsTextures[] = {
|
||||
gFileSelControlsENGTex,
|
||||
gFileSelControlsGERTex,
|
||||
gFileSelControlsFRATex,
|
||||
};
|
||||
static void* controlsTextures[] =
|
||||
LANGUAGE_ARRAY(gFileSelControlsJPNTex, gFileSelControlsENGTex, gFileSelControlsGERTex, gFileSelControlsFRATex);
|
||||
FileSelectState* this = (FileSelectState*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
|
||||
|
|
|
@ -87,15 +87,25 @@ void FileSelect_SetKeyboardVtx(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
static void* sNameLabelTextures[] = { gFileSelNameENGTex, gFileSelNameENGTex, gFileSelNameFRATex };
|
||||
static void* sNameLabelTextures[] =
|
||||
LANGUAGE_ARRAY(gFileSelNameJPNTex, gFileSelNameENGTex, gFileSelNameENGTex, gFileSelNameFRATex);
|
||||
|
||||
static void* sBackspaceEndTextures[][2] = {
|
||||
#if OOT_NTSC
|
||||
static void* sButtonTextures[] = {
|
||||
gFileSelHiraganaButtonTex, gFileSelKatakanaButtonTex, gFileSelKanjiButtonTex,
|
||||
gFileSelBackspaceButtonTex, gFileSelENDButtonENGTex,
|
||||
};
|
||||
|
||||
static u16 sButtonWidths[] = { 44, 44, 28, 28, 44 };
|
||||
#else
|
||||
static void* sButtonTextures[][2] = {
|
||||
{ gFileSelBackspaceButtonTex, gFileSelENDButtonENGTex },
|
||||
{ gFileSelBackspaceButtonTex, gFileSelENDButtonGERTex },
|
||||
{ gFileSelBackspaceButtonTex, gFileSelENDButtonFRATex },
|
||||
};
|
||||
|
||||
static u16 sBackspaceEndWidths[] = { 28, 44 };
|
||||
static u16 sButtonWidths[] = { 28, 44 };
|
||||
#endif
|
||||
|
||||
static s16 D_808125EC[] = {
|
||||
0xFFE2, 0xFFF0, 0xFFFA, 0x0004, 0x000E, 0x0018, 0x0022, 0x002C, 0x0036, 0xFFF0, 0xFFF0,
|
||||
|
@ -137,9 +147,16 @@ void FileSelect_SetNameEntryVtx(GameState* thisx) {
|
|||
for (phi_t1 = 0; phi_t1 < 2; phi_t1++, phi_s0 += 4) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2], 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sBackspaceEndTextures[gSaveContext.language][phi_t1], G_IM_FMT_IA,
|
||||
G_IM_SIZ_16b, sBackspaceEndWidths[phi_t1], 16, 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);
|
||||
#if OOT_NTSC
|
||||
// TODO: implement NTSC version
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sButtonTextures[phi_t1], G_IM_FMT_IA, G_IM_SIZ_16b, sButtonWidths[phi_t1],
|
||||
16, 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);
|
||||
#else
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sButtonTextures[gSaveContext.language][phi_t1], G_IM_FMT_IA, G_IM_SIZ_16b,
|
||||
sButtonWidths[phi_t1], 16, 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);
|
||||
#endif
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, phi_s0, phi_s0 + 2, phi_s0 + 3, phi_s0 + 1, 0);
|
||||
}
|
||||
|
||||
|
@ -738,22 +755,24 @@ typedef struct {
|
|||
|
||||
static OptionsMenuTextureInfo sOptionsMenuHeaders[] = {
|
||||
{
|
||||
{ gFileSelOptionsENGTex, gFileSelOptionsGERTex, gFileSelOptionsENGTex },
|
||||
LANGUAGE_ARRAY(gFileSelOptionsJPNTex, gFileSelOptionsENGTex, gFileSelOptionsGERTex, gFileSelOptionsENGTex),
|
||||
{ 128, 128, 128 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDFRATex),
|
||||
{ 64, 64, 64 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelLTargetingENGTex, gFileSelLTargetingGERTex, gFileSelLTargetingFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelLTargetingJPNTex, gFileSelLTargetingENGTex, gFileSelLTargetingGERTex,
|
||||
gFileSelLTargetingFRATex),
|
||||
{ 64, 144, 64 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelCheckBrightnessENGTex, gFileSelCheckBrightnessGERTex, gFileSelCheckBrightnessFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelCheckBrightnessJPNTex, gFileSelCheckBrightnessENGTex, gFileSelCheckBrightnessGERTex,
|
||||
gFileSelCheckBrightnessFRATex),
|
||||
{ 128, 128, 128 },
|
||||
16,
|
||||
},
|
||||
|
@ -761,32 +780,32 @@ static OptionsMenuTextureInfo sOptionsMenuHeaders[] = {
|
|||
|
||||
static OptionsMenuTextureInfo sOptionsMenuSettings[] = {
|
||||
{
|
||||
{ gFileSelStereoENGTex, gFileSelStereoENGTex, gFileSelStereoFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelStereoJPNTex, gFileSelStereoENGTex, gFileSelStereoENGTex, gFileSelStereoFRATex),
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelMonoENGTex, gFileSelMonoENGTex, gFileSelMonoENGTex },
|
||||
LANGUAGE_ARRAY(gFileSelMonoJPNTex, gFileSelMonoENGTex, gFileSelMonoENGTex, gFileSelMonoENGTex),
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelHeadsetENGTex, gFileSelHeadsetGERTex, gFileSelHeadsetFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelHeadsetJPNTex, gFileSelHeadsetENGTex, gFileSelHeadsetGERTex, gFileSelHeadsetFRATex),
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelSurroundENGTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex },
|
||||
LANGUAGE_ARRAY(gFileSelSurroundJPNTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex),
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelSwitchJPNTex, gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex),
|
||||
{ 48, 80, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex },
|
||||
LANGUAGE_ARRAY(gFileSelHoldJPNTex, gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex),
|
||||
{ 48, 80, 48 },
|
||||
16,
|
||||
},
|
||||
|
@ -879,11 +898,15 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
#if OOT_NTSC
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811D30, 32, 0);
|
||||
#else
|
||||
if (gSaveContext.language == LANGUAGE_GER) {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811E30, 32, 0);
|
||||
} else {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811D30, 32, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
|
||||
|
@ -899,11 +922,15 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
|
|||
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
|
||||
}
|
||||
|
||||
#if OOT_NTSC
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811F30, 32, 0);
|
||||
#else
|
||||
if (gSaveContext.language == LANGUAGE_GER) {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80812130, 32, 0);
|
||||
} else {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811F30, 32, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0, vtx = 0; i < 4; i++, vtx += 4) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
Loading…
Add table
Add a link
Reference in a new issue