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

The shop's helpers: a shop's stock, and who can equip an item, in which slot. More...

#include "menus/item_shop.h"
Include dependency graph for equip.c:

Go to the source code of this file.

Functions

s16 * STITSHOP_getShopItems (s32 shop)
 The items a shop sells (up to 0), noting how many in STITSHOP_funcs.count; NULL for none.
 
s32 STITSHOP_canEquip (s32 partner, s32 item)
 1 when a partner can equip an item: the partner's bit in its partners
 
s32 STITSHOP_compareEquip (s32 partner, s32 item)
 Which equipment slot a bought item would go in: 2 or 3 for the weapons (the one with the weaker item when both are taken), 4 or 5 for the accessories (the one with the same group, else the weaker one); -1 when it can't.
 
void STITSHOP_equip (s32 partner, s32 slot, s32 item, s32 fromBag)
 Puts an item in a partner's equipment slot like STSTATUS_equip, moving the counts between GAME.items and GAME.equippedItems only when fromBag is set.
 

Detailed Description

The shop's helpers: a shop's stock, and who can equip an item, in which slot.

Definition in file equip.c.

Function Documentation

◆ STITSHOP_getShopItems()

s16 * STITSHOP_getShopItems ( s32  shop)

The items a shop sells (up to 0), noting how many in STITSHOP_funcs.count; NULL for none.

equip.c

Definition at line 7 of file equip.c.

◆ STITSHOP_canEquip()

s32 STITSHOP_canEquip ( s32  partner,
s32  item 
)

1 when a partner can equip an item: the partner's bit in its partners

Definition at line 16 of file equip.c.

◆ STITSHOP_compareEquip()

s32 STITSHOP_compareEquip ( s32  partner,
s32  item 
)

Which equipment slot a bought item would go in: 2 or 3 for the weapons (the one with the weaker item when both are taken), 4 or 5 for the accessories (the one with the same group, else the weaker one); -1 when it can't.

< takes slots 2 and 3

< takes slots 2 and 3

< one of its group at a time

< one of its group at a time

< one of its group at a time

Definition at line 23 of file equip.c.

◆ STITSHOP_equip()

void STITSHOP_equip ( s32  partner,
s32  slot,
s32  item,
s32  fromBag 
)

Puts an item in a partner's equipment slot like STSTATUS_equip, moving the counts between GAME.items and GAME.equippedItems only when fromBag is set.

< 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 115 of file equip.c.