From f37246887048de386c95540349e9a96fed458f37 Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Sun, 5 Oct 2025 05:13:32 -0400 Subject: [PATCH 1/2] Enable -Wall and "fix" warnings --- ASM/Makefile | 5 +- ASM/c/actor.c | 11 -- ASM/c/bombchu_bowling.c | 49 +++--- ASM/c/debug.c | 20 ++- ASM/c/debug.h | 6 - ASM/c/door_of_time.c | 2 + ASM/c/dungeon_info.c | 38 ++--- ASM/c/dungeon_info.h | 2 - ASM/c/en_wonderitem.c | 16 +- ASM/c/file_icons.c | 11 +- ASM/c/file_message.c | 6 - ASM/c/file_select.c | 2 +- ASM/c/get_items.c | 21 ++- ASM/c/gfx.c | 2 +- ASM/c/gfx.h | 2 +- ASM/c/inputviewer.c | 4 +- ASM/c/item_draw_table.c | 326 ++++++++++++++++++++-------------------- ASM/c/item_upgrades.c | 5 +- ASM/c/kaleido_item.c | 9 +- ASM/c/model_text.c | 1 - ASM/c/models.c | 2 - ASM/c/music.c | 1 - ASM/c/obj_comb.c | 2 +- ASM/c/obj_kibako.c | 4 +- ASM/c/obj_kibako2.c | 4 +- ASM/c/pots.c | 8 +- ASM/c/scene.c | 2 - ASM/c/text.c | 2 +- ASM/c/trade_quests.c | 44 +++--- 29 files changed, 285 insertions(+), 322 deletions(-) diff --git a/ASM/Makefile b/ASM/Makefile index a83e78dbd3..41d57f1e64 100644 --- a/ASM/Makefile +++ b/ASM/Makefile @@ -4,8 +4,9 @@ LD = $(MIPS_BINUTILS_PREFIX)ld OBJDUMP = $(MIPS_BINUTILS_PREFIX)objdump OBJCOPY = $(MIPS_BINUTILS_PREFIX)objcopy -CFLAGS = -O1 -G0 -fno-reorder-blocks -march=vr4300 -mtune=vr4300 -mabi=32 -mno-gpopt -mdivide-breaks \ - -mexplicit-relocs +CFLAGS = -O1 -G0 -fno-reorder-blocks \ + -march=vr4300 -mtune=vr4300 -mabi=32 -mno-gpopt -mdivide-breaks -mexplicit-relocs \ + -Wall CPPFLAGS = -DF3DEX_GBI_2 OUTDIR := build diff --git a/ASM/c/actor.c b/ASM/c/actor.c index b35657c098..37c4c2d45c 100644 --- a/ASM/c/actor.c +++ b/ASM/c/actor.c @@ -150,7 +150,6 @@ void Actor_StoreChestType(z64_actor_t* actor, z64_game_t* game) { if (POTCRATE_TEXTURES_MATCH_CONTENTS == PTMC_UNCHECKED && override.key.all > 0) { // For "unchecked" PTMC setting: Check if we have an override which means it wasn't collected. *pChestType = GILDED_CHEST; } else if (POTCRATE_TEXTURES_MATCH_CONTENTS == PTMC_CONTENTS) { - uint16_t item_id = resolve_upgrades(override); item_row_t* row = get_item_row(override.value.looks_like_item_id); if (row == NULL) { row = get_item_row(override.value.base.item_id); @@ -246,16 +245,6 @@ extern z64_actor_t* Actor_Spawn_Continue(void* actorCtx, z64_game_t* globalCtx, z64_actor_t* Actor_Spawn_Hook(void* actorCtx, z64_game_t* globalCtx, int16_t actorId, float posX, float posY, float posZ, int16_t rotX, int16_t rotY, int16_t rotZ, int16_t params) { bool continue_spawn = true; - ActorEntry entry; - entry.id = actorId; - entry.params = params; - entry.pos.x = (int16_t)posX; - entry.pos.y = (int16_t)posY; - entry.pos.z = (int16_t)posZ; - entry.rot.x = rotX; - entry.rot.y = rotY; - entry.rot.z = rotZ; - if (continue_spawn) { z64_actor_t* spawned = Actor_Spawn_Continue(actorCtx, globalCtx, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); if (spawned) { diff --git a/ASM/c/bombchu_bowling.c b/ASM/c/bombchu_bowling.c index fb0d1cecf0..83df8f79e8 100644 --- a/ASM/c/bombchu_bowling.c +++ b/ASM/c/bombchu_bowling.c @@ -17,7 +17,7 @@ uint32_t EXTRA_BOWLING_SHUFFLE = 0; */ int16_t select_bombchu_bowling_prize(int16_t prizeSelect) { - int16_t prizeTemp; + int16_t prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; uint32_t prizeFlag = (1 << prizeSelect); @@ -43,43 +43,36 @@ int16_t select_bombchu_bowling_prize(int16_t prizeSelect) { case 3: // Prevent giving the player a bomb if a bomb bag has not // been found yet. - if (!EXTRA_BOWLING_SHUFFLE && !z64_file.bomb_bag) { - prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; - } else { + if (EXTRA_BOWLING_SHUFFLE || z64_file.bomb_bag) { prizeTemp = EXITEM_BOMBS_BOWLING; } break; case 4: + default: // Kept here in case this is shuffled in the future, // currently functionally redundant when the flag is set. prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; break; } - } else { - // maintain renewable bombchus/bombs if extra shuffle is disabled - if (!EXTRA_BOWLING_SHUFFLE) { - switch(prizeSelect) { - case 2: - if (z64_file.items[Z64_SLOT_BOMBCHU] == ITEM_NONE && FREE_BOMBCHU_DROPS) { - prizeTemp = z64_file.bomb_bag ? EXITEM_BOMBS_BOWLING : EXITEM_PURPLE_RUPEE_BOWLING; - } else { - prizeTemp = EXITEM_BOMBCHUS_BOWLING; - } - break; - case 3: - if (!z64_file.bomb_bag) { - prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; - } else { - prizeTemp = EXITEM_BOMBS_BOWLING; - } - break; - default: - prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; - break; - } - } else { - prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING; + // maintain renewable bombchus/bombs if extra shuffle is disabled + } else if (!EXTRA_BOWLING_SHUFFLE) { + switch(prizeSelect) { + case 2: + if (z64_file.items[Z64_SLOT_BOMBCHU] == ITEM_NONE && FREE_BOMBCHU_DROPS) { + prizeTemp = z64_file.bomb_bag ? EXITEM_BOMBS_BOWLING : EXITEM_PURPLE_RUPEE_BOWLING; + } else { + prizeTemp = EXITEM_BOMBCHUS_BOWLING; + } + break; + case 3: + if (z64_file.bomb_bag) { + prizeTemp = EXITEM_BOMBS_BOWLING; + } + break; + default: + break; } + } return prizeTemp; diff --git a/ASM/c/debug.c b/ASM/c/debug.c index 26165b1b83..28bf254f67 100644 --- a/ASM/c/debug.c +++ b/ASM/c/debug.c @@ -252,6 +252,12 @@ menu_category_t flag_categories[] = { { 5, "Collectible"}, }; +static uint8_t debugNumberIsInUsage[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static int32_t debugNumbers[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static float debugNumbersFloat[10] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +static menu_index_t current_menu_indexes = {0, 0, 0, 0, 0, 0, 0, 0}; +static uint8_t show_warp_menu = 0; + void draw_debug_int(int whichNumber, int numberToShow) { if (whichNumber < 0 || whichNumber > 9) { return; @@ -289,7 +295,7 @@ void draw_timeofday(z64_disp_buf_t* db) { digits[3] -= 10; } int16_t hours = digits[0] * 10 + digits[1]; - colorRGBA8_t color = { 0xFF, 0xFF, 0xFF, 0xFF}; + colorRGBA8_t color = { {{0xFF, 0xFF, 0xFF}}, 0xFF}; int total_w = 4 * rupee_digit_sprite.tile_w + font_sprite.tile_w; int draw_x = Z64_SCREEN_WIDTH / 2 - total_w / 2; int draw_y_text = Z64_SCREEN_HEIGHT - (rupee_digit_sprite.tile_h * 1.5) + 1; @@ -323,6 +329,7 @@ bool get_flag(uint8_t flagtype, uint8_t flag) { case 4: return Flags_GetTempClear(&z64_game, flag); case 5: + default: return Flags_GetCollectible(&z64_game, flag); } } @@ -602,7 +609,7 @@ void draw_debug_menu(z64_disp_buf_t* db) { break; case 8: // Overlay if (current_menu_indexes.sub_menu_index == 1) { - uint8_t nbOverlays, currentOverlayTabIndex = 0; + uint8_t nbOverlays = 0; for (int overlay_id = 0; overlay_id < 0x0192; overlay_id++) { ActorOverlay overlay = gActorOverlayTable[overlay_id]; if (overlay.loadedRamAddr) { @@ -898,7 +905,7 @@ void draw_debug_menu(z64_disp_buf_t* db) { break; case 7: // Actor table gDPSetPrimColor(db->p++, 0, 0, 255, 255, 255, 255); - colorRGBA8_t color = { 0xFF, 0xFF, 0xFF, 0xFF}; + colorRGBA8_t color = { {{0xFF, 0xFF, 0xFF}}, 0xFF}; if (current_menu_indexes.sub_menu_index == 1) { for (int i = 0; i < ACTORTYPE_CHEST + 1; i++) { menu_category_t* d = &(actor_categories[i]); @@ -950,7 +957,8 @@ void draw_debug_menu(z64_disp_buf_t* db) { if (current_menu_indexes.sub_menu_index == 1) { uint8_t currentOverlayTab = current_menu_indexes.overlay_index / 12; // Display overlay list in 12 by 12 pages. - uint8_t nbOverlays, currentOverlayTabIndex = 0; + uint8_t nbOverlays = 0; + uint8_t currentOverlayTabIndex = 0; for (int overlay_id = 0; overlay_id < 0x0192; overlay_id++) { ActorOverlay overlay = gActorOverlayTable[overlay_id]; if (overlay.loadedRamAddr) { @@ -1048,7 +1056,7 @@ void draw_debug_numbers(z64_disp_buf_t* db) { if (z64_file.energy_capacity > 10 * 0x10) height += rupee_digit_sprite.tile_h * 0.8; - colorRGBA8_t color = { debug_text_color.r, debug_text_color.g, debug_text_color.b, 0xFF}; + colorRGBA8_t color = { {{debug_text_color.r, debug_text_color.g, debug_text_color.b}}, 0xFF}; draw_int(db, numberToShow, debug_text_x_placement, height + offsetY, color); } @@ -1083,7 +1091,7 @@ void draw_debug_numbers(z64_disp_buf_t* db) { if (z64_file.energy_capacity > 10 * 0x10) height += rupee_digit_sprite.tile_h * 0.8; - colorRGBA8_t color = { debug_text_color.r, debug_text_color.g, debug_text_color.b, 0xFF}; + colorRGBA8_t color = { {{debug_text_color.r, debug_text_color.g, debug_text_color.b}}, 0xFF}; int numberDigit = draw_int(db, entireValue, debug_text_x_placement, height + offsetY, color); text_print_size(db, ".", debug_text_x_placement + numberDigit * rupee_digit_sprite.tile_w, height + offsetY, rupee_digit_sprite.tile_w, rupee_digit_sprite.tile_h); draw_int(db, decimalValue, debug_text_x_placement + numberDigit * rupee_digit_sprite.tile_w + font_sprite.tile_w, diff --git a/ASM/c/debug.h b/ASM/c/debug.h index bc74372dde..ac9fe5b57f 100644 --- a/ASM/c/debug.h +++ b/ASM/c/debug.h @@ -80,12 +80,6 @@ typedef enum DEBUG_NUMBER_FLOAT, } debug_number_type; -static uint8_t debugNumberIsInUsage[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -static int32_t debugNumbers[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -static float debugNumbersFloat[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; -static menu_index_t current_menu_indexes = {0, 0, 0, 0, 0, 0, 0, 0}; -static uint8_t show_warp_menu = 0; - typedef void(*usebutton_t)(z64_game_t *game, z64_link_t *link, uint8_t item, uint8_t button); #define z64_usebutton ((usebutton_t) 0x8038C9A0) diff --git a/ASM/c/door_of_time.c b/ASM/c/door_of_time.c index cf02d77ca8..501e9cfc71 100644 --- a/ASM/c/door_of_time.c +++ b/ASM/c/door_of_time.c @@ -12,6 +12,7 @@ int32_t DemoKankyo_CutsceneFlags_Get_Hook(void* play, int16_t flag) { case 2: // oot_sot case 4: // stones_sot case 5: // stones_oot_sot + default: return has_items_for_door_of_time() && CutsceneFlags_Get(play, flag); } } @@ -27,6 +28,7 @@ bool has_items_for_door_of_time() { case 4: // stones_sot return (z64_file.quest_items & 0x1C0000) == 0x1C0000; case 5: // stones_oot_sot + default: return (z64_file.quest_items & 0x1C0000) == 0x1C0000 && z64_file.items[Z64_SLOT_OCARINA] == 0x08; } } diff --git a/ASM/c/dungeon_info.c b/ASM/c/dungeon_info.c index d1088a8754..a7e104b4c4 100644 --- a/ASM/c/dungeon_info.c +++ b/ASM/c/dungeon_info.c @@ -10,23 +10,25 @@ int dungeon_count = 13; +static int show_dungeon_info = 0; + dungeon_entry_t dungeons[] = { - { 0, 0, 0, 0, 1, 0x0F, "Deku", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - { 1, 0, 0, 0, 1, 0x1F, "Dodongo", {-1, -1, -1, -1}, { 0, -1, -1, -1} }, - { 2, 0, 0, 0, 1, 0x0F, "Jabu", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - - { 3, 1, 1, 0, 1, 0x1F, "Forest", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - { 4, 1, 1, 0, 1, 0x1F, "Fire", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - { 5, 1, 1, 0, 1, 0x1F, "Water", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - { 7, 1, 1, 0, 1, 0x1F, "Shadow", { 4, 6, 7, -1}, { 4, 5, 6, 7} }, - { 6, 1, 1, 0, 1, 0x1F, "Spirit", {11, 14, 12, -1}, {13, 15, -1, -1} }, - - { 8, 1, 0, 0, 1, 0x07, "BotW", { 3, -1, -1, -1}, {-1, -1, -1, -1} }, - { 9, 0, 0, 0, 1, 0x07, "Ice", { 1, 2, -1, -1}, {-1, -1, -1, -1} }, - { 12, 1, 0, 1, 0, 0x00, "Hideout", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, - { 11, 1, 0, 0, 0, 0x00, "GTG", { 8, 9, 10, -1}, { 8, 9, 10, -1} }, - { 13, 1, 1, 0, 0, 0x00, "Ganon", {16, 17, 18, 21}, {18, 19, 20, -1} }, - { 16, 1, 0, 0, 0, 0x00, "Chest Game",{-1, -1, -1, -1}, {-1, -1, -1, -1 }}, + { 0, {0, 0, 0, 1}, 0x0F, "Deku", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + { 1, {0, 0, 0, 1}, 0x1F, "Dodongo", {-1, -1, -1, -1}, { 0, -1, -1, -1} }, + { 2, {0, 0, 0, 1}, 0x0F, "Jabu", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + + { 3, {1, 1, 0, 1}, 0x1F, "Forest", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + { 4, {1, 1, 0, 1}, 0x1F, "Fire", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + { 5, {1, 1, 0, 1}, 0x1F, "Water", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + { 7, {1, 1, 0, 1}, 0x1F, "Shadow", { 4, 6, 7, -1}, { 4, 5, 6, 7} }, + { 6, {1, 1, 0, 1}, 0x1F, "Spirit", {11, 14, 12, -1}, {13, 15, -1, -1} }, + + { 8, {1, 0, 0, 1}, 0x07, "BotW", { 3, -1, -1, -1}, {-1, -1, -1, -1} }, + { 9, {0, 0, 0, 1}, 0x07, "Ice", { 1, 2, -1, -1}, {-1, -1, -1, -1} }, + { 12, {1, 0, 1, 0}, 0x00, "Hideout", {-1, -1, -1, -1}, {-1, -1, -1, -1} }, + { 11, {1, 0, 0, 0}, 0x00, "GTG", { 8, 9, 10, -1}, { 8, 9, 10, -1} }, + { 13, {1, 1, 0, 0}, 0x00, "Ganon", {16, 17, 18, 21}, {18, 19, 20, -1} }, + { 16, {1, 0, 0, 0}, 0x00, "Chest Game",{-1, -1, -1, -1}, {-1, -1, -1, -1 }}, }; typedef struct { @@ -125,7 +127,7 @@ void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t* db) { gDPPipeSync(db->p++); // Draw the count white if we have less than the required amount - colorRGBA8_t color = { 0xFF, 0xFF, 0xFF, globalCtx->hud_alpha_channels.rupees_keys_magic}; + colorRGBA8_t color = { {{0xFF, 0xFF, 0xFF}}, globalCtx->hud_alpha_channels.rupees_keys_magic}; // Draw the count green (same color as max rupees) if we have the required amount if (count >= silver_rupee_info.needed_count) { @@ -260,7 +262,7 @@ void draw_dungeon_info(z64_disp_buf_t* db) { reward_index = 5; } else if (reward == 4) { reward_index = 4; - } else if (reward == 5) { + } else /*if (reward == 5)*/ { reward_index = 0; } medal_t* c = &(medals[reward_index]); diff --git a/ASM/c/dungeon_info.h b/ASM/c/dungeon_info.h index 2287e14a8d..29edf8fd20 100644 --- a/ASM/c/dungeon_info.h +++ b/ASM/c/dungeon_info.h @@ -31,8 +31,6 @@ extern unsigned char CFG_DUNGEON_IS_MQ[14]; extern uint32_t CFG_DUNGEON_INFO_ENABLE; extern uint8_t CFG_DPAD_DUNGEON_INFO_ENABLE; -static int show_dungeon_info = 0; - #define CAN_DRAW_DUNGEON_INFO (CFG_DUNGEON_INFO_ENABLE != 0 && \ z64_game.pause_ctxt.state == PAUSE_STATE_MAIN && \ z64_game.pause_ctxt.screen_idx == 0 && \ diff --git a/ASM/c/en_wonderitem.c b/ASM/c/en_wonderitem.c index aee783e489..6823e68ebe 100644 --- a/ASM/c/en_wonderitem.c +++ b/ASM/c/en_wonderitem.c @@ -5,21 +5,17 @@ #include "actor.h" #include "scene.h" -static colorRGBA8_t sEffectPrimColorRed = { 255, 0, 0, 0 }; -static colorRGBA8_t sEffectPrimColorGreen = { 0, 255, 0, 0 }; -static colorRGBA8_t sEffectPrimColorBlue = { 0, 0, 255, 0 }; -static colorRGBA8_t sEffectPrimColorYellow = { 255, 255, 0, 0 }; -static colorRGBA8_t sEffectPrimColoMagenta = { 255, 0, 255, 0 }; -static colorRGBA8_t sEffectPrimColorCyan = {0, 255, 255, 0 }; -static colorRGBA8_t sEffectEnvColor = { 255, 255, 255, 0 }; -//static z64_xyzf_t sEffectVelocity = { 0.0f, 0.1f, 0.0f }; -//static z64_xyzf_t sEffectAccel = { 0.0f, 0.01f, 0.0f }; +static colorRGBA8_t sEffectPrimColorRed = { {{255, 0, 0}}, 0 }; +static colorRGBA8_t sEffectPrimColorBlue = { {{0, 0, 255}}, 0 }; +static colorRGBA8_t sEffectPrimColorYellow = { {{255, 255, 0}}, 0 }; +static colorRGBA8_t sEffectPrimColorCyan = {{{0, 255, 255}}, 0 }; +static colorRGBA8_t sEffectEnvColor = { {{255, 255, 255}}, 0 }; static z64_xyzf_t sEffectVelocity = { 0.0f, 0.5f, 0.0f }; static z64_xyzf_t sEffectAccel = { 0.0f, 0.5f, 0.0f }; extern uint16_t CURR_ACTOR_SPAWN_INDEX; -void EnWonderitem_AfterInitHack(z64_actor_t* this, z64_game_t* globalCtx) { +void EnWonderitem_AfterInitHack(z64_actor_t* this, [[maybe_unused]] z64_game_t* globalCtx) { if (this->main_proc == NULL) return; if (this->actor_id != 0x112) return; diff --git a/ASM/c/file_icons.c b/ASM/c/file_icons.c index a03182c051..9a3bc86c53 100644 --- a/ASM/c/file_icons.c +++ b/ASM/c/file_icons.c @@ -37,8 +37,8 @@ static int get_top(tile_position pos) { } -static const colorRGBA8_t WHITE = {0xFF, 0xFF, 0xFF, 0xFF}; -static const colorRGBA8_t DIM = {0x40, 0x40, 0x40, 0x90}; +static const colorRGBA8_t WHITE = {{{0xFF, 0xFF, 0xFF}}, 0xFF}; +static const colorRGBA8_t DIM = {{{0x40, 0x40, 0x40}}, 0x90}; static int hasTriforceGoalBeenReached = 0; // Approximate product of two colors. Result is within 1 of true product. @@ -482,7 +482,6 @@ static void draw_fixed(z64_disp_buf_t* db, const fixed_tile_info_t* info, uint8_ uint32_t word = info->bits[i]; for (int j = 0; j < FIXED_BITS_PER_WORD; ++j) { if (data->size > 0 && (word & 0x1) == enabled) { - sprite_t* sprite = icon_sprites[data->sprite]; draw_square_sprite(db, icon_sprites[data->sprite], data->tile_index, data->pos, data->size); } word >>= 1; @@ -509,7 +508,6 @@ static void draw_variable(z64_disp_buf_t* db, const variable_tile_info_t* info, const variable_tile_data_t* data = variable_tile_positions; while (data != variable_tile_positions + NUM_VARIABLE) { if (tile->enabled == enabled) { - sprite_t* sprite = icon_sprites[data->sprite]; draw_square_sprite(db, icon_sprites[data->sprite], tile->tile_index, data->pos, ICON_SIZE); } ++tile; @@ -531,7 +529,7 @@ static void draw_songs(z64_disp_buf_t* db, const music_tile_info_t* songs, uint8 uint8_t bright_alpha = color_product(WHITE.a, alpha); uint8_t dim_alpha = color_product(DIM.a, alpha); - colorRGBA8_t last_color = {0x00, 0x00, 0x00, 0x00}; + colorRGBA8_t last_color = {{{0x00, 0x00, 0x00}}, 0x00}; while (data != song_note_data + NUM_SONGS) { colorRGBA8_t color; color.color = data->color; @@ -564,7 +562,7 @@ static void draw_buttons(z64_disp_buf_t* db, const button_tile_info_t* buttons, uint8_t bright_alpha = color_product(WHITE.a, alpha); uint8_t dim_alpha = color_product(DIM.a, alpha); - colorRGBA8_t last_color = {0x00, 0x00, 0x00, 0x00}; + colorRGBA8_t last_color = {{{0x00, 0x00, 0x00}}, 0x00}; uint8_t button_index = 0; while (data != button_note_data + NUM_BUTTONS) { colorRGBA8_t color; @@ -861,7 +859,6 @@ static void populate_child_trade(const z64_file_t* file, variable_tile_t* tile) uint8_t item_child = file->items[Z64_SLOT_CHILD_TRADE]; uint16_t mask_bits = (file->item_get_inf[2] >> 3) & 0x8F; uint16_t itemdata3 = file->item_get_inf[3]; - uint16_t infdata7 = file->inf_table[7]; if (itemdata3 & 0x8000 || mask_bits > 0x0F) { tile->tile_index = Z64_ITEM_MASK_OF_TRUTH; tile->enabled = 1; diff --git a/ASM/c/file_message.c b/ASM/c/file_message.c index 14c5c2a4de..57b0134cd2 100644 --- a/ASM/c/file_message.c +++ b/ASM/c/file_message.c @@ -15,12 +15,6 @@ extern uint8_t PLANDOMIZER_USED; #define TEXT_WIDTH 8 #define TEXT_HEIGHT 9 -static int string_length(const char* txt) { - const char* pos = txt; - while (*pos) ++pos; - return pos - txt; -} - static uint8_t get_alpha(const z64_menudata_t* menu_data) { uint8_t alt_tr = (uint8_t)menu_data->alt_transition; if (0x20 <= alt_tr && alt_tr <= 0x27) { diff --git a/ASM/c/file_select.c b/ASM/c/file_select.c index 95613f79ae..e2511ff50e 100644 --- a/ASM/c/file_select.c +++ b/ASM/c/file_select.c @@ -114,7 +114,7 @@ void manage_password(z64_disp_buf_t* db, z64_menudata_t* menu_data) { gDPPipeSync(db->p++); if (cooldown > 0) { - colorRGBA8_t color = {0xFF, 0xFF, 0xFF, 0xFF}; + colorRGBA8_t color = {{{0xFF, 0xFF, 0xFF}}, 0xFF}; draw_int_size(db, 1 + cooldown / 60, left - 2 * padding, top, color, 6, 12); } gDPPipeSync(db->p++); diff --git a/ASM/c/get_items.c b/ASM/c/get_items.c index a095297e90..0120a5d039 100644 --- a/ASM/c/get_items.c +++ b/ASM/c/get_items.c @@ -91,6 +91,7 @@ override_key_t get_override_search_key_by_newflag(xflag_t* flag) { }; return resolve_alternative_override(key); } + return (override_key_t){ 0 }; } override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_t item_id) { @@ -149,14 +150,13 @@ override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_ .pad = 0, .flag = item_id, }; - } else { - return (override_key_t) { - .scene = scene, - .type = OVR_BASE_ITEM, - .pad = 0, - .flag = item_id, - }; } + return (override_key_t) { + .scene = scene, + .type = OVR_BASE_ITEM, + .pad = 0, + .flag = item_id, + }; } override_t lookup_override_by_key(override_key_t key) { @@ -452,7 +452,7 @@ void get_item(z64_actor_t* from_actor, z64_link_t* link, int8_t incoming_item_id override_t override = { 0 }; int incoming_negative = incoming_item_id < 0; int8_t item_id = 0; - item_row_t* row; + item_row_t* row = NULL; if (from_actor && incoming_item_id != 0) { item_id = incoming_negative ? -incoming_item_id : incoming_item_id; @@ -796,6 +796,8 @@ bool Item00_KillActorIfFlagIsSet(z64_actor_t* actor) { z64_ActorKill(actor); return 1; } + + return 1; } // Check ammo counts for bombs/chus and drop correspondingly. @@ -993,14 +995,11 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t* link, z64_actor_t* from_ void get_skulltula_token(z64_actor_t* token_actor) { override_t override = lookup_override(token_actor, 0, 0); - uint16_t item_id; uint8_t player; if (override.key.all == 0) { // Give a skulltula token if there is no override - item_id = GI_SKULL_TOKEN; player = PLAYER_ID; } else { - item_id = override.value.base.item_id; player = override.value.base.player; } diff --git a/ASM/c/gfx.c b/ASM/c/gfx.c index c4edca01bf..1711c2b3ae 100644 --- a/ASM/c/gfx.c +++ b/ASM/c/gfx.c @@ -266,7 +266,7 @@ void close_rando_display_buffer() { #endif if (((int) rando_overlay_db.p - (int) rando_overlay_db.buf) > rando_overlay_db.size) { - sprintf(error_msg, "size = %x\nmax = %x\np = %p\nbuf = %p\nd = %p", ((int) rando_overlay_db.p - (int) rando_overlay_db.buf), + sprintf(error_msg, "size = %x\nmax = %lx\np = %p\nbuf = %p\nd = %p", ((int) rando_overlay_db.p - (int) rando_overlay_db.buf), rando_overlay_db.size, rando_overlay_db.p, rando_overlay_db.buf, rando_overlay_db.d); Fault_AddHungupAndCrashImpl("Randomizer display buffer exceeded!", error_msg); } diff --git a/ASM/c/gfx.h b/ASM/c/gfx.h index 3273d1afa9..40cbee5c02 100644 --- a/ASM/c/gfx.h +++ b/ASM/c/gfx.h @@ -20,7 +20,7 @@ extern z64_disp_buf_t debug_db; #define OPEN_DISPS(gfxCtx) \ { \ z64_gfx_t* __gfxCtx = gfxCtx; \ - int32_t __dispPad + [[maybe_unused]] int32_t __dispPad #define CLOSE_DISPS(gfxCtx) \ (void)0; \ diff --git a/ASM/c/inputviewer.c b/ASM/c/inputviewer.c index ec656343dc..c054d916c8 100644 --- a/ASM/c/inputviewer.c +++ b/ASM/c/inputviewer.c @@ -10,12 +10,12 @@ const int16_t left_alignment = Z64_SCREEN_WIDTH / 12; const int16_t top_alignment = 11 * Z64_SCREEN_HEIGHT / 12 + 2; void draw_x_stick(z64_disp_buf_t* db) { - colorRGBA8_t color = {0xF4, 0xEC, 0x30, 0xFF}; + colorRGBA8_t color = {{{0xF4, 0xEC, 0x30}}, 0xFF}; draw_int_size(db, z64_game.common.input[0].raw.x, left_alignment, top_alignment, color, input_number_width, input_number_height); } void draw_y_stick(z64_disp_buf_t* db) { - colorRGBA8_t color = {0xF4, 0xEC, 0x30, 0xFF}; + colorRGBA8_t color = {{{0xF4, 0xEC, 0x30}}, 0xFF}; int8_t xy_stick_length = 3 * rupee_digit_sprite.tile_w + font_sprite.tile_w; draw_int_size(db, z64_game.common.input[0].raw.y, left_alignment + xy_stick_length, top_alignment, color, input_number_width, input_number_height); } diff --git a/ASM/c/item_draw_table.c b/ASM/c/item_draw_table.c index a650dba8fa..4d23e8f844 100644 --- a/ASM/c/item_draw_table.c +++ b/ASM/c/item_draw_table.c @@ -13,172 +13,172 @@ // because a lot of indexes for this table are still hardcoded throughout the game and rando code. item_draw_table_entry_t item_draw_table[] = { - [0x00] = { draw_gi_various_opa0_xlu1, { 0x06000670, 0x06000750 } }, // Empty Bottle - [0x01] = { draw_gi_small_keys, { 0x06000800, 0xFFFFFFFF, 0x3C505AFF } }, // Small Key - [0x02] = { draw_gi_song_notes, { 0x06000AE0, 0x00C800FF, 0 } }, // Music Note (Green) - [0x03] = { draw_gi_song_notes, { 0x06000AE0, 0xFF3200FF, 0 } }, // Music Note (Red) - [0x04] = { draw_gi_song_notes, { 0x06000AE0, 0x0096FFFF, 0 } }, // Music Note (Blue) - [0x05] = { draw_gi_song_notes, { 0x06000AE0, 0xFF9600FF, 0 } }, // Music Note (Orange) - [0x06] = { draw_gi_song_notes, { 0x06000AE0, 0xC832FFFF, 0 } }, // Music Note (Purple) - [0x07] = { draw_gi_song_notes, { 0x06000AE0, 0xC8FF00FF, 0 } }, // Music Note (Yellow) - [0x08] = { draw_gi_recovery_heart, { 0x060000E0 } }, // Recovery Heart - [0x09] = { draw_gi_boss_keys, { 0x06000CA0, 0x06000F08, 0xFFAAFFFF, 0xFF0064FF, 0xFFFFFFFF, 0x8C7800FF, 0x6E7467FF, 0x262724FF } }, // Boss Key - [0x0A] = { draw_gi_compass, { 0x06000960, 0x06000C50 } }, // Compass - [0x0B] = { draw_gi_eggs_and_medallions, { 0x06000CB0, 0x06000E18 } }, // Forest Medallion - [0x0C] = { draw_gi_eggs_and_medallions, { 0x06001AF0, 0x06000E18 } }, // Fire Medallion - [0x0D] = { draw_gi_eggs_and_medallions, { 0x06002830, 0x06000E18 } }, // Water Medallion - [0x0E] = { draw_gi_eggs_and_medallions, { 0x06003610, 0x06000E18 } }, // Spirit Medallion - [0x0F] = { draw_gi_eggs_and_medallions, { 0x06004330, 0x06000E18 } }, // Shadow Medallion - [0x10] = { draw_gi_eggs_and_medallions, { 0x06005220, 0x06000E18 } }, // Light Medallion - [0x11] = { draw_gi_deku_nut, { 0x06000E90 } }, // Deku Nut - [0x12] = { draw_gi_various_xlu01, { 0x06001290, 0x06001470 } }, // Heart Container - [0x13] = { draw_gi_various_xlu01, { 0x06001290, 0x06001590 } }, // Piece of Heart - [0x14] = { draw_gi_various_opa1023, { 0x06000990, 0x060008D0, 0x06000930, 0x06000A80 } }, // Quiver - [0x15] = { draw_gi_various_opa1023, { 0x06000990, 0x060008F0, 0x06000950, 0x06000A80 } }, // Big Quiver - [0x16] = { draw_gi_various_opa1023, { 0x06000990, 0x06000910, 0x06000970, 0x06000A80 } }, // Biggest Quiver - [0x17] = { draw_gi_various_opa1023, { 0x06000B90, 0x06000AD0, 0x06000B30, 0x06000D98 } }, // Bomb Bag - [0x18] = { draw_gi_various_opa1023, { 0x06000B90, 0x06000AF0, 0x06000B50, 0x06000D98 } }, // Big Bomb Bag - [0x19] = { draw_gi_various_opa1023, { 0x06000B90, 0x06000B10, 0x06000B70, 0x06000D98 } }, // Biggest Bomb Bag - [0x1A] = { draw_gi_various_opa0, { 0x060004D0 } }, // Deku Stick - [0x1B] = { draw_gi_various_opa0, { 0x060003C0 } }, // Map - [0x1C] = { draw_gi_various_opa0, { 0x06000A50 } }, // Deku Shield - [0x1D] = { draw_gi_various_opa0, { 0x06000580, 0xe0d4ffFF, 0xd4ffe2FF } }, // Small Magic Jar - [0x1E] = { draw_gi_various_opa0, { 0x06000EE0, 0xe0d4ffFF, 0xd4ffe2FF } }, // Large Magic Jar - [0x1F] = { draw_gi_various_opa0, { 0x060009A0 } }, // Bomb - [0x20] = { draw_gi_various_opa0, { 0x06000B70 } }, // Stone of Agony - [0x21] = { draw_gi_wallets, { 0x06001850, 0x06001750, 0x06001790, 0x060019A0, 0x060017B0, 0x06001A28, 0x060017D0, 0x06001AD8 } }, // Adult's Wallet - [0x22] = { draw_gi_wallets, { 0x06001850, 0x06001770, 0x060017F0, 0x060019A0, 0x06001810, 0x06001A28, 0x06001830, 0x06001AD8 } }, // Giant's Wallet - [0x23] = { draw_gi_various_opa0, { 0x06000F60 } }, // Gerudo's Card - [0x24] = { draw_gi_various_opa0, { 0x06000340 } }, // Arrow - [0x25] = { draw_gi_various_opa0, { 0x06000B90 } }, // Arrows (2) - [0x26] = { draw_gi_various_opa0, { 0x06001830 } }, // Arrows (3) - [0x27] = { draw_gi_bombchu_and_masks, { 0x060004B0 } }, // Bombchu - [0x28] = { draw_gi_eggs_and_medallions, { 0x06000FD0, 0x06001008 } }, // Weird Egg & Pocket Egg - [0x29] = { draw_gi_scales, { 0x06000AA0, 0x06000A20, 0x06000A60, 0x06000CC8 } }, // Silver Scale - [0x2A] = { draw_gi_scales, { 0x06000AA0, 0x06000A40, 0x06000A80, 0x06000CC8 } }, // Golden Scale - [0x2B] = { draw_gi_various_opa0, { 0x06000C70 } }, // Hylian Shield - [0x2C] = { draw_gi_various_opa0, { 0x06000750 } }, // Hookshot - [0x2D] = { draw_gi_various_opa0, { 0x06001240 } }, // Longshot - [0x2E] = { draw_gi_various_opa0_xlu1, { 0x060008C0, 0x06000AF8 } }, // Ocarina of Time - [0x2F] = { draw_gi_various_opa0_xlu1, { 0x06001060, 0x06001288 } }, // Lon Lon Milk - [0x30] = { draw_gi_various_opa0_xlu1, { 0x06000AC0, 0x06000D50 } }, // Keaton Mask - [0x31] = { draw_gi_various_opa0, { 0x060007E0 } }, // Spooky Mask - [0x32] = { draw_gi_various_opa0, { 0x06000940 } }, // Fairy Slingshot - [0x33] = { draw_gi_various_opa0, { 0x06000A30 } }, // Boomerang - [0x34] = { draw_gi_various_opa0, { 0x06000990 } }, // Fairy Bow - [0x35] = { draw_gi_various_opa0_xlu1, { 0x06000D80, 0x06001010 } }, // Lens of Truth - [0x36] = { draw_gi_potions, { 0x06001438, 0x06001270, 0x060012D0, 0x06001790, 0x06001330, 0x06001848 } }, // Green Potion - [0x37] = { draw_gi_potions, { 0x06001438, 0x06001290, 0x060012F0, 0x06001790, 0x06001388, 0x06001848 } }, // Red Potion - [0x38] = { draw_gi_potions, { 0x06001438, 0x060012B0, 0x06001310, 0x06001790, 0x060013E0, 0x06001848 } }, // Blue Potion - [0x39] = { draw_gi_mirror_shield, { 0x06000FB0, 0x060011C8 } }, // Mirror Shield - [0x3A] = { draw_gi_various_opa0_xlu1, { 0x06000CC0, 0x06000D60 } }, // Zelda's Letter - [0x3B] = { draw_gi_various_opa1023, { 0x06001560, 0x060014E0, 0x06001520, 0x06001608 } }, // Goron Tunic - [0x3C] = { draw_gi_various_opa1023, { 0x06001560, 0x06001500, 0x06001540, 0x06001608 } }, // Zora Tunic - [0x3D] = { draw_gi_various_opa0, { 0x06000580 } }, // Magic Bean - [0x3E] = { draw_gi_fish_bottle, { 0x06000600 } }, // Fish - [0x3F] = { draw_gi_various_opa0, { 0x060007E0 } }, // Poacher's Saw - [0x40] = { draw_gi_various_opa0, { 0x060009D0 } }, // Megaton Hammer - [0x41] = { draw_gi_various_opa0, { 0x060008E0 } }, // Reed Whistle - [0x42] = { draw_gi_goron_swords, { 0x06000600 } }, // Giant's Knife & Biggoron's Sword - [0x43] = { draw_gi_coins_and_cuccos, { 0x06001630, 0x060015F0, 0x06001948 } }, // Chicken & Pocket Cucco - [0x44] = { draw_rutos_letter, { 0x060008E0, 0x06000AE0 } }, // Bottled Ruto's Letter - [0x45] = { draw_gi_various_opa0_xlu1, { 0x060008E0, 0x06000B58 } }, // Fairy Ocarina - [0x46] = { draw_gi_various_opa0_xlu1, { 0x06001630, 0x06001A98 } }, // Iron Boots - [0x47] = { draw_gi_various_opa0, { 0x06000810 } }, // Deku Seeds - [0x48] = { draw_gi_various_opa10_xlu32, { 0x06001540, 0x060014C0, 0x06001860, 0x06001500 } }, // Silver Gauntlets - [0x49] = { draw_gi_various_opa10_xlu32, { 0x06001540, 0x060014E0, 0x06001860, 0x06001520 } }, // Golden Gauntlets - [0x4A] = { draw_gi_coins_and_cuccos, { 0x060005E0, 0x06000560, 0x06000768 } }, // N Coin (Yellow) - [0x4B] = { draw_gi_coins_and_cuccos, { 0x060005E0, 0x06000580, 0x06000768 } }, // N Coin (Red) - [0x4C] = { draw_gi_coins_and_cuccos, { 0x060005E0, 0x060005A0, 0x06000768 } }, // N Coin (Green) - [0x4D] = { draw_gi_coins_and_cuccos, { 0x060005E0, 0x060005C0, 0x06000768 } }, // N Coin (Blue) - [0x4E] = { draw_gi_various_opa0, { 0x060009D0 } }, // Skull Mask - [0x4F] = { draw_gi_various_opa0_xlu1, { 0x06000BC0, 0x06000E58 } }, // Bunny Hood - [0x50] = { draw_gi_various_opa0_xlu1, { 0x060013D0, 0x060016B0 } }, // Mask of Truth - [0x51] = { draw_gi_various_opa0_xlu1, { 0x06000680, 0x06000768 } }, // Eye Drops - [0x52] = { draw_gi_various_opa0, { 0x060008B0 } }, // Odd Potion - [0x53] = { draw_gi_various_opa0, { 0x060009D0 } }, // Odd Mushroom - [0x54] = { draw_gi_various_opa0_xlu1, { 0x06000F00, 0x06001188 } }, // Claim Check - [0x55] = { draw_gi_goron_swords, { 0x060006E0 } }, // Giant's Knife & Biggoron's Sword (Broken) - [0x56] = { draw_gi_various_opa0_xlu1, { 0x060009C0, 0x06000AF0 } }, // Prescription - [0x57] = { draw_gi_various_opa0, { 0x06000960 } }, // Goron's Bracelet - [0x58] = { draw_gi_sold_out, { 0x06000440 } }, // SOLD OUT - [0x59] = { draw_gi_various_opa0_xlu1, { 0x06000D60, 0x06001060 } }, // Eyeball Frog - [0x5A] = { draw_gi_bombchu_and_masks, { 0x060014F8 } }, // Goron Mask - [0x5B] = { draw_gi_bombchu_and_masks, { 0x06001398 } }, // Zora Mask - [0x5C] = { draw_gi_bombchu_and_masks, { 0x060010E8 } }, // Gerudo Mask - [0x5D] = { draw_gi_coins_and_cuccos, { 0x06001630, 0x06001610, 0x06001948 } }, // Cojiro - [0x5E] = { draw_gi_various_opa0, { 0x06001850 } }, // Hover Boots - [0x5F] = { draw_gi_magic_arrows, { 0x06000AE0, 0x06000CA0, 0x06000D00 } }, // Fire Arrow - [0x60] = { draw_gi_magic_arrows, { 0x06000AE0, 0x06000CC0, 0x06000D00 } }, // Ice Arrow - [0x61] = { draw_gi_magic_arrows, { 0x06000AE0, 0x06000CE0, 0x06000D00 } }, // Light Arrow - [0x62] = { draw_gi_gs_token, { 0x06000330, 0x06000438 } }, // Gold Skulltula Token I (commonly used) - [0x63] = { draw_gi_magic_spells, { 0x06000920, 0x060009E0, 0x06000A40 } }, // Din's Fire - [0x64] = { draw_gi_magic_spells, { 0x06000920, 0x06000A00, 0x06000A40 } }, // Farore's Wind - [0x65] = { draw_gi_magic_spells, { 0x06000920, 0x06000A20, 0x06000A40 } }, // Nayru's Love - [0x66] = { draw_gi_blue_fire_candle, { 0x06000C60, 0x06000F08 } }, // Blue Fire - [0x67] = { draw_gi_various_opa0_xlu1, { 0x06000830, 0x06000B20 } }, // Bug - [0x68] = { draw_gi_various_opa0_xlu1, { 0x06000830, 0x06000A70 } }, // Butterfly - [0x69] = { draw_gi_poe_bottles, { 0x06000990, 0x06000BE0, 0x06000CF0, 0x06000950 } }, // Poe - [0x6A] = { draw_gi_fairy_lantern, { 0x06000BD0, 0x06000DB8, 0x06000EF0 } }, // Fairy - [0x6B] = { draw_gi_bullet_bags, { 0x06000B70, 0x06000AF0, 0x06000F48, 0x06000B30, 0x06000FF0 } }, // Bullet Bag (40) - [0x6C] = { draw_gi_small_rupees, { 0x060005E0, 0x060004A0, 0x060006F0, 0x06000540 } }, // Green Rupee - [0x6D] = { draw_gi_small_rupees, { 0x060005E0, 0x060004C0, 0x060006F0, 0x06000560 } }, // Blue Rupee - [0x6E] = { draw_gi_small_rupees, { 0x060005E0, 0x060004E0, 0x060006F0, 0x06000580 } }, // Red Rupee - [0x6F] = { draw_gi_poe_bottles, { 0x06000990, 0x06000BE0, 0x06000CF0, 0x06000970 } }, // Big Poe - [0x70] = { draw_gi_various_opa10_xlu32, { 0x060005E0, 0x06000500, 0x060006F0, 0x060005A0 } }, // Purple Rupee - [0x71] = { draw_gi_various_opa10_xlu32, { 0x060005E0, 0x06000520, 0x060006F0, 0x060005C0 } }, // Huge Rupee - [0x72] = { draw_gi_bullet_bags, { 0x06000B70, 0x06000B10, 0x06000F48, 0x06000B50, 0x06000FF0 } }, // Bullet Bag (50) - [0x73] = { draw_gi_various_opa0, { 0x06000960 } }, // Kokiri Sword - [0x74] = { draw_gi_gs_token, { 0x06004DB0, 0x06004EB8 } }, // Gold Skulltula Token II (only for En_Si) + [0x00] = { draw_gi_various_opa0_xlu1, { {0x06000670}, {0x06000750} } }, // Empty Bottle + [0x01] = { draw_gi_small_keys, { {0x06000800}, {0xFFFFFFFF}, {0x3C505AFF} } }, // Small Key + [0x02] = { draw_gi_song_notes, { {0x06000AE0}, {0x00C800FF}, {0} } }, // Music Note (Green) + [0x03] = { draw_gi_song_notes, { {0x06000AE0}, {0xFF3200FF}, {0} } }, // Music Note (Red) + [0x04] = { draw_gi_song_notes, { {0x06000AE0}, {0x0096FFFF}, {0} } }, // Music Note (Blue) + [0x05] = { draw_gi_song_notes, { {0x06000AE0}, {0xFF9600FF}, {0} } }, // Music Note (Orange) + [0x06] = { draw_gi_song_notes, { {0x06000AE0}, {0xC832FFFF}, {0} } }, // Music Note (Purple) + [0x07] = { draw_gi_song_notes, { {0x06000AE0}, {0xC8FF00FF}, {0} } }, // Music Note (Yellow) + [0x08] = { draw_gi_recovery_heart, { {0x060000E0} } }, // Recovery Heart + [0x09] = { draw_gi_boss_keys, { {0x06000CA0}, {0x06000F08}, {0xFFAAFFFF}, {0xFF0064FF}, {0xFFFFFFFF}, {0x8C7800FF}, {0x6E7467FF}, {0x262724FF} } }, // Boss Key + [0x0A] = { draw_gi_compass, { {0x06000960}, {0x06000C50} } }, // Compass + [0x0B] = { draw_gi_eggs_and_medallions, { {0x06000CB0}, {0x06000E18} } }, // Forest Medallion + [0x0C] = { draw_gi_eggs_and_medallions, { {0x06001AF0}, {0x06000E18} } }, // Fire Medallion + [0x0D] = { draw_gi_eggs_and_medallions, { {0x06002830}, {0x06000E18} } }, // Water Medallion + [0x0E] = { draw_gi_eggs_and_medallions, { {0x06003610}, {0x06000E18} } }, // Spirit Medallion + [0x0F] = { draw_gi_eggs_and_medallions, { {0x06004330}, {0x06000E18} } }, // Shadow Medallion + [0x10] = { draw_gi_eggs_and_medallions, { {0x06005220}, {0x06000E18} } }, // Light Medallion + [0x11] = { draw_gi_deku_nut, { {0x06000E90} } }, // Deku Nut + [0x12] = { draw_gi_various_xlu01, { {0x06001290}, {0x06001470} } }, // Heart Container + [0x13] = { draw_gi_various_xlu01, { {0x06001290}, {0x06001590} } }, // Piece of Heart + [0x14] = { draw_gi_various_opa1023, { {0x06000990}, {0x060008D0}, {0x06000930}, {0x06000A80} } }, // Quiver + [0x15] = { draw_gi_various_opa1023, { {0x06000990}, {0x060008F0}, {0x06000950}, {0x06000A80} } }, // Big Quiver + [0x16] = { draw_gi_various_opa1023, { {0x06000990}, {0x06000910}, {0x06000970}, {0x06000A80} } }, // Biggest Quiver + [0x17] = { draw_gi_various_opa1023, { {0x06000B90}, {0x06000AD0}, {0x06000B30}, {0x06000D98} } }, // Bomb Bag + [0x18] = { draw_gi_various_opa1023, { {0x06000B90}, {0x06000AF0}, {0x06000B50}, {0x06000D98} } }, // Big Bomb Bag + [0x19] = { draw_gi_various_opa1023, { {0x06000B90}, {0x06000B10}, {0x06000B70}, {0x06000D98} } }, // Biggest Bomb Bag + [0x1A] = { draw_gi_various_opa0, { {0x060004D0} } }, // Deku Stick + [0x1B] = { draw_gi_various_opa0, { {0x060003C0} } }, // Map + [0x1C] = { draw_gi_various_opa0, { {0x06000A50} } }, // Deku Shield + [0x1D] = { draw_gi_various_opa0, { {0x06000580}, {0xe0d4ffFF}, {0xd4ffe2FF} } }, // Small Magic Jar + [0x1E] = { draw_gi_various_opa0, { {0x06000EE0}, {0xe0d4ffFF}, {0xd4ffe2FF} } }, // Large Magic Jar + [0x1F] = { draw_gi_various_opa0, { {0x060009A0} } }, // Bomb + [0x20] = { draw_gi_various_opa0, { {0x06000B70} } }, // Stone of Agony + [0x21] = { draw_gi_wallets, { {0x06001850}, {0x06001750}, {0x06001790}, {0x060019A0}, {0x060017B0}, {0x06001A28}, {0x060017D0}, {0x06001AD8} } }, // Adult's Wallet + [0x22] = { draw_gi_wallets, { {0x06001850}, {0x06001770}, {0x060017F0}, {0x060019A0}, {0x06001810}, {0x06001A28}, {0x06001830}, {0x06001AD8} } }, // Giant's Wallet + [0x23] = { draw_gi_various_opa0, { {0x06000F60} } }, // Gerudo's Card + [0x24] = { draw_gi_various_opa0, { {0x06000340} } }, // Arrow + [0x25] = { draw_gi_various_opa0, { {0x06000B90} } }, // Arrows (2) + [0x26] = { draw_gi_various_opa0, { {0x06001830} } }, // Arrows (3) + [0x27] = { draw_gi_bombchu_and_masks, { {0x060004B0} } }, // Bombchu + [0x28] = { draw_gi_eggs_and_medallions, { {0x06000FD0}, {0x06001008} } }, // Weird Egg & Pocket Egg + [0x29] = { draw_gi_scales, { {0x06000AA0}, {0x06000A20}, {0x06000A60}, {0x06000CC8} } }, // Silver Scale + [0x2A] = { draw_gi_scales, { {0x06000AA0}, {0x06000A40}, {0x06000A80}, {0x06000CC8} } }, // Golden Scale + [0x2B] = { draw_gi_various_opa0, { {0x06000C70} } }, // Hylian Shield + [0x2C] = { draw_gi_various_opa0, { {0x06000750} } }, // Hookshot + [0x2D] = { draw_gi_various_opa0, { {0x06001240} } }, // Longshot + [0x2E] = { draw_gi_various_opa0_xlu1, { {0x060008C0}, {0x06000AF8} } }, // Ocarina of Time + [0x2F] = { draw_gi_various_opa0_xlu1, { {0x06001060}, {0x06001288} } }, // Lon Lon Milk + [0x30] = { draw_gi_various_opa0_xlu1, { {0x06000AC0}, {0x06000D50} } }, // Keaton Mask + [0x31] = { draw_gi_various_opa0, { {0x060007E0} } }, // Spooky Mask + [0x32] = { draw_gi_various_opa0, { {0x06000940} } }, // Fairy Slingshot + [0x33] = { draw_gi_various_opa0, { {0x06000A30} } }, // Boomerang + [0x34] = { draw_gi_various_opa0, { {0x06000990} } }, // Fairy Bow + [0x35] = { draw_gi_various_opa0_xlu1, { {0x06000D80}, {0x06001010} } }, // Lens of Truth + [0x36] = { draw_gi_potions, { {0x06001438}, {0x06001270}, {0x060012D0}, {0x06001790}, {0x06001330}, {0x06001848} } }, // Green Potion + [0x37] = { draw_gi_potions, { {0x06001438}, {0x06001290}, {0x060012F0}, {0x06001790}, {0x06001388}, {0x06001848} } }, // Red Potion + [0x38] = { draw_gi_potions, { {0x06001438}, {0x060012B0}, {0x06001310}, {0x06001790}, {0x060013E0}, {0x06001848} } }, // Blue Potion + [0x39] = { draw_gi_mirror_shield, { {0x06000FB0}, {0x060011C8} } }, // Mirror Shield + [0x3A] = { draw_gi_various_opa0_xlu1, { {0x06000CC0}, {0x06000D60} } }, // Zelda's Letter + [0x3B] = { draw_gi_various_opa1023, { {0x06001560}, {0x060014E0}, {0x06001520}, {0x06001608} } }, // Goron Tunic + [0x3C] = { draw_gi_various_opa1023, { {0x06001560}, {0x06001500}, {0x06001540}, {0x06001608} } }, // Zora Tunic + [0x3D] = { draw_gi_various_opa0, { {0x06000580} } }, // Magic Bean + [0x3E] = { draw_gi_fish_bottle, { {0x06000600} } }, // Fish + [0x3F] = { draw_gi_various_opa0, { {0x060007E0} } }, // Poacher's Saw + [0x40] = { draw_gi_various_opa0, { {0x060009D0} } }, // Megaton Hammer + [0x41] = { draw_gi_various_opa0, { {0x060008E0} } }, // Reed Whistle + [0x42] = { draw_gi_goron_swords, { {0x06000600} } }, // Giant's Knife & Biggoron's Sword + [0x43] = { draw_gi_coins_and_cuccos, { {0x06001630}, {0x060015F0}, {0x06001948} } }, // Chicken & Pocket Cucco + [0x44] = { draw_rutos_letter, { {0x060008E0}, {0x06000AE0} } }, // Bottled Ruto's Letter + [0x45] = { draw_gi_various_opa0_xlu1, { {0x060008E0}, {0x06000B58} } }, // Fairy Ocarina + [0x46] = { draw_gi_various_opa0_xlu1, { {0x06001630}, {0x06001A98} } }, // Iron Boots + [0x47] = { draw_gi_various_opa0, { {0x06000810} } }, // Deku Seeds + [0x48] = { draw_gi_various_opa10_xlu32, { {0x06001540}, {0x060014C0}, {0x06001860}, {0x06001500} } }, // Silver Gauntlets + [0x49] = { draw_gi_various_opa10_xlu32, { {0x06001540}, {0x060014E0}, {0x06001860}, {0x06001520} } }, // Golden Gauntlets + [0x4A] = { draw_gi_coins_and_cuccos, { {0x060005E0}, {0x06000560}, {0x06000768} } }, // N Coin (Yellow) + [0x4B] = { draw_gi_coins_and_cuccos, { {0x060005E0}, {0x06000580}, {0x06000768} } }, // N Coin (Red) + [0x4C] = { draw_gi_coins_and_cuccos, { {0x060005E0}, {0x060005A0}, {0x06000768} } }, // N Coin (Green) + [0x4D] = { draw_gi_coins_and_cuccos, { {0x060005E0}, {0x060005C0}, {0x06000768} } }, // N Coin (Blue) + [0x4E] = { draw_gi_various_opa0, { {0x060009D0} } }, // Skull Mask + [0x4F] = { draw_gi_various_opa0_xlu1, { {0x06000BC0}, {0x06000E58} } }, // Bunny Hood + [0x50] = { draw_gi_various_opa0_xlu1, { {0x060013D0}, {0x060016B0} } }, // Mask of Truth + [0x51] = { draw_gi_various_opa0_xlu1, { {0x06000680}, {0x06000768} } }, // Eye Drops + [0x52] = { draw_gi_various_opa0, { {0x060008B0} } }, // Odd Potion + [0x53] = { draw_gi_various_opa0, { {0x060009D0} } }, // Odd Mushroom + [0x54] = { draw_gi_various_opa0_xlu1, { {0x06000F00}, {0x06001188} } }, // Claim Check + [0x55] = { draw_gi_goron_swords, { {0x060006E0} } }, // Giant's Knife & Biggoron's Sword (Broken) + [0x56] = { draw_gi_various_opa0_xlu1, { {0x060009C0}, {0x06000AF0} } }, // Prescription + [0x57] = { draw_gi_various_opa0, { {0x06000960} } }, // Goron's Bracelet + [0x58] = { draw_gi_sold_out, { {0x06000440} } }, // SOLD OUT + [0x59] = { draw_gi_various_opa0_xlu1, { {0x06000D60}, {0x06001060} } }, // Eyeball Frog + [0x5A] = { draw_gi_bombchu_and_masks, { {0x060014F8} } }, // Goron Mask + [0x5B] = { draw_gi_bombchu_and_masks, { {0x06001398} } }, // Zora Mask + [0x5C] = { draw_gi_bombchu_and_masks, { {0x060010E8} } }, // Gerudo Mask + [0x5D] = { draw_gi_coins_and_cuccos, { {0x06001630}, {0x06001610}, {0x06001948} } }, // Cojiro + [0x5E] = { draw_gi_various_opa0, { {0x06001850} } }, // Hover Boots + [0x5F] = { draw_gi_magic_arrows, { {0x06000AE0}, {0x06000CA0}, {0x06000D00} } }, // Fire Arrow + [0x60] = { draw_gi_magic_arrows, { {0x06000AE0}, {0x06000CC0}, {0x06000D00} } }, // Ice Arrow + [0x61] = { draw_gi_magic_arrows, { {0x06000AE0}, {0x06000CE0}, {0x06000D00} } }, // Light Arrow + [0x62] = { draw_gi_gs_token, { {0x06000330}, {0x06000438} } }, // Gold Skulltula Token I (commonly used) + [0x63] = { draw_gi_magic_spells, { {0x06000920}, {0x060009E0}, {0x06000A40} } }, // Din's Fire + [0x64] = { draw_gi_magic_spells, { {0x06000920}, {0x06000A00}, {0x06000A40} } }, // Farore's Wind + [0x65] = { draw_gi_magic_spells, { {0x06000920}, {0x06000A20}, {0x06000A40} } }, // Nayru's Love + [0x66] = { draw_gi_blue_fire_candle, { {0x06000C60}, {0x06000F08} } }, // Blue Fire + [0x67] = { draw_gi_various_opa0_xlu1, { {0x06000830}, {0x06000B20} } }, // Bug + [0x68] = { draw_gi_various_opa0_xlu1, { {0x06000830}, {0x06000A70} } }, // Butterfly + [0x69] = { draw_gi_poe_bottles, { {0x06000990}, {0x06000BE0}, {0x06000CF0}, {0x06000950} } }, // Poe + [0x6A] = { draw_gi_fairy_lantern, { {0x06000BD0}, {0x06000DB8}, {0x06000EF0} } }, // Fairy + [0x6B] = { draw_gi_bullet_bags, { {0x06000B70}, {0x06000AF0}, {0x06000F48}, {0x06000B30}, {0x06000FF0} } }, // Bullet Bag (40) + [0x6C] = { draw_gi_small_rupees, { {0x060005E0}, {0x060004A0}, {0x060006F0}, {0x06000540} } }, // Green Rupee + [0x6D] = { draw_gi_small_rupees, { {0x060005E0}, {0x060004C0}, {0x060006F0}, {0x06000560} } }, // Blue Rupee + [0x6E] = { draw_gi_small_rupees, { {0x060005E0}, {0x060004E0}, {0x060006F0}, {0x06000580} } }, // Red Rupee + [0x6F] = { draw_gi_poe_bottles, { {0x06000990}, {0x06000BE0}, {0x06000CF0}, {0x06000970} } }, // Big Poe + [0x70] = { draw_gi_various_opa10_xlu32, { {0x060005E0}, {0x06000500}, {0x060006F0}, {0x060005A0} } }, // Purple Rupee + [0x71] = { draw_gi_various_opa10_xlu32, { {0x060005E0}, {0x06000520}, {0x060006F0}, {0x060005C0} } }, // Huge Rupee + [0x72] = { draw_gi_bullet_bags, { {0x06000B70}, {0x06000B10}, {0x06000F48}, {0x06000B50}, {0x06000FF0} } }, // Bullet Bag (50) + [0x73] = { draw_gi_various_opa0, { {0x06000960} } }, // Kokiri Sword + [0x74] = { draw_gi_gs_token, { {0x06004DB0}, {0x06004EB8} } }, // Gold Skulltula Token II (only for En_Si) // Rando-added functions - [0x75] = { draw_gi_various_opa0, { 0x06000A30 } }, // Triforce Piece - [0x76] = { draw_gi_small_keys, { 0x060017C0, 0xFFFFFFFF, 0x3C505AFF } }, // Key Ring - [0x77] = { draw_gi_song_notes, { 0x06000F70, 0x00C800FF, 1 } }, // Music Note inverted (Green) - [0x78] = { draw_gi_song_notes, { 0x06000F70, 0xFF3200FF, 1 } }, // Music Note inverted (Red) - [0x79] = { draw_gi_song_notes, { 0x06000F70, 0x0096FFFF, 1 } }, // Music Note inverted (Blue) - [0x7A] = { draw_gi_song_notes, { 0x06000F70, 0xFF9600FF, 1 } }, // Music Note inverted (Orange) - [0x7B] = { draw_gi_song_notes, { 0x06000F70, 0xC832FFFF, 1 } }, // Music Note inverted (Purple) - [0x7C] = { draw_gi_song_notes, { 0x06000F70, 0xC8FF00FF, 1 } }, // Music Note inverted (Yellow) - [0x7D] = { draw_gi_chubag, { 0x060006A0, 0x060008E0, 0x06001280, 0xBA3F3AFF, 0xA5231EFF, 0x1695D2FF, 0x054C7FFF } }, // Bombchu Bag - [0x7E] = { draw_gi_silver_rupee_pouch, { 0x06001850, 0x06001750, 0x06001790, 0x060019A0, 0x060017B0, 0x06001A28, 0x060017D0, 0x06001AD8 } }, // Silver Rupee Pouch - [0x7F] = { draw_gi_shrink_keys, { 0x06001060, 0x94E97BFF, 0x2CCF1AFF } }, // Small Key (Forest) - [0x80] = { draw_gi_shrink_keys, { 0x06000F00, 0xFD9884FF, 0xED1612FF } }, // Small Key (Fire) - [0x81] = { draw_gi_shrink_keys, { 0x06000F40, 0x4C9DEEFF, 0x077AEEFF } }, // Small Key (Water) - [0x82] = { draw_gi_shrink_keys, { 0x06001080, 0xFACD8FFF, 0xF5B433FF } }, // Small Key (Spirit) - [0x83] = { draw_gi_shrink_keys, { 0x06000FC0, 0x9454ebFF, 0x7A18DDFF } }, // Small Key (Shadow) - [0x84] = { draw_gi_shrink_keys, { 0x06000FF0, 0xFAD1FAFF, 0xE9B3EFFF } }, // Small Key (Well) - [0x85] = { draw_gi_shrink_keys, { 0x06001110, 0xFEFB9CFF, 0xE3E312FF } }, // Small Key (GTG) - [0x86] = { draw_gi_shrink_keys, { 0x06001110, 0xFFFFFFFF, 0x8c8c8cFF } }, // Small Key (Thieves) - [0x87] = { draw_gi_shrink_keys, { 0x06000DD0, 0x6E7467FF, 0x262724FF } }, // Small Key (Ganon) - [0x88] = { draw_gi_shrink_keys, { 0x06001080, 0xC79B42FF, 0x9F7937FF } }, // Small Key (Treasure Chest Game) - [0x89] = { draw_gi_boss_altered, { 0x060006D0, 0x06001590, 0x94E97BFF, 0x2CCF1AFF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Forest) - [0x8A] = { draw_gi_boss_altered, { 0x060006A0, 0x06001500, 0xFD9884FF, 0xED1612FF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Fire) - [0x8B] = { draw_gi_boss_altered, { 0x060008F0, 0x06001790, 0x4C9DEEFF, 0x077AEEFF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Water) - [0x8C] = { draw_gi_boss_altflip, { 0x06000E30, 0x060016D0, 0xFACD8FFF, 0xF5B433FF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Spirit) - [0x8D] = { draw_gi_boss_altered, { 0x06000490, 0x06001350, 0x9454ebFF, 0x7A18DDFF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Shadow) - [0x8E] = { draw_gi_boss_keys, { 0x06000CA0, 0x06000F08, 0x6E7467FF, 0x262724FF, 0xFFFFFFFF, 0x8C7800FF } }, // Boss Key (Ganon) - [0x8F] = { draw_gi_a_button, { 0x06000DA0, 0x5A5AFFFF } }, // A button - [0x90] = { draw_gi_c_button_vertical, { 0x06000960, 0xFFA000FF, 0 } }, // Cup button - [0x91] = { draw_gi_c_button_vertical, { 0x06000960, 0xFFA000FF, 1 } }, // Cdown button - [0x92] = { draw_gi_c_button_horizontal, { 0x06000E10, 0xFFA000FF, 1 } }, // Cleft button - [0x93] = { draw_gi_c_button_horizontal, { 0x06000E10, 0xFFA000FF, 0 } }, // Cright button - [0x94] = { draw_gi_medallions, { 0x060004d0, 0x06000f80 } }, // Light Medallion - [0x95] = { draw_gi_medallions, { 0x06000370, 0x06000e40 } }, // Forest Medallion - [0x96] = { draw_gi_medallions, { 0x060001b0, 0x06000c30 } }, // Fire Medallion - [0x97] = { draw_gi_medallions, { 0x06000330, 0x06000e00 } }, // Water Medallion - [0x98] = { draw_gi_medallions, { 0x060002d0, 0x06000d60 } }, // Shadow Medallion - [0x99] = { draw_gi_medallions, { 0x06000380, 0x06000e40 } }, // Spirit Medallion - [0x9A] = { draw_gi_stones, { 0x06000b50, 0x06001290, 0xffffa0ff, 0x00ff00ff } }, // Kokiri Emerald - [0x9B] = { draw_gi_stones, { 0x06000620, 0x06000920, 0xffaaffff, 0xff0064ff } }, // Goron Ruby - [0x9C] = { draw_gi_stones, { 0x06000b00, 0x060012f0, 0x32ffffff, 0x320096ff } }, // Zora Sapphire - [0x9D] = { draw_gi_fairy, { 0x06000EF0 } }, // Fairy (not in a bottle but uses the fairy from the bottle) + [0x75] = { draw_gi_various_opa0, { {0x06000A30} } }, // Triforce Piece + [0x76] = { draw_gi_small_keys, { {0x060017C0}, {0xFFFFFFFF}, {0x3C505AFF} } }, // Key Ring + [0x77] = { draw_gi_song_notes, { {0x06000F70}, {0x00C800FF}, {1} } }, // Music Note inverted (Green) + [0x78] = { draw_gi_song_notes, { {0x06000F70}, {0xFF3200FF}, {1} } }, // Music Note inverted (Red) + [0x79] = { draw_gi_song_notes, { {0x06000F70}, {0x0096FFFF}, {1} } }, // Music Note inverted (Blue) + [0x7A] = { draw_gi_song_notes, { {0x06000F70}, {0xFF9600FF}, {1} } }, // Music Note inverted (Orange) + [0x7B] = { draw_gi_song_notes, { {0x06000F70}, {0xC832FFFF}, {1} } }, // Music Note inverted (Purple) + [0x7C] = { draw_gi_song_notes, { {0x06000F70}, {0xC8FF00FF}, {1} } }, // Music Note inverted (Yellow) + [0x7D] = { draw_gi_chubag, { {0x060006A0}, {0x060008E0}, {0x06001280}, {0xBA3F3AFF}, {0xA5231EFF}, {0x1695D2FF}, {0x054C7FFF} } }, // Bombchu Bag + [0x7E] = { draw_gi_silver_rupee_pouch, { {0x06001850}, {0x06001750}, {0x06001790}, {0x060019A0}, {0x060017B0}, {0x06001A28}, {0x060017D0}, {0x06001AD8} } }, // Silver Rupee Pouch + [0x7F] = { draw_gi_shrink_keys, { {0x06001060}, {0x94E97BFF}, {0x2CCF1AFF} } }, // Small Key (Forest) + [0x80] = { draw_gi_shrink_keys, { {0x06000F00}, {0xFD9884FF}, {0xED1612FF} } }, // Small Key (Fire) + [0x81] = { draw_gi_shrink_keys, { {0x06000F40}, {0x4C9DEEFF}, {0x077AEEFF} } }, // Small Key (Water) + [0x82] = { draw_gi_shrink_keys, { {0x06001080}, {0xFACD8FFF}, {0xF5B433FF} } }, // Small Key (Spirit) + [0x83] = { draw_gi_shrink_keys, { {0x06000FC0}, {0x9454ebFF}, {0x7A18DDFF} } }, // Small Key (Shadow) + [0x84] = { draw_gi_shrink_keys, { {0x06000FF0}, {0xFAD1FAFF}, {0xE9B3EFFF} } }, // Small Key (Well) + [0x85] = { draw_gi_shrink_keys, { {0x06001110}, {0xFEFB9CFF}, {0xE3E312FF} } }, // Small Key (GTG) + [0x86] = { draw_gi_shrink_keys, { {0x06001110}, {0xFFFFFFFF}, {0x8c8c8cFF} } }, // Small Key (Thieves) + [0x87] = { draw_gi_shrink_keys, { {0x06000DD0}, {0x6E7467FF}, {0x262724FF} } }, // Small Key (Ganon) + [0x88] = { draw_gi_shrink_keys, { {0x06001080}, {0xC79B42FF}, {0x9F7937FF} } }, // Small Key (Treasure Chest Game) + [0x89] = { draw_gi_boss_altered, { {0x060006D0}, {0x06001590}, {0x94E97BFF}, {0x2CCF1AFF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Forest) + [0x8A] = { draw_gi_boss_altered, { {0x060006A0}, {0x06001500}, {0xFD9884FF}, {0xED1612FF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Fire) + [0x8B] = { draw_gi_boss_altered, { {0x060008F0}, {0x06001790}, {0x4C9DEEFF}, {0x077AEEFF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Water) + [0x8C] = { draw_gi_boss_altflip, { {0x06000E30}, {0x060016D0}, {0xFACD8FFF}, {0xF5B433FF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Spirit) + [0x8D] = { draw_gi_boss_altered, { {0x06000490}, {0x06001350}, {0x9454ebFF}, {0x7A18DDFF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Shadow) + [0x8E] = { draw_gi_boss_keys, { {0x06000CA0}, {0x06000F08}, {0x6E7467FF}, {0x262724FF}, {0xFFFFFFFF}, {0x8C7800FF} } }, // Boss Key (Ganon) + [0x8F] = { draw_gi_a_button, { {0x06000DA0}, {0x5A5AFFFF} } }, // A button + [0x90] = { draw_gi_c_button_vertical, { {0x06000960}, {0xFFA000FF}, {0} } }, // Cup button + [0x91] = { draw_gi_c_button_vertical, { {0x06000960}, {0xFFA000FF}, {1} } }, // Cdown button + [0x92] = { draw_gi_c_button_horizontal, { {0x06000E10}, {0xFFA000FF}, {1} } }, // Cleft button + [0x93] = { draw_gi_c_button_horizontal, { {0x06000E10}, {0xFFA000FF}, {0} } }, // Cright button + [0x94] = { draw_gi_medallions, { {0x060004d0}, {0x06000f80} } }, // Light Medallion{ + [0x95] = { draw_gi_medallions, { {0x06000370}, {0x06000e40} } }, // Forest Medallion + [0x96] = { draw_gi_medallions, { {0x060001b0}, {0x06000c30} } }, // Fire Medallion + [0x97] = { draw_gi_medallions, { {0x06000330}, {0x06000e00} } }, // Water Medallion + [0x98] = { draw_gi_medallions, { {0x060002d0}, {0x06000d60} } }, // Shadow Medallion + [0x99] = { draw_gi_medallions, { {0x06000380}, {0x06000e40} } }, // Spirit Medallion + [0x9A] = { draw_gi_stones, { {0x06000b50}, {0x06001290}, {0xffffa0ff}, {0x00ff00ff} } }, // Kokiri Emerald + [0x9B] = { draw_gi_stones, { {0x06000620}, {0x06000920}, {0xffaaffff}, {0xff0064ff} } }, // Goron Ruby + [0x9C] = { draw_gi_stones, { {0x06000b00}, {0x060012f0}, {0x32ffffff}, {0x320096ff} } }, // Zora Sapphire + [0x9D] = { draw_gi_fairy, { {0x06000EF0} } }, // Fairy (not in a bottle but uses the fairy from the bottle) [0x9E] = { draw_gi_nothing, {} }, - [0x9F] = { draw_gi_magic_meter, { 0x06000000, 0x060007B0, 0x060009F8, 0x06000FD8, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll - [0xA0] = { draw_gi_xlu_with_flame, { 0x060004D0, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Stick Upgrade w/ Smoke Effect - [0xA1] = { draw_gi_deku_nut_with_flame, { 0x06000E90, 0xC0C0C0FF, 0xC0C0C0FF } }, // Deku Nut Upgrade w/ Smoke Effect - [0xA2] = { draw_gi_magic_meter, { 0x06000000, 0x06000CC0, 0x06000F08, 0x060014E8, 0x286428FF, 0x000000FF } }, // Magic Meter Scroll 2 - [0xA3] = { draw_ice_trap, { 0x04034380 } }, // Ice trap + [0x9F] = { draw_gi_magic_meter, { {0x06000000}, {0x060007B0}, {0x060009F8}, {0x06000FD8}, {0x286428FF}, {0x000000FF} } }, // Magic Meter Scroll + [0xA0] = { draw_gi_xlu_with_flame, { {0x060004D0}, {0xC0C0C0FF}, {0xC0C0C0FF} } }, // Deku Stick Upgrade w/ Smoke Effect + [0xA1] = { draw_gi_deku_nut_with_flame, { {0x06000E90}, {0xC0C0C0FF}, {0xC0C0C0FF} } }, // Deku Nut Upgrade w/ Smoke Effect + [0xA2] = { draw_gi_magic_meter, { {0x06000000}, {0x06000CC0}, {0x06000F08}, {0x060014E8}, {0x286428FF}, {0x000000FF} } }, // Magic Meter Scroll 2 + [0xA3] = { draw_ice_trap, { {0x04034380} } }, // Ice trap }; void base_draw_gi_model(z64_game_t* game, uint32_t draw_id) { diff --git a/ASM/c/item_upgrades.c b/ASM/c/item_upgrades.c index 310134df43..54d3ce84a7 100644 --- a/ASM/c/item_upgrades.c +++ b/ASM/c/item_upgrades.c @@ -174,10 +174,9 @@ uint16_t bombchus_to_bag(z64_file_t* save, override_t override) { case GI_BOMBCHUS_5: return GI_BOMBCHU_BAG_5; // 5 pack case GI_BOMBCHUS_20: return GI_BOMBCHU_BAG_20; // 20 pack } - } else { - // Subsequent chu packs stay as chu packs - return override.value.base.item_id; } + // Subsequent chu packs stay as chu packs + return override.value.base.item_id; } uint16_t upgrade_key_model(z64_file_t* save, override_t override) { diff --git a/ASM/c/kaleido_item.c b/ASM/c/kaleido_item.c index 276923e857..09d20966f0 100644 --- a/ASM/c/kaleido_item.c +++ b/ASM/c/kaleido_item.c @@ -3,15 +3,12 @@ #include "kaleido_item.h" void KaleidoScope_DrawItemSelect(z64_game_t* play) { - static int16_t magic_arrow_effects_r[] = {255, 100, 255 }; - static int16_t magic_arrow_effects_g[] = {0, 100, 255 }; - static int16_t magic_arrow_effects_b[] = {0, 255, 100 }; z64_input_t* input = &play->common.input[0]; z64_pause_ctxt_t* pause_ctxt = &play->pause_ctxt; uint16_t i; uint16_t j; uint16_t cursor_item; - uint16_t cursor_slot; + uint16_t cursor_slot = 0; uint16_t index; int16_t cursor_point; int16_t cursor_x; @@ -230,7 +227,7 @@ void KaleidoScope_DrawItemSelect(z64_game_t* play) { pause_ctxt->cursor_point[PAUSE_ITEM] -= 6; if(z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE - || pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5) { + || (pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5)) { move_cursor_result = 1; } } else { // Nothing fancy if we've reached the vertical bounds. @@ -245,7 +242,7 @@ void KaleidoScope_DrawItemSelect(z64_game_t* play) { pause_ctxt->cursor_point[PAUSE_ITEM] += 6; if(z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE - || pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5) { + || (pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5)) { move_cursor_result = 1; } } else { // Nothing fancy if we've reached the vertical bounds. diff --git a/ASM/c/model_text.c b/ASM/c/model_text.c index 6caa93fa3c..6f9c010603 100644 --- a/ASM/c/model_text.c +++ b/ASM/c/model_text.c @@ -192,7 +192,6 @@ bool check_skeleton(z64_mem_obj_t model, int hierarchy, Limb* skeleton) { // Get the limb this points to int limb = *(int*)(data + limbPointer) & 0x00FFFFFF; // Go through each limb in the table - bool hasVanillaSkeleton = true; for (int i = 1; i < 21; i++) { int offset = limb + i * 0x10; // X, Y, Z components are 2 bytes each diff --git a/ASM/c/models.c b/ASM/c/models.c index 421c03ce5d..674ca15787 100644 --- a/ASM/c/models.c +++ b/ASM/c/models.c @@ -178,8 +178,6 @@ void heart_piece_draw(z64_actor_t* actor, z64_game_t* game) { // collectible draw function for common items (sticks, nuts, arrows/seeds/etc. and keys) void collectible_draw_other(z64_actor_t* actor, z64_game_t* game) { - EnItem00* this = (EnItem00*)actor; - model_t model = { .object_id = 0x0000, .graphic_id = 0x00, diff --git a/ASM/c/music.c b/ASM/c/music.c index de9aaba967..886a2ca503 100644 --- a/ASM/c/music.c +++ b/ASM/c/music.c @@ -155,7 +155,6 @@ void display_song_name_on_file_select(z64_disp_buf_t* db) { uint8_t top = 220; uint8_t left = 7; uint8_t alpha = 255; - uint8_t bgm_fileselect = 11; // ("Fairy Fountain", 0x28) char subStringName[50]; uint8_t subStringNameLength = 0; for (uint8_t j = 0; j < 50; j++) { diff --git a/ASM/c/obj_comb.c b/ASM/c/obj_comb.c index ebad68d7e5..ca6ce0d448 100644 --- a/ASM/c/obj_comb.c +++ b/ASM/c/obj_comb.c @@ -16,7 +16,7 @@ void obj_comb_drop_collectible(z64_actor_t* actor, int16_t params) { if (flag->all && !Get_NewFlag(flag)) { // set up params for Item_DropCollectible drop_collectible_override_flag = *flag; - EnItem00* spawned = z64_Item_DropCollectible2(&z64_game, &actor->pos_world, params); + z64_Item_DropCollectible2(&z64_game, &actor->pos_world, params); z64_bzero(&drop_collectible_override_flag, sizeof(drop_collectible_override_flag)); } else { // Normal beehive behavior if (z64_Rand_ZeroOne() > 0.5f) { diff --git a/ASM/c/obj_kibako.c b/ASM/c/obj_kibako.c index b13f9f1b86..9e111774ce 100644 --- a/ASM/c/obj_kibako.c +++ b/ASM/c/obj_kibako.c @@ -79,13 +79,13 @@ void ObjKibako_SpawnCollectible_Hack(z64_actor_t* this, z64_game_t* globalCtx) { xflag_t* flag = &Actor_GetAdditionalData(this)->flag; if (flag->all && !Get_NewFlag(flag)) { drop_collectible_override_flag = *flag; - EnItem00* spawned = z64_Item_DropCollectible(globalCtx, &this->pos_world, 0); + z64_Item_DropCollectible(globalCtx, &this->pos_world, 0); z64_bzero(&drop_collectible_override_flag, sizeof(drop_collectible_override_flag)); return; } if ((collectible >= 0) && (collectible <= 0x19)) { - EnItem00* spawned = z64_Item_DropCollectible(globalCtx, &this->pos_world, + z64_Item_DropCollectible(globalCtx, &this->pos_world, collectible | (((this->variable >> 8) & 0x3F) << 8)); } } diff --git a/ASM/c/obj_kibako2.c b/ASM/c/obj_kibako2.c index 78e3df863c..2a3ba82bd0 100644 --- a/ASM/c/obj_kibako2.c +++ b/ASM/c/obj_kibako2.c @@ -25,12 +25,12 @@ void ObjKibako2_SpawnCollectible_Hack(ObjKibako2* this, z64_game_t* globalCtx) { xflag_t* flag = &(Actor_GetAdditionalData((z64_actor_t*)this)->flag); if (flag->all && !Get_NewFlag(flag)) { drop_collectible_override_flag = *flag; - EnItem00* spawned = z64_Item_DropCollectible(globalCtx, &this->dyna.actor.pos_world, 0); + z64_Item_DropCollectible(globalCtx, &this->dyna.actor.pos_world, 0); z64_bzero(&drop_collectible_override_flag, sizeof(drop_collectible_override_flag)); return; } if (itemDropped >= 0 && itemDropped < 0x1A) { - EnItem00* spawned = z64_Item_DropCollectible(globalCtx, &this->dyna.actor.pos_world, itemDropped | (collectibleFlagTemp << 8)); + z64_Item_DropCollectible(globalCtx, &this->dyna.actor.pos_world, itemDropped | (collectibleFlagTemp << 8)); } } diff --git a/ASM/c/pots.c b/ASM/c/pots.c index 3aed34df4d..6c7ca0c56c 100644 --- a/ASM/c/pots.c +++ b/ASM/c/pots.c @@ -122,14 +122,14 @@ void ObjTsubo_SpawnCollectible_Hack(z64_actor_t* this, z64_game_t* game) { xflag_t* flag = &(Actor_GetAdditionalData(this)->flag); if (flag->all && !Get_NewFlag(flag)) { drop_collectible_override_flag = *flag; - EnItem00* spawned = z64_Item_DropCollectible(game, &this->pos_world, ((((this->variable >> 9) & 0x3F) << 8))); + z64_Item_DropCollectible(game, &this->pos_world, ((((this->variable >> 9) & 0x3F) << 8))); z64_bzero(&drop_collectible_override_flag, sizeof(drop_collectible_override_flag)); return; } int16_t dropParams = this->variable & 0x1F; if ((dropParams >= ITEM00_RUPEE_GREEN) && (dropParams <= ITEM00_BOMBS_SPECIAL)) { - EnItem00* spawned = z64_Item_DropCollectible(game, &this->pos_world, (dropParams | (((this->variable >> 9) & 0x3F) << 8))); + z64_Item_DropCollectible(game, &this->pos_world, (dropParams | (((this->variable >> 9) & 0x3F) << 8))); } } @@ -140,12 +140,12 @@ void EnTuboTrap_DropCollectible_Hack(z64_actor_t* this, z64_game_t* game) { xflag_t* flag = &(Actor_GetAdditionalData(this)->flag); if (flag->all && !Get_NewFlag(flag)) { drop_collectible_override_flag = *flag; - EnItem00* spawned = z64_Item_DropCollectible(game, &this->pos_world, (params & 0x3F) << 8); + z64_Item_DropCollectible(game, &this->pos_world, (params & 0x3F) << 8); z64_bzero(&drop_collectible_override_flag, sizeof(drop_collectible_override_flag)); return; } if (param3FF >= 0 && param3FF < 0x1A) { - EnItem00* spawned = z64_Item_DropCollectible(game, &this->pos_world, param3FF | ((params & 0x3F) << 8)); + z64_Item_DropCollectible(game, &this->pos_world, param3FF | ((params & 0x3F) << 8)); } } diff --git a/ASM/c/scene.c b/ASM/c/scene.c index fad58cb4d7..1c230ba6fc 100644 --- a/ASM/c/scene.c +++ b/ASM/c/scene.c @@ -26,8 +26,6 @@ void get_current_scene_setup_number() { } if (cmd->code == 0x18) { //Alternate header command - // Get segment number from alternate header command - uint8_t segment = (cmd->data2 << 4) >> 28; // Get segment offset from alternate header command uint32_t segment_offset = (cmd->data2 & 0x00FFFFFF); // Get a pointer to the alternate header list diff --git a/ASM/c/text.c b/ASM/c/text.c index 6bb454e275..77e75b06cc 100644 --- a/ASM/c/text.c +++ b/ASM/c/text.c @@ -33,7 +33,7 @@ int text_print(z64_disp_buf_t* db, const char* s, int left, int top) { } int draw_int(z64_disp_buf_t* db, int32_t number, int16_t left, int16_t top, colorRGBA8_t color) { - draw_int_size(db, number, left, top, color, 8, 16); + return draw_int_size(db, number, left, top, color, 8, 16); } // Helper function for drawing numbers to the HUD. diff --git a/ASM/c/trade_quests.c b/ASM/c/trade_quests.c index c6bd6f24a9..2486b774b0 100644 --- a/ASM/c/trade_quests.c +++ b/ASM/c/trade_quests.c @@ -3,28 +3,28 @@ extern uint8_t CFG_ADULT_TRADE_SHUFFLE; const exchange_item_t trade_quest_items[] = { - { 0, Z64_ITEM_WEIRD_EGG, Z64_EXCH_ITEM_WEIRD_EGG, PLAYER_AP_WEIRD_EGG , 0 }, // "Weird Egg" - { 1, Z64_ITEM_CHICKEN, Z64_EXCH_ITEM_CHICKEN, PLAYER_AP_CHICKEN , 0 }, // "Chicken" - { 2, Z64_ITEM_ZELDAS_LETTER, Z64_EXCH_ITEM_LETTER_ZELDA, PLAYER_AP_LETTER_ZELDA , 0 }, // "Zelda's Letter" - { 3, Z64_ITEM_KEATON_MASK, Z64_EXCH_ITEM_MASK_KEATON, PLAYER_AP_MASK_KEATON , 0 }, // "Keaton Mask" - { 4, Z64_ITEM_SKULL_MASK, Z64_EXCH_ITEM_MASK_SKULL, PLAYER_AP_MASK_SKULL , 0 }, // "Skull Mask" - { 5, Z64_ITEM_SPOOKY_MASK, Z64_EXCH_ITEM_MASK_SPOOKY, PLAYER_AP_MASK_SPOOKY , 0 }, // "Spooky Mask" - { 6, Z64_ITEM_BUNNY_HOOD, Z64_EXCH_ITEM_MASK_BUNNY, PLAYER_AP_MASK_BUNNY , 0 }, // "Bunny Hood" - { 7, Z64_ITEM_GORON_MASK, Z64_EXCH_ITEM_MASK_GORON, PLAYER_AP_MASK_GORON , 0 }, // "Goron Mask" - { 8, Z64_ITEM_ZORA_MASK, Z64_EXCH_ITEM_MASK_ZORA, PLAYER_AP_MASK_ZORA , 0 }, // "Zora Mask" - { 9, Z64_ITEM_GERUDO_MASK, Z64_EXCH_ITEM_MASK_GERUDO, PLAYER_AP_MASK_GERUDO , 0 }, // "Gerudo Mask" - { 10, Z64_ITEM_MASK_OF_TRUTH, Z64_EXCH_ITEM_MASK_TRUTH, PLAYER_AP_MASK_TRUTH , 0 }, // "Mask of Truth" - { 11, Z64_ITEM_POCKET_EGG, Z64_EXCH_ITEM_POCKET_EGG, PLAYER_AP_POCKET_EGG , 0 }, // "Pocket Egg" - { 12, Z64_ITEM_POCKET_CUCCO, Z64_EXCH_ITEM_POCKET_CUCCO, PLAYER_AP_POCKET_CUCCO , 0 }, // "Pocket Cucco" - { 13, Z64_ITEM_COJIRO, Z64_EXCH_ITEM_COJIRO, PLAYER_AP_COJIRO , 0 }, // "Cojiro" - { 14, Z64_ITEM_ODD_MUSHROOM, Z64_EXCH_ITEM_ODD_MUSHROOM, PLAYER_AP_ODD_MUSHROOM , 0 }, // "Odd Mushroom" - { 15, Z64_ITEM_ODD_POTION, Z64_EXCH_ITEM_ODD_POTION, PLAYER_AP_ODD_POTION , 0 }, // "Odd Potion" - { 16, Z64_ITEM_POACHERS_SAW, Z64_EXCH_ITEM_SAW, PLAYER_AP_SAW , 0 }, // "Poacher's Saw" - { 17, Z64_ITEM_BROKEN_GORONS_SWORD, Z64_EXCH_ITEM_SWORD_BROKEN, PLAYER_AP_SWORD_BROKEN , 0 }, // "Broken Goron Sword" - { 18, Z64_ITEM_PRESCRIPTION, Z64_EXCH_ITEM_PRESCRIPTION, PLAYER_AP_PRESCRIPTION , 0 }, // "Prescription" - { 19, Z64_ITEM_EYEBALL_FROG, Z64_EXCH_ITEM_FROG, PLAYER_AP_FROG , 0 }, // "Eyeball Frog" - { 20, Z64_ITEM_EYE_DROPS, Z64_EXCH_ITEM_EYEDROPS, PLAYER_AP_EYEDROPS , 0 }, // "Eye Drops" - { 21, Z64_ITEM_CLAIM_CHECK, Z64_EXCH_ITEM_CLAIM_CHECK, PLAYER_AP_CLAIM_CHECK , 0 } // "Claim Check" + { 0, Z64_ITEM_WEIRD_EGG, Z64_EXCH_ITEM_WEIRD_EGG, PLAYER_AP_WEIRD_EGG , {0} }, // "Weird Egg" + { 1, Z64_ITEM_CHICKEN, Z64_EXCH_ITEM_CHICKEN, PLAYER_AP_CHICKEN , {0} }, // "Chicken" + { 2, Z64_ITEM_ZELDAS_LETTER, Z64_EXCH_ITEM_LETTER_ZELDA, PLAYER_AP_LETTER_ZELDA , {0} }, // "Zelda's Letter" + { 3, Z64_ITEM_KEATON_MASK, Z64_EXCH_ITEM_MASK_KEATON, PLAYER_AP_MASK_KEATON , {0} }, // "Keaton Mask" + { 4, Z64_ITEM_SKULL_MASK, Z64_EXCH_ITEM_MASK_SKULL, PLAYER_AP_MASK_SKULL , {0} }, // "Skull Mask" + { 5, Z64_ITEM_SPOOKY_MASK, Z64_EXCH_ITEM_MASK_SPOOKY, PLAYER_AP_MASK_SPOOKY , {0} }, // "Spooky Mask" + { 6, Z64_ITEM_BUNNY_HOOD, Z64_EXCH_ITEM_MASK_BUNNY, PLAYER_AP_MASK_BUNNY , {0} }, // "Bunny Hood" + { 7, Z64_ITEM_GORON_MASK, Z64_EXCH_ITEM_MASK_GORON, PLAYER_AP_MASK_GORON , {0} }, // "Goron Mask" + { 8, Z64_ITEM_ZORA_MASK, Z64_EXCH_ITEM_MASK_ZORA, PLAYER_AP_MASK_ZORA , {0} }, // "Zora Mask" + { 9, Z64_ITEM_GERUDO_MASK, Z64_EXCH_ITEM_MASK_GERUDO, PLAYER_AP_MASK_GERUDO , {0} }, // "Gerudo Mask" + { 10, Z64_ITEM_MASK_OF_TRUTH, Z64_EXCH_ITEM_MASK_TRUTH, PLAYER_AP_MASK_TRUTH , {0} }, // "Mask of Truth" + { 11, Z64_ITEM_POCKET_EGG, Z64_EXCH_ITEM_POCKET_EGG, PLAYER_AP_POCKET_EGG , {0} }, // "Pocket Egg" + { 12, Z64_ITEM_POCKET_CUCCO, Z64_EXCH_ITEM_POCKET_CUCCO, PLAYER_AP_POCKET_CUCCO , {0} }, // "Pocket Cucco" + { 13, Z64_ITEM_COJIRO, Z64_EXCH_ITEM_COJIRO, PLAYER_AP_COJIRO , {0} }, // "Cojiro" + { 14, Z64_ITEM_ODD_MUSHROOM, Z64_EXCH_ITEM_ODD_MUSHROOM, PLAYER_AP_ODD_MUSHROOM , {0} }, // "Odd Mushroom" + { 15, Z64_ITEM_ODD_POTION, Z64_EXCH_ITEM_ODD_POTION, PLAYER_AP_ODD_POTION , {0} }, // "Odd Potion" + { 16, Z64_ITEM_POACHERS_SAW, Z64_EXCH_ITEM_SAW, PLAYER_AP_SAW , {0} }, // "Poacher's Saw" + { 17, Z64_ITEM_BROKEN_GORONS_SWORD, Z64_EXCH_ITEM_SWORD_BROKEN, PLAYER_AP_SWORD_BROKEN , {0} }, // "Broken Goron Sword" + { 18, Z64_ITEM_PRESCRIPTION, Z64_EXCH_ITEM_PRESCRIPTION, PLAYER_AP_PRESCRIPTION , {0} }, // "Prescription" + { 19, Z64_ITEM_EYEBALL_FROG, Z64_EXCH_ITEM_FROG, PLAYER_AP_FROG , {0} }, // "Eyeball Frog" + { 20, Z64_ITEM_EYE_DROPS, Z64_EXCH_ITEM_EYEDROPS, PLAYER_AP_EYEDROPS , {0} }, // "Eye Drops" + { 21, Z64_ITEM_CLAIM_CHECK, Z64_EXCH_ITEM_CLAIM_CHECK, PLAYER_AP_CLAIM_CHECK , {0} } // "Claim Check" }; // Rupees to pay back to Happy Mask Shop From a7498609c03a9c8c1190c6df0990e2f918b127fe Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Sun, 5 Oct 2025 14:40:18 -0400 Subject: [PATCH 2/2] Undo changes in equip swap enabling code --- ASM/c/kaleido_item.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ASM/c/kaleido_item.c b/ASM/c/kaleido_item.c index 09d20966f0..26a5ad07c9 100644 --- a/ASM/c/kaleido_item.c +++ b/ASM/c/kaleido_item.c @@ -226,8 +226,8 @@ void KaleidoScope_DrawItemSelect(z64_game_t* play) { pause_ctxt->cursor_y[PAUSE_ITEM]--; pause_ctxt->cursor_point[PAUSE_ITEM] -= 6; - if(z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE - || (pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5)) { + if((z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE + || pause_ctxt->cursor_x[PAUSE_ITEM] > 0) && pause_ctxt->cursor_x[PAUSE_ITEM] < 5) { move_cursor_result = 1; } } else { // Nothing fancy if we've reached the vertical bounds. @@ -241,8 +241,8 @@ void KaleidoScope_DrawItemSelect(z64_game_t* play) { pause_ctxt->cursor_y[PAUSE_ITEM]++; pause_ctxt->cursor_point[PAUSE_ITEM] += 6; - if(z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE - || (pause_ctxt->cursor_x[PAUSE_ITEM] > 0 && pause_ctxt->cursor_x[PAUSE_ITEM] < 5)) { + if((z64_file.items[pause_ctxt->cursor_point[PAUSE_ITEM]] != ITEM_NONE + || pause_ctxt->cursor_x[PAUSE_ITEM] > 0) && pause_ctxt->cursor_x[PAUSE_ITEM] < 5) { move_cursor_result = 1; } } else { // Nothing fancy if we've reached the vertical bounds.