Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
helpers.c File Reference

The helpers the screens call through STSTATUS_data and STSTATUS_areaFuncs: the towns, the item lists, equipping, the area; and the last object's data, which all the objects read. More...

#include "menus/field_menu.h"
Include dependency graph for helpers.c:

Go to the source code of this file.

Functions

s32 * STSTATUS_getTowns (s32 list, s32 index)
 The towns the map shows (a list up to 0), by STSTATUS_getGameHalf and GAME.progress (STSTATUS_townLists)
 
s32 STSTATUS_listItems (s32 list, s16 *out)
 Puts the owned items of a list in OUT and returns how many: below 5 the item lists of ITEM_FUNCS, 5 the equipment of STSTATUS_equipKinds, 6 and 7 the items of kinds 4 and 5 (STSTATUS_slotLists)
 
s32 STSTATUS_listEquipItems (s16 *out)
 The items whose kind (WeaponData.kind) is one of STSTATUS_equipKinds's four.
 
s32 STSTATUS_listItemsOfKind (s32 kind, s16 *out)
 The items of one kind (WeaponData.kind)
 
s32 STSTATUS_canEquip (s32 partner, s32 slot, s32 item)
 Whether a partner can put an item in an equipment slot (-1: none): its partners has a bit per partner; kind 1 can't go in slot 3, nor 2 in slot 2.
 
void STSTATUS_equip (s32 partner, s32 slot, s32 item)
 Puts an item in a partner's equipment slot (0 or less: empties it), moving the counts between GAME.items and GAME.equippedItems.
 
s32 STSTATUS_getGameHalf (void)
 1 on the field maps of the second half of the game (0x270 on), 0 on those of the first, -1 past them (0x2D7 on)
 
s32 STSTATUS_getArea (void)
 The map's area of the current field map (STSTATUS_mapAreas)
 
void STSTATUS_getVisitedAreas (s32 *out)
 Sets OUT[area] to 1 for the map's areas of this half of the game that have a field map whose flag (0x2000 + the map's low byte) is set.
 

Variables

s32 STSTATUS_cursorFrames []
 The map cursor's frames.
 
Task *(* STSTATUS_screens [2][7])(FieldMenuScreen *menu, s32 extra)
 The field menu's screens, by FIELD_MENU_CHOICE.
 
PartnerAnim STSTATUS_partnerAnims []
 The partners' portrait animations.
 
WindowPos STSTATUS_layout []
 Where the screens' windows go, and their strings.
 
StatusMapSpot STSTATUS_spots []
 The map's areas (STSTATUS_mapAreas), from 1.
 
StatusMapPoint STSTATUS_towns []
 Where the map's towns are, from 1.
 
s32 STSTATUS_townList0 []
 The towns the map shows at each stage of the game, up to 0.
 
s32 STSTATUS_townList1 []
 
s32 STSTATUS_townList2 []
 
s32 STSTATUS_townList3 []
 
s32 STSTATUS_noTowns = 0
 
s32 * STSTATUS_townLists [][5]
 The towns the map shows, by STSTATUS_getGameHalf and GAME.progress.
 
StatusData STSTATUS_data
 
u8 STSTATUS_equipKinds []
 The item kinds (WeaponData.kind) of item list 5.
 
