mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-23 07:45:55 +00:00
Merge branch 'main' into doc_pause_menu
This commit is contained in:
commit
42f1446da1
8 changed files with 79 additions and 28 deletions
|
@ -5,8 +5,10 @@
|
|||
#include "z64pause.h"
|
||||
#include "z64scene.h"
|
||||
|
||||
struct Font;
|
||||
struct GameState;
|
||||
union Gfx;
|
||||
struct MessageTableEntry;
|
||||
struct PlayState;
|
||||
struct RegEditor;
|
||||
struct RoomContext;
|
||||
|
@ -39,7 +41,11 @@ typedef struct n64ddStruct_80121220 {
|
|||
struct SceneTableEntry* (*unk_48)(s32 sceneId, struct SceneTableEntry* sceneTable);
|
||||
char unk_4C[0x08];
|
||||
s32 (*unk_54)(struct PlayState*);
|
||||
char unk_58[0x14];
|
||||
void (*unk_58)(struct MessageTableEntry**, struct MessageTableEntry**, struct MessageTableEntry**);
|
||||
char unk_5C[0x4];
|
||||
s32 (*unk_60)(struct Font*);
|
||||
s32 (*unk_64)(struct Font*);
|
||||
s32 (*unk_68)(struct Font*);
|
||||
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*);
|
||||
|
|
|
@ -176,8 +176,8 @@ typedef enum TimerId {
|
|||
#define ENV_HAZARD_TEXT_TRIGGER_HOTROOM (1 << 0)
|
||||
#define ENV_HAZARD_TEXT_TRIGGER_UNDERWATER (1 << 1)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ WORLD_MAP_AREA_HYRULE_FIELD, // hyrule field / default / unset ?
|
||||
typedef enum WorldMapArea {
|
||||
/* 0 */ WORLD_MAP_AREA_HYRULE_FIELD,
|
||||
/* 1 */ WORLD_MAP_AREA_KAKARIKO_VILLAGE,
|
||||
/* 2 */ WORLD_MAP_AREA_GRAVEYARD,
|
||||
/* 3 */ WORLD_MAP_AREA_ZORAS_RIVER,
|
||||
|
@ -197,9 +197,9 @@ typedef enum {
|
|||
/* 17 */ WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER,
|
||||
/* 18 */ WORLD_MAP_AREA_GORON_CITY,
|
||||
/* 19 */ WORLD_MAP_AREA_LON_LON_RANCH,
|
||||
/* 20 */ WORLD_MAP_AREA_20, // hakasitarelay and a lon lon ranch cutscene, gQuestionMarkPositionNameENGTex
|
||||
/* 20 */ WORLD_MAP_AREA_QUESTION_MARK, // Windmill/Dampé's Grave (and a Lon Lon Ranch cutscene). Labeled as "?"
|
||||
/* 21 */ WORLD_MAP_AREA_GANONS_CASTLE,
|
||||
/* 22 */ WORLD_MAP_AREA_MAX // grottos and fairy's/great fairy's fountains (scenes with varying locations)
|
||||
/* 22 */ WORLD_MAP_AREA_MAX // also grottos and fairy's/great fairy's fountains (scenes with varying locations)
|
||||
} WorldMapArea;
|
||||
|
||||
// offsets in SavePlayerData and SaveContext/Save
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128"
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
uintptr_t sSysCfbFbPtr[2];
|
||||
uintptr_t sSysCfbEnd;
|
||||
|
|
|
@ -19,7 +19,7 @@ MtxF gMtxFClear = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128"
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
MtxF* sMatrixStack; // "Matrix_stack"
|
||||
MtxF* sCurrentMatrix; // "Matrix_now"
|
||||
|
|
|
@ -4,9 +4,22 @@
|
|||
#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:128 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
#if PLATFORM_N64
|
||||
#define OCARINA_BUTTON_A_PRIM_R 80
|
||||
#define OCARINA_BUTTON_A_PRIM_G 150
|
||||
#define OCARINA_BUTTON_A_PRIM_B 255
|
||||
#else
|
||||
#define OCARINA_BUTTON_A_PRIM_R 80
|
||||
#define OCARINA_BUTTON_A_PRIM_G 255
|
||||
#define OCARINA_BUTTON_A_PRIM_B 150
|
||||
#endif
|
||||
|
||||
s16 sTextFade = false; // original name: key_off_flag ?
|
||||
|
||||
u8 D_8014B2F4 = 0;
|
||||
|
@ -194,9 +207,9 @@ void Message_ResetOcarinaNoteState(void) {
|
|||
sOcarinaButtonAlphaValues[0] = sOcarinaButtonAlphaValues[1] = sOcarinaButtonAlphaValues[2] =
|
||||
sOcarinaButtonAlphaValues[3] = sOcarinaButtonAlphaValues[4] = sOcarinaButtonAlphaValues[5] =
|
||||
sOcarinaButtonAlphaValues[6] = sOcarinaButtonAlphaValues[7] = sOcarinaButtonAlphaValues[8] = 0;
|
||||
sOcarinaButtonAPrimR = 80;
|
||||
sOcarinaButtonAPrimG = 255;
|
||||
sOcarinaButtonAPrimB = 150;
|
||||
sOcarinaButtonAPrimR = OCARINA_BUTTON_A_PRIM_R;
|
||||
sOcarinaButtonAPrimG = OCARINA_BUTTON_A_PRIM_G;
|
||||
sOcarinaButtonAPrimB = OCARINA_BUTTON_A_PRIM_B;
|
||||
sOcarinaButtonAEnvR = 10;
|
||||
sOcarinaButtonAEnvG = 10;
|
||||
sOcarinaButtonAEnvB = 10;
|
||||
|
@ -300,6 +313,7 @@ void Message_DrawTextChar(PlayState* play, void* textureImage, Gfx** p) {
|
|||
Gfx* gfx = *p;
|
||||
s16 x = msgCtx->textPosX;
|
||||
s16 y = msgCtx->textPosY;
|
||||
s32 pad;
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
|
@ -2448,20 +2462,47 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
if (sTextIsCredits) {
|
||||
Message_FindCreditsMessage(play, textId);
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_60 != NULL) && B_80121220->unk_60(&play->msgCtx.font)) {
|
||||
|
||||
} else {
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength, "../z_message_PAL.c", 1954);
|
||||
#endif
|
||||
} else {
|
||||
#if OOT_NTSC
|
||||
if (gSaveContext.language == LANGUAGE_JPN) {
|
||||
Message_FindMessageJPN(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)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
#endif
|
||||
} else {
|
||||
Message_FindMessageNES(play, textId);
|
||||
msgCtx->msgLength = font->msgLength;
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_68 != NULL) && B_80121220->unk_68(&play->msgCtx.font)) {
|
||||
|
||||
} else {
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
}
|
||||
#else
|
||||
DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
|
||||
font->msgLength);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
|
@ -2543,6 +2584,9 @@ void Message_StartTextbox(PlayState* play, u16 textId, Actor* actor) {
|
|||
void Message_ContinueTextbox(PlayState* play, u16 textId) {
|
||||
s32 pad;
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
#if PLATFORM_N64
|
||||
s32 pad2[3];
|
||||
#endif
|
||||
|
||||
PRINTF(VT_FGCOL(GREEN));
|
||||
// "Message"
|
||||
|
@ -2794,13 +2838,9 @@ void Message_SetView(View* view) {
|
|||
}
|
||||
|
||||
#if OOT_NTSC
|
||||
#define DRAW_TEXT(play, gfx, isCredits) \
|
||||
if (gSaveContext.language == LANGUAGE_JPN && !(isCredits)) { \
|
||||
Message_DrawTextWide(play, gfx); \
|
||||
} else { \
|
||||
Message_DrawText(play, gfx); \
|
||||
} \
|
||||
(void)0
|
||||
#define DRAW_TEXT(play, gfx, isCredits) \
|
||||
((gSaveContext.language == LANGUAGE_JPN) && !(isCredits)) ? Message_DrawTextWide(play, gfx) \
|
||||
: Message_DrawText(play, gfx)
|
||||
#else
|
||||
#define DRAW_TEXT(play, gfx, isCredits) Message_DrawText(play, gfx)
|
||||
#endif
|
||||
|
@ -3018,7 +3058,6 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
if (msgCtx->ocarinaStaff == NULL) {} // fake
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
} else {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
|
@ -4239,4 +4278,10 @@ void Message_SetTables(void) {
|
|||
#endif
|
||||
|
||||
sStaffMessageEntryTablePtr = sStaffMessageEntryTable;
|
||||
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121220 != NULL) && (B_80121220->unk_58 != NULL)) {
|
||||
B_80121220->unk_58(&sJpnMessageEntryTablePtr, &sNesMessageEntryTablePtr, &sStaffMessageEntryTablePtr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128"
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
MtxF gSkinLimbMatrices[60]; // holds matrices for each limb of the skeleton currently being drawn
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
24, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
11, // WORLD_MAP_AREA_GORON_CITY
|
||||
-17, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
37, // WORLD_MAP_AREA_20
|
||||
37, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
-6, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxWidths[] = {
|
||||
|
@ -462,7 +462,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
32, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
32, // WORLD_MAP_AREA_GORON_CITY
|
||||
32, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
16, // WORLD_MAP_AREA_20
|
||||
16, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
32, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxPosY[] = {
|
||||
|
@ -486,7 +486,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
58, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
56, // WORLD_MAP_AREA_GORON_CITY
|
||||
12, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
36, // WORLD_MAP_AREA_20
|
||||
36, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
50, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static s16 areaBoxHeights[] = {
|
||||
|
@ -510,7 +510,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
13, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
17, // WORLD_MAP_AREA_GORON_CITY
|
||||
17, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
16, // WORLD_MAP_AREA_20
|
||||
16, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
17, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static void* areaBoxTexs[] = {
|
||||
|
@ -534,7 +534,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
gWorldMapAreaBox4Tex, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_GORON_CITY
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
gWorldMapAreaBox8Tex, // WORLD_MAP_AREA_20
|
||||
gWorldMapAreaBox8Tex, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
gWorldMapAreaBox3Tex, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
static void* currentPosTitleTexs[] = LANGUAGE_ARRAY(gPauseCurrentPositionJPNTex, gPauseCurrentPositionENGTex,
|
||||
|
|
|
@ -2458,7 +2458,7 @@ static s16 sVtxMapWorldAreaX[] = {
|
|||
13, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
20, // WORLD_MAP_AREA_GORON_CITY
|
||||
-34, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
-300, // WORLD_MAP_AREA_20
|
||||
-300, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
0, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
|
||||
|
@ -2483,7 +2483,7 @@ static s16 sVtxMapWorldAreaWidth[] = {
|
|||
21, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
16, // WORLD_MAP_AREA_GORON_CITY
|
||||
20, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
-1, // WORLD_MAP_AREA_20
|
||||
-1, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
0, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
|
||||
|
@ -2508,7 +2508,7 @@ static s16 sVtxMapWorldAreaY[] = {
|
|||
53, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
37, // WORLD_MAP_AREA_GORON_CITY
|
||||
-13, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
-300, // WORLD_MAP_AREA_20
|
||||
-300, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
0, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
|
||||
|
@ -2533,7 +2533,7 @@ static s16 sVtxMapWorldAreaHeight[] = {
|
|||
15, // WORLD_MAP_AREA_DEATH_MOUNTAIN_CRATER
|
||||
13, // WORLD_MAP_AREA_GORON_CITY
|
||||
12, // WORLD_MAP_AREA_LON_LON_RANCH
|
||||
1, // WORLD_MAP_AREA_20
|
||||
1, // WORLD_MAP_AREA_QUESTION_MARK
|
||||
0, // WORLD_MAP_AREA_GANONS_CASTLE
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue