summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorBaoulettes <perlouzerie@hotmail.fr>2022-05-04 03:00:49 +0200
committerGitHub <noreply@github.com>2022-05-03 21:00:49 -0400
commit091983b3e3c0d0a1938d85a1f9c2e776f873603a (patch)
treec23c05d9bb7741653e5812f301099122ee99a3cf /soh/src/code
parent47331a904fcffeee4e6dd064665f94a6da6a3c8c (diff)
Cleaning bool check and now use proper variable. (#261)
Baou is a noob and confirming it everyday.
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index f87dd13b4..9a56000ec 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -1034,13 +1034,12 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
shiftBottomY = 0x1000;
//if this card is bosses cards, has translation and that is not using English language.
- if (titleCtx->isBossCard == 1 && titleCtx->hasTranslation == 1 && gSaveContext.language != LANGUAGE_ENG) {
+ if (titleCtx->isBossCard && titleCtx->hasTranslation && gSaveContext.language != LANGUAGE_ENG) {
+ textureLanguageOffset = (width * height * gSaveContext.language);
if (gSaveContext.language == LANGUAGE_GER) {
- textureLanguageOffset = (width * height * gSaveContext.language);
shiftTopY = 0x400;
shiftBottomY = 0x1400;
} else if (gSaveContext.language == LANGUAGE_FRA) {
- textureLanguageOffset = (width * height * gSaveContext.language);
shiftTopY = 0x800;
shiftBottomY = 0x1800;
}
@@ -1052,7 +1051,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
(u8)titleCtx->alpha);
- gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY, G_IM_FMT_IA,
+ gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftTopY, G_IM_FMT_IA,
G_IM_SIZ_8b,
width, 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);
@@ -1064,7 +1063,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
// If texture is bigger than 0x1000, display the rest
if (height > 0) {
- gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + (uintptr_t)textureLanguageOffset + (uintptr_t)shiftBottomY,
+ gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftBottomY,
G_IM_FMT_IA,
G_IM_SIZ_8b, width, 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);