u8 STSTATUS_mapAreas []
 The map's area of each field map, by GAME.fieldMode's low byte (bit 7 marks the late game's maps, 0x70 on; 0xFF: none)
 
StatusAreaFuncs STSTATUS_areaFuncs
 Where the game is.
 

Detailed Description

The helpers the screens call through STSTATUS_data and STSTATUS_areaFuncs: the towns, the item lists, equipping, the area; and the last object's data, which all the objects read.

Definition in file helpers.c.

Function Documentation

◆ STSTATUS_getTowns()

s32 * STSTATUS_getTowns ( s32  list,
s32  index 
)

The towns the map shows (a list up to 0), by STSTATUS_getGameHalf and GAME.progress (STSTATUS_townLists)

helpers.c

Definition at line 9 of file helpers.c.

◆ STSTATUS_listItems()

s32 STSTATUS_listItems ( s32  list,
s16 *  out 
)

Puts the owned items of a list in OUT and returns how many: below 5 the item lists of ITEM_FUNCS, 5 the equipment of STSTATUS_equipKinds, 6 and 7 the items of kinds 4 and 5 (STSTATUS_slotLists)

Definition at line 16 of file helpers.c.

Here is the call graph for this function:

◆ STSTATUS_listEquipItems()

s32 STSTATUS_listEquipItems ( s16 *  out)

The items whose kind (WeaponData.kind) is one of STSTATUS_equipKinds's four.

Definition at line 32 of file helpers.c.

Referenced by STSTATUS_listItems().

Here is the caller graph for this function:

◆ STSTATUS_listItemsOfKind()

s32 STSTATUS_listItemsOfKind ( s32  kind,
s16 *  out 
)

The items of one kind (WeaponData.kind)

Definition at line 61 of file helpers.c.

Referenced by STSTATUS_listItems().

Here is the caller graph for this function:

◆ STSTATUS_canEquip()

s32 STSTATUS_canEquip ( s32  partner,
s32  slot,
s32  item 
)

Whether a partner can put an item in an equipment slot (-1: none): its partners has a bit per partner; kind 1 can't go in slot 3, nor 2 in slot 2.

Definition at line 83 of file helpers.c.

◆ STSTATUS_equip()

void STSTATUS_equip ( s32  partner,
s32  slot,
s32  item 
)

Puts an item in a partner's equipment slot (0 or less: empties it), moving the counts between GAME.items and GAME.equippedItems.

Kind 7 takes slots 2 and 3; kind 8 replaces one in slots 4 and 5 with the same group

< takes slots 2 and 3

< takes slots 2 and 3

< one of its group at a time

< takes slots 2 and 3

Definition at line 107 of file helpers.c.

◆ STSTATUS_getGameHalf()

s32 STSTATUS_getGameHalf ( void  )

1 on the field maps of the second half of the game (0x270 on), 0 on those of the first, -1 past them (0x2D7 on)

Definition at line 172 of file helpers.c.

Referenced by STSTATUS_getVisitedAreas().

Here is the caller graph for this function:

◆ STSTATUS_getArea()

s32 STSTATUS_getArea ( void  )

The map's area of the current field map (STSTATUS_mapAreas)

Definition at line 180 of file helpers.c.

◆ STSTATUS_getVisitedAreas()

void STSTATUS_getVisitedAreas ( s32 *  out)

Sets OUT[area] to 1 for the map's areas of this half of the game that have a field map whose flag (0x2000 + the map's low byte) is set.

Definition at line 186 of file helpers.c.

Here is the call graph for this function:

Variable Documentation

◆ STSTATUS_cursorFrames

s32 STSTATUS_cursorFrames[]
Initial value:
= {
0, 1, 2, 1,
}

The map cursor's frames.

the map cursor's frames

Definition at line 210 of file helpers.c.

Referenced by STSTATUS_drawMapScreen().

◆ STSTATUS_screens

Task *(* STSTATUS_screens[2][7])(FieldMenuScreen *menu, s32 extra) ( FieldMenuScreen *  menu,
s32  extra 
)
Initial value:
= {
}
Task * STSTATUS_createCardScreen(FieldMenuScreen *menu, s32 extra)
Creates the screen with the party's pages (task) whose two options go to the card album (MODE_CARD_AL...
Task * STSTATUS_createDemoScreen(FieldMenuScreen *menu, s32 extra)
Creates the second screen with the party's pages (task), whose two options set GAME....
Task * STSTATUS_createItemScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's first screen (task), the items.
Task * STSTATUS_createMapScreen(FieldMenuScreen *menu, s32 extra)
Creates the map screen (task): the map of the first half of the game or, in the late game,...
Definition map_screen.c:322
Task * STSTATUS_createSortScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's party order screen (task), where two members swap places.
Task * STSTATUS_createStatusScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's fifth screen (task), the party's stats, slots and equipment.
Task * STSTATUS_createTechScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's technique screen (task)

The field menu's screens, by FIELD_MENU_CHOICE.

Definition at line 215 of file helpers.c.

Referenced by STSTATUS_runScreens().

◆ STSTATUS_partnerAnims

PartnerAnim STSTATUS_partnerAnims[]
Initial value:
= {
{ { 7, 8, 9, 10, 9, 8, -1 } },
{ { 14, 15, 16, 15, -1, -1, -1 } },
{ { 11, 12, 13, 12, -1, -1, -1 } },
{ { 3, 4, 5, 6, 5, 4, -1 } },
{ { 25, 26, 27, 28, 27, 26, -1 } },
{ { 0, 1, 2, 1, -1, -1, -1 } },
{ { 17, 18, 19, 20, 19, 18, -1 } },
{ { 21, 22, 23, 24, 23, 22, -1 } },
}

The partners' portrait animations.

Definition at line 220 of file helpers.c.

◆ STSTATUS_layout

WindowPos STSTATUS_layout[]
Initial value:
= {
{ 12, 55, 0, 19 },
{ 1, 16, 0, 28 },
{ 2, 16, 0, 37 },
{ 4, 61, 0, 37 },
{ 3, 16, 0, 46 },
{ 4, 61, 0, 46 },
{ 13, 44, 0, 28 },
{ 14, 59, 0, 37 },
{ 14, 94, 0, 37 },
{ 14, 59, 0, 46 },
{ 14, 94, 0, 46 },
{ 14, 152, 0, 19 },
{ 14, 20, 0, 198 },
{ 3, 265, 0, 212 },
{ 14, 300, 0, 212 },
{ 22, 189, 0, 49 },
}

Where the screens' windows go, and their strings.

Definition at line 231 of file helpers.c.

◆ STSTATUS_spots

StatusMapSpot STSTATUS_spots[]

The map's areas (STSTATUS_mapAreas), from 1.

Definition at line 250 of file helpers.c.

◆ STSTATUS_towns

StatusMapPoint STSTATUS_towns[]
Initial value:
= {
{ 0, 0 },
{ 171, 65 },
{ 154, 123 },
{ 230, 104 },
{ 182, 174 },
{ 286, 129 },
{ 285, 56 },
{ 316, 133 },
{ 262, 161 },
{ 249, 193 },
{ 253, 251 },
{ 172, 221 },
{ 160, 221 },
{ 21, 242 },
{ 25, 160 },
{ 67, 151 },
{ 30, 106 },
{ 32, 45 },
{ 114, 78 },
{ 55, 34 },
{ 128, 88 },
{ 165, 43 },
{ 198, 36 },
}

Where the map's towns are, from 1.

Definition at line 300 of file helpers.c.

◆ STSTATUS_townList0

s32 STSTATUS_townList0[]
Initial value:
= {
1, 2, 3, 4,
5, 7, 0,
}

The towns the map shows at each stage of the game, up to 0.

the towns the map shows, up to 0

Definition at line 326 of file helpers.c.

◆ STSTATUS_townList1

s32 STSTATUS_townList1[]
Initial value:
= {
1, 2, 3, 4,
5, 7, 8, 9,
10, 11, 12, 0,
}

Definition at line 330 of file helpers.c.

◆ STSTATUS_townList2

s32 STSTATUS_townList2[]
Initial value:
= {
1, 2, 3, 4,
5, 7, 8, 9,
10, 11, 12, 6,
13, 14, 15, 16,
17, 0,
}

Definition at line 335 of file helpers.c.

◆ STSTATUS_townList3

s32 STSTATUS_townList3[]
Initial value:
= {
1, 2, 3, 4,
5, 7, 8, 9,
10, 11, 12, 6,
13, 14, 15, 16,
17, 18, 19, 20,
21, 22, 0,
}

Definition at line 342 of file helpers.c.

◆ STSTATUS_noTowns

s32 STSTATUS_noTowns = 0

Definition at line 350 of file helpers.c.

◆ STSTATUS_townLists

