Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
GameState Struct Reference

The game state (GAME): the first 0x26BC bytes are what newGame clears (the save data), then the current game mode and the methods. More...

#include <engine/game_state.h>

Collaboration diagram for GameState:
[legend]

Data Fields

u8 checksum
 a save's, of its bytes from 0x4 (STGMCARD_runSaves)
 
u8 pad1
 never read or written
 
u8 version
 a save's MEMCARD_SAVE_VERSION (stgmcard.h)
 
u8 pad3
 never read or written
 
u8 digivolveDemo
 
u8 pad5 [7]
 never read or written
 
s32 unusedC
 newGame sets it to -1; nothing reads it
 
u8 pad10 [0x18]
 never read or written
 
s32 stageSelectTop
 the debug stage select's first line
 
s32 stageSelectCursor
 
s32 battleSteps
 to the next random battle, which each step lowers
 
s32 fieldMode
 where the menu returns to
 
Vec2 fieldPos
 the player's, there
 
s32 fieldDir
 
u16 place
 where the last warp or trigger put the player (FieldBattles.id)
 
u16 placeArg
 the place's argument, which the stage reads with it
 
PlayTime playTime
 
char name [0x18]
 the player's
 
s32 money
 
s32 party [3]
 partner indices
 
s8 items [0x193]
 counts, up to 99
 
s8 equippedItems [0x193]
 
s8 cards [0x13D]
 counts, up to CARD_COPIES_MAX
 
u8 cardsSeen [0x149]
 
Deck decks [3]
 
Partner partners [PARTNER_COUNT]
 
s32 progress
 
s32 partySet
 setParty's: the starter pack (enum StarterPack)
 
u8 flags02 [0x12]
 flags02-flags40: the event flag groups 0x02-0x40 (checkCondition, applyAction), bitsets packed one after the other, so most start at an odd byte.
 
u8 flags04 [0x2]
 
u8 flags06 [0x1]
 
u8 flags08 [0x1]
 
u8 flags0A [0x4]
 
u8 flags0C [0x8]
 
u8 flags0E [0xC]
 
u8 flags10 [0x4]
 
u8 flags18 [0x2]
 
u8 flags1A [0x9]
 
u8 flags1C [0xB]
 
u8 flags20 [0x1E]
 
u8 flags40 [0x1A]
 
s32 mode
 
s32 nextMode
 
s32 prevMode
 
s32 modeArg
 
u8 countdown [4]
 
s32 clearTempFlags
 
s32 lastFieldMode
 
s32 mapIndex
 
s32 altTriggers
 
s32 playerDepth
 
s32 prizeSpot
 
s32 dark
 
s32 flightZ
 
s32 randomGauges
 gauge games left with random rows, reset with each new mode
 
GameFuncs funcs
 

Detailed Description

The game state (GAME): the first 0x26BC bytes are what newGame clears (the save data), then the current game mode and the methods.

Game modes: mode >> 8 selects the overlay (MODE_OVERLAY_FILES); a mode change is requested with requestMode and applied by commitMode when main recreates the mode task.

Definition at line 491 of file game_state.h.

Field Documentation

◆ checksum

u8 GameState::checksum

a save's, of its bytes from 0x4 (STGMCARD_runSaves)

Definition at line 492 of file game_state.h.

Referenced by STGMCARD_fillSave(), and STGMCARD_loadSave().

◆ pad1

u8 GameState::pad1

never read or written

Definition at line 493 of file game_state.h.

◆ version

u8 GameState::version

a save's MEMCARD_SAVE_VERSION (stgmcard.h)

Definition at line 494 of file game_state.h.

Referenced by STGMCARD_fillSave(), and STGMCARD_loadSave().

◆ pad3

u8 GameState::pad3

never read or written

Definition at line 495 of file game_state.h.

◆ digivolveDemo

u8 GameState::digivolveDemo

Definition at line 496 of file game_state.h.

Referenced by newGame(), STSTATUS_chooseDemoOption(), and STSTATUS_showDemoChoices().

◆ pad5

u8 GameState::pad5[7]

never read or written

Definition at line 497 of file game_state.h.

◆ unusedC

s32 GameState::unusedC

newGame sets it to -1; nothing reads it

Definition at line 498 of file game_state.h.

Referenced by newGame().

◆ pad10

u8 GameState::pad10[0x18]

never read or written

Definition at line 499 of file game_state.h.

◆ stageSelectTop

s32 GameState::stageSelectTop

the debug stage select's first line

Definition at line 500 of file game_state.h.

