Lamakan Desert, four maps of sand between Altin and the world map east. More...
Go to the source code of this file.
Data Structures | |
| struct | SafePoint |
| A recovery point: where a collapsed leader comes to. More... | |
| struct | Half |
| A halfword holding the zero the gauge's slide and phase are cleared with. More... | |
Macros | |
| #define | NULL ((void *)0) |
Enumerations | |
| enum | { FLAG_HAZARDS_PAUSED = FLAG_SCENE_TEMP_00 , FLAG_SECRETS_REVEALED = FLAG_SCENE_TEMP_01 , FLAG_HEAT_QUARTER = 0x300 , FLAG_HEAT_HALF = 0x301 , FLAG_HEAT_THREE_QUARTERS = 0x302 , FLAG_GARET_COMPLAINED = 0x303 , FLAG_IVAN_COMPLAINED = 0x304 , FLAG_MIA_COMPLAINED = 0x305 } |
| enum | { SAND_MONSTER = 8 , FIRST_PIT = 9 , LAST_PIT = 12 , SMOG = 13 } |
| enum | { LAMAKAN_ENCOUNTERS = 53 } |
| The sand monster's fight and the pits' battles come from encounter zone 53. More... | |
Functions | |
| static void | HeatGauge_SetHeld (u16 value) |
| While held (1), the gauge stays on screen. | |
| static void | TalkToSmog (void) |
| Smog, Jupiter Djinni 3, joins the party. | |
| static s32 | Leader_SpraySand (union FieldObject *fieldObject) |
| const struct SceneEntrance * | LamakanDesert_GetEntrances (void) |
| Where the party can enter each of the four maps. | |
| const struct SceneRegion * | LamakanDesert_GetRegions (void) |
| const u32 * | LamakanDesert_GetExits (void) |
| All four desert maps share the packed exit table. | |
| const struct ScenePlacement * | LamakanDesert_GetPlacements (void) |
| The pits and the monster of each map. | |
| static void | LeaveForTheWorldMap (void) |
| Trigger 9: back out to the world map. | |
| const struct SceneEvent * | LamakanDesert_GetEvents (void) |
| The desert's triggers, the same on every map. | |
| static s32 | Reveal_HideSecrets (void) |
| Reveal's end (phase 4), and every entry: the pits and Smog vanish under the sand again (cells 70, 68 or 69, 99 over the saved patches), the chests hide and the heat haze shimmers. | |
| static s32 | Reveal_ShowSecrets (void) |
| Reveal (phase 5): the saved patches of sand come back, the pits and the monster stand where they are, the chests show and the haze stops. | |
| static void | FightSandMonster (void) |
| Talking to the sand monster: its battle, returning to the third map's entrance 5. | |
| static void | ComplainAboutHeat (s32 mark) |
| Raised trigger 1, 2 or 3 as the heat gauge passes a quarter, a half and three quarters: Garet, Ivan or Mia, picked at random (three tries for one who has not spoken yet), complains about the heat. | |
| static void | HeatGauge_RaiseQuarterTriggers (void) |
| Every frame: raises triggers 1 to 3 as the gauge passes each quarter, and clears each mark and the complaints when the gauge drops back below it. | |
| static s32 | DistanceInPixels (s32 *firstPosition, s32 *secondPosition) |
| The distance in whole pixels between two x, z positions. | |
| static void | CollapseFromHeat (void) |
| Trigger 20, raised when the heat gauge fills: the leader drops at the nearest recovery point of the map, lies collapsed while the gauge drains 5 steps a frame, then gets up. | |
| static void | HeatGauge_CountStep (void) |
| Walking on sand (triggers 21 and 100 to 107): each moving frame adds a step of heat and kicks up dust, faster on the run. | |
| static void | FallIntoPit (void) |
| Trigger 22, stepping near a hidden pit: the leader looks at the nearest pit, is pulled backwards into it and a battle begins. | |
| static void | SlideDownDune (void) |
| Trigger 30, on a slope of sand: the sand carries the leader south 1.5 pixels a frame, and at a ledge the leader hops down 8 pixels. | |
| static void | MeetSandMonster (void) |
| Trigger 40 on the third map, until the monster is beaten: the leader stops and backs away as the monster rises out of the sand. | |
| s32 | LamakanDesert_Initialize (s32 a0, s32 a1) |
| Entering the desert: the heat gauge (600 steps) starts on the first three maps, the patches Reveal uncovers are saved to the spare cells at 64, 126 or 64, 124, and the secrets are hidden. | |
| static UNUSED void | SandMonster_Return (void) |
| The monster sinks back to its spot; nothing calls this. | |
| static void | HeatGauge_Draw (void) |
| Every frame: draws the heat gauge. | |
| void | HeatGauge_Start (void) |
| Loads the gauge's tiles, claims VRAM for them and starts drawing it. | |
Variables | |
| const s32 | gEffectScript0 [] |
| const s32 | gEffectScript1 [] |
| const s32 | gEffectScript2 [] |
| const s32 | gLamakanDesertRecoveryPoints1 [] |
| Each map's recovery points, as x, z pairs. | |
| const s32 | gLamakanDesertRecoveryPoints2 [] |
| const s32 | gLamakanDesertRecoveryPointsOther [] |
| const s32 * | gEffectScripts [] |
| struct SceneEntrance | gLamakanDesertEntrancesOther [] |
| struct SceneEntrance | gLamakanDesertEntrances1 [] |
| struct SceneEntrance | gLamakanDesertEntrances2 [] |
| struct SceneEntrance | gLamakanDesertEntrances3 [] |
| struct SceneEntrance | gLamakanDesertEntrances4 [] |
| u32 | gLamakanDesertExits [] |
| struct ScenePlacement | gLamakanDesertPlacementsOther [] |
| struct ScenePlacement | gLamakanDesertPlacements1 [] |
| struct ScenePlacement | gLamakanDesertPlacements2 [] |
| struct ScenePlacement | gLamakanDesertPlacements3 [] |
| struct SceneEvent | gLamakanDesertEvents [] |
| s16 | gHeatGaugeLevel = 0 |
| The gauge: how full it is (0 to 120), how far it has slid onto the screen, and a flash as it fills. | |
| s16 | gHeatGaugeSlide = 0 |
| s16 | gHeatGaugeFlash = 0 |
Lamakan Desert, four maps of sand between Altin and the world map east.
Walking fills a heat gauge (gGameState.hazardSteps of hazardLimit), drawn as a bar at the top of the screen; each quarter it fills makes a party member complain, and a full gauge leaves the leader collapsed at the nearest recovery point. Reveal uncovers the hidden pits, the shimmering heat haze hides them again, and a pit drags the leader into a battle.
Definition in file lamakan_desert.c.
| #define NULL ((void *)0) |
Definition at line 82 of file lamakan_desert.c.
| anonymous enum |
Definition at line 57 of file lamakan_desert.c.
| anonymous enum |
| Enumerator | |
|---|---|
| SAND_MONSTER | sprite 0xc3; talking to it starts a battle |
| FIRST_PIT | 9 to 12: the pits Reveal shows (sprite 0xc1) |
| LAST_PIT | |
| SMOG | the Jupiter Djinni |
Definition at line 72 of file lamakan_desert.c.
| anonymous enum |
The sand monster's fight and the pits' battles come from encounter zone 53.
| Enumerator | |
|---|---|
| LAMAKAN_ENCOUNTERS | |
Definition at line 80 of file lamakan_desert.c.
|
static |
While held (1), the gauge stays on screen.
Definition at line 1062 of file lamakan_desert.c.
Referenced by CollapseFromHeat(), HeatGauge_SetHeld(), and MeetSandMonster().
|
static |
Smog, Jupiter Djinni 3, joins the party.
Definition at line 88 of file lamakan_desert.c.
Referenced by TalkToSmog().
|
static |
Definition at line 99 of file lamakan_desert.c.
Referenced by FallIntoPit(), and Leader_SpraySand().
| const struct SceneEntrance * LamakanDesert_GetEntrances | ( | void | ) |
Where the party can enter each of the four maps.
Definition at line 129 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| const struct SceneRegion * LamakanDesert_GetRegions | ( | void | ) |
Definition at line 147 of file lamakan_desert.c.
Referenced by LamakanDesert_GetRegions().
| const u32 * LamakanDesert_GetExits | ( | void | ) |
All four desert maps share the packed exit table.
Definition at line 150 of file lamakan_desert.c.
Referenced by LamakanDesert_GetExits().
| const struct ScenePlacement * LamakanDesert_GetPlacements | ( | void | ) |
The pits and the monster of each map.
Arriving at the third map's entrance 5, the way back from the monster's battle, marks it beaten.
Definition at line 154 of file lamakan_desert.c.
Referenced by LamakanDesert_GetPlacements().
|
static |
Trigger 9: back out to the world map.
Definition at line 176 of file lamakan_desert.c.
Referenced by LeaveForTheWorldMap().
| const struct SceneEvent * LamakanDesert_GetEvents | ( | void | ) |
The desert's triggers, the same on every map.
Definition at line 192 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEvents().
|
static |
Reveal's end (phase 4), and every entry: the pits and Smog vanish under the sand again (cells 70, 68 or 69, 99 over the saved patches), the chests hide and the heat haze shimmers.
Definition at line 203 of file lamakan_desert.c.
Referenced by LamakanDesert_Initialize(), and Reveal_HideSecrets().
|
static |
Reveal (phase 5): the saved patches of sand come back, the pits and the monster stand where they are, the chests show and the haze stops.
Definition at line 272 of file lamakan_desert.c.
Referenced by Reveal_ShowSecrets().
|
static |
Talking to the sand monster: its battle, returning to the third map's entrance 5.
Definition at line 339 of file lamakan_desert.c.
Referenced by FightSandMonster().
|
static |
Raised trigger 1, 2 or 3 as the heat gauge passes a quarter, a half and three quarters: Garet, Ivan or Mia, picked at random (three tries for one who has not spoken yet), complains about the heat.
Definition at line 349 of file lamakan_desert.c.
Referenced by ComplainAboutHeat().
|
static |
Every frame: raises triggers 1 to 3 as the gauge passes each quarter, and clears each mark and the complaints when the gauge drops back below it.
Nothing is raised while Reveal is showing the pits.
Definition at line 380 of file lamakan_desert.c.
Referenced by HeatGauge_RaiseQuarterTriggers(), and LamakanDesert_Initialize().
The distance in whole pixels between two x, z positions.
Definition at line 419 of file lamakan_desert.c.
Referenced by CollapseFromHeat(), and DistanceInPixels().
|
static |
Trigger 20, raised when the heat gauge fills: the leader drops at the nearest recovery point of the map, lies collapsed while the gauge drains 5 steps a frame, then gets up.
Definition at line 437 of file lamakan_desert.c.
Referenced by CollapseFromHeat().
|
static |
Walking on sand (triggers 21 and 100 to 107): each moving frame adds a step of heat and kicks up dust, faster on the run.
Definition at line 572 of file lamakan_desert.c.
Referenced by HeatGauge_CountStep(), MeetSandMonster(), and SlideDownDune().
|
static |
Trigger 22, stepping near a hidden pit: the leader looks at the nearest pit, is pulled backwards into it and a battle begins.
Definition at line 622 of file lamakan_desert.c.
Referenced by FallIntoPit().
|
static |
Trigger 30, on a slope of sand: the sand carries the leader south 1.5 pixels a frame, and at a ledge the leader hops down 8 pixels.
Definition at line 697 of file lamakan_desert.c.
Referenced by SlideDownDune().
|
static |
Trigger 40 on the third map, until the monster is beaten: the leader stops and backs away as the monster rises out of the sand.
Definition at line 771 of file lamakan_desert.c.
Referenced by MeetSandMonster().
Entering the desert: the heat gauge (600 steps) starts on the first three maps, the patches Reveal uncovers are saved to the spare cells at 64, 126 or 64, 124, and the secrets are hidden.
Definition at line 835 of file lamakan_desert.c.
Referenced by LamakanDesert_Initialize().
|
static |
The monster sinks back to its spot; nothing calls this.
Definition at line 881 of file lamakan_desert.c.
Referenced by SandMonster_Return().
|
static |
Every frame: draws the heat gauge.
It sits 8 pixels lower while held, slides away while flag 0x104 is set, its bar shrinks as the heat grows, and its colors turn redder (flickering greener past 60 of 120).
Definition at line 891 of file lamakan_desert.c.
Referenced by HeatGauge_Draw(), and HeatGauge_Start().
| void HeatGauge_Start | ( | void | ) |
Loads the gauge's tiles, claims VRAM for them and starts drawing it.
Definition at line 1044 of file lamakan_desert.c.
Referenced by HeatGauge_Start(), and LamakanDesert_Initialize().
| const s32 gEffectScript0[] |
Definition at line 1064 of file lamakan_desert.c.
| const s32 gEffectScript1[] |
| const s32 gEffectScript2[] |
| const s32 gLamakanDesertRecoveryPoints1[] |
Each map's recovery points, as x, z pairs.
Definition at line 1081 of file lamakan_desert.c.
Referenced by CollapseFromHeat().
| const s32 gLamakanDesertRecoveryPoints2[] |
| const s32 gLamakanDesertRecoveryPointsOther[] |
Definition at line 1095 of file lamakan_desert.c.
Referenced by CollapseFromHeat().
| const s32* gEffectScripts[] |
Definition at line 1100 of file lamakan_desert.c.
| struct SceneEntrance gLamakanDesertEntrancesOther[] |
Definition at line 1106 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| struct SceneEntrance gLamakanDesertEntrances1[] |
Definition at line 1112 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| struct SceneEntrance gLamakanDesertEntrances2[] |
Definition at line 1119 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| struct SceneEntrance gLamakanDesertEntrances3[] |
Definition at line 1126 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| struct SceneEntrance gLamakanDesertEntrances4[] |
Definition at line 1136 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEntrances().
| u32 gLamakanDesertExits[] |
Definition at line 1145 of file lamakan_desert.c.
Referenced by LamakanDesert_GetExits().
| struct ScenePlacement gLamakanDesertPlacementsOther[] |
Definition at line 1165 of file lamakan_desert.c.
Referenced by LamakanDesert_GetPlacements().
| struct ScenePlacement gLamakanDesertPlacements1[] |
Definition at line 1169 of file lamakan_desert.c.
Referenced by LamakanDesert_GetPlacements().
| struct ScenePlacement gLamakanDesertPlacements2[] |
Definition at line 1177 of file lamakan_desert.c.
Referenced by LamakanDesert_GetPlacements().
| struct ScenePlacement gLamakanDesertPlacements3[] |
Definition at line 1193 of file lamakan_desert.c.
Referenced by LamakanDesert_GetPlacements().
| struct SceneEvent gLamakanDesertEvents[] |
Definition at line 1201 of file lamakan_desert.c.
Referenced by LamakanDesert_GetEvents().
| s16 gHeatGaugeLevel = 0 |
The gauge: how full it is (0 to 120), how far it has slid onto the screen, and a flash as it fills.
Definition at line 1244 of file lamakan_desert.c.
Referenced by HeatGauge_Draw().
| s16 gHeatGaugeSlide = 0 |
Definition at line 1246 of file lamakan_desert.c.
Referenced by HeatGauge_Draw(), and HeatGauge_Start().
| s16 gHeatGaugeFlash = 0 |
Definition at line 1248 of file lamakan_desert.c.
Referenced by HeatGauge_Draw().