s32* STSTATUS_townLists[][5]
Initial value:
= {
}
s32 STSTATUS_noTowns
Definition helpers.c:350
s32 STSTATUS_townList0[]
The towns the map shows at each stage of the game, up to 0.
Definition helpers.c:326
s32 STSTATUS_townList1[]
Definition helpers.c:330
s32 STSTATUS_townList3[]
Definition helpers.c:342
s32 STSTATUS_townList2[]
Definition helpers.c:335

The towns the map shows, by STSTATUS_getGameHalf and GAME.progress.

Definition at line 352 of file helpers.c.

Referenced by STSTATUS_getTowns().

◆ STSTATUS_data

StatusData STSTATUS_data
Initial value:
= {
{ 0 },
0,
{ 0 },
0,
{
},
}
void STSTATUS_startFade(PanelAnim *fade, s32 fadeIn)
s32 STSTATUS_updateFade(PanelAnim *fade)
s32 STSTATUS_updateLerp(MenuLerp *lerp)
s32 STSTATUS_listItems(s32 list, s16 *out)
Puts the owned items of a list in OUT and returns how many: below 5 the item lists of ITEM_FUNCS,...
Definition helpers.c:16
PartnerAnim STSTATUS_partnerAnims[]
The partners' portrait animations.
Definition helpers.c:220
s32 STSTATUS_canEquip(s32 partner, s32 slot, s32 item)
Whether a partner can put an item in an equipment slot (-1: none): its partners has a bit per partner...
Definition helpers.c:83
s32 * STSTATUS_getTowns(s32 list, s32 index)
The towns the map shows (a list up to 0), by STSTATUS_getGameHalf and GAME.progress (STSTATUS_townLis...
Definition helpers.c:9
StatusMapPoint STSTATUS_towns[]
Where the map's towns are, from 1.
Definition helpers.c:300
StatusMapSpot STSTATUS_spots[]
The map's areas (STSTATUS_mapAreas), from 1.
Definition helpers.c:250
void STSTATUS_equip(s32 partner, s32 slot, s32 item)
Puts an item in a partner's equipment slot (0 or less: empties it), moving the counts between GAME....
Definition helpers.c:107
WindowPos STSTATUS_layout[]
Where the screens' windows go, and their strings.
Definition helpers.c:231
void STSTATUS_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
Starts moving a value from FROM to TO in FRAMES frames, playing SOUND_MENU_OPEN; nothing when they ar...
Definition menu.c:173
void STSTATUS_loadFiles(void)
Loads the menu's textures and requests its strings: the menu's, the items', the Digimon's and the ski...
Definition menu.c:130
s32 STSTATUS_filesLoading(void)
Whether the menu's strings are still loading.
Definition menu.c:146

Definition at line 356 of file helpers.c.

Referenced by STSTATUS_animateItemPortraits(), STSTATUS_animateSortPortraits(), STSTATUS_animateTechPortraits(), STSTATUS_chooseEquipItem(), STSTATUS_chooseEquipSlot(), STSTATUS_chooseItemMember(), STSTATUS_chooseSecondToSwap(), STSTATUS_chooseTech(), STSTATUS_closeBattleMessage(), STSTATUS_closeCardScreen(), STSTATUS_closeCardScreenAlone(), STSTATUS_closeDemoScreen(), STSTATUS_closeDemoScreenAlone(), STSTATUS_closeDigivolvePanel(), STSTATUS_closeDigivolveQuestion(), STSTATUS_closeEntryTechs(), STSTATUS_closeEquipList(), STSTATUS_closeEquipPanel(), STSTATUS_closeEquipSlots(), STSTATUS_closeEquipTitle(), STSTATUS_closeFirstOfThreeItemPages(), STSTATUS_closeFirstOfTwoItemPages(), STSTATUS_closeFirstSortPage(), STSTATUS_closeFirstStatusPage(), STSTATUS_closeFirstTechPage(), STSTATUS_closeItemScreen(), STSTATUS_closeItemScreenAlone(), STSTATUS_closeItemScreenForList(), STSTATUS_closeItemTitle(), STSTATUS_closeMemberPages(), STSTATUS_closePartnerTech(), STSTATUS_closeQuestionForBattle(), STSTATUS_closeQuestionForTechs(), STSTATUS_closeSecondMemberPage(), STSTATUS_closeSecondOfThreeCardPages(), STSTATUS_closeSecondOfThreeDemoPages(), STSTATUS_closeSecondOfThreeItemPages(), STSTATUS_closeSecondOfThreeSortPages(), STSTATUS_closeSecondOfThreeStatusPages(), STSTATUS_closeSecondOfThreeTechPages(), STSTATUS_closeSecondOfTwoCardPages(), STSTATUS_closeSecondOfTwoDemoPages(), STSTATUS_closeSecondOfTwoItemPages(), STSTATUS_closeSecondOfTwoSortPages(), STSTATUS_closeSecondOfTwoStatusPages(), STSTATUS_closeSecondOfTwoTechPages(), STSTATUS_closeSlotItem(), STSTATUS_closeSlotsForPartnerTech(), STSTATUS_closeSlotsForQuestion(), STSTATUS_closeSortScreen(), STSTATUS_closeSortScreenAlone(), STSTATUS_closeStatusScreen(), STSTATUS_closeStatusScreenAlone(), STSTATUS_closeTechList(), STSTATUS_closeTechScreen(), STSTATUS_closeTechScreenAlone(), STSTATUS_closeThirdCardPage(), STSTATUS_closeThirdDemoPage(), STSTATUS_closeThirdItemPage(), STSTATUS_closeThirdMemberPage(), STSTATUS_closeThirdSortPage(), STSTATUS_closeThirdStatusPage(), STSTATUS_closeThirdTechPage(), STSTATUS_closeUsedItem(), STSTATUS_confirmItemUsed(), STSTATUS_createCardWindows(), STSTATUS_createDemoWindows(), STSTATUS_createDigivolveWindows(), STSTATUS_createItemWindows(), STSTATUS_createSortWindows(), STSTATUS_createStatusWindows(), STSTATUS_createTechWindows(), STSTATUS_drawCardScreen(), STSTATUS_drawDemoScreen(), STSTATUS_drawItemScreen(), STSTATUS_drawMapScreen(), STSTATUS_drawSortScreen(), STSTATUS_drawStatusScreen(), STSTATUS_drawTechScreen(), STSTATUS_endBattleMessage(), STSTATUS_endDigivolvePanel(), STSTATUS_enterDigivolveQuestion(), STSTATUS_enterEquipList(), STSTATUS_enterQuestionAgain(), STSTATUS_enterSlotsAgain(), STSTATUS_enterTechList(), STSTATUS_fadeItemInfo(), STSTATUS_itemInfoFaded(), STSTATUS_listEquipItems(), STSTATUS_listItemsOfKind(), STSTATUS_openBattleMessage(), STSTATUS_openCardScreenAlone(), STSTATUS_openDemoScreenAlone(), STSTATUS_openDigivolveQuestion(), STSTATUS_openDigivolveSlots(), STSTATUS_openDigivolveStats(), STSTATUS_openDigivolveTitle(), STSTATUS_openEntryTechs(), STSTATUS_openEquipList(), STSTATUS_openEquipSlots(), STSTATUS_openEquipTitle(), STSTATUS_openFirstMemberPage(), STSTATUS_openFirstOfThreeCardPages(), STSTATUS_openFirstOfThreeDemoPages(), STSTATUS_openFirstOfThreeItemPages(), STSTATUS_openFirstOfThreeStatusPages(), STSTATUS_openFirstOfThreeTechPages(), STSTATUS_openFirstOfTwoCardPages(), STSTATUS_openFirstOfTwoDemoPages(), STSTATUS_openFirstOfTwoItemPages(), STSTATUS_openFirstOfTwoStatusPages(), STSTATUS_openFirstOfTwoTechPages(), STSTATUS_openFirstSortPage(), STSTATUS_openItemList(), STSTATUS_openItemScreenAlone(), STSTATUS_openPartnerTech(), STSTATUS_openSecondMemberPage(), STSTATUS_openSecondOfThreeCardPages(), STSTATUS_openSecondOfThreeDemoPages(), STSTATUS_openSecondOfThreeItemPages(), STSTATUS_openSecondOfThreeStatusPages(), STSTATUS_openSecondOfThreeTechPages(), STSTATUS_openSecondOfTwoCardPages(), STSTATUS_openSecondOfTwoDemoPages(), STSTATUS_openSecondOfTwoItemPages(), STSTATUS_openSecondOfTwoStatusPages(), STSTATUS_openSecondOfTwoTechPages(), STSTATUS_openSecondSortPage(), STSTATUS_openSlotItem(), STSTATUS_openStatusScreenAlone(), STSTATUS_openTechList(), STSTATUS_openTechScreenAlone(), STSTATUS_openThirdCardPage(), STSTATUS_openThirdDemoPage(), STSTATUS_openThirdItemPage(), STSTATUS_openThirdMemberPage(), STSTATUS_openThirdSortPage(), STSTATUS_openThirdStatusPage(), STSTATUS_openThirdTechPage(), STSTATUS_reopenDigivolveQuestion(), STSTATUS_reopenDigivolveSlots(), STSTATUS_reopenItemList(), STSTATUS_reopenItemOptions(), STSTATUS_reopenSlotsAfterTech(), STSTATUS_runCardScreen(), STSTATUS_runDemoScreen(), STSTATUS_runDigivolvePanel(), STSTATUS_runEquipPanel(), STSTATUS_runItemList(), STSTATUS_runItemScreen(), STSTATUS_runStatusChoice(), STSTATUS_scrollUpForBattle(), STSTATUS_scrollUpForPartnerTech(), STSTATUS_scrollUpForTechs(), STSTATUS_showBattleMessage(), STSTATUS_showCardPage(), STSTATUS_showChosenPage(), STSTATUS_showDemoPage(), STSTATUS_showEquipList(), STSTATUS_showItemLists(), STSTATUS_showItemPage(), STSTATUS_showMapArea(), STSTATUS_showPartnerTech(), STSTATUS_showSortPage(), STSTATUS_showStatusPage(), STSTATUS_showSwappedPages(), STSTATUS_showTechPage(), STSTATUS_startCardScreen(), STSTATUS_startDemoScreen(), STSTATUS_startItemScreen(), STSTATUS_startStatusScreen(), STSTATUS_startTechScreen(), STSTATUS_swapMembers(), STSTATUS_updateCardScreen(), STSTATUS_updateDemoScreen(), STSTATUS_updateMapScreen(), STSTATUS_updateMenu(), STSTATUS_updateSortScreen(), STSTATUS_updateStatusScreen(), and STSTATUS_updateTechScreen().

◆ STSTATUS_equipKinds

u8 STSTATUS_equipKinds[]
Initial value:
= {
1 , 2 ,
3 , 7 ,
}

The item kinds (WeaponData.kind) of item list 5.

the item kinds of item list 5

Definition at line 371 of file helpers.c.

Referenced by STSTATUS_listEquipItems().

◆ STSTATUS_mapAreas

u8 STSTATUS_mapAreas[]

The map's area of each field map, by GAME.fieldMode's low byte (bit 7 marks the late game's maps, 0x70 on; 0xFF: none)

the map's area of each field map

Definition at line 377 of file helpers.c.

Referenced by STSTATUS_getArea(), and STSTATUS_getVisitedAreas().

◆ STSTATUS_areaFuncs

StatusAreaFuncs STSTATUS_areaFuncs
Initial value:
= {
}
void STSTATUS_getVisitedAreas(s32 *out)
Sets OUT[area] to 1 for the map's areas of this half of the game that have a field map whose flag (0x...
Definition helpers.c:186
s32 STSTATUS_getArea(void)
The map's area of the current field map (STSTATUS_mapAreas)
Definition helpers.c:180
s32 STSTATUS_getGameHalf(void)
1 on the field maps of the second half of the game (0x270 on), 0 on those of the first,...
Definition helpers.c:172

Where the game is.

Definition at line 410 of file helpers.c.

Referenced by STSTATUS_createMapScreen(), STSTATUS_createMenu(), and STSTATUS_updateMapScreen().