Alchemy
Loading...
Searching...
No Matches

vault_toggle.h

Go to the documentation of this file.
1/// @file
2/// Vault, before and after the thieves are caught: touch triggers 1 and 2 swap
3/// the collision of the 4x2 cells at cell (23, 26) between two versions kept
4/// elsewhere in the map. FLAG_SCENE_TEMP_00 remembers the alternate version,
5/// which each scene restores on a kept-position return, such as after battle.
6#include "types.h"
7#include "field_obj.h"
8#include "field_event.h"
9#include "flags.h"
10
11/// Cell code 1 selects the passage's alternate collision and sets
12/// FLAG_SCENE_TEMP_00, preserving that choice across a kept-position return.
15 Map_CopyCellAttributes(55, 26, 4, 2, 23, 26);
16}
17
18/// Cell code 2 restores the passage's usual collision and clears
19/// FLAG_SCENE_TEMP_00.
20static void Vault_RestorePassageCells(void) {
22 Map_CopyCellAttributes(23, 23, 4, 2, 23, 26);
23}
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
Field objects and actors, and the scene transition styles.
Game flags, named where their meaning is shown.
#define FLAG_SCENE_TEMP_00
Definition flags.h:713
The integer types, TRUE, UNUSED and the fixed-address macros.
static void Vault_RestorePassageCells(void)
Cell code 2 restores the passage's usual collision and clears FLAG_SCENE_TEMP_00.
static void Vault_EnableAlternatePassageCells(void)
Cell code 1 selects the passage's alternate collision and sets FLAG_SCENE_TEMP_00,...