include/game/main_routine_state.h
The values MainRoutineStateWork's fields hold. More…
Included by battle_internal.h, field_engine_internal.h, field_psynergy_internal.h, script_commands_internal.h, menu_internal.h, world_map_objects.c, shop_internal.h, window_internal.h, scene_tables.h, inventory.h, jupiter_lighthouse_aerie.h, mars_lighthouse_shared.h, trial_road.h and tundaria_tower.h.
Macros
| Name | Description | |
|---|---|---|
#define | BATTLE_OUTCOME_LOST -1 | btRun's results in MainRoutineStateWork.engineResult besides the number of enemies defeated. |
#define | BATTLE_OUTCOME_FLED 999 | |
#define | COIN_MAX 999999 | The most coins the party carries, and the most shop credit. |
#define | HAZARD_DAMAGE_PERCENT 0x100 | MainRoutineStateWork.hazardDamage's bit 8: its low byte is a percentage of maximum HP rather than HP. |
#define | SHOP_GIFTS_MAX 28 | The most Game Tickets counted in MAIN_ROUTINE_STATE.shopGifts, the last of ShopGameTicketCreditCosts' prices that is used. |
#define | DJINNI_BATTLE_SCRIPT_FIRST 300 | The first pending Djinni battle script: DJINNI_BATTLE_SCRIPT_FIRST plus the Djinni's number (fdRequestDjinnBattle). |
#define | SET_BATTLE_TYPE (mode) | Sets how the next battle starts (an BATTLE_TYPE). |
Enumerations
| Name | Description | |
|---|---|---|
enum | SCENE_TYPE { SCENE_TYPE_OTHER, SCENE_TYPE_TOWN } | A scene's type (SCENE.sceneType, copied to MAIN_ROUTINE_STATE.sceneType). |
enum | BATTLE_TYPE { BATTLE_TYPE_NORMAL, BATTLE_TYPE_NO_ESCAPE, BATTLE_TYPE_LINK, … } | MainRoutineStateWork.battleType: how the next battle starts; it is set back to BATTLE_TYPE_NORMAL as the battle ends. |
enum | HAZARD_MODE { HAZARD_COUNT_ON_METATILES, HAZARD_COUNT_TICKS } | MainRoutineStateWork.hazardMode: what advances the hazard count (fdUpdateWalking). |
enum | DIFFICULTY { DIFFICULTY_NORMAL, DIFFICULTY_EASY, DIFFICULTY_HARD } | MainRoutineStateWork.difficulty: the level chosen on starting again from a cleared game. |
enum | LUCKY_WHEELS_PRIZES_MARK { WHEELS_PRIZES_END, WHEELS_PRIZES_NONE_TO_HAND_OUT } | What MAIN_ROUTINE_STATE.wheelsPrizes holds in place of a first prize, as Lucky Wheels and its attendant leave it: no icon matched (also the list's end), or none to hand out, the player having quit while betting or the prizes having been given. |
enum | TELEPORT_STATE { TELEPORT_NONE, TELEPORT_CHOSEN, TELEPORT_ARRIVING } | Teleport's steps (MAIN_ROUTINE_STATE.teleportState): a place was chosen and the scene it lands in is loading, then the party arrives in it. |
enum | LINK_TALLY { LINK_TALLY_MONSTER_WINS, LINK_TALLY_MONSTER_LOSSES, LINK_TAL … } | MAIN_ROUTINE_STATE.linkTallies, as the Link Lobby keeps them. |
Description
The values MainRoutineStateWork's fields hold. The structure, the game's
state a save file keeps, is the system library's (system/definitions.h), as
the variable is.
Macros in detail
BATTLE_OUTCOME_LOST
#define BATTLE_OUTCOME_LOST -1
btRun's results in MainRoutineStateWork.engineResult besides the number of
enemies defeated.
Referenced by btRun(), gmReturnFromEngine(), scJupiterLighthouseJennaJoinsTheFight() and scJupiterLighthouseShebaJoinsTheFight().
Definition at line 38 of file main_routine_state.h.
BATTLE_OUTCOME_FLED
#define BATTLE_OUTCOME_FLED 999
Referenced by btRun() and fdDjinnResolvePending().
Definition at line 39 of file main_routine_state.h.
COIN_MAX
#define COIN_MAX 999999
The most coins the party carries, and the most shop credit.
Referenced by gmPartyAddIsaacsParty(), gmPartyAdjustCoins(), scContigoOfferLuckyDice() and scContigoOfferSuperLuckyDice().
Definition at line 42 of file main_routine_state.h.
HAZARD_DAMAGE_PERCENT
#define HAZARD_DAMAGE_PERCENT 0x100
MainRoutineStateWork.hazardDamage's bit 8: its low byte is a percentage of
maximum HP rather than HP.
Referenced by fdUpdateWalking().
Definition at line 56 of file main_routine_state.h.
SHOP_GIFTS_MAX
#define SHOP_GIFTS_MAX 28
The most Game Tickets counted in MAIN_ROUTINE_STATE.shopGifts, the last of
ShopGameTicketCreditCosts' prices that is used.
Referenced by mnShopOpenDebugShop().
Definition at line 60 of file main_routine_state.h.
DJINNI_BATTLE_SCRIPT_FIRST
#define DJINNI_BATTLE_SCRIPT_FIRST 300
The first pending Djinni battle script: DJINNI_BATTLE_SCRIPT_FIRST plus the
Djinni's number (fdRequestDjinnBattle).
Referenced by fdDjinnResolvePending(), fdDjinnRestoreActorAfterBattle() and fdRequestDjinnBattle().
Definition at line 64 of file main_routine_state.h.
SET_BATTLE_TYPE
#define SET_BATTLE_TYPE(mode)
Sets how the next battle starts (an BATTLE_TYPE).
Referenced by btRun(), scAnemosInnerSanctumDullahanShadowChallenges(), scChampaCliffCavesFightAvimander(), scGabombaCatacombsUncoverMadPlant(), scGaiaRockInsideChallengeSerpent(), scGaiaRockInsideCycloneMadPlant(), scIsletCaveSentinelAwaits(), scJupiterLighthouseBeaconIsLit(), scJupiterLighthouseIsaacAndIvanAreHurt(), scJupiterLighthouseJennaJoinsTheFight(), scJupiterLighthouseShebaJoinsTheFight(), scJupiterLighthouseUncoverMadPlant(), scKandoreanTempleFightChestbeaters(), scShamanVillageCaveFightGladiators(), scShamanVillageCaveMeetGladiators(), scSuhallaGateFightPunchAnt(), scSuhallaGateRuffianSpotsParty(), scTaopoSwampStartMadPlantBattle(), scTreasureIsleMeetStarMagician(), scTrialRoadChallengeMoapa(), scTrialRoadScatterWeedsHidingMadPlant(), scVenusLighthouseEntranceRuffianWaitsForBackup(), scWorldMapFightBanditAndThieves() and scYampiDesertCaveMeetGuardianOfFire().
Definition at line 110 of file main_routine_state.h.
Enumerations in detail
SCENE_TYPE
enum SCENE_TYPE
A scene's type (SCENE.sceneType, copied to MAIN_ROUTINE_STATE.sceneType).
| Enumerator | Value | Description |
|---|---|---|
SCENE_TYPE_OTHER | 1 | every other scene: dungeons, the world map |
SCENE_TYPE_TOWN | 2 | Towns and their rooms, and the prologue's Venus Lighthouse scenes: FLAG_IN_TOWN is set there (gmArrive). |
Definition at line 14 of file main_routine_state.h.
BATTLE_TYPE
enum BATTLE_TYPE
MainRoutineStateWork.battleType: how the next battle starts; it is set back
to BATTLE_TYPE_NORMAL as the battle ends.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_TYPE_NORMAL | 0 | |
BATTLE_TYPE_NO_ESCAPE | 2 | A battle the party cannot run from: a Mimic's, a hidden Mad Plant's and the bosses'. |
BATTLE_TYPE_LINK | 4 | A link battle, from the lobby. |
BATTLE_TYPE_DEBUG | 5 | The debug battle menu's mark. |
BATTLE_TYPE_LOST | 6 | A battle the party is meant to lose: it is caught off guard and every hit downs its target, as when Karst and Agatio fight Isaac and Ivan. |
Definition at line 24 of file main_routine_state.h.
HAZARD_MODE
enum HAZARD_MODE
MainRoutineStateWork.hazardMode: what advances the hazard count
(fdUpdateWalking).
| Enumerator | Value | Description |
|---|---|---|
HAZARD_COUNT_ON_METATILES | 0 | The distance the leader walks on MAP_METATILE_HAZARD ground. |
HAZARD_COUNT_TICKS | 1 | One each tick the field engine runs; no code in the game sets it. |
Definition at line 46 of file main_routine_state.h.
DIFFICULTY
enum DIFFICULTY
MainRoutineStateWork.difficulty: the level chosen on starting again from a
cleared game.
| Enumerator | Value | Description |
|---|---|---|
DIFFICULTY_NORMAL | 0 | "Play on Normal level? (Default difficulty)" |
DIFFICULTY_EASY | 1 | "Play on EASY level? (Characters start at Lost Age Clear Data levels)" |
DIFFICULTY_HARD | 2 | "Play on HARD level? (Monsters are stronger)" |
Definition at line 68 of file main_routine_state.h.
LUCKY_WHEELS_PRIZES_MARK
enum LUCKY_WHEELS_PRIZES_MARK
What MAIN_ROUTINE_STATE.wheelsPrizes holds in place of a first prize, as
Lucky Wheels and its attendant leave it: no icon matched (also the list's
end), or none to hand out, the player having quit while betting or the prizes
having been given.
| Enumerator | Value | Description |
|---|---|---|
WHEELS_PRIZES_END | -1 | |
WHEELS_PRIZES_NONE_TO_HAND_OUT | -2 |
Definition at line 80 of file main_routine_state.h.
TELEPORT_STATE
enum TELEPORT_STATE
Teleport's steps (MAIN_ROUTINE_STATE.teleportState): a place was chosen and
the scene it lands in is loading, then the party arrives in it.
| Enumerator | Value | Description |
|---|---|---|
TELEPORT_NONE | ||
TELEPORT_CHOSEN | ||
TELEPORT_ARRIVING |
Definition at line 88 of file main_routine_state.h.
LINK_TALLY
enum LINK_TALLY
MAIN_ROUTINE_STATE.linkTallies, as the Link Lobby keeps them.
| Enumerator | Value | Description |
|---|---|---|
LINK_TALLY_MONSTER_WINS | 0 | |
LINK_TALLY_MONSTER_LOSSES | 1 | |
LINK_TALLY_MONSTER_BEST_STREAK | 2 | the most won in a row |
LINK_TALLY_MONSTER_STREAK | 3 | those won in the current series |
LINK_TALLY_LINKED_WINS | 4 | |
LINK_TALLY_LINKED_LOSSES | 5 | |
LINK_TALLY_LINKED_BEST_STREAK | 6 | The most linked battles won in a row, on the wall board |
LINK_TALLY_LINKED_STREAK | 7 | those won in a row now |
Definition at line 96 of file main_routine_state.h.