mirror of https://github.com/zeldaret/mm.git
Rename globals related to textbox and icon scaling
This commit is contained in:
parent
508d8bb07a
commit
30417fcd8e
|
|
@ -164,7 +164,7 @@ s16 gOcarinaSongItemMap[] = {
|
|||
|
||||
s32 sCharTexSize;
|
||||
s32 sCharTexScale;
|
||||
s32 D_801F6B08;
|
||||
s32 sItemIconTexScale;
|
||||
|
||||
s16 sOcarinaButtonAPrimR;
|
||||
s16 sOcarinaButtonAPrimB;
|
||||
|
|
@ -831,18 +831,18 @@ s16 sTextboxHeight = 64;
|
|||
s16 sTextboxTexWidth = 1024;
|
||||
s16 sTextboxTexHeight = 1024;
|
||||
|
||||
f32 D_801CFDA4[] = { 0.6f, 0.75f, 0.9f, 1.0f, 1.05f, 1.1f, 1.05f, 1.0f, 1.0f };
|
||||
f32 D_801CFDC8[] = { 0.6f, 0.75f, 0.9f, 1.0f, 1.05f, 1.1f, 1.05f, 1.0f, 1.0f };
|
||||
f32 sTextboxGrowingWidthScale[] = { 0.6f, 0.75f, 0.9f, 1.0f, 1.05f, 1.1f, 1.05f, 1.0f, 1.0f };
|
||||
f32 sTextboxGrowingHeightScale[] = { 0.6f, 0.75f, 0.9f, 1.0f, 1.05f, 1.1f, 1.05f, 1.0f, 1.0f };
|
||||
|
||||
// resizes textboxes when opening them
|
||||
void Message_GrowTextbox(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (!play->pauseCtx.bombersNotebookOpen) {
|
||||
sTextboxWidth = D_801CFDA4[msgCtx->stateTimer] * 256.0f;
|
||||
sTextboxTexWidth = 1024.0f / D_801CFDA4[msgCtx->stateTimer];
|
||||
sTextboxHeight = D_801CFDC8[msgCtx->stateTimer] * 64.0f;
|
||||
sTextboxTexHeight = 1024.0f / D_801CFDC8[msgCtx->stateTimer];
|
||||
sTextboxWidth = sTextboxGrowingWidthScale[msgCtx->stateTimer] * 256.0f;
|
||||
sTextboxTexWidth = 1024.0f / sTextboxGrowingWidthScale[msgCtx->stateTimer];
|
||||
sTextboxHeight = sTextboxGrowingHeightScale[msgCtx->stateTimer] * 64.0f;
|
||||
sTextboxTexHeight = 1024.0f / sTextboxGrowingHeightScale[msgCtx->stateTimer];
|
||||
msgCtx->textboxY = msgCtx->textboxYTarget + ((64 - sTextboxHeight) / 2);
|
||||
msgCtx->textboxColorAlphaCurrent += msgCtx->textboxColorAlphaTarget / 8;
|
||||
msgCtx->stateTimer++;
|
||||
|
|
@ -1047,7 +1047,8 @@ void Message_DrawItemIcon(PlayState* play, Gfx** gfxP) {
|
|||
}
|
||||
|
||||
gSPTextureRectangle(gfx++, msgCtx->unk12010 << 2, msgCtx->unk12012 << 2, (msgCtx->unk12010 + msgCtx->unk12014) << 2,
|
||||
(msgCtx->unk12012 + msgCtx->unk12016) << 2, G_TX_RENDERTILE, 0, 0, D_801F6B08, D_801F6B08);
|
||||
(msgCtx->unk12012 + msgCtx->unk12016) << 2, G_TX_RENDERTILE, 0, 0, sItemIconTexScale,
|
||||
sItemIconTexScale);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
|
|
@ -3179,7 +3180,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
MessageContext* msgCtx = &play->msgCtx;
|
||||
Font* font = &msgCtx->font;
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 var_fv0;
|
||||
f32 itemIconScale;
|
||||
|
||||
if (play->msgCtx.msgMode == MSGMODE_NONE) {
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
|
|
@ -3221,19 +3222,19 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
D_801C6A70 = 0;
|
||||
msgCtx->textboxSkipped = false;
|
||||
msgCtx->textIsCredits = false;
|
||||
var_fv0 = 1.0f;
|
||||
itemIconScale = 1.0f;
|
||||
|
||||
if (play->pauseCtx.bombersNotebookOpen) {
|
||||
if (gSaveContext.options.language == LANGUAGE_JPN) {
|
||||
msgCtx->textCharScale = 1.4f;
|
||||
msgCtx->lineHeight = 0x1E;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
var_fv0 = 1.4;
|
||||
itemIconScale = 1.4;
|
||||
} else {
|
||||
msgCtx->textCharScale = 1.4f;
|
||||
msgCtx->lineHeight = 0x16;
|
||||
msgCtx->textPosXTarget = 0x32;
|
||||
var_fv0 = 1.4;
|
||||
itemIconScale = 1.4;
|
||||
}
|
||||
} else if (textId >= 0x4E20) {
|
||||
msgCtx->textIsCredits = true;
|
||||
|
|
@ -3252,7 +3253,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
|
||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||
sCharTexScale = 1024.0f / msgCtx->textCharScale;
|
||||
D_801F6B08 = 1024.0f / var_fv0;
|
||||
sItemIconTexScale = 1024.0f / itemIconScale;
|
||||
|
||||
if (msgCtx->textIsCredits) {
|
||||
Message_FindCreditsMessage(play, textId);
|
||||
|
|
@ -3323,7 +3324,7 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
|||
MessageContext* msgCtx = &play->msgCtx;
|
||||
Font* font = &msgCtx->font;
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 temp = 1024.0f;
|
||||
f32 scale = 1024.0f;
|
||||
|
||||
msgCtx->ocarinaAction = 0xFFFF;
|
||||
|
||||
|
|
@ -3346,8 +3347,8 @@ void Message_PauseMenu_ShowDescription(PlayState* play, u16 textId, u8 textBoxPo
|
|||
}
|
||||
|
||||
sCharTexSize = msgCtx->textCharScale * 16.0f;
|
||||
sCharTexScale = temp / msgCtx->textCharScale;
|
||||
D_801F6B08 = temp / 1;
|
||||
sCharTexScale = scale / msgCtx->textCharScale;
|
||||
sItemIconTexScale = scale / 1;
|
||||
|
||||
if ((textId == 0x1709) && (player->transformation == PLAYER_FORM_DEKU)) {
|
||||
textId = 0x1705;
|
||||
|
|
|
|||
|
|
@ -1145,8 +1145,8 @@ D_801CFD94 = 0x801CFD94; // size:0x4
|
|||
D_801CFD98 = 0x801CFD98; // size:0x4
|
||||
D_801CFD9C = 0x801CFD9C; // size:0x4
|
||||
D_801CFDA0 = 0x801CFDA0; // size:0x4
|
||||
D_801CFDA4 = 0x801CFDA4; // size:0x24
|
||||
D_801CFDC8 = 0x801CFDC8; // size:0x24
|
||||
sTextboxGrowingWidthScale = 0x801CFDA4; // size:0x24
|
||||
sTextboxGrowingHeightScale = 0x801CFDC8; // size:0x24
|
||||
D_801CFDEC = 0x801CFDEC; // size:0x18
|
||||
D_801CFE04 = 0x801CFE04; // size:0x18
|
||||
D_801CFE1C = 0x801CFE1C; // size:0x18
|
||||
|
|
@ -1952,7 +1952,7 @@ D_801F6AF0 = 0x801F6AF0; // size:0x2
|
|||
D_801F6AF2 = 0x801F6AF2; // size:0xE
|
||||
D_801F6B00 = 0x801F6B00; // size:0x4
|
||||
D_801F6B04 = 0x801F6B04; // size:0x4
|
||||
D_801F6B08 = 0x801F6B08; // size:0x4
|
||||
sItemIconTexScale = 0x801F6B08; // size:0x4
|
||||
D_801F6B0C = 0x801F6B0C; // size:0x2
|
||||
D_801F6B0E = 0x801F6B0E; // size:0x2
|
||||
D_801F6B10 = 0x801F6B10; // size:0x2
|
||||
|
|
|
|||
Loading…
Reference in New Issue