summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2021-06-15 05:45:19 -0700
committerGitHub <noreply@github.com>2021-06-15 08:45:19 -0400
commit74e418f24f70626761b7a466b150dcea06febea5 (patch)
treeeeaf285fcf630e19a0bcbd4e87705226b8ce3d2b /src/code
parentc203b9b60678046fff0ffee3bc06e148ec35b216 (diff)
ovl_En_GirlA OK and documented (#182)
* EnGirlA Matches * Convert func to boolean * Cleanup * missed a little cleanup * Update with new MACRO * revert z_en_item00.c macro, and add one more macro * Documented * Format macros.h * Fix VTX format * rename isBought to isOutOfStock * PR suggestions * Document a bug * PR comments
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_en_item00.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c
index 5e496d7ac..bffd14ba2 100644
--- a/src/code/z_en_item00.c
+++ b/src/code/z_en_item00.c
@@ -816,16 +816,14 @@ s16 func_800A7650(s16 dropId) {
s16 healthCapacity;
if ((((dropId == ITEM00_BOMBS_A) || (dropId == ITEM00_BOMBS_0) || (dropId == ITEM00_BOMBS_B)) &&
- (gSaveContext.inventory.items[gItemSlots[6]] == 0xFF)) ||
+ (INV_CONTENT(ITEM_BOMB) == ITEM_NONE)) ||
(((dropId == ITEM00_ARROWS_10) || (dropId == ITEM00_ARROWS_30) || (dropId == ITEM00_ARROWS_40) ||
(dropId == ITEM00_ARROWS_50)) &&
- (gSaveContext.inventory.items[gItemSlots[1]] == 0xFF)) ||
+ (INV_CONTENT(ITEM_BOW) == ITEM_NONE)) ||
(((dropId == ITEM00_MAGIC_LARGE) || (dropId == ITEM00_MAGIC_SMALL)) && (gSaveContext.magicLevel == 0))) {
return ITEM00_NO_DROP;
}
- ;
-
if (dropId == ITEM00_HEART) {
healthCapacity = gSaveContext.healthCapacity;
if (healthCapacity == gSaveContext.health) {
@@ -1125,11 +1123,11 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
params = 0xD0;
dropId = ITEM00_MAGIC_LARGE;
dropQuantity = 1;
- } else if (gSaveContext.inventory.ammo[gItemSlots[1]] < 6) {
+ } else if (AMMO(ITEM_BOW) < 6) {
params = 0xA0;
dropId = ITEM00_ARROWS_30;
dropQuantity = 1;
- } else if (gSaveContext.inventory.ammo[gItemSlots[6]] < 6) {
+ } else if (AMMO(ITEM_BOMB) < 6) {
params = 0xB0;
dropId = ITEM00_BOMBS_A;
dropQuantity = 1;