2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
2022-10-15 06:16:37 +00:00
|
|
|
#include "quake.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-06-06 19:37:25 +00:00
|
|
|
#include "assets/scenes/overworld/spot00/spot00_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot00/spot00_room_0.h"
|
|
|
|
#include "assets/scenes/overworld/spot01/spot01_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot07/spot07_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot12/spot12_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot16/spot16_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot16/spot16_room_0.h"
|
|
|
|
#include "assets/scenes/overworld/spot18/spot18_scene.h"
|
|
|
|
#include "assets/scenes/overworld/spot20/spot20_scene.h"
|
|
|
|
#include "assets/scenes/overworld/souko/souko_scene.h"
|
2021-11-09 02:15:37 +00:00
|
|
|
|
2022-06-06 19:37:25 +00:00
|
|
|
#include "assets/scenes/dungeons/men/men_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/ddan/ddan_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/ydan/ydan_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/Bmori1/Bmori1_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/MIZUsin/MIZUsin_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/gerudoway/gerudoway_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/jyasinzou/jyasinzou_scene.h"
|
|
|
|
#include "assets/scenes/indoors/miharigoya/miharigoya_scene.h"
|
|
|
|
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
|
2021-08-31 23:00:55 +00:00
|
|
|
|
2021-12-11 01:21:19 +00:00
|
|
|
#include "overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h"
|
|
|
|
|
2022-05-09 17:45:53 +00:00
|
|
|
// Entrance Table definition
|
2022-07-31 23:44:47 +00:00
|
|
|
#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \
|
|
|
|
{ sceneId, spawn, \
|
|
|
|
(((continueBgm) ? ENTRANCE_INFO_CONTINUE_BGM_FLAG : 0) | \
|
|
|
|
((displayTitleCard) ? ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG : 0) | \
|
|
|
|
(((endTransType) << ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_END_TRANS_TYPE_MASK) | \
|
2022-06-15 18:41:47 +00:00
|
|
|
(((startTransType) << ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_START_TRANS_TYPE_MASK)) },
|
2020-04-16 21:36:12 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
EntranceInfo gEntranceTable[] = {
|
2022-05-09 17:45:53 +00:00
|
|
|
#include "tables/entrance_table.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2022-05-09 17:45:53 +00:00
|
|
|
#undef DEFINE_ENTRANCE
|
|
|
|
|
2022-02-01 19:36:09 +00:00
|
|
|
// Linker symbol declarations (used in the table below)
|
|
|
|
#define DEFINE_SCENE(name, title, _2, _3, _4, _5) \
|
|
|
|
DECLARE_ROM_SEGMENT(name) \
|
|
|
|
DECLARE_ROM_SEGMENT(title)
|
|
|
|
|
|
|
|
#include "tables/scene_table.h"
|
|
|
|
|
|
|
|
#undef DEFINE_SCENE
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-01 19:36:09 +00:00
|
|
|
// Scene Table definition
|
2022-05-31 18:19:46 +00:00
|
|
|
#define DEFINE_SCENE(name, title, _2, drawConfig, unk_10, unk_12) \
|
|
|
|
{ ROM_FILE(name), ROM_FILE(title), unk_10, drawConfig, unk_12, 0 },
|
2022-02-01 19:36:09 +00:00
|
|
|
|
|
|
|
// Handle `none` as a special case for scenes without a title card
|
|
|
|
#define _noneSegmentRomStart NULL
|
|
|
|
#define _noneSegmentRomEnd NULL
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-08-15 23:15:58 +00:00
|
|
|
SceneTableEntry gSceneTable[] = {
|
2022-02-01 19:36:09 +00:00
|
|
|
#include "tables/scene_table.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2022-02-01 19:36:09 +00:00
|
|
|
#undef _noneSegmentRomStart
|
|
|
|
#undef _noneSegmentRomEnd
|
|
|
|
|
|
|
|
#undef DEFINE_SCENE
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
Gfx sDefaultDisplayList[] = {
|
2020-03-29 16:43:45 +00:00
|
|
|
gsSPSegment(0x08, gEmptyDL),
|
|
|
|
gsSPSegment(0x09, gEmptyDL),
|
|
|
|
gsSPSegment(0x0A, gEmptyDL),
|
|
|
|
gsSPSegment(0x0B, gEmptyDL),
|
|
|
|
gsSPSegment(0x0C, gEmptyDL),
|
|
|
|
gsSPSegment(0x0D, gEmptyDL),
|
2020-03-17 04:31:30 +00:00
|
|
|
gsDPPipeSync(),
|
2020-07-17 01:37:53 +00:00
|
|
|
gsDPSetPrimColor(0, 0, 128, 128, 128, 128),
|
|
|
|
gsDPSetEnvColor(128, 128, 128, 128),
|
2020-03-17 04:31:30 +00:00
|
|
|
gsSPEndDisplayList(),
|
|
|
|
};
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void Scene_SetTransitionForNextEntrance(PlayState* play) {
|
2022-05-09 17:45:53 +00:00
|
|
|
s16 entranceIndex;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-08-21 23:12:57 +00:00
|
|
|
if (!IS_DAY) {
|
|
|
|
if (!LINK_IS_ADULT) {
|
2022-05-21 18:23:43 +00:00
|
|
|
entranceIndex = play->nextEntranceIndex + 1;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
entranceIndex = play->nextEntranceIndex + 3;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
|
|
|
} else {
|
2021-08-21 23:12:57 +00:00
|
|
|
if (!LINK_IS_ADULT) {
|
2022-05-21 18:23:43 +00:00
|
|
|
entranceIndex = play->nextEntranceIndex;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
entranceIndex = play->nextEntranceIndex + 2;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-06-15 18:41:47 +00:00
|
|
|
play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigDefault(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4725);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPDisplayList(POLY_OPA_DISP++, sDefaultDisplayList);
|
|
|
|
gSPDisplayList(POLY_XLU_DISP++, sDefaultDisplayList);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4735);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* D_8012A2F8[] = {
|
|
|
|
gYdanTex_00BA18,
|
|
|
|
gYdanTex_00CA18,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigYdan(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
u32 gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4763);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames % 128),
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4783);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigYdanBoss(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4845);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 2) % 128, 64, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4859);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* gDCEntranceTextures[] = {
|
|
|
|
gDCDayEntranceTex,
|
|
|
|
gDCNightEntranceTex,
|
|
|
|
};
|
|
|
|
void* sDCLavaFloorTextures[] = {
|
|
|
|
gDCLavaFloor1Tex, gDCLavaFloor2Tex, gDCLavaFloor3Tex, gDCLavaFloor4Tex,
|
|
|
|
gDCLavaFloor5Tex, gDCLavaFloor6Tex, gDCLavaFloor7Tex, gDCLavaFloor8Tex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigDdan(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
s32 pad;
|
2022-05-21 18:23:43 +00:00
|
|
|
Gfx* displayListHead = Graph_Alloc(play->state.gfxCtx, 2 * sizeof(Gfx[3]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4905);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDCEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2021-11-09 02:15:37 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures[(s32)(gameplayFrames & 14) >> 1]));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 128, 64, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 2) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 255, 255, 255, play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
2021-12-11 01:21:19 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 255, 255, 255, play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4956);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigTokinoma(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
f32 temp;
|
2022-05-21 18:23:43 +00:00
|
|
|
Gfx* displayListHead = Graph_Alloc(play->state.gfxCtx, 18 * sizeof(Gfx));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5069);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
temp = play->roomCtx.unk_74[0] / 255.0f;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead);
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, displayListHead);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 255 - (u8)(185.0f * temp), 255 - (u8)(145.0f * temp),
|
|
|
|
255 - (u8)(105.0f * temp), 255);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09, displayListHead);
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, displayListHead);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 76 + (u8)(6.0f * temp), 76 + (u8)(34.0f * temp), 76 + (u8)(74.0f * temp),
|
|
|
|
255);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead);
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 0, 0, 0, play->roomCtx.unk_74[0]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0B, displayListHead);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp),
|
|
|
|
89 + (u8)(166.0f * temp), 255);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 0, 0, 0, play->roomCtx.unk_74[0]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0C, displayListHead);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp),
|
|
|
|
255 + (u8)(179.0f * temp), 255);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 0, 0, 0, play->roomCtx.unk_74[0]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0D, displayListHead);
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0D, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 0, 0, 0, play->roomCtx.unk_74[1]);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5145);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-07-30 21:28:50 +00:00
|
|
|
if (gSaveContext.sceneLayer == 5) {
|
2021-09-20 16:51:35 +00:00
|
|
|
gCustomLensFlareOn = true;
|
|
|
|
gCustomLensFlarePos.x = -20.0f;
|
|
|
|
gCustomLensFlarePos.y = 1220.0f;
|
|
|
|
gCustomLensFlarePos.z = -684.0f;
|
2021-12-02 22:31:39 +00:00
|
|
|
gLensFlareScale = 10;
|
|
|
|
gLensFlareColorIntensity = 8.0f;
|
2022-05-20 18:40:13 +00:00
|
|
|
gLensFlareGlareStrength = 200;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigKakusiana(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5171);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames % 128),
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0,
|
|
|
|
127 - (gameplayFrames * 1) % 128, 32, 32));
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 60) % 2048, 8, 512));
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(
|
|
|
|
POLY_OPA_DISP++, 0x0D,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5212);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigKenjyanoma(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5226);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames * 1) % 128,
|
|
|
|
(gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5264);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGreatFairyFountain(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5278);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 256, 32, 64, 1, gameplayFrames % 128, (gameplayFrames * 3) % 256,
|
|
|
|
32, 64));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5301);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGraveExitLightShining(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5317);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5330);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigFairyFountain(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5346);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5367);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigHakadan(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5384);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_SHADOW_TEMPLE_BOSS) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 128, 0, 32, 32, 1,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 2) % 128, 0, 32, 32));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 128, 0, 32, 32, 1,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 2) % 128, 0, 32, 32));
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5416);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sThievesHideoutEntranceTextures[] = {
|
|
|
|
gThievesHideoutDayEntranceTex,
|
|
|
|
gThievesHideoutNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGerudoway(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5490);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sThievesHideoutEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5507);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* D_8012A330[] = {
|
|
|
|
gWaterTempleDayEntranceTex,
|
|
|
|
gWaterTempleNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigMizusin(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
s32 spB0;
|
|
|
|
s32 spAC;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5535);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (1) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
spB0 = (play->roomCtx.unk_74[1] >> 8) & 0xFF;
|
|
|
|
spAC = play->roomCtx.unk_74[1] & 0xFF;
|
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (spB0 == 1) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, spAC));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else if (spB0 < 1) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 255));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 160));
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (spB0 == 2) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, spAC));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else if (spB0 < 2) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 255));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 160));
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (spB0 != 0) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 160));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 3, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 180));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 128, 0, 32, 32,
|
|
|
|
1, 0, 0, 32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f)));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 3, 0, 32, 32, 1, 0, 0,
|
|
|
|
32, 32, 0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f)));
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, gameplayFrames * 1, 32,
|
|
|
|
32, 1, 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0D,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 4, 0, 32, 32, 1,
|
|
|
|
gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5644);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigMizusinBs(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5791);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, play->roomCtx.unk_74[0]);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 145);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5808);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSyatekijyou(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5822);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 4, 16));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5836);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigHairalNiwa(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5850);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_CASTLE_COURTYARD_GUARDS_DAY) {
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64));
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5876);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGanonCastleExterior(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
s8 sp83;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (1) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
sp83 = coss(play->gameplayFrames * 1500) >> 8;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5894);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_OUTSIDE_GANONS_CASTLE) {
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1,
|
|
|
|
0, (gameplayFrames * 1) % 256, 64, 64));
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (gameplayFrames * 1) % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, (gameplayFrames * 1) % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
sp83 = (sp83 >> 1) + 192;
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, sp83, sp83, sp83, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5930);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Screen Shake for Ganon's Tower Collapse
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8009BEEC(PlayState* play) {
|
2022-10-15 06:16:37 +00:00
|
|
|
s32 quakeIndex;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->gameplayFrames % 128 == 13) {
|
2022-10-15 06:16:37 +00:00
|
|
|
quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_2);
|
|
|
|
Quake_SetSpeed(quakeIndex, 10000);
|
|
|
|
Quake_SetPerturbations(quakeIndex, 4, 0, 0, 0);
|
|
|
|
Quake_SetDuration(quakeIndex, 127);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if ((play->gameplayFrames % 64 == 0) && (Rand_ZeroOne() > 0.6f)) {
|
2022-10-15 06:16:37 +00:00
|
|
|
quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_3);
|
|
|
|
Quake_SetSpeed(quakeIndex, 32000.0f + (Rand_ZeroOne() * 3000.0f));
|
|
|
|
Quake_SetPerturbations(quakeIndex, 10.0f - (Rand_ZeroOne() * 9.0f), 0, 0, 0);
|
|
|
|
Quake_SetDuration(quakeIndex, 48.0f - (Rand_ZeroOne() * 15.0f));
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGanonFinal(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
s8 sp7B;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (1) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
sp7B = coss((play->gameplayFrames * 1500) & 0xFFFF) >> 8;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5968);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
511 - (gameplayFrames * 1) % 512, 64, 128));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
255 - (gameplayFrames * 1) % 256, 32, 64));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 30) % 2048, 16, 512));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
sp7B = (sp7B >> 1) + 192;
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, sp7B, sp7B, sp7B, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6004);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if (Flags_GetSwitch(play, 0x37)) {
|
2022-11-26 21:15:41 +00:00
|
|
|
if ((play->sceneId == SCENE_GANON_BOSS) || (play->sceneId == SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR) ||
|
|
|
|
(play->sceneId == SCENE_GANONS_TOWER_COLLAPSE_INTERIOR) ||
|
|
|
|
(play->sceneId == SCENE_INSIDE_GANONS_CASTLE_COLLAPSE)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8009BEEC(play);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sIceCavernEntranceTextures[] = {
|
|
|
|
gIceCavernDayEntranceTex,
|
|
|
|
gIceCavernNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigIceDoukuto(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (0) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6042);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sIceCavernEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6076);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigHakaanaOuke(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6151);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 50) % 2048, 8, 512));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 128, 0, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1,
|
|
|
|
0, 1023 - (gameplayFrames * 3) % 1024, 16, 256));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6187);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigHyliaLabo(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6201);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(
|
|
|
|
POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6232);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigCalmWater(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6249);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6264);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sGTGEntranceTextures[] = {
|
|
|
|
gGTGDayEntranceTex,
|
|
|
|
gGTGNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigMen(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (0) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6290);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGTGEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6320);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-03-29 16:43:45 +00:00
|
|
|
Gfx* Gfx_TwoTexScrollPrimColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2,
|
|
|
|
u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a) {
|
2020-03-17 04:31:30 +00:00
|
|
|
Gfx* displayList = Graph_Alloc(gfxCtx, 10 * sizeof(Gfx));
|
|
|
|
|
2022-07-30 21:49:10 +00:00
|
|
|
x1 %= 512 << 2;
|
|
|
|
y1 %= 512 << 2;
|
|
|
|
x2 %= 512 << 2;
|
|
|
|
y2 %= 512 << 2;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
gDPTileSync(displayList);
|
2022-07-30 21:49:10 +00:00
|
|
|
gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2));
|
2020-03-22 21:19:43 +00:00
|
|
|
gDPTileSync(displayList + 2);
|
2022-07-30 21:49:10 +00:00
|
|
|
gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2));
|
2020-03-29 16:43:45 +00:00
|
|
|
gDPSetPrimColor(displayList + 4, 0, 0, r, g, b, a);
|
2020-03-22 21:19:43 +00:00
|
|
|
gSPEndDisplayList(displayList + 5);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
return displayList;
|
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigTuribori(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6433);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-05-21 18:23:43 +00:00
|
|
|
Gfx_TwoTexScrollPrimColor(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 255, 255,
|
|
|
|
255, play->roomCtx.unk_74[0] + 127));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6449);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigBowling(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6463);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32));
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16));
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TexScroll(play->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16));
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0,
|
|
|
|
0, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6491);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sLonLonHouseEntranceTextures[] = {
|
|
|
|
gLonLonHouseDayEntranceTex,
|
|
|
|
gLonLonHouseNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSouko(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6515);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sLonLonHouseEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6528);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sGuardHouseView2Textures[] = {
|
|
|
|
gGuardHouseOutSideView1DayTex,
|
|
|
|
gGuardHouseOutSideView1NightTex,
|
|
|
|
};
|
|
|
|
void* sGuardHouseView1Textures[] = {
|
|
|
|
gGuardHouseOutSideView2DayTex,
|
|
|
|
gGuardHouseOutSideView2NightTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigMiharigoya(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
s32 var;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6560);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (LINK_IS_ADULT) {
|
2020-03-17 04:31:30 +00:00
|
|
|
var = 1;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2020-04-16 21:36:12 +00:00
|
|
|
var = gSaveContext.nightFlag;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGuardHouseView1Textures[var]));
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sGuardHouseView2Textures[var]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6581);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigMahouya(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6595);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1,
|
|
|
|
0, 1023 - (gameplayFrames * 6) % 1024, 16, 256));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6615);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sForestTempleEntranceTextures[] = {
|
|
|
|
gForestTempleDayEntranceTex,
|
|
|
|
gForestTempleNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigBmori1(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (0) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6640);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6671);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sSpiritTempleEntranceTextures[] = {
|
|
|
|
gSpiritTempleDayEntranceTex,
|
|
|
|
gSpiritTempleNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigJyasinzou(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6752);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sSpiritTempleEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6762);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot00(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
Gfx* displayListHead;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
displayListHead = Graph_Alloc(play->state.gfxCtx, 3 * sizeof(Gfx));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6814);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-20 18:40:13 +00:00
|
|
|
if ((gSaveContext.dayTime > CLOCK_TIME(7, 0)) && (gSaveContext.dayTime <= CLOCK_TIME(18, 30))) {
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-20 18:40:13 +00:00
|
|
|
if (gSaveContext.dayTime > CLOCK_TIME(18, 30)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[0] != 255) {
|
|
|
|
Math_StepToS(&play->roomCtx.unk_74[0], 255, 5);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2022-05-20 18:40:13 +00:00
|
|
|
} else if (gSaveContext.dayTime >= CLOCK_TIME(6, 0)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[0] != 0) {
|
|
|
|
Math_StepToS(&play->roomCtx.unk_74[0], 0, 10);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, play->roomCtx.unk_74[0]);
|
2021-08-31 23:00:55 +00:00
|
|
|
gSPDisplayList(displayListHead++, spot00_room_0DL_012B20);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6866);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sKakarikoWindowTextures[] = {
|
|
|
|
gKakarikoVillageDayWindowTex,
|
|
|
|
gKakarikoVillageNightWindowTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot01(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6890);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sKakarikoWindowTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6903);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot03(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6917);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 6) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 6) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6948);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot04(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
u8 spA3;
|
|
|
|
u16 spA0;
|
|
|
|
Gfx* displayListHead;
|
|
|
|
|
|
|
|
spA3 = 128;
|
|
|
|
spA0 = 500;
|
2022-05-21 18:23:43 +00:00
|
|
|
displayListHead = Graph_Alloc(play->state.gfxCtx, 6 * sizeof(Gfx));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-08-29 23:00:17 +00:00
|
|
|
if (1) {}
|
|
|
|
if (1) {}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6965);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-07-30 21:28:50 +00:00
|
|
|
if (gSaveContext.sceneLayer == 4) {
|
2022-05-21 18:23:43 +00:00
|
|
|
spA3 = 255 - (u8)play->roomCtx.unk_74[0];
|
2022-07-30 21:28:50 +00:00
|
|
|
} else if (gSaveContext.sceneLayer == 6) {
|
2022-05-21 18:23:43 +00:00
|
|
|
spA0 = play->roomCtx.unk_74[0] + 500;
|
2022-07-30 21:28:50 +00:00
|
|
|
} else if ((!IS_CUTSCENE_LAYER || LINK_IS_ADULT) && GET_EVENTCHKINF(EVENTCHKINF_07)) {
|
2020-03-17 04:31:30 +00:00
|
|
|
spA0 = 2150;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 128, 128, 128, spA3);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead++);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0B, displayListHead);
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
gDPPipeSync(displayListHead++);
|
2020-07-17 01:37:53 +00:00
|
|
|
gDPSetEnvColor(displayListHead++, 128, 128, 128, spA0 * 0.1f);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0C,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16,
|
|
|
|
1, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7044);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot06(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7058);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-07-30 21:28:50 +00:00
|
|
|
if (IS_CUTSCENE_LAYER || (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69))) {
|
2022-05-21 18:23:43 +00:00
|
|
|
play->roomCtx.unk_74[0] = 87;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames, gameplayFrames, 32, 32, 1,
|
|
|
|
0, 0, 32, 32, 0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, -gameplayFrames, -gameplayFrames, 32, 32,
|
|
|
|
1, 0, 0, 16, 64, 0, 0, 0, play->roomCtx.unk_74[0] + 168));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7097);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sZorasDomainEntranceTextures[] = {
|
|
|
|
gZorasDomainDayEntranceTex,
|
|
|
|
gZorasDomainNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot07(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
u32 var;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7123);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
var = 127 - (gameplayFrames * 1) % 128;
|
2020-03-22 21:19:43 +00:00
|
|
|
if (LINK_IS_ADULT) {
|
2020-03-17 04:31:30 +00:00
|
|
|
var = 0;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0C,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 64, 32, 1, 0, var, 64, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sZorasDomainEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7147);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot08(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7161);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(
|
|
|
|
POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
255 - (gameplayFrames * 2) % 256, 64, 64));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7192);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot09(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7206);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 3) % 1024, 32, 256));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 256, 64, 64));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 2) % 128, 32, 32));
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0,
|
|
|
|
127 - (gameplayFrames * 3) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0C,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x0D,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0,
|
2020-03-29 16:43:45 +00:00
|
|
|
(gameplayFrames * 1) % 64, 16, 16));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7260);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot10(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (0) {} // Necessary to match
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7274);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames % 128, 0, 32, 16, 1,
|
|
|
|
gameplayFrames % 128, 0, 32, 16));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, gameplayFrames % 128,
|
|
|
|
32, 32, 1, gameplayFrames % 128, gameplayFrames % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if ((play->roomCtx.unk_74[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) {
|
|
|
|
if (play->roomCtx.unk_74[1] == 50) {
|
|
|
|
func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_EV_CHICKEN_CRY_M);
|
|
|
|
play->roomCtx.unk_74[0] = 1;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
play->roomCtx.unk_74[1]++;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7309);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot11(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7323);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(
|
|
|
|
POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7339);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* D_8012A380[] = {
|
|
|
|
gSpot12_009678Tex,
|
|
|
|
gSpot12_00DE78Tex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot12(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7363);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7371);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot13(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7385);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0,
|
|
|
|
gameplayFrames % 128, 32, 32));
|
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0,
|
|
|
|
gameplayFrames % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7409);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot15(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7423);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 10) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7443);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot16(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
Gfx* displayListHead = Graph_Alloc(play->state.gfxCtx, 3 * sizeof(Gfx));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7461);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-20 18:40:13 +00:00
|
|
|
if ((gSaveContext.dayTime > CLOCK_TIME(7, 0)) && (gSaveContext.dayTime <= CLOCK_TIME(18, 0))) {
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-20 18:40:13 +00:00
|
|
|
if (gSaveContext.dayTime > CLOCK_TIME(18, 0)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[0] != 255) {
|
|
|
|
Math_StepToS(&play->roomCtx.unk_74[0], 255, 5);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2022-05-20 18:40:13 +00:00
|
|
|
} else if (gSaveContext.dayTime >= CLOCK_TIME(6, 0)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[0] != 0) {
|
|
|
|
Math_StepToS(&play->roomCtx.unk_74[0], 0, 10);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, play->roomCtx.unk_74[0]);
|
2021-08-31 23:00:55 +00:00
|
|
|
gSPDisplayList(displayListHead++, spot16_room_0DL_00AA48);
|
2020-03-17 04:31:30 +00:00
|
|
|
gSPEndDisplayList(displayListHead);
|
|
|
|
}
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7495);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot17(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
s8 sp6F = coss((play->gameplayFrames * 1500) & 0xFFFF) >> 8;
|
|
|
|
s8 sp6E = coss((play->gameplayFrames * 1500) & 0xFFFF) >> 8;
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7512);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-03-17 04:31:30 +00:00
|
|
|
sp6F = (sp6F >> 1) + 192;
|
|
|
|
sp6E = (sp6E >> 1) + 192;
|
|
|
|
|
2022-07-30 21:49:10 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0,
|
|
|
|
gameplayFrames % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, sp6F, sp6E, 255, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7530);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sGoronCityEntranceTextures[] = {
|
|
|
|
gGoronCityDayEntranceTex,
|
|
|
|
gGoronCityNightEntranceTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot18(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7555);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - gameplayFrames % 128, 32, 32, 1,
|
|
|
|
gameplayFrames % 128, 0, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sGoronCityEntranceTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7578);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2021-11-09 02:15:37 +00:00
|
|
|
void* sLonLonRanchWindowTextures[] = {
|
|
|
|
gLonLonRanchDayWindowTex,
|
|
|
|
gLonLonRangeNightWindowsTex,
|
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigSpot20(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7602);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-07 14:10:06 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
|
|
|
SEGMENTED_TO_VIRTUAL(sLonLonRanchWindowTextures[((void)0, gSaveContext.nightFlag)]));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7615);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigHidan(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7630);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - gameplayFrames % 128, 32, 32, 1,
|
2020-03-29 16:43:45 +00:00
|
|
|
127 - gameplayFrames % 128, 0, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 3) % 128,
|
|
|
|
127 - (gameplayFrames * 6) % 128, 32, 32, 1, (gameplayFrames * 6) % 128,
|
|
|
|
127 - (gameplayFrames * 3) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 64);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 64);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7653);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
f32 D_8012A398 = 0.0f;
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigBdan(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
static s16 D_8012A39C = 538;
|
|
|
|
static s16 D_8012A3A0 = 4272;
|
|
|
|
u32 gameplayFrames;
|
|
|
|
f32 temp;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7712);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_JABU_JABU) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 2) % 128, 32, 32, 1, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 2) % 128, 32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0B,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1,
|
|
|
|
0, 255 - (gameplayFrames * 4) % 256, 32, 64));
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(
|
|
|
|
POLY_OPA_DISP++, 0x08,
|
|
|
|
Gfx_TexScroll(play->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, 32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if (FrameAdvance_IsEnabled(play) != true) {
|
2021-11-09 02:15:37 +00:00
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
D_8012A39C += 1820;
|
|
|
|
D_8012A3A0 += 1820;
|
|
|
|
|
|
|
|
temp = 0.020000001f;
|
2022-05-21 18:23:43 +00:00
|
|
|
View_SetDistortionOrientation(&play->view,
|
2022-02-27 21:32:05 +00:00
|
|
|
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
|
|
|
|
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
|
|
|
|
((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
|
2022-05-21 18:23:43 +00:00
|
|
|
View_SetDistortionScale(&play->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
|
2022-02-20 23:35:53 +00:00
|
|
|
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)),
|
|
|
|
1.f + (1 * temp * Math_CosS(D_8012A39C)));
|
2022-05-21 18:23:43 +00:00
|
|
|
View_SetDistortionSpeed(&play->view, 0.95f);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
switch (play->roomCtx.unk_74[0]) {
|
2020-03-17 04:31:30 +00:00
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
case 1:
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[1] < 1200) {
|
|
|
|
play->roomCtx.unk_74[1] += 200;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
play->roomCtx.unk_74[0]++;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 2:
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.unk_74[1] > 0) {
|
|
|
|
play->roomCtx.unk_74[1] -= 30;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
play->roomCtx.unk_74[1] = 0;
|
|
|
|
play->roomCtx.unk_74[0] = 0;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
D_8012A398 += 0.15f + (play->roomCtx.unk_74[1] * 0.001f);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
if (play->roomCtx.curRoom.num == 2) {
|
2020-12-25 21:19:52 +00:00
|
|
|
Matrix_Scale(1.0f, sinf(D_8012A398) * 0.8f, 1.0f, MTXMODE_NEW);
|
2020-03-23 23:11:21 +00:00
|
|
|
} else {
|
2020-03-17 04:31:30 +00:00
|
|
|
Matrix_Scale(1.005f, sinf(D_8012A398) * 0.8f, 1.005f, MTXMODE_NEW);
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0D, Matrix_NewMtx(play->state.gfxCtx, "../z_scene_table.c", 7809));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7811);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGanontika(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7825);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x08,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 512, 32, 128, 1, gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 512, 32, 128));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_XLU_DISP++, 0x09,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x0A,
|
2022-07-30 21:49:10 +00:00
|
|
|
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128,
|
|
|
|
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128,
|
|
|
|
32, 32));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7852);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGanontikaSonogo(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8009BEEC(play);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigGanonSonogo(PlayState* play) {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8009BEEC(play);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void Scene_DrawConfigBesitu(PlayState* play) {
|
2020-03-17 04:31:30 +00:00
|
|
|
u32 gameplayFrames;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7893);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
gameplayFrames = play->gameplayFrames;
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64));
|
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPPipeSync(POLY_XLU_DISP++);
|
|
|
|
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7910);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-31 18:19:46 +00:00
|
|
|
void (*sSceneDrawConfigs[SDC_MAX])(PlayState*) = {
|
|
|
|
Scene_DrawConfigDefault, // SDC_DEFAULT
|
2022-11-26 21:15:41 +00:00
|
|
|
Scene_DrawConfigSpot00, // SDC_HYRULE_FIELD
|
|
|
|
Scene_DrawConfigSpot01, // SDC_KAKARIKO_VILLAGE
|
|
|
|
Scene_DrawConfigSpot03, // SDC_ZORAS_RIVER
|
|
|
|
Scene_DrawConfigSpot04, // SDC_KOKIRI_FOREST
|
|
|
|
Scene_DrawConfigSpot06, // SDC_LAKE_HYLIA
|
|
|
|
Scene_DrawConfigSpot07, // SDC_ZORAS_DOMAIN
|
|
|
|
Scene_DrawConfigSpot08, // SDC_ZORAS_FOUNTAIN
|
|
|
|
Scene_DrawConfigSpot09, // SDC_GERUDO_VALLEY
|
|
|
|
Scene_DrawConfigSpot10, // SDC_LOST_WOODS
|
|
|
|
Scene_DrawConfigSpot11, // SDC_DESERT_COLOSSUS
|
|
|
|
Scene_DrawConfigSpot12, // SDC_GERUDOS_FORTRESS
|
|
|
|
Scene_DrawConfigSpot13, // SDC_HAUNTED_WASTELAND
|
|
|
|
Scene_DrawConfigSpot15, // SDC_HYRULE_CASTLE
|
|
|
|
Scene_DrawConfigSpot16, // SDC_DEATH_MOUNTAIN_TRAIL
|
|
|
|
Scene_DrawConfigSpot17, // SDC_DEATH_MOUNTAIN_CRATER
|
|
|
|
Scene_DrawConfigSpot18, // SDC_GORON_CITY
|
|
|
|
Scene_DrawConfigSpot20, // SDC_LON_LON_RANCH
|
|
|
|
Scene_DrawConfigHidan, // SDC_FIRE_TEMPLE
|
|
|
|
Scene_DrawConfigYdan, // SDC_DEKU_TREE
|
|
|
|
Scene_DrawConfigDdan, // SDC_DODONGOS_CAVERN
|
|
|
|
Scene_DrawConfigBdan, // SDC_JABU_JABU
|
|
|
|
Scene_DrawConfigBmori1, // SDC_FOREST_TEMPLE
|
|
|
|
Scene_DrawConfigMizusin, // SDC_WATER_TEMPLE
|
|
|
|
Scene_DrawConfigHakadan, // SDC_SHADOW_TEMPLE
|
|
|
|
Scene_DrawConfigJyasinzou, // SDC_SPIRIT_TEMPLE
|
|
|
|
Scene_DrawConfigGanontika, // SDC_INSIDE_GANONS_CASTLE
|
|
|
|
Scene_DrawConfigMen, // SDC_GERUDO_TRAINING_GROUND
|
|
|
|
Scene_DrawConfigYdanBoss, // SDC_DEKU_TREE_BOSS
|
|
|
|
Scene_DrawConfigMizusinBs, // SDC_WATER_TEMPLE_BOSS
|
|
|
|
Scene_DrawConfigTokinoma, // SDC_TEMPLE_OF_TIME
|
|
|
|
Scene_DrawConfigKakusiana, // SDC_GROTTOS
|
|
|
|
Scene_DrawConfigKenjyanoma, // SDC_CHAMBER_OF_THE_SAGES
|
|
|
|
Scene_DrawConfigGreatFairyFountain, // SDC_GREAT_FAIRYS_FOUNTAIN
|
|
|
|
Scene_DrawConfigSyatekijyou, // SDC_SHOOTING_GALLERY
|
|
|
|
Scene_DrawConfigHairalNiwa, // SDC_CASTLE_COURTYARD_GUARDS
|
|
|
|
Scene_DrawConfigGanonCastleExterior, // SDC_OUTSIDE_GANONS_CASTLE
|
|
|
|
Scene_DrawConfigIceDoukuto, // SDC_ICE_CAVERN
|
|
|
|
Scene_DrawConfigGanonFinal, // SDC_GANONS_TOWER_COLLAPSE_EXTERIOR
|
|
|
|
Scene_DrawConfigFairyFountain, // SDC_FAIRYS_FOUNTAIN
|
|
|
|
Scene_DrawConfigGerudoway, // SDC_THIEVES_HIDEOUT
|
|
|
|
Scene_DrawConfigBowling, // SDC_BOMBCHU_BOWLING_ALLEY
|
|
|
|
Scene_DrawConfigHakaanaOuke, // SDC_ROYAL_FAMILYS_TOMB
|
|
|
|
Scene_DrawConfigHyliaLabo, // SDC_LAKESIDE_LABORATORY
|
|
|
|
Scene_DrawConfigSouko, // SDC_LON_LON_BUILDINGS
|
|
|
|
Scene_DrawConfigMiharigoya, // SDC_MARKET_GUARD_HOUSE
|
|
|
|
Scene_DrawConfigMahouya, // SDC_POTION_SHOP_GRANNY
|
2022-05-31 18:19:46 +00:00
|
|
|
Scene_DrawConfigCalmWater, // SDC_CALM_WATER
|
|
|
|
Scene_DrawConfigGraveExitLightShining, // SDC_GRAVE_EXIT_LIGHT_SHINING
|
|
|
|
Scene_DrawConfigBesitu, // SDC_BESITU
|
2022-11-26 21:15:41 +00:00
|
|
|
Scene_DrawConfigTuribori, // SDC_FISHING_POND
|
|
|
|
Scene_DrawConfigGanonSonogo, // SDC_GANONS_TOWER_COLLAPSE_INTERIOR
|
|
|
|
Scene_DrawConfigGanontikaSonogo, // SDC_INSIDE_GANONS_CASTLE_COLLAPSE
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void Scene_Draw(PlayState* play) {
|
2022-11-26 20:22:01 +00:00
|
|
|
if (R_HREG_MODE == HREG_MODE_SCENE_CONFIG) {
|
|
|
|
if (R_SCENE_CONFIG_INIT != HREG_MODE_SCENE_CONFIG) {
|
|
|
|
R_SCENE_CONFIG_INIT = HREG_MODE_SCENE_CONFIG;
|
|
|
|
R_SCENE_CONFIG_DRAW_DEFAULT_DLIST = 1;
|
|
|
|
R_SCENE_CONFIG_DRAW_SCENE_CONFIG = 1;
|
|
|
|
|
|
|
|
// these regs are not used in this mode
|
2020-03-17 04:31:30 +00:00
|
|
|
HREG(83) = 0;
|
|
|
|
HREG(84) = 0;
|
|
|
|
HREG(85) = 0;
|
|
|
|
HREG(86) = 0;
|
|
|
|
HREG(87) = 0;
|
|
|
|
HREG(88) = 0;
|
|
|
|
HREG(89) = 0;
|
|
|
|
HREG(91) = 0;
|
|
|
|
HREG(92) = 0;
|
|
|
|
HREG(93) = 0;
|
|
|
|
HREG(94) = 0;
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 8104);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 20:22:01 +00:00
|
|
|
if (R_SCENE_CONFIG_DRAW_DEFAULT_DLIST == 1) {
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPDisplayList(POLY_OPA_DISP++, sDefaultDisplayList);
|
|
|
|
gSPDisplayList(POLY_XLU_DISP++, sDefaultDisplayList);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 8109);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 20:22:01 +00:00
|
|
|
if (R_SCENE_CONFIG_DRAW_SCENE_CONFIG == 1) {
|
2022-05-31 18:19:46 +00:00
|
|
|
sSceneDrawConfigs[play->sceneDrawConfig](play);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
|
|
|
} else {
|
2022-05-31 18:19:46 +00:00
|
|
|
sSceneDrawConfigs[play->sceneDrawConfig](play);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|