Referenced by STAGSLCT_startStageSelect(), and STAGSLCT_updateStageSelect().

◆ stageSelectCursor

s32 GameState::stageSelectCursor

Definition at line 501 of file game_state.h.

Referenced by STAGSLCT_startStageSelect(), and STAGSLCT_updateStageSelect().

◆ battleSteps

s32 GameState::battleSteps

to the next random battle, which each step lowers

Definition at line 502 of file game_state.h.

Referenced by FIELDSTG_countBattleSteps(), FIELDSTG_rollBattleSteps(), and newGame().

◆ fieldMode

◆ fieldPos

Vec2 GameState::fieldPos

the player's, there

Definition at line 504 of file game_state.h.

Referenced by FIELDSTG_closeField(), FIELDSTG_playBattleTransition(), openFieldMenu(), and startField().

◆ fieldDir

s32 GameState::fieldDir

◆ place

u16 GameState::place

where the last warp or trigger put the player (FieldBattles.id)

Definition at line 506 of file game_state.h.

Referenced by checkWarpArg(), FIELDSTG_setOffTrigger(), setupStage(), updateStage(), updateStage(), and warpAway().

◆ placeArg

u16 GameState::placeArg

the place's argument, which the stage reads with it

Definition at line 507 of file game_state.h.

Referenced by checkWarpArg(), FIELDSTG_setOffTrigger(), updateStage(), updateStage(), and warpAway().

◆ playTime

PlayTime GameState::playTime

Definition at line 508 of file game_state.h.

Referenced by resetPlayTime(), STGMCARD_fillSave(), updatePlayTime(), and vsyncCallback().

◆ name

char GameState::name[0x18]

◆ money

◆ party

◆ items

◆ equippedItems

s8 GameState::equippedItems[0x193]

◆ cards

◆ cardsSeen

◆ decks

◆ partners

◆ progress

◆ partySet

s32 GameState::partySet

setParty's: the starter pack (enum StarterPack)

Definition at line 519 of file game_state.h.

Referenced by checkPartner(), and setParty().

◆ flags02

u8 GameState::flags02[0x12]

flags02-flags40: the event flag groups 0x02-0x40 (checkCondition, applyAction), bitsets packed one after the other, so most start at an odd byte.

The Japanese version's state is the European one's: its newGame clears 0x26C4 bytes and its code reads the same offsets

Definition at line 555 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags04

u8 GameState::flags04[0x2]

Definition at line 556 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags06

u8 GameState::flags06[0x1]

Definition at line 557 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags08

u8 GameState::flags08[0x1]

Definition at line 558 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags0A

u8 GameState::flags0A[0x4]

Definition at line 559 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags0C

u8 GameState::flags0C[0x8]

Definition at line 560 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags0E

u8 GameState::flags0E[0xC]

Definition at line 561 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags10

u8 GameState::flags10[0x4]

Definition at line 562 of file game_state.h.

Referenced by applyAction(), checkCondition(), and checkFlagCount().

◆ flags18

u8 GameState::flags18[0x2]

Definition at line 563 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags1A

u8 GameState::flags1A[0x9]

Definition at line 564 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags1C

u8 GameState::flags1C[0xB]

Definition at line 565 of file game_state.h.

Referenced by applyAction(), checkCondition(), and checkFlagCount().

◆ flags20

u8 GameState::flags20[0x1E]

Definition at line 566 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ flags40

u8 GameState::flags40[0x1A]

Definition at line 567 of file game_state.h.

Referenced by applyAction(), and checkCondition().

◆ mode

s32 GameState::mode

Definition at line 568 of file game_state.h.

Referenced by commitMode(), getMode(), and newGame().

◆ nextMode

s32 GameState::nextMode

Definition at line 569 of file game_state.h.

Referenced by commitMode(), isModeChangePending(), newGame(), and requestMode().

◆ prevMode

s32 GameState::prevMode

Definition at line 570 of file game_state.h.

Referenced by commitMode(), and getPrevMode().

◆ modeArg

s32 GameState::modeArg

Definition at line 571 of file game_state.h.

Referenced by getModeArg(), newGame(), requestMode(), and startField().

◆ countdown

u8 GameState::countdown[4]

Definition at line 572 of file game_state.h.

Referenced by drawTimer(), newGame(), and updateTimer().

◆ clearTempFlags

◆ lastFieldMode

s32 GameState::lastFieldMode

Definition at line 574 of file game_state.h.

Referenced by FIELDSTG_updateRoot().

◆ mapIndex

◆ altTriggers

