mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 21:40:03 +00:00
[PAL N64] Match z_message.c (#2202)
This commit is contained in:
parent
8ff4faa084
commit
0acaed6d17
2 changed files with 51 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "z64pause.h"
|
||||
#include "z64scene.h"
|
||||
#include "z64map_mark.h"
|
||||
#include "versions.h"
|
||||
|
||||
struct Font;
|
||||
struct GameState;
|
||||
|
@ -49,11 +50,18 @@ typedef struct n64ddStruct_80121220 {
|
|||
struct SceneTableEntry* (*unk_48)(s32 sceneId, struct SceneTableEntry* sceneTable);
|
||||
char unk_4C[0x08];
|
||||
s32 (*unk_54)(struct PlayState*);
|
||||
#if OOT_NTSC
|
||||
void (*unk_58)(struct MessageTableEntry**, struct MessageTableEntry**, struct MessageTableEntry**);
|
||||
#else
|
||||
void (*unk_58)(struct MessageTableEntry**, const char***, const char***, struct MessageTableEntry**);
|
||||
#endif
|
||||
char unk_5C[0x4];
|
||||
s32 (*unk_60)(struct Font*);
|
||||
s32 (*unk_64)(struct Font*);
|
||||
s32 (*unk_68)(struct Font*);
|
||||
#if OOT_PAL
|
||||
s32 (*unk_6C_PAL)(struct Font*);
|
||||
#endif
|
||||
void (*unk_6C)(struct PlayState*, SceneDrawConfigFunc*);
|
||||
s32 (*unk_70)(struct DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue, OSMesg msg);
|
||||
void (*unk_74)(struct GameState*);
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
#include "versions.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.2:112"
|
||||
"ntsc-1.2:112 pal-1.0:128 pal-1.1:128"
|
||||
|
||||
#if !PLATFORM_GC
|
||||
#define OCARINA_BUTTON_A_PRIM_1_R 80
|
||||
|
@ -108,7 +107,7 @@ u16 sNextTextId = 0;
|
|||
|
||||
s16 sTextIsCredits = false;
|
||||
|
||||
#if OOT_PAL
|
||||
#if PLATFORM_GC && OOT_PAL
|
||||
UNK_TYPE D_8014B30C = 0;
|
||||
#endif
|
||||
|
||||
|
@ -1724,7 +1723,7 @@ void Message_Decode(PlayState* play) {
|
|||
Font* font = &play->msgCtx.font;
|
||||
s32 charTexIdx = 0;
|
||||
s16 i;
|
||||
#if OOT_NTSC
|
||||
#if !(PLATFORM_GC && OOT_PAL)
|
||||
s16 j;
|
||||
#endif
|
||||
s16 decodedBufPos = 0;
|
||||
|
@ -1735,7 +1734,7 @@ void Message_Decode(PlayState* play) {
|
|||
s16 loadChar;
|
||||
u16 value;
|
||||
u8 curChar;
|
||||
#if OOT_NTSC
|
||||
#if !(PLATFORM_GC && OOT_PAL)
|
||||
u16 curCharWide;
|
||||
u8* fontBuf;
|
||||
#endif
|
||||
|
@ -2562,18 +2561,47 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
Message_FindMessagePAL(play, textId);
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_64(&play->msgCtx.font)) {
|
||||
|
||||
} else {
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength, "../z_message_PAL.c", 1966);
|
||||
#endif
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
Message_FindMessagePAL(play, textId);
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
#if PLATFORM_N64
|
||||
//! @bug checks unk_64 != NULL instead of unk_68 != NULL
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_68(&play->msgCtx.font)) {
|
||||
|
||||
} else {
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_ger_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_ger_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength, "../z_message_PAL.c", 1978);
|
||||
#endif
|
||||
} else {
|
||||
Message_FindMessagePAL(play, textId);
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
#if PLATFORM_N64
|
||||
//! @bug checks unk_64 != NULL instead of unk_6C_PAL != NULL
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_6C_PAL(&play->msgCtx.font)) {
|
||||
|
||||
} else {
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_fra_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_fra_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength, "../z_message_PAL.c", 1990);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -4005,7 +4033,10 @@ void Message_Update(PlayState* play) {
|
|||
s16 playerFocusScreenPosY;
|
||||
s16 actorFocusScreenPosY;
|
||||
#if OOT_VERSION < GC_US
|
||||
s32 pad[2];
|
||||
s32 pad1;
|
||||
#endif
|
||||
#if OOT_NTSC && OOT_VERSION < GC_US
|
||||
s32 pad2;
|
||||
#endif
|
||||
|
||||
#if OOT_DEBUG
|
||||
|
@ -4323,9 +4354,14 @@ void Message_SetTables(void) {
|
|||
|
||||
sStaffMessageEntryTablePtr = sStaffMessageEntryTable;
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if PLATFORM_N64 && OOT_NTSC
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_58 != NULL)) {
|
||||
B_80121220->unk_58(&sJpnMessageEntryTablePtr, &sNesMessageEntryTablePtr, &sStaffMessageEntryTablePtr);
|
||||
}
|
||||
#elif PLATFORM_N64 && OOT_PAL
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_58 != NULL)) {
|
||||
B_80121220->unk_58(&sNesMessageEntryTablePtr, &sGerMessageEntryTablePtr, &sFraMessageEntryTablePtr,
|
||||
&sStaffMessageEntryTablePtr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue