From f3f147cc3d92dcfd2a8f9332833245db421266ba Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:25:20 -0400 Subject: `z_draw` OK and Documented (#900) * Import data for z_draw * Match z_draw * cleanup * rupees * Some object gi docs * More documents * Add explanation on function names * more cleanup * Fixed some things * More docs * Object docs WIP, still not done. I'll continue tomorrow * More WIP, should just be mask gi objects left now * Some masks done, many more to go * cleanup * Last masks finish * Shield Stolen * cleanup * Apply various dicussions * remove casts * PR Suggestions * Sync PowderKeg --- src/code/z_parameter.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/code/z_parameter.c') diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index a76cb36e0..0d6c4380d 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -595,7 +595,7 @@ u8 Item_Give(PlayState* play, u8 item) { SET_QUEST_ITEM(item - ITEM_REMAINS_ODOLWA + QUEST_REMAINS_ODOWLA); return ITEM_NONE; - } else if (item == ITEM_HEART) { + } else if (item == ITEM_RECOVERY_HEART) { Health_ChangeBy(play, 0x10); return item; @@ -655,7 +655,7 @@ u8 Item_Give(PlayState* play, u8 item) { } else if (((item >= ITEM_POTION_RED) && (item <= ITEM_OBABA_DRINK)) || (item == ITEM_CHATEAU_2) || (item == ITEM_MILK) || (item == ITEM_GOLD_DUST_2) || (item == ITEM_HYLIAN_LOACH_2) || - (item == ITEM_SEA_HORSE_CAUGHT)) { + (item == ITEM_SEAHORSE_CAUGHT)) { slot = SLOT(item); if ((item != ITEM_MILK_BOTTLE) && (item != ITEM_MILK_HALF)) { @@ -671,8 +671,8 @@ u8 Item_Give(PlayState* play, u8 item) { } else if (item == ITEM_HYLIAN_LOACH_2) { item = ITEM_HYLIAN_LOACH; - } else if (item == ITEM_SEA_HORSE_CAUGHT) { - item = ITEM_SEA_HORSE; + } else if (item == ITEM_SEAHORSE_CAUGHT) { + item = ITEM_SEAHORSE; } slot = SLOT(item); @@ -712,7 +712,7 @@ u8 Item_Give(PlayState* play, u8 item) { } else if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_MASK_GIANT)) { temp = INV_CONTENT(item); INV_CONTENT(item) = item; - if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_PENDANT_MEMORIES) && (temp != ITEM_NONE)) { + if ((item >= ITEM_MOON_TEAR) && (item <= ITEM_PENDANT_OF_MEMORIES) && (temp != ITEM_NONE)) { for (i = EQUIP_SLOT_C_LEFT; i <= EQUIP_SLOT_C_RIGHT; i++) { if (temp == GET_CUR_FORM_BTN_ITEM(i)) { SET_CUR_FORM_BTN_ITEM(i, item); @@ -816,8 +816,8 @@ u8 Item_CheckObtainabilityImpl(u8 item) { } else if (item == ITEM_HEART_CONTAINER) { return ITEM_NONE; - } else if (item == ITEM_HEART) { - return ITEM_HEART; + } else if (item == ITEM_RECOVERY_HEART) { + return ITEM_RECOVERY_HEART; } else if ((item == ITEM_MAGIC_SMALL) || (item == ITEM_MAGIC_LARGE)) { if (!(gSaveContext.save.weekEventReg[12] & 0x80)) { @@ -843,7 +843,7 @@ u8 Item_CheckObtainabilityImpl(u8 item) { } else if (((item >= ITEM_POTION_RED) && (item <= ITEM_OBABA_DRINK)) || (item == ITEM_CHATEAU_2) || (item == ITEM_MILK) || (item == ITEM_GOLD_DUST_2) || (item == ITEM_HYLIAN_LOACH_2) || - (item == ITEM_SEA_HORSE_CAUGHT)) { + (item == ITEM_SEAHORSE_CAUGHT)) { bottleSlot = SLOT(item); if ((item != ITEM_MILK_BOTTLE) && (item != ITEM_MILK_HALF)) { @@ -859,8 +859,8 @@ u8 Item_CheckObtainabilityImpl(u8 item) { } else if (item == ITEM_HYLIAN_LOACH_2) { item = ITEM_HYLIAN_LOACH; - } else if (item == ITEM_SEA_HORSE_CAUGHT) { - item = ITEM_SEA_HORSE; + } else if (item == ITEM_SEAHORSE_CAUGHT) { + item = ITEM_SEAHORSE; } bottleSlot = SLOT(item); -- cgit v1.2.3 From 6fc12c3a707cd3bb73660dbcbaa515ede8e86547 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:44:49 -0400 Subject: Inventory Editor Ok and Documented (z_kaleido_debug.c) (#954) * Match Debug Menu * Many docs and discussions * Missed one * A bit more * More PR Suggestions * phrasing * hex health * Fix --- src/code/z_parameter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/code/z_parameter.c') diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 0d6c4380d..b63af9038 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2,7 +2,7 @@ #include "interface/parameter_static/parameter_static.h" #include "interface/do_action_static/do_action_static.h" #include "misc/story_static/story_static.h" -#include "overlays/gamestates/ovl_file_choose/z_file_choose.h" +#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" typedef struct { /* 0x00 */ u8 scene; @@ -330,9 +330,9 @@ u8 Item_Give(PlayState* play, u8 item) { return ITEM_NONE; } else if ((item == ITEM_HEART_PIECE_2) || (item == ITEM_HEART_PIECE)) { - gSaveContext.save.inventory.questItems += (1 << QUEST_HEART_PIECE_COUNT); - if ((gSaveContext.save.inventory.questItems & 0xF0000000) == (4 << QUEST_HEART_PIECE_COUNT)) { - gSaveContext.save.inventory.questItems ^= (4 << QUEST_HEART_PIECE_COUNT); + INCREMENT_QUEST_HEART_PIECE_COUNT; + if (EQ_MAX_QUEST_HEART_PIECE_COUNT) { + RESET_HEART_PIECE_COUNT; gSaveContext.save.playerData.healthCapacity += 0x10; gSaveContext.save.playerData.health += 0x10; } @@ -989,7 +989,7 @@ void Inventory_UpdateBottleItem(PlayState* play, u8 item, u8 btn) { Interface_LoadItemIconImpl(play, btn); - play->pauseCtx.cursorItem[PAUSE_0] = item; + play->pauseCtx.cursorItem[PAUSE_ITEM] = item; gSaveContext.buttonStatus[btn] = BTN_ENABLED; if (item == ITEM_HOT_SPRING_WATER) { -- cgit v1.2.3