s32 GameState::altTriggers

Definition at line 576 of file game_state.h.

Referenced by setupStage(), startEvent9000(), and startEvent9001().

◆ playerDepth

s32 GameState::playerDepth

Definition at line 577 of file game_state.h.

Referenced by FIELDSTG_offerTrigger(), and takePartyDepth().

◆ prizeSpot

s32 GameState::prizeSpot

Definition at line 578 of file game_state.h.

Referenced by FIELDSTG_createHiddenSpots(), and FIELDSTG_hidePrize().

◆ dark

s32 GameState::dark

Definition at line 579 of file game_state.h.

Referenced by setupStage(), and updateDarkness().

◆ flightZ

s32 GameState::flightZ

Definition at line 580 of file game_state.h.

Referenced by FIELDSTG_createActor(), and FIELDSTG_updateActor().

◆ randomGauges

s32 GameState::randomGauges

gauge games left with random rows, reset with each new mode

Definition at line 581 of file game_state.h.

Referenced by FIELDSTG_runGauge(), and FIELDSTG_updateRoot().

◆ funcs

GameFuncs GameState::funcs

Definition at line 582 of file game_state.h.

Referenced by addFighters(), CARDGAME_updateScene(), changeCard(), changeItem(), checkPartner(), checkPartyStat(), chooseFieldMenuOption(), CNTY_SEL_tickMenu(), createParty(), drawEntryPanel(), drawFrame(), editParty(), FIELDSTG_closeField(), FIELDSTG_createActor(), FIELDSTG_createActorIcon(), FIELDSTG_createLaunch(), FIELDSTG_keepsFileCache(), FIELDSTG_pickStage(), FIELDSTG_playBattleTransition(), FIELDSTG_requestInnNames(), FIELDSTG_runActorAction(), FIELDSTG_scrollCamera(), FIELDSTG_showAreaName(), FIELDSTG_startEncounter(), FIELDSTG_updateRoot(), FIGHTSTG_computeStats(), FIGHTSTG_createSwitchInMenu(), FIGHTSTG_drawHud(), FIGHTSTG_getGaugeGain(), FIGHTSTG_getPairDigimon(), FIGHTSTG_getTechCost(), FIGHTSTG_raiseAllStatus(), FIGHTSTG_raiseEachStatus(), FIGHTSTG_raiseOneStatus(), FIGHTSTG_setConfusedName(), FIGHTSTG_setMessageName(), FIGHTSTG_showDigivolveNames(), FIGHTSTG_showFighterNames(), FIGHTSTG_showFightersMessage(), FIGHTSTG_showSwitchFighters(), FIGHTSTG_updateDigivolveMenu(), FIGHTSTG_updatePartnerInfo(), FIGHTSTG_updateRoot(), FIGHTSTG_updateTechMenu(), fillGauge(), getFieldZone(), giveDigimonExp(), giveMoney(), giveNextSkill(), healParty(), initNewGameData(), learnNextDigimon(), listSlotTechs(), listSwitchInDigimon(), loadModeOverlay(), loadSlotScreen(), main(), markNextSkillKnown(), moveTransitionTile(), openFieldMenu(), pickMember(), pickPartner(), putPickedEntry(), raisePartnerLevel(), runDigivolveMenu(), setBattleKind(), setUpBattle(), SHOCKTST_updateLoader(), showPartnerPage(), showRecipeTitle(), SOUNDTST_updateScene(), SOUNDTST_updateSoundTest(), STAGSLCT_updateStageSelect(), startField(), STCRDABM_updateAlbum(), STCRDDEK_updateScreen(), STCRDSHP_confirmBuyCard(), STCRDSHP_createShop(), STCRDSHP_openPack(), STCRDSHP_updateShop(), STDGNAME_drawMenu(), STDGNAME_showMenuWindow(), STDGNAME_stepScreen(), STDGNAME_updateMenu(), STDGNAME_updateScreen(), STDWTITL_leaveTitle(), STDWTITL_tickMovie(), STDWTITL_tickScreen(), STDWTITL_tickSplash(), stepFieldMenuFade(), STFGTREP_addDigimonExp(), STFGTREP_addExp(), STFGTREP_addSkill(), STFGTREP_boostExp(), STFGTREP_drawPartner(), STFGTREP_fillPartnerWindows(), STFGTREP_getDigimonExp(), STFGTREP_learnDigimon(), STFGTREP_learnSkill(), STFGTREP_raiseStats(), STFGTREP_runPartner(), STFGTREP_updatePartner(), STFGTREP_updateReport(), STGDGLAB_drawEntryList(), STGDGLAB_drawMenu(), STGDGLAB_drawPartyScreen(), STGDGLAB_runMenu(), STGDGLAB_runSlotScreen(), STGDGLAB_showEntryList(), STGDGLAB_showEntryPanel(), STGDGLAB_showMenuPage(), STGDGLAB_showPartyPage(), STGDGLAB_showSlotScreen(), STGDGLAB_updateEntryList(), STGDGLAB_updateEntryPanel(), STGDGLAB_updateLab(), STGDGLAB_updatePartyScreen(), STGDGLAB_updateRecipeScreen(), STGDGLAB_updateSkillPanel(), STGMCARD_createScreen(), STGMCARD_fillSave(), STGMCARD_updateScreen(), STGTRAIN_answerToTrain(), STGTRAIN_createResult(), STGTRAIN_createScreen(), STGTRAIN_drawScreen(), STGTRAIN_getAccessoryBonus(), STGTRAIN_lowerStat(), STGTRAIN_pickIntensity(), STGTRAIN_raiseMaxHpMp(), STGTRAIN_raiseResistance(), STGTRAIN_raiseStat(), STGTRAIN_runScreen(), STGTRAIN_showBattleStats(), STGTRAIN_showStatChanges(), STGTRAIN_showTp(), STGTRAIN_showVitals(), STGTRAIN_startBonusTry(), STGTRAIN_takeBonusTry(), STGTRAIN_updateMenu(), STGTRAIN_updateResult(), STGTRAIN_updateScreen(), STITSHOP_chooseEquipPartner(), STITSHOP_compareEquip(), STITSHOP_createShop(), STITSHOP_drawStatsPage(), STITSHOP_endBuyTotal(), STITSHOP_equip(), STITSHOP_fillPartnerRows(), STITSHOP_showEquipMarker(), STITSHOP_showPartnerStats(), STITSHOP_updateInfo(), STITSHOP_updateShop(), STPLNMET_stepScreen(), STPLNMET_updateScreen(), STSTATUS_animateItemPortraits(), STSTATUS_animateSortPortraits(), STSTATUS_animateTechPortraits(), STSTATUS_answerDigivolveQuestion(), STSTATUS_createEquipPanel(), STSTATUS_drawCardScreen(), STSTATUS_drawDemoScreen(), STSTATUS_drawDigivolvePanel(), STSTATUS_drawEquipPanel(), STSTATUS_drawItemScreen(), STSTATUS_drawSortScreen(), STSTATUS_drawStatusScreen(), STSTATUS_drawTechScreen(), STSTATUS_endCardScreen(), STSTATUS_equip(), STSTATUS_getChosenTech(), STSTATUS_getTechHealing(), STSTATUS_listFieldTechs(), STSTATUS_previewStats(), STSTATUS_runDigivolvePanel(), STSTATUS_runStatusChoice(), STSTATUS_showBattleMessage(), STSTATUS_showCardPage(), STSTATUS_showChosenPage(), STSTATUS_showDemoPage(), STSTATUS_showDigivolveChoices(), STSTATUS_showDigivolveSlots(), STSTATUS_showDigivolveStats(), STSTATUS_showEquipment(), STSTATUS_showItemPage(), STSTATUS_showPartnerEquipment(), STSTATUS_showPartnerSlots(), STSTATUS_showPartnerStats(), STSTATUS_showPartnerTech(), STSTATUS_showSlotItem(), STSTATUS_showSortPage(), STSTATUS_showStatusPage(), STSTATUS_showTechCost(), STSTATUS_showTechPage(), STSTATUS_swapMembers(), STSTATUS_updateCardScreen(), STSTATUS_updateDemoScreen(), STSTATUS_updateDigivolvePanel(), STSTATUS_updateItemScreen(), STSTATUS_updateSortScreen(), STSTATUS_updateStatusScreen(), STSTATUS_updateTechScreen(), STSTATUS_useItem(), STSTATUS_useTech(), updateInn(), updateModeFlags(), updateModeTask(), WFIGHTMN_blast(), WFIGHTMN_cancelBlast(), WFIGHTMN_chargeGauge(), WFIGHTMN_checkEquip(), WFIGHTMN_digidevolve(), WFIGHTMN_endAutoRecover(), WFIGHTMN_endBattle(), WFIGHTMN_initFighters(), WFIGHTMN_markFought(), WFIGHTMN_markPicked(), WFIGHTMN_rollAmbush(), and WFIGHTMN_tag().


The documentation for this struct was generated from the following file: