mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-30 19:40:31 -07:00
Fixes naming discrepancy of textbox positions. (#854)
Equivalent to https://github.com/zeldaret/oot/pull/1329
This commit is contained in:
parent
b6af684583
commit
27b3644335
2 changed files with 7 additions and 7 deletions
|
@ -25,8 +25,8 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0 */ TEXTBOX_POS_VARIABLE,
|
/* 0 */ TEXTBOX_POS_VARIABLE,
|
||||||
/* 1 */ TEXTBOX_POS_TOP,
|
/* 1 */ TEXTBOX_POS_TOP,
|
||||||
/* 2 */ TEXTBOX_POS_BOTTOM,
|
/* 2 */ TEXTBOX_POS_MIDDLE,
|
||||||
/* 3 */ TEXTBOX_POS_MIDDLE
|
/* 3 */ TEXTBOX_POS_BOTTOM
|
||||||
} TextBoxPosition;
|
} TextBoxPosition;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -3306,13 +3306,13 @@ void Message_Update(GlobalContext* globalCtx) {
|
||||||
static s16 sTextboxXPositions[] = {
|
static s16 sTextboxXPositions[] = {
|
||||||
34, 34, 34, 34, 34, 34,
|
34, 34, 34, 34, 34, 34,
|
||||||
};
|
};
|
||||||
static s16 sTextboxMidYPositions[] = {
|
static s16 sTextboxLowerYPositions[] = {
|
||||||
142, 142, 142, 142, 174, 142,
|
142, 142, 142, 142, 174, 142,
|
||||||
};
|
};
|
||||||
static s16 sTextboxUpperYPositions[] = {
|
static s16 sTextboxUpperYPositions[] = {
|
||||||
38, 38, 38, 38, 174, 38,
|
38, 38, 38, 38, 174, 38,
|
||||||
};
|
};
|
||||||
static s16 sTextboxLowerYPositions[] = {
|
static s16 sTextboxMidYPositions[] = {
|
||||||
90, 90, 90, 90, 174, 90,
|
90, 90, 90, 90, 174, 90,
|
||||||
};
|
};
|
||||||
static s16 sTextboxEndIconYOffset[] = {
|
static s16 sTextboxEndIconYOffset[] = {
|
||||||
|
@ -3406,20 +3406,20 @@ void Message_Update(GlobalContext* globalCtx) {
|
||||||
if (!msgCtx->textBoxPos) { // variable position
|
if (!msgCtx->textBoxPos) { // variable position
|
||||||
if (YREG(15) != 0 || globalCtx->sceneNum == SCENE_HAIRAL_NIWA) {
|
if (YREG(15) != 0 || globalCtx->sceneNum == SCENE_HAIRAL_NIWA) {
|
||||||
if (averageY < XREG(92)) {
|
if (averageY < XREG(92)) {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxMidYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var];
|
||||||
} else {
|
} else {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
||||||
}
|
}
|
||||||
} else if (globalCtx->sceneNum == SCENE_MARKET_DAY || globalCtx->sceneNum == SCENE_MARKET_NIGHT ||
|
} else if (globalCtx->sceneNum == SCENE_MARKET_DAY || globalCtx->sceneNum == SCENE_MARKET_NIGHT ||
|
||||||
globalCtx->sceneNum == SCENE_MARKET_RUINS) {
|
globalCtx->sceneNum == SCENE_MARKET_RUINS) {
|
||||||
if (averageY < XREG(93)) {
|
if (averageY < XREG(93)) {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxMidYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var];
|
||||||
} else {
|
} else {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (averageY < XREG(94)) {
|
if (averageY < XREG(94)) {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxMidYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var];
|
||||||
} else {
|
} else {
|
||||||
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue