Alchemy

tret_tree_branch.c

A branch of Tret, the great tree, where Breeze, a Jupiter Djinni, waits; touch triggers move the leader and the camera along the branch.

games/tbs/src/scene/tret_tree_branch.c on GitHub

A branch of Tret, the great tree, where Breeze, a Jupiter Djinni, waits; touch triggers move the leader and the camera along the branch.

Functions

Event_TalkToBreeze

static void Event_TalkToBreeze(void)

Talking to Breeze: the Djinni hops and its battle starts.

Used by gTretTreeBranch_Events.

Line 54

TretTreeBranch_ShiftLeaderAndCameraByCells

static void TretTreeBranch_ShiftLeaderAndCameraByCells(s32 cellOffsetX, s32 cellOffsetZ)

Moves the leader and camera by signed 16-pixel cell offsets, placing each at the terrain height of its destination.

Used by Event_ShiftNorthFiveCells, Event_ShiftNorthFiveCellsSecond, Event_ShiftNorthSixCells, Event_ShiftSouthFiveCells, Event_ShiftSouthFiveCellsSecond, Event_ShiftSouthSixCells.

Line 72

Event_ShiftSouthFiveCells

static void Event_ShiftSouthFiveCells(void)

Touch trigger 10: the leader and camera move 80 pixels south at once.

Used by gTretTreeBranch_Events.

Line 108

Event_ShiftNorthFiveCells

static void Event_ShiftNorthFiveCells(void)

Touch trigger 11: the leader and camera move 80 pixels north at once.

Used by gTretTreeBranch_Events.

Line 113

Event_ShiftSouthFiveCellsSecond

static void Event_ShiftSouthFiveCellsSecond(void)

Touch trigger 12: the same 80-pixel move south as trigger 10.

Used by gTretTreeBranch_Events.

Line 118

Event_ShiftNorthFiveCellsSecond

static void Event_ShiftNorthFiveCellsSecond(void)

Touch trigger 13: the same 80-pixel move north as trigger 11.

Used by gTretTreeBranch_Events.

Line 123

Event_ShiftSouthSixCells

static void Event_ShiftSouthSixCells(void)

Touch trigger 14: the leader and camera move 96 pixels south at once.

Used by gTretTreeBranch_Events.

Line 128

Event_ShiftNorthSixCells

static void Event_ShiftNorthSixCells(void)

Touch trigger 15: the leader and camera move 96 pixels north at once.

Used by gTretTreeBranch_Events.

Line 133

Event_TakeTouchedExit

static void Event_TakeTouchedExit(void)

Walking into one of exits 1 to 8: the exit sound plays and the party leaves by the exit touched.

Used by gTretTreeBranch_Events.

Line 139

TretTreeBranch_SetRevealWindow

static inline void TretTreeBranch_SetRevealWindow(struct DisplayTransitionState *state)

Selects the same mask and window parameters for Reveal and scene entry.

Used by Event_CastReveal, TretTreeBranch_Initialize.

Line 149

Event_CastReveal

static void Event_CastReveal(void)

Casting Reveal on the branch (its phase 2): the window transition and BG1's blend over the rest of the screen are set again, as when the scene opened.

Used by gTretTreeBranch_Events, gTretTreeInteriorsEvents.

Line 158

TretTreeBranch_GetEvents

const struct SceneEvent *TretTreeBranch_GetEvents(void)

Returns the touch, talk, exit and Reveal events for this branch.

Line 171

TretTreeBranch_Initialize

s32 TretTreeBranch_Initialize(void)

Initializes the backdrop transition and installs BG3's scanline scroll split. Returns 0 for the overlay initialization entry point.

Line 196

TretTreeBranch_ApplyBg3ScrollAtScanline

static void TretTreeBranch_ApplyBg3ScrollAtScanline(void)

HBlank selects BG3's horizontal offset for the next scanline.

Used by TretTreeBranch_StartBg3Split.

Line 223

TretTreeBranch_UpdateBg3ScrollSplit

static void TretTreeBranch_UpdateBg3ScrollSplit(void)

Updates the split from the first map layer's pixel position. Before the split, scroll subtracts one pixel for every four elapsed frames.

Used by TretTreeBranch_StartBg3Split.

Line 238

TretTreeBranch_StartBg3Split

static void TretTreeBranch_StartBg3Split(void)

Runs the BG3 scroll selection at every HBlank, updating the split each frame.

Used by TretTreeBranch_Initialize.

Line 250

Also, functions without a comment: TretTreeBranch_GetEntrances, TretTreeBranch_GetRegions, TretTreeBranch_GetExits, TretTreeBranch_GetPlacements, void, void, void, void.

Globals

UNUSED

static void UNUSED

Unused event hook: begins and immediately ends an event.

Used by AudioCommand_GetWidth, AudioEngine_StopAllChannels, Audio_PlayOrResumeSound, Audio_PlaySoundIfInactive, Audio_ResumeAllPlayers, Audio_ResumeSound, Audio_StopAllPlayers, Audio_StopSound, BattleCommand_BuildPlan, BattleFormation_AverageLevel, BattleFx_BuildCenteredIndexList, BattleFx_InitTilemapAndFlushQueue, BattleFx_InitializeRisingObject, BattleFx_RunBladeRain, BattleFx_RunBoreas, BattleFx_RunDjinnHeal, BattleFx_RunHealingMotesMode4, BattleFx_RunLimeStreaks, BattleFx_RunOrbitingSkulls, BattleFx_RunParticleStreams, BattleFx_RunShatteringOpening, BattleFx_RunStatReductionMode3, BattleFx_RunSwirlingStars, BattleFx_RunTargetBursts, BattleFx_RunTargetMotesMode1, BattleMotion_ProjectScaledPosition, BattlePres_RunPlainAttack, BattleUnit_ProjectToScreen, Battle_RunEncounter, Camera_FollowObject, Clear_PackPasswordData, Code_ResolveLongBranches, ColossoLogRollingStage_NoopSceneEventHook, ColossoLog_MarkRivalFinished, ColossoLog_RunCompetitorTalk, ColossoRiver_MarkStageReady, ColossoRiver_SetCourseFlag, ColossoWall_MarkRivalFinished, ColossoWall_RollCenterLogNorth, ColossoWall_RollCenterLogSouth and 145 more.

Line 176

UNUSED

static void UNUSED

Unused exchange callback: puts held/repeated keys in the transfer header.

Used by AudioCommand_GetWidth, AudioEngine_StopAllChannels, Audio_PlayOrResumeSound, Audio_PlaySoundIfInactive, Audio_ResumeAllPlayers, Audio_ResumeSound, Audio_StopAllPlayers, Audio_StopSound, BattleCommand_BuildPlan, BattleFormation_AverageLevel, BattleFx_BuildCenteredIndexList, BattleFx_InitTilemapAndFlushQueue, BattleFx_InitializeRisingObject, BattleFx_RunBladeRain, BattleFx_RunBoreas, BattleFx_RunDjinnHeal, BattleFx_RunHealingMotesMode4, BattleFx_RunLimeStreaks, BattleFx_RunOrbitingSkulls, BattleFx_RunParticleStreams, BattleFx_RunShatteringOpening, BattleFx_RunStatReductionMode3, BattleFx_RunSwirlingStars, BattleFx_RunTargetBursts, BattleFx_RunTargetMotesMode1, BattleMotion_ProjectScaledPosition, BattlePres_RunPlainAttack, BattleUnit_ProjectToScreen, Battle_RunEncounter, Camera_FollowObject, Clear_PackPasswordData, Code_ResolveLongBranches, ColossoLogRollingStage_NoopSceneEventHook, ColossoLog_MarkRivalFinished, ColossoLog_RunCompetitorTalk, ColossoRiver_MarkStageReady, ColossoRiver_SetCourseFlag, ColossoWall_MarkRivalFinished, ColossoWall_RollCenterLogNorth, ColossoWall_RollCenterLogSouth and 145 more.

Line 186

Also, globals without a comment: sTransferHeader, sTransferData, sSplitLine, sHofsAtOrAfterSplit, sHofsBeforeSplit, UNUSED, UNUSED, gTretTreeBranch_Entrances, gTretTreeBranch_Exits, gTretTreeBranch_Placements, gTretTreeBranch_Events, gTretTreeBranch_CellSteps.

On this page