diff --git a/ASM/build/c_symbols.txt b/ASM/build/c_symbols.txt index cc1c00894..555bb73cc 100644 --- a/ASM/build/c_symbols.txt +++ b/ASM/build/c_symbols.txt @@ -156,58 +156,58 @@ SYMBOL TABLE: 00000000 l df *ABS* 00000000 uninvertYaxis.c 00000000 l df *ABS* 00000000 util.c 00000000 l df *ABS* 00000000 weather.c -0000aaf8 g F .text 00000114 draw_gi_deku_nut +0000aae0 g F .text 00000114 draw_gi_deku_nut 0000009c g O .sdata 00000004 RNG_SEED_INT -0000fe18 g F .text 00000054 scale_factor -00008e20 g F .text 0000034c sprite_texture -00012f20 g F .text 0000003c SaveFile_SetMaskAsPaid -0000d548 g F .text 0000001c give_defense -0000da90 g F .text 0000002c call_effect_function +0000fde4 g F .text 00000054 scale_factor +00008e08 g F .text 0000034c sprite_texture +00012eec g F .text 0000003c SaveFile_SetMaskAsPaid +0000d530 g F .text 0000001c give_defense +0000da5c g F .text 0000002c call_effect_function 000055b8 g F .text 00000560 read_file_data 0000029c g F .text 000000f0 spawn_override_silver_rupee 00000000 *UND* 00000000 PLAYER_ID -0000d628 g F .text 0000001c clear_excess_hearts -00011240 g F .text 00000078 object_index_or_spawn -00009880 g F .text 00000088 give_ice_trap +0000d610 g F .text 0000001c clear_excess_hearts +0001120c g F .text 00000078 object_index_or_spawn +00009868 g F .text 00000088 give_ice_trap 00000000 *UND* 00000000 SHUFFLE_OCARINA_BUTTONS -00011c88 g F .text 00000214 Sram_WriteSave -00011c58 g F .text 00000030 SsSram_ReadWrite_Safe -0000ec1c g F .text 00000274 update_bombchu_trail_colors -00012c4c g F .text 0000003c GetTradeSlot -0000e62c g F .text 000000f0 Message_AddInteger +00011c54 g F .text 00000214 Sram_WriteSave +00011c24 g F .text 00000030 SsSram_ReadWrite_Safe +0000ebe8 g F .text 00000274 update_bombchu_trail_colors +00012c18 g F .text 0000003c GetTradeSlot +0000e5f8 g F .text 000000f0 Message_AddInteger 00000000 *UND* 00000000 EXTENDED_INITIAL_SAVE_DATA 00007134 g F .text 0000007c item_overrides_init 00000000 *UND* 00000000 MW_SEND_OWN_ITEMS -00011740 g F .text 0000001c draw_pot_hack -0000dd9c g F .text 00000068 scale_upgrade -00013db8 g F .text 00000014 clear_twinrova_vars +0001170c g F .text 0000001c draw_pot_hack +0000dd68 g F .text 00000068 scale_upgrade +00013d84 g F .text 00000014 clear_twinrova_vars 00000048 g O .sdata 00000004 a_note_glow_max 00002b5c g F .text 00000184 draw_int -000131d8 g F .text 00000044 TurnInTradeItem +000131a4 g F .text 00000044 TurnInTradeItem 00002b00 g F .text 0000005c d_right_dungeon_idx 0000000c g O .sbss 00000004 CHEST_TEXTURE_MATCH_CONTENTS -00009c28 g F .text 0000009c draw_gi_various_opa0 +00009c10 g F .text 0000009c draw_gi_various_opa0 00000000 *UND* 00000000 CFG_DPAD_ON_THE_LEFT 00000000 *UND* 00000000 CFG_HEART_COLOR 00000000 *UND* 00000000 CFG_CHILD_TRADE_SHUFFLE -0000a4c4 g F .text 0000012c draw_gi_magic_arrows -0001321c g F .text 0000001c IsClaimCheckTraded +0000a4ac g F .text 0000012c draw_gi_magic_arrows +000131e8 g F .text 0000001c IsClaimCheckTraded 00000328 g O .data 00000010 button_sprite 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_ENEMY_INNER_ENABLED -00009808 g F .text 0000004c rupee_hud_color +000097f0 g F .text 0000004c rupee_hud_color 00007094 g F .text 00000074 Collectible_WaitForMessageBox 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_IDLE_OUTER_ENABLED -0000dad0 g F .text 00000064 hookshot_upgrade -0000e9d4 g F .text 000000a4 update_sword_trail_colors -00012d7c g F .text 00000038 SaveFile_TradeItemIsOwned +0000da9c g F .text 00000064 hookshot_upgrade +0000e9a0 g F .text 000000a4 update_sword_trail_colors +00012d48 g F .text 00000038 SaveFile_TradeItemIsOwned 00007448 g F .text 00000054 lookup_override -00012b8c g F .text 00000054 init_textures +00012b58 g F .text 00000054 init_textures 00000094 g O .sdata 00000004 text_height 00000000 *UND* 00000000 CFG_CORRECT_MODEL_COLORS -0000de6c g F .text 00000068 stick_upgrade +0000de38 g F .text 00000068 stick_upgrade 00003ae4 g O .data 000000fc adultSkeleton 00000010 g O .data 00000018 medals -000128e0 g F .text 0000002c text_init +000128ac g F .text 0000002c text_init 00000000 *UND* 00000000 INCOMING_PLAYER 00000080 g O .sdata 00000004 beating_no_dd 00000030 g O .sdata 00000004 c_note_font_glow_max @@ -216,177 +216,178 @@ SYMBOL TABLE: 00001900 g O .data 00000108 silver_rupee_vars 00000018 g F .text 00000054 Actor_SetWorldToHome_End 000050b4 g F .text 00000088 EnItem00_ProximityCheck_Hack -0000837c g F .text 00000084 drop_bombs_or_chus -0000b460 g F .text 0000018c draw_gi_gs_token -0000c064 g F .text 000002d4 draw_gi_boss_keys -0000f780 g F .text 00000074 FindSize +00008378 g F .text 00000084 drop_bombs_or_chus +0000b448 g F .text 0000018c draw_gi_gs_token +0000c04c g F .text 000002d4 draw_gi_boss_keys +0000f74c g F .text 00000074 FindSize 00000044 g O .sbss 00000004 active_override_is_outgoing -0000d580 g F .text 00000024 give_double_magic +0000d568 g F .text 00000024 give_double_magic 00000074 g O .sdata 00000004 normal_dd -0000946c g F .text 0000039c update_hud_colors -0000a090 g F .text 000000c0 draw_gi_various_xlu01 +00009454 g F .text 0000039c update_hud_colors +0000a078 g F .text 000000c0 draw_gi_various_xlu01 00000000 *UND* 00000000 CFG_DUNGEON_REWARDS -0001386c g F .text 0000001c CanBuy_RightSideMask +00013838 g F .text 0000001c CanBuy_RightSideMask 0000005e g O .sbss 00000001 adult_safe -0000e150 g F .text 00000080 letter_to_bottle +0000e11c g F .text 00000080 letter_to_bottle 00000000 *UND* 00000000 CFG_B_BUTTON_COLOR -0001013c g F .text 000000c0 collectible_draw +00010108 g F .text 000000c0 collectible_draw +0000002a g O .sbss 00000001 satisfied_pending_frames 00007280 g F .text 00000040 resolve_alternative_override 00000000 *UND* 00000000 CFG_CUSTOM_MESSAGE_1 -0000c8e0 g F .text 000002d8 draw_gi_chubag -00012c00 g F .text 0000004c GetTradeItemByAP -00010428 g F .text 00000064 ocarina_of_time_draw +0000c8c8 g F .text 000002d8 draw_gi_chubag +00012bcc g F .text 0000004c GetTradeItemByAP +000103f4 g F .text 00000064 ocarina_of_time_draw 00006ea0 g F .text 00000048 check_ganon_entry 000003d8 g O .data 00000010 items_sprite 00000000 *UND* 00000000 CFG_DUNGEON_REWARD_AREAS -00010260 g F .text 00000100 collectible_draw_other -0000a9f0 g F .text 00000108 draw_gi_goron_swords +0001022c g F .text 00000100 collectible_draw_other +0000a9d8 g F .text 00000108 draw_gi_goron_swords 00001830 g F .text 000011a8 draw_dpad_and_menu_utilities -0000be88 g F .text 000001dc draw_gi_shrink_keys +0000be70 g F .text 000001dc draw_gi_shrink_keys 00000000 *UND* 00000000 CFG_DISPLAY_DPAD -0000e414 g F .text 0000003c before_skybox_init -000086c8 g F .text 000000ac dispatch_item +0000e3e0 g F .text 0000003c before_skybox_init +000086c4 g F .text 000000ac dispatch_item 00000060 g O .sbss 00000002 illegal_model 00000030 g O .sbss 00000004 active_item_graphic_id 000003a8 g O .data 00000010 dpad_sprite 00000070 g O .sdata 00000004 a_button 00000000 *UND* 00000000 CFG_SHOW_SETTING_INFO 0000000c g O .sdata 00000008 hash_sprites -0000749c g F .text 00000140 activate_override -0000e358 g F .text 0000004c before_game_state_update -000127d0 g F .text 00000048 store_scarecrow_fix -00010bc0 g F .text 0000010c obj_comb_drop_collectible -00009f04 g F .text 0000018c draw_gi_silver_rupee_pouch -00013888 g F .text 00000028 set_triforce_render -00010f74 g F .text 00000064 ObjKibako_SpawnCollectible_Hack +0000749c g F .text 0000013c activate_override +0000e324 g F .text 0000004c before_game_state_update +0001279c g F .text 00000048 store_scarecrow_fix +00010b8c g F .text 0000010c obj_comb_drop_collectible +00009eec g F .text 0000018c draw_gi_silver_rupee_pouch +00013854 g F .text 00000028 set_triforce_render +00010f40 g F .text 00000064 ObjKibako_SpawnCollectible_Hack 00000064 g O .sdata 00000004 a_note_r -0000d834 g F .text 0000008c resolve_text_silver_rupee_pouches +0000d81c g F .text 0000008c resolve_text_silver_rupee_pouches 00000000 *UND* 00000000 CFG_C_NOTE_COLOR 00000000 *UND* 00000000 OUTGOING_PLAYER 000002c0 g O .bss 00000258 collectible_scene_flags_table -00013eec g F .text 00000240 override_weather_state +00013eb8 g F .text 00000240 override_weather_state 000038e8 g O .data 00000100 FILENAME_ENCODING -00007864 g F .text 00000044 push_delayed_item -0000dca4 g F .text 0000007c slingshot_upgrade -000124d4 g F .text 000001d0 Sram_CopySave -0000d95c g F .text 00000034 resolve_text_small_keys_cmg +00007860 g F .text 00000044 push_delayed_item +0000dc70 g F .text 0000007c slingshot_upgrade +000124a0 g F .text 000001d0 Sram_CopySave +0000d930 g F .text 00000034 resolve_text_small_keys_cmg 00000430 g O .data 000014d0 item_draw_table -00011aa4 g F .text 00000028 health_and_magic_refill -00011b60 g F .text 00000048 Seeded_Rand_Centered -0000d304 g F .text 000000f0 set_silver_rupee_flags -0000b5ec g F .text 000001d0 draw_gi_blue_fire_candle -00012b74 g F .text 00000018 get_texture -00012f98 g F .text 000000ac SaveFile_NextOwnedTradeItem -0000d048 g F .text 00000008 no_effect -00012b44 g F .text 00000030 text_flush +00011a70 g F .text 00000028 health_and_magic_refill +00011b2c g F .text 00000048 Seeded_Rand_Centered +0000d2ec g F .text 000000f0 set_silver_rupee_flags +0000b5d4 g F .text 000001d0 draw_gi_blue_fire_candle +00012b40 g F .text 00000018 get_texture +00012f64 g F .text 000000ac SaveFile_NextOwnedTradeItem +0000d030 g F .text 00000008 no_effect +00012b10 g F .text 00000030 text_flush 00000000 *UND* 00000000 CFG_RAINBOW_SWORD_INNER_ENABLED -0001290c g F .text 000000a8 text_print_size +000128d8 g F .text 000000a8 text_print_size 0000006c g O .sbss 00000001 curr_scene_setup 000000c0 g O .bss 00000200 alt_overrides -000134b0 g F .text 00000154 SetupMaskShopHelloDialogOverride +0001347c g F .text 00000154 SetupMaskShopHelloDialogOverride 000003e8 g O .data 00000010 medals_sprite 0000513c g F .text 00000064 interpolate -0000dc2c g F .text 00000078 bow_upgrade +0000dbf8 g F .text 00000078 bow_upgrade 00000000 *UND* 00000000 VERSION_STRING_TXT 00000584 g F .text 00000034 agony_vibrate_setup -0000d3f4 g F .text 00000090 give_silver_rupee +0000d3dc g F .text 00000090 give_silver_rupee 00000358 g O .data 00000010 item_digit_sprite 00006a08 g F .text 0000025c draw_file_message -0000827c g F .text 00000100 Item00_KillActorIfFlagIsSet -000079b8 g F .text 0000007c after_item_received +00008278 g F .text 00000100 Item00_KillActorIfFlagIsSet +000079b4 g F .text 0000007c after_item_received 00000000 *UND* 00000000 SPOILER_AVAILABLE -0000dabc g F .text 00000014 no_upgrade -0000f104 g F .text 00000224 update_navi_colors +0000da88 g F .text 00000014 no_upgrade +0000f0d0 g F .text 00000224 update_navi_colors 00006f3c g F .text 00000158 give_ganon_boss_key -00011af8 g F .text 0000000c Seeded_Rand_Seed -0000dfe0 g F .text 00000078 arrows_to_rupee +00011ac4 g F .text 0000000c Seeded_Rand_Seed +0000dfac g F .text 00000078 arrows_to_rupee 00000040 g O .sdata 00000004 a_note_font_glow_max 000002d0 g O .rodata 00000268 trade_quest_items -0000a150 g F .text 00000118 draw_gi_various_opa0_xlu1 +0000a138 g F .text 00000118 draw_gi_various_opa0_xlu1 00000518 g O .bss 00000010 active_override 00000018 g O .sdata 00000008 empty_dlist 00000068 g O .sbss 00000004 RANDOMIZER_RNG_SEED -00013238 g F .text 00000070 IsTradeItemTraded +00013204 g F .text 00000070 IsTradeItemTraded 00000000 *UND* 00000000 INCOMING_ITEM 00000068 g O .sdata 00000004 c_button 00000000 g O .sdata 00000004 dungeon_count -0000d194 g F .text 00000014 give_dungeon_item +0000d17c g F .text 00000014 give_dungeon_item 000029d8 g F .text 00000128 draw_background -0000de04 g F .text 00000068 nut_upgrade +0000ddd0 g F .text 00000068 nut_upgrade 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_PROP_OUTER_ENABLED -000077fc g F .text 00000068 push_coop_item +000077f8 g F .text 00000068 push_coop_item 00000008 g O .sdata 00000004 scene_fog_distance -0000e2bc g F .text 00000050 upgrade_key_model -0001155c g F .text 000001e4 draw_pot +0000e288 g F .text 00000050 upgrade_key_model +00011528 g F .text 000001e4 draw_pot 00000000 *UND* 00000000 CFG_BOMBCHU_TRAIL_OUTER_COLOR -000133d4 g F .text 00000068 SetBiggoronAnimationState -00012e64 g F .text 0000003c SaveFile_UnsetTradeItemAsTraded -0000ff60 g F .text 00000024 models_reset +000133a0 g F .text 00000068 SetBiggoronAnimationState +00012e30 g F .text 0000003c SaveFile_UnsetTradeItemAsTraded +0000ff2c g F .text 00000024 models_reset 00000000 *UND* 00000000 TIME_STRING_TXT 00000550 g F .text 00000008 agony_inside_radius_setup -00007f7c g F .text 000000f0 get_collectible_flag_offset -0000ccf0 g F .text 00000190 draw_gi_c_button_vertical -0000af80 g F .text 0000016c draw_gi_scales +00007f78 g F .text 000000f0 get_collectible_flag_offset +0000ccd8 g F .text 00000190 draw_gi_c_button_vertical +0000af68 g F .text 0000016c draw_gi_scales 0000100c g F .text 00000074 draw_forest_hallway_chest_base 000003c8 g O .data 00000010 quest_items_sprite -000078dc g F .text 00000070 after_key_received +000078d8 g F .text 00000070 after_key_received 00000000 *UND* 00000000 PLANDOMIZER_USED 00000084 g O .sbss 00000001 KAKARIKO_WEATHER_FORECAST -00013e6c g F .text 0000003c heap_alloc +00013e38 g F .text 0000003c heap_alloc 00000040 g O .sbss 00000004 active_item_row -0000e3a4 g F .text 00000070 after_game_state_update +0000e370 g F .text 00000070 after_game_state_update 00000000 *UND* 00000000 CFG_DUNGEON_INFO_REWARD_SUMMARY_ENABLE 00000040 g O .bss 00000080 outgoing_queue -0001178c g F .text 0000001c draw_flying_pot_hack -0000d484 g F .text 000000c4 give_silver_rupee_pouch +00011758 g F .text 0000001c draw_flying_pot_hack +0000d46c g F .text 000000c4 give_silver_rupee_pouch 00000bdc g F .text 00000024 get_chest_type -0000e1d0 g F .text 00000040 health_upgrade_cap +0000e19c g F .text 00000040 health_upgrade_cap 00002ff8 g F .text 00001ff4 draw_dungeon_info -0000e450 g F .text 0000004c after_scene_init +0000e41c g F .text 0000004c after_scene_init 00000000 *UND* 00000000 FONT_TEXTURE -0000ce80 g F .text 00000190 draw_gi_c_button_horizontal +0000ce68 g F .text 00000190 draw_gi_c_button_horizontal 00000000 *UND* 00000000 SRAM_SLOTS 00000000 *UND* 00000000 CFG_FILE_SELECT_HASH 00000100 g O .rodata 0000000c icon_sprites 00000000 *UND* 00000000 OCARINAS_SHUFFLED -000129d4 g F .text 00000170 text_flush_size -00007ce4 g F .text 0000028c get_item -0000a5f0 g F .text 00000144 draw_gi_various_opa10_xlu32 +000129a0 g F .text 00000170 text_flush_size +00007ce0 g F .text 0000028c get_item +0000a5d8 g F .text 00000144 draw_gi_various_opa10_xlu32 0000004c g O .sdata 00000004 a_note_glow_base 00000008 g O .sbss 00000004 CHEST_SIZE_MATCH_CONTENTS 00000000 *UND* 00000000 CFG_ADULT_TRADE_SHUFFLE 00000044 g O .sdata 00000004 a_note_font_glow_base 00000000 *UND* 00000000 CFG_RAINBOW_BOMBCHU_TRAIL_OUTER_ENABLED 00000000 *UND* 00000000 CFG_RAINBOW_SWORD_OUTER_ENABLED -0000d564 g F .text 0000001c give_magic +0000d54c g F .text 0000001c give_magic 00000348 g O .data 00000010 linkhead_skull_sprite 00000038 g O .sbss 00000004 active_item_text_id -00009854 g F .text 00000014 ice_trap_is_pending +0000983c g F .text 00000014 ice_trap_is_pending 00000528 g O .bss 00006000 cfg_item_overrides 00000020 g O .sdata 00000004 text_cursor_border_max -0000cbb8 g F .text 00000138 draw_gi_a_button +0000cba0 g F .text 00000138 draw_gi_a_button 00000000 *UND* 00000000 DPAD_TEXTURE 00000000 *UND* 00000000 SHUFFLE_CHEST_GAME -0000776c g F .text 00000090 push_pending_item -0000a268 g F .text 0000012c draw_rutos_letter -0000d23c g F .text 000000c8 give_small_key_ring +00007768 g F .text 00000090 push_pending_item +0000a250 g F .text 0000012c draw_rutos_letter +0000d224 g F .text 000000c8 give_small_key_ring 00000558 g F .text 0000002c agony_outside_radius_setup 00000000 *UND* 00000000 CFG_DPAD_DUNGEON_INFO_ENABLE -0001175c g F .text 00000030 draw_hba_pot_hack -00012ea0 g F .text 00000080 SaveFile_TradeItemIsTraded -00010900 g F .text 0000005c Health_IsCritical -0001343c g F .text 0000005c ShouldSkullKidSpawn +00011728 g F .text 00000030 draw_hba_pot_hack +00012e6c g F .text 00000080 SaveFile_TradeItemIsTraded +000108cc g F .text 0000005c Health_IsCritical +00013408 g F .text 0000005c ShouldSkullKidSpawn 00000034 g O .sbss 00000004 active_item_object_id 00000000 *UND* 00000000 CFG_RAINBOW_BOOM_TRAIL_INNER_ENABLED -0000dd20 g F .text 0000007c wallet_upgrade +0000dcec g F .text 0000007c wallet_upgrade 00000000 *UND* 00000000 EPONAS_SONG_NOTES -0000f8d4 g F .text 000000ec check_skeleton +0000f8a0 g F .text 000000ec check_skeleton 0000002c g O .sbss 00000004 active_item_fast_chest 00000028 g O .sbss 00000002 num_override_flags -0000d708 g F .text 0000007c unlock_ocarina_note +0000d6f0 g F .text 0000007c unlock_ocarina_note 00000054 g O .sdata 00000004 c_note_g 00006c64 g F .text 0000023c draw_file_select_hash -0000f610 g F .text 00000170 FindModelData +0000f5dc g F .text 00000170 FindModelData 00000034 g O .sdata 00000004 c_note_font_glow_base 00000a68 g F .text 0000002c set_bombchu_bowling_prize_flag 00000000 *UND* 00000000 MW_PROGRESSIVE_ITEMS_STATE @@ -394,105 +395,104 @@ SYMBOL TABLE: 00000000 *UND* 00000000 POTCRATE_TEXTURES_MATCH_CONTENTS 00001154 g F .text 000006dc handle_dpad 00000000 *UND* 00000000 START_TWINROVA_FIGHT -0000916c g F .text 000000f8 sprite_draw +00009154 g F .text 000000f8 sprite_draw 00000000 *UND* 00000000 CFG_BOOM_TRAIL_OUTER_COLOR 00000378 g O .data 00000010 key_rupee_clock_sprite -0000d150 g F .text 0000000c give_biggoron_sword -00011acc g F .text 0000002c Seeded_Rand_Next -00007630 g F .text 000000b0 push_outgoing_override -00008af0 g F .text 00000070 give_sarias_gift +0000d138 g F .text 0000000c give_biggoron_sword +00011a98 g F .text 0000002c Seeded_Rand_Next +0000762c g F .text 000000b0 push_outgoing_override +00008ae4 g F .text 00000070 give_sarias_gift 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_ENEMY_OUTER_ENABLED -00008138 g F .text 0000008c Set_CollectibleOverrideFlag +00008134 g F .text 0000008c Set_CollectibleOverrideFlag 00000038 g O .sdata 00000004 c_note_glow_max 00000000 *UND* 00000000 CFG_SLOWDOWN_MUSIC_WHEN_LOWHP -000101fc g F .text 00000064 heart_piece_draw +000101c8 g F .text 00000064 heart_piece_draw 00000000 *UND* 00000000 CFG_RAINBOW_BOMBCHU_TRAIL_INNER_ENABLED -00012d40 g F .text 0000003c SaveFile_UnsetTradeItemAsOwned -0000a734 g F .text 0000015c draw_gi_bullet_bags -00008c80 g F .text 000001a0 sprite_load -00009a64 g F .text 000000a4 draw_gi_sold_out -00008228 g F .text 00000054 Item_DropCollectible_Actor_Spawn_Override +00012d0c g F .text 0000003c SaveFile_UnsetTradeItemAsOwned +0000a71c g F .text 0000015c draw_gi_bullet_bags +00008c68 g F .text 000001a0 sprite_load +00009a4c g F .text 000000a4 draw_gi_sold_out +00008224 g F .text 00000054 Item_DropCollectible_Actor_Spawn_Override 000000dc g F .text 00000170 Actor_StoreChestType 000003f8 g O .data 00000010 stones_sprite 00000000 *UND* 00000000 NO_COLLECTIBLE_HEARTS 00000000 *UND* 00000000 OUTGOING_KEY 00000098 g O .sdata 00000004 text_width 0000015c g O .data 00000014 extern_ctxt -000130f0 g F .text 000000e8 UpdateTradeEquips -0000e058 g F .text 00000078 bombs_to_rupee +000130bc g F .text 000000e8 UpdateTradeEquips +0000e024 g F .text 00000078 bombs_to_rupee 00000028 g O .sdata 00000004 text_cursor_inner_max 0000005c g O .sdata 00000004 a_note_b 00000000 g O .sbss 00000004 EXTRA_BOWLING_SHUFFLE 00000000 *UND* 00000000 Gameplay_InitSkybox 000002d0 g O .data 00000040 num_to_bits 00000408 g O .data 00000028 setup_db -0000fc8c g F .text 00000060 get_object -0000d05c g F .text 000000bc give_triforce_piece +0000fc58 g F .text 00000060 get_object +0000d044 g F .text 000000bc give_triforce_piece 00001a2c g O .data 00001ebc item_table 00000000 *UND* 00000000 CFG_UNINVERT_YAXIS_IN_FIRST_PERSON_CAMERA 000003b8 g O .data 00000010 font_sprite 0000024c g F .text 00000050 Actor_After_UpdateAll_Hack -00010db8 g F .text 000000b4 get_smallcrate_override -0000002a g O .sbss 00000001 satisified_pending_frames -0000fd38 g F .text 00000068 scale_top_matrix -0000794c g F .text 0000006c pop_ice_trap -0000ac0c g F .text 00000118 draw_gi_recovery_heart +00010d84 g F .text 000000b4 get_smallcrate_override +0000fd04 g F .text 00000068 scale_top_matrix +00007948 g F .text 0000006c pop_ice_trap +0000abf4 g F .text 00000118 draw_gi_recovery_heart 00000004 g O .data 00000009 reward_rows 00000030 g O .bss 00000010 collectible_override 00000000 *UND* 00000000 TWINROVA_ACTION_TIMER -0000f3d8 g F .text 00000048 update_misc_colors +0000f3a4 g F .text 00000048 update_misc_colors 0000001c g O .sbss 00000001 GANON_BOSS_KEY_CONDITION -00008c50 g F .text 00000030 sprite_bytes -00013044 g F .text 000000ac SaveFile_PrevOwnedTradeItem +00008c38 g F .text 00000030 sprite_bytes +00013010 g F .text 000000ac SaveFile_PrevOwnedTradeItem 00000058 g O .sdata 00000004 c_note_r 00000000 *UND* 00000000 CFG_C_BUTTON_COLOR -0000dbb0 g F .text 0000007c bomb_bag_upgrade +0000db7c g F .text 0000007c bomb_bag_upgrade 000000a0 g O .sdata 00000004 Sram_InitNewSave -0000e59c g F .text 00000090 Message_AddCharacter -0000ded4 g F .text 00000060 magic_upgrade -0000da10 g F .text 00000030 resolve_item_text_id -000113f4 g F .text 000000b4 get_pot_override -0000db34 g F .text 0000007c strength_upgrade -0000d644 g F .text 00000090 open_mask_shop -0000fc64 g F .text 00000028 load_object -000126a4 g F .text 00000074 Save_Write_Hook -0000df70 g F .text 00000070 ocarina_upgrade -0000a890 g F .text 00000160 draw_gi_small_rupees -0000da40 g F .text 00000050 resolve_upgrades -00011364 g F .text 0000004c c_block_ocarina +0000e568 g F .text 00000090 Message_AddCharacter +0000dea0 g F .text 00000060 magic_upgrade +0000d9dc g F .text 00000030 resolve_item_text_id +000113c0 g F .text 000000b4 get_pot_override +0000db00 g F .text 0000007c strength_upgrade +0000d62c g F .text 00000090 open_mask_shop +0000fc30 g F .text 00000028 load_object +00012670 g F .text 00000074 Save_Write_Hook +0000df3c g F .text 00000070 ocarina_upgrade +0000a878 g F .text 00000160 draw_gi_small_rupees +0000da0c g F .text 00000050 resolve_upgrades +00011330 g F .text 0000004c c_block_ocarina 00000c00 g F .text 0000018c set_chest_texture 00000388 g O .data 00000010 song_note_sprite 00000000 *UND* 00000000 CFG_A_NOTE_COLOR 0000007c g O .sdata 00000004 normal_no_dd 00000f54 g F .text 000000a4 should_draw_forest_hallway_chest 0000006c g O .sdata 00000004 b_button -0001089c g F .text 00000064 bowling_heart_piece_draw -00011ba8 g F .text 000000b0 Save_Open -00009264 g F .text 00000208 gfx_init +00010868 g F .text 00000064 bowling_heart_piece_draw +00011b74 g F .text 000000b0 Save_Open +0000924c g F .text 00000208 gfx_init 00007108 g F .text 0000002c override_flags_init 00000084 g O .sdata 00000006 defaultDDHeart 0000003c g O .rodata 00000042 freecam_modes -0000d050 g F .text 0000000c full_heal +0000d038 g F .text 0000000c full_heal 00000050 g O .sdata 00000004 c_note_b -00008a14 g F .text 000000dc get_skulltula_token +00008a0c g F .text 000000d8 get_skulltula_token 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_IDLE_INNER_ENABLED 000065e8 g O .bss 00000016 extended_savectx -00008b60 g F .text 000000c4 fairy_ocarina_getitem -00009868 g F .text 00000018 push_pending_ice_trap +00008b54 g F .text 000000b8 fairy_ocarina_getitem +00009850 g F .text 00000018 push_pending_ice_trap 00000000 *UND* 00000000 CFG_DUNGEON_INFO_REWARD_ENABLE -0001075c g F .text 00000140 bowling_bomb_bag_draw -000110f8 g F .text 00000148 ObjKibako2_Draw +00010728 g F .text 00000140 bowling_bomb_bag_draw +000110c4 g F .text 00000148 ObjKibako2_Draw 00000000 *UND* 00000000 WORLD_STRING_TXT 00004fec g F .text 000000c8 EnItem00_OutgoingAction -00011b04 g F .text 00000014 Seeded_Reset +00011ad0 g F .text 00000014 Seeded_Reset 00000078 g O .sdata 00000004 beating_dd 000005b8 g F .text 00000158 draw_agony_graphic -0000e0d0 g F .text 00000080 seeds_to_rupee -0000d5a4 g F .text 0000000c give_fairy_ocarina -00010008 g F .text 0000004c lookup_model +0000e09c g F .text 00000080 seeds_to_rupee +0000d58c g F .text 0000000c give_fairy_ocarina +0000ffd4 g F .text 0000004c lookup_model 00000055 g O .sbss 00000001 OPEN_KAKARIKO 00000024 g O .sbss 00000004 collectible_override_flags -0000f420 g F .text 000001f0 draw_illegal_model_text +0000f3ec g F .text 000001f0 draw_illegal_model_text 00000000 *UND* 00000000 CHEST_LENS_ONLY 00000028 g O .data 00000134 dungeons 00000000 *UND* 00000000 CFG_CUSTOM_MESSAGE_2 @@ -502,178 +502,178 @@ SYMBOL TABLE: 00000000 *UND* 00000000 CFG_DUNGEON_IS_MQ 0000005c g O .sbss 00000001 missing_dlist 0000004c g O .sbss 00000004 dummy_actor -0000ea78 g F .text 000001a4 update_boomerang_trail_colors +0000ea44 g F .text 000001a4 update_boomerang_trail_colors 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_NPC_OUTER_ENABLED -0000c60c g F .text 000002d4 draw_gi_boss_altflip +0000c5f4 g F .text 000002d4 draw_gi_boss_altflip 00000000 *UND* 00000000 CFG_DUNGEON_INFO_REWARD_NEED_COMPASS 0000002c g O .sdata 00000004 text_cursor_inner_base 00000000 *UND* 00000000 CUSTOM_KEY_MODELS -000129b4 g F .text 00000020 text_print -00012ce4 g F .text 00000024 IsAdultTradeItem -0000d6d4 g F .text 00000018 give_bombchus -00011810 g F .text 00000068 EnTuboTrap_DropCollectible_Hack -0000ff84 g F .text 00000084 lookup_model_by_override +00012980 g F .text 00000020 text_print +00012cb0 g F .text 00000024 IsAdultTradeItem +0000d6bc g F .text 00000018 give_bombchus +000117dc g F .text 00000068 EnTuboTrap_DropCollectible_Hack +0000ff50 g F .text 00000084 lookup_model_by_override 0000003c g O .sdata 00000004 c_note_glow_base 00006ee8 g F .text 00000054 countSetBitsRec 0000001a g O .sbss 00000002 GANON_BOSS_KEY_CONDITION_COUNT -0000d118 g F .text 00000038 give_tycoon_wallet +0000d100 g F .text 00000038 give_tycoon_wallet 00000000 *UND* 00000000 CFG_RAINBOW_TUNIC_ENABLED 00000024 g O .sdata 00000004 text_cursor_border_base 00000050 g O .sbss 00000004 item_overrides_count -0000bbb0 g F .text 0000013c draw_gi_song_notes +0000bb98 g F .text 0000013c draw_gi_song_notes 00000000 *UND* 00000000 CFG_BOOM_TRAIL_INNER_COLOR -000117a8 g F .text 00000068 ObjTsubo_SpawnCollectible_Hack -00009cc4 g F .text 000000f0 draw_gi_various_opa1023 -00012ca0 g F .text 00000018 GetTradeItemMax -00012c88 g F .text 00000018 GetTradeItemMin -00007b04 g F .text 000001e0 handle_pending_items -0000df34 g F .text 0000003c bombchu_upgrade -0000c338 g F .text 000002d4 draw_gi_boss_altered +00011774 g F .text 00000068 ObjTsubo_SpawnCollectible_Hack +00009cac g F .text 000000f0 draw_gi_various_opa1023 +00012c6c g F .text 00000018 GetTradeItemMax +00012c54 g F .text 00000018 GetTradeItemMin +00007b00 g F .text 000001e0 handle_pending_items +0000df00 g F .text 0000003c bombchu_upgrade +0000c320 g F .text 000002d4 draw_gi_boss_altered 00000498 g F .text 000000b8 Player_SpawnEntry_Hack -0000fe6c g F .text 000000a8 draw_model +0000fe38 g F .text 000000a8 draw_model 00000000 *UND* 00000000 CFG_DUNGEON_INFO_SILVER_RUPEES -00012718 g F .text 000000b8 Save_Init_Write_Hook -0000d5e4 g F .text 00000018 give_bean_pack -00012cb8 g F .text 0000002c IsTradeItem -00009db4 g F .text 00000150 draw_gi_wallets -00010054 g F .text 000000e8 shop_draw -0000ee90 g F .text 00000274 get_bombchu_back_color -00011e9c g F .text 00000638 Sram_VerifyAndLoadAllSaves -0000d5b0 g F .text 00000018 give_song +000126e4 g F .text 000000b8 Save_Init_Write_Hook +0000d5cc g F .text 00000018 give_bean_pack +00012c84 g F .text 0000002c IsTradeItem +00009d9c g F .text 00000150 draw_gi_wallets +00010020 g F .text 000000e8 shop_draw +0000ee5c g F .text 00000274 get_bombchu_back_color +00011e68 g F .text 00000638 Sram_VerifyAndLoadAllSaves +0000d598 g F .text 00000018 give_song 00000004 g O .sdata 00000004 last_fog_distance 00000000 *UND* 00000000 FREE_BOMBCHU_DROPS -0000e210 g F .text 000000ac bombchus_to_bag +0000e1dc g F .text 000000ac bombchus_to_bag 0000008c g O .sdata 00000006 defaultHeart 00000060 g O .sdata 00000004 a_note_g -0000e30c g F .text 0000004c c_init -00013604 g F .text 00000268 TryPaybackMaskOverride -0001095c g F .text 00000178 manage_music_changes +0000e2d8 g F .text 0000004c c_init +000135d0 g F .text 00000268 TryPaybackMaskOverride +00010928 g F .text 00000178 manage_music_changes 00000000 *UND* 00000000 CFG_SPEEDUP_MUSIC_FOR_LAST_TRIFORCE_PIECE 00000000 *UND* 00000000 CFG_RAINBOW_BOOM_TRAIL_OUTER_ENABLED 00000398 g O .data 00000010 triforce_sprite 0000038c g F .text 0000010c Actor_SpawnEntry_Hack 00000000 *UND* 00000000 EXTERN_DAMAGE_MULTIPLYER 00000056 g O .sbss 00000001 MAX_RUPEES -0001048c g F .text 000002d0 item_etcetera_draw -0000d784 g F .text 000000b0 resolve_text_silver_rupees +00010458 g F .text 000002d0 item_etcetera_draw +0000d76c g F .text 000000b0 resolve_text_silver_rupees 00000000 *UND* 00000000 SPEED_MULTIPLIER 00005b18 g F .text 00000ea0 draw_file_icons -00012d08 g F .text 00000038 SaveFile_SetTradeItemAsOwned +00012cd4 g F .text 00000038 SaveFile_SetTradeItemAsOwned 0000003c g O .sbss 00000004 active_item_action_id -00007a34 g F .text 000000d0 try_pending_item -00009b08 g F .text 00000120 draw_gi_compass +00007a30 g F .text 000000d0 try_pending_item +00009af0 g F .text 00000120 draw_gi_compass 00003be0 g O .data 000001f0 texture_table -0000d5fc g F .text 0000002c fill_wallet_upgrade -000099a4 g F .text 000000c0 draw_gi_eggs_and_medallions +0000d5e4 g F .text 0000002c fill_wallet_upgrade +0000998c g F .text 000000c0 draw_gi_eggs_and_medallions 00000080 g O .sbss 00000004 heap_next 00000000 *UND* 00000000 TRIFORCE_ICON_TEXTURE 00000000 *UND* 00000000 MW_PROGRESSIVE_ITEMS_ENABLE -0000d5c8 g F .text 0000001c ice_trap_effect -00012f5c g F .text 0000003c SaveFile_MaskIsPaid -0000b9a8 g F .text 00000208 draw_gi_poe_bottles -0000e49c g F .text 00000100 c_equipment_menu_slot_filled -0000806c g F .text 000000cc Get_CollectibleOverrideFlag +0000d5b0 g F .text 0000001c ice_trap_effect +00012f28 g F .text 0000003c SaveFile_MaskIsPaid +0000b990 g F .text 00000208 draw_gi_poe_bottles +0000e468 g F .text 00000100 c_equipment_menu_slot_filled +00008068 g F .text 000000cc Get_CollectibleOverrideFlag 00000000 *UND* 00000000 FAST_CHESTS 00000000 *UND* 00000000 CURR_ACTOR_SPAWN_INDEX -0000d15c g F .text 00000038 give_bottle +0000d144 g F .text 00000038 give_bottle 00000000 g F .text 00000018 after_spawn_override_silver_rupee 00000000 *UND* 00000000 CFG_DUNGEON_INFO_REWARD_NEED_ALTAR 00000338 g O .data 00000010 heart_sprite 000008d8 g F .text 00000190 select_bombchu_bowling_prize 000071b0 g F .text 000000d0 lookup_override_by_key -0000f9c0 g F .text 00000238 check_model_skeletons -00007f70 g F .text 0000000c reset_collectible_mutex +0000f98c g F .text 00000238 check_model_skeletons +00007f6c g F .text 0000000c reset_collectible_mutex 00000048 g O .sbss 00000002 drop_collectible_override_flag 00000000 *UND* 00000000 SHUFFLE_SILVER_RUPEES -0000fbf8 g F .text 0000006c load_object_file -00008400 g F .text 000002c8 get_override_drop_id -0000ae2c g F .text 00000154 draw_gi_magic_spells -00010e6c g F .text 00000108 ObjKibako_Draw -000076e0 g F .text 0000008c move_outgoing_queue +0000fbc4 g F .text 0000006c load_object_file +000083fc g F .text 000002c8 get_override_drop_id +0000ae14 g F .text 00000154 draw_gi_magic_spells +00010e38 g F .text 00000108 ObjKibako_Draw +000076dc g F .text 0000008c move_outgoing_queue 00002ce0 g F .text 00000318 draw_silver_rupee_count 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_NPC_INNER_ENABLED 000039e8 g O .data 000000fc childSkeleton 00000004 g O .sbss 00000004 CHEST_SIZE_TEXTURE -0000fda0 g F .text 00000078 draw_model_low_level -0000b7bc g F .text 000001ec draw_gi_fairy_lantern -00010fd8 g F .text 0000006c ObjKibako2_SpawnCollectible_Hack -000112b8 g F .text 000000ac enitem00_set_link_incoming_item_id -0000b2bc g F .text 000001a4 draw_gi_mirror_shield +0000fd6c g F .text 00000078 draw_model_low_level +0000b7a4 g F .text 000001ec draw_gi_fairy_lantern +00010fa4 g F .text 0000006c ObjKibako2_SpawnCollectible_Hack +00011284 g F .text 000000ac enitem00_set_link_incoming_item_id +0000b2a4 g F .text 000001a4 draw_gi_mirror_shield 00000000 *UND* 00000000 PLAYER_NAMES -000132a8 g F .text 0000012c Inventory_ReplaceItem_Override +00013274 g F .text 0000012c Inventory_ReplaceItem_Override 00000000 *UND* 00000000 CFG_DUNGEON_INFO_MQ_NEED_MAP -00012818 g F .text 000000c8 get_current_scene_setup_number -00010ccc g F .text 000000ec ObjComb_Update -0000d010 g F .text 00000038 base_draw_gi_model +000127e4 g F .text 000000c8 get_current_scene_setup_number +00010c98 g F .text 000000ec ObjComb_Update +0000cff8 g F .text 00000038 base_draw_gi_model 00000000 *UND* 00000000 OUTGOING_ITEM -00010ad4 g F .text 000000ec get_beehive_override -00012db4 g F .text 00000078 SaveFile_UpdateShiftableItem -00013498 g F .text 00000018 IsCuccoGivenToCuccoLady +00010aa0 g F .text 000000ec get_beehive_override +00012d80 g F .text 00000078 SaveFile_UpdateShiftableItem +00013464 g F .text 00000018 IsCuccoGivenToCuccoLady 00000054 g O .sbss 00000001 COMPLETE_MASK_QUEST -000103c4 g F .text 00000064 skull_token_draw -000081c4 g F .text 00000064 Item_DropCollectible_Room_Hack -00012e2c g F .text 00000038 SaveFile_SetTradeItemAsTraded +00010390 g F .text 00000064 skull_token_draw +000081c0 g F .text 00000064 Item_DropCollectible_Room_Hack +00012df8 g F .text 00000038 SaveFile_SetTradeItemAsTraded 00000000 *UND* 00000000 CFG_TEXT_CURSOR_COLOR -0000bcec g F .text 0000019c draw_gi_small_keys +0000bcd4 g F .text 0000019c draw_gi_small_keys 00000e4c g F .text 000000c0 draw_chest_lid 00000290 g O .data 00000040 hash_symbols -000113b0 g F .text 00000044 can_spawn_epona -0000e888 g F .text 0000014c Message_Decode_Additional_Control_Codes +0001137c g F .text 00000044 can_spawn_epona +0000e854 g F .text 0000014c Message_Decode_Additional_Control_Codes 000051a0 g F .text 00000018 extern_scene_init -0000fcec g F .text 0000004c set_object_segment +0000fcb8 g F .text 0000004c set_object_segment 00000710 g F .text 000001c8 draw_agony -0000d8c0 g F .text 0000009c resolve_text_small_keys -00013e58 g F .text 00000014 heap_init +0000d8a8 g F .text 00000088 resolve_text_small_keys +00013e24 g F .text 00000014 heap_init 00001080 g F .text 000000d4 draw_forest_hallway_chest_lid -0000f7f4 g F .text 000000e0 FindHierarchy +0000f7c0 g F .text 000000e0 FindHierarchy 00000000 *UND* 00000000 CFG_RAINBOW_NAVI_PROP_INNER_ENABLED -00010360 g F .text 00000064 heart_container_draw -00009908 g F .text 0000009c draw_gi_bombchu_and_masks +0001032c g F .text 00000064 heart_container_draw +000098f0 g F .text 0000009c draw_gi_bombchu_and_masks 00006528 g O .bss 000000c0 object_slots -0000d1a8 g F .text 00000094 give_small_key +0000d190 g F .text 00000094 give_small_key 00000000 *UND* 00000000 CFG_DUNGEON_INFO_MQ_ENABLE 00000ff8 g F .text 00000014 get_dummy_chest 00000310 g O .data 00000015 items -0000b0ec g F .text 000001d0 draw_gi_potions +0000b0d4 g F .text 000001d0 draw_gi_potions 00000368 g O .data 00000010 rupee_digit_sprite 00000000 *UND* 00000000 C_HEAP -00008774 g F .text 000002a0 item_give_collectible -00011878 g F .text 0000022c get_rainbow_color +00008770 g F .text 0000029c item_give_collectible +00011844 g F .text 0000022c get_rainbow_color 00000000 *UND* 00000000 CFG_BOMBCHU_TRAIL_INNER_COLOR 00000000 *UND* 00000000 KEYRING_BOSSKEY_CONDITION 000072c0 g F .text 00000188 get_override_search_key 00000018 g O .sbss 00000001 NO_ESCAPE_SEQUENCE -000075dc g F .text 00000054 clear_override -00013dcc g F .text 0000008c manage_uninvert_yaxis -00011044 g F .text 000000b4 get_crate_override -0000a394 g F .text 00000130 draw_gi_coins_and_cuccos -000078a8 g F .text 00000034 pop_pending_item -00011b18 g F .text 00000048 Seeded_Rand_ZeroOne -0000d990 g F .text 00000044 resolve_text_keyrings -0000e7a0 g F .text 000000e8 Message_AddFileName +000075d8 g F .text 00000054 clear_override +00013d98 g F .text 0000008c manage_uninvert_yaxis +00011010 g F .text 000000b4 get_crate_override +0000a37c g F .text 00000130 draw_gi_coins_and_cuccos +000078a4 g F .text 00000034 pop_pending_item +00011ae4 g F .text 00000048 Seeded_Rand_ZeroOne +0000d964 g F .text 0000003c resolve_text_keyrings +0000e76c g F .text 000000e8 Message_AddFileName 00000f0c g F .text 00000048 draw_chest 00000000 *UND* 00000000 CFG_A_BUTTON_COLOR 00000000 *UND* 00000000 FIX_BROKEN_DROPS 00000000 *UND* 00000000 GET_ITEM_SEQ_ID -00008c24 g F .text 0000002c sprite_bytes_per_tile -0000d9d4 g F .text 0000003c get_item_row +00008c0c g F .text 0000002c sprite_bytes_per_tile +0000d9a0 g F .text 0000003c get_item_row 00000000 *UND* 00000000 DISABLE_TIMERS -00013ea8 g F .text 00000044 file_init -000114a8 g F .text 000000b4 get_flying_pot_override -0000f328 g F .text 000000b0 update_tunic_colors +00013e74 g F .text 00000044 file_init +00011474 g F .text 000000b4 get_flying_pot_override +0000f2f4 g F .text 000000b0 update_tunic_colors 00000020 g O .sbss 00000004 collectible_mutex 00000124 g O .rodata 0000000c rupee_colors -0000d6ec g F .text 0000001c trade_quest_upgrade +0000d6d4 g F .text 0000001c trade_quest_upgrade 00000000 *UND* 00000000 EXTENDED_OBJECT_TABLE -000138b0 g F .text 00000508 draw_triforce_count +0001387c g F .text 00000508 draw_triforce_count 00000000 *UND* 00000000 PLAYER_NAME_ID -00012be0 g F .text 00000020 GetTradeItemIndex +00012bac g F .text 00000020 GetTradeItemIndex 00000000 *UND* 00000000 CFG_TUNIC_COLORS 00000d8c g F .text 000000c0 draw_chest_base -0000e71c g F .text 00000084 Message_AddString +0000e6e8 g F .text 00000084 Message_AddString 00000000 *UND* 00000000 TRIFORCE_HUNT_ENABLED -0000ad24 g F .text 00000108 draw_gi_fish_bottle -0000ff14 g F .text 0000004c models_init +0000ad0c g F .text 00000108 draw_gi_fish_bottle +0000fee0 g F .text 0000004c models_init 00001a08 g O .data 00000022 key_counts diff --git a/ASM/c/actor.c b/ASM/c/actor.c index f3a192a07..6a675eea7 100644 --- a/ASM/c/actor.c +++ b/ASM/c/actor.c @@ -26,7 +26,7 @@ extern int8_t curr_scene_setup; // Called at the end of Actor_SetWorldToHome // Reset the rotations for any actors that we may have passed data in through Actor_Spawn -void Actor_SetWorldToHome_End(z64_actor_t *actor) { +void Actor_SetWorldToHome_End(z64_actor_t* actor) { switch (actor->actor_id) { case BG_HAKA_TUBO: case BG_SPOT18_BASKET: @@ -50,7 +50,7 @@ void Actor_SetWorldToHome_End(z64_actor_t *actor) { // Otherwise the actor would be rotated :) // Now that we resized pots/crates/beehives we could probably just store this info in new space in the actor. But this works for now. // Prior to being called, CURR_ACTOR_SPAWN_INDEX is set to the current position in the actor spawn list. -void Actor_After_UpdateAll_Hack(z64_actor_t *actor, z64_game_t *game) { +void Actor_After_UpdateAll_Hack(z64_actor_t* actor, z64_game_t* game) { Actor_StoreFlagInRotation(actor, game, CURR_ACTOR_SPAWN_INDEX); Actor_StoreChestType(actor, game); @@ -59,7 +59,7 @@ void Actor_After_UpdateAll_Hack(z64_actor_t *actor, z64_game_t *game) { // For pots/crates/beehives, store the flag in the actor's unused initial rotation fields // Flag consists of the room # and the actor index -void Actor_StoreFlagInRotation(z64_actor_t *actor, z64_game_t *game, uint16_t actor_index) { +void Actor_StoreFlagInRotation(z64_actor_t* actor, z64_game_t* game, uint16_t actor_index) { uint16_t flag = actor_index | (actor->room_index << 8); // Calculate the flag switch (actor->actor_id) { // For the following actors we store the flag in the z rotation @@ -89,26 +89,26 @@ void Actor_StoreChestType(z64_actor_t* actor, z64_game_t* game) { if (actor->actor_id == OBJ_TSUBO) { // Pots override = get_pot_override(actor, game); - pChestType = &(((ObjTsubo *)actor)->chest_type); + pChestType = &(((ObjTsubo*)actor)->chest_type); } else if (actor->actor_id == EN_TUBO_TRAP) { // Flying Pots override = get_flying_pot_override(actor, game); - pChestType = &(((EnTuboTrap *)actor)->chest_type); + pChestType = &(((EnTuboTrap*)actor)->chest_type); } else if (actor->actor_id == OBJ_KIBAKO2) { // Large Crates override = get_crate_override(actor, game); - pChestType = &(((ObjKibako2 *)actor)->chest_type); + pChestType = &(((ObjKibako2*)actor)->chest_type); } else if (actor->actor_id == OBJ_KIBAKO) { // Small wooden crates override = get_smallcrate_override(actor, game); - pChestType = &(((ObjKibako *)actor)->chest_type); + pChestType = &(((ObjKibako*)actor)->chest_type); } else if (actor->actor_id == OBJ_COMB) { override = get_beehive_override(actor, game); - pChestType = &(((ObjComb *)actor)->chest_type); + pChestType = &(((ObjComb*)actor)->chest_type); } if (override.key.all != 0 && pChestType != NULL) { // If we don't have an override key, then either this item doesn't have an override entry, or it has already been collected. 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) { + } 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); + 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); } @@ -119,9 +119,9 @@ void Actor_StoreChestType(z64_actor_t* actor, z64_game_t* game) { } } -typedef void(*actor_after_spawn_func)(z64_actor_t* actor, bool overridden); +typedef void (*actor_after_spawn_func)(z64_actor_t* actor, bool overridden); -z64_actor_t *Actor_SpawnEntry_Hack(void *actorCtx, ActorEntry *actorEntry, z64_game_t *globalCtx) { +z64_actor_t* Actor_SpawnEntry_Hack(void* actorCtx, ActorEntry* actorEntry, z64_game_t* globalCtx) { bool continue_spawn = true; bool overridden = false; actor_after_spawn_func after_spawn_func = NULL; @@ -135,11 +135,11 @@ z64_actor_t *Actor_SpawnEntry_Hack(void *actorCtx, ActorEntry *actorEntry, z64_g break; } } - z64_actor_t *spawned = NULL; + z64_actor_t* spawned = NULL; if (continue_spawn) { spawned = z64_SpawnActor(actorCtx, globalCtx, actorEntry->id, actorEntry->pos.x, actorEntry->pos.y, actorEntry->pos.z, actorEntry->rot.x, actorEntry->rot.y, actorEntry->rot.z, actorEntry->params); - if(spawned && after_spawn_func) { + if (spawned && after_spawn_func) { after_spawn_func(spawned, overridden); } } @@ -147,7 +147,7 @@ z64_actor_t *Actor_SpawnEntry_Hack(void *actorCtx, ActorEntry *actorEntry, z64_g } // Override silver rupee spawns. -bool spawn_override_silver_rupee(ActorEntry *actorEntry, z64_game_t *globalCtx, bool* overridden) { +bool spawn_override_silver_rupee(ActorEntry* actorEntry, z64_game_t* globalCtx, bool* overridden) { *overridden = false; if (SHUFFLE_SILVER_RUPEES) { // Check if silver rupee shuffle is enabled. // Build a dummy enitem00 actor @@ -176,16 +176,15 @@ bool spawn_override_silver_rupee(ActorEntry *actorEntry, z64_game_t *globalCtx, } // After silver rupee spawns as enitem00 -void after_spawn_override_silver_rupee(z64_actor_t* spawned, bool overridden) -{ - if(overridden) { +void after_spawn_override_silver_rupee(z64_actor_t* spawned, bool overridden) { + if (overridden) { EnItem00* this = (EnItem00*)spawned; this->is_silver_rupee = true; - this->collider.info.bumper.dmgFlags = 0; //Remove clear the bumper collider flags so it doesn't interact w/ boomerang + this->collider.info.bumper.dmgFlags = 0; // Remove clear the bumper collider flags so it doesn't interact w/ boomerang } } -z64_actor_t *Player_SpawnEntry_Hack(void *actorCtx, ActorEntry *playerEntry, z64_game_t *globalCtx) { +z64_actor_t* Player_SpawnEntry_Hack(void* actorCtx, ActorEntry* playerEntry, z64_game_t* globalCtx) { if (z64_file.entrance_index == 0x423) { playerEntry->pos.y = 1000; playerEntry->pos.z = -1960; diff --git a/ASM/c/actor.h b/ASM/c/actor.h index ef0f3ad99..f786dcf28 100644 --- a/ASM/c/actor.h +++ b/ASM/c/actor.h @@ -4,11 +4,11 @@ #include "z64.h" #include -void Actor_SetWorldToHome_End(z64_actor_t *actor); -void Actor_After_UpdateAll_Hack(z64_actor_t *actor, z64_game_t *game); -void Actor_StoreFlagInRotation(z64_actor_t *actor, z64_game_t *game, uint16_t actor_index); -void Actor_StoreChestType(z64_actor_t *actor, z64_game_t *game); -z64_actor_t *Actor_SpawnEntry_Hack(void *actorCtx, ActorEntry *actorEntry, z64_game_t *globalCtx); -bool spawn_override_silver_rupee(ActorEntry *actorEntry, z64_game_t *globalCtx, bool* overridden); +void Actor_SetWorldToHome_End(z64_actor_t* actor); +void Actor_After_UpdateAll_Hack(z64_actor_t* actor, z64_game_t* game); +void Actor_StoreFlagInRotation(z64_actor_t* actor, z64_game_t* game, uint16_t actor_index); +void Actor_StoreChestType(z64_actor_t* actor, z64_game_t* game); +z64_actor_t* Actor_SpawnEntry_Hack(void* actorCtx, ActorEntry* actorEntry, z64_game_t* globalCtx); +bool spawn_override_silver_rupee(ActorEntry* actorEntry, z64_game_t* globalCtx, bool* overridden); void after_spawn_override_silver_rupee(z64_actor_t* actor, bool overridden); #endif diff --git a/ASM/c/agony.c b/ASM/c/agony.c index 19d50ac6c..1cef5f3a5 100755 --- a/ASM/c/agony.c +++ b/ASM/c/agony.c @@ -70,7 +70,7 @@ void draw_agony_graphic(int hoffset, int voffset, unsigned char alpha) { alpha = maxalpha; } - z64_disp_buf_t *db = &(z64_ctxt.gfx->overlay); + z64_disp_buf_t* db = &(z64_ctxt.gfx->overlay); gSPDisplayList(db->p++, &setup_db); gDPPipeSync(db->p++); gDPSetCombineMode(db->p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); @@ -97,7 +97,7 @@ void draw_agony() { if (scene_index != dungeons[i].index) continue; dungeon_entry_t dungeon = dungeons[i]; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[dungeon.index] ? dungeon.silver_rupee_puzzles_mq : dungeon.silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[dungeon.index] ? dungeon.silver_rupee_puzzles_mq : dungeon.silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; silver_rupee_data_t silver_rupee_info = silver_rupee_vars[silver_rupee_puzzles[puzzle_idx]][CFG_DUNGEON_IS_MQ[dungeon.index]]; @@ -112,4 +112,3 @@ void draw_agony() { draw_agony_graphic(hoffset, voffset, alpha); } } - diff --git a/ASM/c/chests.c b/ASM/c/chests.c index f34ad85ab..674942868 100644 --- a/ASM/c/chests.c +++ b/ASM/c/chests.c @@ -12,7 +12,7 @@ #define CHEST_BASE 1 #define CHEST_LID 3 -#define box_obj_idx(actor) ((int8_t *)actor)[0x015A] // forest_hallway_actor->box_obj_idx +#define box_obj_idx(actor) ((int8_t*)actor)[0x015A] // forest_hallway_actor->box_obj_idx #define OBJECT_BOX 0x000E extern uint8_t SHUFFLE_CHEST_GAME; @@ -23,8 +23,8 @@ uint32_t CHEST_SIZE_TEXTURE = 0; extern Mtx_t* write_matrix_stack_top(z64_gfx_t* gfx); asm(".equ write_matrix_stack_top, 0x800AB900"); -void get_chest_override(z64_actor_t *actor) { - Chest *chest = (Chest *)actor; +void get_chest_override(z64_actor_t* actor) { + Chest* chest = (Chest*)actor; uint8_t size = chest->en_box.type; uint8_t color = size; @@ -34,7 +34,7 @@ void get_chest_override(z64_actor_t *actor) { override_t override = lookup_override(actor, scene, item_id); if (override.value.base.item_id != 0) { - item_row_t *item_row = get_item_row(override.value.looks_like_item_id); + item_row_t* item_row = get_item_row(override.value.looks_like_item_id); if (item_row == NULL) { item_row = get_item_row(override.value.base.item_id); } @@ -60,18 +60,16 @@ void get_chest_override(z64_actor_t *actor) { } } -uint8_t get_chest_type(z64_actor_t *actor) -{ - uint8_t chest_type = ((Chest *)actor)->color; - if (CHEST_SIZE_MATCH_CONTENTS && chest_type == SILVER_CHEST) - { +uint8_t get_chest_type(z64_actor_t* actor) { + uint8_t chest_type = ((Chest*)actor)->color; + if (CHEST_SIZE_MATCH_CONTENTS && chest_type == SILVER_CHEST) { chest_type = GOLD_CHEST; } return chest_type; } -void set_chest_texture(z64_gfx_t *gfx, uint8_t chest_type, Gfx **opa_ptr) { +void set_chest_texture(z64_gfx_t* gfx, uint8_t chest_type, Gfx** opa_ptr) { //set texture type void* frontTexture = (void*)BROWN_FRONT_TEXTURE; void* baseTexture = (void*)BROWN_BASE_TEXTURE; @@ -117,55 +115,41 @@ void set_chest_texture(z64_gfx_t *gfx, uint8_t chest_type, Gfx **opa_ptr) { gSPSegment((*opa_ptr)++, 0x09, gfx->poly_opa.d); } -void draw_chest_base(z64_game_t *game, z64_actor_t *actor, Gfx **opa_ptr) -{ - z64_gfx_t *gfx = game->common.gfx; +void draw_chest_base(z64_game_t* game, z64_actor_t* actor, Gfx** opa_ptr) { + z64_gfx_t* gfx = game->common.gfx; uint8_t chest_type = get_chest_type(actor); gSPMatrix((*opa_ptr)++, write_matrix_stack_top(gfx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (chest_type != GOLD_CHEST) - { + if (chest_type != GOLD_CHEST) { set_chest_texture(gfx, chest_type, opa_ptr); gSPDisplayList((*opa_ptr)++, 0x060006F0); - } - else - { + } else { gSPDisplayList((*opa_ptr)++, 0x06000AE8); } } -void draw_chest_lid(z64_game_t *game, z64_actor_t *actor, Gfx **opa_ptr) -{ - z64_gfx_t *gfx = game->common.gfx; +void draw_chest_lid(z64_game_t* game, z64_actor_t* actor, Gfx** opa_ptr) { + z64_gfx_t* gfx = game->common.gfx; uint8_t chest_type = get_chest_type(actor); gSPMatrix((*opa_ptr)++, write_matrix_stack_top(gfx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (chest_type != GOLD_CHEST) - { + if (chest_type != GOLD_CHEST) { set_chest_texture(gfx, chest_type, opa_ptr); gSPDisplayList((*opa_ptr)++, 0x060010C0); - } - else - { + } else { gSPDisplayList((*opa_ptr)++, 0x06001678); } } -void draw_chest(z64_game_t *game, int32_t part, void *unk, void *unk2, z64_actor_t *actor, Gfx **opa_ptr) -{ - if (part == CHEST_BASE) - { +void draw_chest(z64_game_t* game, int32_t part, void* unk, void* unk2, z64_actor_t* actor, Gfx** opa_ptr) { + if (part == CHEST_BASE) { draw_chest_base(game, actor, opa_ptr); - } - else if (part == CHEST_LID) - { + } else if (part == CHEST_LID) { draw_chest_lid(game, actor, opa_ptr); } } -_Bool should_draw_forest_hallway_chest(z64_actor_t *actor, z64_game_t *game) -{ +_Bool should_draw_forest_hallway_chest(z64_actor_t* actor, z64_game_t* game) { // Do not draw the chest if it is invisible, not open, and lens is not active - if (CHEST_LENS_ONLY && !(game->chest_flags & 0x4000) && !game->actor_ctxt.lens_active) - { + if (CHEST_LENS_ONLY && !(game->chest_flags & 0x4000) && !game->actor_ctxt.lens_active) { return false; } @@ -175,37 +159,32 @@ _Bool should_draw_forest_hallway_chest(z64_actor_t *actor, z64_game_t *game) && z64_ObjectIsLoaded(&game->obj_ctxt, box_obj_idx(actor)); } -void get_dummy_chest(Chest *dummy_chest) -{ +void get_dummy_chest(Chest* dummy_chest) { z64_actor_t dummy_actor; dummy_actor.actor_id = 0x000A; dummy_actor.variable = 0x27EE; dummy_chest->en_box.dyna.actor = dummy_actor; } -void draw_forest_hallway_chest_base() -{ +void draw_forest_hallway_chest_base() { // Use dummy forest hallway chest actor instance to get override Chest dummy_chest; get_dummy_chest(&dummy_chest); - get_chest_override((z64_actor_t *)&dummy_chest); - if (dummy_chest.size == SMALL_CHEST) - { + get_chest_override((z64_actor_t*)&dummy_chest); + if (dummy_chest.size == SMALL_CHEST) { // Just scaled the matrix by 0.01 so matrix is now scaled by 0.005 scale_sys_matrix(0.5f, 0.5f, 0.5f, 1); } - draw_chest_base(&z64_game, (z64_actor_t *)&dummy_chest, &z64_game.common.gfx->poly_opa.p); + draw_chest_base(&z64_game, (z64_actor_t*)&dummy_chest, &z64_game.common.gfx->poly_opa.p); } -void draw_forest_hallway_chest_lid() -{ +void draw_forest_hallway_chest_lid() { // Use dummy forest hallway chest actor instance to get override Chest dummy_chest; get_dummy_chest(&dummy_chest); - get_chest_override((z64_actor_t *)&dummy_chest); - if (dummy_chest.size == SMALL_CHEST) - { + get_chest_override((z64_actor_t*)&dummy_chest); + if (dummy_chest.size == SMALL_CHEST) { // Just scaled the matrix by 0.01 so matrix is now scaled by 0.005 scale_sys_matrix(0.5f, 0.5f, 0.5f, 1); @@ -219,5 +198,5 @@ void draw_forest_hallway_chest_lid() } } - draw_chest_lid(&z64_game, (z64_actor_t *)&dummy_chest, &z64_game.common.gfx->poly_opa.p); + draw_chest_lid(&z64_game, (z64_actor_t*)&dummy_chest, &z64_game.common.gfx->poly_opa.p); } diff --git a/ASM/c/chests.h b/ASM/c/chests.h index 8b7af902e..439de1ae2 100644 --- a/ASM/c/chests.h +++ b/ASM/c/chests.h @@ -12,7 +12,7 @@ extern uint32_t CHEST_LENS_ONLY; struct EnBox; -typedef void (*EnBoxActionFunc)(struct EnBox *, z64_game_t *); +typedef void (*EnBoxActionFunc)(struct EnBox*, z64_game_t*); typedef struct EnBox { @@ -41,9 +41,9 @@ typedef struct Chest /* 0x01ED */ uint8_t color; // added for rando } Chest; // size = 0x01EE -void get_chest_override(z64_actor_t *actor); -void draw_chest(z64_game_t *game, int32_t part, void *unk, void *unk2, z64_actor_t *actor, Gfx **opa_ptr); -_Bool should_draw_forest_hallway_chest(z64_actor_t *actor, z64_game_t *game); +void get_chest_override(z64_actor_t* actor); +void draw_chest(z64_game_t* game, int32_t part, void* unk, void* unk2, z64_actor_t* actor, Gfx** opa_ptr); +_Bool should_draw_forest_hallway_chest(z64_actor_t* actor, z64_game_t* game); void draw_forest_hallway_chest_base(); void draw_forest_hallway_chest_lid(); diff --git a/ASM/c/dpad.c b/ASM/c/dpad.c index 7a7c07ebd..6a43dc7ce 100644 --- a/ASM/c/dpad.c +++ b/ASM/c/dpad.c @@ -9,8 +9,8 @@ extern uint8_t CFG_DISPLAY_DPAD; //unknown 02 is a pointer to some kind of audio configuration Always 801043A0 in my testing //unknown 03 is always a3 in my testing //unknown 04 is always a3 + 0x08 in my testing (801043A8) -typedef void(*playsfx_t)(uint16_t sfx, z64_xyzf_t *unk_00_, int8_t unk_01_ , float *unk_02_, float *unk_03_, float *unk_04_); -typedef void(*usebutton_t)(z64_game_t *game, z64_link_t *link, uint8_t item, uint8_t button); +typedef void(*playsfx_t)(uint16_t sfx, z64_xyzf_t* unk_00_, int8_t unk_01_ , float* unk_02_, float* unk_03_, float* unk_04_); +typedef void(*usebutton_t)(z64_game_t* game, z64_link_t* link, uint8_t item, uint8_t button); #define z64_playsfx ((playsfx_t) 0x800C806C) #define z64_usebutton ((usebutton_t) 0x8038C9A0) @@ -68,7 +68,7 @@ void handle_dpad() { } void draw_dpad_and_menu_utilities() { - z64_disp_buf_t *db = &(z64_ctxt.gfx->overlay); + z64_disp_buf_t* db = &(z64_ctxt.gfx->overlay); if (CAN_DRAW_DUNGEON_INFO || (DISPLAY_DPAD && CFG_DISPLAY_DPAD) || CAN_DRAW_TRADE_DPAD || CAN_DRAW_OCARINA_BUTTONS) { gSPDisplayList(db->p++, &setup_db); @@ -220,15 +220,13 @@ void draw_dpad_and_menu_utilities() { if (z64_file.items[Z64_SLOT_CHILD_TRADE] >= Z64_ITEM_WEIRD_EGG && z64_file.items[Z64_SLOT_CHILD_TRADE] <= Z64_ITEM_MASK_OF_TRUTH && z64_file.link_age == 1) { if (!CAN_USE_DPAD || !CAN_USE_CHILD_TRADE) { gDPSetPrimColor(db->p++, 0, 0, 0xFF, 0xFF, 0xFF, alpha * 0x46 / 0xFF); - } - else { + } else { gDPSetPrimColor(db->p++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); } sprite_load(db, &items_sprite, z64_file.items[Z64_SLOT_CHILD_TRADE], 1); if (z64_link.current_mask >= 1 && z64_link.current_mask <= 9) { sprite_draw(db, &items_sprite, 0, left_main_dpad + 12, top_main_dpad, 16, 16); - } - else { + } else { sprite_draw(db, &items_sprite, 0, left_main_dpad + 14, top_main_dpad + 2, 12, 12); } } @@ -247,4 +245,3 @@ void draw_dpad_and_menu_utilities() { gDPPipeSync(db->p++); } } - diff --git a/ASM/c/dungeon_info.c b/ASM/c/dungeon_info.c index f15bd238c..96ab08fc0 100644 --- a/ASM/c/dungeon_info.c +++ b/ASM/c/dungeon_info.c @@ -64,7 +64,7 @@ extern uint8_t CFG_DUNGEON_INFO_SILVER_RUPEES; extern extended_savecontext_static_t extended_savectx; extern silver_rupee_data_t silver_rupee_vars[0x16][2]; -void draw_background(z64_disp_buf_t *db, int bg_left, int bg_top, int bg_width, int bg_height) { +void draw_background(z64_disp_buf_t* db, int bg_left, int bg_top, int bg_width, int bg_height) { gDPSetCombineMode(db->p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); gDPSetPrimColor(db->p++, 0, 0, 0x00, 0x00, 0x00, 0xD0); gSPTextureRectangle(db->p++, @@ -88,7 +88,7 @@ int d_right_dungeon_idx(int i) { } // Helper function for drawing numbers to the HUD. -void draw_int(z64_disp_buf_t *db, uint16_t number, int16_t left, int16_t top, colorRGBA8_t color) { +void draw_int(z64_disp_buf_t* db, uint16_t number, int16_t left, int16_t top, colorRGBA8_t color) { uint8_t digits[10]; uint8_t j = 0; // Extract each digit. They are added, in reverse order, to digits[] @@ -97,22 +97,22 @@ void draw_int(z64_disp_buf_t *db, uint16_t number, int16_t left, int16_t top, co number = number / 10; j++; } - while ( number > 0 ); + while (number > 0); // This combiner mode makes it look like the rupee count gDPSetCombineLERP(db->p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, - TEXEL0, 0, PRIMITIVE, 0); + TEXEL0, 0, PRIMITIVE, 0); // Set the color gDPSetPrimColor(db->p++, 0, 0, color.r, color.g, color.b, color.a); // Draw each digit - for(uint8_t c = j; c > 0; c--) { + for (uint8_t c = j; c > 0; c--) { sprite_texture(db, &rupee_digit_sprite, digits[c-1], left, top, 8, 16); left += 8; } } // When in a silver rupee room, draw the silver rupee count for that room. -void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t *db) { +void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t* db) { if (!CFG_DUNGEON_INFO_SILVER_RUPEES) return; uint8_t scene = globalCtx->scene_index; @@ -122,7 +122,7 @@ void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t *db) { if (scene != dungeons[i].index) continue; dungeon_entry_t dungeon = dungeons[i]; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[dungeon.index] ? dungeon.silver_rupee_puzzles_mq : dungeon.silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[dungeon.index] ? dungeon.silver_rupee_puzzles_mq : dungeon.silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; silver_rupee_data_t silver_rupee_info = silver_rupee_vars[silver_rupee_puzzles[puzzle_idx]][CFG_DUNGEON_IS_MQ[dungeon.index]]; @@ -147,7 +147,7 @@ void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t *db) { 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) { + if (count >= silver_rupee_info.needed_count) { color.r = 120; color.g = 255; color.b = 0; @@ -159,7 +159,8 @@ void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t *db) { } } } -void draw_dungeon_info(z64_disp_buf_t *db) { + +void draw_dungeon_info(z64_disp_buf_t* db) { pad_t pad_held = z64_ctxt.input[0].raw.pad; int draw = CAN_DRAW_DUNGEON_INFO && !CAN_DRAW_TRADE_DPAD && ( ((pad_held.dl || pad_held.dr || pad_held.dd) && CFG_DPAD_DUNGEON_INFO_ENABLE) || @@ -230,7 +231,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &medals_sprite, 0, medals_sprite.tile_count); for (int i = 0; i < non_chest_game_dungeon_count; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (CFG_DUNGEON_INFO_REWARD_NEED_COMPASS && !z64_file.dungeon_items[d->index].compass) { continue; } @@ -251,7 +252,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { } else if (reward == 5) { reward_index = 0; } - medal_t *c = &(medals[reward_index]); + medal_t* c = &(medals[reward_index]); gDPSetPrimColor(db->p++, 0, 0, c->r, c->g, c->b, 0xFF); int top = start_top + ((icon_size + padding) * i); @@ -268,7 +269,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &stones_sprite, 0, stones_sprite.tile_count); for (int i = 0; i < non_chest_game_dungeon_count; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (CFG_DUNGEON_INFO_REWARD_NEED_COMPASS && !z64_file.dungeon_items[d->index].compass) { continue; } @@ -286,7 +287,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { // Draw dungeon names for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); int top = start_top + ((icon_size + padding) * i) + 1; text_print_size(d->name, left, top, font_width); } @@ -301,7 +302,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 17, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (!d->has_keys) continue; int8_t current_keys = z64_file.dungeon_keys[d->index]; @@ -327,7 +328,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 14, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); // Replace index 13 (Ganon's Castle) with 10 (Ganon's Tower) int index = d->index == 13 ? 10 : d->index; @@ -343,7 +344,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 10, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (d->has_card && z64_file.gerudos_card) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -362,7 +363,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 16, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (d->has_map && z64_file.dungeon_items[d->index].map) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -377,7 +378,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 15, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (d->has_map && z64_file.dungeon_items[d->index].compass) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -394,7 +395,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 11, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (d->skulltulas && z64_file.gs_flags[d->index ^ 0x03] == d->skulltulas) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -409,12 +410,12 @@ void draw_dungeon_info(z64_disp_buf_t *db) { if (show_mq) { for (int i = 0; i < non_chest_game_dungeon_count; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); if (CFG_DUNGEON_INFO_MQ_NEED_MAP && d->has_map && !z64_file.dungeon_items[d->index].map) { continue; } - char *str = CFG_DUNGEON_IS_MQ[d->index] ? "MQ" : "Normal"; + char* str = CFG_DUNGEON_IS_MQ[d->index] ? "MQ" : "Normal"; int top = start_top + ((icon_size + padding) * i) + 1; text_print_size(str, left, top, font_width); } @@ -429,9 +430,9 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &key_rupee_clock_sprite, 1, 1); for (int i = 0; i < dungeon_count; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); bool show_silver_rupees = false; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; uint8_t count = extended_savectx.silver_rupee_counts[silver_rupee_puzzles[puzzle_idx]]; @@ -453,9 +454,9 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &font_sprite, 16, 10); // load characters 0 through 9 for (int i = 0; i < dungeon_count; i++) { - dungeon_entry_t *d = &(dungeons[i]); + dungeon_entry_t* d = &(dungeons[i]); bool show_silver_rupees = false; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; uint8_t rupee_count = extended_savectx.silver_rupee_counts[silver_rupee_puzzles[puzzle_idx]]; @@ -521,7 +522,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &medals_sprite, 0, medals_sprite.tile_count); for (int i = 3; i < 9; i++) { - medal_t *medal = &(medals[i - 3]); + medal_t* medal = &(medals[i - 3]); gDPSetPrimColor(db->p++, 0, 0, medal->r, medal->g, medal->b, 0xFF); int top = start_top + ((icon_size + padding) * i); @@ -563,7 +564,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { break; case 2: if (i != 3) { // always display Light Medallion - dungeon_entry_t *d = &(dungeons[i - (i < 3 ? 0 : 1)]); // vanilla location of the reward + dungeon_entry_t* d = &(dungeons[i - (i < 3 ? 0 : 1)]); // vanilla location of the reward display_area = z64_file.dungeon_items[d->index].compass; } break; @@ -605,7 +606,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { // Draw dungeon names for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically int top = start_top + ((icon_size + padding) * i) + 1; text_print(d->name, left, top); } @@ -619,7 +620,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 17, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically if (!d->has_keys) continue; int8_t current_keys = z64_file.dungeon_keys[d->index]; @@ -644,7 +645,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 14, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically // Replace index 13 (Ganon's Castle) with 10 (Ganon's Tower) int index = d->index == 13 ? 10 : d->index; @@ -660,7 +661,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 10, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically if (d->has_card && z64_file.gerudos_card) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -676,9 +677,9 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &key_rupee_clock_sprite, 1, 1); for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); // skip Deku/DC/Jabu/Ice dynamically bool show_silver_rupees = false; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; uint8_t count = extended_savectx.silver_rupee_counts[silver_rupee_puzzles[puzzle_idx]]; @@ -700,9 +701,9 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &font_sprite, 16, 10); // load characters 0 through 9 for (int i = 0; i < rows; i++) { - dungeon_entry_t *d = &(dungeons[d_right_dungeon_idx(i)]); + dungeon_entry_t* d = &(dungeons[d_right_dungeon_idx(i)]); bool show_silver_rupees = false; - uint8_t *silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; + uint8_t* silver_rupee_puzzles = CFG_DUNGEON_IS_MQ[d->index] ? d->silver_rupee_puzzles_mq : d->silver_rupee_puzzles_vanilla; for (int puzzle_idx = 0; puzzle_idx < 4; puzzle_idx++) { if (silver_rupee_puzzles[puzzle_idx] == (uint8_t) -1) break; uint8_t count = extended_savectx.silver_rupee_counts[silver_rupee_puzzles[puzzle_idx]]; @@ -768,7 +769,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { // Draw dungeon names for (int i = 0; i < 12; i++) { - dungeon_entry_t *d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout + dungeon_entry_t* d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout int top = start_top + ((icon_size + padding) * i) + 1; text_print(d->name, left, top); } @@ -783,7 +784,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 16, 1); for (int i = 0; i < 12; i++) { - dungeon_entry_t *d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout + dungeon_entry_t* d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout if (d->has_map && z64_file.dungeon_items[d->index].map) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -798,7 +799,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 15, 1); for (int i = 0; i < 12; i++) { - dungeon_entry_t *d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout + dungeon_entry_t* d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout if (d->has_map && z64_file.dungeon_items[d->index].compass) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -815,7 +816,7 @@ void draw_dungeon_info(z64_disp_buf_t *db) { sprite_load(db, &quest_items_sprite, 11, 1); for (int i = 0; i < 12; i++) { - dungeon_entry_t *d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout + dungeon_entry_t* d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout if (d->skulltulas && z64_file.gs_flags[d->index ^ 0x03] == d->skulltulas) { int top = start_top + ((icon_size + padding) * i); sprite_draw(db, &quest_items_sprite, 0, @@ -830,12 +831,12 @@ void draw_dungeon_info(z64_disp_buf_t *db) { if (show_mq) { for (int i = 0; i < 12; i++) { - dungeon_entry_t *d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout + dungeon_entry_t* d = &(dungeons[i + (i > 9 ? 1 : 0)]); // skip Hideout if (CFG_DUNGEON_INFO_MQ_NEED_MAP && d->has_map && !z64_file.dungeon_items[d->index].map) { continue; } - char *str = CFG_DUNGEON_IS_MQ[d->index] ? "MQ" : "Normal"; + char* str = CFG_DUNGEON_IS_MQ[d->index] ? "MQ" : "Normal"; int top = start_top + ((icon_size + padding) * i) + 1; text_print(str, left, top); } diff --git a/ASM/c/dungeon_info.h b/ASM/c/dungeon_info.h index 6fbfe87a8..cdd86bff3 100644 --- a/ASM/c/dungeon_info.h +++ b/ASM/c/dungeon_info.h @@ -21,8 +21,8 @@ typedef struct { extern int dungeon_count; extern dungeon_entry_t dungeons[14]; -void draw_dungeon_info(z64_disp_buf_t *db); -void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t *db); +void draw_dungeon_info(z64_disp_buf_t* db); +void draw_silver_rupee_count(z64_game_t* globalCtx, z64_disp_buf_t* db); extern unsigned char CFG_DUNGEON_IS_MQ[14]; extern uint32_t CFG_DUNGEON_INFO_ENABLE; diff --git a/ASM/c/en_item00.c b/ASM/c/en_item00.c index fc7444853..12c142d17 100644 --- a/ASM/c/en_item00.c +++ b/ASM/c/en_item00.c @@ -15,7 +15,7 @@ void EnItem00_OutgoingAction(EnItem00* this, z64_game_t* globalCtx) { this->actor.rot_2.y += 960; - this->actor.pos_world.y += 40.0f + (15 - this->timeToLive)*5.0; //+ z64_Math_SinS(this->timeToLive * 15000) * (this->timeToLive * 0.3f); + this->actor.pos_world.y += 40.0f + (15 - this->timeToLive) * 5.0; if (LINK_IS_ADULT) { this->actor.pos_world.y += 20.0f; @@ -32,9 +32,8 @@ bool EnItem00_ProximityCheck_Hack(EnItem00* this, z64_game_t* GlobalCtx) { if (this->actor.distsq_from_link <= 900.0) { return true; } - } - else { - if (((this->actor.xzdist_from_link <= 30.0f) && (this->actor.ydist_from_link >= -50.0f) && (this->actor.ydist_from_link <= 50.0f))) { + } else { + if (this->actor.xzdist_from_link <= 30.0f && this->actor.ydist_from_link >= -50.0f && this->actor.ydist_from_link <= 50.0f) { return true; } } diff --git a/ASM/c/file_select.c b/ASM/c/file_select.c index 421d98dc7..7db65b4fd 100644 --- a/ASM/c/file_select.c +++ b/ASM/c/file_select.c @@ -8,7 +8,7 @@ #include "z64.h" -sprite_t *hash_sprites[2] = { +sprite_t* hash_sprites[2] = { &items_sprite, &quest_items_sprite, }; @@ -56,7 +56,7 @@ hash_symbol_t hash_symbols[32] = { extern uint8_t CFG_FILE_SELECT_HASH[5]; void draw_file_select_hash(uint32_t fade_out_alpha, z64_menudata_t* menu_data) { - z64_disp_buf_t *db = &(z64_ctxt.gfx->poly_opa); + z64_disp_buf_t* db = &(z64_ctxt.gfx->poly_opa); // Call setup display list gSPDisplayList(db->p++, &setup_db); @@ -74,8 +74,8 @@ void draw_file_select_hash(uint32_t fade_out_alpha, z64_menudata_t* menu_data) { for (int i = 0; i < icon_count; i++) { uint8_t sym_index = CFG_FILE_SELECT_HASH[i]; - hash_symbol_t *sym_desc = &(hash_symbols[sym_index]); - sprite_t *sym_sprite = hash_sprites[sym_desc->sprite_index]; + hash_symbol_t* sym_desc = &(hash_symbols[sym_index]); + sprite_t* sym_sprite = hash_sprites[sym_desc->sprite_index]; sprite_load(db, sym_sprite, sym_desc->tile_index, 1); sprite_draw(db, sym_sprite, 0, left, top, icon_size, icon_size); diff --git a/ASM/c/ganon.c b/ASM/c/ganon.c index 8479ea1a2..99532a3ec 100644 --- a/ASM/c/ganon.c +++ b/ASM/c/ganon.c @@ -10,4 +10,3 @@ void check_ganon_entry() { health_and_magic_refill(); } } - diff --git a/ASM/c/get_items.c b/ASM/c/get_items.c index 3cc425fda..426571ed9 100644 --- a/ASM/c/get_items.c +++ b/ASM/c/get_items.c @@ -16,7 +16,7 @@ extern uint32_t FREE_BOMBCHU_DROPS; override_t cfg_item_overrides[1536] = { 0 }; int item_overrides_count = 0; -z64_actor_t *dummy_actor = NULL; +z64_actor_t* dummy_actor = NULL; // Co-op state extern uint8_t PLAYER_ID; @@ -32,7 +32,7 @@ uint16_t drop_collectible_override_flag = 0; // Flag used by hacks in Item_DropC override_t active_override = { 0 }; int active_override_is_outgoing = 0; -item_row_t *active_item_row = NULL; +item_row_t* active_item_row = NULL; // Split active_item_row into variables for convenience in ASM uint32_t active_item_action_id = 0; uint32_t active_item_text_id = 0; @@ -40,7 +40,7 @@ uint32_t active_item_object_id = 0; uint32_t active_item_graphic_id = 0; uint32_t active_item_fast_chest = 0; -uint8_t satisified_pending_frames = 0; +uint8_t satisfied_pending_frames = 0; // This table contains the offset (in bytes) of the start of a particular scene/room/setup flag space in collectible_override_flags. // Call get_collectible_flag_offset to retrieve the desired offset. @@ -54,7 +54,7 @@ extern uint16_t CURR_ACTOR_SPAWN_INDEX; uint16_t num_override_flags; // Pointer to a variable length array that will contain the collectible flags for each scene. -uint8_t *collectible_override_flags; +uint8_t* collectible_override_flags; // Initialize the override flag tables on the heap. void override_flags_init() { @@ -68,10 +68,10 @@ void item_overrides_init() { // Create an actor satisfying the minimum requirements to give the player an item dummy_actor = heap_alloc(sizeof(z64_actor_t)); - dummy_actor->main_proc = (void *)1; + dummy_actor->main_proc = (void*)1; } -override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_t item_id) { +override_key_t get_override_search_key(z64_actor_t* actor, uint8_t scene, uint8_t item_id) { if (actor->actor_id == 0x0A) { // Don't override WINNER purple rupee in the chest minigame scene if (scene == 0x10) { @@ -92,7 +92,7 @@ override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_ if (collectible_type == 0x12) { // don't override fairies. Honestly don't think this is even necessary return (override_key_t){ .all = 0 }; } - EnItem00 *item = (EnItem00 *)actor; + EnItem00* item = (EnItem00*)actor; if (collectible_type == 0x06 || collectible_type == 0x11) { // heart pieces and keys return (override_key_t) { @@ -163,7 +163,7 @@ override_t lookup_override_by_key(override_key_t key) { return (override_t){ 0 }; } -override_t lookup_override(z64_actor_t *actor, uint8_t scene, uint8_t item_id) { +override_t lookup_override(z64_actor_t* actor, uint8_t scene, uint8_t item_id) { override_key_t search_key = get_override_search_key(actor, scene, item_id); if (search_key.all == 0) { return (override_t){ 0 }; @@ -177,7 +177,7 @@ override_t lookup_override(z64_actor_t *actor, uint8_t scene, uint8_t item_id) { // override_key: The key to search for in the alternative override table // Returns: The primary key to use if an alternative override is found in the table. Otherwise returns override_key override_key_t resolve_alternative_override(override_key_t override_key) { - alt_override_t *alt = &alt_overrides[0]; + alt_override_t* alt = &alt_overrides[0]; while (alt->alt.all != 0) { if (alt->alt.all == override_key.all) { return alt->primary; @@ -189,7 +189,7 @@ override_key_t resolve_alternative_override(override_key_t override_key) { void activate_override(override_t override) { uint16_t resolved_item_id = resolve_upgrades(override); - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); active_override = override; if (resolved_item_id == 0xCA) { @@ -199,7 +199,7 @@ void activate_override(override_t override) { } active_item_row = item_row; active_item_action_id = item_row->action_id; - active_item_text_id = resolve_item_text_id(item_row, resolved_item_id, active_override_is_outgoing); + active_item_text_id = resolve_item_text_id(item_row, active_override_is_outgoing); active_item_object_id = item_row->object_id; active_item_graphic_id = item_row->graphic_id; if (override.value.looks_like_item_id) { @@ -222,7 +222,7 @@ void clear_override() { override_t outgoing_queue[8] = { 0 }; -void push_outgoing_override(override_t *override) { +void push_outgoing_override(override_t* override) { if (override->key.type != OVR_DELAYED || override->key.flag != 0xFF) { // don't send items received from incoming back to outgoing if (OUTGOING_KEY.all == 0) { OUTGOING_ITEM = override->value.base.item_id; @@ -302,7 +302,7 @@ void after_key_received(override_key_t key) { if (key.type == OVR_DELAYED && key.flag == 0xFF) { INCOMING_ITEM = 0; INCOMING_PLAYER = 0; - uint16_t *received_item_counter = (uint16_t *)(z64_file_addr + 0x90); + uint16_t* received_item_counter = (uint16_t*)(z64_file_addr + 0x90); (*received_item_counter)++; return; } @@ -357,13 +357,13 @@ inline uint32_t link_is_ready() { (z64_link.state_flags_2 & 0x000C0000) == 0 && (z64_event_state_1 & 0x20) == 0 && (z64_game.camera_2 == 0)) { - satisified_pending_frames++; + satisfied_pending_frames++; } else { - satisified_pending_frames = 0; + satisfied_pending_frames = 0; } - if (satisified_pending_frames >= 2) { - satisified_pending_frames = 0; + if (satisfied_pending_frames >= 2) { + satisfied_pending_frames = 0; return 1; } return 0; @@ -381,7 +381,7 @@ void try_pending_item() { if (override.value.base.item_id == 0xCA && override.value.base.player != PLAYER_ID) { uint16_t resolved_item_id = resolve_upgrades(override); - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); call_effect_function(item_row); pop_pending_item(); after_key_received(override.key); @@ -393,7 +393,6 @@ void try_pending_item() { z64_link.incoming_item_actor = dummy_actor; z64_link.incoming_item_id = active_item_row->base_item_id; - } void handle_pending_items() { @@ -411,11 +410,11 @@ void handle_pending_items() { } } -void get_item(z64_actor_t *from_actor, z64_link_t *link, int8_t incoming_item_id) { +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; if (from_actor && incoming_item_id != 0) { item_id = incoming_negative ? -incoming_item_id : incoming_item_id; @@ -519,7 +518,7 @@ uint8_t items[] = { GIVEITEM_RUPEE_PURPLE, }; -EnItem00 *collectible_mutex = 0; +EnItem00* collectible_mutex = 0; override_t collectible_override; @@ -528,9 +527,9 @@ void reset_collectible_mutex() { } // New EnItem00 function that freezes Link until the messagebox is closed. Similar to how skulls work. -void Collectible_WaitForMessageBox(EnItem00 *this, z64_game_t *game) { +void Collectible_WaitForMessageBox(EnItem00* this, z64_game_t* game) { // Check message state: - if (z64_MessageGetState(((uint8_t *)(&z64_game)) + 0x20D8) == 0) { + if (z64_MessageGetState(((uint8_t*)(&z64_game)) + 0x20D8) == 0) { // Make sure link was frozen for the minimum amount of time if (this->timeToLive == 0) { reset_collectible_mutex(); // release the mutex @@ -577,7 +576,7 @@ uint16_t get_collectible_flag_offset(uint8_t scene, uint8_t room, uint8_t setup_ } // Check if the new collectible flag for an EnItem00 is set. -bool Get_CollectibleOverrideFlag(EnItem00 *item00) { +bool Get_CollectibleOverrideFlag(EnItem00* item00) { uint16_t scene = z64_game.scene_index; if (item00->actor.variable == ITEM00_HEART_PIECE || item00->actor.variable == ITEM00_SMALL_KEY || item00->actor.variable == ITEM00_HEART_CONTAINER) { @@ -601,7 +600,7 @@ bool Get_CollectibleOverrideFlag(EnItem00 *item00) { } // Set a collectible flag in the new flag table for a given EnItem00. -void Set_CollectibleOverrideFlag(EnItem00 *item00) { +void Set_CollectibleOverrideFlag(EnItem00* item00) { uint16_t scene = z64_game.scene_index; override_key_t key = item00->override.key; if (key.all) { @@ -621,7 +620,7 @@ void Set_CollectibleOverrideFlag(EnItem00 *item00) { // Hack at the end of Item_DropCollectible to not set the time to live, or clear the "room_index" if the collectible is being overridden. // This allows the the item to not despawn after a few seconds like normal dropped collectibles. // Not clearing room_index to -1 causes collectible items to despawn upon switching rooms. -void Item_DropCollectible_Room_Hack(EnItem00 *spawnedActor) { +void Item_DropCollectible_Room_Hack(EnItem00* spawnedActor) { if (spawnedActor->override.key.all && !Get_CollectibleOverrideFlag(spawnedActor)) { // Check if we should override the collectible return; // Overriding the collectible so just return. } @@ -636,17 +635,17 @@ void Item_DropCollectible_Room_Hack(EnItem00 *spawnedActor) { } } -z64_actor_t *Item_DropCollectible_Actor_Spawn_Override(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) { +z64_actor_t* Item_DropCollectible_Actor_Spawn_Override(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) { rotY = drop_collectible_override_flag; // Get the override flag - EnItem00 *spawnedActor = (EnItem00 *)z64_SpawnActor(actorCtx, globalCtx,actorId, posX, posY, posZ, rotX, rotY, rotZ, params); // Spawn the actor + EnItem00* spawnedActor = (EnItem00*)z64_SpawnActor(actorCtx, globalCtx,actorId, posX, posY, posZ, rotX, rotY, rotZ, params); // Spawn the actor return &(spawnedActor->actor); } // Hack in EnItem00_Init where it checks whether or not to kill the actor based on the collectible flag. // We use this point to determine if this is an overriden collectible and store that information in the actor. -bool Item00_KillActorIfFlagIsSet(z64_actor_t *actor) { - EnItem00 *this = (EnItem00 *)actor; +bool Item00_KillActorIfFlagIsSet(z64_actor_t* actor) { + EnItem00* this = (EnItem00*)actor; this->is_silver_rupee = false; uint16_t flag = 0; if (drop_collectible_override_flag) { @@ -737,8 +736,8 @@ int16_t get_override_drop_id(int16_t dropId) { } // Chu bag drops, convert bomb drop to bombchu drop under certain circumstances - if (FREE_BOMBCHU_DROPS && ((dropId == ITEM00_BOMBS_A) || (dropId == ITEM00_BOMBS_SPECIAL) || (dropId == ITEM00_BOMBS_B))) { - if ((z64_file.items[Z64_SLOT_BOMB] != -1) && (z64_file.items[Z64_SLOT_BOMBCHU] != -1)) { // we have bombs and chus + if (FREE_BOMBCHU_DROPS && (dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_SPECIAL || dropId == ITEM00_BOMBS_B)) { + if (z64_file.items[Z64_SLOT_BOMB] != -1 && z64_file.items[Z64_SLOT_BOMBCHU] != -1) { // we have bombs and chus return drop_bombs_or_chus(dropId); } else if (z64_file.items[Z64_SLOT_BOMB] != -1) { // only have bombs return dropId; // don't do anything because this is already the right drop ID @@ -770,7 +769,7 @@ int16_t get_override_drop_id(int16_t dropId) { return dropId; } -void dispatch_item(uint16_t resolved_item_id, uint8_t player, override_t *override, item_row_t *item_row) { +void dispatch_item(uint16_t resolved_item_id, uint8_t player, override_t* override, item_row_t* item_row) { // Give the item to the right place if (resolved_item_id == 0xCA) { // Send triforce to everyone @@ -792,8 +791,8 @@ void dispatch_item(uint16_t resolved_item_id, uint8_t player, override_t *overri } // Override hack for freestanding collectibles (rupees, recovery hearts, sticks, nuts, seeds, bombs, arrows, magic jars. Pieces of heart, heart containers, small keys handled by the regular get_item function) -uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_actor) { - EnItem00 *pItem = (EnItem00 *)from_actor; +uint8_t item_give_collectible(uint8_t item, z64_link_t* link, z64_actor_t* from_actor) { + EnItem00* pItem = (EnItem00*)from_actor; override_t override = pItem->override; @@ -804,12 +803,12 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_ } if (!collectible_mutex && pItem->actor.main_proc != NULL) { // Check our mutex so that only one collectible can run at a time (if 2 run on the same frame you lose the message). Also make sure that this actor hasn't already been killed. - collectible_mutex = (EnItem00 *)from_actor; + collectible_mutex = (EnItem00*)from_actor; collectible_override = override; // resolve upgrades and figure out what item to give. uint16_t item_id = collectible_override.value.base.item_id; uint16_t resolved_item_id = resolve_upgrades(collectible_override); - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); // Set the collectible flag Set_CollectibleOverrideFlag(pItem); @@ -833,8 +832,7 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_ } // If the item is for another player, use a custom action to make the item fly off the screen - if(player != PLAYER_ID) - { + if (player != PLAYER_ID) { pItem->timeToLive = 15; // same time to live as regular bounce effect. pItem->unk_154 = 35; // not quite sure but this is what the vanilla game does. pItem->actor.rot_2.z = 0; @@ -843,17 +841,17 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_ pItem->actor.gravity = 0; pItem->actionFunc = EnItem00_OutgoingAction; // Set our action function sfxId = NA_SE_SY_FSEL_DECIDE_L; // Play a different sound effect for outgoing items. This is one from the file select screen. - z64_Audio_PlaySoundGeneral(sfxId, (void *)0x80104394, 4, (float *)0x801043A0, (float *)0x801043A0, (uint8_t *)0x801043A8); + z64_Audio_PlaySoundGeneral(sfxId, (void*)0x80104394, 4, (float*)0x801043A0, (float*)0x801043A0, (uint8_t*)0x801043A8); return 1; // Return to the end of the Update function } - z64_Audio_PlaySoundGeneral(sfxId, (void *)0x80104394, 4, (float *)0x801043A0, (float *)0x801043A0, (uint8_t *)0x801043A8); + z64_Audio_PlaySoundGeneral(sfxId, (void*)0x80104394, 4, (float*)0x801043A0, (float*)0x801043A0, (uint8_t*)0x801043A8); return 3; // Return to the original function so it can draw the collectible above our head. } // draw message box and play get item sound (like when a skull is picked up) z64_Audio_PlayFanFare(NA_BGM_SMALL_ITEM_GET); - z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, resolved_item_id, player != PLAYER_ID), 0); + z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, player != PLAYER_ID), 0); // Set up pItem->timeToLive = 15; // unk_15A is a frame timer that is decremented each frame by the main actor code. @@ -868,7 +866,7 @@ uint8_t item_give_collectible(uint8_t item, z64_link_t *link, z64_actor_t *from_ return 2; } -void get_skulltula_token(z64_actor_t *token_actor) { +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; @@ -882,12 +880,12 @@ void get_skulltula_token(z64_actor_t *token_actor) { } uint16_t resolved_item_id = resolve_upgrades(override); - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); token_actor->draw_proc = NULL; PLAYER_NAME_ID = player; - z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, resolved_item_id, player != PLAYER_ID), 0); + z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, player != PLAYER_ID), 0); dispatch_item(resolved_item_id, player, &override, item_row); } @@ -918,7 +916,7 @@ void fairy_ocarina_getitem() { break; } } - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); PLAYER_NAME_ID = override.value.base.player; - z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, resolved_item_id, PLAYER_NAME_ID != PLAYER_ID), 0); + z64_DisplayTextbox(&z64_game, resolve_item_text_id(item_row, PLAYER_NAME_ID != PLAYER_ID), 0); } diff --git a/ASM/c/get_items.h b/ASM/c/get_items.h index 918f6f614..7205214de 100644 --- a/ASM/c/get_items.h +++ b/ASM/c/get_items.h @@ -59,7 +59,7 @@ typedef struct { } alt_override_t; struct EnItem00; -typedef void (*EnItem00ActionFunc)(struct EnItem00 *, z64_game_t *); +typedef void (*EnItem00ActionFunc)(struct EnItem00*, z64_game_t*); typedef struct EnItem00 { z64_actor_t actor; // 0x0000 @@ -77,17 +77,17 @@ typedef struct EnItem00 { } EnItem00; -typedef void (*z64_EnItem00ActionFunc)(struct EnItem00 *, z64_game_t *); -typedef EnItem00 *(*z64_Item_DropCollectible_proc)(z64_game_t *globalCtx, z64_xyzf_t *spawnPos, int16_t params); +typedef void (*z64_EnItem00ActionFunc)(struct EnItem00*, z64_game_t*); +typedef EnItem00* (*z64_Item_DropCollectible_proc)(z64_game_t* globalCtx, z64_xyzf_t* spawnPos, int16_t params); override_t lookup_override_by_key(override_key_t key); -override_t lookup_override(z64_actor_t *actor, uint8_t scene, uint8_t item_id); +override_t lookup_override(z64_actor_t* actor, uint8_t scene, uint8_t item_id); override_key_t resolve_alternative_override(override_key_t override_key); -override_key_t get_override_search_key(z64_actor_t *actor, uint8_t scene, uint8_t item_id); -override_t get_override_if_collectible_flag_not_set(EnItem00 *item00); -void Collectible_WaitForMessageBox(EnItem00 *this, z64_game_t *game); +override_key_t get_override_search_key(z64_actor_t* actor, uint8_t scene, uint8_t item_id); +override_t get_override_if_collectible_flag_not_set(EnItem00* item00); +void Collectible_WaitForMessageBox(EnItem00* this, z64_game_t* game); void reset_collectible_mutex(); void override_flags_init(); -bool Get_CollectibleOverrideFlag(EnItem00 *item00); +bool Get_CollectibleOverrideFlag(EnItem00* item00); #endif diff --git a/ASM/c/gfx.c b/ASM/c/gfx.c index 84270cced..45fd57da9 100644 --- a/ASM/c/gfx.c +++ b/ASM/c/gfx.c @@ -7,8 +7,7 @@ extern uint8_t FONT_TEXTURE[]; extern uint8_t DPAD_TEXTURE[]; extern uint8_t TRIFORCE_ICON_TEXTURE[]; -Gfx setup_db[] = -{ +Gfx setup_db[] = { gsDPPipeSync(), gsSPLoadGeometryMode(0), @@ -98,20 +97,20 @@ sprite_t button_sprite = { G_IM_FMT_IA, G_IM_SIZ_8b, 5 }; -int sprite_bytes_per_tile(sprite_t *sprite) { +int sprite_bytes_per_tile(sprite_t* sprite) { return sprite->tile_w * sprite->tile_h * sprite->bytes_per_texel; } -int sprite_bytes(sprite_t *sprite) { +int sprite_bytes(sprite_t* sprite) { return sprite->tile_count * sprite_bytes_per_tile(sprite); } -void sprite_load(z64_disp_buf_t *db, sprite_t *sprite, +void sprite_load(z64_disp_buf_t* db, sprite_t* sprite, int start_tile, int tile_count) { int width = sprite->tile_w; int height = sprite->tile_h * tile_count; gDPLoadTextureTile(db->p++, - sprite->buf + (start_tile * sprite_bytes_per_tile(sprite)), + sprite->buf + start_tile * sprite_bytes_per_tile(sprite), sprite->im_fmt, sprite->im_siz, width, height, 0, 0, @@ -122,7 +121,7 @@ void sprite_load(z64_disp_buf_t *db, sprite_t *sprite, G_TX_NOLOD, G_TX_NOLOD); } -void sprite_texture(z64_disp_buf_t *db, sprite_t * sprite, int tile_index, int16_t left, int16_t top, +void sprite_texture(z64_disp_buf_t* db, sprite_t* sprite, int tile_index, int16_t left, int16_t top, int16_t width, int16_t height) { int width_factor = (1<<10) * sprite->tile_w / width; int height_factor = (1<<10) * sprite->tile_h / height; @@ -141,10 +140,10 @@ void sprite_texture(z64_disp_buf_t *db, sprite_t * sprite, int tile_index, int16 G_TX_NOLOD ); - gSPTextureRectangle(db->p++, left * 4, top * 4, (left + width) * 4, (top * height) * 4, G_TX_RENDERTILE, 0,0,width_factor, height_factor); + gSPTextureRectangle(db->p++, left * 4, top * 4, (left + width) * 4, (top * height) * 4, G_TX_RENDERTILE, 0, 0, width_factor, height_factor); } -void sprite_draw(z64_disp_buf_t *db, sprite_t *sprite, int tile_index, +void sprite_draw(z64_disp_buf_t* db, sprite_t* sprite, int tile_index, int left, int top, int width, int height) { int width_factor = (1<<10) * sprite->tile_w / width; int height_factor = (1<<10) * sprite->tile_h / height; diff --git a/ASM/c/gfx.h b/ASM/c/gfx.h index 860ae57e4..e3c8b4040 100644 --- a/ASM/c/gfx.h +++ b/ASM/c/gfx.h @@ -7,7 +7,7 @@ extern Gfx setup_db[]; extern Gfx empty_dlist[]; typedef struct { - uint8_t *buf; + uint8_t* buf; uint16_t tile_w; uint16_t tile_h; uint16_t tile_count; @@ -33,12 +33,12 @@ extern sprite_t button_sprite; void gfx_init(); -void sprite_load(z64_disp_buf_t *db, sprite_t *sprite, +void sprite_load(z64_disp_buf_t* db, sprite_t* sprite, int start_tile, int tile_count); -void sprite_draw(z64_disp_buf_t *db, sprite_t *sprite, int tile_index, +void sprite_draw(z64_disp_buf_t* db, sprite_t* sprite, int tile_index, int left, int top, int width, int height); -void sprite_texture(z64_disp_buf_t *db, sprite_t * sprite, int tile_index, +void sprite_texture(z64_disp_buf_t* db, sprite_t* sprite, int tile_index, int16_t left, int16_t top, int16_t width, int16_t height); #endif diff --git a/ASM/c/hud_colors.h b/ASM/c/hud_colors.h index 7b7e67dd5..0ac96c5e2 100644 --- a/ASM/c/hud_colors.h +++ b/ASM/c/hud_colors.h @@ -7,4 +7,3 @@ uint32_t rupee_hud_color(); extern const colorRGB8_t rupee_colors[4]; extern const colorRGB16_t defaultHeart; extern const colorRGB16_t defaultDDHeart; - diff --git a/ASM/c/item_draw_functions.c b/ASM/c/item_draw_functions.c index ea20923ee..1001775ac 100644 --- a/ASM/c/item_draw_functions.c +++ b/ASM/c/item_draw_functions.c @@ -4,11 +4,11 @@ #include "item_draw_table.h" #include "sys_matrix.h" -typedef Gfx *(*append_setup_dl_fn)(Gfx *gfx, uint32_t dl_index); -typedef void (*append_setup_dl_26_to_opa_fn)(z64_gfx_t *gfx); -typedef void (*append_setup_dl_25_to_opa_fn)(z64_gfx_t *gfx); -typedef void (*append_setup_dl_25_to_xlu_fn)(z64_gfx_t *gfx); -typedef Gfx *(*gen_double_tile_fn)(z64_gfx_t *gfx, int32_t tile1, uint32_t x1, uint32_t y1, int32_t width1, int32_t height1, +typedef Gfx* (*append_setup_dl_fn)(Gfx* gfx, uint32_t dl_index); +typedef void (*append_setup_dl_26_to_opa_fn)(z64_gfx_t* gfx); +typedef void (*append_setup_dl_25_to_opa_fn)(z64_gfx_t* gfx); +typedef void (*append_setup_dl_25_to_xlu_fn)(z64_gfx_t* gfx); +typedef Gfx* (*gen_double_tile_fn)(z64_gfx_t* gfx, int32_t tile1, uint32_t x1, uint32_t y1, int32_t width1, int32_t height1, int32_t tile2, uint32_t x2, uint32_t y2, int32_t width2, int32_t height2); #define append_setup_dl ((append_setup_dl_fn)0x8007DFBC) @@ -17,16 +17,16 @@ typedef Gfx *(*gen_double_tile_fn)(z64_gfx_t *gfx, int32_t tile1, uint32_t x1, u #define append_setup_dl_25_to_xlu ((append_setup_dl_25_to_xlu_fn)0x8007E2C0) #define gen_double_tile ((gen_double_tile_fn)0x8007EB84) -void draw_gi_bombchu_and_masks(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_bombchu_and_masks(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_26_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_eggs_and_medallions(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_eggs_and_medallions(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_26_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -34,16 +34,16 @@ void draw_gi_eggs_and_medallions(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_sold_out(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_sold_out(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; gfx->poly_xlu.p = append_setup_dl(gfx->poly_xlu.p, 5); gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_compass(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_compass(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -54,16 +54,16 @@ void draw_gi_compass(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_various_opa0(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_various_opa0(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_various_opa1023(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_various_opa1023(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -73,8 +73,8 @@ void draw_gi_various_opa1023(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[3].dlist); } -void draw_gi_wallets(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_wallets(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -88,9 +88,8 @@ void draw_gi_wallets(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[7].dlist); } - -void draw_gi_silver_rupee_pouch(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_silver_rupee_pouch(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -114,8 +113,8 @@ void draw_gi_silver_rupee_pouch(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[7].dlist); // gGiWalletRupeeInnerDL } -void draw_gi_various_xlu01(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_various_xlu01(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_xlu(gfx); gSPMatrix(gfx->poly_xlu.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -123,8 +122,8 @@ void draw_gi_various_xlu01(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_various_opa0_xlu1(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_various_opa0_xlu1(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -135,8 +134,8 @@ void draw_gi_various_opa0_xlu1(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_rutos_letter(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_rutos_letter(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; // Turn the model sideways rotate_Z_sys_matrix(1.57f, 1); @@ -150,9 +149,8 @@ void draw_rutos_letter(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } - -void draw_gi_coins_and_cuccos(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_coins_and_cuccos(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -164,8 +162,8 @@ void draw_gi_coins_and_cuccos(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist); } -void draw_gi_magic_arrows(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_magic_arrows(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -177,8 +175,8 @@ void draw_gi_magic_arrows(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist); } -void draw_gi_various_opa10_xlu32(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_various_opa10_xlu32(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -191,9 +189,8 @@ void draw_gi_various_opa10_xlu32(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist); } - -void draw_gi_bullet_bags(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_bullet_bags(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -207,8 +204,8 @@ void draw_gi_bullet_bags(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[4].dlist); } -void draw_gi_small_rupees(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_small_rupees(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; scale_sys_matrix(0.7f, 0.7f, 0.7f, 1); @@ -223,8 +220,8 @@ void draw_gi_small_rupees(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist); } -void draw_gi_goron_swords(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_goron_swords(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPSegment(gfx->poly_opa.p++, 0x08, @@ -235,8 +232,8 @@ void draw_gi_goron_swords(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_deku_nut(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_deku_nut(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPSegment(gfx->poly_opa.p++, 0x08, @@ -247,8 +244,8 @@ void draw_gi_deku_nut(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_recovery_heart(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_recovery_heart(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_xlu(gfx); gSPSegment(gfx->poly_xlu.p++, 0x08, @@ -259,8 +256,8 @@ void draw_gi_recovery_heart(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_fish_bottle(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_fish_bottle(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_xlu(gfx); gSPSegment(gfx->poly_xlu.p++, 0x08, @@ -271,8 +268,8 @@ void draw_gi_fish_bottle(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_magic_spells(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_magic_spells(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_xlu(gfx); gSPSegment(gfx->poly_xlu.p++, 0x08, @@ -285,8 +282,8 @@ void draw_gi_magic_spells(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[2].dlist); } -void draw_gi_scales(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_scales(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_xlu(gfx); gSPSegment(gfx->poly_xlu.p++, 0x08, @@ -300,8 +297,8 @@ void draw_gi_scales(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_potions(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_potions(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPSegment(gfx->poly_opa.p++, 0x08, @@ -320,8 +317,8 @@ void draw_gi_potions(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[5].dlist); } -void draw_gi_mirror_shield(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_mirror_shield(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPSegment(gfx->poly_opa.p++, 0x08, @@ -336,8 +333,8 @@ void draw_gi_mirror_shield(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_gs_token(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_gs_token(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -352,8 +349,8 @@ void draw_gi_gs_token(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_blue_fire_candle(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_blue_fire_candle(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -372,8 +369,8 @@ void draw_gi_blue_fire_candle(z64_game_t *game, uint32_t draw_id) { pop_sys_matrix(); } -void draw_gi_fairy_lantern(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_fairy_lantern(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -393,8 +390,8 @@ void draw_gi_fairy_lantern(z64_game_t *game, uint32_t draw_id) { pop_sys_matrix(); } -void draw_gi_poe_bottles(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_poe_bottles(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; append_setup_dl_25_to_opa(gfx); gSPMatrix(gfx->poly_opa.p++, append_sys_matrix(gfx), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); @@ -415,8 +412,8 @@ void draw_gi_poe_bottles(z64_game_t *game, uint32_t draw_id) { pop_sys_matrix(); } -void draw_gi_song_notes(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_song_notes(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t env_color = item_draw_table[draw_id].args[1].color; if (item_draw_table[draw_id].args[2].dlist) { @@ -429,8 +426,8 @@ void draw_gi_song_notes(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_small_keys(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_small_keys(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[1].color; colorRGBA8_t env_color = item_draw_table[draw_id].args[2].color; @@ -442,8 +439,8 @@ void draw_gi_small_keys(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_shrink_keys(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_shrink_keys(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[1].color; colorRGBA8_t env_color = item_draw_table[draw_id].args[2].color; @@ -458,8 +455,8 @@ void draw_gi_shrink_keys(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_boss_keys(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_boss_keys(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[2].color; colorRGBA8_t env_color = item_draw_table[draw_id].args[3].color; @@ -483,9 +480,10 @@ void draw_gi_boss_keys(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } + // Gem DL First -void draw_gi_boss_altered(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_boss_altered(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; // extract gem colors colorRGBA8_t prim_color = item_draw_table[draw_id].args[2].color; colorRGBA8_t env_color = item_draw_table[draw_id].args[3].color; @@ -508,9 +506,10 @@ void draw_gi_boss_altered(z64_game_t *game, uint32_t draw_id) { gDPSetEnvColor(gfx->poly_xlu.p++, env_color.r, env_color.g, env_color.b, env_color.a); gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } + // Key DL First -void draw_gi_boss_altflip(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_boss_altflip(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; // extract gem colors colorRGBA8_t prim_color = item_draw_table[draw_id].args[2].color; colorRGBA8_t env_color = item_draw_table[draw_id].args[3].color; @@ -534,8 +533,8 @@ void draw_gi_boss_altflip(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[1].dlist); } -void draw_gi_chubag(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_chubag(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; // Band colorRGBA8_t prim_color_band = item_draw_table[draw_id].args[5].color; colorRGBA8_t env_color_band = item_draw_table[draw_id].args[6].color; @@ -560,8 +559,8 @@ void draw_gi_chubag(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[2].dlist); } -void draw_gi_a_button(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_a_button(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[1].color; if (CFG_CORRECT_MODEL_COLORS) { prim_color.r = CFG_A_BUTTON_COLOR.r; @@ -575,8 +574,8 @@ void draw_gi_a_button(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_xlu.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_c_button_vertical(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_c_button_vertical(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[1].color; if (CFG_CORRECT_MODEL_COLORS) { prim_color.r = CFG_C_BUTTON_COLOR.r; @@ -592,8 +591,8 @@ void draw_gi_c_button_vertical(z64_game_t *game, uint32_t draw_id) { gSPDisplayList(gfx->poly_opa.p++, item_draw_table[draw_id].args[0].dlist); } -void draw_gi_c_button_horizontal(z64_game_t *game, uint32_t draw_id) { - z64_gfx_t *gfx = game->common.gfx; +void draw_gi_c_button_horizontal(z64_game_t* game, uint32_t draw_id) { + z64_gfx_t* gfx = game->common.gfx; colorRGBA8_t prim_color = item_draw_table[draw_id].args[1].color; if (CFG_CORRECT_MODEL_COLORS) { prim_color.r = CFG_C_BUTTON_COLOR.r; diff --git a/ASM/c/item_draw_functions.h b/ASM/c/item_draw_functions.h index 09510141b..091a5f08c 100644 --- a/ASM/c/item_draw_functions.h +++ b/ASM/c/item_draw_functions.h @@ -8,44 +8,44 @@ extern uint8_t CFG_CORRECT_MODEL_COLORS; extern colorRGB16_t CFG_A_BUTTON_COLOR; extern colorRGB16_t CFG_C_BUTTON_COLOR; -void draw_gi_bombchu_and_masks(z64_game_t *game, uint32_t draw_id); -void draw_gi_eggs_and_medallions(z64_game_t *game, uint32_t draw_id); -void draw_gi_sold_out(z64_game_t *game, uint32_t draw_id); -void draw_gi_compass(z64_game_t *game, uint32_t draw_id); -void draw_gi_various_opa0(z64_game_t *game, uint32_t draw_id); -void draw_gi_various_opa1023(z64_game_t *game, uint32_t draw_id); -void draw_gi_wallets(z64_game_t *game, uint32_t draw_id); -void draw_gi_various_xlu01(z64_game_t *game, uint32_t draw_id); -void draw_gi_various_opa0_xlu1(z64_game_t *game, uint32_t draw_id); -void draw_gi_coins_and_cuccos(z64_game_t *game, uint32_t draw_id); -void draw_gi_magic_arrows(z64_game_t *game, uint32_t draw_id); -void draw_gi_various_opa10_xlu32(z64_game_t *game, uint32_t draw_id); -void draw_rutos_letter(z64_game_t *game, uint32_t draw_id); -void draw_gi_bullet_bags(z64_game_t *game, uint32_t draw_id); -void draw_gi_small_rupees(z64_game_t *game, uint32_t draw_id); -void draw_gi_goron_swords(z64_game_t *game, uint32_t draw_id); -void draw_gi_deku_nut(z64_game_t *game, uint32_t draw_id); -void draw_gi_recovery_heart(z64_game_t *game, uint32_t draw_id); -void draw_gi_fish_bottle(z64_game_t *game, uint32_t draw_id); -void draw_gi_magic_spells(z64_game_t *game, uint32_t draw_id); -void draw_gi_scales(z64_game_t *game, uint32_t draw_id); -void draw_gi_potions(z64_game_t *game, uint32_t draw_id); -void draw_gi_mirror_shield(z64_game_t *game, uint32_t draw_id); -void draw_gi_gs_token(z64_game_t *game, uint32_t draw_id); -void draw_gi_blue_fire_candle(z64_game_t *game, uint32_t draw_id); -void draw_gi_fairy_lantern(z64_game_t *game, uint32_t draw_id); -void draw_gi_poe_bottles(z64_game_t *game, uint32_t draw_id); -void draw_gi_song_notes(z64_game_t *game, uint32_t draw_id); -void draw_gi_chubag(z64_game_t *game, uint32_t draw_id); -void draw_gi_small_keys(z64_game_t *game, uint32_t draw_id); -void draw_gi_shrink_keys(z64_game_t *game, uint32_t draw_id); -void draw_gi_boss_keys(z64_game_t *game, uint32_t draw_id); -void draw_gi_boss_altered(z64_game_t *game, uint32_t draw_id); -void draw_gi_boss_altflip(z64_game_t *game, uint32_t draw_id); -void draw_gi_silver_rupee_pouch(z64_game_t *game, uint32_t draw_id); -void draw_gi_a_button(z64_game_t *game, uint32_t draw_id); -void draw_gi_c_button_vertical(z64_game_t *game, uint32_t draw_id); -void draw_gi_c_button_horizontal(z64_game_t *game, uint32_t draw_id); +void draw_gi_bombchu_and_masks(z64_game_t* game, uint32_t draw_id); +void draw_gi_eggs_and_medallions(z64_game_t* game, uint32_t draw_id); +void draw_gi_sold_out(z64_game_t* game, uint32_t draw_id); +void draw_gi_compass(z64_game_t* game, uint32_t draw_id); +void draw_gi_various_opa0(z64_game_t* game, uint32_t draw_id); +void draw_gi_various_opa1023(z64_game_t* game, uint32_t draw_id); +void draw_gi_wallets(z64_game_t* game, uint32_t draw_id); +void draw_gi_various_xlu01(z64_game_t* game, uint32_t draw_id); +void draw_gi_various_opa0_xlu1(z64_game_t* game, uint32_t draw_id); +void draw_gi_coins_and_cuccos(z64_game_t* game, uint32_t draw_id); +void draw_gi_magic_arrows(z64_game_t* game, uint32_t draw_id); +void draw_gi_various_opa10_xlu32(z64_game_t* game, uint32_t draw_id); +void draw_rutos_letter(z64_game_t* game, uint32_t draw_id); +void draw_gi_bullet_bags(z64_game_t* game, uint32_t draw_id); +void draw_gi_small_rupees(z64_game_t* game, uint32_t draw_id); +void draw_gi_goron_swords(z64_game_t* game, uint32_t draw_id); +void draw_gi_deku_nut(z64_game_t* game, uint32_t draw_id); +void draw_gi_recovery_heart(z64_game_t* game, uint32_t draw_id); +void draw_gi_fish_bottle(z64_game_t* game, uint32_t draw_id); +void draw_gi_magic_spells(z64_game_t* game, uint32_t draw_id); +void draw_gi_scales(z64_game_t* game, uint32_t draw_id); +void draw_gi_potions(z64_game_t* game, uint32_t draw_id); +void draw_gi_mirror_shield(z64_game_t* game, uint32_t draw_id); +void draw_gi_gs_token(z64_game_t* game, uint32_t draw_id); +void draw_gi_blue_fire_candle(z64_game_t* game, uint32_t draw_id); +void draw_gi_fairy_lantern(z64_game_t* game, uint32_t draw_id); +void draw_gi_poe_bottles(z64_game_t* game, uint32_t draw_id); +void draw_gi_song_notes(z64_game_t* game, uint32_t draw_id); +void draw_gi_chubag(z64_game_t* game, uint32_t draw_id); +void draw_gi_small_keys(z64_game_t* game, uint32_t draw_id); +void draw_gi_shrink_keys(z64_game_t* game, uint32_t draw_id); +void draw_gi_boss_keys(z64_game_t* game, uint32_t draw_id); +void draw_gi_boss_altered(z64_game_t* game, uint32_t draw_id); +void draw_gi_boss_altflip(z64_game_t* game, uint32_t draw_id); +void draw_gi_silver_rupee_pouch(z64_game_t* game, uint32_t draw_id); +void draw_gi_a_button(z64_game_t* game, uint32_t draw_id); +void draw_gi_c_button_vertical(z64_game_t* game, uint32_t draw_id); +void draw_gi_c_button_horizontal(z64_game_t* game, uint32_t draw_id); #endif diff --git a/ASM/c/item_draw_table.c b/ASM/c/item_draw_table.c index 648ae59b4..3950ac0c8 100644 --- a/ASM/c/item_draw_table.c +++ b/ASM/c/item_draw_table.c @@ -141,7 +141,7 @@ item_draw_table_entry_t item_draw_table[] = { [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 } }, // Adult's Wallet} + [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) @@ -165,6 +165,6 @@ item_draw_table_entry_t item_draw_table[] = { [0x93] = { draw_gi_c_button_horizontal, { 0x06000E10, 0xFFA000FF, 0 } }, // Cright button }; -void base_draw_gi_model(z64_game_t *game, uint32_t draw_id) { +void base_draw_gi_model(z64_game_t* game, uint32_t draw_id) { item_draw_table[draw_id].draw_func(game, draw_id); } diff --git a/ASM/c/item_draw_table.h b/ASM/c/item_draw_table.h index 4cd806954..68cfa4637 100644 --- a/ASM/c/item_draw_table.h +++ b/ASM/c/item_draw_table.h @@ -10,12 +10,12 @@ typedef union { } item_draw_arg_t; typedef struct { - void (*draw_func)(z64_game_t *game, uint32_t draw_id); + void (*draw_func)(z64_game_t* game, uint32_t draw_id); item_draw_arg_t args[8]; } item_draw_table_entry_t; extern item_draw_table_entry_t item_draw_table[]; -void base_draw_gi_model(z64_game_t *game, uint32_t draw_id); +void base_draw_gi_model(z64_game_t* game, uint32_t draw_id); #endif diff --git a/ASM/c/item_effects.c b/ASM/c/item_effects.c index f28b7f89c..7247e5fa2 100644 --- a/ASM/c/item_effects.c +++ b/ASM/c/item_effects.c @@ -11,14 +11,14 @@ typedef void (*commit_scene_flags_fn)(z64_game_t* game_ctxt); typedef void (*save_game_fn)(void* unk); #define save_game ((save_game_fn)0x800905D4) -void no_effect(z64_file_t *save, int16_t arg1, int16_t arg2) { +void no_effect(z64_file_t* save, int16_t arg1, int16_t arg2) { } -void full_heal(z64_file_t *save, int16_t arg1, int16_t arg2) { +void full_heal(z64_file_t* save, int16_t arg1, int16_t arg2) { save->refill_hearts = 20 * 0x10; } -void give_triforce_piece(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_triforce_piece(z64_file_t* save, int16_t arg1, int16_t arg2) { save->scene_flags[0x48].unk_00_ += 1; //Unused word in scene x48. set_triforce_render(); @@ -41,17 +41,17 @@ void give_triforce_piece(z64_file_t *save, int16_t arg1, int16_t arg2) { } } -void give_tycoon_wallet(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_tycoon_wallet(z64_file_t* save, int16_t arg1, int16_t arg2) { save->wallet = 3; if(MAX_RUPEES) save->rupees = rupee_cap[arg1]; } -void give_biggoron_sword(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_biggoron_sword(z64_file_t* save, int16_t arg1, int16_t arg2) { save->bgs_flag = 1; // Set flag to make the sword durable } -void give_bottle(z64_file_t *save, int16_t bottle_item_id, int16_t arg2) { +void give_bottle(z64_file_t* save, int16_t bottle_item_id, int16_t arg2) { for (int i = Z64_SLOT_BOTTLE_1; i <= Z64_SLOT_BOTTLE_4; i++) { if (save->items[i] == -1) { save->items[i] = bottle_item_id; @@ -60,7 +60,7 @@ void give_bottle(z64_file_t *save, int16_t bottle_item_id, int16_t arg2) { } } -void give_dungeon_item(z64_file_t *save, int16_t mask, int16_t dungeon_id) { +void give_dungeon_item(z64_file_t* save, int16_t mask, int16_t dungeon_id) { save->dungeon_items[dungeon_id].items |= mask; } @@ -84,7 +84,7 @@ char key_counts[17][2] = { {6, 6}, // Treasure Box Shop }; -void give_small_key(z64_file_t *save, int16_t dungeon_id, int16_t arg2) { +void give_small_key(z64_file_t* save, int16_t dungeon_id, int16_t arg2) { int8_t current_keys = save->dungeon_keys[dungeon_id] > 0 ? save->dungeon_keys[dungeon_id] : 0; save->dungeon_keys[dungeon_id] = current_keys + 1; uint32_t flag = save->scene_flags[dungeon_id].unk_00_; @@ -95,7 +95,7 @@ void give_small_key(z64_file_t *save, int16_t dungeon_id, int16_t arg2) { } } -void give_small_key_ring(z64_file_t *save, int16_t dungeon_id, int16_t arg2) { +void give_small_key_ring(z64_file_t* save, int16_t dungeon_id, int16_t arg2) { int8_t current_keys = save->dungeon_keys[dungeon_id] > 0 ? save->dungeon_keys[dungeon_id] : 0; save->dungeon_keys[dungeon_id] = current_keys + key_counts[dungeon_id][CFG_DUNGEON_IS_MQ[dungeon_id]]; if (KEYRING_BOSSKEY_CONDITION && dungeon_id > 2 && dungeon_id < 8) { @@ -108,31 +108,31 @@ void give_small_key_ring(z64_file_t *save, int16_t dungeon_id, int16_t arg2) { silver_rupee_data_t silver_rupee_vars[0x16][2] = { //Vanilla, Master Quest - {{-1, 0xFF, 0x00, 0x00, 0x00, 2}, { 5, 0x1F, 0xFF, 0xFF, 0xFF, 2}}, // Dodongos Cavern Staircase. Patched to use switch flag 0x1F - {{ 5, 0x08, 0x00, 0xFF, 0xFF, 3}, {-1, 0xFF, 0x00, 0x00, 0x00, 3}}, // Ice Cavern Spinning Scythe - {{ 5, 0x09, 0x00, 0x64, 0xFF, 5}, {-1, 0xFF, 0x00, 0x00, 0x00, 5}}, // Ice Cavern Push Block - {{ 5, 0x1F, 0xFF, 0xFF, 0xFF, 1}, {-1, 0xFF, 0x00, 0x00, 0x00, 1}}, // Bottom of the Well Basement - {{ 5, 0x01, 0x00, 0xFF, 0x00, 6}, { 5, 0x01, 0x00, 0xFF, 0x00, 6}}, // Shadow Temple Scythe Shortcut + {{-1, 0xFF, 0x00, 0x00, 0x00, 2}, { 5, 0x1F, 0xFF, 0xFF, 0xFF, 2}}, // Dodongos Cavern Staircase. Patched to use switch flag 0x1F + {{ 5, 0x08, 0x00, 0xFF, 0xFF, 3}, {-1, 0xFF, 0x00, 0x00, 0x00, 3}}, // Ice Cavern Spinning Scythe + {{ 5, 0x09, 0x00, 0x64, 0xFF, 5}, {-1, 0xFF, 0x00, 0x00, 0x00, 5}}, // Ice Cavern Push Block + {{ 5, 0x1F, 0xFF, 0xFF, 0xFF, 1}, {-1, 0xFF, 0x00, 0x00, 0x00, 1}}, // Bottom of the Well Basement + {{ 5, 0x01, 0x00, 0xFF, 0x00, 6}, { 5, 0x01, 0x00, 0xFF, 0x00, 6}}, // Shadow Temple Scythe Shortcut {{-1, 0xFF, 0x00, 0x00, 0x00, 16}, {10, 0x03, 0x00, 0xFF, 0xFF, 16}}, // Shadow Temple Invisible Blades - {{ 5, 0x09, 0xC8, 0xC8, 0x00, 9}, { 5, 0x11, 0xC8, 0xC8, 0x00, 9}}, // Shadow Temple Huge Pit + {{ 5, 0x09, 0xC8, 0xC8, 0x00, 9}, { 5, 0x11, 0xC8, 0xC8, 0x00, 9}}, // Shadow Temple Huge Pit {{ 5, 0x08, 0xC8, 0x32, 0xFF, 11}, {10, 0x08, 0xC8, 0x32, 0xFF, 11}}, // Shadow Temple Invisible Spikes - {{ 5, 0x1C, 0xC8, 0xC8, 0x00, 2}, { 5, 0x1C, 0xC8, 0xC8, 0x00, 2}}, // Gerudo Training Ground Slopes - {{ 5, 0x0C, 0xFF, 0x3C, 0x00, 6}, { 6, 0x0C, 0xFF, 0x3C, 0x00, 6}}, // Gerudo Training Ground Lava - {{ 5, 0x1B, 0x00, 0x64, 0xFF, 9}, { 3, 0x1B, 0x00, 0x64, 0xFF, 9}}, // Gerudo Training Ground Water - {{ 5, 0x05, 0xFF, 0x3C, 0x00, 2}, {-1, 0xFF, 0x00, 0x00, 0x00, 2}}, // Spirit Temple Child Early Torches + {{ 5, 0x1C, 0xC8, 0xC8, 0x00, 2}, { 5, 0x1C, 0xC8, 0xC8, 0x00, 2}}, // Gerudo Training Ground Slopes + {{ 5, 0x0C, 0xFF, 0x3C, 0x00, 6}, { 6, 0x0C, 0xFF, 0x3C, 0x00, 6}}, // Gerudo Training Ground Lava + {{ 5, 0x1B, 0x00, 0x64, 0xFF, 9}, { 3, 0x1B, 0x00, 0x64, 0xFF, 9}}, // Gerudo Training Ground Water + {{ 5, 0x05, 0xFF, 0x3C, 0x00, 2}, {-1, 0xFF, 0x00, 0x00, 0x00, 2}}, // Spirit Temple Child Early Torches {{ 5, 0x02, 0x00, 0xFF, 0x00, 13}, {-1, 0xFF, 0x00, 0x00, 0x00, 13}}, // Spirit Temple Adult Boulders - {{-1, 0xFF, 0x00, 0x00, 0x00, 0}, { 5, 0x1F, 0x00, 0xFF, 0xFF, 0}}, // Spirit Temple Lobby and Lower Adult. Patched to use switch flag 0x1F - {{ 5, 0x0A, 0xC8, 0xC8, 0x00, 8}, {-1, 0xFF, 0x00, 0x00, 0x00, 8}}, // Spirit Temple Sun Block + {{-1, 0xFF, 0x00, 0x00, 0x00, 0}, { 5, 0x1F, 0x00, 0xFF, 0xFF, 0}}, // Spirit Temple Lobby and Lower Adult. Patched to use switch flag 0x1F + {{ 5, 0x0A, 0xC8, 0xC8, 0x00, 8}, {-1, 0xFF, 0x00, 0x00, 0x00, 8}}, // Spirit Temple Sun Block {{-1, 0xFF, 0x00, 0x00, 0x00, 23}, { 5, 0x00, 0x00, 0x64, 0xFF, 23}}, // Spirit Temple Adult Climb {{ 5, 0x0B, 0xC8, 0xC8, 0x00, 17}, {-1, 0xFF, 0x00, 0x00, 0x00, 17}}, // Ganons Castle Spirit Trial - {{ 5, 0x12, 0x00, 0xFF, 0xFF, 8}, {-1, 0xFF, 0x00, 0x00, 0x00, 8}}, // Ganons Castle Light Trial + {{ 5, 0x12, 0x00, 0xFF, 0xFF, 8}, {-1, 0xFF, 0x00, 0x00, 0x00, 8}}, // Ganons Castle Light Trial {{ 5, 0x09, 0xFF, 0x3C, 0x00, 14}, { 5, 0x01, 0xFF, 0x3C, 0x00, 14}}, // Ganons Castle Fire Trial {{-1, 0xFF, 0x00, 0x00, 0x00, 12}, { 5, 0x0B, 0xC8, 0x32, 0xFF, 12}}, // Ganons Castle Shadow Trial - {{-1, 0xFF, 0x00, 0x00, 0x00, 3}, { 5, 0x02, 0x00, 0x64, 0xFF, 3}}, // Ganons Castle Water Trial - {{ 5, 0x0E, 0x00, 0xFF, 0x00, 6}, {-1, 0xFF, 0x00, 0x00, 0x00, 6}}, // Ganons Castle Forest Trial + {{-1, 0xFF, 0x00, 0x00, 0x00, 3}, { 5, 0x02, 0x00, 0x64, 0xFF, 3}}, // Ganons Castle Water Trial + {{ 5, 0x0E, 0x00, 0xFF, 0x00, 6}, {-1, 0xFF, 0x00, 0x00, 0x00, 6}}, // Ganons Castle Forest Trial }; -void set_silver_rupee_flags(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupee_id) { +void set_silver_rupee_flags(z64_file_t* save, int16_t dungeon_id, int16_t silver_rupee_id) { silver_rupee_data_t var = silver_rupee_vars[silver_rupee_id][CFG_DUNGEON_IS_MQ[dungeon_id]]; if (silver_rupee_id == 8) { // GTG Boulder room needs to set room clear flag as well in order to make the timer go away. Maybe others? @@ -150,7 +150,7 @@ void set_silver_rupee_flags(z64_file_t *save, int16_t dungeon_id, int16_t silver } } -void give_silver_rupee(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupee_id) { +void give_silver_rupee(z64_file_t* save, int16_t dungeon_id, int16_t silver_rupee_id) { silver_rupee_data_t var = silver_rupee_vars[silver_rupee_id][CFG_DUNGEON_IS_MQ[dungeon_id]]; if (extended_savectx.silver_rupee_counts[silver_rupee_id] == var.needed_count) return; @@ -161,7 +161,7 @@ void give_silver_rupee(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupe } } -void give_silver_rupee_pouch(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupee_id) { +void give_silver_rupee_pouch(z64_file_t* save, int16_t dungeon_id, int16_t silver_rupee_id) { silver_rupee_data_t var = silver_rupee_vars[silver_rupee_id][CFG_DUNGEON_IS_MQ[dungeon_id]]; Rupees_ChangeBy(5 * var.needed_count); @@ -172,20 +172,20 @@ void give_silver_rupee_pouch(z64_file_t *save, int16_t dungeon_id, int16_t silve set_silver_rupee_flags(save, dungeon_id, silver_rupee_id); } -void give_defense(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_defense(z64_file_t* save, int16_t arg1, int16_t arg2) { save->double_defense = 1; save->defense_hearts = 20; save->refill_hearts = 20 * 0x10; } -void give_magic(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_magic(z64_file_t* save, int16_t arg1, int16_t arg2) { save->magic_capacity_set = 1; // Set meter level save->magic_acquired = 1; // Required for meter to persist on save load save->magic_meter_size = 0x30; // Set meter size save->magic = 0x30; // Fill meter } -void give_double_magic(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_double_magic(z64_file_t* save, int16_t arg1, int16_t arg2) { save->magic_capacity_set = 2; // Set meter level save->magic_acquired = 1; // Required for meter to persist on save load save->magic_capacity = 1; // Required for meter to persist on save load @@ -193,29 +193,29 @@ void give_double_magic(z64_file_t *save, int16_t arg1, int16_t arg2) { save->magic = 0x60; // Fill meter } -void give_fairy_ocarina(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_fairy_ocarina(z64_file_t* save, int16_t arg1, int16_t arg2) { save->items[Z64_SLOT_OCARINA] = 0x07; } -void give_song(z64_file_t *save, int16_t quest_bit, int16_t arg2) { +void give_song(z64_file_t* save, int16_t quest_bit, int16_t arg2) { save->quest_items |= 1 << quest_bit; } -void ice_trap_effect(z64_file_t *save, int16_t arg1, int16_t arg2) { +void ice_trap_effect(z64_file_t* save, int16_t arg1, int16_t arg2) { push_pending_ice_trap(); } -void give_bean_pack(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_bean_pack(z64_file_t* save, int16_t arg1, int16_t arg2) { save->items[Z64_SLOT_BEANS] = Z64_ITEM_BEANS; save->ammo[14] += 10; // 10 Magic Beans } -void fill_wallet_upgrade(z64_file_t *save, int16_t arg1, int16_t arg2) { +void fill_wallet_upgrade(z64_file_t* save, int16_t arg1, int16_t arg2) { if(MAX_RUPEES) save->rupees = rupee_cap[arg1]; } -void clear_excess_hearts(z64_file_t *save, int16_t arg1, int16_t arg2) { +void clear_excess_hearts(z64_file_t* save, int16_t arg1, int16_t arg2) { if (save->energy_capacity >= 19 * 0x10) // Giving a Heart Container at 19 hearts. save->heart_pieces = 0; save->refill_hearts = 20 * 0x10; @@ -223,7 +223,7 @@ void clear_excess_hearts(z64_file_t *save, int16_t arg1, int16_t arg2) { uint8_t OPEN_KAKARIKO = 0; uint8_t COMPLETE_MASK_QUEST = 0; -void open_mask_shop(z64_file_t *save, int16_t arg1, int16_t arg2) { +void open_mask_shop(z64_file_t* save, int16_t arg1, int16_t arg2) { if (OPEN_KAKARIKO) { save->inf_table[7] = save->inf_table[7] | 0x40; // "Spoke to Gate Guard About Mask Shop" if (!COMPLETE_MASK_QUEST) { @@ -239,16 +239,16 @@ void open_mask_shop(z64_file_t *save, int16_t arg1, int16_t arg2) { trade_quest_upgrade(save, arg1, arg2); } -void give_bombchus(z64_file_t *save, int16_t arg1, int16_t arg2) { +void give_bombchus(z64_file_t* save, int16_t arg1, int16_t arg2) { save->items[Z64_SLOT_BOMBCHU] = Z64_ITEM_BOMBCHU; save->ammo[8] += arg1; } -void trade_quest_upgrade(z64_file_t *save, int16_t item_id, int16_t arg2) { +void trade_quest_upgrade(z64_file_t* save, int16_t item_id, int16_t arg2) { SaveFile_SetTradeItemAsOwned(item_id); } -void unlock_ocarina_note(z64_file_t *save, int16_t arg1, int16_t arg2) { +void unlock_ocarina_note(z64_file_t* save, int16_t arg1, int16_t arg2) { switch(arg1) { case 0: save->scene_flags[0x50].unk_00_ |= 1 << 0; // Unused word in scene x50. diff --git a/ASM/c/item_effects.h b/ASM/c/item_effects.h index 2ec033f56..fb7e09d01 100644 --- a/ASM/c/item_effects.h +++ b/ASM/c/item_effects.h @@ -6,31 +6,31 @@ #include "triforce.h" #include "ocarina_buttons.h" -void no_effect(z64_file_t *save, int16_t arg1, int16_t arg2); -void full_heal(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_triforce_piece(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_tycoon_wallet(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_biggoron_sword(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_bottle(z64_file_t *save, int16_t bottle_item_id, int16_t arg2); -void give_dungeon_item(z64_file_t *save, int16_t mask, int16_t dungeon_id); -void give_small_key(z64_file_t *save, int16_t dungeon_id, int16_t arg2); -void give_small_key_ring(z64_file_t *save, int16_t dungeon_id, int16_t arg2); -void give_silver_rupee(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupee_id); -void give_silver_rupee_pouch(z64_file_t *save, int16_t dungeon_id, int16_t silver_rupee_id); -void give_defense(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_magic(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_double_magic(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_fairy_ocarina(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_song(z64_file_t *save, int16_t quest_bit, int16_t arg2); -void ice_trap_effect(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_bean_pack(z64_file_t *save, int16_t arg1, int16_t arg2); -void fill_wallet_upgrade(z64_file_t *save, int16_t arg1, int16_t arg2); -void clear_excess_hearts(z64_file_t *save, int16_t arg1, int16_t arg2); -void open_mask_shop(z64_file_t *save, int16_t arg1, int16_t arg2); -void give_bombchus(z64_file_t *save, int16_t arg1, int16_t arg2); -void trade_quest_upgrade(z64_file_t *save, int16_t item_id, int16_t arg2); +void no_effect(z64_file_t* save, int16_t arg1, int16_t arg2); +void full_heal(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_triforce_piece(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_tycoon_wallet(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_biggoron_sword(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_bottle(z64_file_t* save, int16_t bottle_item_id, int16_t arg2); +void give_dungeon_item(z64_file_t* save, int16_t mask, int16_t dungeon_id); +void give_small_key(z64_file_t* save, int16_t dungeon_id, int16_t arg2); +void give_small_key_ring(z64_file_t* save, int16_t dungeon_id, int16_t arg2); +void give_silver_rupee(z64_file_t* save, int16_t dungeon_id, int16_t silver_rupee_id); +void give_silver_rupee_pouch(z64_file_t* save, int16_t dungeon_id, int16_t silver_rupee_id); +void give_defense(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_magic(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_double_magic(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_fairy_ocarina(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_song(z64_file_t* save, int16_t quest_bit, int16_t arg2); +void ice_trap_effect(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_bean_pack(z64_file_t* save, int16_t arg1, int16_t arg2); +void fill_wallet_upgrade(z64_file_t* save, int16_t arg1, int16_t arg2); +void clear_excess_hearts(z64_file_t* save, int16_t arg1, int16_t arg2); +void open_mask_shop(z64_file_t* save, int16_t arg1, int16_t arg2); +void give_bombchus(z64_file_t* save, int16_t arg1, int16_t arg2); +void trade_quest_upgrade(z64_file_t* save, int16_t item_id, int16_t arg2); extern uint8_t KEYRING_BOSSKEY_CONDITION; -void unlock_ocarina_note(z64_file_t *save, int16_t arg1, int16_t arg2); +void unlock_ocarina_note(z64_file_t* save, int16_t arg1, int16_t arg2); typedef enum dungeon { DEKU_ID = 0, diff --git a/ASM/c/item_table.c b/ASM/c/item_table.c index c6d74267a..633abcbd8 100644 --- a/ASM/c/item_table.c +++ b/ASM/c/item_table.c @@ -1,17 +1,16 @@ #include "item_table.h" +#include "dungeon_info.h" #include "item_effects.h" #include "item_upgrades.h" +#include "save.h" #include "util.h" #include "z64.h" -#include "save.h" -#include "item_effects.h" -#include "dungeon_info.h" extern uint8_t SHUFFLE_CHEST_GAME; #define ITEM_ROW( \ - base_item_id_, chest_type_, action_id_, collectible_, text_id_, object_id_, graphic_id_, \ + base_item_id_, chest_type_, action_id_, collectible_, text_id_, object_id_, graphic_id_, \ upgrade_, effect_, effect_arg1_, effect_arg2_, alt_text_func_) \ { .base_item_id = base_item_id_, .chest_type = chest_type_, .action_id = action_id_, \ .collectible = collectible_, .text_id = text_id_, .object_id = object_id_, .graphic_id = graphic_id_, \ @@ -140,7 +139,7 @@ item_row_t item_table[] = { [0x006E] = ITEM_ROW(0x53, GILDED_CHEST, 0x1C, -1, 0x005D, 0x0173, 0x67, no_upgrade, no_effect, -1, -1, NULL), // Blue Fire (Refill) [0x006F] = ITEM_ROW(0x53, GILDED_CHEST, 0x20, -1, 0x0097, 0x0176, 0x6A, no_upgrade, no_effect, -1, -1, NULL), // Poe (Refill) [0x0070] = ITEM_ROW(0x53, GILDED_CHEST, 0x1E, -1, 0x00F9, 0x0176, 0x70, no_upgrade, no_effect, -1, -1, NULL), // Big Poe (Refill) - [0x0071] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x913E, 0x00AA, 0x02, upgrade_key_model, give_small_key, TCG_ID, -1, resolve_text_small_keys_cmg), // Small Key (Chest Game) + [0x0071] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x00F3, 0x00AA, 0x02, upgrade_key_model, give_small_key, TCG_ID, -1, resolve_text_small_keys_cmg), // Small Key (Chest Game) [0x0072] = ITEM_ROW(0x4D, BROWN_CHEST, 0x84, -1, 0x00F4, 0x017F, 0x6D, no_upgrade, no_effect, -1, -1, NULL), // Green Rupee (Chest Game) [0x0073] = ITEM_ROW(0x4D, BROWN_CHEST, 0x85, -1, 0x00F5, 0x017F, 0x6E, no_upgrade, no_effect, -1, -1, NULL), // Blue Rupee (Chest Game) [0x0074] = ITEM_ROW(0x4D, BROWN_CHEST, 0x86, -1, 0x00F6, 0x017F, 0x6F, no_upgrade, no_effect, -1, -1, NULL), // Red Rupee (Chest Game) @@ -156,18 +155,18 @@ item_row_t item_table[] = { [0x007E] = ITEM_ROW(0x3E, HEART_CHEST_SMALL, 0x41, -1, 0x90C6, 0x00BD, 0x13, no_upgrade, full_heal, -1, -1, NULL), // Capped Heart Container [0x007F] = ITEM_ROW(0x53, HEART_CHEST_SMALL, 0x41, -1, 0x90FA, 0x00BD, 0x14, no_upgrade, full_heal, -1, -1, NULL), // Capped Piece of Heart (Chest Game) - [0x0080] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00DD, 0x2D, hookshot_upgrade, no_effect, -1, -1, NULL), // Progressive Hookshot - [0x0081] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x0147, 0x58, strength_upgrade, no_effect, -1, -1, NULL), // Progressive Strength - [0x0082] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00BF, 0x18, bomb_bag_upgrade, no_effect, -1, -1, NULL), // Progressive Bomb Bag - [0x0083] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00E9, 0x35, bow_upgrade, no_effect, -1, -1, NULL), // Progressive Bow - [0x0084] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00E7, 0x33, slingshot_upgrade, no_effect, -1, -1, NULL), // Progressive Slingshot - [0x0085] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00D1, 0x22, wallet_upgrade, no_effect, -1, -1, NULL), // Progressive Wallet - [0x0086] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00DB, 0x2A, scale_upgrade, no_effect, -1, -1, NULL), // Progressive Scale - [0x0087] = ITEM_ROW( -1, BROWN_CHEST, -1, -1, -1, 0x00BB, 0x12, nut_upgrade, no_effect, -1, -1, NULL), // Progressive Nut Capacity - [0x0088] = ITEM_ROW( -1, BROWN_CHEST, -1, -1, -1, 0x00C7, 0x1B, stick_upgrade, no_effect, -1, -1, NULL), // Progressive Stick Capacity - [0x0089] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00D9, 0x28, bombchu_upgrade, no_effect, -1, -1, NULL), // Progressive Bombchus - [0x008A] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00CD, 0x1E, magic_upgrade, no_effect, -1, -1, NULL), // Progressive Magic Meter - [0x008B] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x010E, 0x46, ocarina_upgrade, no_effect, -1, -1, NULL), // Progressive Ocarina + [0x0080] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00DD, 0x2D, hookshot_upgrade, no_effect, -1, -1, NULL), // Progressive Hookshot + [0x0081] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x0147, 0x58, strength_upgrade, no_effect, -1, -1, NULL), // Progressive Strength + [0x0082] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00BF, 0x18, bomb_bag_upgrade, no_effect, -1, -1, NULL), // Progressive Bomb Bag + [0x0083] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00E9, 0x35, bow_upgrade, no_effect, -1, -1, NULL), // Progressive Bow + [0x0084] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00E7, 0x33, slingshot_upgrade, no_effect, -1, -1, NULL), // Progressive Slingshot + [0x0085] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00D1, 0x22, wallet_upgrade, no_effect, -1, -1, NULL), // Progressive Wallet + [0x0086] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00DB, 0x2A, scale_upgrade, no_effect, -1, -1, NULL), // Progressive Scale + [0x0087] = ITEM_ROW( -1, BROWN_CHEST, -1, -1, -1, 0x00BB, 0x12, nut_upgrade, no_effect, -1, -1, NULL), // Progressive Nut Capacity + [0x0088] = ITEM_ROW( -1, BROWN_CHEST, -1, -1, -1, 0x00C7, 0x1B, stick_upgrade, no_effect, -1, -1, NULL), // Progressive Stick Capacity + [0x0089] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00D9, 0x28, bombchu_upgrade, no_effect, -1, -1, NULL), // Progressive Bombchus + [0x008A] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00CD, 0x1E, magic_upgrade, no_effect, -1, -1, NULL), // Progressive Magic Meter + [0x008B] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x010E, 0x46, ocarina_upgrade, no_effect, -1, -1, NULL), // Progressive Ocarina [0x008C] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90A0, 0x00C6, 0x01, no_upgrade, give_bottle, 0x15, -1, NULL), // Bottle with Red Potion [0x008D] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90A1, 0x00C6, 0x01, no_upgrade, give_bottle, 0x16, -1, NULL), // Bottle with Green Potion @@ -179,34 +178,34 @@ item_row_t item_table[] = { [0x0093] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90A7, 0x0176, 0x70, no_upgrade, give_bottle, 0x1E, -1, NULL), // Bottle with Big Poe [0x0094] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90A8, 0x0176, 0x6A, no_upgrade, give_bottle, 0x20, -1, NULL), // Bottle with Poe - [0x0095] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0006, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, FOREST_ID, NULL), // Forest Temple Boss Key - [0x0096] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001C, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, FIRE_ID, NULL), // Fire Temple Boss Key - [0x0097] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001D, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, WATER_ID, NULL), // Water Temple Boss Key - [0x0098] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001E, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, SPIRIT_ID, NULL), // Spirit Temple Boss Key - [0x0099] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x002A, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, SHADOW_ID, NULL), // Shadow Temple Boss Key - [0x009A] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0061, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, TOWER_ID, NULL), // Ganon's Castle Boss Key - - [0x009B] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0062, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, DEKU_ID, NULL), // Deku Tree Compass - [0x009C] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0063, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, DODONGO_ID, NULL), // Dodongo's Cavern Compass - [0x009D] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0064, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, JABU_ID, NULL), // Jabu Jabu Compass - [0x009E] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0065, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, FOREST_ID, NULL), // Forest Temple Compass - [0x009F] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007C, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, FIRE_ID, NULL), // Fire Temple Compass - [0x00A0] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007D, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, WATER_ID, NULL), // Water Temple Compass - [0x00A1] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007E, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, SPIRIT_ID, NULL), // Spirit Temple Compass - [0x00A2] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007F, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, SHADOW_ID, NULL), // Shadow Temple Compass - [0x00A3] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A2, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, BOTW_ID, NULL), // Bottom of the Well Compass - [0x00A4] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0087, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, ICE_ID, NULL), // Ice Cavern Compass - - [0x00A5] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0088, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, DEKU_ID, NULL), // Deku Tree Map - [0x00A6] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0089, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, DODONGO_ID, NULL), // Dodongo's Cavern Map - [0x00A7] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008A, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, JABU_ID, NULL), // Jabu Jabu Map - [0x00A8] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008B, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, FOREST_ID, NULL), // Forest Temple Map - [0x00A9] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008C, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, FIRE_ID, NULL), // Fire Temple Map - [0x00AA] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008E, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, WATER_ID, NULL), // Water Temple Map - [0x00AB] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008F, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, SPIRIT_ID, NULL), // Spirit Temple Map - [0x00AC] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A3, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, SHADOW_ID, NULL), // Shadow Temple Map - [0x00AD] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A5, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, BOTW_ID, NULL), // Bottom of the Well Map - [0x00AE] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0092, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, ICE_ID, NULL), // Ice Cavern Map + [0x0095] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0006, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, FOREST_ID, NULL), // Forest Temple Boss Key + [0x0096] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001C, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, FIRE_ID, NULL), // Fire Temple Boss Key + [0x0097] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001D, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, WATER_ID, NULL), // Water Temple Boss Key + [0x0098] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001E, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, SPIRIT_ID, NULL), // Spirit Temple Boss Key + [0x0099] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x002A, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, SHADOW_ID, NULL), // Shadow Temple Boss Key + [0x009A] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0061, 0x00B9, 0x0A, upgrade_key_model, give_dungeon_item, 0x01, TOWER_ID, NULL), // Ganon's Castle Boss Key + + [0x009B] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0062, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, DEKU_ID, NULL), // Deku Tree Compass + [0x009C] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0063, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, DODONGO_ID, NULL), // Dodongo's Cavern Compass + [0x009D] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0064, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, JABU_ID, NULL), // Jabu Jabu Compass + [0x009E] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0065, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, FOREST_ID, NULL), // Forest Temple Compass + [0x009F] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007C, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, FIRE_ID, NULL), // Fire Temple Compass + [0x00A0] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007D, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, WATER_ID, NULL), // Water Temple Compass + [0x00A1] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007E, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, SPIRIT_ID, NULL), // Spirit Temple Compass + [0x00A2] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x007F, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, SHADOW_ID, NULL), // Shadow Temple Compass + [0x00A3] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A2, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, BOTW_ID, NULL), // Bottom of the Well Compass + [0x00A4] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0087, 0x00B8, 0x0B, no_upgrade, give_dungeon_item, 0x02, ICE_ID, NULL), // Ice Cavern Compass + + [0x00A5] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0088, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, DEKU_ID, NULL), // Deku Tree Map + [0x00A6] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0089, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, DODONGO_ID, NULL), // Dodongo's Cavern Map + [0x00A7] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008A, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, JABU_ID, NULL), // Jabu Jabu Map + [0x00A8] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008B, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, FOREST_ID, NULL), // Forest Temple Map + [0x00A9] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008C, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, FIRE_ID, NULL), // Fire Temple Map + [0x00AA] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008E, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, WATER_ID, NULL), // Water Temple Map + [0x00AB] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x008F, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, SPIRIT_ID, NULL), // Spirit Temple Map + [0x00AC] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A3, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, SHADOW_ID, NULL), // Shadow Temple Map + [0x00AD] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x00A5, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, BOTW_ID, NULL), // Bottom of the Well Map + [0x00AE] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x0092, 0x00C8, 0x1C, no_upgrade, give_dungeon_item, 0x04, ICE_ID, NULL), // Ice Cavern Map [0x00AF] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x0093, 0x00AA, 0x02, upgrade_key_model, give_small_key, FOREST_ID, -1, resolve_text_small_keys), // Forest Temple Small Key [0x00B0] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x0094, 0x00AA, 0x02, upgrade_key_model, give_small_key, FIRE_ID, -1, resolve_text_small_keys), // Fire Temple Small Key @@ -222,11 +221,11 @@ item_row_t item_table[] = { [0x00B9] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00E4, 0x00CD, 0x1E, no_upgrade, give_magic, -1, -1, NULL), // Magic Meter [0x00BA] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00E8, 0x00CD, 0x1F, no_upgrade, give_double_magic, -1, -1, NULL), // Double Magic - [0x00BB] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9091, 0x0196, 0x78, no_upgrade, give_song, 6, -1, NULL), // Minuet of Forest - [0x00BC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9092, 0x0196, 0x79, no_upgrade, give_song, 7, -1, NULL), // Bolero of Fire - [0x00BD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9093, 0x0196, 0x7A, no_upgrade, give_song, 8, -1, NULL), // Serenade of Water - [0x00BE] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9094, 0x0196, 0x7B, no_upgrade, give_song, 9, -1, NULL), // Requiem of Spirit - [0x00BF] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9095, 0x0196, 0x7C, no_upgrade, give_song, 10, -1, NULL), // Nocturn of Shadow + [0x00BB] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9091, 0x0196, 0x78, no_upgrade, give_song, 6, -1, NULL), // Minuet of Forest + [0x00BC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9092, 0x0196, 0x79, no_upgrade, give_song, 7, -1, NULL), // Bolero of Fire + [0x00BD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9093, 0x0196, 0x7A, no_upgrade, give_song, 8, -1, NULL), // Serenade of Water + [0x00BE] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9094, 0x0196, 0x7B, no_upgrade, give_song, 9, -1, NULL), // Requiem of Spirit + [0x00BF] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9095, 0x0196, 0x7C, no_upgrade, give_song, 10, -1, NULL), // Nocturne of Shadow [0x00C0] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9096, 0x0196, 0x7D, no_upgrade, give_song, 11, -1, NULL), // Prelude of Light [0x00C1] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x909A, 0x00B6, 0x04, no_upgrade, give_song, 12, -1, NULL), // Zelda's Lullaby @@ -236,26 +235,26 @@ item_row_t item_table[] = { [0x00C5] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x909E, 0x00B6, 0x05, no_upgrade, give_song, 16, -1, NULL), // Song of Time [0x00C6] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x909F, 0x00B6, 0x07, no_upgrade, give_song, 17, -1, NULL), // Song of Storms - [0x00C7] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00F8, 0x00D1, 0x23, no_upgrade, give_tycoon_wallet, 3, -1, NULL), // Tycoon's Wallet - [0x00C8] = ITEM_ROW(0x53, GILDED_CHEST, 0x14, -1, 0x9099, 0x010B, 0x45, no_upgrade, no_effect, -1, -1, NULL), // Redundant Letter Bottle - [0x00C9] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9048, 0x00F3, 0x3E, no_upgrade, give_bean_pack, -1, -1, NULL), // Magic Bean Pack + [0x00C7] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00F8, 0x00D1, 0x23, no_upgrade, give_tycoon_wallet, 3, -1, NULL), // Tycoon's Wallet + [0x00C8] = ITEM_ROW(0x53, GILDED_CHEST, 0x14, -1, 0x9099, 0x010B, 0x45, no_upgrade, no_effect, -1, -1, NULL), // Redundant Letter Bottle + [0x00C9] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9048, 0x00F3, 0x3E, no_upgrade, give_bean_pack, -1, -1, NULL), // Magic Bean Pack [0x00CA] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9003, 0x0193, 0x76, no_upgrade, give_triforce_piece, -1, -1, NULL), // Triforce piece - [0x00CB] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FOREST_ID, -1, resolve_text_keyrings), // Forest Temple Small Key Ring - [0x00CC] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FIRE_ID, -1, resolve_text_keyrings), // Fire Temple Small Key Ring - [0x00CD] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, WATER_ID, -1, resolve_text_keyrings), // Water Temple Small Key Ring - [0x00CE] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, SPIRIT_ID, -1, resolve_text_keyrings), // Spirit Temple Small Key Ring - [0x00CF] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, SHADOW_ID, -1, resolve_text_keyrings), // Shadow Temple Small Key Ring - [0x00D0] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, BOTW_ID, -1, resolve_text_keyrings), // Bottom of the Well Small Key Ring - [0x00D1] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, GTG_ID, -1, resolve_text_keyrings), // Gerudo Training Small Key Ring - [0x00D2] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FORT_ID, -1, resolve_text_keyrings), // Thieves' Hideout Small Key Ring - [0x00D3] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, CASTLE_ID, -1, resolve_text_keyrings), // Ganon's Castle Small Key Ring + [0x00CB] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FOREST_ID, 1, resolve_text_keyrings), // Forest Temple Small Key Ring + [0x00CC] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FIRE_ID, 1, resolve_text_keyrings), // Fire Temple Small Key Ring + [0x00CD] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, WATER_ID, 1, resolve_text_keyrings), // Water Temple Small Key Ring + [0x00CE] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, SPIRIT_ID, 1, resolve_text_keyrings), // Spirit Temple Small Key Ring + [0x00CF] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, SHADOW_ID, 1, resolve_text_keyrings), // Shadow Temple Small Key Ring + [0x00D0] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, BOTW_ID, 0, resolve_text_keyrings), // Bottom of the Well Small Key Ring + [0x00D1] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, GTG_ID, 0, resolve_text_keyrings), // Gerudo Training Small Key Ring + [0x00D2] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, FORT_ID, 0, resolve_text_keyrings), // Thieves' Hideout Small Key Ring + [0x00D3] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, CASTLE_ID, 0, resolve_text_keyrings), // Ganon's Castle Small Key Ring [0x00D4] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9019, 0x0197, 0x7E, no_upgrade, give_bombchus, 20, -1, NULL), // Bombchu Bag (20) [0x00D5] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9019, 0x0197, 0x7E, no_upgrade, give_bombchus, 10, -1, NULL), // Bombchu Bag (10) [0x00D6] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9019, 0x0197, 0x7E, no_upgrade, give_bombchus, 5, -1, NULL), // Bombchu Bag (5) - [0x00D7] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, TCG_ID, -1, resolve_text_keyrings), // Treasure Chest Game Small Key Ring + [0x00D7] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x9200, 0x0195, 0x77, no_upgrade, give_small_key_ring, TCG_ID, 0, resolve_text_keyrings), // Treasure Chest Game Small Key Ring [0x00D8] = ITEM_ROW(0x4D, SILVER_CHEST, 0x85, -1, 0x901B, 0x0198, 0x72, no_upgrade, give_silver_rupee, DODONGO_ID, 0x00, resolve_text_silver_rupees), // Silver Rupee (Dodongos Cavern Staircase) [0x00D9] = ITEM_ROW(0x4D, SILVER_CHEST, 0x85, -1, 0x901C, 0x0198, 0x72, no_upgrade, give_silver_rupee, ICE_ID, 0x01, resolve_text_silver_rupees), // Silver Rupee (Ice Cavern Spinning Scythe) @@ -311,12 +310,13 @@ item_row_t item_table[] = { [0x0108] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9090, 0x01A9, 0x94, no_upgrade, unlock_ocarina_note, 4, -1, NULL), // Ocarina C right // Custom Key Models - [0x0109] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0006, 0x01A3, 0x8A, no_upgrade, give_dungeon_item, 0x01, FOREST_ID, NULL ), // Forest Temple Boss Key - [0x010A] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001C, 0x01A4, 0x8B, no_upgrade, give_dungeon_item, 0x01, FIRE_ID, NULL ), // Fire Temple Boss Key - [0x010B] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001D, 0x01A5, 0x8C, no_upgrade, give_dungeon_item, 0x01, WATER_ID, NULL ), // Water Temple Boss Key - [0x010C] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001E, 0x01A6, 0x8D, no_upgrade, give_dungeon_item, 0x01, SPIRIT_ID, NULL ), // Spirit Temple Boss Key - [0x010D] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x002A, 0x01A7, 0x8E, no_upgrade, give_dungeon_item, 0x01, SHADOW_ID, NULL ), // Shadow Temple Boss Key - [0x010E] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0061, 0x00B9, 0x8F, no_upgrade, give_dungeon_item, 0x01, TOWER_ID, NULL ), // Ganon's Castle Boss Key + [0x0109] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0006, 0x01A3, 0x8A, no_upgrade, give_dungeon_item, 0x01, FOREST_ID, NULL), // Forest Temple Boss Key + [0x010A] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001C, 0x01A4, 0x8B, no_upgrade, give_dungeon_item, 0x01, FIRE_ID, NULL), // Fire Temple Boss Key + [0x010B] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001D, 0x01A5, 0x8C, no_upgrade, give_dungeon_item, 0x01, WATER_ID, NULL), // Water Temple Boss Key + [0x010C] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x001E, 0x01A6, 0x8D, no_upgrade, give_dungeon_item, 0x01, SPIRIT_ID, NULL), // Spirit Temple Boss Key + [0x010D] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x002A, 0x01A7, 0x8E, no_upgrade, give_dungeon_item, 0x01, SHADOW_ID, NULL), // Shadow Temple Boss Key + [0x010E] = ITEM_ROW(0x53, GOLD_CHEST, 0x41, -1, 0x0061, 0x00B9, 0x8F, no_upgrade, give_dungeon_item, 0x01, TOWER_ID, NULL), // Ganon's Castle Boss Key + [0x010F] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x0093, 0x0199, 0x80, no_upgrade, give_small_key, FOREST_ID, -1, resolve_text_small_keys), // Forest Temple Small Key [0x0110] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x0094, 0x019A, 0x81, no_upgrade, give_small_key, FIRE_ID, -1, resolve_text_small_keys), // Fire Temple Small Key [0x0111] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x0095, 0x019B, 0x82, no_upgrade, give_small_key, WATER_ID, -1, resolve_text_small_keys), // Water Temple Small Key @@ -327,7 +327,6 @@ item_row_t item_table[] = { [0x0116] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x00A0, 0x01A0, 0x87, no_upgrade, give_small_key, FORT_ID, -1, resolve_text_small_keys), // Thieves' Hideout Small Key [0x0117] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x00A1, 0x01A1, 0x88, no_upgrade, give_small_key, CASTLE_ID, -1, resolve_text_small_keys), // Ganon's Castle Small Key [0x0118] = ITEM_ROW(0x53, SILVER_CHEST, 0x41, -1, 0x913E, 0x01A2, 0x89, no_upgrade, give_small_key, TCG_ID, -1, resolve_text_small_keys_cmg), // Small Key (Chest Game) - }; /* Determine which message to display based on the number of silver rupees collected. @@ -341,7 +340,7 @@ item_row_t item_table[] = { Returns: text_id to use based on the logic above. */ -uint16_t resolve_text_silver_rupees(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { +uint16_t resolve_text_silver_rupees(item_row_t* item_row, bool is_outgoing) { // Get the arguments from the item_row struct. int16_t dungeon_id = item_row->effect_arg1; int16_t silver_rupee_id = item_row->effect_arg2; @@ -364,7 +363,7 @@ uint16_t resolve_text_silver_rupees(item_row_t *item_row, uint16_t item_id, bool } } -uint16_t resolve_text_silver_rupee_pouches(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { +uint16_t resolve_text_silver_rupee_pouches(item_row_t* item_row, bool is_outgoing) { // Get the arguments from the item_row struct. int16_t dungeon_id = item_row->effect_arg1; int16_t silver_rupee_id = item_row->effect_arg2; @@ -381,7 +380,7 @@ uint16_t resolve_text_silver_rupee_pouches(item_row_t *item_row, uint16_t item_i } } -uint16_t resolve_text_small_keys(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { +uint16_t resolve_text_small_keys(item_row_t* item_row, bool is_outgoing) { // Get the arguments from the item_row struct. int16_t dungeon_id = item_row->effect_arg1; @@ -392,77 +391,60 @@ uint16_t resolve_text_small_keys(item_row_t *item_row, uint16_t item_id, bool is if (is_outgoing) { return item_row->text_id; - } - if (total_keys >= max_keys) { + } else if (total_keys >= max_keys) { // The player already has enough keys. return 0x9123 + dungeon_id; } else if (total_keys == 0) { - // This is the first key so use the stupid message. + // This is the first key. return 0x9101 + dungeon_id; - } else if (total_keys >= 1) { + } else { // Show number collected. return 0x9112 + dungeon_id; - } else { - // Should never actually get here but if we do, just use the regular message. - return item_row->text_id; } } -uint16_t resolve_text_small_keys_cmg(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { - +uint16_t resolve_text_small_keys_cmg(item_row_t* item_row, bool is_outgoing) { // Don't use custom message for Treasure Chest Game if it's not shuffled. if (!SHUFFLE_CHEST_GAME) { return item_row->text_id; } - return resolve_text_small_keys(item_row, item_id, is_outgoing); + return resolve_text_small_keys(item_row, is_outgoing); } -uint16_t resolve_text_keyrings(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { +uint16_t resolve_text_keyrings(item_row_t* item_row, bool is_outgoing) { int16_t dungeon_id = item_row->effect_arg1; - if (item_id >= 0x00CB && item_id < 0x00D0 && KEYRING_BOSSKEY_CONDITION) { + int16_t has_boss_key = item_row->effect_arg2; + if (has_boss_key && KEYRING_BOSSKEY_CONDITION) { return item_row->text_id + dungeon_id + 14; } return item_row->text_id + dungeon_id; } -item_row_t *get_item_row(uint16_t item_id) { +item_row_t* get_item_row(uint16_t item_id) { if (item_id >= array_size(item_table)) { return NULL; } - item_row_t *item_row = &(item_table[item_id]); + item_row_t* item_row = &(item_table[item_id]); if (item_row->base_item_id == 0) { return NULL; } return item_row; } -/* -uint16_t resolve_item_text_id(uint16_t item_id, bool is_outgoing) { - item_row_t *item_row = get_item_row(item_id); - if ((item_id >= 0xAF && item_id < 0xB8) || (item_id >= 0x10F && item_id < 0x118) || (SHUFFLE_CHEST_GAME && (item_id == 0x71 || item_id == 0x118)) && !is_outgoing) { - return item_row->text_id + (z64_file.scene_flags[item_row->effect_arg1].unk_00_ >> 0x10); // Dynamically select the text box based on key count - } - // Change message for key rings when they include boss keys - if (item_id >= 0x00CB && item_id < 0x00D0 && KEYRING_BOSSKEY_CONDITION) { - return item_row->text_id + 9; - } - return item_row->text_id; -*/ - -uint16_t resolve_item_text_id(item_row_t *item_row, uint16_t item_id, bool is_outgoing) { +uint16_t resolve_item_text_id(item_row_t* item_row, bool is_outgoing) { if (item_row->alt_text_func == NULL) { return item_row->text_id; } else { - return item_row->alt_text_func(item_row, item_id, is_outgoing); + return item_row->alt_text_func(item_row, is_outgoing); } } uint16_t resolve_upgrades(override_t override) { - item_row_t *item_row = get_item_row(override.value.base.item_id); + item_row_t* item_row = get_item_row(override.value.base.item_id); return item_row->upgrade(&z64_file, override); } -void call_effect_function(item_row_t *item_row) { +void call_effect_function(item_row_t* item_row) { item_row->effect(&z64_file, item_row->effect_arg1, item_row->effect_arg2); } diff --git a/ASM/c/item_table.h b/ASM/c/item_table.h index 1d4eb05b6..207254d29 100644 --- a/ASM/c/item_table.h +++ b/ASM/c/item_table.h @@ -29,9 +29,9 @@ typedef enum { struct item_row_t; -typedef uint16_t (*upgrade_fn)(z64_file_t *save, override_t override); -typedef void (*effect_fn)(z64_file_t *save, int16_t arg1, int16_t arg2); -typedef uint16_t (*alt_text_fn)(struct item_row_t *this, uint16_t item_id, bool is_outgoing); +typedef uint16_t (*upgrade_fn)(z64_file_t* save, override_t override); +typedef void (*effect_fn)(z64_file_t* save, int16_t arg1, int16_t arg2); +typedef uint16_t (*alt_text_fn)(struct item_row_t* this, bool is_outgoing); typedef struct item_row_t { int8_t base_item_id; @@ -49,13 +49,13 @@ typedef struct item_row_t { } item_row_t; uint16_t resolve_upgrades(override_t override); -item_row_t *get_item_row(uint16_t item_id); -void call_effect_function(item_row_t *item_row); -uint16_t resolve_item_text_id(item_row_t *item_row, uint16_t item_id, bool is_outgoing); -uint16_t resolve_text_silver_rupees(item_row_t *item_row, uint16_t item_id, bool is_outgoing); -uint16_t resolve_text_silver_rupee_pouches(item_row_t *item_row, uint16_t item_id, bool is_outgoing); -uint16_t resolve_text_small_keys(item_row_t *item_row, uint16_t item_id, bool is_outgoing); -uint16_t resolve_text_small_keys_cmg(item_row_t *item_row, uint16_t item_id, bool is_outgoing); -uint16_t resolve_text_keyrings(item_row_t *item_row, uint16_t item_id, bool is_outgoing); +item_row_t* get_item_row(uint16_t item_id); +void call_effect_function(item_row_t* item_row); +uint16_t resolve_item_text_id(item_row_t* item_row, bool is_outgoing); +uint16_t resolve_text_silver_rupees(item_row_t* item_row, bool is_outgoing); +uint16_t resolve_text_silver_rupee_pouches(item_row_t* item_row, bool is_outgoing); +uint16_t resolve_text_small_keys(item_row_t* item_row, bool is_outgoing); +uint16_t resolve_text_small_keys_cmg(item_row_t* item_row, bool is_outgoing); +uint16_t resolve_text_keyrings(item_row_t* item_row, bool is_outgoing); #endif diff --git a/ASM/c/item_upgrades.c b/ASM/c/item_upgrades.c index 8c98c1426..8f702c3a1 100644 --- a/ASM/c/item_upgrades.c +++ b/ASM/c/item_upgrades.c @@ -30,18 +30,18 @@ extern uint8_t MW_PROGRESSIVE_ITEMS_ENABLE; extern mw_progressive_items_state_t MW_PROGRESSIVE_ITEMS_STATE[256]; -uint16_t no_upgrade(z64_file_t *save, override_t override) { +uint16_t no_upgrade(z64_file_t* save, override_t override) { return override.value.base.item_id; } -uint16_t hookshot_upgrade(z64_file_t *save, override_t override) { +uint16_t hookshot_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->items[Z64_SLOT_HOOKSHOT] : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].hookshot) { case -1: case 0: return 0x08; // Hookshot default: return 0x09; // Longshot } } -uint16_t strength_upgrade(z64_file_t *save, override_t override) { +uint16_t strength_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->strength_upgrade : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].strength) { case 0: return 0x54; // Goron Bracelet case 1: return 0x35; // Silver Gauntlets @@ -49,7 +49,7 @@ uint16_t strength_upgrade(z64_file_t *save, override_t override) { } } -uint16_t bomb_bag_upgrade(z64_file_t *save, override_t override) { +uint16_t bomb_bag_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->bomb_bag : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].bomb_bag) { case 0: return 0x32; // Bomb Bag case 1: return 0x33; // Bigger Bomb Bag @@ -57,7 +57,7 @@ uint16_t bomb_bag_upgrade(z64_file_t *save, override_t override) { } } -uint16_t bow_upgrade(z64_file_t *save, override_t override) { +uint16_t bow_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->quiver : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].bow) { case 0: return 0x04; // Bow case 1: return 0x30; // Big Quiver @@ -65,7 +65,7 @@ uint16_t bow_upgrade(z64_file_t *save, override_t override) { } } -uint16_t slingshot_upgrade(z64_file_t *save, override_t override) { +uint16_t slingshot_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->bullet_bag : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].slingshot) { case 0: return 0x05; // Slingshot case 1: return 0x60; // Bullet Bag (40) @@ -73,7 +73,7 @@ uint16_t slingshot_upgrade(z64_file_t *save, override_t override) { } } -uint16_t wallet_upgrade(z64_file_t *save, override_t override) { +uint16_t wallet_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->wallet : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].wallet) { case 0: return 0x45; // Adult's Wallet case 1: return 0x46; // Giant's Wallet @@ -81,14 +81,14 @@ uint16_t wallet_upgrade(z64_file_t *save, override_t override) { } } -uint16_t scale_upgrade(z64_file_t *save, override_t override) { +uint16_t scale_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->diving_upgrade : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].scale) { case 0: return 0x37; // Silver Scale default: return 0x38; // Gold Scale } } -uint16_t nut_upgrade(z64_file_t *save, override_t override) { +uint16_t nut_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->nut_upgrade : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].nuts) { case 0: return 0x79; // 30 Nuts. 0 and 1 are both starting capacity case 1: return 0x79; // 30 Nuts @@ -96,7 +96,7 @@ uint16_t nut_upgrade(z64_file_t *save, override_t override) { } } -uint16_t stick_upgrade(z64_file_t *save, override_t override) { +uint16_t stick_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->stick_upgrade : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].sticks) { case 0: return 0x77; // 20 Sticks. 0 and 1 are both starting capacity case 1: return 0x77; // 20 Sticks @@ -104,14 +104,14 @@ uint16_t stick_upgrade(z64_file_t *save, override_t override) { } } -uint16_t magic_upgrade(z64_file_t *save, override_t override) { +uint16_t magic_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->magic_acquired : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].magic) { case 0: return 0xB9; // Single Magic default: return 0xBA; // Double Magic } } -uint16_t bombchu_upgrade(z64_file_t *save, override_t override) { +uint16_t bombchu_upgrade(z64_file_t* save, override_t override) { if (save->items[Z64_SLOT_BOMBCHU] == -1) { return 0x6B; // Bombchu 20 pack } @@ -121,26 +121,26 @@ uint16_t bombchu_upgrade(z64_file_t *save, override_t override) { return 0x6A; // Bombchu 5 pack } -uint16_t ocarina_upgrade(z64_file_t *save, override_t override) { +uint16_t ocarina_upgrade(z64_file_t* save, override_t override) { switch ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->items[Z64_SLOT_OCARINA] : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].ocarina) { case -1: case 0: return 0x3B; // Fairy Ocarina default: return 0x0C; // Ocarina of Time } } -uint16_t arrows_to_rupee(z64_file_t *save, override_t override) { +uint16_t arrows_to_rupee(z64_file_t* save, override_t override) { return ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->quiver : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].bow) ? override.value.base.item_id : 0x4D; // Blue Rupee } -uint16_t bombs_to_rupee(z64_file_t *save, override_t override) { +uint16_t bombs_to_rupee(z64_file_t* save, override_t override) { return ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->bomb_bag : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].bomb_bag) ? override.value.base.item_id : 0x4D; // Blue Rupee } -uint16_t seeds_to_rupee(z64_file_t *save, override_t override) { +uint16_t seeds_to_rupee(z64_file_t* save, override_t override) { return ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->bullet_bag : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].slingshot) ? override.value.base.item_id : 0x4D; // Blue Rupee } -uint16_t letter_to_bottle(z64_file_t *save, override_t override) { +uint16_t letter_to_bottle(z64_file_t* save, override_t override) { if (save->event_chk_inf[3] & 0x0008) // "King Zora Moved Aside" return 0xC8; // Redundant Letter Bottle if (save->items[Z64_SLOT_BOTTLE_1] == 0x1B || save->items[Z64_SLOT_BOTTLE_2] == 0x1B @@ -149,7 +149,7 @@ uint16_t letter_to_bottle(z64_file_t *save, override_t override) { return override.value.base.item_id; } -uint16_t health_upgrade_cap(z64_file_t *save, override_t override) { +uint16_t health_upgrade_cap(z64_file_t* save, override_t override) { if (save->energy_capacity >= 20 * 0x10) { // Already at capped health. if (override.value.base.item_id == 0x76) { // Piece of Heart (Chest Game) return 0x7F; @@ -162,7 +162,7 @@ uint16_t health_upgrade_cap(z64_file_t *save, override_t override) { return override.value.base.item_id; } -uint16_t bombchus_to_bag(z64_file_t *save, override_t override) { +uint16_t bombchus_to_bag(z64_file_t* save, override_t override) { if (FREE_BOMBCHU_DROPS && ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->items[Z64_SLOT_BOMBCHU] == -1 : !MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].chu_bag)) { // First chu pack found, convert to bombchu bag to // tell player about chu drops. Different bags @@ -178,7 +178,7 @@ uint16_t bombchus_to_bag(z64_file_t *save, override_t override) { } } -uint16_t upgrade_key_model(z64_file_t *save, override_t override) { +uint16_t upgrade_key_model(z64_file_t* save, override_t override) { uint16_t item_id = override.value.base.item_id; if (CUSTOM_KEY_MODELS) { if (item_id == 0x0071) { diff --git a/ASM/c/item_upgrades.h b/ASM/c/item_upgrades.h index 8a4d98f17..858085829 100644 --- a/ASM/c/item_upgrades.h +++ b/ASM/c/item_upgrades.h @@ -6,25 +6,25 @@ extern uint8_t CUSTOM_KEY_MODELS; -uint16_t no_upgrade(z64_file_t *save, override_t override); -uint16_t hookshot_upgrade(z64_file_t *save, override_t override); -uint16_t strength_upgrade(z64_file_t *save, override_t override); -uint16_t bomb_bag_upgrade(z64_file_t *save, override_t override); -uint16_t bow_upgrade(z64_file_t *save, override_t override); -uint16_t slingshot_upgrade(z64_file_t *save, override_t override); -uint16_t wallet_upgrade(z64_file_t *save, override_t override); -uint16_t scale_upgrade(z64_file_t *save, override_t override); -uint16_t nut_upgrade(z64_file_t *save, override_t override); -uint16_t stick_upgrade(z64_file_t *save, override_t override); -uint16_t magic_upgrade(z64_file_t *save, override_t override); -uint16_t bombchu_upgrade(z64_file_t *save, override_t override); -uint16_t ocarina_upgrade(z64_file_t *save, override_t override); -uint16_t arrows_to_rupee(z64_file_t *save, override_t override); -uint16_t bombs_to_rupee(z64_file_t *save, override_t override); -uint16_t seeds_to_rupee(z64_file_t *save, override_t override); -uint16_t letter_to_bottle(z64_file_t *save, override_t override); -uint16_t health_upgrade_cap(z64_file_t *save, override_t override); -uint16_t bombchus_to_bag(z64_file_t *save, override_t override); -uint16_t upgrade_key_model(z64_file_t *save, override_t override); +uint16_t no_upgrade(z64_file_t* save, override_t override); +uint16_t hookshot_upgrade(z64_file_t* save, override_t override); +uint16_t strength_upgrade(z64_file_t* save, override_t override); +uint16_t bomb_bag_upgrade(z64_file_t* save, override_t override); +uint16_t bow_upgrade(z64_file_t* save, override_t override); +uint16_t slingshot_upgrade(z64_file_t* save, override_t override); +uint16_t wallet_upgrade(z64_file_t* save, override_t override); +uint16_t scale_upgrade(z64_file_t* save, override_t override); +uint16_t nut_upgrade(z64_file_t* save, override_t override); +uint16_t stick_upgrade(z64_file_t* save, override_t override); +uint16_t magic_upgrade(z64_file_t* save, override_t override); +uint16_t bombchu_upgrade(z64_file_t* save, override_t override); +uint16_t ocarina_upgrade(z64_file_t* save, override_t override); +uint16_t arrows_to_rupee(z64_file_t* save, override_t override); +uint16_t bombs_to_rupee(z64_file_t* save, override_t override); +uint16_t seeds_to_rupee(z64_file_t* save, override_t override); +uint16_t letter_to_bottle(z64_file_t* save, override_t override); +uint16_t health_upgrade_cap(z64_file_t* save, override_t override); +uint16_t bombchus_to_bag(z64_file_t* save, override_t override); +uint16_t upgrade_key_model(z64_file_t* save, override_t override); #endif diff --git a/ASM/c/message.c b/ASM/c/message.c index 3cfa40331..f42316632 100644 --- a/ASM/c/message.c +++ b/ASM/c/message.c @@ -26,7 +26,7 @@ extern uint8_t PLAYER_NAMES[256][8]; extern uint8_t PLAYER_NAME_ID; // Helper function for adding characters to the decoded message buffer -void Message_AddCharacter(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedBufPos, uint32_t *pCharTexIdx, uint8_t charToAdd) { +void Message_AddCharacter(MessageContext* msgCtx, void* pFont, uint32_t* pDecodedBufPos, uint32_t* pCharTexIdx, uint8_t charToAdd) { uint32_t decodedBufPosVal = *pDecodedBufPos; uint32_t charTexIdx = *pCharTexIdx; msgCtx->msgBufDecoded[decodedBufPosVal++] = charToAdd; // Add the character to the output buffer, increment the output position @@ -41,7 +41,7 @@ void Message_AddCharacter(MessageContext *msgCtx, void *pFont, uint32_t *pDecode } // Helper function for adding integer numbers to the decoded message buffer -void Message_AddInteger(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedBufPos, uint32_t *pCharTexIdx, uint32_t numToAdd) { +void Message_AddInteger(MessageContext* msgCtx, void* pFont, uint32_t* pDecodedBufPos, uint32_t* pCharTexIdx, uint32_t numToAdd) { uint8_t digits[10]; uint8_t i = 0; // Extract each digit. They are added, in reverse order, to digits[] @@ -59,7 +59,7 @@ void Message_AddInteger(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedB } // Helper function for adding simple strings to the decoded message buffer. Does not support additional control codes. -void Message_AddString(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedBufPos, uint32_t *pCharTexIdx, char *stringToAdd) { +void Message_AddString(MessageContext* msgCtx, void* pFont, uint32_t* pDecodedBufPos, uint32_t* pCharTexIdx, char* stringToAdd) { while (*stringToAdd != 0) { Message_AddCharacter(msgCtx, pFont, pDecodedBufPos, pCharTexIdx, *stringToAdd); stringToAdd++; @@ -67,7 +67,7 @@ void Message_AddString(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedBu } // Helper function for adding a filename to the decoded message buffer. Filenames use a different character set from other text. -void Message_AddFileName(MessageContext *msgCtx, void *pFont, uint32_t *pDecodedBufPos, uint32_t *pCharTexIdx, uint8_t *filenameToAdd) { +void Message_AddFileName(MessageContext* msgCtx, void* pFont, uint32_t* pDecodedBufPos, uint32_t* pCharTexIdx, uint8_t* filenameToAdd) { int end = 8; while (filenameToAdd[end - 1] == 0xDF) { // trim trailing space @@ -84,12 +84,12 @@ void Message_AddFileName(MessageContext *msgCtx, void *pFont, uint32_t *pDecoded // Compare currChar to the control code. // Add text to the output buffer by performing the following: // Call one of the above functions to add the text. -// Subtract 1 from *pDecodedBufPos +// Subtract 1 from* pDecodedBufPos // Return true -bool Message_Decode_Additional_Control_Codes(uint8_t currChar, uint32_t *pDecodedBufPos, uint32_t *pCharTexIdx) { - MessageContext *msgCtx = &(z64_game.msgContext); - Font *pFont = &(msgCtx->font); // Get a reference to the font. - char *msgRaw = (char *) &(pFont->msgBuf); // Get a reference to the start of the raw message. Index using msgCtx->msgBufPos. +bool Message_Decode_Additional_Control_Codes(uint8_t currChar, uint32_t* pDecodedBufPos, uint32_t* pCharTexIdx) { + MessageContext* msgCtx = &(z64_game.msgContext); + Font* pFont = &(msgCtx->font); // Get a reference to the font. + char* msgRaw = (char*) &(pFont->msgBuf); // Get a reference to the start of the raw message. Index using msgCtx->msgBufPos. switch (currChar) { case 0xF0: { diff --git a/ASM/c/misc_colors.c b/ASM/c/misc_colors.c index 9a4c5efda..54e624afc 100644 --- a/ASM/c/misc_colors.c +++ b/ASM/c/misc_colors.c @@ -13,7 +13,7 @@ extern uint8_t CFG_RAINBOW_SWORD_OUTER_ENABLED; void update_sword_trail_colors() { - colorRGBA8_t *sword_trail_colors = (colorRGBA8_t*)0x80115DCE; + colorRGBA8_t* sword_trail_colors = (colorRGBA8_t*)0x80115DCE; if (CFG_RAINBOW_SWORD_INNER_ENABLED) { @@ -41,14 +41,14 @@ extern uint8_t CFG_RAINBOW_BOOM_TRAIL_OUTER_ENABLED; void update_boomerang_trail_colors() { - z64_actor_t *boomerang = z64_link.boomerang_actor; + z64_actor_t* boomerang = z64_link.boomerang_actor; if (boomerang != NULL && boomerang->main_proc != NULL) { uint32_t effect_index = *((uint32_t*)(((uint32_t)boomerang) + 0x1C8)); if (effect_index < 31) { - z64_trail_t *trail = ((z64_trail_t*)0x80115C3C) + effect_index - 3; + z64_trail_t* trail = ((z64_trail_t*)0x80115C3C) + effect_index - 3; if (CFG_RAINBOW_BOOM_TRAIL_INNER_ENABLED) { @@ -98,7 +98,7 @@ void update_bombchu_trail_colors() colorRGB8_t rainbow_color_outer_start = get_rainbow_color(frames, BOMBCHU_CYCLE_FRAMES_OUTER); colorRGB8_t rainbow_color_outer_end = get_rainbow_color(frames + 2 * BOMBCHU_CYCLE_FRAMES_OUTER, BOMBCHU_CYCLE_FRAMES_OUTER); - z64_actor_t *explosive = z64_game.actor_list[ACTORTYPE_EXPLOSIVES].first; + z64_actor_t* explosive = z64_game.actor_list[ACTORTYPE_EXPLOSIVES].first; while (explosive != NULL) { if (explosive->main_proc != NULL && explosive->actor_id == 0xDA) // En_Bom_Chu @@ -106,8 +106,8 @@ void update_bombchu_trail_colors() uint32_t effect_index_1 = *((uint32_t*)(((uint32_t)explosive) + 0x16C)); uint32_t effect_index_2 = *((uint32_t*)(((uint32_t)explosive) + 0x170)); - z64_trail_t *trail_1 = ((z64_trail_t*)0x80115C3C) + effect_index_1 - 3; - z64_trail_t *trail_2 = ((z64_trail_t*)0x80115C3C) + effect_index_2 - 3; + z64_trail_t* trail_1 = ((z64_trail_t*)0x80115C3C) + effect_index_1 - 3; + z64_trail_t* trail_2 = ((z64_trail_t*)0x80115C3C) + effect_index_2 - 3; if (CFG_RAINBOW_BOMBCHU_TRAIL_INNER_ENABLED) { @@ -219,7 +219,7 @@ void update_navi_colors() colorRGB8_t color_inner = get_rainbow_color(frames, NAVI_CYCLE_FRAMES_INNER); colorRGB8_t color_outer = get_rainbow_color(frames, NAVI_CYCLE_FRAMES_OUTER); - navi_color_t *navi_ref_colors = (navi_color_t*)0x800E8214; + navi_color_t* navi_ref_colors = (navi_color_t*)0x800E8214; if (rainbow_inner_enabled) navi_ref_colors[z64_game.target_actor_type].inner.color = color_inner; if (rainbow_outer_enabled) @@ -231,10 +231,10 @@ void update_navi_colors() z64_game.target_arr[i].color = color_inner; } - z64_actor_t *navi = z64_link.navi_actor; + z64_actor_t* navi = z64_link.navi_actor; if (navi != NULL && navi->main_proc != NULL) { - colorRGBAf_t *navi_colors = (colorRGBAf_t*)(((uint32_t)navi) + 0x234); + colorRGBAf_t* navi_colors = (colorRGBAf_t*)(((uint32_t)navi) + 0x234); if (rainbow_inner_enabled) { navi_colors[0].r = color_inner.r; diff --git a/ASM/c/model_text.c b/ASM/c/model_text.c index c79d68c65..877330f0a 100644 --- a/ASM/c/model_text.c +++ b/ASM/c/model_text.c @@ -11,7 +11,7 @@ bool missing_dlist = false; const int text_width = 5; const int text_height = 10; -void draw_illegal_model_text(z64_disp_buf_t *db) { +void draw_illegal_model_text(z64_disp_buf_t* db) { // Only draw when paused if (!(illegal_model && z64_game.pause_ctxt.state == 6)) { @@ -20,7 +20,7 @@ void draw_illegal_model_text(z64_disp_buf_t *db) { int str_len = 41; if (missing_dlist) { - str_len = 45; + str_len = 45; } // Setup draw location @@ -31,10 +31,9 @@ void draw_illegal_model_text(z64_disp_buf_t *db) { // Create collected/required string char text[str_len + 1]; if (missing_dlist) { - strncpy(text, "Racing advisory: model skeleton missing dlist\0", str_len + 1); - } - else { - strncpy(text, "Racing advisory: irregular model skeleton\0", str_len + 1); + strncpy(text, "Racing advisory: model skeleton missing dlist\0", str_len + 1); + } else { + strncpy(text, "Racing advisory: irregular model skeleton\0", str_len + 1); } // Call setup display list @@ -49,100 +48,98 @@ void draw_illegal_model_text(z64_disp_buf_t *db) { } typedef struct Limb { - int x; - int y; - int z; + int x; + int y; + int z; } Limb; Limb adultSkeleton[] = { - {0xFFC7, 0x0D31, 0x0000}, // Limb 0 - {0x0000, 0x0000, 0x0000}, // Limb 1 - {0x03B1, 0x0000, 0x0000}, // Limb 2 - {0xFE71, 0x0045, 0xFF07}, // Limb 3 - {0x051A, 0x0000, 0x0000}, // Limb 4 - {0x04E8, 0x0005, 0x000B}, // Limb 5 - {0xFE74, 0x004C, 0x0108}, // Limb 6 - {0x0518, 0x0000, 0x0000}, // Limb 7 - {0x04E9, 0x0006, 0x0003}, // Limb 8 - {0x0000, 0x0015, 0xFFF9}, // Limb 9 - {0x0570, 0xFEFD, 0x0000}, // Limb 10 - {0xFED6, 0xFD44, 0x0000}, // Limb 11 - {0x0000, 0x0000, 0x0000}, // Limb 12 - {0x040F, 0xFF54, 0x02A8}, // Limb 13 - {0x0397, 0x0000, 0x0000}, // Limb 14 - {0x02F2, 0x0000, 0x0000}, // Limb 15 - {0x040F, 0xFF53, 0xFD58}, // Limb 16 - {0x0397, 0x0000, 0x0000}, // Limb 17 - {0x02F2, 0x0000, 0x0000}, // Limb 18 - {0x03D2, 0xFD4C, 0x0156}, // Limb 19 - {0x0000, 0x0000, 0x0000}, // Limb 20 + {0xFFC7, 0x0D31, 0x0000}, // Limb 0 + {0x0000, 0x0000, 0x0000}, // Limb 1 + {0x03B1, 0x0000, 0x0000}, // Limb 2 + {0xFE71, 0x0045, 0xFF07}, // Limb 3 + {0x051A, 0x0000, 0x0000}, // Limb 4 + {0x04E8, 0x0005, 0x000B}, // Limb 5 + {0xFE74, 0x004C, 0x0108}, // Limb 6 + {0x0518, 0x0000, 0x0000}, // Limb 7 + {0x04E9, 0x0006, 0x0003}, // Limb 8 + {0x0000, 0x0015, 0xFFF9}, // Limb 9 + {0x0570, 0xFEFD, 0x0000}, // Limb 10 + {0xFED6, 0xFD44, 0x0000}, // Limb 11 + {0x0000, 0x0000, 0x0000}, // Limb 12 + {0x040F, 0xFF54, 0x02A8}, // Limb 13 + {0x0397, 0x0000, 0x0000}, // Limb 14 + {0x02F2, 0x0000, 0x0000}, // Limb 15 + {0x040F, 0xFF53, 0xFD58}, // Limb 16 + {0x0397, 0x0000, 0x0000}, // Limb 17 + {0x02F2, 0x0000, 0x0000}, // Limb 18 + {0x03D2, 0xFD4C, 0x0156}, // Limb 19 + {0x0000, 0x0000, 0x0000}, // Limb 20 }; Limb childSkeleton[] = { - {0x0000, 0x0948, 0x0000}, // Limb 0 - {0xFFFC, 0xFF98, 0x0000}, // Limb 1 - {0x025F, 0x0000, 0x0000}, // Limb 2 - {0xFF54, 0x0032, 0xFF42}, // Limb 3 - {0x02B9, 0x0000, 0x0000}, // Limb 4 - {0x0339, 0x0005, 0x000B}, // Limb 5 - {0xFF56, 0x0039, 0x00C0}, // Limb 6 - {0x02B7, 0x0000, 0x0000}, // Limb 7 - {0x0331, 0x0008, 0x0004}, // Limb 8 - {0x0000, 0xFF99, 0xFFF9}, // Limb 9 - {0x03E4, 0xFF37, 0xFFFF}, // Limb 10 - {0xFE93, 0xFD62, 0x0000}, // Limb 11 - {0x0000, 0x0000, 0x0000}, // Limb 12 - {0x02B8, 0xFF51, 0x01D2}, // Limb 13 - {0x0245, 0x0000, 0x0000}, // Limb 14 - {0x0202, 0x0000, 0x0000}, // Limb 15 - {0x02B8, 0xFF51, 0xFE2E}, // Limb 16 - {0x0241, 0x0000, 0x0000}, // Limb 17 - {0x020D, 0x0000, 0x0000}, // Limb 18 - {0x0291, 0xFDF5, 0x016F}, // Limb 19 - {0x0000, 0x0000, 0x0000}, // Limb 20 + {0x0000, 0x0948, 0x0000}, // Limb 0 + {0xFFFC, 0xFF98, 0x0000}, // Limb 1 + {0x025F, 0x0000, 0x0000}, // Limb 2 + {0xFF54, 0x0032, 0xFF42}, // Limb 3 + {0x02B9, 0x0000, 0x0000}, // Limb 4 + {0x0339, 0x0005, 0x000B}, // Limb 5 + {0xFF56, 0x0039, 0x00C0}, // Limb 6 + {0x02B7, 0x0000, 0x0000}, // Limb 7 + {0x0331, 0x0008, 0x0004}, // Limb 8 + {0x0000, 0xFF99, 0xFFF9}, // Limb 9 + {0x03E4, 0xFF37, 0xFFFF}, // Limb 10 + {0xFE93, 0xFD62, 0x0000}, // Limb 11 + {0x0000, 0x0000, 0x0000}, // Limb 12 + {0x02B8, 0xFF51, 0x01D2}, // Limb 13 + {0x0245, 0x0000, 0x0000}, // Limb 14 + {0x0202, 0x0000, 0x0000}, // Limb 15 + {0x02B8, 0xFF51, 0xFE2E}, // Limb 16 + {0x0241, 0x0000, 0x0000}, // Limb 17 + {0x020D, 0x0000, 0x0000}, // Limb 18 + {0x0291, 0xFDF5, 0x016F}, // Limb 19 + {0x0000, 0x0000, 0x0000}, // Limb 20 }; // Gets the model data z64_mem_obj_t FindModelData() { - for (int i = 0; i < 19; i++) { - z64_mem_obj_t obj = z64_game.obj_ctxt.objects[i]; - // 0x14 = obj_link_boy, 0x15 = obj_link_child - if (obj.id == 0x14) { - return obj; - } - else if (obj.id == 0x15) { - return obj; + for (int i = 0; i < 19; i++) { + z64_mem_obj_t obj = z64_game.obj_ctxt.objects[i]; + // 0x14 = obj_link_boy, 0x15 = obj_link_child + if (obj.id == 0x14) { + return obj; + } else if (obj.id == 0x15) { + return obj; + } } - } - return z64_game.obj_ctxt.objects[0]; //Will be checked and rejected in calling function + return z64_game.obj_ctxt.objects[0]; //Will be checked and rejected in calling function } //Search the model for the playas footer to find its stopping point //This tells us where to stop searching for the hierarchy pointer int FindSize(z64_mem_obj_t model, int maxsize) { - char* data = (char*)model.data; - const char* searchString = "!PlayAsManifest0"; - const int searchLen = 16; - int searchIndex = 0; + char* data = (char*)model.data; + const char* searchString = "!PlayAsManifest0"; + const int searchLen = 16; + int searchIndex = 0; - for (int i = 0; i < maxsize; i++) { - // Byte matches next byte in string - if (data[i] == searchString[searchIndex]) { - searchIndex += 1; + for (int i = 0; i < maxsize; i++) { + // Byte matches next byte in string + if (data[i] == searchString[searchIndex]) { + searchIndex += 1; - // All bytes have been found, so a match - if (searchIndex == searchLen) { - return i; //Return the address of the footer within the model data - } - } - // Match has been broken, reset to start of string - else { - searchIndex = 0; + // All bytes have been found, so a match + if (searchIndex == searchLen) { + return i; //Return the address of the footer within the model data + } + } else { + // Match has been broken, reset to start of string + searchIndex = 0; + } } - } - //If the footer was not found, then return max size (should only happen with a vanilla model) - return maxsize; + // If the footer was not found, then return max size (should only happen with a vanilla model) + return maxsize; } // Finds the address of the model's hierarchy so we can write the hierarchy pointer @@ -150,120 +147,116 @@ int FindSize(z64_mem_obj_t model, int maxsize) { // https://github.com/hylian-modding/Z64Online/blob/master/src/Z64Online/common/cosmetics/UniversalAliasTable.ts // function findHierarchy() int FindHierarchy(z64_mem_obj_t model, int size) { - // Scan until we find a segmented pointer which is 0x0C or 0x10 more than - // the preceeding data and loop until something that's not a segmented pointer is found - // then return the position of the last segemented pointer. - char* data = (char*)model.data; - for (int i = 0; i < size; i += 4) { - if (data[i] == 0x06) { - int possible = *(int*)(data + i) & 0x00FFFFFF; + // Scan until we find a segmented pointer which is 0x0C or 0x10 more than + // the preceeding data and loop until something that's not a segmented pointer is found + // then return the position of the last segemented pointer. + char* data = (char*)model.data; + for (int i = 0; i < size; i += 4) { + if (data[i] == 0x06) { + int possible = *(int*)(data + i) & 0x00FFFFFF; - if (possible < size) { - int possible2 = *(int*)(data + i - 4) & 0x00FFFFFF; - int diff = possible - possible2; - if ((diff == 0x0C) || (diff == 0x10)) { - int pos = i + 4; - int count = 1; - while (data[pos] == 0x06) { - pos += 4; - count += 1; - } - uint8_t a = data[pos]; - if (a != count) { - continue; - } + if (possible < size) { + int possible2 = *(int*)(data + i - 4) & 0x00FFFFFF; + int diff = possible - possible2; + if (diff == 0x0C || diff == 0x10) { + int pos = i + 4; + int count = 1; + while (data[pos] == 0x06) { + pos += 4; + count += 1; + } + uint8_t a = data[pos]; + if (a != count) { + continue; + } - return pos - 4; + return pos - 4; + } + } } - } } - } - return -1; + return -1; } bool check_skeleton(z64_mem_obj_t model, int hierarchy, Limb* skeleton) { - char* data = (char*)model.data; - // Get what the hierarchy pointer points to (pointer to limb 0) - int limbPointer = *(int*)(data + hierarchy) & 0x00FFFFFF; - // 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 - int limbX = *(uint16_t*)(data + offset); - int limbY = *(uint16_t*)(data + offset + 2); - int limbZ = *(uint16_t*)(data + offset + 4); - int skeletonX = skeleton[i].x; - int skeletonY = skeleton[i].y; - int skeletonZ = skeleton[i].z; - // Check if the X, Y, and Z components all match - if (limbX != skeletonX || limbY != skeletonY || limbZ != skeletonZ) { - return false; - } - int dlistPointer = *(uint8_t*)(data + offset + 8); - // If this model should have a dlist, check that it does - if (i != 2 && i != 9 && dlistPointer != 0x06) { - //Set this variable so a special message will be displayed if the xyz coords are correct but a dlist is missing - missing_dlist = true; - return false; + char* data = (char*)model.data; + // Get what the hierarchy pointer points to (pointer to limb 0) + int limbPointer = *(int*)(data + hierarchy) & 0x00FFFFFF; + // 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 + int limbX = *(uint16_t*)(data + offset); + int limbY = *(uint16_t*)(data + offset + 2); + int limbZ = *(uint16_t*)(data + offset + 4); + int skeletonX = skeleton[i].x; + int skeletonY = skeleton[i].y; + int skeletonZ = skeleton[i].z; + // Check if the X, Y, and Z components all match + if (limbX != skeletonX || limbY != skeletonY || limbZ != skeletonZ) { + return false; + } + int dlistPointer = *(uint8_t*)(data + offset + 8); + // If this model should have a dlist, check that it does + if (i != 2 && i != 9 && dlistPointer != 0x06) { + // Set this variable so a special message will be displayed if the xyz coords are correct but a dlist is missing + missing_dlist = true; + return false; + } } - } - return true; + return true; } void check_model_skeletons() { - //If it's already been marked illegal, no need to run code again - //Or, if both models have been found to be safe, no need to check either - if (illegal_model || (adult_safe && child_safe)) { - return; - } + // If it's already been marked illegal, no need to run code again + // Or, if both models have been found to be safe, no need to check either + if (illegal_model || (adult_safe && child_safe)) { + return; + } - // Get the model's data - z64_mem_obj_t model = FindModelData(); + // Get the model's data + z64_mem_obj_t model = FindModelData(); - //Decide which skeleton to use - Limb* skeleton; - if (model.id == 0x14) { - skeleton = adultSkeleton; - //If we already know adult is safe, no need to continue - if (adult_safe) { - return; - } - } - else if (model.id == 0x15) { - skeleton = childSkeleton; - //If we already know child is safe, no need to continue - if (child_safe) { - return; + // Decide which skeleton to use + Limb* skeleton; + if (model.id == 0x14) { + skeleton = adultSkeleton; + // If we already know adult is safe, no need to continue + if (adult_safe) { + return; + } + } else if (model.id == 0x15) { + skeleton = childSkeleton; + // If we already know child is safe, no need to continue + if (child_safe) { + return; + } + } else { // Safety if model file isn't found for some reason + return; } - } - else { //Safety if model file isn't found for some reason - return; - } - //Get the maximum possible size of the object file by checking the object table - z64_object_table_t obj_file = z64_object_table[model.id]; - int maxsize = obj_file.vrom_end - obj_file.vrom_start; + // Get the maximum possible size of the object file by checking the object table + z64_object_table_t obj_file = z64_object_table[model.id]; + int maxsize = obj_file.vrom_end - obj_file.vrom_start; - //Get the actual length of the model data by checking for the footer (or lack thereof) - int size = FindSize(model, maxsize); + // Get the actual length of the model data by checking for the footer (or lack thereof) + int size = FindSize(model, maxsize); - // Get the hierarchy pointer - int hierarchy = FindHierarchy(model, size); - if (hierarchy == -1) { //Safety if hierarchy is not found - return; - } + // Get the hierarchy pointer + int hierarchy = FindHierarchy(model, size); + if (hierarchy == -1) { // Safety if hierarchy is not found + return; + } - //Check if the skeleton matches vanilla - if (!check_skeleton(model, hierarchy, skeleton)) { - illegal_model = 1; - } - else if (model.id == 0x14) { - adult_safe = true; - } - else if (model.id == 0x15) { - child_safe = true; - } + // Check if the skeleton matches vanilla + if (!check_skeleton(model, hierarchy, skeleton)) { + illegal_model = 1; + } else if (model.id == 0x14) { + adult_safe = true; + } else if (model.id == 0x15) { + child_safe = true; + } } diff --git a/ASM/c/models.c b/ASM/c/models.c index 4b0e70b00..728481d52 100644 --- a/ASM/c/models.c +++ b/ASM/c/models.c @@ -18,21 +18,21 @@ typedef struct { typedef struct { uint16_t object_id; - uint8_t *buf; + uint8_t* buf; } loaded_object_t; -extern uint32_t SHUFFLE_CHEST_GAME; +extern uint8_t SHUFFLE_CHEST_GAME; extern uint32_t EXTENDED_OBJECT_TABLE; -extern EnItem00 *collectible_mutex; +extern EnItem00* collectible_mutex; loaded_object_t object_slots[slot_count] = { 0 }; -void load_object_file(uint32_t object_id, uint8_t *buf) { - z64_object_table_t *entry; +void load_object_file(uint32_t object_id, uint8_t* buf) { + z64_object_table_t* entry; if (object_id <= num_vanilla_objects) { entry = &(z64_object_table[object_id]); } else { - z64_object_table_t *extended_table = (z64_object_table_t *) (&EXTENDED_OBJECT_TABLE); + z64_object_table_t* extended_table = (z64_object_table_t*) (&EXTENDED_OBJECT_TABLE); entry = &extended_table[object_id - num_vanilla_objects - 1]; } uint32_t vrom_start = entry->vrom_start; @@ -40,14 +40,14 @@ void load_object_file(uint32_t object_id, uint8_t *buf) { read_file(buf, vrom_start, size); } -void load_object(loaded_object_t *object, uint32_t object_id) { +void load_object(loaded_object_t* object, uint32_t object_id) { object->object_id = object_id; load_object_file(object_id, object->buf); } -loaded_object_t *get_object(uint32_t object_id) { +loaded_object_t* get_object(uint32_t object_id) { for (int i = 0; i < slot_count; i++) { - loaded_object_t *object = &(object_slots[i]); + loaded_object_t* object = &(object_slots[i]); if (object->object_id == object_id) { return object; } @@ -60,16 +60,16 @@ loaded_object_t *get_object(uint32_t object_id) { return NULL; } -void set_object_segment(loaded_object_t *object) { - z64_disp_buf_t *xlu = &(z64_ctxt.gfx->poly_xlu); +void set_object_segment(loaded_object_t* object) { + z64_disp_buf_t* xlu = &(z64_ctxt.gfx->poly_xlu); gSPSegment(xlu->p++, 6, (uint32_t)(object->buf)); - z64_disp_buf_t *opa = &(z64_ctxt.gfx->poly_opa); + z64_disp_buf_t* opa = &(z64_ctxt.gfx->poly_opa); gSPSegment(opa->p++, 6, (uint32_t)(object->buf)); } void scale_top_matrix(float scale_factor) { - float *matrix = z64_GetMatrixStackTop(); + float* matrix = z64_GetMatrixStackTop(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { matrix[4*i + j] *= scale_factor; @@ -77,19 +77,19 @@ void scale_top_matrix(float scale_factor) { } } -typedef void (*pre_draw_fn)(z64_actor_t *actor, z64_game_t *game, uint32_t unknown); -typedef void (*actor_draw_fn)(z64_actor_t *actor, z64_game_t *game); +typedef void (*pre_draw_fn)(z64_actor_t* actor, z64_game_t* game, uint32_t unknown); +typedef void (*actor_draw_fn)(z64_actor_t* actor, z64_game_t* game); #define pre_draw_1 ((pre_draw_fn)0x80022438) #define pre_draw_2 ((pre_draw_fn)0x80022554) #define base_collectable_draw ((actor_draw_fn)0x80013268) -void draw_model_low_level(uint8_t graphic_id_minus_1, z64_actor_t *actor, z64_game_t *game) { +void draw_model_low_level(uint8_t graphic_id_minus_1, z64_actor_t* actor, z64_game_t* game) { pre_draw_1(actor, game, 0); pre_draw_2(actor, game, 0); base_draw_gi_model(game, graphic_id_minus_1); } -float scale_factor(uint8_t graphic_id, z64_actor_t *actor, float base_scale) { +float scale_factor(uint8_t graphic_id, z64_actor_t* actor, float base_scale) { if (graphic_id == 0x63) { // Draw skull tokens at their vanilla size return base_scale * 0.5; @@ -101,8 +101,8 @@ float scale_factor(uint8_t graphic_id, z64_actor_t *actor, float base_scale) { return base_scale; } -void draw_model(model_t model, z64_actor_t *actor, z64_game_t *game, float base_scale) { - loaded_object_t *object = get_object(model.object_id); +void draw_model(model_t model, z64_actor_t* actor, z64_game_t* game, float base_scale) { + loaded_object_t* object = get_object(model.object_id); if (object != NULL) { set_object_segment(object); if (base_scale != 0.0) { @@ -125,27 +125,27 @@ void models_reset() { } } -void lookup_model_by_override(model_t *model, override_t override) { +void lookup_model_by_override(model_t* model, override_t override) { if (override.key.all != 0) { override_t model_override = override; model_override.value.base.item_id = override.value.looks_like_item_id ? override.value.looks_like_item_id : override.value.base.item_id; uint16_t resolved_item_id = resolve_upgrades(model_override); - item_row_t *item_row = get_item_row(resolved_item_id); + item_row_t* item_row = get_item_row(resolved_item_id); model->object_id = item_row->object_id; model->graphic_id = item_row->graphic_id; } } -void lookup_model(model_t *model, z64_actor_t *actor, z64_game_t *game, uint16_t base_item_id) { +void lookup_model(model_t* model, z64_actor_t* actor, z64_game_t* game, uint16_t base_item_id) { override_t override = lookup_override(actor, game->scene_index, base_item_id); lookup_model_by_override(model, override); } // Shop draw function for each shelf slot, replaces GetItem_Draw inside of EnGirlA_Draw -void shop_draw(z64_actor_t *actor, z64_game_t *game) { - EnGirlA *this = (EnGirlA *)actor; +void shop_draw(z64_actor_t* actor, z64_game_t* game) { + EnGirlA* this = (EnGirlA*)actor; model_t model = { .object_id = 0x0000, .graphic_id = 0x00, @@ -173,8 +173,8 @@ void shop_draw(z64_actor_t *actor, z64_game_t *game) { } // Collectible draw function for rupees/recovery hearts -bool collectible_draw(z64_actor_t *actor, z64_game_t *game) { - EnItem00 *this = (EnItem00 *)actor; +bool collectible_draw(z64_actor_t* actor, z64_game_t* game) { + EnItem00* this = (EnItem00*)actor; model_t model = { .object_id = 0x0000, .graphic_id = 0x00, @@ -193,7 +193,7 @@ bool collectible_draw(z64_actor_t *actor, z64_game_t *game) { } -void heart_piece_draw(z64_actor_t *actor, z64_game_t *game) { +void heart_piece_draw(z64_actor_t* actor, z64_game_t* game) { model_t model = { .object_id = 0x00BD, .graphic_id = 0x14, @@ -203,8 +203,8 @@ 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; +void collectible_draw_other(z64_actor_t* actor, z64_game_t* game) { + EnItem00* this = (EnItem00*)actor; model_t model = { .object_id = 0x0000, @@ -233,7 +233,7 @@ void collectible_draw_other(z64_actor_t *actor, z64_game_t *game) { } } -void heart_container_draw(z64_actor_t *actor, z64_game_t *game) { +void heart_container_draw(z64_actor_t* actor, z64_game_t* game) { model_t model = { .object_id = 0x00BD, .graphic_id = 0x13, @@ -242,7 +242,7 @@ void heart_container_draw(z64_actor_t *actor, z64_game_t *game) { draw_model(model, actor, game, 1.25); } -void skull_token_draw(z64_actor_t *actor, z64_game_t *game) { +void skull_token_draw(z64_actor_t* actor, z64_game_t* game) { model_t model = { .object_id = 0x015C, .graphic_id = 0x63, @@ -251,7 +251,7 @@ void skull_token_draw(z64_actor_t *actor, z64_game_t *game) { draw_model(model, actor, game, 2.0); } -void ocarina_of_time_draw(z64_actor_t *actor, z64_game_t *game) { +void ocarina_of_time_draw(z64_actor_t* actor, z64_game_t* game) { model_t model = { .object_id = 0x00DE, .graphic_id = 0x2F, @@ -260,7 +260,7 @@ void ocarina_of_time_draw(z64_actor_t *actor, z64_game_t *game) { draw_model(model, actor, game, 2.5); } -void item_etcetera_draw(z64_actor_t *actor, z64_game_t *game) { +void item_etcetera_draw(z64_actor_t* actor, z64_game_t* game) { override_t override = { 0 }; if (actor->variable == 0x01) { // Ruto's Letter @@ -363,12 +363,12 @@ void item_etcetera_draw(z64_actor_t *actor, z64_game_t *game) { if (model.object_id != 0) { draw_model(model, actor, game, 1.0); } else { - uint8_t default_graphic_id = *(((uint8_t *)actor) + 0x141); + uint8_t default_graphic_id = *(((uint8_t*)actor) + 0x141); draw_model_low_level(default_graphic_id, actor, game); } } -void bowling_bomb_bag_draw(z64_actor_t *actor, z64_game_t *game) { +void bowling_bomb_bag_draw(z64_actor_t* actor, z64_game_t* game) { override_t override = { 0 }; switch (actor->variable) { case 0x00: @@ -398,12 +398,12 @@ void bowling_bomb_bag_draw(z64_actor_t *actor, z64_game_t *game) { if (model.object_id != 0) { draw_model(model, actor, game, 1.0); } else { - uint8_t default_graphic_id = *(((uint8_t *)actor) + 0x147); + uint8_t default_graphic_id = *(((uint8_t*)actor) + 0x147); draw_model_low_level(default_graphic_id, actor, game); } } -void bowling_heart_piece_draw(z64_actor_t *actor, z64_game_t *game) { +void bowling_heart_piece_draw(z64_actor_t* actor, z64_game_t* game) { model_t model = { .object_id = 0x00BD, .graphic_id = 0x14, diff --git a/ASM/c/music.c b/ASM/c/music.c index 969da8f02..8d601e070 100644 --- a/ASM/c/music.c +++ b/ASM/c/music.c @@ -6,8 +6,8 @@ extern uint8_t CFG_SLOWDOWN_MUSIC_WHEN_LOWHP; static uint16_t previousSeqIndexChange = 0; static uint8_t isSlowedDown = 0; static uint8_t isSpeedup = 0; -void manage_music_changes() { +void manage_music_changes() { if (CFG_SPEEDUP_MUSIC_FOR_LAST_TRIFORCE_PIECE && !isSlowedDown) { if (z64_file.scene_flags[0x48].unk_00_ == TRIFORCE_PIECES_REQUIRED - 1 && z64_Audio_GetActiveSeqId(0) != previousSeqIndexChange) { @@ -26,8 +26,7 @@ void manage_music_changes() { isSlowedDown = 1; isSpeedup = 0; } - } - else if (isSlowedDown) { + } else if (isSlowedDown) { z64_ScalePitchAndTempo(1.0f, 0); isSlowedDown = 0; previousSeqIndexChange = 0; @@ -48,7 +47,7 @@ _Bool Health_IsCritical(void) { criticalHealth = 0x2C; } - if ((criticalHealth >= z64_file.energy) && (z64_file.energy > 0)) { + if (criticalHealth >= z64_file.energy && z64_file.energy > 0) { return true; } else { return false; diff --git a/ASM/c/obj_comb.c b/ASM/c/obj_comb.c index b3d38dae8..a6108d780 100644 --- a/ASM/c/obj_comb.c +++ b/ASM/c/obj_comb.c @@ -4,12 +4,12 @@ #include "textures.h" #include "obj_comb.h" -#define GAMEPLAY_FIELD_KEEP_BEEHIVE_TEXTURE (uint8_t *)0x05008900 +#define GAMEPLAY_FIELD_KEEP_BEEHIVE_TEXTURE (uint8_t*)0x05008900 extern uint16_t drop_collectible_override_flag; // Hack beehives to drop a collectible w / an extended flag, based on the grotto param -void obj_comb_drop_collectible(z64_actor_t *actor, int16_t params) { +void obj_comb_drop_collectible(z64_actor_t* actor, int16_t params) { // Check if we're in a grotto uint16_t flag = actor->rot_init.z; if (z64_game.scene_index == 0x3E) { @@ -34,7 +34,7 @@ void obj_comb_drop_collectible(z64_actor_t *actor, int16_t params) { } } -override_t get_beehive_override(z64_actor_t *actor, z64_game_t *game) { +override_t get_beehive_override(z64_actor_t* actor, z64_game_t* game) { uint16_t flag = actor->rot_init.z; if (z64_game.scene_index == 0x3E) { // We're in a grotto so offset by 2x grotto id. The Rz flags for the grottos need to be set to 0/1 beforehand. @@ -58,8 +58,8 @@ override_t get_beehive_override(z64_actor_t *actor, z64_game_t *game) { return (override_t) { 0 }; } -void ObjComb_Update(z64_actor_t *thisx, z64_game_t *game) { - ObjComb *this = (ObjComb *)thisx; +void ObjComb_Update(z64_actor_t* thisx, z64_game_t* game) { + ObjComb* this = (ObjComb*)thisx; if (this->actor.dropFlag > 0) { this->actor.dropFlag --; } @@ -77,14 +77,14 @@ void ObjComb_Update(z64_actor_t *thisx, z64_game_t *game) { /* // Left here if we ever want to do beehive textures. -void ObjComb_Draw_Hack(z64_actor_t *this, z64_game_t *game) { - uint8_t *texture = GAMEPLAY_FIELD_KEEP_BEEHIVE_TEXTURE; +void ObjComb_Draw_Hack(z64_actor_t* this, z64_game_t* game) { + uint8_t* texture = GAMEPLAY_FIELD_KEEP_BEEHIVE_TEXTURE; override_t override = get_beehive_override(this, game); if(override.key.all != 0) { uint16_t item_id = resolve_upgrades(override); - item_row_t *row = get_item_row(override.value.looks_like_item_id); + item_row_t* row = get_item_row(override.value.looks_like_item_id); if (row == NULL) { row = get_item_row(override.value.item_id); } @@ -106,7 +106,7 @@ void ObjComb_Draw_Hack(z64_actor_t *this, z64_game_t *game) { } } - z64_gfx_t *gfx = game->common.gfx; + z64_gfx_t* gfx = game->common.gfx; gfx->poly_opa.d -= 2; gDPSetTextureImage(gfx->poly_opa.d, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture); gSPEndDisplayList(gfx->poly_opa.d + 1); diff --git a/ASM/c/obj_comb.h b/ASM/c/obj_comb.h index 48409db29..c0f5bb202 100644 --- a/ASM/c/obj_comb.h +++ b/ASM/c/obj_comb.h @@ -5,7 +5,7 @@ struct ObjComb; -typedef void (*ObjCombActionFunc)(struct ObjComb *, z64_game_t *); +typedef void (*ObjCombActionFunc)(struct ObjComb*, z64_game_t*); typedef struct ObjComb { /* 0x0000 */ z64_actor_t actor; @@ -16,6 +16,6 @@ typedef struct ObjComb { /* 0x01A4 */ uint8_t chest_type; } ObjComb; // size = 0x01A4 -override_t get_beehive_override(z64_actor_t *actor, z64_game_t *game); +override_t get_beehive_override(z64_actor_t* actor, z64_game_t* game); #endif diff --git a/ASM/c/obj_kibako.c b/ASM/c/obj_kibako.c index 988c6f6d7..483374e9d 100644 --- a/ASM/c/obj_kibako.c +++ b/ASM/c/obj_kibako.c @@ -5,12 +5,12 @@ #include "z64.h" #include "obj_kibako.h" -#define SMALLCRATE_DLIST (z64_gfx_t *)0x05005290 -#define SMALLCRATE_TEXTURE (uint8_t *)0x05011CA0 +#define SMALLCRATE_DLIST (z64_gfx_t*)0x05005290 +#define SMALLCRATE_TEXTURE (uint8_t*)0x05011CA0 extern uint8_t POTCRATE_TEXTURES_MATCH_CONTENTS; extern uint16_t drop_collectible_override_flag; -override_t get_smallcrate_override(z64_actor_t *actor, z64_game_t *game) { +override_t get_smallcrate_override(z64_actor_t* actor, z64_game_t* game) { // make a dummy EnItem00 with enough info to get the override EnItem00 dummy; dummy.actor.actor_id = 0x15; @@ -27,8 +27,8 @@ override_t get_smallcrate_override(z64_actor_t *actor, z64_game_t *game) { return (override_t) { 0 }; } -void ObjKibako_Draw(z64_actor_t *actor, z64_game_t *game) { - uint8_t *texture = SMALLCRATE_TEXTURE; // get original texture +void ObjKibako_Draw(z64_actor_t* actor, z64_game_t* game) { + uint8_t* texture = SMALLCRATE_TEXTURE; // get original texture ObjKibako* this = (ObjKibako*)actor; @@ -60,7 +60,7 @@ void ObjKibako_Draw(z64_actor_t *actor, z64_game_t *game) { } // push custom dlists (that set the palette and textures) to segment 09 - z64_gfx_t *gfx = game->common.gfx; + z64_gfx_t* gfx = game->common.gfx; gfx->poly_opa.d -= 2; gDPSetTextureImage(gfx->poly_opa.d, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture); gSPEndDisplayList(gfx->poly_opa.d + 1); @@ -77,7 +77,7 @@ void ObjKibako_SpawnCollectible_Hack(z64_actor_t* this, z64_game_t* globalCtx) { collectible = this->variable & 0x1F; if ((collectible >= 0) && (collectible <= 0x19)) { drop_collectible_override_flag = this->rot_init.z; - EnItem00 *spawned = z64_Item_DropCollectible(globalCtx, &this->pos_world, + EnItem00* spawned = z64_Item_DropCollectible(globalCtx, &this->pos_world, collectible | (((this->variable >> 8) & 0x3F) << 8)); drop_collectible_override_flag = 0; } diff --git a/ASM/c/obj_kibako.h b/ASM/c/obj_kibako.h index 65e4253ce..57626ba8d 100644 --- a/ASM/c/obj_kibako.h +++ b/ASM/c/obj_kibako.h @@ -5,11 +5,11 @@ typedef struct ObjKibako { /* 0x0000 */ z64_actor_t actor; - /* 0x013C */ void *actionFunc; + /* 0x013C */ void* actionFunc; /* 0x0140 */ uint8_t collider[0x4C]; /* 0x018C */ uint8_t chest_type; } ObjKibako; // size = 0x019C -override_t get_smallcrate_override(z64_actor_t *actor, z64_game_t *game); +override_t get_smallcrate_override(z64_actor_t* actor, z64_game_t* game); #endif diff --git a/ASM/c/obj_kibako2.c b/ASM/c/obj_kibako2.c index 921202e07..cd2a14814 100644 --- a/ASM/c/obj_kibako2.c +++ b/ASM/c/obj_kibako2.c @@ -1,6 +1,6 @@ #include "obj_kibako2.h" #include "textures.h" -#define CRATE_DLIST (z64_gfx_t *)0x06000960 +#define CRATE_DLIST (z64_gfx_t*)0x06000960 #define CRATE_CI8_TEXTURE_PALETTE_OFFSET 0x00 #define CRATE_CI8_TEXTURE_TOP_OFFSET 0x200 @@ -11,7 +11,7 @@ extern uint8_t POTCRATE_TEXTURES_MATCH_CONTENTS; extern uint16_t drop_collectible_override_flag; // Hacks the regular crate spawn collectible function to spawn overridden collectibles -void ObjKibako2_SpawnCollectible_Hack(ObjKibako2 *this, z64_game_t *globalCtx) { +void ObjKibako2_SpawnCollectible_Hack(ObjKibako2* this, z64_game_t* globalCtx) { int16_t itemDropped; int16_t collectibleFlagTemp; @@ -24,7 +24,7 @@ void ObjKibako2_SpawnCollectible_Hack(ObjKibako2 *this, z64_game_t *globalCtx) { } } -override_t get_crate_override(z64_actor_t *actor, z64_game_t *game) { +override_t get_crate_override(z64_actor_t* actor, z64_game_t* game) { // make a dummy EnItem00 with enough info to get the override EnItem00 dummy; dummy.actor.actor_id = 0x15; @@ -41,12 +41,12 @@ override_t get_crate_override(z64_actor_t *actor, z64_game_t *game) { return (override_t) { 0 }; } -void ObjKibako2_Draw(z64_actor_t *actor, z64_game_t *game) { +void ObjKibako2_Draw(z64_actor_t* actor, z64_game_t* game) { uint8_t* texture = get_texture(TEXTURE_ID_CRATE_DEFAULT); // get override palette and textures - ObjKibako2 *this = (ObjKibako2 *)actor; + ObjKibako2* this = (ObjKibako2*)actor; switch (this->chest_type) { case GILDED_CHEST: @@ -76,7 +76,7 @@ void ObjKibako2_Draw(z64_actor_t *actor, z64_game_t *game) { } // push custom dlists (that set the palette and textures) to segment 09 - z64_gfx_t *gfx = game->common.gfx; + z64_gfx_t* gfx = game->common.gfx; gfx->poly_opa.d -= 6; gDPSetTextureImage(gfx->poly_opa.d, G_IM_FMT_CI, G_IM_SIZ_16b, 1, texture + CRATE_CI8_TEXTURE_TOP_OFFSET); gSPEndDisplayList(gfx->poly_opa.d + 1); diff --git a/ASM/c/obj_kibako2.h b/ASM/c/obj_kibako2.h index 1e7cd27b7..1b6421c86 100644 --- a/ASM/c/obj_kibako2.h +++ b/ASM/c/obj_kibako2.h @@ -7,16 +7,16 @@ struct ObjKibako2; -typedef void (*ObjKibako2ActionFunc)(struct ObjKibako2 *, z64_game_t *); +typedef void (*ObjKibako2ActionFunc)(struct ObjKibako2*, z64_game_t*); typedef struct ObjKibako2 { /* 0x0000 */ DynaPolyActor dyna; /* 0x0154 */ uint8_t collider[0x4C]; - /* 0x01A0 */ void *actionFunc; + /* 0x01A0 */ void* actionFunc; /* 0x01A4 */ int16_t collectibleFlag; /* 0x01A8 */ uint8_t chest_type; } ObjKibako2; // size = 0x01B8 -override_t get_crate_override(z64_actor_t *actor, z64_game_t *game); +override_t get_crate_override(z64_actor_t* actor, z64_game_t* game); #endif diff --git a/ASM/c/objects.c b/ASM/c/objects.c index 5e0b69c2b..0aaf01a36 100644 --- a/ASM/c/objects.c +++ b/ASM/c/objects.c @@ -6,11 +6,9 @@ extern uint8_t FIX_BROKEN_DROPS; #define OBJECT_EXCHANGE_BANK_MAX 19 -int32_t object_index_or_spawn(z64_obj_ctxt_t *object_ctx, int16_t object_id) -{ +int32_t object_index_or_spawn(z64_obj_ctxt_t* object_ctx, int16_t object_id) { int32_t index = z64_ObjectIndex(object_ctx, object_id); - if (index == -1 && object_ctx->n_objects < OBJECT_EXCHANGE_BANK_MAX) - { + if (index == -1 && object_ctx->n_objects < OBJECT_EXCHANGE_BANK_MAX) { // Track the number of spawned objects so the Object List // SceneCmd can clear out all subsequent objects and kill the // corresponding actors on room transition @@ -23,15 +21,12 @@ int32_t object_index_or_spawn(z64_obj_ctxt_t *object_ctx, int16_t object_id) } // Fix autocollect magic jar wonder items -void enitem00_set_link_incoming_item_id(z64_actor_t *actor, z64_game_t *game, int32_t incoming_item_id) -{ - EnItem00 *this = (EnItem00 *)actor; +void enitem00_set_link_incoming_item_id(z64_actor_t* actor, z64_game_t* game, int32_t incoming_item_id) { + EnItem00* this = (EnItem00*)actor; // Run z64_ActorSetLinkIncomingItemId regardless of FIX_BROKEN_DROPS - if (!z64_ActorSetLinkIncomingItemId(&this->actor, game, incoming_item_id, 50.0f, 10.0f) && FIX_BROKEN_DROPS) - { - switch (incoming_item_id) - { + if (!z64_ActorSetLinkIncomingItemId(&this->actor, game, incoming_item_id, 50.0f, 10.0f) && FIX_BROKEN_DROPS) { + switch (incoming_item_id) { case 0x43: // GI_MAGIC_SMALL z64_GiveItem(game, Z64_ITEM_MAGIC_SMALL); break; diff --git a/ASM/c/objects.h b/ASM/c/objects.h index 2c876fe76..f03f8b1ef 100644 --- a/ASM/c/objects.h +++ b/ASM/c/objects.h @@ -3,7 +3,7 @@ #include "z64.h" -int32_t object_index_or_spawn(z64_obj_ctxt_t *object_ctx, int16_t object_id); -void enitem00_set_link_incoming_item_id(z64_actor_t *actor, z64_game_t *game, int32_t getItemId); +int32_t object_index_or_spawn(z64_obj_ctxt_t* object_ctx, int16_t object_id); +void enitem00_set_link_incoming_item_id(z64_actor_t* actor, z64_game_t* game, int32_t getItemId); #endif diff --git a/ASM/c/pots.c b/ASM/c/pots.c index 8a0e8a5ca..efef258be 100644 --- a/ASM/c/pots.c +++ b/ASM/c/pots.c @@ -4,18 +4,18 @@ #include "textures.h" #include "z64.h" -#define DUNGEON_POT_SIDE_TEXTURE (uint8_t *)0x050108A0 -#define DUNGEON_POT_TOP_TEXTURE (uint8_t *)0x050118A0 -#define DUNGEON_POT_DLIST (z64_gfx_t *)0x05017870 +#define DUNGEON_POT_SIDE_TEXTURE (uint8_t*)0x050108A0 +#define DUNGEON_POT_TOP_TEXTURE (uint8_t*)0x050118A0 +#define DUNGEON_POT_DLIST (z64_gfx_t*)0x05017870 -#define POT_SIDE_TEXTURE (uint8_t *)0x06000000 -#define POT_TOP_TEXTURE (uint8_t *)0x06001000 -#define POT_DLIST (z64_gfx_t *)0x060017C0 +#define POT_SIDE_TEXTURE (uint8_t*)0x06000000 +#define POT_TOP_TEXTURE (uint8_t*)0x06001000 +#define POT_DLIST (z64_gfx_t*)0x060017C0 extern uint8_t POTCRATE_TEXTURES_MATCH_CONTENTS; extern uint16_t drop_collectible_override_flag; -override_t get_pot_override(z64_actor_t *actor, z64_game_t *game) { +override_t get_pot_override(z64_actor_t* actor, z64_game_t* game) { EnItem00 dummy; dummy.actor.actor_id = 0x15; dummy.actor.rot_init.y = actor->rot_init.z; @@ -31,7 +31,7 @@ override_t get_pot_override(z64_actor_t *actor, z64_game_t *game) { return (override_t) { 0 }; } -override_t get_flying_pot_override(z64_actor_t *actor, z64_game_t *game) { +override_t get_flying_pot_override(z64_actor_t* actor, z64_game_t* game) { EnItem00 dummy; dummy.actor.actor_id = 0x15; dummy.actor.rot_init.y = actor->rot_init.z; @@ -47,11 +47,11 @@ override_t get_flying_pot_override(z64_actor_t *actor, z64_game_t *game) { return (override_t) { 0 }; } -void draw_pot(z64_actor_t *actor, z64_game_t *game) { +void draw_pot(z64_actor_t* actor, z64_game_t* game) { // get original dlist and texture - z64_gfx_t *dlist = DUNGEON_POT_DLIST; - uint8_t *side_texture = DUNGEON_POT_SIDE_TEXTURE; - uint8_t *top_texture = DUNGEON_POT_TOP_TEXTURE; + z64_gfx_t* dlist = DUNGEON_POT_DLIST; + uint8_t* side_texture = DUNGEON_POT_SIDE_TEXTURE; + uint8_t* top_texture = DUNGEON_POT_TOP_TEXTURE; // overworld pot or hba pot if ((actor->actor_id == 0x111 && (actor->variable >> 8) & 1) || actor->actor_id == 0x117) { @@ -61,11 +61,11 @@ void draw_pot(z64_actor_t *actor, z64_game_t *game) { } uint8_t chest_type = 0; - if (actor->actor_id == 0x111) { //Regular pot + if (actor->actor_id == 0x111) { // Regular pot chest_type = ((ObjTsubo*)actor)->chest_type; - } else if(actor->actor_id == 0x117) { //HBA Pot + } else if (actor->actor_id == 0x117) { // HBA Pot chest_type = BROWN_CHEST; - } else if(actor->actor_id == 0x11D) { //Flying pot + } else if (actor->actor_id == 0x11D) { // Flying pot chest_type = ((EnTuboTrap*)actor)->chest_type; } @@ -99,7 +99,7 @@ void draw_pot(z64_actor_t *actor, z64_game_t *game) { } // push custom dlist (that sets the texture) to segment 09 - z64_gfx_t *gfx = game->common.gfx; + z64_gfx_t* gfx = game->common.gfx; gfx->poly_opa.d -= 4; gDPSetTextureImage(gfx->poly_opa.d, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, side_texture); gSPEndDisplayList(gfx->poly_opa.d + 1); @@ -114,23 +114,23 @@ void draw_pot(z64_actor_t *actor, z64_game_t *game) { z64_Gfx_DrawDListOpa(game, dlist); } -void draw_pot_hack(z64_actor_t *actor, z64_game_t *game) { +void draw_pot_hack(z64_actor_t* actor, z64_game_t* game) { draw_pot(actor, game); } -void draw_hba_pot_hack(z64_actor_t *actor, z64_game_t *game) { - EnGSwitch *switch_actor = (EnGSwitch *)actor; +void draw_hba_pot_hack(z64_actor_t* actor, z64_game_t* game) { + EnGSwitch* switch_actor = (EnGSwitch*)actor; if (!switch_actor->broken) { draw_pot(actor, game); } } -void draw_flying_pot_hack(z64_actor_t* actor, z64_game_t *game) { +void draw_flying_pot_hack(z64_actor_t* actor, z64_game_t* game) { draw_pot(actor, game); } -void ObjTsubo_SpawnCollectible_Hack(z64_actor_t *this, z64_game_t *game) { +void ObjTsubo_SpawnCollectible_Hack(z64_actor_t* this, z64_game_t* game) { int16_t dropParams = this->variable & 0x1F; if ((dropParams >= ITEM00_RUPEE_GREEN) && (dropParams <= ITEM00_BOMBS_SPECIAL)) { drop_collectible_override_flag = this->rot_init.z; @@ -139,7 +139,7 @@ void ObjTsubo_SpawnCollectible_Hack(z64_actor_t *this, z64_game_t *game) { } } -void EnTuboTrap_DropCollectible_Hack(z64_actor_t *this, z64_game_t *game) { +void EnTuboTrap_DropCollectible_Hack(z64_actor_t* this, z64_game_t* game) { int16_t params = this->variable; int16_t param3FF = (params >> 6) & 0x3FF; diff --git a/ASM/c/pots.h b/ASM/c/pots.h index f71ddaba1..4e460e533 100644 --- a/ASM/c/pots.h +++ b/ASM/c/pots.h @@ -8,7 +8,7 @@ // Regular Pot Struct typedef struct ObjTsubo { /* 0x0000 */ z64_actor_t actor; - /* 0x013C */ void *actionFunc; + /* 0x013C */ void* actionFunc; /* 0x0140 */ uint8_t collider[0x4C]; /* 0x018C */ int8_t objTsuboBankIndex; /* 0x0190 */ uint8_t chest_type; @@ -17,14 +17,14 @@ typedef struct ObjTsubo { // Flying Pot Struct typedef struct EnTuboTrap { /* 0x0000 */ z64_actor_t actor; - /* 0x013C */ void *actionFunc; + /* 0x013C */ void* actionFunc; /* 0x0140 */ float targetY; /* 0x0144 */ z64_xyzf_t originPos; /* 0x0150 */ uint8_t collider[0x4C]; /* 0x019C */ uint8_t chest_type; } EnTuboTrap; // size = 0x01AC -override_t get_pot_override(z64_actor_t *actor, z64_game_t *game); -override_t get_flying_pot_override(z64_actor_t *actor, z64_game_t *game); +override_t get_pot_override(z64_actor_t* actor, z64_game_t* game); +override_t get_flying_pot_override(z64_actor_t* actor, z64_game_t* game); #endif diff --git a/ASM/c/rng.c b/ASM/c/rng.c index a0483aaeb..bcb3397fc 100644 --- a/ASM/c/rng.c +++ b/ASM/c/rng.c @@ -33,7 +33,7 @@ void Seeded_Reset() { float Seeded_Rand_ZeroOne() { RNG_SEED_INT = (RNG_SEED_INT * 1664525) + 1013904223; RNG_SEED_FLOAT = ((RNG_SEED_INT >> 9) | 0x3F800000); - return *((float*)&RNG_SEED_FLOAT) - 1.0f; + return* ((float*)&RNG_SEED_FLOAT) - 1.0f; } /** @@ -43,5 +43,5 @@ float Seeded_Rand_ZeroOne() { float Seeded_Rand_Centered() { RNG_SEED_INT = (RNG_SEED_INT * 1664525) + 1013904223; RNG_SEED_FLOAT = ((RNG_SEED_INT >> 9) | 0x3F800000); - return *((float*)&RNG_SEED_FLOAT) - 1.5f; + return* ((float*)&RNG_SEED_FLOAT) - 1.5f; } diff --git a/ASM/c/save.c b/ASM/c/save.c index 26b31b875..603b36d93 100644 --- a/ASM/c/save.c +++ b/ASM/c/save.c @@ -19,7 +19,7 @@ #define HEALTH_OFFSET OFFSETOF(z64_file_t, energy ) -extern uint8_t *collectible_override_flags; +extern uint8_t* collectible_override_flags; extern uint16_t num_override_flags; extern uint16_t SRAM_SLOTS[6]; @@ -27,17 +27,17 @@ typedef void (*Sram_InitNewSave_Func)(void); Sram_InitNewSave_Func Sram_InitNewSave = (Sram_InitNewSave_Func)(0x8008FFC0); extended_savecontext_static_t extended_savectx; -void SsSram_ReadWrite_Safe(uint32_t addr, void *dramAddr, size_t size, uint32_t direction); +void SsSram_ReadWrite_Safe(uint32_t addr, void* dramAddr, size_t size, uint32_t direction); // Override Sram_WriteSave to include the collectible flags in the checksum calculation. -void Sram_WriteSave(SramContext *sramCtx) { +void Sram_WriteSave(SramContext* sramCtx) { uint16_t offset; uint16_t checksum; - uint16_t *ptr; + uint16_t* ptr; z64_file.checksum = 0; - ptr = (uint16_t *)&z64_file; + ptr = (uint16_t*)&z64_file; checksum = 0; // Checksum calculation for original SaveContext data @@ -45,13 +45,13 @@ void Sram_WriteSave(SramContext *sramCtx) { checksum += *ptr++; } - ptr = (uint16_t *)&extended_savectx; + ptr = (uint16_t*)&extended_savectx; for (offset = 0; offset < sizeof(extended_savectx) / 2; offset++) { checksum += *ptr++; } // Calculate the collectible flags in the checksum - ptr = (uint16_t *)collectible_override_flags; + ptr = (uint16_t*)collectible_override_flags; for (offset = 0; offset < num_override_flags / 2; offset++) { checksum += *ptr++; } @@ -80,19 +80,18 @@ void Sram_WriteSave(SramContext *sramCtx) { // Write the extended Save Context data to the backup slot offset = SRAM_SLOTS[z64_file.file_index + 3] + SRAM_ORIGINAL_SLOT_SIZE; SsSram_ReadWrite_Safe(SRAM_BASE + offset, &extended_savectx, sizeof(extended_savecontext_static_t), OS_WRITE); - } // Override the Sram_VerifyAndLoadAllSaves function. Only check our new 2 slots (and their backups). // And include the collectible flags in the checksum. -void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t *fileChooseCtx, SramContext *sramCtx) { +void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t* fileChooseCtx, SramContext* sramCtx) { uint16_t i; uint16_t newChecksum; uint16_t slotNum; uint16_t offset; uint16_t j; uint16_t oldChecksum; - uint16_t *ptr; + uint16_t* ptr; uint16_t dayTime; // Read SRAM to RAM buffer @@ -109,18 +108,18 @@ void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t *fileChooseCtx, SramCont z64_memcopy(collectible_override_flags, sramCtx->readBuff + offset + SLOT_SIZE - (num_override_flags), num_override_flags); oldChecksum = z64_file.checksum; z64_file.checksum = 0; - ptr = (uint16_t *)&z64_file; + ptr = (uint16_t*)&z64_file; for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++) { newChecksum += *ptr++; } // Calculate the extended savectx in the checksum - ptr = (uint16_t *)&extended_savectx; + ptr = (uint16_t*)&extended_savectx; for (i = 0; i < sizeof(extended_savectx) / 2; i++) { newChecksum += *ptr++; } // Calculate the collectible flags in the checksum - ptr = (uint16_t *)collectible_override_flags; + ptr = (uint16_t*)collectible_override_flags; for (i = 0; i < num_override_flags / 2; i++) { newChecksum += *ptr++; } @@ -134,13 +133,13 @@ void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t *fileChooseCtx, SramCont z64_memcopy(collectible_override_flags, sramCtx->readBuff + offset + SLOT_SIZE - num_override_flags, num_override_flags); oldChecksum = z64_file.checksum; z64_file.checksum = 0; - ptr = (uint16_t *)&z64_file; + ptr = (uint16_t*)&z64_file; for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++) { newChecksum += *ptr++; } // Calculate the collectible flags in the checksum - ptr = (uint16_t *)collectible_override_flags; + ptr = (uint16_t*)collectible_override_flags; for (i = 0; i < num_override_flags / 2; i++) { newChecksum += *ptr++; } @@ -159,7 +158,7 @@ void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t *fileChooseCtx, SramCont Sram_InitNewSave(); - ptr = (uint16_t *)&z64_file; + ptr = (uint16_t*)&z64_file; for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++) { newChecksum += *ptr++; @@ -211,7 +210,7 @@ void Sram_VerifyAndLoadAllSaves(z64_FileChooseContext_t *fileChooseCtx, SramCont // Overrides the original Sram_CopySave function. // SRAM is now split into 4 equal size slots, instead of the original 6 slots of sizeof(SaveContext). // So instead of just copying the data for the SaveContext, we just copy the whole slot -void Sram_CopySave(z64_FileChooseContext_t *fileChooseCtx, SramContext *sramCtx) { +void Sram_CopySave(z64_FileChooseContext_t* fileChooseCtx, SramContext* sramCtx) { int32_t src_offset = SRAM_SLOTS[fileChooseCtx->selectedFileIndex]; int32_t dst_offset = SRAM_SLOTS[fileChooseCtx->copyDestFileIndex]; @@ -240,7 +239,7 @@ void Sram_CopySave(z64_FileChooseContext_t *fileChooseCtx, SramContext *sramCtx) } // Hook the Save Write function to write the flags to SRAM -void Save_Write_Hook(uint32_t addr, void *dramAddr, size_t size, uint32_t direction) { +void Save_Write_Hook(uint32_t addr, void* dramAddr, size_t size, uint32_t direction) { // Save the original data to SRAM SsSram_ReadWrite_Safe(addr, dramAddr, size, direction); @@ -250,7 +249,7 @@ void Save_Write_Hook(uint32_t addr, void *dramAddr, size_t size, uint32_t direct } // Hook the Save open function to load the saved collectible flags -void Save_Open(char *sramBuffer) { +void Save_Open(char* sramBuffer) { uint16_t slot_offset = SRAM_SLOTS[z64_file.file_index] + SLOT_SIZE - (num_override_flags); z64_memcopy(collectible_override_flags, sramBuffer + slot_offset, num_override_flags); @@ -259,7 +258,7 @@ void Save_Open(char *sramBuffer) { } // Hook the init save function's call to SsSram_ReadWrite in order to zeroize the the collectible flags. -void Save_Init_Write_Hook(uint32_t addr, void *dramAddr, size_t size, uint32_t direction) { +void Save_Init_Write_Hook(uint32_t addr, void* dramAddr, size_t size, uint32_t direction) { // zeroize the new collectible flags in the sram buffer (dramAddr) // zeroize the free space in the sram buffer (after the original slot up to the end of the slot) @@ -267,8 +266,8 @@ void Save_Init_Write_Hook(uint32_t addr, void *dramAddr, size_t size, uint32_t d z64_bzero(dramAddr + slot_offset + SRAM_ORIGINAL_SLOT_SIZE, SLOT_SIZE - SRAM_ORIGINAL_SLOT_SIZE); // write initial extended save data. - uint8_t *extended_slot = dramAddr + slot_offset + SRAM_ORIGINAL_SLOT_SIZE; - extended_initial_save_entry *entry = &EXTENDED_INITIAL_SAVE_DATA; + uint8_t* extended_slot = dramAddr + slot_offset + SRAM_ORIGINAL_SLOT_SIZE; + extended_initial_save_entry* entry = &EXTENDED_INITIAL_SAVE_DATA; while (entry->all != 0) { extended_slot[entry->offset] = entry->value; entry++; @@ -278,7 +277,7 @@ void Save_Init_Write_Hook(uint32_t addr, void *dramAddr, size_t size, uint32_t d SsSram_ReadWrite_Safe(SRAM_BASE, dramAddr, SRAM_SIZE, direction); } -void SsSram_ReadWrite_Safe(uint32_t addr, void *dramAddr, size_t size, uint32_t direction) { +void SsSram_ReadWrite_Safe(uint32_t addr, void* dramAddr, size_t size, uint32_t direction) { if (size > 0) { SsSram_ReadWrite(addr, dramAddr, size, direction); } diff --git a/ASM/c/save.h b/ASM/c/save.h index 6212e2961..a59f24996 100644 --- a/ASM/c/save.h +++ b/ASM/c/save.h @@ -19,4 +19,4 @@ typedef union { extern extended_initial_save_entry EXTENDED_INITIAL_SAVE_DATA; extern extended_savecontext_static_t extended_savectx; -void SsSram_ReadWrite_Safe(uint32_t addr, void *dramAddr, size_t size, uint32_t direction); +void SsSram_ReadWrite_Safe(uint32_t addr, void* dramAddr, size_t size, uint32_t direction); diff --git a/ASM/c/scarecrow.c b/ASM/c/scarecrow.c index f8aecf7c7..4f8dfc2a5 100644 --- a/ASM/c/scarecrow.c +++ b/ASM/c/scarecrow.c @@ -1,6 +1,6 @@ #include -void store_scarecrow_fix(uint16_t *from, uint16_t *song) { +void store_scarecrow_fix(uint16_t* from, uint16_t* song) { for (int i = 0; i < 0x40; i+=2) { if (song[i] == 0x5700 || song[i] == 0) continue; if (song[i + 1] < 4) song[i + 1] = 4; diff --git a/ASM/c/scene.c b/ASM/c/scene.c index a3be5b8b4..fad58cb4d 100644 --- a/ASM/c/scene.c +++ b/ASM/c/scene.c @@ -1,6 +1,6 @@ #include "z64.h" -int8_t curr_scene_setup; // Global containing the current scene setup. +int8_t curr_scene_setup; // Determine the current scene setup and set it in the curr_scene_setup global. // See https://wiki.cloudmodding.com/oot/Scenes_and_Rooms#Alternate_Header_List: @@ -8,35 +8,34 @@ void get_current_scene_setup_number() { z64_scene_command* cmd = z64_game.scene_segment; // If the scene_setup_index is 0 then we don't need to look any further. - if(z64_file.scene_setup_index == 0) { + if (z64_file.scene_setup_index == 0) { curr_scene_setup = 0; return; } // If the scene_setup_index is > 3 then we're probably in a cutscene so just return -1. - if(z64_file.scene_setup_index > 3) { + if (z64_file.scene_setup_index > 3) { curr_scene_setup = -1; return; } // Loop through the scene headers and look for alternate header lists. - while(1) { - if(cmd->code == 0x14) // End of header command. + while (1) { + if (cmd->code == 0x14) { // End of header command. break; + } - if(cmd->code == 0x18) { //Alternate header command + 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 - void** alternate_header = (void**)(z64_game.scene_segment + segment_offset); + void** alternate_header = (void* *)(z64_game.scene_segment + segment_offset); uint8_t i = z64_file.scene_setup_index; // Starting, at scene_setup_index, scan towards the front of list to find the first non-null entry. - while(i > 0) - { - if((alternate_header)[i-1] != NULL) // Found a non-null entry so use this as our setup. - { + while (i > 0) { + if ((alternate_header)[i-1] != NULL) { // Found a non-null entry so use this as our setup. curr_scene_setup = i; return; } diff --git a/ASM/c/sys_matrix.h b/ASM/c/sys_matrix.h index bde02819e..68b527d56 100644 --- a/ASM/c/sys_matrix.h +++ b/ASM/c/sys_matrix.h @@ -9,7 +9,7 @@ typedef void (*translate_sys_matrix_fn)(float x, float y, float z, int32_t in_pl typedef void (*scale_sys_matrix_fn)(float x, float y, float z, int32_t in_place_flag); typedef void (*rotate_Z_sys_matrix_fn)(float z, int32_t in_place_flag); typedef void (*update_sys_matrix_fn)(float mf[4][4]); -typedef Mtx *(*append_sys_matrix_fn)(z64_gfx_t *gfx); +typedef Mtx* (*append_sys_matrix_fn)(z64_gfx_t* gfx); #define duplicate_sys_matrix ((duplicate_sys_matrix_fn)0x800AA6EC) #define pop_sys_matrix ((pop_sys_matrix_fn)0x800AA724) diff --git a/ASM/c/text.c b/ASM/c/text.c index 4c45f8155..bebc88f41 100644 --- a/ASM/c/text.c +++ b/ASM/c/text.c @@ -14,15 +14,15 @@ typedef struct { uint32_t top : 12; } text_char_t; -static text_char_t *text_end = NULL; -static text_char_t *text_buf = NULL; +static text_char_t* text_end = NULL; +static text_char_t* text_buf = NULL; void text_init() { text_buf = heap_alloc(text_max_chars * sizeof(text_char_t)); text_end = text_buf; } -int text_print_size(const char *s, int left, int top, int width) { +int text_print_size(const char* s, int left, int top, int width) { char c; int count = 0; while (c = *(s++)) { @@ -41,12 +41,12 @@ int text_print(const char* s, int left, int top) { return text_print_size(s, left, top, font_sprite.tile_w); } -void text_flush_size(z64_disp_buf_t *db, int width, int height, int hoffset, int voffset) { +void text_flush_size(z64_disp_buf_t* db, int width, int height, int hoffset, int voffset) { for (int i = 0; i < text_bucket_count; i++) { sprite_load(db, &font_sprite, i * text_bucket_size, text_bucket_size); - text_char_t *text_p = text_buf; + text_char_t* text_p = text_buf; while (text_p < text_end) { char c = text_p->c; int left = text_p->left + hoffset; @@ -65,6 +65,6 @@ void text_flush_size(z64_disp_buf_t *db, int width, int height, int hoffset, int text_end = text_buf; } -void text_flush(z64_disp_buf_t *db) { +void text_flush(z64_disp_buf_t* db) { text_flush_size(db, font_sprite.tile_w, font_sprite.tile_h, 0, 0); } diff --git a/ASM/c/text.h b/ASM/c/text.h index aee4a127c..a1d1a51b4 100644 --- a/ASM/c/text.h +++ b/ASM/c/text.h @@ -4,9 +4,9 @@ #include "z64.h" void text_init(); -int text_print(const char *s, int left, int top); -int text_print_size(const char *s, int left, int top, int width); -void text_flush(z64_disp_buf_t *db); -void text_flush_size(z64_disp_buf_t *db, int width, int height, int hoffset, int voffset); +int text_print(const char* s, int left, int top); +int text_print_size(const char* s, int left, int top, int width); +void text_flush(z64_disp_buf_t* db); +void text_flush_size(z64_disp_buf_t* db, int width, int height, int hoffset, int voffset); #endif diff --git a/ASM/c/textures.c b/ASM/c/textures.c index a6d9c960c..839ffec23 100644 --- a/ASM/c/textures.c +++ b/ASM/c/textures.c @@ -37,7 +37,7 @@ texture_t texture_table[TEXTURE_ID_MAX] = { [TEXTURE_ID_BEEHIVE_HEART] = { .textureID = TEXTURE_ID_BEEHIVE_HEART }, }; -uint8_t *get_texture(TextureId textureID) { +uint8_t* get_texture(TextureId textureID) { return texture_table[textureID].file.buf; } diff --git a/ASM/c/textures.h b/ASM/c/textures.h index 464da5b4f..d0174e139 100644 --- a/ASM/c/textures.h +++ b/ASM/c/textures.h @@ -50,7 +50,7 @@ typedef enum TextureId { #define PTMC_CONTENTS 1 #define PTMC_UNCHECKED 2 -uint8_t *get_texture(TextureId textureID); +uint8_t* get_texture(TextureId textureID); void init_textures(); #endif diff --git a/ASM/c/trade_quests.c b/ASM/c/trade_quests.c index b135d79db..b41ef40cd 100644 --- a/ASM/c/trade_quests.c +++ b/ASM/c/trade_quests.c @@ -231,7 +231,7 @@ uint32_t IsClaimCheckTraded() { return SaveFile_TradeItemIsTraded(Z64_ITEM_CLAIM_CHECK); } -z64_actor_t* IsTradeItemTraded(int16_t itemActionParam, z64_actor_t *targetActor) { +z64_actor_t* IsTradeItemTraded(int16_t itemActionParam, z64_actor_t* targetActor) { if ((itemActionParam >= PLAYER_AP_LETTER_ZELDA && itemActionParam <= PLAYER_AP_CHICKEN) || (itemActionParam >= PLAYER_AP_POCKET_EGG && itemActionParam < PLAYER_AP_CLAIM_CHECK)) { uint16_t itemId = GetTradeItemByAP(itemActionParam); diff --git a/ASM/c/triforce.c b/ASM/c/triforce.c index de8cc91d5..0dc5c73ab 100644 --- a/ASM/c/triforce.c +++ b/ASM/c/triforce.c @@ -13,7 +13,7 @@ void set_triforce_render() { frames = frames > TRIFORCE_FRAMES_FADE_INTO ? TRIFORCE_FRAMES_FADE_INTO : frames; } -void draw_triforce_count(z64_disp_buf_t *db) { +void draw_triforce_count(z64_disp_buf_t* db) { // Must be triforce hunt and triforce should be drawable, and we should either be on the pause screen or the render triforce flag should be set if (!(TRIFORCE_HUNT_ENABLED && CAN_DRAW_TRIFORCE && (render_triforce_flag == 1 || z64_game.pause_ctxt.state == 6))) { diff --git a/ASM/c/uninvertYaxis.c b/ASM/c/uninvertYaxis.c index 82f2a754a..f251b2c78 100644 --- a/ASM/c/uninvertYaxis.c +++ b/ASM/c/uninvertYaxis.c @@ -6,7 +6,7 @@ void manage_uninvert_yaxis() { if (CFG_UNINVERT_YAXIS_IN_FIRST_PERSON_CAMERA) { // Never if a choice textbox is on screen. - if (z64_MessageGetState(((uint8_t *)(&z64_game)) + 0x20D8) == 4) { + if (z64_MessageGetState(((uint8_t*)(&z64_game)) + 0x20D8) == 4) { return; } if (z64_game.camera_mode == CAM_MODE_FIRST_PERSON || diff --git a/ASM/c/util.c b/ASM/c/util.c index e2c8d96b4..7212ae816 100644 --- a/ASM/c/util.c +++ b/ASM/c/util.c @@ -1,22 +1,22 @@ #include "util.h" extern char C_HEAP[]; -void *heap_next = NULL; +void* heap_next = NULL; void heap_init() { heap_next = &C_HEAP[0]; } -void *heap_alloc(int bytes) { +void* heap_alloc(int bytes) { int rem = bytes % 16; if (rem) bytes += 16 - rem; - void *result = heap_next; + void* result = heap_next; heap_next = (char*)heap_next + bytes; return result; } -void file_init(file_t *file) { +void file_init(file_t* file) { file->buf = heap_alloc(file->size); read_file(file->buf, file->vrom_start, file->size); } diff --git a/ASM/c/util.h b/ASM/c/util.h index 3e894271a..77f1e473c 100644 --- a/ASM/c/util.h +++ b/ASM/c/util.h @@ -6,18 +6,18 @@ #define array_size(a) (sizeof(a) / sizeof(a[0])) void heap_init(); -void *heap_alloc(int bytes); +void* heap_alloc(int bytes); typedef struct { - uint8_t *buf; + uint8_t* buf; uint32_t vrom_start; uint32_t size; } file_t; -typedef void (*read_file_fn)(void *mem_addr, uint32_t vrom_addr, +typedef void (*read_file_fn)(void* mem_addr, uint32_t vrom_addr, uint32_t size); #define read_file ((read_file_fn)0x80000DF0) -void file_init(file_t *file); +void file_init(file_t* file); #endif diff --git a/ASM/c/z64.h b/ASM/c/z64.h index 7a891cdbb..ba245f11c 100644 --- a/ASM/c/z64.h +++ b/ASM/c/z64.h @@ -38,29 +38,26 @@ #define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture -#define OFFSETOF(structure, member) ((size_t)&(((structure *)0)->member)) +#define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member)) #define REG_PAGES 6 #define REGS_PER_PAGE 16 #define REGS_PER_GROUP (REG_PAGES * REGS_PER_PAGE) -#define REG_EDITOR_DATA ((int16_t *)0x801C6EA4) +#define REG_EDITOR_DATA ((int16_t*)0x801C6EA4) #define BASE_REG(n, r) REG_EDITOR_DATA[(n)*REGS_PER_GROUP + (r)] #define REG(r) BASE_REG(0, (r)) #define SREG(r) BASE_REG(1, (r)) #define R_PAUSE_BG_PRERENDER_STATE SREG(94) -typedef struct -{ +typedef struct { /* index of z64_col_type in scene file */ uint16_t type; /* vertex indices, a and b are bitmasked for some reason */ - struct - { + struct { uint16_t unk_00_ : 3; uint16_t va : 13; }; - struct - { + struct { uint16_t unk_01_ : 3; uint16_t vb : 13; }; @@ -71,10 +68,8 @@ typedef struct int16_t dist; } z64_col_poly_t; -typedef struct -{ - struct - { +typedef struct { + struct { uint32_t unk_00_ : 1; uint32_t drop : 1; /* link drops one unit into the floor */ uint32_t special : 4; @@ -84,8 +79,7 @@ typedef struct uint32_t exit : 5; uint32_t camera : 8; } flags_1; /* 0x0000 */ - struct - { + struct { uint32_t pad_00_ : 4; uint32_t wall_damage : 1; uint32_t unk_00_ : 6; @@ -98,28 +92,24 @@ typedef struct } flags_2; /* 0x0004 */ } z64_col_type_t; -typedef struct -{ +typedef struct { z64_xyz_t pos; z64_xyz_t rot; int16_t fov; int16_t unk_00_; } z64_camera_params_t; -typedef struct -{ +typedef struct { uint16_t mode; uint16_t unk_01_; uint32_t seg_params; /* segment address of z64_camera_params_t */ } z64_camera_t; -typedef struct -{ +typedef struct { z64_xyz_t pos; int16_t width; int16_t depth; - struct - { + struct { uint32_t unk_00_ : 12; uint32_t active : 1; uint32_t group : 6; /* ? */ @@ -128,8 +118,7 @@ typedef struct } flags; } z64_col_water_t; -typedef struct -{ +typedef struct { z64_xyz_t min; z64_xyz_t max; uint16_t n_vtx; @@ -142,8 +131,7 @@ typedef struct z64_col_water_t *water; } z64_col_hdr_t; -typedef enum -{ +typedef enum { Z64_ITEM_NULL = -1, Z64_ITEM_STICK, Z64_ITEM_NUT, @@ -269,8 +257,7 @@ typedef enum Z64_ITEM_MAGIC_LARGE, } z64_item_t; -typedef enum -{ +typedef enum { Z64_EXCH_ITEM_NONE, Z64_EXCH_ITEM_LETTER_ZELDA, Z64_EXCH_ITEM_WEIRD_EGG, @@ -375,8 +362,7 @@ typedef enum { PLAYER_AP_MAX } z64_action_parameter_t; -typedef enum -{ +typedef enum { SI_DEKU_NUTS_5, SI_ARROWS_30, SI_ARROWS_50, @@ -430,8 +416,7 @@ typedef enum SI_MAX } z64_shop_item_t; -typedef enum -{ +typedef enum { Z64_SLOT_STICK, Z64_SLOT_NUT, Z64_SLOT_BOMB, @@ -458,16 +443,14 @@ typedef enum Z64_SLOT_CHILD_TRADE, } z64_slot_t; -typedef enum -{ +typedef enum { Z64_ITEMBTN_B, Z64_ITEMBTN_CL, Z64_ITEMBTN_CD, Z64_ITEMBTN_CR, } z64_itembtn_t; -typedef struct -{ +typedef struct { char unk_00_[0x006E]; /* 0x0000 */ int16_t run_speed_limit; /* 0x006E */ char unk_01_[0x0004]; /* 0x0070 */ @@ -542,8 +525,7 @@ typedef struct /* 0x0FBC */ } z64_gameinfo_t; -typedef struct -{ +typedef struct { /* data */ uint8_t unk_00_[0x1C9EE]; /* 0x0000 */ uint16_t deaths[3]; /* 0x1C9EE */ @@ -558,8 +540,7 @@ typedef struct int16_t copyDestFileIndex; /* 0x1CA50 */ } z64_FileChooseContext_t; -typedef struct -{ +typedef struct { int32_t entrance_index; /* 0x0000 */ int32_t link_age; /* 0x0004 */ char unk_00_[0x0002]; /* 0x0008 */ @@ -588,11 +569,9 @@ typedef struct char unk_05_; /* 0x003F */ int8_t child_button_items[4]; /* 0x0040 */ int8_t child_c_button_slots[3]; /* 0x0044 */ - union - { + union { uint16_t child_equips; /* 0x0048 */ - struct - { + struct { uint16_t child_equip_boots : 4; uint16_t child_equip_tunic : 4; uint16_t child_equip_shield : 4; @@ -601,11 +580,9 @@ typedef struct }; int8_t adult_button_items[4]; /* 0x004A */ int8_t adult_c_button_slots[3]; /* 0x004E */ - union - { + union { uint16_t adult_equips; /* 0x0052 */ - struct - { + struct { uint16_t adult_equip_boots : 4; uint16_t adult_equip_tunic : 4; uint16_t adult_equip_shield : 4; @@ -616,11 +593,9 @@ typedef struct int16_t scene_index; /* 0x0066 */ int8_t button_items[4]; /* 0x0068 */ int8_t c_button_slots[3]; /* 0x006C */ - union - { + union { uint16_t equips; /* 0x0070 */ - struct - { + struct { uint16_t equip_boots : 4; uint16_t equip_tunic : 4; uint16_t equip_shield : 4; @@ -631,11 +606,9 @@ typedef struct int8_t items[24]; /* 0x0074 */ int8_t ammo[15]; /* 0x008C */ uint8_t magic_beans_sold; /* 0x009B */ - union - { + union { uint16_t equipment; /* 0x009C */ - struct - { + struct { uint16_t : 1; uint16_t hover_boots : 1; uint16_t iron_boots : 1; @@ -655,11 +628,9 @@ typedef struct }; }; char unk_08_[0x0002]; /* 0x009E */ - union - { + union { uint32_t equipment_items; /* 0x00A0 */ - struct - { + struct { uint32_t : 9; uint32_t nut_upgrade : 3; uint32_t stick_upgrade : 3; @@ -671,11 +642,9 @@ typedef struct uint32_t quiver : 3; }; }; - union - { + union { uint32_t quest_items; /* 0x00A4 */ - struct - { + struct { uint32_t heart_pieces : 8; uint32_t gold_skulltula : 1; uint32_t gerudos_card : 1; @@ -703,11 +672,9 @@ typedef struct uint32_t forest_medallion : 1; }; }; - union - { + union { uint8_t items; - struct - { + struct { uint8_t : 5; uint8_t map : 1; uint8_t compass : 1; @@ -718,8 +685,7 @@ typedef struct uint8_t defense_hearts; /* 0x00CF */ int16_t gs_tokens; /* 0x00D0 */ char unk_09_[0x0002]; /* 0x00D2 */ - struct - { + struct { uint32_t chest; uint32_t swch; uint32_t clear; @@ -786,13 +752,13 @@ typedef struct char unk_1C_[0x0010]; /* 0x1414 */ uint16_t refill_hearts; /* 0x1424 */ char unk_1D_[0x000A]; /* 0x1426 */ - z64_gameinfo_t *gameinfo; /* 0x1430 */ + z64_gameinfo_t* gameinfo; /* 0x1430 */ char unk_1E_[0x001C]; /* 0x1434 */ /* 0x1450 */ } z64_file_t; typedef struct { - uint8_t *readBuff; /* 0x00 */ + uint8_t* readBuff; /* 0x00 */ } SramContext; // size = 0x4 typedef struct { @@ -804,8 +770,7 @@ typedef struct { extended_save_data_t additional_save_data; } extended_sram_file_t; -typedef struct -{ +typedef struct { uint8_t sound_options; /* 0x0000 */ uint8_t z_target_options; /* 0x0001 */ uint8_t language_options; /* 0x0002 */ @@ -816,20 +781,16 @@ typedef struct /* 0x7A00 */ } z64_sram_data_t; -typedef struct -{ +typedef struct { uint32_t seg[16]; } z64_stab_t; -typedef struct -{ +typedef struct { uint8_t scene_index; uint8_t entrance_index; - union - { + union { uint16_t variable; - struct - { + struct { uint16_t transition_out : 7; uint16_t transition_in : 7; uint16_t unk_00_ : 1; @@ -838,8 +799,7 @@ typedef struct }; } z64_entrance_table_t; -typedef struct -{ +typedef struct { uint32_t scene_vrom_start; uint32_t scene_vrom_end; uint32_t title_vrom_start; @@ -850,16 +810,14 @@ typedef struct char padding_00_; } z64_scene_table_t; -typedef struct -{ +typedef struct { uint32_t size; /* 0x0000 */ Gfx *buf; /* 0x0004 */ Gfx *p; /* 0x0008 */ Gfx *d; /* 0x000C */ } z64_disp_buf_t; -typedef struct -{ +typedef struct { Gfx *poly_opa_w; /* 0x0000 */ Gfx *poly_xlu_w; /* 0x0004 */ char unk_00_[0x0008]; /* 0x0008 */ @@ -881,10 +839,8 @@ typedef struct /* 0x02EC */ } z64_gfx_t; -typedef union -{ - struct - { +typedef union { + struct { uint16_t a : 1; uint16_t b : 1; uint16_t z : 1; @@ -904,8 +860,7 @@ typedef union uint16_t pad; } pad_t; -typedef struct -{ +typedef struct { pad_t pad; int8_t x; int8_t y; @@ -954,7 +909,7 @@ struct z64_actor_s float gravity; /* 0x006C */ float min_vel_y; /* 0x0070 */ void *unk_08_; /* 0x0074 */ - z64_col_poly_t *floor_poly; /* 0x0078 */ + z64_col_poly_t* floor_poly; /* 0x0078 */ char unk_09_[0x000C]; /* 0x007C */ uint16_t unk_flags_00; /* 0x0088 */ int16_t unk_roty; /* 0x008A */ @@ -997,23 +952,22 @@ typedef struct { /* 0x0E */ uint16_t params; } ActorEntry; // size = 0x10 -typedef struct -{ +typedef struct { z64_actor_t common; /* 0x0000 */ char unk_00_[0x0013]; /* 0x013C */ uint8_t current_mask; /* 0x014F */ char unk_01_[0x02D4]; /* 0x0150 */ int8_t incoming_item_id; /* 0x0424 */ char unk_02_[0x0003]; /* 0x0425 */ - z64_actor_t *incoming_item_actor; /* 0x0428 */ + z64_actor_t* incoming_item_actor; /* 0x0428 */ char unk_03_[0x0008]; /* 0x042C */ uint8_t action; /* 0x0434 */ char unk_04_[0x0237]; /* 0x0435 */ uint32_t state_flags_1; /* 0x066C */ uint32_t state_flags_2; /* 0x0670 */ char unk_05_[0x0004]; /* 0x0674 */ - z64_actor_t *boomerang_actor; /* 0x0678 */ - z64_actor_t *navi_actor; /* 0x067C */ + z64_actor_t* boomerang_actor; /* 0x0678 */ + z64_actor_t* navi_actor; /* 0x067C */ uint16_t naviTextId; /* 0x0680 */ uint8_t state_flags_3; /* 0x0682 */ int8_t exchange_item_id; /* 0x0683 */ @@ -1041,8 +995,7 @@ typedef struct DynaPolyActor { int16_t unk_162; /* 0x162 */ } DynaPolyActor; // size = 0x164 -typedef struct -{ +typedef struct { z64_controller_t raw; uint16_t unk_00_; z64_controller_t raw_prev; @@ -1058,8 +1011,7 @@ typedef struct } z64_input_t; /* context base */ -typedef struct -{ +typedef struct { z64_gfx_t *gfx; /* 0x0000 */ void *state_main; /* 0x0004 */ void *state_dtor; /* 0x0008 */ @@ -1078,8 +1030,7 @@ typedef struct /* 0x00A4 */ } z64_ctxt_t; -typedef struct -{ +typedef struct { /* file loading params */ uint32_t vrom_addr; void *dram_addr; @@ -1094,8 +1045,7 @@ typedef struct } z64_getfile_t; /* object structs */ -typedef struct -{ +typedef struct { int16_t id; void *data; z64_getfile_t getfile; @@ -1103,8 +1053,7 @@ typedef struct OSMesg load_m; } z64_mem_obj_t; -typedef struct -{ +typedef struct { void *obj_space_start; void *obj_space_end; uint8_t n_objects; @@ -1114,15 +1063,13 @@ typedef struct z64_mem_obj_t objects[19]; } z64_obj_ctxt_t; -typedef struct -{ +typedef struct { uint8_t code; uint8_t data1; uint32_t data2; } z64_scene_command; -typedef struct -{ +typedef struct { char unk_00_[0x0128]; /* 0x0000 */ void *icon_item; /* 0x0128 */ void *icon_item_24; /* 0x012C */ @@ -1167,21 +1114,18 @@ typedef struct /* 0x02B4 */ } z64_pause_ctxt_t; -typedef struct -{ +typedef struct { uint32_t vrom_start; uint32_t vrom_end; } z64_object_table_t; /* lighting structs */ -typedef struct -{ +typedef struct { int8_t dir[3]; uint8_t col[3]; } z64_light1_t; -typedef struct -{ +typedef struct { int16_t x; int16_t y; int16_t z; @@ -1189,14 +1133,12 @@ typedef struct int16_t intensity; } z64_light2_t; -typedef union -{ +typedef union { z64_light1_t light1; z64_light2_t light2; } z64_lightn_t; -typedef struct -{ +typedef struct { uint8_t type; z64_lightn_t lightn; } z64_light_t; @@ -1205,21 +1147,19 @@ typedef struct z64_light_node_s z64_light_node_t; struct z64_light_node_s { z64_light_t *light; - z64_light_node_t *prev; - z64_light_node_t *next; + z64_light_node_t* prev; + z64_light_node_t* next; }; -typedef struct -{ - z64_light_node_t *light_list; +typedef struct { + z64_light_node_t* light_list; uint8_t ambient[3]; uint8_t fog[3]; int16_t fog_position; int16_t draw_distance; } z64_lighting_t; -typedef struct -{ +typedef struct { int8_t numlights; Lightsn lites; } z64_gbi_lights_t; @@ -1227,8 +1167,7 @@ typedef struct typedef void (*z64_light_handler_t)(z64_gbi_lights_t*, z64_lightn_t*, z64_actor_t*); -typedef struct -{ +typedef struct { uint8_t freeze_flash_timer; /* 0x0000 */ char unk_01_[0x01]; /* 0x0001 */ uint8_t unk_02; /* 0x0002 */ @@ -1329,8 +1268,7 @@ typedef enum { } CameraModeType; /* game context */ -typedef struct -{ +typedef struct { z64_ctxt_t common; /* 0x00000 */ uint16_t scene_index; /* 0x000A4 */ uint8_t scene_config; /* 0x000A6 */ @@ -1364,8 +1302,7 @@ typedef struct z64_actor_ctxt_t actor_ctxt; /* 0x01C24 */ uint8_t n_actors_loaded; /* 0x01C2C */ char unk_0A_[0x0003]; /* 0x01C2D */ - struct - { + struct { uint32_t length; z64_actor_t *first; } actor_list[12]; /* 0x01C30 */ @@ -1375,8 +1312,7 @@ typedef struct char unk_0C_1_[0x000A]; /* 0x01CD0 */ uint8_t target_actor_type; /* 0x01CDA */ char unk_0C_2_[0x0005]; /* 0x01CDB */ - struct - { + struct { z64_xyzf_t pos; float unk; colorRGB8_t color; @@ -1413,8 +1349,7 @@ typedef struct uint16_t minimap; } hud_alpha_channels; /* 0x10732 */ char unk_13_[0x000C]; /* 0x10746 */ - struct - { + struct { uint8_t unk_00_; uint8_t b_button; uint8_t unk_01_; @@ -1461,8 +1396,7 @@ typedef struct } z64_game_t; -typedef struct -{ +typedef struct { char unk_00_[0x01D8]; /* 0x00000 */ z64_sram_data_t *sram_buffer; /* 0x001D8 */ char unk_01_[0x1C812]; /* 0x001DC */ @@ -1513,8 +1447,7 @@ typedef struct colorRGB16_t cursor_color; /* 0x1CA94 */ } z64_menudata_t; -typedef struct -{ +typedef struct { void *ptr; /* 0x0000 */ uint32_t vrom_start; /* 0x0004 */ uint32_t vrom_end; /* 0x0008 */ @@ -1528,8 +1461,7 @@ typedef struct /* 0x0030 */ } z64_state_ovl_t; -typedef struct -{ +typedef struct { /* state ? */ int32_t state; /* 0x0000 */ /* elapsed time */ @@ -1548,8 +1480,7 @@ typedef struct /* 0x0018 */ } z64_trail_cp_t; -typedef struct -{ +typedef struct { /* control points */ z64_trail_cp_t cp[16]; /* 0x0000 */ /* interpolation mode ? */ @@ -1594,8 +1525,7 @@ typedef struct /* 0x01AC */ } z64_trail_fx_t; -typedef struct -{ +typedef struct { uint8_t active; /* 0x0000 */ char pad_00_[0x0003]; /* 0x0001 */ z64_trail_fx_t fx; /* 0x0004 */ @@ -1824,7 +1754,7 @@ typedef enum { typedef struct EnGSwitch { /* 0x0000 */ z64_actor_t actor; - /* 0x014C */ void *actionFunc; // EnGSwitchActionFunc + /* 0x014C */ void* actionFunc; // EnGSwitchActionFunc /* 0x0150 */ int16_t type; /* 0x0152 */ int16_t silverCount; /* 0x0154 */ int16_t switchFlag; @@ -1850,7 +1780,7 @@ typedef enum { /* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background. /* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters. /* 3 */ PAUSE_BG_PRERENDER_READY, // The pause background is ready to be used. - /* 4 */ PAUSE_BG_PRERENDER_MAX + /* 4 */ PAUSE_BG_PRERENDER_MAX, } PauseBgPreRenderState; @@ -1929,7 +1859,6 @@ typedef enum { #define z64_Item_DropCollectible2_addr 0x800138B0 #define z64_Gfx_DrawDListOpa_addr 0x80028048 #define z64_Math_SinS_addr 0x800636C4 -#define z64_Rand_ZeroOne_addr 0x800CDCCC #define z64_RandSeed_addr 0x800CDCC0 #define z64_Rand_ZeroOne_addr 0x800CDCCC #define Interface_LoadItemIcon1_addr 0x8006FB50 @@ -1963,65 +1892,64 @@ typedef enum { #define z64_ctxt_game_size 0x00012518 /* function prototypes */ -typedef void(*z64_ActorKillFunc)(z64_actor_t *); -typedef uint8_t(*z64_Message_GetStateFunc)(uint8_t *); -typedef void(*z64_Flags_SetCollectibleFunc)(z64_game_t *game, uint32_t flag); -typedef int32_t (*z64_Flags_GetCollectibleFunc)(z64_game_t *game, uint32_t flag); -typedef void(*z64_Audio_PlaySoundGeneralFunc)(uint16_t sfxId, void *pos, uint8_t token, float *freqScale, float *a4, uint8_t *reverbAdd); +typedef void(*z64_ActorKillFunc)(z64_actor_t*); +typedef uint8_t(*z64_Message_GetStateFunc)(uint8_t*); +typedef void(*z64_Flags_SetCollectibleFunc)(z64_game_t* game, uint32_t flag); +typedef int32_t (*z64_Flags_GetCollectibleFunc)(z64_game_t* game, uint32_t flag); +typedef void(*z64_Audio_PlaySoundGeneralFunc)(uint16_t sfxId, void* pos, uint8_t token, float* freqScale, float* a4, uint8_t* reverbAdd); typedef void(*z64_Audio_PlayFanFareFunc)(uint16_t); -typedef void (*z64_DrawActors_proc) (z64_game_t *game, void *actor_ctxt); -typedef void (*z64_DeleteActor_proc) (z64_game_t *game, void *actor_ctxt, - z64_actor_t *actor); -typedef z64_actor_t* (*z64_SpawnActor_proc) (void *actor_ctxt, z64_game_t *game, +typedef void (*z64_DrawActors_proc) (z64_game_t* game, void* actor_ctxt); +typedef void (*z64_DeleteActor_proc) (z64_game_t* game, void* actor_ctxt, + z64_actor_t* actor); +typedef z64_actor_t* (*z64_SpawnActor_proc) (void* actor_ctxt, z64_game_t* game, int actor_id, float x, float y, float z, uint16_t rx, uint16_t ry, uint16_t rz, uint16_t variable); typedef void (*z64_SwitchAgeEquips_proc) (void); -typedef void (*z64_UpdateItemButton_proc) (z64_game_t *game, int button_index); -typedef void (*z64_UpdateEquipment_proc) (z64_game_t *game, z64_link_t *link); -typedef void (*z64_LoadRoom_proc) (z64_game_t *game, - void *p_ctxt_room_index, +typedef void (*z64_UpdateItemButton_proc) (z64_game_t* game, int button_index); +typedef void (*z64_UpdateEquipment_proc) (z64_game_t* game, z64_link_t* link); +typedef void (*z64_LoadRoom_proc) (z64_game_t* game, + void* p_ctxt_room_index, uint8_t room_index); -typedef void (*z64_UnloadRoom_proc) (z64_game_t *game, - void *p_ctxt_room_index); -typedef void (*z64_Io_proc) (uint32_t dev_addr, void *dram_addr, +typedef void (*z64_UnloadRoom_proc) (z64_game_t* game, + void* p_ctxt_room_index); +typedef void (*z64_Io_proc) (uint32_t dev_addr, void* dram_addr, uint32_t size, int32_t direction); -typedef void (*z64_SceneConfig_proc) (z64_game_t *game); -typedef void (*z64_DisplayTextbox_proc) (z64_game_t *game, uint16_t text_id, +typedef void (*z64_SceneConfig_proc) (z64_game_t* game); +typedef void (*z64_DisplayTextbox_proc) (z64_game_t* game, uint16_t text_id, int unknown_); -typedef void (*z64_GiveItem_proc) (z64_game_t *game, uint8_t item); +typedef void (*z64_GiveItem_proc) (z64_game_t* game, uint8_t item); -typedef void(*z64_LinkDamage_proc) (z64_game_t *ctxt, z64_link_t *link, +typedef void(*z64_LinkDamage_proc) (z64_game_t* ctxt, z64_link_t* link, uint8_t damage_type, float unk_00, uint32_t unk_01, uint16_t unk_02); -typedef void(*z64_LinkInvincibility_proc) (z64_link_t *link, uint8_t frames); -typedef float *(*z64_GetMatrixStackTop_proc)(); -typedef void (*SsSram_ReadWrite_proc)(uint32_t addr, void *dramAddr, size_t size, uint32_t direction); -typedef void *(*z64_memcopy_proc)(void *dest, void *src, uint32_t size); -typedef void (*z64_bzero_proc)(void *__s, uint32_t __n); -typedef void (*z64_Gfx_DrawDListOpa_proc)(z64_game_t *game, z64_gfx_t *dlist); +typedef void(*z64_LinkInvincibility_proc) (z64_link_t* link, uint8_t frames); +typedef float* (*z64_GetMatrixStackTop_proc)(); +typedef void (*SsSram_ReadWrite_proc)(uint32_t addr, void* dramAddr, size_t size, uint32_t direction); +typedef void* (*z64_memcopy_proc)(void* dest, void* src, uint32_t size); +typedef void (*z64_bzero_proc)(void* __s, uint32_t __n); +typedef void (*z64_Gfx_DrawDListOpa_proc)(z64_game_t* game, z64_gfx_t* dlist); typedef float (*z64_Math_SinS_proc)(int16_t angle); -typedef int32_t(*z64_ObjectSpawn_proc) (z64_obj_ctxt_t *object_ctx, int16_t object_id); -typedef int32_t(*z64_ObjectIndex_proc) (z64_obj_ctxt_t *object_ctx, int16_t object_id); -typedef int32_t(*z64_ObjectIsLoaded_proc) (z64_obj_ctxt_t *object_ctx, int32_t bank_index); +typedef int32_t(*z64_ObjectSpawn_proc) (z64_obj_ctxt_t* object_ctx, int16_t object_id); +typedef int32_t(*z64_ObjectIndex_proc) (z64_obj_ctxt_t* object_ctx, int16_t object_id); +typedef int32_t(*z64_ObjectIsLoaded_proc) (z64_obj_ctxt_t* object_ctx, int32_t bank_index); -typedef int32_t(*z64_ActorSetLinkIncomingItemId_proc) (z64_actor_t *actor, z64_game_t *game, +typedef int32_t(*z64_ActorSetLinkIncomingItemId_proc) (z64_actor_t* actor, z64_game_t* game, int32_t get_item_id, float xz_range, float y_range); -typedef float (*z64_Rand_ZeroOne_proc)(); typedef void(*z64_RandSeed_proc) (uint32_t seed); typedef float(*z64_Rand_ZeroOne_proc)(); typedef void(*Font_LoadChar_proc)(void* font, uint8_t character, uint16_t codePointIndex); -typedef void(*Interface_LoadItemIcon1_proc) (z64_game_t *game, uint16_t button); +typedef void(*Interface_LoadItemIcon1_proc) (z64_game_t* game, uint16_t button); typedef void(*Rupees_ChangeBy_proc) (int16_t rupeeChange); -typedef void(*Message_ContinueTextbox_proc) (z64_game_t *play, uint16_t textId); +typedef void(*Message_ContinueTextbox_proc) (z64_game_t* play, uint16_t textId); typedef void(*PlaySFX_proc) (uint16_t sfxId); typedef void(*z64_ScalePitchAndTempo_proc)(float scaleTempoAndFreq, uint8_t duration); -typedef void(*GetItem_Draw_proc)(z64_game_t *game, int16_t drawId); +typedef void(*GetItem_Draw_proc)(z64_game_t* game, int16_t drawId); typedef uint16_t (*z64_Audio_GetActiveSeqId_proc)(uint8_t seqId); /* data */ @@ -2101,7 +2029,6 @@ typedef uint16_t (*z64_Audio_GetActiveSeqId_proc)(uint8_t seqId); #define z64_Item_DropCollectible2 ((z64_Item_DropCollectible_proc)z64_Item_DropCollectible2_addr) #define z64_Gfx_DrawDListOpa ((z64_Gfx_DrawDListOpa_proc)z64_Gfx_DrawDListOpa_addr) #define z64_Math_SinS ((z64_Math_SinS_proc)z64_Math_SinS_addr) -#define z64_Rand_ZeroOne ((z64_Rand_ZeroOne_proc)z64_Rand_ZeroOne_addr) #define Interface_LoadItemIcon1 ((Interface_LoadItemIcon1_proc)Interface_LoadItemIcon1_addr) #define Rupees_ChangeBy ((Rupees_ChangeBy_proc)Rupees_ChangeBy_addr) diff --git a/ASM/src/build.asm b/ASM/src/build.asm index 402f60fb5..bab84833f 100644 --- a/ASM/src/build.asm +++ b/ASM/src/build.asm @@ -1,7 +1,7 @@ .n64 .relativeinclude on -// version guard, prevent people from building with older armips versions +; version guard, prevent people from building with older armips versions .if (version() < 110) .notice version() .error "Detected armips build is too old. Please install https://github.com/Kingcom/armips version 0.11 or later." @@ -41,7 +41,7 @@ .headersize (0x80400000 - 0x03480000) .org 0x80400000 -.area 0x00200000 //payload max memory +.area 0x00200000 ; payload max memory PAYLOAD_START: .area 0x20, 0 @@ -145,6 +145,6 @@ TRIFORCE_ICON_TEXTURE: AUDIO_THREAD_MEM_START: .skip AUDIO_THREAD_MEM_SIZE PAYLOAD_END: -.endarea //payload max memory +.endarea ; payload max memory .close diff --git a/ASM/src/config.asm b/ASM/src/config.asm index 7f473270b..dcafb704c 100644 --- a/ASM/src/config.asm +++ b/ASM/src/config.asm @@ -97,7 +97,6 @@ CFG_CUSTOM_MESSAGE_1: CFG_CUSTOM_MESSAGE_2: .endarea - .align 4 ; Version string diff --git a/ASM/src/cutscenes.asm b/ASM/src/cutscenes.asm index 4dabd2fc9..5e9969e24 100644 --- a/ASM/src/cutscenes.asm +++ b/ASM/src/cutscenes.asm @@ -609,13 +609,13 @@ sos_handle_item: ;if link is getting an item dont allow the windmill guy to talk sos_talk_prevention: - lh t7, 0xB6(s0) ;displaced - lhu t9, 0xB4AE(t9) ;displaced + lh t7, 0xB6(s0) ; displaced + lhu t9, 0xB4AE(t9) ; displaced la t1, PLAYER_ACTOR - lw t2, 0x428(t1) ;interactRangeActor + lw t2, 0x428(t1) ; interactRangeActor beqz t2, @@no_item nop - lb t2, 0x424(t1) ;get item id + lb t2, 0x424(t1) ; get item id li t1, 0x7E bne t2, t1, @@item nop diff --git a/ASM/src/drop_overrides/obj_tsubo.asm b/ASM/src/drop_overrides/obj_tsubo.asm deleted file mode 100644 index 8234642d6..000000000 --- a/ASM/src/drop_overrides/obj_tsubo.asm +++ /dev/null @@ -1,11 +0,0 @@ -;Hack obj_tsubo_spawn function to set drop_collectible_override_flag -obj_tsubo_spawn_hook: - lh a0, 0x18(a0) - li a2, drop_collectible_override_flag - sh a0, 0x00(a2) - -; Replaced code - lw a0, 0x001c(sp) - sra t6, v1, 9 - jr ra - andi t7,t6, 0x003F diff --git a/ASM/src/file_select.asm b/ASM/src/file_select.asm index 7dd92dcfa..5d9d2f621 100644 --- a/ASM/src/file_select.asm +++ b/ASM/src/file_select.asm @@ -133,4 +133,3 @@ move_file_3: sh t1, 0x00(t0) jr ra lh t3, 0x4A2E(a2) - diff --git a/ASM/src/fishing.asm b/ASM/src/fishing.asm index 20c9a3468..050fce1d7 100644 --- a/ASM/src/fishing.asm +++ b/ASM/src/fishing.asm @@ -106,4 +106,3 @@ make_loach_follow_lure: lw ra, 0x0010 (sp) jr ra addiu sp, sp, 0x0014 - diff --git a/ASM/src/hacks.asm b/ASM/src/hacks.asm index a18090e72..6f6c58a27 100644 --- a/ASM/src/hacks.asm +++ b/ASM/src/hacks.asm @@ -3637,7 +3637,7 @@ courtyard_guards_kill: ; Allow ice arrows to melt red ice ;=================================================================================================== .orga 0xDB32C8 - jal blue_fire_arrows ; replaces addiu at, zero, 0x00F0 + jal blue_fire_arrows ; replaces addiu at, zero, 0x00F0 ;=================================================================================================== ; Give each cursed skulltula house resident a different text ID, for skulltula reward hints @@ -3723,7 +3723,7 @@ courtyard_guards_kill: lw s0, 0x4(sp) jr ra addiu sp, sp, 0x10 - ;Remove the rest of the old function + ; Remove the rest of the old function nop nop nop @@ -3737,8 +3737,8 @@ courtyard_guards_kill: ;================================================================================================== ; Load current mask on scene change ;================================================================================================== -;Player_Init (0x80844DE8) -;Replaces: +; Player_Init (0x80844DE8) +; Replaces: ;jal func_80834000 .orga 0xBE28EC jal player_save_mask diff --git a/ASM/src/scarecrow.asm b/ASM/src/scarecrow.asm index f4201f04e..348930440 100644 --- a/ASM/src/scarecrow.asm +++ b/ASM/src/scarecrow.asm @@ -47,5 +47,3 @@ save_scarecrow_song: lw a1, 0x0(sp) j 0x57030 addiu sp,sp,0x18 - - diff --git a/CI.py b/CI.py index 82b67acd7..25f976799 100644 --- a/CI.py +++ b/CI.py @@ -112,8 +112,9 @@ def check_code_style(fix_errors: bool = False) -> None: # Check for code style errors repo_dir = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) - def check_file_format(path: pathlib.Path): + def check_file_format(path: pathlib.Path, *, allow_trailing_spaces: bool = False): fixed = '' + empty_lines = 0 with path.open(encoding='utf-8', newline='') as file: path = path.relative_to(repo_dir) for i, line in enumerate(file, start=1): @@ -121,6 +122,10 @@ def check_file_format(path: pathlib.Path): error(f'Missing line break at end of {path}', True) line += '\n' line = line.rstrip('\n') + if line: + empty_lines = 0 + else: + empty_lines += 1 if '\t' in line: error(f'Hard tab on line {i} of {path}', True) fixed_line = '' @@ -130,10 +135,13 @@ def check_file_format(path: pathlib.Path): else: fixed_line += c line = fixed_line - if line.endswith(' '): + if line.endswith(' ') and not allow_trailing_spaces: error(f'Trailing whitespace on line {i} of {path}', True) line = line.rstrip(' ') fixed += line + '\n' + if empty_lines > 0: + error(f'Multiple trailing newlines at end of {path}', True) + fixed = fixed.rstrip('\n') + '\n' if fix_errors: with path.open('w', encoding='utf-8', newline='') as file: file.write(fixed) @@ -154,8 +162,13 @@ def check_file_format(path: pathlib.Path): for path in (repo_dir / 'data' / subdir).iterdir(): if path.suffix == '.json': check_file_format(path) + for path in (repo_dir / 'Notes').iterdir(): + if path.suffix == '.md': + # In Markdown, 2 trailing spaces indicate a hard line break. + check_file_format(path, allow_trailing_spaces=True) check_file_format(repo_dir / 'data' / 'LogicHelpers.json') check_file_format(repo_dir / 'data' / 'presets_default.json') + check_file_format(repo_dir / 'data' / 'settings_mapping.json') def run_ci_checks() -> NoReturn: diff --git a/Dungeon.py b/Dungeon.py index d8deb0a12..0ab2ec42c 100644 --- a/Dungeon.py +++ b/Dungeon.py @@ -104,7 +104,4 @@ def get_unrestricted_dungeon_items(self) -> Iterator[Item]: yield from self.silver_rupees def __str__(self) -> str: - return str(self.__unicode__()) - - def __unicode__(self) -> str: - return '%s' % self.name + return self.name diff --git a/Entrance.py b/Entrance.py index c27077bac..e2a765c27 100644 --- a/Entrance.py +++ b/Entrance.py @@ -96,7 +96,4 @@ def assume_reachable(self) -> Entrance: return self.assumed def __str__(self) -> str: - return str(self.__unicode__()) - - def __unicode__(self) -> str: - return '%s' % self.name + return self.name diff --git a/EntranceShuffle.py b/EntranceShuffle.py index ce2262ca5..e0a85ee7a 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -980,8 +980,8 @@ def validate_world(world: World, worlds: list[World], entrance_placed: Optional[ # Note this creates new empty states rather than reuse the worlds' states (which already have starting items) no_items_search = Search([State(w) for w in worlds]) - valid_starting_regions = ['Kokiri Forest', 'Kakariko Village'] - if not any(region for region in valid_starting_regions if no_items_search.can_reach(world.get_region(region))): + valid_starting_regions = ('Kokiri Forest', 'Kakariko Village') + if not any(no_items_search.can_reach(world.get_region(region)) for region in valid_starting_regions): raise EntranceShuffleError('Invalid starting area') # Check that a region where time passes is always reachable as both ages without having collected any items @@ -1071,9 +1071,11 @@ def get_entrance_replacing(region: Region, entrance_name: str) -> Optional[Entra return original_entrance try: - return next(filter(lambda entrance: entrance.replaces and entrance.replaces.name == entrance_name and \ - entrance.parent_region and entrance.parent_region.name != 'Root Exits' and \ - entrance.type not in ('OverworldOneWay', 'OwlDrop', 'Spawn', 'WarpSong', 'BlueWarp'), region.entrances)) + return next(filter(lambda entrance: + entrance.replaces and entrance.replaces.name == entrance_name + and entrance.parent_region and entrance.parent_region.name != 'Root Exits' + and entrance.type not in ('OverworldOneWay', 'OwlDrop', 'Spawn', 'WarpSong', 'BlueWarp'), + region.entrances)) except StopIteration: return None diff --git a/Fill.py b/Fill.py index f4946be5e..ff1229c9c 100644 --- a/Fill.py +++ b/Fill.py @@ -377,7 +377,7 @@ def fill_ownworld_restrictive(worlds: list[World], search: Search, locations: li continue break else: - raise FillError('Unable to place %s items in world %d' % (description, (world.id+1))) + raise FillError(f'Unable to place {description} items in world {world.id + 1}') # Places items in the itempool into locations. @@ -490,7 +490,7 @@ def fill_restrictive(worlds: list[World], base_search: Search, locations: list[L continue else: # we expect all items to be placed - raise FillError('Game unbeatable: No more spots to place %s [World %d] from %d locations (%d total); %d other items left to place, plus %d skipped' % (item_to_place, item_to_place.world.id + 1, len(l2cations), len(locations), len(itempool), len(unplaced_items))) + raise FillError(f'Game unbeatable: No more spots to place {item_to_place} [World {item_to_place.world.id + 1}] from {len(l2cations)} locations ({len(locations)} total); {len(itempool)} other items left to place, plus {len(unplaced_items)} skipped') # Place the item in the world and continue spot_to_fill.world.push_item(spot_to_fill, item_to_place) @@ -501,9 +501,9 @@ def fill_restrictive(worlds: list[World], base_search: Search, locations: list[L # assert that the specified number of items were placed if count > 0: - raise FillError('Could not place the specified number of item. %d remaining to be placed.' % count) + raise FillError(f'Could not place the specified number of item. {count} remaining to be placed.') if count < 0 < len(itempool): - raise FillError('Could not place all the items. %d remaining to be placed.' % len(itempool)) + raise FillError(f'Could not place all the items. {len(itempool)} remaining to be placed.') # re-add unplaced items that were skipped itempool.extend(unplaced_items) diff --git a/GUI/electron/src/preload.ts b/GUI/electron/src/preload.ts index 35a443071..0f74bd5a9 100644 --- a/GUI/electron/src/preload.ts +++ b/GUI/electron/src/preload.ts @@ -65,9 +65,9 @@ function displayPythonErrorAndExit(notPython3: boolean = false) { setTimeout(() => { if (notPython3) - alert("The Python version used to run the GUI is not supported! Please ensure you have Python 3.6 or higher installed. You can specify the path to python using the 'python ' command line switch!"); + alert("The Python version used to run the GUI is not supported! Please ensure you have Python 3.8 or higher installed. You can specify the path to python using the 'python ' command line switch!"); else - alert("Please ensure you have Python 3.6 or higher installed before running the GUI. You can specify the path to python using the 'python ' command line switch!"); + alert("Please ensure you have Python 3.8 or higher installed before running the GUI. You can specify the path to python using the 'python ' command line switch!"); remote.app.quit(); }, 500); diff --git a/Goals.py b/Goals.py index 1e42605c6..97e81a378 100644 --- a/Goals.py +++ b/Goals.py @@ -31,7 +31,7 @@ 'Light Blue', 'Pink', 'Yellow', - 'Black' + 'Black', ] diff --git a/HintList.py b/HintList.py index 25b5c58e3..4ec8cd472 100644 --- a/HintList.py +++ b/HintList.py @@ -224,7 +224,7 @@ def tokens_required_by_settings(world: World) -> int: 'Kak 40 Gold Skulltula Reward': lambda world: tokens_required_by_settings(world) < 40 and '40_skulltulas' not in world.settings.misc_hints, 'Kak 50 Gold Skulltula Reward': lambda world: tokens_required_by_settings(world) < 50 and '50_skulltulas' not in world.settings.misc_hints, 'ZR Frogs Ocarina Game': lambda world: 'frogs2' not in world.settings.misc_hints, - 'LH Loach Fishing': lambda world: world.settings.shuffle_loach_reward=='vanilla', + 'LH Loach Fishing': lambda world: world.settings.shuffle_loach_reward == 'vanilla', } # Entrance hints required under certain settings @@ -253,17 +253,17 @@ def tokens_required_by_settings(world: World) -> int: 'ZD King Zora Thawed': lambda world: not world.settings.adult_trade_shuffle or 'Eyeball Frog' not in world.settings.adult_trade_start, # Conditional dual hints - 'GV Pieces of Heart Ledges': lambda world: not world.settings.shuffle_cows and world.settings.tokensanity not in ['overworld', 'all'], + 'GV Pieces of Heart Ledges': lambda world: not world.settings.shuffle_cows and world.settings.tokensanity not in ('overworld', 'all'), 'LH Adult Bean Destination Checks': lambda world: world.settings.shuffle_interior_entrances == 'off', 'Castle Fairy Checks': lambda world: world.settings.shuffle_interior_entrances == 'off', 'King Zora Items': lambda world: world.settings.adult_trade_shuffle and 'Eyeball Frog' in world.settings.adult_trade_start, - 'Fire Temple Lower Loop': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], - 'Water Temple River Loop Chests': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], - 'Water Temple MQ Lower Checks': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], - 'Spirit Temple Child Lower': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], - 'Spirit Temple Adult Lower': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], - 'Shadow Temple Invisible Blades Chests': lambda world: world.settings.tokensanity not in ['dungeons', 'all'], + 'Fire Temple Lower Loop': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), + 'Water Temple River Loop Chests': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), + 'Water Temple MQ Lower Checks': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), + 'Spirit Temple Child Lower': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), + 'Spirit Temple Adult Lower': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), + 'Shadow Temple Invisible Blades Chests': lambda world: world.settings.tokensanity not in ('dungeons', 'all'), # Conditional entrance hints 'Ganons Castle Grounds -> Ganons Castle Lobby': lambda world: (world.settings.bridge != 'open' diff --git a/Hints.py b/Hints.py index cbc7aa0ea..03e140e32 100644 --- a/Hints.py +++ b/Hints.py @@ -1120,7 +1120,7 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: set[str]) for location in world.get_filled_locations(): if (HintArea.at(location).text(world.settings.clearer_hints) not in top_level_locations and (HintArea.at(location).text(world.settings.clearer_hints) + ' Important Check') not in checked - and "pocket" not in HintArea.at(location).text(world.settings.clearer_hints)): + and HintArea.at(location) != HintArea.ROOT): top_level_locations.append(HintArea.at(location).text(world.settings.clearer_hints)) hint_loc = random.choice(top_level_locations) item_count = 0 @@ -1181,28 +1181,10 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: set[str]) 'random': get_random_location_hint, 'junk': get_junk_hint, 'named-item': get_specific_item_hint, - 'important_check': get_important_check_hint + 'important_check': get_important_check_hint, } -hint_dist_keys: set[str] = { - 'trial', - 'always', - 'dual_always', - 'entrance_always', - 'woth', - 'goal', - 'barren', - 'item', - 'song', - 'overworld', - 'dungeon', - 'entrance', - 'sometimes', - 'dual', - 'random', - 'junk', - 'named-item' -} +hint_dist_keys: set[str] = set(hint_func) def build_bingo_hint_list(board_url: str) -> list[str]: diff --git a/Item.py b/Item.py index 3568b4833..494a01025 100644 --- a/Item.py +++ b/Item.py @@ -142,7 +142,7 @@ def unshuffled_dungeon_item(self) -> bool: (self.type == 'BossKey' and self.world.settings.shuffle_bosskeys in ('remove', 'vanilla', 'dungeon')) or (self.type == 'GanonBossKey' and self.world.settings.shuffle_ganon_bosskey in ('remove', 'vanilla', 'dungeon')) or ((self.map or self.compass) and (self.world.settings.shuffle_mapcompass in ('remove', 'startwith', 'vanilla', 'dungeon'))) or - (self.type == 'SilverRupee' and self.world.settings.shuffle_silver_rupees in ['remove','vanilla','dungeon'])) + (self.type == 'SilverRupee' and self.world.settings.shuffle_silver_rupees in ('remove','vanilla','dungeon'))) @property def majoritem(self) -> bool: @@ -164,17 +164,17 @@ def majoritem(self) -> bool: if self.map or self.compass: return False - if self.type == 'SmallKey' and self.world.settings.shuffle_smallkeys in ['dungeon', 'vanilla']: + if self.type == 'SmallKey' and self.world.settings.shuffle_smallkeys in ('dungeon', 'vanilla'): return False if self.type == 'HideoutSmallKey' and self.world.settings.shuffle_hideoutkeys == 'vanilla': return False if self.type == 'TCGSmallKey' and self.world.settings.shuffle_tcgkeys == 'vanilla': return False - if self.type == 'BossKey' and self.world.settings.shuffle_bosskeys in ['dungeon', 'vanilla']: + if self.type == 'BossKey' and self.world.settings.shuffle_bosskeys in ('dungeon', 'vanilla'): return False - if self.type == 'GanonBossKey' and self.world.settings.shuffle_ganon_bosskey in ['dungeon', 'vanilla']: + if self.type == 'GanonBossKey' and self.world.settings.shuffle_ganon_bosskey in ('dungeon', 'vanilla'): return False - if self.type == 'SilverRupee' and self.world.settings.shuffle_silver_rupees in ['dungeon', 'vanilla']: + if self.type == 'SilverRupee' and self.world.settings.shuffle_silver_rupees in ('dungeon', 'vanilla'): return False return True @@ -186,10 +186,7 @@ def goalitem(self) -> bool: return self.name in self.world.goal_items def __str__(self) -> str: - return str(self.__unicode__()) - - def __unicode__(self) -> str: - return '%s' % self.name + return self.name @overload diff --git a/ItemPool.py b/ItemPool.py index 32ff5e3fb..bf1013c3f 100644 --- a/ItemPool.py +++ b/ItemPool.py @@ -200,14 +200,14 @@ 'Ocarina C right Button', ] -ludicrous_exclusions: list[str] = [ +ludicrous_exclusions: tuple[str, ...] = ( 'Triforce Piece', 'Gold Skulltula Token', 'Rutos Letter', 'Heart Container', 'Piece of Heart', - 'Piece of Heart (Treasure Chest Game)' -] + 'Piece of Heart (Treasure Chest Game)', +) item_difficulty_max: dict[str, dict[str, int]] = { 'ludicrous': { @@ -311,7 +311,7 @@ "Mask of Truth", ) -normal_bottles: list[str] = [bottle for bottle in sorted(ItemInfo.bottles) if bottle not in ['Deliver Letter', 'Sell Big Poe']] + ['Bottle with Big Poe'] +normal_bottles: list[str] = [bottle for bottle in sorted(ItemInfo.bottles) if bottle not in ('Deliver Letter', 'Sell Big Poe')] + ['Bottle with Big Poe'] song_list: list[str] = [item.name for item in sorted([i for n, i in ItemInfo.items.items() if i.type == 'Song'], key=lambda x: x.index if x.index is not None else 0)] junk_pool_base: list[tuple[str, int]] = [(item, weight) for (item, weight) in sorted(ItemInfo.junk_weight.items()) if weight > 0] remove_junk_items: list[str] = [item for (item, weight) in sorted(ItemInfo.junk_weight.items()) if weight >= 0] @@ -360,7 +360,7 @@ 'WarpSong': song_list[0:6], 'HealthUpgrade': ('Heart Container', 'Piece of Heart', 'Piece of Heart (Treasure Chest Game)'), 'ProgressItem': sorted([name for name, item in ItemInfo.items.items() if item.type == 'Item' and item.advancement]), - 'MajorItem': sorted([name for name, item in ItemInfo.items.items() if item.type in ['Item', 'Song'] and item.advancement and name not in exclude_from_major]), + 'MajorItem': sorted([name for name, item in ItemInfo.items.items() if item.type in ('Item', 'Song') and item.advancement and name not in exclude_from_major]), 'DungeonReward': [item.name for item in sorted([i for n, i in ItemInfo.items.items() if i.type == 'DungeonReward'], key=lambda x: x.special['item_id'])], 'Map': sorted([name for name, item in ItemInfo.items.items() if item.type == 'Map']), 'Compass': sorted([name for name, item in ItemInfo.items.items() if item.type == 'Compass']), @@ -407,7 +407,7 @@ def generate_itempool(world: World) -> None: junk_pool[:] = list(junk_pool_base) if world.settings.junk_ice_traps == 'on': junk_pool.append(('Ice Trap', 10)) - elif world.settings.junk_ice_traps in ['mayhem', 'onslaught']: + elif world.settings.junk_ice_traps in ('mayhem', 'onslaught'): junk_pool[:] = [('Ice Trap', 1)] # set up item pool @@ -442,7 +442,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if world.settings.zora_fountain == 'open': ruto_bottles = 0 - if world.settings.shopsanity not in ['off', '0']: + if world.settings.shopsanity not in ('off', '0'): pending_junk_pool.append('Progressive Wallet') if world.settings.item_pool_value == 'plentiful': @@ -454,7 +454,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if 'Weird Egg' in world.settings.shuffle_child_trade and 'Chicken' in world.settings.shuffle_child_trade: pending_junk_pool.remove('Chicken') if world.skip_child_zelda: - for item in ['Weird Egg', 'Chicken', 'Zeldas Letter']: + for item in ('Weird Egg', 'Chicken', 'Zeldas Letter'): if item in pending_junk_pool: pending_junk_pool.remove(item) if world.settings.adult_trade_shuffle: @@ -476,32 +476,32 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if world.settings.shuffle_beans and world.distribution.get_starting_item('Magic Bean') < 10: pending_junk_pool.append('Magic Bean Pack') if (world.settings.gerudo_fortress != "open" - and world.settings.shuffle_hideoutkeys in ['any_dungeon', 'overworld', 'keysanity', 'regional']): + and world.settings.shuffle_hideoutkeys in ('any_dungeon', 'overworld', 'keysanity', 'regional')): if 'Thieves Hideout' in world.settings.key_rings and world.settings.gerudo_fortress != "fast": - pending_junk_pool.extend(['Small Key Ring (Thieves Hideout)']) + pending_junk_pool.append('Small Key Ring (Thieves Hideout)') else: pending_junk_pool.append('Small Key (Thieves Hideout)') - if world.settings.shuffle_tcgkeys in ['any_dungeon', 'overworld', 'keysanity', 'regional']: + if world.settings.shuffle_tcgkeys in ('any_dungeon', 'overworld', 'keysanity', 'regional'): if 'Treasure Chest Game' in world.settings.key_rings: - pending_junk_pool.extend(['Small Key Ring (Treasure Chest Game)']) + pending_junk_pool.append('Small Key Ring (Treasure Chest Game)') else: pending_junk_pool.append('Small Key (Treasure Chest Game)') if world.settings.shuffle_gerudo_card: pending_junk_pool.append('Gerudo Membership Card') - if world.settings.shuffle_smallkeys in ['any_dungeon', 'overworld', 'keysanity', 'regional']: - for dungeon in ['Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple', - 'Bottom of the Well', 'Gerudo Training Ground', 'Ganons Castle']: + if world.settings.shuffle_smallkeys in ('any_dungeon', 'overworld', 'keysanity', 'regional'): + for dungeon in ('Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple', + 'Bottom of the Well', 'Gerudo Training Ground', 'Ganons Castle'): if dungeon in world.settings.key_rings: pending_junk_pool.append(f"Small Key Ring ({dungeon})") else: pending_junk_pool.append(f"Small Key ({dungeon})") - if world.settings.shuffle_bosskeys in ['any_dungeon', 'overworld', 'keysanity', 'regional']: - for dungeon in ['Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple']: + if world.settings.shuffle_bosskeys in ('any_dungeon', 'overworld', 'keysanity', 'regional'): + for dungeon in ('Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple'): if not world.settings.keyring_give_bk or dungeon not in world.settings.key_rings or world.settings.shuffle_smallkeys == 'vanilla': pending_junk_pool.append(f"Boss Key ({dungeon})") - if world.settings.shuffle_ganon_bosskey in ['any_dungeon', 'overworld', 'keysanity', 'regional']: + if world.settings.shuffle_ganon_bosskey in ('any_dungeon', 'overworld', 'keysanity', 'regional'): pending_junk_pool.append('Boss Key (Ganons Castle)') - if world.settings.shuffle_silver_rupees in ['any_dungeon', 'overworld', 'anywhere', 'regional']: + if world.settings.shuffle_silver_rupees in ('any_dungeon', 'overworld', 'anywhere', 'regional'): for puzzle in world.silver_rupee_puzzles(): if puzzle in world.settings.silver_rupee_pouches: pending_junk_pool.append(f"Silver Rupee Pouch ({puzzle})") @@ -534,8 +534,8 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: shuffle_item = None # None for don't handle, False for place item, True for add to pool. # Always Placed Items - if (location.vanilla_item in ['Triforce', 'Scarecrow Song', - 'Deliver Letter', 'Time Travel', 'Bombchu Drop'] + if (location.vanilla_item in ('Triforce', 'Scarecrow Song', + 'Deliver Letter', 'Time Travel', 'Bombchu Drop') or location.type == 'Drop'): shuffle_item = False @@ -553,8 +553,8 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: remain_shop_items.append(item) # Business Scrubs - elif location.type in ["Scrub", "GrottoScrub"]: - if location.vanilla_item in ['Piece of Heart', 'Deku Stick Capacity', 'Deku Nut Capacity']: + elif location.type in ("Scrub", "GrottoScrub"): + if location.vanilla_item in ('Piece of Heart', 'Deku Stick Capacity', 'Deku Nut Capacity'): shuffle_item = True elif world.settings.shuffle_scrubs == 'off': shuffle_item = False @@ -583,11 +583,11 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: shuffle_item = world.settings.shuffle_expensive_merchants # Bombchu Bowling 3rd and 4th prizes (must be checked before Bombchu vanilla items!) - elif location.name in ['Market Bombchu Bowling Bombchus', 'Market Bombchu Bowling Bomb']: + elif location.name in ('Market Bombchu Bowling Bombchus', 'Market Bombchu Bowling Bomb'): shuffle_item = False # Bombchus - elif location.vanilla_item in ['Bombchus', 'Bombchus (5)', 'Bombchus (10)', 'Bombchus (20)']: + elif location.vanilla_item in ('Bombchus', 'Bombchus (5)', 'Bombchus (10)', 'Bombchus (20)'): shuffle_item = location.name != 'Wasteland Bombchu Salesman' or world.settings.shuffle_expensive_merchants # Blue Potion from Granny's Potion Shop @@ -617,7 +617,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: world.state.collect(ItemFactory(item)) # Bottles - elif location.vanilla_item in ['Bottle', 'Bottle with Milk', 'Rutos Letter']: + elif location.vanilla_item in ('Bottle', 'Bottle with Milk', 'Rutos Letter'): if ruto_bottles: item = 'Rutos Letter' ruto_bottles -= 1 @@ -693,7 +693,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: # Treasure Chest Game Key Shuffle elif location.vanilla_item != 'Piece of Heart (Treasure Chest Game)' and location.scene == 0x10: - if world.settings.shuffle_tcgkeys in ['regional', 'overworld', 'any_dungeon', 'keysanity']: + if world.settings.shuffle_tcgkeys in ('regional', 'overworld', 'any_dungeon', 'keysanity'): if 'Treasure Chest Game' in world.settings.key_rings and location.vanilla_item == 'Small Key (Treasure Chest Game)': item = get_junk_item()[0] if location.name != 'Market Treasure Chest Game Salesman' else 'Small Key Ring (Treasure Chest Game)' shuffle_item = True @@ -707,7 +707,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: location.disabled = DisableType.DISABLED # Freestanding Rupees and Hearts - elif location.type in ['ActorOverride', 'Freestanding', 'RupeeTower']: + elif location.type in ('ActorOverride', 'Freestanding', 'RupeeTower'): if world.settings.shuffle_freestanding_items == 'all': shuffle_item = True elif world.settings.shuffle_freestanding_items == 'dungeons' and location.dungeon is not None: @@ -719,7 +719,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: location.disabled = DisableType.DISABLED # Pots - elif location.type in ['Pot', 'FlyingPot']: + elif location.type in ('Pot', 'FlyingPot'): if world.settings.shuffle_pots == 'all': shuffle_item = True elif world.settings.shuffle_pots == 'dungeons' and (location.dungeon is not None or (location.parent_region is not None and location.parent_region.is_boss_room)): @@ -731,7 +731,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: location.disabled = DisableType.DISABLED # Crates - elif location.type in ['Crate', 'SmallCrate']: + elif location.type in ('Crate', 'SmallCrate'): if world.settings.shuffle_crates == 'all': shuffle_item = True elif world.settings.shuffle_crates == 'dungeons' and location.dungeon is not None: @@ -760,7 +760,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if location.vanilla_item == dungeon.item_name("Boss Key"): if (world.settings.shuffle_smallkeys != 'vanilla' and dungeon.name in world.settings.key_rings and world.settings.keyring_give_bk - and dungeon.name in ['Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple']): + and dungeon.name in ('Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple')): item = get_junk_item()[0] shuffle_item = True else: @@ -769,7 +769,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if shuffle_setting == 'vanilla': shuffle_item = False # Map or Compass - elif location.vanilla_item in [dungeon.item_name("Map"), dungeon.item_name("Compass")]: + elif location.vanilla_item in (dungeon.item_name("Map"), dungeon.item_name("Compass")): shuffle_setting = world.settings.shuffle_mapcompass dungeon_collection = dungeon.dungeon_items if shuffle_setting == 'vanilla': @@ -798,22 +798,22 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: item = get_junk_item()[0] shuffle_item = True # Any other item in a dungeon. - elif location.type in ["Chest", "NPC", "Song", "Collectable", "Cutscene", "BossHeart"]: + elif location.type in ("Chest", "NPC", "Song", "Collectable", "Cutscene", "BossHeart"): shuffle_item = True # Handle dungeon item. if shuffle_setting is not None and dungeon_collection is not None and not shuffle_item: - if shuffle_setting in ['remove', 'startwith']: + if shuffle_setting in ('remove', 'startwith'): world.state.collect(ItemFactory(item, world)) item = get_junk_item()[0] shuffle_item = True - elif shuffle_setting in ['any_dungeon', 'overworld', 'keysanity', 'regional', 'anywhere'] and not world.empty_dungeons[dungeon.name].empty: + elif shuffle_setting in ('any_dungeon', 'overworld', 'keysanity', 'regional', 'anywhere') and not world.empty_dungeons[dungeon.name].empty: shuffle_item = True elif shuffle_item is None: dungeon_collection.append(ItemFactory(item, world)) # The rest of the overworld items. - elif location.type in ["Chest", "NPC", "Song", "Collectable", "Cutscene", "BossHeart"]: + elif location.type in ("Chest", "NPC", "Song", "Collectable", "Cutscene", "BossHeart"): shuffle_item = True # Now, handle the item as necessary. @@ -838,7 +838,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: pool.extend(get_junk_item(shop_non_item_count)) # Extra rupees for shopsanity. - if world.settings.shopsanity not in ['off', '0']: + if world.settings.shopsanity not in ('off', '0'): for rupee in shopsanity_rupees: if 'Rupees (5)' in pool: pool[pool.index('Rupees (5)')] = rupee @@ -873,7 +873,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]: if world.settings.shuffle_ganon_bosskey == 'on_lacs': placed_items['ToT Light Arrows Cutscene'] = ItemFactory('Boss Key (Ganons Castle)', world) - if world.settings.shuffle_ganon_bosskey in ['stones', 'medallions', 'dungeons', 'tokens', 'hearts', 'triforce']: + if world.settings.shuffle_ganon_bosskey in ('stones', 'medallions', 'dungeons', 'tokens', 'hearts', 'triforce'): placed_items['Gift from Sages'] = ItemFactory('Boss Key (Ganons Castle)', world) pool.extend(get_junk_item()) else: diff --git a/Location.py b/Location.py index fdf8cbfb5..30547e29e 100644 --- a/Location.py +++ b/Location.py @@ -147,10 +147,7 @@ def maybe_set_misc_hints(self) -> None: logging.getLogger('').debug(f'{the_location} [{self.world.id}] set to [{self.item.name}]') def __str__(self) -> str: - return str(self.__unicode__()) - - def __unicode__(self) -> str: - return '%s' % self.name + return self.name @overload diff --git a/LocationList.py b/LocationList.py index 60943b3dc..2f3c2c892 100644 --- a/LocationList.py +++ b/LocationList.py @@ -960,11 +960,11 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Dodongos Cavern MQ After Upper Lizalfos Crate 1", ("Crate", 0x1, (12,0,11), None, 'Rupee (1)', ("Dodongo's Cavern MQ", "Master Quest", "Crates",))), ("Dodongos Cavern MQ After Upper Lizalfos Crate 2", ("Crate", 0x1, (12,0,12), None, 'Rupee (1)', ("Dodongo's Cavern MQ", "Master Quest", "Crates",))), # Dodongo's Cavern MQ Silver Rupees - ("Dodongos Cavern MQ Staircase Silver Rupee Beamos", ("SilverRupee", 0x1, (2,0,11), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees"))), - ("Dodongos Cavern MQ Staircase Silver Rupee Lower Crate", ("SilverRupee", 0x1, (2,0,12), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees"))), - ("Dodongos Cavern MQ Staircase Silver Rupee Mid Left Crate", ("SilverRupee", 0x1, (2,0,13), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees"))), - ("Dodongos Cavern MQ Staircase Silver Rupee Vines", ("SilverRupee", 0x1, (2,0,14), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees"))), - ("Dodongos Cavern MQ Staircase Silver Rupee Top Right Crate", ("SilverRupee", 0x1, (2,0,15), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees"))), + ("Dodongos Cavern MQ Staircase Silver Rupee Beamos", ("SilverRupee", 0x1, (2,0,11), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees",))), + ("Dodongos Cavern MQ Staircase Silver Rupee Lower Crate", ("SilverRupee", 0x1, (2,0,12), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees",))), + ("Dodongos Cavern MQ Staircase Silver Rupee Mid Left Crate", ("SilverRupee", 0x1, (2,0,13), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees",))), + ("Dodongos Cavern MQ Staircase Silver Rupee Vines", ("SilverRupee", 0x1, (2,0,14), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees",))), + ("Dodongos Cavern MQ Staircase Silver Rupee Top Right Crate", ("SilverRupee", 0x1, (2,0,15), None, 'Silver Rupee (Dodongos Cavern Staircase)', ("Dodongo's Cavern MQ", "Master Quest", "Silver Rupees",))), # Dodongo's Cavern Shared ("Dodongos Cavern Lower Lizalfos Hidden Recovery Heart", ("Freestanding", 0x01, (3,0,6), None, 'Recovery Heart', ("Dodongo's Cavern", "Dodongo's Cavern MQ", "Vanilla Dungeons", "Master Quest", "Freestandings",))), @@ -1086,11 +1086,11 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Bottom of the Well West Inner Room Flying Pot 2", ("FlyingPot", 0x08, (6,0,4), None, 'Recovery Heart', ("Bottom of the Well", "Vanilla Dungeons", "Flying Pots",))), ("Bottom of the Well West Inner Room Flying Pot 3", ("FlyingPot", 0x08, (6,0,5), None, 'Recovery Heart', ("Bottom of the Well", "Vanilla Dungeons", "Flying Pots",))), # Bottom of the Well Silver Rupees - ("Bottom of the Well Basement Silver Rupee Wood Beam Front", ("SilverRupee", 0x08, (1,0,43), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees"))), - ("Bottom of the Well Basement Silver Rupee Wood Beam Back", ("SilverRupee", 0x08, (1,0,42), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees"))), - ("Bottom of the Well Basement Silver Rupee Ladders Bottom", ("SilverRupee", 0x08, (1,0,41), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees"))), - ("Bottom of the Well Basement Silver Rupee Ladders Middle", ("SilverRupee", 0x08, (1,0,40), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees"))), - ("Bottom of the Well Basement Silver Rupee Ladders Top", ("SilverRupee", 0x08, (1,0,39), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees"))), + ("Bottom of the Well Basement Silver Rupee Wood Beam Front", ("SilverRupee", 0x08, (1,0,43), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees",))), + ("Bottom of the Well Basement Silver Rupee Wood Beam Back", ("SilverRupee", 0x08, (1,0,42), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees",))), + ("Bottom of the Well Basement Silver Rupee Ladders Bottom", ("SilverRupee", 0x08, (1,0,41), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees",))), + ("Bottom of the Well Basement Silver Rupee Ladders Middle", ("SilverRupee", 0x08, (1,0,40), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees",))), + ("Bottom of the Well Basement Silver Rupee Ladders Top", ("SilverRupee", 0x08, (1,0,39), None, 'Silver Rupee (Bottom of the Well Basement)', ("Bottom of the Well", "Vanilla Dungeons", "Silver Rupees",))), # Bottom of the Well MQ ("Bottom of the Well MQ Map Chest", ("Chest", 0x08, 0x03, None, 'Map (Bottom of the Well)', ("Bottom of the Well MQ", "Master Quest", "Chests",))), @@ -1592,21 +1592,21 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Shadow Temple Near Boss Pot 1", ("Pot", 0x07, (21,0,19), None, 'Arrows (30)', ("Shadow Temple", "Vanilla Dungeons", "Pots",))), ("Shadow Temple Near Boss Pot 2", ("Pot", 0x07, (21,0,20), None, 'Rupees (5)', ("Shadow Temple", "Vanilla Dungeons", "Pots",))), # Shadow Temple Silver Rupees - ("Shadow Temple Scythe Shortcut Silver Rupee Center Left", ("SilverRupee", 0x07, (6,0,1), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Scythe Shortcut Silver Rupee Center Right", ("SilverRupee", 0x07, (6,0,5), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Scythe Shortcut Silver Rupee Left Alcove", ("SilverRupee", 0x07, (6,0,4), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Scythe Shortcut Silver Rupee Back Alcove", ("SilverRupee", 0x07, (6,0,3), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Scythe Shortcut Silver Rupee Ledge", ("SilverRupee", 0x07, (6,0,2), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Huge Pit Silver Rupee Left", ("SilverRupee", 0x07, (9,0,8), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Huge Pit Silver Rupee Center Front", ("SilverRupee", 0x07, (9,0,10), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Huge Pit Silver Rupee Center", ("SilverRupee", 0x07, (9,0,9), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Huge Pit Silver Rupee Center Back", ("SilverRupee", 0x07, (9,0,11), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Huge Pit Silver Rupee Right", ("SilverRupee", 0x07, (9,0,7), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Invisible Spikes Silver Rupee Right", ("SilverRupee", 0x07, (11,0,4), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Invisible Spikes Silver Rupee Center", ("SilverRupee", 0x07, (11,0,5), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Invisible Spikes Silver Rupee Left", ("SilverRupee", 0x07, (11,0,6), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Invisible Spikes Silver Rupee Ledge", ("SilverRupee", 0x07, (11,0,3), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Shadow Temple Invisible Spikes Silver Rupee Near Ledge", ("SilverRupee", 0x07, (11,0,7), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees"))), + ("Shadow Temple Scythe Shortcut Silver Rupee Center Left", ("SilverRupee", 0x07, (6,0,1), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Scythe Shortcut Silver Rupee Center Right", ("SilverRupee", 0x07, (6,0,5), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Scythe Shortcut Silver Rupee Left Alcove", ("SilverRupee", 0x07, (6,0,4), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Scythe Shortcut Silver Rupee Back Alcove", ("SilverRupee", 0x07, (6,0,3), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Scythe Shortcut Silver Rupee Ledge", ("SilverRupee", 0x07, (6,0,2), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Huge Pit Silver Rupee Left", ("SilverRupee", 0x07, (9,0,8), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Huge Pit Silver Rupee Center Front", ("SilverRupee", 0x07, (9,0,10), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Huge Pit Silver Rupee Center", ("SilverRupee", 0x07, (9,0,9), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Huge Pit Silver Rupee Center Back", ("SilverRupee", 0x07, (9,0,11), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Huge Pit Silver Rupee Right", ("SilverRupee", 0x07, (9,0,7), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Invisible Spikes Silver Rupee Right", ("SilverRupee", 0x07, (11,0,4), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Invisible Spikes Silver Rupee Center", ("SilverRupee", 0x07, (11,0,5), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Invisible Spikes Silver Rupee Left", ("SilverRupee", 0x07, (11,0,6), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Invisible Spikes Silver Rupee Ledge", ("SilverRupee", 0x07, (11,0,3), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Shadow Temple Invisible Spikes Silver Rupee Near Ledge", ("SilverRupee", 0x07, (11,0,7), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple", "Vanilla Dungeons", "Silver Rupees",))), # Shadow Temple MQ ("Shadow Temple MQ Early Gibdos Chest", ("Chest", 0x07, 0x03, None, 'Small Key (Shadow Temple)', ("Shadow Temple MQ", "Master Quest", "Chests",))), @@ -1680,36 +1680,36 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Shadow Temple MQ Truth Spinner Small Wooden Crate 3", ("SmallCrate", 0x07, (2,0,18), None, 'Bombs (5)', ("Shadow Temple MQ", "Master Quest", "Small Crates",))), ("Shadow Temple MQ Truth Spinner Small Wooden Crate 4", ("SmallCrate", 0x07, (2,0,19), None, 'Recovery Heart', ("Shadow Temple MQ", "Master Quest", "Small Crates",))), # Shadow Temple MQ Silver Rupees - ("Shadow Temple MQ Scythe Shortcut Silver Rupee Center Left", ("SilverRupee", 0x07, (6,0,7), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Scythe Shortcut Silver Rupee Center Right", ("SilverRupee", 0x07, (6,0,8), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Scythe Shortcut Silver Rupee Ledge", ("SilverRupee", 0x07, (6,0,6), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Scythe Shortcut Silver Rupee Left Alcove", ("SilverRupee", 0x07, (6,0,5), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Scythe Shortcut Silver Rupee Back Alcove", ("SilverRupee", 0x07, (6,0,9), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 1", ("SilverRupee", 0x07, (16,0,9), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 2", ("SilverRupee", 0x07, (16,0,10), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 3", ("SilverRupee", 0x07, (16,0,11), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 4", ("SilverRupee", 0x07, (16,0,12), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 5", ("SilverRupee", 0x07, (16,0,13), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee 6", ("SilverRupee", 0x07, (16,0,14), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee Back Right", ("SilverRupee", 0x07, (16,0,15), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee Back Left", ("SilverRupee", 0x07, (16,0,16), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee Like Like", ("SilverRupee", 0x07, (16,0,17), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Blades Silver Rupee Song of Time Block",("SilverRupee",0x07,(16,0,18),None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Huge Pit Silver Rupee Center Front", ("SilverRupee", 0x07, (9,0,18), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Huge Pit Silver Rupee Center Back", ("SilverRupee", 0x07, (9,0,14), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Huge Pit Silver Rupee Right", ("SilverRupee", 0x07, (9,0,17), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Huge Pit Silver Rupee Ceiling Upper", ("SilverRupee", 0x07, (9,0,16), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Huge Pit Silver Rupee Ceiling Lower", ("SilverRupee", 0x07, (9,0,15), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Center Front", ("SilverRupee", 0x07, (11,0,15), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Center Right", ("SilverRupee", 0x07, (11,0,18), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Left Hookshot Target",("SilverRupee",0x07,(11,0,12),None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Right Hookshot Target",("SilverRupee",0x07,(11,0,20),None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Back Right", ("SilverRupee", 0x07, (11,0,19), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Ledge", ("SilverRupee", 0x07, (11,0,11), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Near Ledge", ("SilverRupee", 0x07, (11,0,13), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Front", ("SilverRupee", 0x07, (11,0,17), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Middle",("SilverRupee", 0x07, (11,0,16), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), - ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Back", ("SilverRupee", 0x07, (11,0,14), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees"))), + ("Shadow Temple MQ Scythe Shortcut Silver Rupee Center Left", ("SilverRupee", 0x07, (6,0,7), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Scythe Shortcut Silver Rupee Center Right", ("SilverRupee", 0x07, (6,0,8), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Scythe Shortcut Silver Rupee Ledge", ("SilverRupee", 0x07, (6,0,6), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Scythe Shortcut Silver Rupee Left Alcove", ("SilverRupee", 0x07, (6,0,5), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Scythe Shortcut Silver Rupee Back Alcove", ("SilverRupee", 0x07, (6,0,9), None, 'Silver Rupee (Shadow Temple Scythe Shortcut)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 1", ("SilverRupee", 0x07, (16,0,9), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 2", ("SilverRupee", 0x07, (16,0,10), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 3", ("SilverRupee", 0x07, (16,0,11), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 4", ("SilverRupee", 0x07, (16,0,12), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 5", ("SilverRupee", 0x07, (16,0,13), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee 6", ("SilverRupee", 0x07, (16,0,14), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee Back Right", ("SilverRupee", 0x07, (16,0,15), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee Back Left", ("SilverRupee", 0x07, (16,0,16), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee Like Like", ("SilverRupee", 0x07, (16,0,17), None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Blades Silver Rupee Song of Time Block",("SilverRupee",0x07,(16,0,18),None, 'Silver Rupee (Shadow Temple Invisible Blades)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Huge Pit Silver Rupee Center Front", ("SilverRupee", 0x07, (9,0,18), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Huge Pit Silver Rupee Center Back", ("SilverRupee", 0x07, (9,0,14), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Huge Pit Silver Rupee Right", ("SilverRupee", 0x07, (9,0,17), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Huge Pit Silver Rupee Ceiling Upper", ("SilverRupee", 0x07, (9,0,16), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Huge Pit Silver Rupee Ceiling Lower", ("SilverRupee", 0x07, (9,0,15), None, 'Silver Rupee (Shadow Temple Huge Pit)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Center Front", ("SilverRupee", 0x07, (11,0,15), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Center Right", ("SilverRupee", 0x07, (11,0,18), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Left Hookshot Target",("SilverRupee",0x07,(11,0,12),None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Right Hookshot Target",("SilverRupee",0x07,(11,0,20),None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Back Right", ("SilverRupee", 0x07, (11,0,19), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Ledge", ("SilverRupee", 0x07, (11,0,11), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Near Ledge", ("SilverRupee", 0x07, (11,0,13), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Front", ("SilverRupee", 0x07, (11,0,17), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Middle",("SilverRupee", 0x07, (11,0,16), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), + ("Shadow Temple MQ Invisible Spikes Silver Rupee Ceiling Back", ("SilverRupee", 0x07, (11,0,14), None, 'Silver Rupee (Shadow Temple Invisible Spikes)', ("Shadow Temple MQ", "Master Quest", "Silver Rupees",))), # Shadow Temple Shared ("Shadow Temple Bongo Bongo Heart", ("BossHeart", 0x18, 0x4F, None, 'Heart Container', ("Shadow Temple", "Shadow Temple MQ", "Vanilla Dungeons", "Master Quest",))), @@ -1808,32 +1808,32 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Spirit Temple Big Mirror Flying Pot 5", ("FlyingPot", 0x06, (25,0,9), None, 'Recovery Heart', ("Spirit Temple", "Vanilla Dungeons", "Flying Pots",))), ("Spirit Temple Big Mirror Flying Pot 6", ("FlyingPot", 0x06, (25,0,10), None, 'Recovery Heart', ("Spirit Temple", "Vanilla Dungeons", "Flying Pots",))), #Spirit Temple Vanilla Silver Rupees - ("Spirit Temple Adult Boulder Silver Rupee Ledge", ("SilverRupee", 0x06, (13,0,11), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Adult Boulder Silver Rupee Front Left", ("SilverRupee", 0x06, (13,0,8), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Adult Boulder Silver Rupee Front Right", ("SilverRupee", 0x06, (13,0,9), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Adult Boulder Silver Rupee Back Right", ("SilverRupee", 0x06, (13,0,10), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Adult Boulder Silver Rupee Back Left", ("SilverRupee", 0x06, (13,0,7), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Sun Block Room Silver Rupee Left", ("SilverRupee", 0x06, (8,0,16), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Sun Block Room Silver Rupee Center Front", ("SilverRupee", 0x06, (8,0,15), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Sun Block Room Silver Rupee Center Back", ("SilverRupee", 0x06, (8,0,14), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Sun Block Room Silver Rupee Right Front", ("SilverRupee", 0x06, (8,0,17), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Sun Block Room Silver Rupee Right Back", ("SilverRupee", 0x06, (8,0,13), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Child Early Torches Silver Rupee Top Right", ("SilverRupee", 0x06, (2,0,13), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Child Early Torches Silver Rupee Bottom Right", ("SilverRupee", 0x06, (2,0,14), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Child Early Torches Silver Rupee Bottom Left", ("SilverRupee", 0x06, (2,0,15), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Child Early Torches Silver Rupee Top Left", ("SilverRupee", 0x06, (2,0,16), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), - ("Spirit Temple Child Early Torches Silver Rupee Near Torch", ("SilverRupee", 0x06, (2,0,17), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees"))), + ("Spirit Temple Adult Boulder Silver Rupee Ledge", ("SilverRupee", 0x06, (13,0,11), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Adult Boulder Silver Rupee Front Left", ("SilverRupee", 0x06, (13,0,8), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Adult Boulder Silver Rupee Front Right", ("SilverRupee", 0x06, (13,0,9), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Adult Boulder Silver Rupee Back Right", ("SilverRupee", 0x06, (13,0,10), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Adult Boulder Silver Rupee Back Left", ("SilverRupee", 0x06, (13,0,7), None, 'Silver Rupee (Spirit Temple Adult Boulders)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Sun Block Room Silver Rupee Left", ("SilverRupee", 0x06, (8,0,16), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Sun Block Room Silver Rupee Center Front", ("SilverRupee", 0x06, (8,0,15), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Sun Block Room Silver Rupee Center Back", ("SilverRupee", 0x06, (8,0,14), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Sun Block Room Silver Rupee Right Front", ("SilverRupee", 0x06, (8,0,17), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Sun Block Room Silver Rupee Right Back", ("SilverRupee", 0x06, (8,0,13), None, 'Silver Rupee (Spirit Temple Sun Block)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Child Early Torches Silver Rupee Top Right", ("SilverRupee", 0x06, (2,0,13), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Child Early Torches Silver Rupee Bottom Right", ("SilverRupee", 0x06, (2,0,14), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Child Early Torches Silver Rupee Bottom Left", ("SilverRupee", 0x06, (2,0,15), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Child Early Torches Silver Rupee Top Left", ("SilverRupee", 0x06, (2,0,16), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), + ("Spirit Temple Child Early Torches Silver Rupee Near Torch", ("SilverRupee", 0x06, (2,0,17), None, 'Silver Rupee (Spirit Temple Child Early Torches)', ("Spirit Temple", "Vanilla Dungeons", "Silver Rupees",))), # Spirit Temple MQ Silver Rupees - ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Left Boulder",("SilverRupee",0x06,(0,0,12), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Right Boulder",("SilverRupee",0x06,(0,0,11),None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Water Jet",("SilverRupee", 0x06, (0,0,14), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Behind Water Jet",("SilverRupee",0x06,(0,0,10),None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Near Door",("SilverRupee", 0x06, (0,0,13), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Adult Climb Silver Rupee 1", ("SilverRupee", 0x06, (23,0,11), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Adult Climb Silver Rupee 2", ("SilverRupee", 0x06, (23,0,12), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Adult Climb Silver Rupee 3", ("SilverRupee", 0x06, (23,0,15), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Adult Climb Silver Rupee 4", ("SilverRupee", 0x06, (23,0,13), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), - ("Spirit Temple MQ Adult Climb Silver Rupee 5", ("SilverRupee", 0x06, (23,0,14), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees"))), + ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Left Boulder",("SilverRupee",0x06,(0,0,12), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Right Boulder",("SilverRupee",0x06,(0,0,11),None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Water Jet",("SilverRupee", 0x06, (0,0,14), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Behind Water Jet",("SilverRupee",0x06,(0,0,10),None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Lobby and Lower Adult Silver Rupee Near Door",("SilverRupee", 0x06, (0,0,13), None, 'Silver Rupee (Spirit Temple Lobby and Lower Adult)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Adult Climb Silver Rupee 1", ("SilverRupee", 0x06, (23,0,11), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Adult Climb Silver Rupee 2", ("SilverRupee", 0x06, (23,0,12), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Adult Climb Silver Rupee 3", ("SilverRupee", 0x06, (23,0,15), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Adult Climb Silver Rupee 4", ("SilverRupee", 0x06, (23,0,13), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), + ("Spirit Temple MQ Adult Climb Silver Rupee 5", ("SilverRupee", 0x06, (23,0,14), None, 'Silver Rupee (Spirit Temple Adult Climb)', ("Spirit Temple MQ", "Master Quest", "Silver Rupees",))), # Spirit Temple MQ Pots ("Spirit Temple MQ Lobby Pot 1", ("Pot", 0x06, (0,0,18), None, 'Bombs (5)', ("Spirit Temple MQ", "Master Quest", "Pots",))), ("Spirit Temple MQ Lobby Pot 2", ("Pot", 0x06, (0,0,19), None, 'Recovery Heart', ("Spirit Temple MQ", "Master Quest", "Pots",))), @@ -1902,16 +1902,16 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Ice Cavern Near End Pot 2", ("Pot", 0x09, (6,0,2), None, 'Recovery Heart', ("Ice Cavern", "Vanilla Dungeons", "Pots",))), ("Ice Cavern Frozen Pot", ("Pot", 0x09, (9,0,10), None, 'Rupees (50)', ("Ice Cavern", "Vanilla Dungeons", "Pots",))), # Ice Cavern Silver Rupees - ("Ice Cavern Spinning Scythe Silver Rupee Icicles", ("SilverRupee", 0x09, (3,0,3), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Spinning Scythe Silver Rupee Center Left", ("SilverRupee", 0x09, (3,0,4), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Spinning Scythe Silver Rupee Center Back", ("SilverRupee", 0x09, (3,0,5), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Spinning Scythe Silver Rupee Center Right", ("SilverRupee", 0x09, (3,0,6), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Spinning Scythe Silver Rupee Ledge", ("SilverRupee", 0x09, (3,0,7), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Push Block Silver Rupee Back Left", ("SilverRupee", 0x09, (5,0,11), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Push Block Silver Rupee Back Center", ("SilverRupee", 0x09, (5,0,12), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Push Block Silver Rupee Front Center", ("SilverRupee", 0x09, (5,0,13), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Push Block Silver Rupee Red Ice", ("SilverRupee", 0x09, (5,0,14), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), - ("Ice Cavern Push Block Silver Rupee Front Left", ("SilverRupee", 0x09, (5,0,15), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees"))), + ("Ice Cavern Spinning Scythe Silver Rupee Icicles", ("SilverRupee", 0x09, (3,0,3), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Spinning Scythe Silver Rupee Center Left", ("SilverRupee", 0x09, (3,0,4), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Spinning Scythe Silver Rupee Center Back", ("SilverRupee", 0x09, (3,0,5), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Spinning Scythe Silver Rupee Center Right", ("SilverRupee", 0x09, (3,0,6), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Spinning Scythe Silver Rupee Ledge", ("SilverRupee", 0x09, (3,0,7), None, 'Silver Rupee (Ice Cavern Spinning Scythe)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Push Block Silver Rupee Back Left", ("SilverRupee", 0x09, (5,0,11), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Push Block Silver Rupee Back Center", ("SilverRupee", 0x09, (5,0,12), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Push Block Silver Rupee Front Center", ("SilverRupee", 0x09, (5,0,13), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Push Block Silver Rupee Red Ice", ("SilverRupee", 0x09, (5,0,14), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), + ("Ice Cavern Push Block Silver Rupee Front Left", ("SilverRupee", 0x09, (5,0,15), None, 'Silver Rupee (Ice Cavern Push Block)', ("Ice Cavern", "Vanilla Dungeons", "Silver Rupees",))), # Ice Cavern MQ ("Ice Cavern MQ Map Chest", ("Chest", 0x09, 0x01, None, 'Map (Ice Cavern)', ("Ice Cavern MQ", "Master Quest", "Chests",))), @@ -1961,21 +1961,21 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Gerudo Training Ground Beamos Recovery Heart 1", ("Freestanding", 0x0B, (7,0,11), None, 'Recovery Heart', ("Gerudo Training Ground", "Vanilla Dungeons", "Freestandings",))), ("Gerudo Training Ground Beamos Recovery Heart 2", ("Freestanding", 0x0B, (7,0,12), None, 'Recovery Heart', ("Gerudo Training Ground", "Vanilla Dungeons", "Freestandings",))), # Gerudo Training Ground Silver Rupees - ("Gerudo Training Ground Lava Room Silver Rupee Front Left", ("SilverRupee", 0x0B, (6,0,11), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Lava Room Silver Rupee Front Right", ("SilverRupee", 0x0B, (6,0,12), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Lava Room Silver Rupee Flame Circle", ("SilverRupee", 0x0B, (6,0,13), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Lava Room Silver Rupee Center Right", ("SilverRupee", 0x0B, (6,0,15), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Lava Room Silver Rupee Hookshot Target",("SilverRupee", 0x0B, (6,0,14), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Underwater Silver Rupee Top", ("SilverRupee", 0x0B, (9,0,18), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Underwater Silver Rupee Middle", ("SilverRupee", 0x0B, (9,0,20), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Underwater Silver Rupee Bottom Front Right",("SilverRupee",0x0B,(9,0,21), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Underwater Silver Rupee Bottom Center", ("SilverRupee", 0x0B, (9,0,17), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Underwater Silver Rupee Bottom Back Left",("SilverRupee",0x0B, (9,0,19), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Boulder Room Silver Rupee Bottom Right",("SilverRupee", 0x0B, (2,0,10), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Boulder Room Silver Rupee Bottom Left", ("SilverRupee", 0x0B, (2,0,11), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Boulder Room Silver Rupee Ceiling", ("SilverRupee", 0x0B, (2,0,12), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Boulder Room Silver Rupee Ledge", ("SilverRupee", 0x0B, (2,0,13), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), - ("Gerudo Training Ground Boulder Room Silver Rupee Top Left", ("SilverRupee", 0x0B, (2,0,14), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees"))), + ("Gerudo Training Ground Lava Room Silver Rupee Front Left", ("SilverRupee", 0x0B, (6,0,11), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Lava Room Silver Rupee Front Right", ("SilverRupee", 0x0B, (6,0,12), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Lava Room Silver Rupee Flame Circle", ("SilverRupee", 0x0B, (6,0,13), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Lava Room Silver Rupee Center Right", ("SilverRupee", 0x0B, (6,0,15), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Lava Room Silver Rupee Hookshot Target",("SilverRupee", 0x0B, (6,0,14), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Underwater Silver Rupee Top", ("SilverRupee", 0x0B, (9,0,18), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Underwater Silver Rupee Middle", ("SilverRupee", 0x0B, (9,0,20), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Underwater Silver Rupee Bottom Front Right",("SilverRupee",0x0B,(9,0,21), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Underwater Silver Rupee Bottom Center", ("SilverRupee", 0x0B, (9,0,17), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Underwater Silver Rupee Bottom Back Left",("SilverRupee",0x0B, (9,0,19), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Boulder Room Silver Rupee Bottom Right",("SilverRupee", 0x0B, (2,0,10), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Boulder Room Silver Rupee Bottom Left", ("SilverRupee", 0x0B, (2,0,11), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Boulder Room Silver Rupee Ceiling", ("SilverRupee", 0x0B, (2,0,12), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Boulder Room Silver Rupee Ledge", ("SilverRupee", 0x0B, (2,0,13), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), + ("Gerudo Training Ground Boulder Room Silver Rupee Top Left", ("SilverRupee", 0x0B, (2,0,14), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground", "Vanilla Dungeons", "Silver Rupees",))), # Gerudo Training Ground MQ ("Gerudo Training Ground MQ Lobby Left Chest", ("Chest", 0x0B, 0x13, None, 'Arrows (10)', ("Gerudo Training Ground MQ", "Master Quest", "Chests",))), @@ -2002,20 +2002,20 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Gerudo Training Ground MQ Lobby Right Pot 2", ("Pot", 0x0B, (0,0,9), None, 'Recovery Heart', ("Gerudo Training Ground MQ", "Master Quest", "Pots",))), ("Gerudo Training Ground MQ Maze Crate", ("Crate", 0x0B, (8,0,2), None, 'Rupee (1)', ("Gerudo Training Ground MQ", "Master Quest", "Crates",))), # Gerudo Training Ground MQ Silver Rupees - ("Gerudo Training Ground MQ Icicle Room Silver Rupee Freezard", ("SilverRupee", 0x0B, (2,0,28), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Icicle Room Silver Rupee Icicles", ("SilverRupee", 0x0B, (2,0,25), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Icicle Room Silver Rupee Center", ("SilverRupee", 0x0B, (2,0,26), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Icicle Room Silver Rupee Ceiling", ("SilverRupee", 0x0B, (2,0,27), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Icicle Room Silver Rupee Above Void",("SilverRupee", 0x0B, (2,0,29), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Left", ("SilverRupee", 0x0B, (6,0,12), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Center",("SilverRupee", 0x0B, (6,0,13), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Right", ("SilverRupee", 0x0B, (6,0,11), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Left", ("SilverRupee", 0x0B, (6,0,9), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Center", ("SilverRupee", 0x0B, (6,0,10), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Right", ("SilverRupee", 0x0B, (6,0,8), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Underwater Silver Rupee Middle", ("SilverRupee", 0x0B, (9,0,13), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Underwater Silver Rupee Front Right",("SilverRupee", 0x0B, (9,0,14), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), - ("Gerudo Training Ground MQ Underwater Silver Rupee Back Left", ("SilverRupee", 0x0B, (9,0,12), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees"))), + ("Gerudo Training Ground MQ Icicle Room Silver Rupee Freezard", ("SilverRupee", 0x0B, (2,0,28), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Icicle Room Silver Rupee Icicles", ("SilverRupee", 0x0B, (2,0,25), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Icicle Room Silver Rupee Center", ("SilverRupee", 0x0B, (2,0,26), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Icicle Room Silver Rupee Ceiling", ("SilverRupee", 0x0B, (2,0,27), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Icicle Room Silver Rupee Above Void",("SilverRupee", 0x0B, (2,0,29), None, 'Silver Rupee (Gerudo Training Ground Slopes)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Left", ("SilverRupee", 0x0B, (6,0,12), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Center",("SilverRupee", 0x0B, (6,0,13), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Front Right", ("SilverRupee", 0x0B, (6,0,11), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Left", ("SilverRupee", 0x0B, (6,0,9), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Center", ("SilverRupee", 0x0B, (6,0,10), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Lava Room Silver Rupee Back Right", ("SilverRupee", 0x0B, (6,0,8), None, 'Silver Rupee (Gerudo Training Ground Lava)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Underwater Silver Rupee Middle", ("SilverRupee", 0x0B, (9,0,13), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Underwater Silver Rupee Front Right",("SilverRupee", 0x0B, (9,0,14), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), + ("Gerudo Training Ground MQ Underwater Silver Rupee Back Left", ("SilverRupee", 0x0B, (9,0,12), None, 'Silver Rupee (Gerudo Training Ground Water)', ("Gerudo Training Ground MQ", "Master Quest", "Silver Rupees",))), # Ganon's Castle Vanilla ("Ganons Castle Forest Trial Chest", ("Chest", 0x0D, 0x09, None, 'Rupees (5)', ("Ganon's Castle", "Vanilla Dungeons", "Chests",))), @@ -2060,26 +2060,26 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Ganons Castle Spirit Trial Pot 1", ("Pot", 0x0D, (19,0,5), None, 'Deku Nuts (5)', ("Ganon's Castle", "Vanilla Dungeons", "Pots",))), ("Ganons Castle Spirit Trial Pot 2", ("Pot", 0x0D, (19,0,6), None, 'Rupees (5)', ("Ganon's Castle", "Vanilla Dungeons", "Pots",))), # Ganon's Castle Silver Rupees - ("Ganons Castle Spirit Trial Silver Rupee Ceiling", ("SilverRupee", 0x0D, (17,0,22), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Spirit Trial Silver Rupee Front Right", ("SilverRupee", 0x0D, (17,0,23), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Spirit Trial Silver Rupee Center", ("SilverRupee", 0x0D, (17,0,24), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Spirit Trial Silver Rupee Back Left", ("SilverRupee", 0x0D, (17,0,25), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Spirit Trial Silver Rupee Back Right", ("SilverRupee", 0x0D, (17,0,26), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Light Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (8,0,9), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Light Trial Silver Rupee Center Top", ("SilverRupee", 0x0D, (8,0,7), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Light Trial Silver Rupee Center Right", ("SilverRupee", 0x0D, (8,0,8), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Light Trial Silver Rupee Left Alcove", ("SilverRupee", 0x0D, (8,0,6), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Light Trial Silver Rupee Right Alcove", ("SilverRupee", 0x0D, (8,0,5), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Fire Trial Silver Rupee Flamethrower", ("SilverRupee", 0x0D, (14,0,14), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Fire Trial Silver Rupee Inside Pillar", ("SilverRupee", 0x0D, (14,0,17), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Fire Trial Silver Rupee Right Front", ("SilverRupee", 0x0D, (14,0,16), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Fire Trial Silver Rupee Right Center", ("SilverRupee", 0x0D, (14,0,15), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Fire Trial Silver Rupee Right Back", ("SilverRupee", 0x0D, (14,0,13), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Forest Trial Silver Rupee Front Left", ("SilverRupee", 0x0D, (6,0,8), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Forest Trial Silver Rupee Front Right", ("SilverRupee", 0x0D, (6,0,7), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Forest Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (6,0,11), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Forest Trial Silver Rupee Back Center", ("SilverRupee", 0x0D, (6,0,10), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), - ("Ganons Castle Forest Trial Silver Rupee Back Right", ("SilverRupee", 0x0D, (6,0,9), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees"))), + ("Ganons Castle Spirit Trial Silver Rupee Ceiling", ("SilverRupee", 0x0D, (17,0,22), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Spirit Trial Silver Rupee Front Right", ("SilverRupee", 0x0D, (17,0,23), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Spirit Trial Silver Rupee Center", ("SilverRupee", 0x0D, (17,0,24), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Spirit Trial Silver Rupee Back Left", ("SilverRupee", 0x0D, (17,0,25), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Spirit Trial Silver Rupee Back Right", ("SilverRupee", 0x0D, (17,0,26), None, 'Silver Rupee (Ganons Castle Spirit Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Light Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (8,0,9), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Light Trial Silver Rupee Center Top", ("SilverRupee", 0x0D, (8,0,7), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Light Trial Silver Rupee Center Right", ("SilverRupee", 0x0D, (8,0,8), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Light Trial Silver Rupee Left Alcove", ("SilverRupee", 0x0D, (8,0,6), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Light Trial Silver Rupee Right Alcove", ("SilverRupee", 0x0D, (8,0,5), None, 'Silver Rupee (Ganons Castle Light Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Fire Trial Silver Rupee Flamethrower", ("SilverRupee", 0x0D, (14,0,14), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Fire Trial Silver Rupee Inside Pillar", ("SilverRupee", 0x0D, (14,0,17), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Fire Trial Silver Rupee Right Front", ("SilverRupee", 0x0D, (14,0,16), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Fire Trial Silver Rupee Right Center", ("SilverRupee", 0x0D, (14,0,15), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Fire Trial Silver Rupee Right Back", ("SilverRupee", 0x0D, (14,0,13), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Forest Trial Silver Rupee Front Left", ("SilverRupee", 0x0D, (6,0,8), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Forest Trial Silver Rupee Front Right", ("SilverRupee", 0x0D, (6,0,7), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Forest Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (6,0,11), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Forest Trial Silver Rupee Back Center", ("SilverRupee", 0x0D, (6,0,10), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), + ("Ganons Castle Forest Trial Silver Rupee Back Right", ("SilverRupee", 0x0D, (6,0,9), None, 'Silver Rupee (Ganons Castle Forest Trial)', ("Ganon's Castle", "Vanilla Dungeons", "Silver Rupees",))), # Ganon's Castle MQ ("Ganons Castle MQ Forest Trial Freestanding Key", ("Collectable", 0x0D, 0x01, None, 'Small Key (Ganons Castle)', ("Ganon's Castle MQ", "Master Quest", "Freestandings",))), @@ -2118,21 +2118,21 @@ def shop_address(shop_id: int, shelf_id: int) -> int: ("Ganons Castle MQ Spirit Trial Pot 1", ("Pot", 0x0D, (19,0,5), None, 'Rupees (5)', ("Ganon's Castle MQ", "Master Quest", "Pots",))), ("Ganons Castle MQ Spirit Trial Pot 2", ("Pot", 0x0D, (19,0,6), None, 'Deku Nuts (5)', ("Ganon's Castle MQ", "Master Quest", "Pots",))), # Ganon's Castle MQ Silver Rupees - ("Ganons Castle MQ Fire Trial Silver Rupee Rising Platform", ("SilverRupee", 0x0D, (14,0,22), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Fire Trial Silver Rupee Beamos", ("SilverRupee", 0x0D, (14,0,19), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Fire Trial Silver Rupee Left Front", ("SilverRupee", 0x0D, (14,0,23), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Fire Trial Silver Rupee Left Center", ("SilverRupee", 0x0D, (14,0,20), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Fire Trial Silver Rupee Left Back", ("SilverRupee", 0x0D, (14,0,21), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Shadow Trial Silver Rupee Moving Platform", ("SilverRupee", 0x0D, (12,0,18), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Shadow Trial Silver Rupee Bomb Flower", ("SilverRupee", 0x0D, (12,0,14), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Shadow Trial Silver Rupee First Beamos", ("SilverRupee", 0x0D, (12,0,15), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Shadow Trial Silver Rupee Last Beamos", ("SilverRupee", 0x0D, (12,0,16), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Shadow Trial Silver Rupee Guillotine", ("SilverRupee", 0x0D, (12,0,17), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Water Trial Silver Rupee Hole", ("SilverRupee", 0x0D, (3,0,8), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Water Trial Silver Rupee Near Blocks", ("SilverRupee", 0x0D, (3,0,9), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Water Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (3,0,12), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Water Trial Silver Rupee Red Ice", ("SilverRupee", 0x0D, (3,0,10), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), - ("Ganons Castle MQ Water Trial Silver Rupee Above Void", ("SilverRupee", 0x0D, (3,0,11), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees"))), + ("Ganons Castle MQ Fire Trial Silver Rupee Rising Platform", ("SilverRupee", 0x0D, (14,0,22), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Fire Trial Silver Rupee Beamos", ("SilverRupee", 0x0D, (14,0,19), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Fire Trial Silver Rupee Left Front", ("SilverRupee", 0x0D, (14,0,23), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Fire Trial Silver Rupee Left Center", ("SilverRupee", 0x0D, (14,0,20), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Fire Trial Silver Rupee Left Back", ("SilverRupee", 0x0D, (14,0,21), None, 'Silver Rupee (Ganons Castle Fire Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Shadow Trial Silver Rupee Moving Platform", ("SilverRupee", 0x0D, (12,0,18), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Shadow Trial Silver Rupee Bomb Flower", ("SilverRupee", 0x0D, (12,0,14), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Shadow Trial Silver Rupee First Beamos", ("SilverRupee", 0x0D, (12,0,15), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Shadow Trial Silver Rupee Last Beamos", ("SilverRupee", 0x0D, (12,0,16), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Shadow Trial Silver Rupee Guillotine", ("SilverRupee", 0x0D, (12,0,17), None, 'Silver Rupee (Ganons Castle Shadow Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Water Trial Silver Rupee Hole", ("SilverRupee", 0x0D, (3,0,8), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Water Trial Silver Rupee Near Blocks", ("SilverRupee", 0x0D, (3,0,9), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Water Trial Silver Rupee Center Left", ("SilverRupee", 0x0D, (3,0,12), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Water Trial Silver Rupee Red Ice", ("SilverRupee", 0x0D, (3,0,10), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), + ("Ganons Castle MQ Water Trial Silver Rupee Above Void", ("SilverRupee", 0x0D, (3,0,11), None, 'Silver Rupee (Ganons Castle Water Trial)', ("Ganon's Castle MQ", "Master Quest", "Silver Rupees",))), # Ganon's Castle Shared ("Ganons Tower Boss Key Chest", ("Chest", 0x0A, 0x0B, None, 'Boss Key (Ganons Castle)', ("Ganon's Tower", "Vanilla Dungeons", "Master Quest", "Chests",))), @@ -2274,5 +2274,5 @@ def shop_address(shop_id: int, shelf_id: int) -> int: def location_is_viewable(loc_name: str, correct_chest_appearances: str, fast_chests: bool) -> bool: - return (((correct_chest_appearances in ['textures', 'both', 'classic'] or not fast_chests) and loc_name in location_groups['Chest']) + return (((correct_chest_appearances in ('textures', 'both', 'classic') or not fast_chests) and loc_name in location_groups['Chest']) or loc_name in location_groups['CanSee']) diff --git a/MBSDIFFPatch.py b/MBSDIFFPatch.py index 650696055..6fb626bdd 100644 --- a/MBSDIFFPatch.py +++ b/MBSDIFFPatch.py @@ -24,9 +24,9 @@ def apply_ootr_3_web_patch(settings, rom: Rom) -> None: else: minibsdiff_path += "minibsdiff32.exe" elif platform.system() == 'Linux': - if platform.machine() in ['arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l']: + if platform.machine() in ('arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l'): minibsdiff_path += "minibsdiff_ARM64" - elif platform.machine() in ['arm', 'armv7l', 'armhf']: + elif platform.machine() in ('arm', 'armv7l', 'armhf'): minibsdiff_path += "minibsdiff_ARM32" else: minibsdiff_path += "minibsdiff" diff --git a/MQ.py b/MQ.py index 56572a54f..7bc8d8d0e 100644 --- a/MQ.py +++ b/MQ.py @@ -383,7 +383,6 @@ def write_data(self, rom: Rom) -> None: code = rom.read_byte(headcur) loop = 0x20 - while loop != 0 and code != 0x14: # terminator loop -= 1 diff --git a/Main.py b/Main.py index 840a9aef0..715bccc57 100644 --- a/Main.py +++ b/Main.py @@ -221,9 +221,9 @@ def compress_rom(input_file: str, output_file: str, delete_input: bool = False) else: compressor_path += "Compress32.exe" elif platform.system() == 'Linux': - if platform.machine() in ['arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l']: + if platform.machine() in ('arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l'): compressor_path += "Compress_ARM64" - elif platform.machine() in ['arm', 'armv7l', 'armhf']: + elif platform.machine() in ('arm', 'armv7l', 'armhf'): compressor_path += "Compress_ARM32" else: compressor_path += "Compress" @@ -258,9 +258,9 @@ def generate_wad(wad_file: str, rom_file: str, output_file: str, channel_title: else: gzinject_path += "gzinject32.exe" elif platform.system() == 'Linux': - if platform.machine() in ['arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l']: + if platform.machine() in ('arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l'): gzinject_path += "gzinject_ARM64" - elif platform.machine() in ['arm', 'armv7l', 'armhf']: + elif platform.machine() in ('arm', 'armv7l', 'armhf'): gzinject_path += "gzinject_ARM32" else: gzinject_path += "gzinject" diff --git a/Messages.py b/Messages.py index 7e6587fc9..01ffc8c22 100644 --- a/Messages.py +++ b/Messages.py @@ -314,7 +314,7 @@ (0x00A5, "\x13\x76\x08You found the \x05\x41Dungeon Map\x05\x40\x01for the \x05\x45Bottom of the Well\x05\x40!\x09"), (0x00A6, "\x13\x77\x08You found a \x05\x41Small Key\x05\x40\x01for the \x05\x46Spirit Temple\x05\x40!\x09"), (0x00A9, "\x13\x77\x08You found a \x05\x41Small Key\x05\x40\x01for the \x05\x45Shadow Temple\x05\x40!\x09"), - (0x913E, "\x13\x77\x08You found a \x05\x41Small Key\x05\x40\x01for the \x05\x44Treasure Box Shop\x05\x40!\x09"), + (0x00F3, "\x13\x77\x08You found a \x05\x41Small Key\x05\x40\x01for the \x05\x44Treasure Box Shop\x05\x40!\x09"), # 0x9019 and 0x901A used above # Silver Rupee Messages with count. (0x901B, "\x08You found a \x05\x44Silver Rupee\x05\x40 for the\x01staircase room in \x05\x41Dodongo's Cavern\x05\x40!\x01You have found \x05\x41\xF0\x00\x05\x40 so far!\x09"), @@ -455,7 +455,6 @@ # 0x9101 - Small key messages for the first one collected # 0x9112 - Small key messages containing the count # 0x9123 - Small key messages for collecting more than enough -# 0x91 for dungeon_name in dungeon_names: if dungeon_name is not None: @@ -1169,7 +1168,7 @@ def read_messages(rom: Rom) -> list[Message]: if id == 0xFFFF: break # this marks the end of the table - messages.append( Message.from_rom(rom, index) ) + messages.append(Message.from_rom(rom, index)) index += 1 table_offset += 8 diff --git a/Models.py b/Models.py index ff994f53a..4ac6f6486 100644 --- a/Models.py +++ b/Models.py @@ -591,9 +591,9 @@ def LoadModel(rom: Rom, model: str, age: int) -> int: zobj[hierarchy - BASE_OFFSET + i] = hierarchyBytes[i] zobj[hierarchy - BASE_OFFSET + 4] = 0x15 # Number of limbs zobj[hierarchy - BASE_OFFSET + 8] = 0x12 # Number of limbs to draw - # # Save zobj for testing - # with open(path + "/Test_Processed.zobj", "wb") as f: - # f.write(zobj) + # Save zobj for testing + #with open(path + "/Test_Processed.zobj", "wb") as f: + # f.write(zobj) # Correct skeleton if it should be corrected CorrectSkeleton(zobj, skeleton, agestr) # Write zobj to vanilla object (object_link_boy or object_link_child) diff --git a/Music.py b/Music.py index 95657451b..74bb47b3c 100644 --- a/Music.py +++ b/Music.py @@ -505,9 +505,9 @@ def rebuild_sequences(rom: Rom, sequences: list[Sequence], log: CosmeticsLog, sy bank_index_base = (rom.read_int32(symbols['CFG_AUDIOBANK_TABLE_EXTENDED_ADDR']) - 0x80400000) + 0x3480000 # Build new fanfare banks by copying each entry in audiobank_index for i in range(0, 0x26): - bank_entry = rom.read_bytes(bank_index_base + 0x10 + (0x10*i), 0x10) # Get the vanilla entry + bank_entry = rom.read_bytes(bank_index_base + 0x10 + 0x10 * i, 0x10) # Get the vanilla entry bank_entry[9] = 1 # Update the cache type to 1 - rom.write_bytes(bank_index_base + 0x270 + 0x10*i, bank_entry) # Write the new entry at the end of the bank table. + rom.write_bytes(bank_index_base + 0x270 + 0x10 * i, bank_entry) # Write the new entry at the end of the bank table. rom.write_byte(bank_index_base + 0x01, 0x4C) # Updates AudioBank Index Header if no custom banks are present as this would be 0x26 which would crash the game if a fanfare was played added_banks = [] # Store copies of all the banks we've added diff --git a/Notes/GUI/architecture.md b/Notes/GUI/architecture.md index 589fd0739..b1e8850da 100644 --- a/Notes/GUI/architecture.md +++ b/Notes/GUI/architecture.md @@ -29,7 +29,7 @@ utils/settings_list.json contains every single setting of the GUI as an array of * text → Name of the setting as shown to the user * tooltip → The tooltip shown to the user when he hovers/clicks on the setting. Line breaks are inserted by adding a HTML `
` tag into the string * type → Type of the GUI element to use to control the setting. Available types are: - + 1. Checkbutton: A boolean on/off toggle 2. Radiobutton: A radio in-line list of buttons you can select one option of 3. Combobox: A dropdown box that offers multiple options you can select one of @@ -104,7 +104,7 @@ The GUI/run.js is used to boot the GUI as conveniently as possible for the user ## Angular -### Overview +### Overview The Angular source is contained in the GUI/src folder and consists of components and modules. Each component has a HTML template with custom Angular specific directives, styles written in Sass (a CSS extension) and component code written in TypeScript. The src/index.html serves as the entry point and bootstraps Angular. @@ -120,9 +120,9 @@ src/app/@theme/layouts/GUI assembles the header bar, generator component and foo In addition to individual angular component styles, files for global styling exist under GUI/src/app/@theme/styles. -Two themes exist at the moment. The default theme and the dark mode theme. Dark mode is an Electron-only feature and can be activated by clicking on the moon symbol in the header bar. +Two themes exist at the moment. The default theme and the dark mode theme. Dark mode is an Electron-only feature and can be activated by clicking on the moon symbol in the header bar. -Colors and theme related properties are stored within theme.ootr-dark.scss and theme.ootr-default.scss. +Colors and theme related properties are stored within theme.ootr-dark.scss and theme.ootr-default.scss. To support theming it is crucial to work with $nb-theme() variables whenever colorizing backgrounds, texts, borders, etc. diff --git a/Notes/GUI/how_to_dev.md b/Notes/GUI/how_to_dev.md index d0aabd879..bc9378c1f 100644 --- a/Notes/GUI/how_to_dev.md +++ b/Notes/GUI/how_to_dev.md @@ -6,7 +6,7 @@ 2. Run python3 SettingsToJson.py -3. Change current directory to the GUI folder +3. Change current directory to the GUI folder 4. Execute `npm ci` to delete your node_modules folder and install all dependencies as specified in package-lock.json @@ -22,4 +22,4 @@ That's it! Happy coding! ### Web view testing -For web view testing, follow the guide under [web-gui-testing.md](https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/Notes/web-gui-testing.md). +For web view testing, follow the guide under [web-gui-testing.md](https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/Notes/web-gui-testing.md). diff --git a/Notes/auto-tracker-ctx.md b/Notes/auto-tracker-ctx.md index 954feed9c..ae2195a48 100644 --- a/Notes/auto-tracker-ctx.md +++ b/Notes/auto-tracker-ctx.md @@ -1,6 +1,6 @@ The **auto-tracker context** is a region of memory where a portion of the randomizer's configuration variables are stored in a versioned layout defined below. Its intent is to give some symbols added by the randomizer well-defined addresses so that auto-trackers can read them reliably without needing the symbols.json for the specific randomizer version that was used to generate the seed. -The starting address of the auto-tracker context is listed at address `0x8040_000c` (randomizer context + `0xc`). On versions of the randomizer before this feature was added, the starting address is given as zero. At that address, a 4-byte integer can be found. This is the version number of the auto-tracker context and defines the layout of the remainder of the context according to the sections below. The current version is 4. +The starting address of the auto-tracker context is listed at address `0x8040_000C` (randomizer context + `0xC`). On versions of the randomizer before this feature was added, the starting address is given as zero. At that address, a 4-byte integer can be found. This is the version number of the auto-tracker context and defines the layout of the remainder of the context according to the sections below. The current version is 4. # Versions 1–2 @@ -8,20 +8,20 @@ The starting address of the auto-tracker context is listed at address `0x8040_00 |--:|---|--:|--:|---| |`0x04`|`CFG_DUNGEON_INFO_ENABLE`|1|`0x04`|Defines how information about dungeons will be displayed on the inventory screen on the pause menu. `0` = disabled, `1` = a single menu shown when holding A, `2` = separate menus shown when holding D-pad buttons.| |`0x08`|`CFG_DUNGEON_INFO_MQ_ENABLE`|1|`0x04`|`1` if the dungeon info in the pause menu should include info about which dungeons are in Master Quest mode.| -|`0x0c`|`CFG_DUNGEON_INFO_MQ_NEED_MAP`|1|`0x04`|`1` if the Master Quest info should only be displayed for dungeons whose maps have been obtained or which don't have maps.| +|`0x0C`|`CFG_DUNGEON_INFO_MQ_NEED_MAP`|1|`0x04`|`1` if the Master Quest info should only be displayed for dungeons whose maps have been obtained or which don't have maps.| |`0x10`|`CFG_DUNGEON_INFO_REWARD_ENABLE`|1|`0x04`|`1` if the dungeon info in the pause menu should include info about which medallions and stones are in which dungeon.| |`0x14`|`CFG_DUNGEON_INFO_REWARD_NEED_COMPASS`|1|`0x04`|Defines which item is required to display the location of a dungeon reward in the pause menu. `0` = no item required, `1` = the compass of the dungeon in which the reward is found, `2` = the compass of the reward's vanilla dungeon. For example, if the Kokiri Emerald is in the Fire Temple, `1` means the Fire Temple compass is required and `2` means the Deku Tree compass is required.| |`0x18`|`CFG_DUNGEON_INFO_REWARD_NEED_ALTAR`|1|`0x04`|`1` if the reward info should only be displayed for rewards whose Temple of Time altar text boxes have been read.| -|`0x1c`|`CFG_DUNGEON_REWARDS`|1|`0x0e`|A byte representing the medallion or stone for each dungeon. Dungeons without rewards are listed as `0xff`, and one reward is chosen arbitrarily if the dungeon has multiple rewards. For more complete data, use `CFG_DUNGEON_REWARD_AREAS` instead.| -|`0x2a`|`CFG_DUNGEON_IS_MQ`|1|`0x0e`|A byte set to `1` for each dungeon in Master Quest mode.| +|`0x1C`|`CFG_DUNGEON_REWARDS`|1|`0x0E`|A byte representing the medallion or stone for each dungeon. Dungeons without rewards are listed as `0xFF`, and one reward is chosen arbitrarily if the dungeon has multiple rewards. For more complete data, use `CFG_DUNGEON_REWARD_AREAS` instead.| +|`0x2A`|`CFG_DUNGEON_IS_MQ`|1|`0x0E`|A byte set to `1` for each dungeon in Master Quest mode.| |`0x38`|`RAINBOW_BRIDGE_CONDITION`|2|`0x04`|The condition for spawning the rainbow bridge. `0` = open, `1` = medallions, `2` = dungeon rewards, `3` = stones, `4` = vanilla, `5` = tokens, `6` = hearts.| -|`0x3c`|`LACS_CONDITION`|2|`0x04`|The condition for triggering the light arrow cutscene. `0` = vanilla, `1` = medallions, `2` = dungeons, `3` = stones, `4` = tokens, `5` = hearts.| +|`0x3C`|`LACS_CONDITION`|2|`0x04`|The condition for triggering the light arrow cutscene. `0` = vanilla, `1` = medallions, `2` = dungeons, `3` = stones, `4` = tokens, `5` = hearts.| |`0x40`|`RAINBOW_BRIDGE_COUNT`|2|`0x02`|The number of items (of the kind defined in `RAINBOW_BRIDGE_CONDITION`) required to spawn the rainbow bridge.| |`0x42`|`LACS_CONDITION_COUNT`|2|`0x02`|The number of items (of the kind defined in `LACS_CONDITION`) required to trigger the light arrow cutscene.| |`0x44`|`TRIFORCE_HUNT_ENABLED`|2|`0x02`|`1` if Triforce hunt is enabled.| |`0x46`|`TRIFORCE_PIECES_REQUIRED`|2|`0x02`|In Triforce hunt, the total number of Triforce pieces (across all worlds) required to win the game.| |`0x48`|`SPECIAL_DEAL_COUNTS`|2|`0x08`|A byte representing the number of special deal slots in each shop, in the following order: KF Shop, Market Bazaar, Market Potion Shop, Market Bombchu Shop, Kak Bazaar, Kak Potion Shop, GC Shop, ZD Shop.| -|`0x50`|`CFG_DUNGEON_REWARD_AREAS`|3|`0xcf`|For each dungeon reward in the order of Emerald, Ruby, Sapphire, Light, Forest, Fire, Water, Shadow, and Spirit, a null-terminated `0x16`-byte (`0x17` including the null terminator) ASCII string containing the hint area of that reward, padded with spaces on the right.| +|`0x50`|`CFG_DUNGEON_REWARD_AREAS`|3|`0xCF`|For each dungeon reward in the order of Emerald, Ruby, Sapphire, Light, Forest, Fire, Water, Shadow, and Spirit, a null-terminated `0x16`-byte (`0x17` including the null terminator) ASCII string containing the hint area of that reward, padded with spaces on the right.| # Version 3 @@ -33,18 +33,18 @@ Special care needs to be taken when working with version 3 of the auto-tracker c |--:|---|--:|--:|---| |`0x04`|`CFG_DUNGEON_INFO_ENABLE`|4|`0x04`|Defines how information about dungeons will be displayed on the inventory screen on the pause menu. `0` = disabled, `1` = a single menu shown when holding A, `2` = separate menus shown when holding D-pad buttons in addition to the summary menu on A.| |`0x08`|`CFG_DUNGEON_INFO_MQ_ENABLE`|1|`0x04`|`1` if the dungeon info in the pause menu should include info about which dungeons are in Master Quest mode.| -|`0x0c`|`CFG_DUNGEON_INFO_MQ_NEED_MAP`|1|`0x04`|`1` if the Master Quest info should only be displayed for dungeons whose maps have been obtained or which don't have maps.| +|`0x0C`|`CFG_DUNGEON_INFO_MQ_NEED_MAP`|1|`0x04`|`1` if the Master Quest info should only be displayed for dungeons whose maps have been obtained or which don't have maps.| |`0x10`|`CFG_DUNGEON_INFO_REWARD_ENABLE`|1|`0x04`|`1` if the dungeon info in the pause menu should include info about which medallions and stones are in which dungeon.| |`0x14`|`CFG_DUNGEON_INFO_REWARD_NEED_COMPASS`|1|`0x04`|Defines which item is required to display the location of a dungeon reward in the pause menu. `0` = no item required, `1` = the compass of the dungeon in which the reward is found, `2` = the compass of the reward's vanilla dungeon. For example, if the Kokiri Emerald is in the Fire Temple, `1` means the Fire Temple compass is required and `2` means the Deku Tree compass is required.| |`0x18`|`CFG_DUNGEON_INFO_REWARD_NEED_ALTAR`|1|`0x04`|`1` if the reward info should only be displayed for rewards whose Temple of Time altar text boxes have been read.| -|`0x1c`|`CFG_DUNGEON_INFO_REWARD_SUMMARY_ENABLE`|4|`0x04`|`1` if the summary menu shown when holding A should display dungeon reward locations.| -|`0x20`|`CFG_DUNGEON_REWARDS`|4|`0x0e`|A byte representing the medallion or stone for each dungeon. Dungeons without rewards are listed as `0xff`, and one reward is chosen arbitrarily if the dungeon has multiple rewards. For more complete data, use `CFG_DUNGEON_REWARD_AREAS` instead.| -|`0x2e`|`CFG_DUNGEON_IS_MQ`|4|`0x0e`|A byte set to `1` for each dungeon in Master Quest mode.| -|`0x3c`|`RAINBOW_BRIDGE_CONDITION`|4|`0x04`|The condition for spawning the rainbow bridge. `0` = open, `1` = medallions, `2` = dungeon rewards, `3` = stones, `4` = vanilla, `5` = tokens, `6` = hearts.| +|`0x1C`|`CFG_DUNGEON_INFO_REWARD_SUMMARY_ENABLE`|4|`0x04`|`1` if the summary menu shown when holding A should display dungeon reward locations.| +|`0x20`|`CFG_DUNGEON_REWARDS`|4|`0x0E`|A byte representing the medallion or stone for each dungeon. Dungeons without rewards are listed as `0xFF`, and one reward is chosen arbitrarily if the dungeon has multiple rewards. For more complete data, use `CFG_DUNGEON_REWARD_AREAS` instead.| +|`0x2E`|`CFG_DUNGEON_IS_MQ`|4|`0x0E`|A byte set to `1` for each dungeon in Master Quest mode.| +|`0x3C`|`RAINBOW_BRIDGE_CONDITION`|4|`0x04`|The condition for spawning the rainbow bridge. `0` = open, `1` = medallions, `2` = dungeon rewards, `3` = stones, `4` = vanilla, `5` = tokens, `6` = hearts.| |`0x40`|`LACS_CONDITION`|4|`0x04`|The condition for triggering the light arrow cutscene. `0` = vanilla, `1` = medallions, `2` = dungeons, `3` = stones, `4` = tokens, `5` = hearts.| |`0x44`|`RAINBOW_BRIDGE_COUNT`|4|`0x02`|The number of items (of the kind defined in `RAINBOW_BRIDGE_CONDITION`) required to spawn the rainbow bridge.| |`0x46`|`LACS_CONDITION_COUNT`|4|`0x02`|The number of items (of the kind defined in `LACS_CONDITION`) required to trigger the light arrow cutscene.| |`0x48`|`TRIFORCE_HUNT_ENABLED`|4|`0x02`|`1` if Triforce hunt is enabled.| -|`0x4a`|`TRIFORCE_PIECES_REQUIRED`|4|`0x02`|In Triforce hunt, the total number of Triforce pieces (across all worlds) required to win the game.| -|`0x4c`|`SPECIAL_DEAL_COUNTS`|4|`0x08`|A byte representing the number of special deal slots in each shop, in the following order: KF Shop, Market Bazaar, Market Potion Shop, Market Bombchu Shop, Kak Bazaar, Kak Potion Shop, GC Shop, ZD Shop.| -|`0x54`|`CFG_DUNGEON_REWARD_AREAS`|4|`0xcf`|For each dungeon reward in the order of Emerald, Ruby, Sapphire, Light, Forest, Fire, Water, Shadow, and Spirit, a null-terminated `0x16`-byte (`0x17` including the null terminator) ASCII string containing the hint area of that reward, padded with spaces on the right.| +|`0x4A`|`TRIFORCE_PIECES_REQUIRED`|4|`0x02`|In Triforce hunt, the total number of Triforce pieces (across all worlds) required to win the game.| +|`0x4C`|`SPECIAL_DEAL_COUNTS`|4|`0x08`|A byte representing the number of special deal slots in each shop, in the following order: KF Shop, Market Bazaar, Market Potion Shop, Market Bombchu Shop, Kak Bazaar, Kak Potion Shop, GC Shop, ZD Shop.| +|`0x54`|`CFG_DUNGEON_REWARD_AREAS`|4|`0xCF`|For each dungeon reward in the order of Emerald, Ruby, Sapphire, Light, Forest, Fire, Water, Shadow, and Spirit, a null-terminated `0x16`-byte (`0x17` including the null terminator) ASCII string containing the hint area of that reward, padded with spaces on the right.| diff --git a/Notes/code-style.md b/Notes/code-style.md new file mode 100644 index 000000000..21f766221 --- /dev/null +++ b/Notes/code-style.md @@ -0,0 +1,34 @@ +This document contains a list of guidelines for how code in this project should be formatted. + +# Overall code style + +* Some of our guidelines have automated checks. Run them using `py CI.py --no_unit_tests`. +* If code is commented out, there should be an accompanying explanation of why the code was commented out and a suggestion of when it may be appropriate to uncomment it. +* Use spaces, not tabs, for indentation and alignment. Indentation should be 4 spaces. Exceptions include YAML files, which use 2 spaces for indentation, and the Makefile, which uses tabs. +* Unless requested by other guidelines (such as the next one), Don't use unnecessary parentheses, e.g. write `a + b * c` instead of `a + (b * c)`. +* Do not rely on operator precedence when nesting `and`/`&&` expressions inside `or`/`||` expressions. Always use parentheses. +* For hexadecimal numbers, use a lowercase `x` and uppercase letters as digits. + +# C code style + +* Include a space between a keyword like `if` or `switch` and the following parenthesis. +* Use braces around single-line `if`, `while`, etc. bodies. The only time omitting braces is acceptable is when the body is a `continue`, `break`, or `return` statement written on the same line as the condition and not followed by `else`. +* The opening brace of a function body, struct/union/enum body, or compound statement goes on the same line as the parameter list, condition, or `do` or `else` keyword. +* The `else` keyword goes on the same line as the preceding closing brace. +* Declare pointer variables with the asterisk aligned to the type (`uint8_t* foo`), not the variable name (`uint8_t *foo`). +* Use spaces around binary operators, with the exception of `.` and `->`. +* When using type casting (`(type) expression`) or shift operators, prefer using explicit parentheses over relying on operator precedence. + +# Assembly code style + +* Use `;` for comments, not `//`. +* All labels and directives are unindented, and all instructions are indented by 4 spaces. +* The first parameter of an instruction starts at column 13. + +# Python code style + +* Use f-strings instead of `str.format` or the `%` operator. +* Prefer using parentheses for multiline expressions over using `\` to continue a statement on the next line. +* If a list is written with each element on a separate line, include a comma after the last element. +* Use spaces around binary operators. (This does not include `.`, `,`, `:`, etc.) +* Use tuples rather than lists if both can be used interchangeably. diff --git a/Notes/coop-ctx.md b/Notes/coop-ctx.md index 44f531b5b..970c492d9 100644 --- a/Notes/coop-ctx.md +++ b/Notes/coop-ctx.md @@ -10,8 +10,8 @@ The starting address of the co-op context is listed at address `0x8040_0000` (at |`0x05`|`PLAYER_NAME_ID`|1|`0x0001`|The world number of the player whose item is being picked up, used as an index into `PLAYER_NAMES` to render that player's name in the text box. `0` if no item is being picked up. This should usually not be read or modified by the multiworld plugin; use `OUTGOING_PLAYER` instead.| |`0x06`|`INCOMING_ITEM`|1|`0x0002`|The ID (as in `Item.index`) of the next item to receive from the network, or `0` if there is none.| |`0x08`|`OUTGOING_KEY`|1|`0x0004`|A unique ID (see `get_override_entry` in Patches.py for details) for the source location of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| -|`0x0c`|`OUTGOING_ITEM`|1|`0x0002`|The ID (as in `Item.index`) of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| -|`0x0e`|`OUTGOING_PLAYER`|1|`0x0002`|The world number of the outgoing item's recipient, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| +|`0x0C`|`OUTGOING_ITEM`|1|`0x0002`|The ID (as in `Item.index`) of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| +|`0x0E`|`OUTGOING_PLAYER`|1|`0x0002`|The world number of the outgoing item's recipient, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| |`0x10`|`PLAYER_NAMES`|1|`0x0800`|An array of 256 player names, each 8 bytes long, that must be populated by the multiworld plugin. `PLAYER_NAME_ID` is used as an index into this array, and index 0 is unused.| # Versions 2–6 @@ -22,11 +22,11 @@ The starting address of the co-op context is listed at address `0x8040_0000` (at |`0x0005`|`PLAYER_NAME_ID`|1|`0x0001`|The world number of the player whose item is being picked up, used as an index into `PLAYER_NAMES` to render that player's name in the text box. `0` if no item is being picked up. This should usually not be read or modified by the multiworld plugin; use `OUTGOING_PLAYER` instead.| |`0x0006`|`INCOMING_PLAYER`|2|`0x0002`|The world number from which the `INCOMING_ITEM` came, or `0` if there is no incoming item.| |`0x0008`|`INCOMING_ITEM`|2|`0x0002`|The ID (as in `Item.index`) of the next item to receive from the network, or `0` if there is none.| -|`0x000a`|`MW_SEND_OWN_ITEMS`|3|`0x0001`|The multiworld plugin can set this to `1` to make the game set `OUTGOING_KEY`, `OUTGOING_ITEM`, and `OUTGOING_PLAYER` even when finding an item for its own world. Defaults to `0`, meaning these fields are only set for Triforce pieces (which affect all worlds) and other players' items.| -|`0x000b`|`MW_PROGRESSIVE_ITEMS_ENABLE`|5|`0x0001`|The multiworld plugin can set this to `1` to indicate that it will keep `MW_PROGRESSIVE_ITEMS_STATE` up to date. Defaults to `0`, meaning the appearance of outgoing progressive items will be based on the sender's inventory.| -|`0x000c`|`OUTGOING_KEY`|2|`0x0004`|A unique ID (see `get_override_entry` in Patches.py for details) for the source location of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| +|`0x000A`|`MW_SEND_OWN_ITEMS`|3|`0x0001`|The multiworld plugin can set this to `1` to make the game set `OUTGOING_KEY`, `OUTGOING_ITEM`, and `OUTGOING_PLAYER` even when finding an item for its own world. Defaults to `0`, meaning these fields are only set for Triforce pieces (which affect all worlds) and other players' items.| +|`0x000B`|`MW_PROGRESSIVE_ITEMS_ENABLE`|5|`0x0001`|The multiworld plugin can set this to `1` to indicate that it will keep `MW_PROGRESSIVE_ITEMS_STATE` up to date. Defaults to `0`, meaning the appearance of outgoing progressive items will be based on the sender's inventory.| +|`0x000C`|`OUTGOING_KEY`|2|`0x0004`|A unique ID (see `get_override_entry` in Patches.py for details) for the source location of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| |`0x0010`|`OUTGOING_ITEM`|2|`0x0002`|The ID (as in `Item.index`) of the outgoing item, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| |`0x0012`|`OUTGOING_PLAYER`|2|`0x0002`|The world number of the outgoing item's recipient, or `0` if no item is being sent. The multiworld plugin should set this to `0` after handling an outgoing item.| |`0x0014`|`PLAYER_NAMES`|2|`0x0800`|An array of 256 player names, each 8 bytes long, that must be populated by the multiworld plugin. `PLAYER_NAME_ID` is used as an index into this array, and index 0 is unused.| |`0x0814`|`CFG_FILE_SELECT_HASH`|4|`0x0005`|The 5 icons displayed at the top of the file select screen, represented as indices into the `HASH_ICONS` list in Spoiler.py.| -|`0x081c`|`MW_PROGRESSIVE_ITEMS_STATE`|5|`0x0400`|The multiworld plugin can store data representing the state of progressive items of all players here. If `MW_PROGRESSIVE_ITEMS_ENABLE` is set to `1`, the game will use this to render outgoing progressive items instead of basing them on the sender's inventory. The data is an array of 256 bitfields, each 4 bytes long, with the entry at index 0 unused. For documentation of the bitflags, see `mw_progressive_items_state_t` in `item_upgrades.c`. Note that the `chu_bag` flag only has any effect in versions 6+ of the co-op context.| +|`0x081C`|`MW_PROGRESSIVE_ITEMS_STATE`|5|`0x0400`|The multiworld plugin can store data representing the state of progressive items of all players here. If `MW_PROGRESSIVE_ITEMS_ENABLE` is set to `1`, the game will use this to render outgoing progressive items instead of basing them on the sender's inventory. The data is an array of 256 bitfields, each 4 bytes long, with the entry at index 0 unused. For documentation of the bitflags, see `mw_progressive_items_state_t` in `item_upgrades.c`. Note that the `chu_bag` flag only has any effect in versions 6+ of the co-op context.| diff --git a/Notes/extra-save-data.md b/Notes/extra-save-data.md index 1bc3f6acf..f72b80cc4 100644 --- a/Notes/extra-save-data.md +++ b/Notes/extra-save-data.md @@ -103,4 +103,4 @@ Additional flags stored in `inf_table` (an array of 16-bit integers at save cont # Misc data -Current mask: 1 byte at save context + 0x3B. Written on `Player_Destroy` Read on `Player_Init` except when moving through time. +Current mask: 1 byte at save context + 0x3B. Written on `Player_Destroy`. Read on `Player_Init` except when moving through time. diff --git a/Notes/vscode.md b/Notes/vscode.md index 5e3ced021..e2c723cb2 100644 --- a/Notes/vscode.md +++ b/Notes/vscode.md @@ -122,4 +122,4 @@ Adding a launch profile allows you to quickly run the randomizer without the GUI } ``` -Debugging can be started by pressing F5. \ No newline at end of file +Debugging can be started by pressing F5. diff --git a/Patches.py b/Patches.py index 0976e982f..55876a316 100644 --- a/Patches.py +++ b/Patches.py @@ -64,36 +64,36 @@ def patch_rom(spoiler: Spoiler, world: World, rom: Rom) -> Rom: rom.write_bytes(write_address, new_bytes) # Load models into the extended object table. - zobj_imports = [ - ('object_gi_triforce', data_path('items/Triforce.zobj'), 0x193), # Triforce Piece - ('object_gi_keyring', data_path('items/KeyRing.zobj'), 0x195), # Key Rings - ('object_gi_warpsong', data_path('items/Note.zobj'), 0x196), # Inverted Music Note - ('object_gi_chubag', data_path('items/ChuBag.zobj'), 0x197), # Bombchu Bag - ('object_gi_skeyforest', data_path('items/SmallForest.zobj'), 0x199), # Small Key (Forest) - ('object_gi_skeyfire', data_path('items/SmallFire.zobj'), 0x19A), # Small Key (Fire) - ('object_gi_skeywater', data_path('items/SmallWater.zobj'), 0x19B), # Small Key (Water) - ('object_gi_skeyspirit', data_path('items/SmallSpirit.zobj'), 0x19C), # Small Key (Spirit) - ('object_gi_skeyshadow', data_path('items/SmallShadow.zobj'), 0x19D), # Small Key (Shadow) - ('object_gi_skeywell', data_path('items/SmallWell.zobj'), 0x19E), # Small Key (Well) - ('object_gi_skeygtg', data_path('items/SmallGTG.zobj'), 0x19F), # Small Key (GTG) - ('object_gi_skeythieves', data_path('items/SmallThieves.zobj'), 0x1A0), # Small Key (Thieves) - ('object_gi_skeyganon', data_path('items/SmallGanon.zobj'), 0x1A1), # Small Key (Ganon) - ('object_gi_skeyTCG', data_path('items/SmallTCG.zobj'), 0x1A2), # Small Key (Chest Game) - ('object_gi_bkforest', data_path('items/BossForest.zobj'), 0x1A3), # Boss Key (Forest) - ('object_gi_bkfire', data_path('items/BossFire.zobj'), 0x1A4), # Boss Key (Fire) - ('object_gi_bkwater', data_path('items/BossWater.zobj'), 0x1A5), # Boss Key (Water) - ('object_gi_bkspirit', data_path('items/BossSpirit.zobj'), 0x1A6), # Boss Key (Spirit) - ('object_gi_bkshadow', data_path('items/BossShadow.zobj'), 0x1A7), # Boss Key (Shadow) - ('object_gi_abutton', data_path('items/A_Button.zobj'), 0x1A8), # A button - ('object_gi_cbutton', data_path('items/C_Button_Horizontal.zobj'), 0x1A9), # C button Horizontal - ('object_gi_cbutton', data_path('items/C_Button_Vertical.zobj'), 0x1AA), # C button Vertical - ] + zobj_imports = ( + ('object_gi_triforce', data_path('items/Triforce.zobj'), 0x193), # Triforce Piece + ('object_gi_keyring', data_path('items/KeyRing.zobj'), 0x195), # Key Rings + ('object_gi_warpsong', data_path('items/Note.zobj'), 0x196), # Inverted Music Note + ('object_gi_chubag', data_path('items/ChuBag.zobj'), 0x197), # Bombchu Bag + ('object_gi_skeyforest', data_path('items/SmallForest.zobj'), 0x199), # Small Key (Forest) + ('object_gi_skeyfire', data_path('items/SmallFire.zobj'), 0x19A), # Small Key (Fire) + ('object_gi_skeywater', data_path('items/SmallWater.zobj'), 0x19B), # Small Key (Water) + ('object_gi_skeyspirit', data_path('items/SmallSpirit.zobj'), 0x19C), # Small Key (Spirit) + ('object_gi_skeyshadow', data_path('items/SmallShadow.zobj'), 0x19D), # Small Key (Shadow) + ('object_gi_skeywell', data_path('items/SmallWell.zobj'), 0x19E), # Small Key (Well) + ('object_gi_skeygtg', data_path('items/SmallGTG.zobj'), 0x19F), # Small Key (GTG) + ('object_gi_skeythieves', data_path('items/SmallThieves.zobj'), 0x1A0), # Small Key (Thieves) + ('object_gi_skeyganon', data_path('items/SmallGanon.zobj'), 0x1A1), # Small Key (Ganon) + ('object_gi_skeyTCG', data_path('items/SmallTCG.zobj'), 0x1A2), # Small Key (Chest Game) + ('object_gi_bkforest', data_path('items/BossForest.zobj'), 0x1A3), # Boss Key (Forest) + ('object_gi_bkfire', data_path('items/BossFire.zobj'), 0x1A4), # Boss Key (Fire) + ('object_gi_bkwater', data_path('items/BossWater.zobj'), 0x1A5), # Boss Key (Water) + ('object_gi_bkspirit', data_path('items/BossSpirit.zobj'), 0x1A6), # Boss Key (Spirit) + ('object_gi_bkshadow', data_path('items/BossShadow.zobj'), 0x1A7), # Boss Key (Shadow) + ('object_gi_abutton', data_path('items/A_Button.zobj'), 0x1A8), # A button + ('object_gi_cbutton', data_path('items/C_Button_Horizontal.zobj'), 0x1A9), # C button Horizontal + ('object_gi_cbutton', data_path('items/C_Button_Vertical.zobj'), 0x1AA), # C button Vertical + ) if world.settings.key_appearance_match_dungeon: rom.write_byte(rom.sym('CUSTOM_KEY_MODELS'), 0x01) extended_objects_start = start_address = rom.dma.free_space() - for (name, zobj_path, object_id) in zobj_imports: + for name, zobj_path, object_id in zobj_imports: with open(zobj_path, 'rb') as stream: obj_data = stream.read() rom.write_bytes(start_address, obj_data) @@ -103,23 +103,21 @@ def patch_rom(spoiler: Spoiler, world: World, rom: Rom) -> Rom: start_address = end_address # Make new models by applying patches to existing ones - zobj_patches = [ - ('object_gi_hearts', 0x014D9000, 0x014DA590, 0x194, # Heart Container -> Double Defense - [ + zobj_patches = ( + ('object_gi_hearts', 0x014D9000, 0x014DA590, 0x194, ( # Heart Container -> Double Defense (0x1294, [0xFF, 0xCF, 0x0F]), # Exterior Primary Color (0x12B4, [0xFF, 0x46, 0x32]), # Exterior Env Color (0x1474, [0xFF, 0xFF, 0xFF]), # Interior Primary Color (0x1494, [0xFF, 0xFF, 0xFF]), # Interior Env Color (0x12A8, [0xFC, 0x17, 0x3C, 0x60, 0x15, 0x0C, 0x93, 0x7F]), # Exterior Combine Mode - ]), - ('object_gi_rupy', 0x01914000, 0x01914800, 0x198, # Huge Rupee -> Silver Rupee - [ + )), + ('object_gi_rupy', 0x01914000, 0x01914800, 0x198, ( # Huge Rupee -> Silver Rupee (0x052C, [0xAA, 0xAA, 0xAA]), # Inner Primary Color? (0x0534, [0x5A, 0x5A, 0x5A]), # Inner Env Color? (0x05CC, [0xFF, 0xFF, 0xFF]), # Outer Primary Color? (0x05D4, [0xFF, 0xFF, 0xFF]), # Outer Env Color? - ]), - ] + )), + ) # Add the new models to the extended object file. for name, start, end, object_id, patches in zobj_patches: @@ -143,15 +141,15 @@ def patch_rom(spoiler: Spoiler, world: World, rom: Rom) -> Rom: # texture list. See textures.h for texture IDs # ID, texture_name, Rom Address CI4 Pallet Addr Size Patching function Patch file (None for default) crate_textures = [ - (1, 'texture_pot_gold', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_gold_rgba16_patch.bin'), - (2, 'texture_pot_key', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_key_rgba16_patch.bin'), - (3, 'texture_pot_bosskey', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_bosskey_rgba16_patch.bin'), - (4, 'texture_pot_skull', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_skull_rgba16_patch.bin'), - (5, 'texture_crate_default', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, None), - (6, 'texture_crate_gold', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_gold_rgba16_patch.bin'), - (7, 'texture_crate_key', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_key_rgba16_patch.bin'), - (8, 'texture_crate_skull', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_skull_rgba16_patch.bin'), - (9, 'texture_crate_bosskey', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_bosskey_rgba16_patch.bin'), + ( 1, 'texture_pot_gold', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_gold_rgba16_patch.bin'), + ( 2, 'texture_pot_key', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_key_rgba16_patch.bin'), + ( 3, 'texture_pot_bosskey', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_bosskey_rgba16_patch.bin'), + ( 4, 'texture_pot_skull', 0x01738000, None, 2048, rgba16_patch, 'textures/pot/pot_skull_rgba16_patch.bin'), + ( 5, 'texture_crate_default', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, None), + ( 6, 'texture_crate_gold', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_gold_rgba16_patch.bin'), + ( 7, 'texture_crate_key', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_key_rgba16_patch.bin'), + ( 8, 'texture_crate_skull', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_skull_rgba16_patch.bin'), + ( 9, 'texture_crate_bosskey', 0x18B6020, 0x018B6000, 4096, ci4_rgba16patch_to_ci8, 'textures/crate/crate_bosskey_rgba16_patch.bin'), (10, 'texture_smallcrate_gold', 0xF7ECA0, None, 2048, rgba16_patch, 'textures/crate/smallcrate_gold_rgba16_patch.bin' ), (11, 'texture_smallcrate_key', 0xF7ECA0, None, 2048, rgba16_patch, 'textures/crate/smallcrate_key_rgba16_patch.bin'), (12, 'texture_smallcrate_skull', 0xF7ECA0, None, 2048, rgba16_patch, 'textures/crate/smallcrate_skull_rgba16_patch.bin'), @@ -336,7 +334,7 @@ def make_bytes(txt: str, size: int) -> list[int]: rom.write_bytes(0xCD5E76, [0x0E, 0xDC]) rom.write_bytes(0xCD5E12, [0x0E, 0xDC]) - # Cutscene for all medallions never triggers when leaving shadow or spirit temples(hopefully stops warp to colossus on shadow completion with boss reward shuffle) + # Cutscene for all medallions never triggers when leaving shadow or spirit temples (hopefully stops warp to colossus on shadow completion with boss reward shuffle) rom.write_byte(0xACA409, 0xAD) rom.write_byte(0xACA49D, 0xCE) @@ -345,7 +343,6 @@ def make_bytes(txt: str, size: int) -> list[int]: rom.write_byte(0xEFCBA7, 0x08) rom.write_byte(0xEFE7C7, 0x05) #rom.write_byte(0xEFEAF7, 0x08) - #rom.write_byte(0xEFE7C7, 0x05) rom.write_bytes(0xEFE938, [0x00, 0x00, 0x00, 0x00]) rom.write_bytes(0xEFE948, [0x00, 0x00, 0x00, 0x00]) rom.write_bytes(0xEFE950, [0x00, 0x00, 0x00, 0x00]) @@ -355,10 +352,12 @@ def make_bytes(txt: str, size: int) -> list[int]: rom.write_bytes(0x1FC0CF8, block_code) # songs as items flag - songs_as_items = world.settings.shuffle_song_items != 'song' or \ - world.distribution.song_as_items or \ - any(name in song_list and record.count for name, record in world.settings.starting_items.items()) or \ - world.settings.shuffle_individual_ocarina_notes + songs_as_items = ( + world.settings.shuffle_song_items != 'song' + or world.distribution.song_as_items + or any(name in song_list and record.count for name, record in world.settings.starting_items.items()) + or world.settings.shuffle_individual_ocarina_notes + ) if songs_as_items: rom.write_byte(rom.sym('SONGS_AS_ITEMS'), 1) @@ -692,7 +691,7 @@ def make_bytes(txt: str, size: int) -> list[int]: rom.write_bytes(0x292D810, [0x00, 0x02, 0x00, 0x3C]) rom.write_bytes(0x292D924, [0xFF, 0xFF, 0x00, 0x14, 0x00, 0x96, 0xFF, 0xFF]) - # Speed Pushing of All Pushable Objects + # Speed Pushing of All Pushable Objects (other than armos statues, which are handled in ASM) rom.write_bytes(0xDD2B86, [0x40, 0x80]) # block speed rom.write_bytes(0xDD2D26, [0x00, 0x01]) # block delay rom.write_bytes(0xDD9682, [0x40, 0x80]) # milk crate speed @@ -736,7 +735,7 @@ def make_bytes(txt: str, size: int) -> list[int]: # Ruto never disappears from Jabu Jabu's Belly rom.write_byte(0xD01EA3, 0x00) - # Shift octorock in jabu forward + # Shift octorok in jabu forward rom.write_bytes(0x275906E, [0xFF, 0xB3, 0xFB, 0x20, 0xF9, 0x56]) # Move fire/forest temple switches down 1 unit to make it easier to press @@ -918,14 +917,12 @@ def make_bytes(txt: str, size: int) -> list[int]: for address in short_item_descriptions: rom.write_byte(address, 0x02) - et_original = rom.read_bytes(0xB6FBF0, 4 * 0x0614) - exit_updates = [] def generate_exit_lookup_table() -> dict[int, list[int]]: # Assumes that the last exit on a scene's exit list cannot be 0000 exit_table = { - 0x0028: [0xAC95C2] # Jabu with the fish is entered from a cutscene hardcode + 0x0028: [0xAC95C2], # Jabu with the fish is entered from a cutscene hardcode } def add_scene_exits(scene_start: int, offset: int = 0) -> None: @@ -1065,7 +1062,7 @@ def set_entrance_updates(entrances: Iterable[Entrance]) -> None: rom.write_byte(rom.sym('DISABLE_TIMERS'), 0x01) rom.write_int16s(0xB6D460, [0x0030, 0x0035, 0x0036]) # Change trade items revert table to prevent all reverts - if world.settings.adult_trade_shuffle or world.settings.item_pool_value in ['plentiful', 'ludicrous']: + if world.settings.adult_trade_shuffle or world.settings.item_pool_value in ('plentiful', 'ludicrous'): rom.write_int16(rom.sym('CFG_ADULT_TRADE_SHUFFLE'), 0x0001) move_fado_in_lost_woods(rom) if world.settings.shuffle_child_trade or world.settings.logic_rules == 'glitched': @@ -1128,9 +1125,10 @@ def set_entrance_updates(entrances: Iterable[Entrance]) -> None: ) set_entrance_updates(entrance for entrance in world.get_shufflable_entrances() if entrance.shuffled or (patch_blue_warps and entrance.type == 'BlueWarp')) - for k, v in [(k, v) for k, v in exit_updates if k in exit_table]: - for addr in exit_table[k]: - rom.write_int16(addr, v) + for k, v in exit_updates: + if k in exit_table: + for addr in exit_table[k]: + rom.write_int16(addr, v) # Fix text for Pocket Cucco. rom.write_byte(0xBEEF45, 0x0B) @@ -1338,7 +1336,7 @@ def calculate_traded_flags(world): traded_flags = 0 reverting_item_map = { "Cojiro": ["Odd Mushroom"], - "Prescription": ["Eyeball Frog", "Eyedrops"] + "Prescription": ["Eyeball Frog", "Eyedrops"], } if world.adult_trade_starting_inventory: trade_item = world.adult_trade_starting_inventory @@ -1363,7 +1361,7 @@ def calculate_traded_flags(world): rom.write_byte(rom.sym('COMPLETE_MASK_QUEST'), 1) if world.skip_child_zelda: - if all(trade_item not in world.settings.shuffle_child_trade for trade_item in ['Weird Egg', 'Chicken']): + if all(trade_item not in world.settings.shuffle_child_trade for trade_item in ('Weird Egg', 'Chicken')): save_context.write_bits(0x0ED7, 0x04) # "Obtained Malon's Item" save_context.write_bits(0x0ED7, 0x08) # "Woke Talon in castle" save_context.write_bits(0x0ED7, 0x10) # "Talon has fled castle" @@ -1515,7 +1513,7 @@ def calculate_traded_flags(world): # start with maps/compasses if world.settings.shuffle_mapcompass == 'startwith': - for dungeon in ['deku', 'dodongo', 'jabu', 'forest', 'fire', 'water', 'spirit', 'shadow', 'botw', 'ice']: + for dungeon in ('deku', 'dodongo', 'jabu', 'forest', 'fire', 'water', 'spirit', 'shadow', 'botw', 'ice'): save_context.addresses['dungeon_items'][dungeon]['compass'].value = True save_context.addresses['dungeon_items'][dungeon]['map'].value = True @@ -1704,7 +1702,29 @@ def calculate_traded_flags(world): if locations: # Location types later in the list will be preferred over earlier ones or ones not in the list. # This ensures that if the region behind the boss door is a boss arena, the medallion or stone will be used. - priority_types = ("Freestanding", "ActorOverride", "RupeeTower", "Pot", "Crate", "FlyingPot", "SmallCrate", "Beehive", "SilverRupee", "GS Token", "GrottoScrub", "Scrub", "Shop", "NPC", "Collectable", "Chest", "Cutscene", "Song", "BossHeart", "Boss") + priority_types = ( + "Freestanding", + "ActorOverride", + "RupeeTower", + "Pot", + "Crate", + "FlyingPot", + "SmallCrate", + "Beehive", + "SilverRupee", + "GS Token", + "GrottoScrub", + "Scrub", + "Shop", + "MaskShop", + "NPC", + "Collectable", + "Chest", + "Cutscene", + "Song", + "BossHeart", + "Boss", + ) best_type = max((location.type for location in locations), key=lambda type: priority_types.index(type) if type in priority_types else -1) location = random.choice(list(filter(lambda loc: loc.type == best_type, locations))) break @@ -1804,8 +1824,7 @@ def calculate_traded_flags(world): # Make the cursed skulltula people come down instantly when entering if skull hints are on. # Change lui $at, 0x4320 to lui $at, 0x44C8 - if ('10_skulltulas' in world.settings.misc_hints or '20_skulltulas' in world.settings.misc_hints or '30_skulltulas' in world.settings.misc_hints or - '40_skulltulas' in world.settings.misc_hints or '50_skulltulas' in world.settings.misc_hints): + if any(hint_type in world.settings.misc_hints for hint_type in ('10_skulltulas', '20_skulltulas', '30_skulltulas', '40_skulltulas', '50_skulltulas')): rom.write_int16(0xEA185A, 0x44C8) # Patch freestanding items @@ -2443,7 +2462,7 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p repack_messages(rom, messages, permutation) # output a text dump, for testing... - #with open('keysanity_' + str(world.settings.seed) + '_dump.txt', 'w', encoding='utf-16') as f: + #with open('messages_' + str(world.settings.seed) + '_dump.txt', 'w', encoding='utf-16') as f: # messages = read_messages(rom) # f.write('item_message_strings = {\n') # for m in messages: @@ -2473,7 +2492,7 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p # Convenience hack to allow the player to keep the bunny hood on when interacting # with actors that give items (rolling goron, lab dive, etc.) for mask_segment_id in range(0x00, 0x3C): - if mask_segment_id not in [0x05, 0x06, 0x07, 0x0F, 0x15, 0x1C]: + if mask_segment_id not in (0x05, 0x06, 0x07, 0x0F, 0x15, 0x1C): rom.write_int16s(0x00B66E60 + mask_segment_id * 0x12, [0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000]) if world.settings.fix_broken_drops: @@ -2551,11 +2570,11 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p # Fix shadow temple redead shared flags for silver rupee shuffle if world.settings.shuffle_silver_rupees != 'vanilla': if not world.dungeon_mq['Shadow Temple']: # Patch for redeads in vanilla - rom.write_byte(0x280905E,0) - rom.write_byte(0x280906E,0) + rom.write_byte(0x280905E, 0) + rom.write_byte(0x280906E, 0) else: # Patch for redeads in MQ. ROM positions are calculated dyanmically by MQ.py but should remain static. - rom.write_byte(0x280CDDE,0) - rom.write_byte(0x280CDEE,0) + rom.write_byte(0x280CDDE, 0) + rom.write_byte(0x280CDEE, 0) # actually write the save table to rom world.distribution.give_items(world, save_context) @@ -2596,10 +2615,10 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p NUM_VANILLA_OBJECTS: int = 0x192 -def add_to_extended_object_table(rom: Rom, object_id: int, start_adddress: int, end_address: int) -> None: +def add_to_extended_object_table(rom: Rom, object_id: int, start_address: int, end_address: int) -> None: extended_id = object_id - NUM_VANILLA_OBJECTS - 1 extended_object_table = rom.sym('EXTENDED_OBJECT_TABLE') - rom.write_int32s(extended_object_table + extended_id * 8, [start_adddress, end_address]) + rom.write_int32s(extended_object_table + extended_id * 8, [start_address, end_address]) item_row_struct = struct.Struct('>BBHHBBIIhhBxxxI') # Match item_row_t in item_table.h @@ -2645,7 +2664,7 @@ def get_override_table(world: World): return list(filter(lambda val: val is not None, map(get_override_entry, world.get_filled_locations()))) -override_struct = struct.Struct('>BBHxxxxHBxHxx') # match override_t in get_items.c +override_struct = struct.Struct('>BBHxxxxHBxHxx') # match override_t in get_items.h def get_override_table_bytes(override_table): @@ -2674,7 +2693,7 @@ def get_override_entry(location: Location) -> Optional[OverrideEntry]: elif location.type == 'Chest': type = 1 default &= 0x1F - elif location.type in ['Freestanding', 'Pot', 'Crate', 'FlyingPot', 'SmallCrate', 'RupeeTower', 'Beehive', 'SilverRupee']: + elif location.type in ('Freestanding', 'Pot', 'Crate', 'FlyingPot', 'SmallCrate', 'RupeeTower', 'Beehive', 'SilverRupee'): type = 6 if not (isinstance(location.default, list) or isinstance(location.default, tuple)): raise Exception("Not right") @@ -3015,11 +3034,11 @@ def place_shop_items(rom: Rom, world: World, shop_items, messages, locations, in # Without complete mask quest, trading all masks will automatically # give it and set this as sold out. # With complete mask quest, it's free to take normally - if not world.settings.complete_mask_quest and \ + if (not world.settings.complete_mask_quest and ((location.vanilla_item == 'Mask of Truth' and 'Mask of Truth' in world.settings.shuffle_child_trade) or ('mask_shop' in world.settings.misc_hints and location.vanilla_item == 'Goron Mask' and 'Goron Mask' in world.settings.shuffle_child_trade) or ('mask_shop' in world.settings.misc_hints and location.vanilla_item == 'Zora Mask' and 'Zora Mask' in world.settings.shuffle_child_trade) or - ('mask_shop' in world.settings.misc_hints and location.vanilla_item == 'Gerudo Mask' and 'Gerudo Mask' in world.settings.shuffle_child_trade)): + ('mask_shop' in world.settings.misc_hints and location.vanilla_item == 'Gerudo Mask' and 'Gerudo Mask' in world.settings.shuffle_child_trade))): shop_item.func2 = 0x80863714 # override to custom CanBuy function to prevent purchase before trade quest complete message_id = (shop_id - 0x32) * 2 diff --git a/Plandomizer.py b/Plandomizer.py index 9a3a047ef..14a002bc8 100644 --- a/Plandomizer.py +++ b/Plandomizer.py @@ -144,7 +144,7 @@ def update(self, src_dict: dict[str, Any], update_all: bool = False) -> None: super().update(src_dict, update_all) if self.count < 0: raise ValueError("Count cannot be negative in a ItemPoolRecord.") - if self.type not in ['add', 'remove', 'set']: + if self.type not in ('add', 'remove', 'set'): raise ValueError("Type must be 'add', 'remove', or 'set' in a ItemPoolRecord.") @@ -368,8 +368,8 @@ def pattern_matcher(self, pattern: str | list[str]) -> Callable[[str], bool]: if major_hearts: self.major_group += ['Heart Container', 'Piece of Heart', 'Piece of Heart (Treasure Chest Game)'] if self.distribution.settings.shuffle_smallkeys == 'keysanity': - for dungeon in ['Bottom of the Well', 'Forest Temple', 'Fire Temple', 'Water Temple', - 'Shadow Temple', 'Spirit Temple', 'Gerudo Training Ground', 'Ganons Castle']: + for dungeon in ('Bottom of the Well', 'Forest Temple', 'Fire Temple', 'Water Temple', + 'Shadow Temple', 'Spirit Temple', 'Gerudo Training Ground', 'Ganons Castle'): if dungeon in self.distribution.settings.key_rings: self.major_group.append(f"Small Key Ring ({dungeon})") else: @@ -540,7 +540,7 @@ def alter_pool(self, world: World, pool: list[str]) -> list[str]: elif child_trade_matcher(item_name) and item_name not in world.settings.shuffle_child_trade: remove_trade.append(item_name) continue - elif child_trade_matcher(item_name) and world.settings.item_pool_value not in ['plentiful', 'ludicrous']: + elif child_trade_matcher(item_name) and world.settings.item_pool_value not in ('plentiful', 'ludicrous'): self.item_pool[item_name].count = 1 continue predicate = self.pattern_matcher(item_name) @@ -554,14 +554,14 @@ def alter_pool(self, world: World, pool: list[str]) -> list[str]: for item in added_items: if bottle_matcher(item): bottles += 1 - elif adult_trade_matcher(item) and not (world.settings.item_pool_value in ['plentiful', 'ludicrous'] or world.settings.adult_trade_shuffle): + elif adult_trade_matcher(item) and not (world.settings.item_pool_value in ('plentiful', 'ludicrous') or world.settings.adult_trade_shuffle): self.pool_remove_item([pool], "#AdultTrade", 1) else: removed_items = self.pool_remove_item([pool], item_name, -add_count) for item in removed_items: if bottle_matcher(item): bottles -= 1 - elif adult_trade_matcher(item) and not (world.settings.item_pool_value in ['plentiful', 'ludicrous'] or world.settings.adult_trade_shuffle): + elif adult_trade_matcher(item) and not (world.settings.item_pool_value in ('plentiful', 'ludicrous') or world.settings.adult_trade_shuffle): self.pool_add_item(pool, "#AdultTrade", 1) for item in remove_trade: @@ -575,7 +575,7 @@ def alter_pool(self, world: World, pool: list[str]) -> list[str]: for item_name, record in self.starting_items.items(): if bottle_matcher(item_name): self.pool_remove_item([pool], "#Bottle", record.count) - elif item_name in ['Pocket Egg', 'Pocket Cucco'] and world.settings.adult_trade_shuffle: + elif item_name in ('Pocket Egg', 'Pocket Cucco') and world.settings.adult_trade_shuffle: try: if 'Pocket Egg' in world.settings.adult_trade_start: try: @@ -592,7 +592,7 @@ def alter_pool(self, world: World, pool: list[str]) -> list[str]: self.pool_remove_item([pool], "#AdultTrade", record.count) elif item_name == 'Ice Arrows' and world.settings.blue_fire_arrows: self.pool_remove_item([pool], "Blue Fire Arrows", record.count) - elif item_name in ['Weird Egg', 'Chicken'] and world.settings.shuffle_child_trade: + elif item_name in ('Weird Egg', 'Chicken') and world.settings.shuffle_child_trade: try: if 'Weird Egg' in world.settings.shuffle_child_trade: self.pool_remove_item([pool], "Weird Egg", record.count) @@ -950,30 +950,22 @@ def get_item(self, ignore_pools: list[int], item_pools: list[list[Item]], locati self.item_pool[removed_item.name].count -= 1 item = ItemFactory([record.item], world=world)[0] except KeyError: - raise RuntimeError( - 'Too many shop buy items were added to world %d, and not enough shop buy items are available in the item pool to be removed.' % ( - self.id + 1)) + raise RuntimeError(f'Too many shop buy items were added to world {self.id + 1}, and not enough shop buy items are available in the item pool to be removed.') elif record.item in item_groups['Bottle']: try: item = self.pool_replace_item(pool, "#Bottle", player_id, record.item, worlds) except KeyError: - raise RuntimeError( - 'Too many bottles were added to world %d, and not enough bottles are available in the item pool to be removed.' % ( - self.id + 1)) + raise RuntimeError(f'Too many bottles were added to world {self.id + 1}, and not enough bottles are available in the item pool to be removed.') elif record.item in item_groups['AdultTrade'] and not world.settings.adult_trade_shuffle: try: item = self.pool_replace_item(pool, "#AdultTrade", player_id, record.item, worlds) except KeyError: - raise RuntimeError( - 'Too many adult trade items were added to world %d, and not enough adult trade items are available in the item pool to be removed.' % ( - self.id + 1)) + raise RuntimeError(f'Too many adult trade items were added to world {self.id + 1}, and not enough adult trade items are available in the item pool to be removed.') elif record.item in item_groups['ChildTrade'] and record.item not in world.settings.shuffle_child_trade: try: item = self.pool_replace_item(pool, "#ChildTrade", player_id, record.item, worlds) except KeyError: - raise RuntimeError( - 'Too many child trade items were added to world %d, and not enough child trade items are available in the item pool to be removed.' % ( - self.id + 1)) + raise RuntimeError(f'Too many child trade items were added to world {self.id + 1}, and not enough child trade items are available in the item pool to be removed.') elif record.item == "Ice Arrows" and worlds[0].settings.blue_fire_arrows: raise ValueError('Cannot add Ice Arrows to item pool with Blue Fire Arrows enabled') elif record.item == "Blue Fire Arrows" and not worlds[0].settings.blue_fire_arrows: @@ -982,19 +974,16 @@ def get_item(self, ignore_pools: list[int], item_pools: list[list[Item]], locati try: item = self.pool_replace_item(item_pools, "#Junk", player_id, record.item, worlds) except KeyError: - raise RuntimeError( - 'Too many items were added to world %d, and not enough junk is available to be removed.' % (self.id + 1)) + raise RuntimeError(f'Too many items were added to world {self.id + 1}, and not enough junk is available to be removed.') except IndexError: - raise RuntimeError( - 'Unknown item %r being placed on location %s in world %d. %s' % (record.item, location, self.id + 1, build_close_match(record.item, 'item'))) + raise RuntimeError(f'Unknown item {record.item!r} being placed on location {location} in world {self.id + 1}. {build_close_match(record.item, "item")}') # Update item_pool after item is replaced if item.name not in self.item_pool: self.item_pool[item.name] = ItemPoolRecord() else: self.item_pool[item.name].count += 1 except IndexError: - raise RuntimeError( - 'Unknown item %r being placed on location %s in world %d. %s' % (record.item, location, self.id + 1, build_close_match(record.item, 'item'))) + raise RuntimeError(f'Unknown item {record.item!r} being placed on location {location} in world {self.id + 1}. {build_close_match(record.item, "item")}') # Ensure pool copy is persisted to real pool for i, new_pool in enumerate(pool): if new_pool: @@ -1283,7 +1272,7 @@ def reset(self) -> None: else: if item.item_name == 'Rutos Letter' and self.settings.zora_fountain != 'open': data['Rutos Letter'].count += 1 - elif item.item_name in ['Bottle', 'Rutos Letter']: + elif item.item_name in ('Bottle', 'Rutos Letter'): data['Bottle'].count += 1 else: raise KeyError("invalid special item: {}".format(item.item_name)) diff --git a/Region.py b/Region.py index 1e03f748c..8ce97dd1c 100644 --- a/Region.py +++ b/Region.py @@ -107,16 +107,19 @@ def can_fill(self, item: Item, manual: bool = False) -> bool: is_dungeon_restricted = False is_overworld_restricted = False - if item.type in ['Map', 'Compass', 'SmallKey', 'HideoutSmallKey', 'TCGSmallKey', 'BossKey', 'GanonBossKey', 'SilverRupee']: - shuffle_setting = (self.world.settings.shuffle_mapcompass if item.type in ['Map', 'Compass'] else - self.world.settings.shuffle_smallkeys if item.type == 'SmallKey' else - self.world.settings.shuffle_hideoutkeys if item.type == 'HideoutSmallKey' else - self.world.settings.shuffle_tcgkeys if item.type == 'TCGSmallKey' else - self.world.settings.shuffle_bosskeys if item.type == 'BossKey' else - self.world.settings.shuffle_ganon_bosskey if item.type == 'GanonBossKey' else - self.world.settings.shuffle_silver_rupees if item.type == 'SilverRupee' else None) - - is_self_dungeon_restricted = shuffle_setting in ['dungeon', 'vanilla'] and item.type not in ['HideoutSmallKey', 'TCGSmallKey'] + if item.type in ('Map', 'Compass', 'SmallKey', 'HideoutSmallKey', 'TCGSmallKey', 'BossKey', 'GanonBossKey', 'SilverRupee'): + shuffle_setting = ( + self.world.settings.shuffle_mapcompass if item.type in ('Map', 'Compass') else + self.world.settings.shuffle_smallkeys if item.type == 'SmallKey' else + self.world.settings.shuffle_hideoutkeys if item.type == 'HideoutSmallKey' else + self.world.settings.shuffle_tcgkeys if item.type == 'TCGSmallKey' else + self.world.settings.shuffle_bosskeys if item.type == 'BossKey' else + self.world.settings.shuffle_ganon_bosskey if item.type == 'GanonBossKey' else + self.world.settings.shuffle_silver_rupees if item.type == 'SilverRupee' else + None + ) + + is_self_dungeon_restricted = shuffle_setting in ('dungeon', 'vanilla') and item.type not in ('HideoutSmallKey', 'TCGSmallKey') is_self_region_restricted = [HintArea.GERUDO_FORTRESS, HintArea.THIEVES_HIDEOUT] if shuffle_setting == 'fortress' else None is_hint_color_restricted = [HintArea.for_dungeon(item.name).color] if shuffle_setting == 'regional' else None is_dungeon_restricted = shuffle_setting == 'any_dungeon' @@ -152,7 +155,4 @@ def get_scene(self) -> Optional[str]: return None def __str__(self) -> str: - return str(self.__unicode__()) - - def __unicode__(self) -> str: - return '%s' % self.name + return self.name diff --git a/Rom.py b/Rom.py index 4e9e730f1..0ba3419e8 100644 --- a/Rom.py +++ b/Rom.py @@ -87,10 +87,10 @@ def read_rom(self, input_file: str, output_file: Optional[str] = None, verify_cr rom_crc = list(self.buffer[0x10:0x18]) if rom_crc not in valid_crc: # Bad CRC validation - raise RuntimeError('ROM file %s is not a valid OoT 1.0 US ROM.' % input_file) - elif len(self.buffer) < 0x2000000 or len(self.buffer) > 0x4000000 or file_name[1].lower() not in ['.z64', '.n64']: + raise RuntimeError(f'ROM file {input_file} is not a valid OoT 1.0 US ROM.') + elif len(self.buffer) < 0x2000000 or len(self.buffer) > 0x4000000 or file_name[1].lower() not in ('.z64', '.n64'): # ROM is too big, or too small, or a bad type - raise RuntimeError('ROM file %s is not a valid OoT 1.0 US ROM.' % input_file) + raise RuntimeError(f'ROM file {input_file} is not a valid OoT 1.0 US ROM.') elif len(self.buffer) == 0x2000000: # If Input ROM is compressed, then Decompress it if output_file: @@ -112,9 +112,9 @@ def decompress_rom(self, input_file: str, output_file: str, verify_crc: bool = T else: subcall = [sub_dir + "Decompress32.exe", input_file, output_file] elif platform.system() == 'Linux': - if platform.machine() in ['arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l']: + if platform.machine() in ('arm64', 'aarch64', 'aarch64_be', 'armv8b', 'armv8l'): subcall = [sub_dir + "Decompress_ARM64", input_file, output_file] - elif platform.machine() in ['arm', 'armv7l', 'armhf']: + elif platform.machine() in ('arm', 'armv7l', 'armhf'): subcall = [sub_dir + "Decompress_ARM32", input_file, output_file] else: subcall = [sub_dir + "Decompress", input_file, output_file] diff --git a/SaveContext.py b/SaveContext.py index 7f7475ebe..197edb3bb 100644 --- a/SaveContext.py +++ b/SaveContext.py @@ -243,14 +243,14 @@ def write_save_table(self, rom: Rom) -> None: extended_table = [] for address, value in self.save_bits.items(): table = save_table - if(address >= Address.EXTENDED_CONTEXT_START): + if address >= Address.EXTENDED_CONTEXT_START: table = extended_table address -= Address.EXTENDED_CONTEXT_START if value != 0: table += [(address & 0xFF00) >> 8, address & 0xFF, 0x00, value] for address, value in self.save_bytes.items(): table = save_table - if(address >= Address.EXTENDED_CONTEXT_START): + if address >= Address.EXTENDED_CONTEXT_START: table = extended_table address -= Address.EXTENDED_CONTEXT_START table += [(address & 0xFF00) >> 8, address & 0xFF, 0x01, value] @@ -410,7 +410,7 @@ def give_item(self, world: World, item: str, count: int = 1) -> None: "Fire Temple": 'dungeon_items.fire.boss_key', "Water Temple": 'dungeon_items.water.boss_key', "Spirit Temple": 'dungeon_items.spirit.boss_key', - "Shadow Temple": 'dungeon_items.shadow.boss_key' + "Shadow Temple": 'dungeon_items.shadow.boss_key', } save_writes[dungeon][bk_names[dungeon]] = True else: diff --git a/SettingsList.py b/SettingsList.py index 76cd02065..f6b9ad10a 100644 --- a/SettingsList.py +++ b/SettingsList.py @@ -1463,9 +1463,9 @@ class SettingInfos: 'remove': 'Remove', 'vanilla': 'Vanilla Locations', 'dungeon': 'Own Dungeon', + 'regional': 'Regional', 'overworld': 'Overworld Only', 'any_dungeon': 'Any Dungeon', - 'regional': 'Regional', 'anywhere': 'Anywhere', }, gui_tooltip = '''\ @@ -1491,17 +1491,17 @@ class SettingInfos: 'Own Dungeon': Silver Rupees can only appear in their respective dungeon. + 'Regional': Silver Rupees can only appear in regions + near the original dungeon (including the dungeon + itself or other dungeons in the region). + The Wiki has a list of corresponding regions here. + 'Overworld Only': Silver Rupees can only appear outside of dungeons. 'Any Dungeon': Silver Rupees can only appear in a dungeon, but not necessarily the dungeon they are for. - 'Regional': Silver Rupees can only appear in regions - near the original dungeon (including the dungeon - itself or other dungeons in the region). - The Wiki has a list of corresponding regions here. - 'Anywhere': Silver Rupees can appear anywhere in the world. ''', @@ -2805,9 +2805,9 @@ class SettingInfos: ''', default = 'off', choices = { - 'off': 'Off', + 'off': 'Off', 'vanilla': 'Vanilla Behavior', - 'easy': 'Easier Behavior' + 'easy': 'Easier Behavior', }, shared = True, gui_params = { @@ -2815,7 +2815,7 @@ class SettingInfos: 'distribution': [ ('off', 1), ('vanilla', 1), - ('easy', 1) + ('easy', 1), ], }, ) @@ -3720,7 +3720,7 @@ class SettingInfos: default = 'right', choices = { 'off': 'Off', - 'left': 'On the left', + 'left': 'On the left', 'right': 'On the right', }, ) diff --git a/State.py b/State.py index fc1183fa3..fa8a6a8ca 100644 --- a/State.py +++ b/State.py @@ -153,7 +153,7 @@ def collect(self, item: Item) -> None: raise Exception(f"Item '{item.name}' lacks a `solver_id` and can not be used in `State.collect()`.") if 'Small Key Ring' in item.name and self.world.settings.keyring_give_bk: dungeon_name = item.name[:-1].split(' (', 1)[1] - if dungeon_name in ['Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple']: + if dungeon_name in ('Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple'): bk = f'Boss Key ({dungeon_name})' self.solv_items[ItemInfo.solver_ids[escape_name(bk)]] = 1 if item.alias and item.alias_id is not None: @@ -167,7 +167,7 @@ def remove(self, item: Item) -> None: raise Exception(f"Item '{item.name}' lacks a `solver_id` and can not be used in `State.remove()`.") if 'Small Key Ring' in item.name and self.world.settings.keyring_give_bk: dungeon_name = item.name[:-1].split(' (', 1)[1] - if dungeon_name in ['Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple']: + if dungeon_name in ('Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple'): bk = f'Boss Key ({dungeon_name})' self.solv_items[ItemInfo.solver_ids[escape_name(bk)]] = 0 if item.alias and item.alias_id is not None and self.solv_items[item.alias_id] > 0: @@ -181,7 +181,6 @@ def region_has_shortcuts(self, region_name: str) -> bool: return self.world.region_has_shortcuts(region_name) def has_all_notes_for_song(self, song: str) -> bool: - # Scarecrow needs 2 different notes if song == 'Scarecrow Song': return self.has_ocarina_buttons(2) @@ -217,5 +216,5 @@ def get_prog_items(self) -> dict[str, int]: if item.solver_id is not None}, **{event: self.solv_items[ItemInfo.solver_ids[event]] for event in self.world.event_items - if self.solv_items[ItemInfo.solver_ids[event]]} + if self.solv_items[ItemInfo.solver_ids[event]]}, } diff --git a/Utils.py b/Utils.py index 01152a947..09c61c47b 100644 --- a/Utils.py +++ b/Utils.py @@ -110,7 +110,7 @@ def compare_version(a: str, b: str) -> int: sa = get_version_bytes(a) sb = get_version_bytes(b) - for i in range(0,3): + for i in range(0, 3): if sa[i] > sb[i]: return 1 if sa[i] < sb[i]: diff --git a/World.py b/World.py index 26ad793b8..c8175b47c 100644 --- a/World.py +++ b/World.py @@ -56,15 +56,15 @@ def __init__(self, world_id: int, settings: Settings, resolve_randomized_setting self.distribution: WorldDistribution = settings.distribution.world_dists[world_id] # rename a few attributes... - self.keysanity: bool = settings.shuffle_smallkeys in ['keysanity', 'remove', 'any_dungeon', 'overworld', 'regional'] + self.keysanity: bool = settings.shuffle_smallkeys in ('keysanity', 'remove', 'any_dungeon', 'overworld', 'regional') self.shuffle_silver_rupees = settings.shuffle_silver_rupees != 'vanilla' self.check_beatable_only: bool = settings.reachable_locations != 'all' self.shuffle_special_interior_entrances: bool = settings.shuffle_interior_entrances == 'all' - self.shuffle_interior_entrances: bool = settings.shuffle_interior_entrances in ['simple', 'all'] + self.shuffle_interior_entrances: bool = settings.shuffle_interior_entrances in ('simple', 'all') self.shuffle_special_dungeon_entrances: bool = settings.shuffle_dungeon_entrances == 'all' - self.shuffle_dungeon_entrances: bool = settings.shuffle_dungeon_entrances in ['simple', 'all'] + self.shuffle_dungeon_entrances: bool = settings.shuffle_dungeon_entrances in ('simple', 'all') self.entrance_shuffle: bool = bool( self.shuffle_interior_entrances or settings.shuffle_grotto_entrances or self.shuffle_dungeon_entrances @@ -110,7 +110,7 @@ def __init__(self, world_id: int, settings: Settings, resolve_randomized_setting 'Water': False, 'Spirit': False, 'Shadow': False, - 'Light': False + 'Light': False, } # empty dungeons will be decided later @@ -154,7 +154,7 @@ def __missing__(self, dungeon_name: str) -> EmptyDungeonInfo: 'Water Temple': False, 'Spirit Temple': False, 'Shadow Temple': False, - 'Ganons Castle': False + 'Ganons Castle': False, } if resolve_randomized_settings: @@ -175,9 +175,8 @@ def __missing__(self, dungeon_name: str) -> EmptyDungeonInfo: self.settings.hint_dist = 'custom' self.hint_dist_user = self.settings.hint_dist_user - # Hack for legacy hint distributions from before the goal, dual and dual_always hint - # types was created. Keeps validation happy. - for hint_type in ('goal', 'dual', 'dual_always', 'entrance_always'): + # Allow omitting hint types that shouldn't be included + for hint_type in hint_dist_keys: if 'distribution' in self.hint_dist_user and hint_type not in self.hint_dist_user['distribution']: self.hint_dist_user['distribution'][hint_type] = {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} if 'use_default_goals' not in self.hint_dist_user: @@ -431,7 +430,7 @@ def resolve_random_settings(self) -> None: and ('starting_tod' not in dist_keys or self.distribution.distribution.src_dict['_settings']['starting_tod'] == 'random')): setting_info = SettingInfos.setting_infos['starting_tod'] - choices = [ch for ch in setting_info.choices if ch not in ['default', 'random']] + choices = [ch for ch in setting_info.choices if ch not in ('default', 'random')] self.settings.starting_tod = random.choice(choices) self.randomized_list.append('starting_tod') if (self.settings.starting_age == 'random' @@ -456,12 +455,12 @@ def resolve_random_settings(self) -> None: self.settings.dungeon_shortcuts = dungeons # Determine area with keyring + areas = ['Thieves Hideout', 'Treasure Chest Game', 'Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple', 'Bottom of the Well', 'Gerudo Training Ground', 'Ganons Castle'] if self.settings.key_rings_choice == 'random': - areas = ['Thieves Hideout', 'Treasure Chest Game', 'Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple', 'Bottom of the Well', 'Gerudo Training Ground', 'Ganons Castle'] self.settings.key_rings = random.sample(areas, random.randint(0, len(areas))) self.randomized_list.append('key_rings') elif self.settings.key_rings_choice == 'all': - self.settings.key_rings = ['Thieves Hideout', 'Treasure Chest Game', 'Forest Temple', 'Fire Temple', 'Water Temple', 'Shadow Temple', 'Spirit Temple', 'Bottom of the Well', 'Gerudo Training Ground', 'Ganons Castle'] + self.settings.key_rings = areas # Handle random Rainbow Bridge condition if (self.settings.bridge == 'random' @@ -524,7 +523,7 @@ def resolve_random_settings(self) -> None: for dungeon in mq_dungeon_pool: self.dungeon_mq[dungeon] = random.choice([True, False]) self.randomized_list.append('mq_dungeons_count') - elif self.settings.mq_dungeons_mode in ['mq', 'vanilla']: + elif self.settings.mq_dungeons_mode in ('mq', 'vanilla'): for dung in self.dungeon_mq.keys(): self.dungeon_mq[dung] = (self.settings.mq_dungeons_mode == 'mq') elif self.settings.mq_dungeons_mode != 'specific': @@ -655,7 +654,7 @@ def initialize_items(self, items: Optional[list[Item]] = None) -> None: item_dict = defaultdict(list) for item in items: item_dict[item.name].append(item) - if (self.settings.shuffle_hideoutkeys in ['fortress', 'regional'] and item.type == 'HideoutSmallKey') or (self.settings.shuffle_tcgkeys == 'regional' and item.type == 'TCGSmallKey'): + if (self.settings.shuffle_hideoutkeys in ('fortress', 'regional') and item.type == 'HideoutSmallKey') or (self.settings.shuffle_tcgkeys == 'regional' and item.type == 'TCGSmallKey'): item.priority = True for dungeon in self.dungeons: @@ -678,7 +677,7 @@ def initialize_items(self, items: Optional[list[Item]] = None) -> None: if dungeon_collection is not None and item not in dungeon_collection: dungeon_collection.append(item) - if shuffle_setting in ['any_dungeon', 'overworld', 'regional']: + if shuffle_setting in ('any_dungeon', 'overworld', 'regional'): item.priority = True def random_shop_prices(self) -> None: @@ -708,7 +707,7 @@ def random_shop_prices(self) -> None: def set_scrub_prices(self) -> None: # Get Deku Scrub Locations - scrub_locations = [location for location in self.get_locations() if location.type in ['Scrub', 'GrottoScrub']] + scrub_locations = [location for location in self.get_locations() if location.type in ('Scrub', 'GrottoScrub')] scrub_dictionary = {} for location in scrub_locations: if location.default not in scrub_dictionary: @@ -997,7 +996,7 @@ def set_goals(self) -> None: # generate a category/goal pair, though locations are not # guaranteed if the higher priority Bridge category contains # all required locations for GBK - if self.settings.shuffle_ganon_bosskey in ['dungeon', 'overworld', 'any_dungeon', 'keysanity', 'regional']: + if self.settings.shuffle_ganon_bosskey in ('dungeon', 'overworld', 'any_dungeon', 'keysanity', 'regional'): # Make priority even with trials as the goal is no longer centered around dungeon completion or collectibles gbk.priority = 30 gbk.goal_count = 1 @@ -1184,11 +1183,13 @@ def update_useless_areas(self, spoiler: Spoiler) -> None: # and stones are not considered here. This is not really an accurate # way of doing this, but it's the only way to allow dungeons to appear. # So barren hints do not include these dungeon rewards. - if location_hint in excluded_areas or \ - location.locked or \ - location.name in self.hint_exclusions or \ - location.item is None or \ - location.item.type in ('Event', 'DungeonReward'): + if ( + location_hint in excluded_areas + or location.locked + or location.name in self.hint_exclusions + or location.item is None + or location.item.type in ('Event', 'DungeonReward') + ): continue area = location_hint diff --git a/data/Hints/balanced.json b/data/Hints/balanced.json index fd9d1548d..c3ba5cdd2 100644 --- a/data/Hints/balanced.json +++ b/data/Hints/balanced.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 1}, - "woth": {"order": 4, "weight": 3.5, "fixed": 0, "copies": 1}, - "barren": {"order": 5, "weight": 2.0, "fixed": 0, "copies": 1}, - "entrance": {"order": 6, "weight": 3.0, "fixed": 0, "copies": 1}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 6.0, "fixed": 0, "copies": 1}, - "item": {"order": 9, "weight": 5.0, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 2.0, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, - "junk": {"order": 13, "weight": 3.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, - "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 1}, + "woth": {"order": 4, "weight": 3.5, "fixed": 0, "copies": 1}, + "barren": {"order": 5, "weight": 2.0, "fixed": 0, "copies": 1}, + "entrance": {"order": 6, "weight": 3.0, "fixed": 0, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 6.0, "fixed": 0, "copies": 1}, + "item": {"order": 9, "weight": 5.0, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 2.0, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, + "junk": {"order": 13, "weight": 3.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, + "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/bingo.json b/data/Hints/bingo.json index 6e3c16941..77ac0692c 100644 --- a/data/Hints/bingo.json +++ b/data/Hints/bingo.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, - "barren": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, - "entrance": {"order": 6, "weight": 0.0, "fixed": 0, "copies": 2}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, - "item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, - "song": {"order": 10, "weight": 0.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 11, "weight": 0.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 12, "weight": 0.0, "fixed": 0, "copies": 2}, - "junk": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 2}, - "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, + "barren": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, + "entrance": {"order": 6, "weight": 0.0, "fixed": 0, "copies": 2}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, + "item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, + "song": {"order": 10, "weight": 0.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 11, "weight": 0.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 12, "weight": 0.0, "fixed": 0, "copies": 2}, + "junk": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 2}, + "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/chaos.json b/data/Hints/chaos.json index 555a00e6d..f09384445 100644 --- a/data/Hints/chaos.json +++ b/data/Hints/chaos.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 1.0, "fixed": 0, "copies": 1}, - "always": {"order": 2, "weight": 1.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 3, "weight": 1.0, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 4, "weight": 1.0, "fixed": 0, "copies": 1}, - "woth": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 1}, - "goal": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 1}, - "barren": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 1}, - "item": {"order": 8, "weight": 1.0, "fixed": 0, "copies": 1}, - "sometimes": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, - "dual": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, - "song": {"order": 11, "weight": 1.0, "fixed": 0, "copies": 1}, - "overworld": {"order": 12, "weight": 1.0, "fixed": 0, "copies": 1}, - "dungeon": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, - "entrance": {"order": 14, "weight": 1.0, "fixed": 0, "copies": 1}, - "random": {"order": 15, "weight": 1.0, "fixed": 0, "copies": 1}, - "junk": {"order": 16, "weight": 1.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 17, "weight": 1.0, "fixed": 0, "copies": 1}, - "important_check": {"order": 18, "weight": 1.0, "fixed": 0, "copies": 1} + "trial": {"order": 1, "weight": 1.0, "fixed": 0, "copies": 1}, + "always": {"order": 2, "weight": 1.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 3, "weight": 1.0, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 4, "weight": 1.0, "fixed": 0, "copies": 1}, + "woth": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 1}, + "goal": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 1}, + "barren": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 1}, + "item": {"order": 8, "weight": 1.0, "fixed": 0, "copies": 1}, + "sometimes": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, + "dual": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, + "song": {"order": 11, "weight": 1.0, "fixed": 0, "copies": 1}, + "overworld": {"order": 12, "weight": 1.0, "fixed": 0, "copies": 1}, + "dungeon": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, + "entrance": {"order": 14, "weight": 1.0, "fixed": 0, "copies": 1}, + "random": {"order": 15, "weight": 1.0, "fixed": 0, "copies": 1}, + "junk": {"order": 16, "weight": 1.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 17, "weight": 1.0, "fixed": 0, "copies": 1}, + "important_check": {"order": 18, "weight": 1.0, "fixed": 0, "copies": 1} } } diff --git a/data/Hints/chaos_no_goal.json b/data/Hints/chaos_no_goal.json index 736e1def4..5dc83f304 100644 --- a/data/Hints/chaos_no_goal.json +++ b/data/Hints/chaos_no_goal.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 1.0, "fixed": 0, "copies": 1}, - "always": {"order": 2, "weight": 1.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 3, "weight": 1.0, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 4, "weight": 1.0, "fixed": 0, "copies": 1}, - "woth": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 1}, - "barren": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 1}, - "item": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 1}, - "sometimes": {"order": 8, "weight": 1.0, "fixed": 0, "copies": 1}, - "dual": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 1.0, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 1.0, "fixed": 0, "copies": 1}, - "entrance": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, - "random": {"order": 14, "weight": 1.0, "fixed": 0, "copies": 1}, - "junk": {"order": 15, "weight": 1.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 16, "weight": 1.0, "fixed": 0, "copies": 1}, - "important_check": {"order": 17, "weight": 1.0, "fixed": 0, "copies": 1}, - "goal": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 1.0, "fixed": 0, "copies": 1}, + "always": {"order": 2, "weight": 1.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 3, "weight": 1.0, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 4, "weight": 1.0, "fixed": 0, "copies": 1}, + "woth": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 1}, + "barren": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 1}, + "item": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 1}, + "sometimes": {"order": 8, "weight": 1.0, "fixed": 0, "copies": 1}, + "dual": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 1.0, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 1.0, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 1.0, "fixed": 0, "copies": 1}, + "entrance": {"order": 13, "weight": 1.0, "fixed": 0, "copies": 1}, + "random": {"order": 14, "weight": 1.0, "fixed": 0, "copies": 1}, + "junk": {"order": 15, "weight": 1.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 16, "weight": 1.0, "fixed": 0, "copies": 1}, + "important_check": {"order": 17, "weight": 1.0, "fixed": 0, "copies": 1}, + "goal": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/ddr.json b/data/Hints/ddr.json index 06871ed13..c9eaf2840 100644 --- a/data/Hints/ddr.json +++ b/data/Hints/ddr.json @@ -17,48 +17,49 @@ { "item": "Requiem of Spirit", "types": ["woth", "sometimes"] }, { "item": "Prelude of Light", "types": ["woth", "sometimes"] }, { "item": "Progressive Strength Upgrade", "types": ["woth", "sometimes"] }, - { "item": "Bow", "types": ["barren"]}, - { "item": "Bomb Bag", "types": ["barren"]}, - { "item": "Magic Meter", "types": ["barren"]} + { "item": "Bow", "types": ["barren"] }, + { "item": "Bomb Bag", "types": ["barren"] }, + { "item": "Magic Meter", "types": ["barren"] } + ], + "custom_goals": [ + { + "category": "path_of_magic", + "priority": 90, + "minimum_goals": 1, + "lock_entrances": [], + "goals": [ + { + "name": "Magic", + "hint_text": "Path of Magic", + "color": "Green", + "items": [ + {"name": "Magic Meter", "quantity": 2, "minimum": 1, "hintable": true} + ] + } + ] + } ], - "custom_goals": [ - { - "category": "path_of_magic", - "priority": 90, - "minimum_goals": 1, - "lock_entrances" : [], - "goals": [ - { - "name": "Magic", - "hint_text": "Path of Magic", - "color": "Green", - "items": [{"name": "Magic Meter", "quantity": 2, "minimum": 1, "hintable": true} - ] - } - ] - } - ], "dungeons_woth_limit": 2, "dungeons_barren_limit": 1, "named_items_required": true, "vague_named_items": false, "use_default_goals": false, "distribution": { - "trial": {"order": 1, "weight": 0.00, "fixed": 0, "copies": 1}, - "always": {"order": 2, "weight": 0.00, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 3.00, "fixed": 0, "copies": 2}, - "barren": {"order": 5, "weight": 3.00, "fixed": 0, "copies": 1}, - "entrance": {"order": 6, "weight": 1.00, "fixed": 0, "copies": 1}, - "sometimes": {"order": 7, "weight": 0.00, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 2.00, "fixed": 0, "copies": 1}, - "item": {"order": 9, "weight": 1.00, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 0.33, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 0.66, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 0.66, "fixed": 0, "copies": 1}, - "junk": {"order": 13, "weight": 0.00, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.00, "fixed": 0, "copies": 1}, - "goal": {"order": 3, "weight": 0.00, "fixed": 1, "copies": 2}, - "dual_always":{"order": 15, "weight": 0.00, "fixed": 0, "copies": 0}, - "dual": {"order": 16, "weight": 0.00, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.00, "fixed": 0, "copies": 1}, + "always": {"order": 2, "weight": 0.00, "fixed": 0, "copies": 2}, + "goal": {"order": 3, "weight": 0.00, "fixed": 1, "copies": 2}, + "woth": {"order": 4, "weight": 3.00, "fixed": 0, "copies": 2}, + "barren": {"order": 5, "weight": 3.00, "fixed": 0, "copies": 1}, + "entrance": {"order": 6, "weight": 1.00, "fixed": 0, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.00, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 2.00, "fixed": 0, "copies": 1}, + "item": {"order": 9, "weight": 1.00, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 0.33, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 0.66, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 0.66, "fixed": 0, "copies": 1}, + "junk": {"order": 13, "weight": 0.00, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.00, "fixed": 0, "copies": 1}, + "dual_always": {"order": 15, "weight": 0.00, "fixed": 0, "copies": 0}, + "dual": {"order": 16, "weight": 0.00, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/important_checks.json b/data/Hints/important_checks.json index 757340101..a89b0cf34 100644 --- a/data/Hints/important_checks.json +++ b/data/Hints/important_checks.json @@ -1,32 +1,34 @@ { - "name": "important checks", + "name": "important_checks", "gui_name": "Important Checks", "description": "Hint Distribution important check hints. 6 Path hints 1 each and 34 important check hints at 1 each telling you how many major items are in an area.", "add_locations": [], "remove_locations": [], "add_items": [], - "remove_items": [{ "item": "Zeldas Lullaby", "types": ["goal"]}], + "remove_items": [ + { "item": "Zeldas Lullaby", "types": ["goal"] } + ], "dungeons_woth_limit": 2, "dungeons_barren_limit": 1, "named_items_required": false, "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 0}, - "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 0}, - "goal": {"order": 3, "weight": 0.0, "fixed": 6, "copies": 1}, - "barren": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, - "entrance": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 100, "copies": 1}, - "important_check": {"order": 6, "weight": 0.0, "fixed": 34, "copies": 1}, - "random": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "named-item": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 0}, - "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 0}, + "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 0}, + "goal": {"order": 3, "weight": 0.0, "fixed": 6, "copies": 1}, + "barren": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, + "entrance": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 6, "weight": 0.0, "fixed": 34, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 100, "copies": 1}, + "named-item": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 0}, + "random": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} }, "groups": [], "disabled": [] diff --git a/data/Hints/league.json b/data/Hints/league.json index c1602449d..3357addbc 100644 --- a/data/Hints/league.json +++ b/data/Hints/league.json @@ -7,42 +7,42 @@ { "location": "Sheik in Kakariko", "types": ["always"] } ], "remove_locations": [ - {"location": "Sheik in Crater", "types": ["sometimes"]}, - {"location": "Song from Royal Familys Tomb", "types": ["sometimes"]}, - {"location": "Sheik in Forest", "types": ["sometimes"]}, - {"location": "Sheik at Temple", "types": ["sometimes"]}, - {"location": "Sheik at Colossus", "types": ["sometimes"]}, - {"location": "Sheik in Ice Cavern", "types": ["sometimes"]}, - {"location": "LH Sun", "types": ["sometimes"]}, - {"location": "HC Great Fairy Reward", "types": ["sometimes"]}, - {"location": "OGC Great Fairy Reward", "types": ["sometimes"]}, - {"location": "Kak 20 Gold Skulltula Reward", "types": ["sometimes"]}, - {"location": "GF HBA 1500 Points", "types": ["sometimes"]}, - {"location": "GC Maze Left Chest", "types": ["sometimes"]}, - {"location": "GV Chest", "types": ["sometimes"]}, - {"location": "Graveyard Royal Familys Tomb Chest", "types": ["sometimes"]}, - {"location": "GC Pot Freestanding PoH", "types": ["sometimes"]}, - {"location": "LH Lab Dive", "types": ["sometimes"]}, - {"location": "Water Temple Boss Key Chest", "types": ["sometimes"]}, - {"location": "Water Temple River Chest", "types": ["sometimes"]}, - {"location": "Gerudo Training Ground Maze Path Final Chest", "types": ["sometimes"]}, - {"location": "Spirit Temple Silver Gauntlets Chest", "types": ["sometimes"]}, - {"location": "Spirit Temple Mirror Shield Chest", "types": ["sometimes"]}, - {"location": "Shadow Temple Freestanding Key", "types": ["sometimes"]}, - {"location": "Ice Cavern Iron Boots Chest", "types": ["sometimes"]}, - {"location": "Ganons Castle Shadow Trial Golden Gauntlets Chest", "types": ["sometimes"]}, - {"location": "GV Pieces of Heart Ledges", "types": ["dual"]}, - {"location": "Graveyard Dampe Race Rewards", "types": ["dual"]}, - {"location": "Fire Temple Lower Loop", "types": ["dual"]}, - {"location": "ZR Frogs Rewards", "types": ["dual"]}, - {"location": "Deku Theater Rewards", "types": ["dual"]}, - {"location": "Bottom of the Well Dead Hand Room", "types": ["dual"]}, - {"location": "Spirit Temple Child Lower", "types": ["dual"]}, - {"location": "Spirit Temple Child Top", "types": ["dual"]}, - {"location": "Spirit Temple Adult Lower", "types": ["dual"]}, - {"location": "Shadow Temple Invisible Blades Chests", "types": ["dual"]}, - {"location": "Shadow Temple Spike Walls Room", "types": ["dual"]}, - {"location": "Ganons Castle Spirit Trial Chests", "types": ["dual"]} + { "location": "Sheik in Crater", "types": ["sometimes"] }, + { "location": "Song from Royal Familys Tomb", "types": ["sometimes"] }, + { "location": "Sheik in Forest", "types": ["sometimes"] }, + { "location": "Sheik at Temple", "types": ["sometimes"] }, + { "location": "Sheik at Colossus", "types": ["sometimes"] }, + { "location": "Sheik in Ice Cavern", "types": ["sometimes"] }, + { "location": "LH Sun", "types": ["sometimes"] }, + { "location": "HC Great Fairy Reward", "types": ["sometimes"] }, + { "location": "OGC Great Fairy Reward", "types": ["sometimes"] }, + { "location": "Kak 20 Gold Skulltula Reward", "types": ["sometimes"] }, + { "location": "GF HBA 1500 Points", "types": ["sometimes"] }, + { "location": "GC Maze Left Chest", "types": ["sometimes"] }, + { "location": "GV Chest", "types": ["sometimes"] }, + { "location": "Graveyard Royal Familys Tomb Chest", "types": ["sometimes"] }, + { "location": "GC Pot Freestanding PoH", "types": ["sometimes"] }, + { "location": "LH Lab Dive", "types": ["sometimes"] }, + { "location": "Water Temple Boss Key Chest", "types": ["sometimes"] }, + { "location": "Water Temple River Chest", "types": ["sometimes"] }, + { "location": "Gerudo Training Ground Maze Path Final Chest", "types": ["sometimes"] }, + { "location": "Spirit Temple Silver Gauntlets Chest", "types": ["sometimes"] }, + { "location": "Spirit Temple Mirror Shield Chest", "types": ["sometimes"] }, + { "location": "Shadow Temple Freestanding Key", "types": ["sometimes"] }, + { "location": "Ice Cavern Iron Boots Chest", "types": ["sometimes"] }, + { "location": "Ganons Castle Shadow Trial Golden Gauntlets Chest", "types": ["sometimes"] }, + { "location": "GV Pieces of Heart Ledges", "types": ["dual"] }, + { "location": "Graveyard Dampe Race Rewards", "types": ["dual"] }, + { "location": "Fire Temple Lower Loop", "types": ["dual"] }, + { "location": "ZR Frogs Rewards", "types": ["dual"] }, + { "location": "Deku Theater Rewards", "types": ["dual"] }, + { "location": "Bottom of the Well Dead Hand Room", "types": ["dual"] }, + { "location": "Spirit Temple Child Lower", "types": ["dual"] }, + { "location": "Spirit Temple Child Top", "types": ["dual"] }, + { "location": "Spirit Temple Adult Lower", "types": ["dual"] }, + { "location": "Shadow Temple Invisible Blades Chests", "types": ["dual"] }, + { "location": "Shadow Temple Spike Walls Room", "types": ["dual"] }, + { "location": "Ganons Castle Spirit Trial Chests", "types": ["dual"] } ], "add_items": [], "remove_items": [ @@ -55,23 +55,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, - "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, - "entrance": {"order": 6, "weight": 0.0, "fixed": 4, "copies": 2}, - "dual": {"order": 7, "weight": 1.5, "fixed": 0, "copies": 2}, - "sometimes": {"order": 8, "weight": 5.5, "fixed": 0, "copies": 2}, - "random": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, + "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, + "entrance": {"order": 6, "weight": 0.0, "fixed": 4, "copies": 2}, + "dual": {"order": 7, "weight": 1.5, "fixed": 0, "copies": 2}, + "sometimes": {"order": 8, "weight": 5.5, "fixed": 0, "copies": 2}, + "random": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/mw_path.json b/data/Hints/mw_path.json index 7711477e5..a478ef2e0 100644 --- a/data/Hints/mw_path.json +++ b/data/Hints/mw_path.json @@ -31,23 +31,23 @@ "use_default_goals": true, "upgrade_hints": "on", "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance": {"order": 3, "weight": 0.0, "fixed": 2, "copies": 2}, - "goal": {"order": 4, "weight": 0.0, "fixed": 7, "copies": 2}, - "sometimes": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 2}, - "important_check": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dual": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dual_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "woth": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "barren": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "random": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance": {"order": 3, "weight": 0.0, "fixed": 2, "copies": 2}, + "goal": {"order": 4, "weight": 0.0, "fixed": 7, "copies": 2}, + "sometimes": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 2}, + "important_check": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dual": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dual_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "woth": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "barren": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "random": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2} } } diff --git a/data/Hints/mw_woth.json b/data/Hints/mw_woth.json index 723a4890a..1c7215db6 100644 --- a/data/Hints/mw_woth.json +++ b/data/Hints/mw_woth.json @@ -31,23 +31,23 @@ "use_default_goals": true, "upgrade_hints": "on", "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance": {"order": 3, "weight": 0.0, "fixed": 2, "copies": 2}, - "woth": {"order": 4, "weight": 0.0, "fixed": 7, "copies": 2}, - "sometimes": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 2}, - "important_check": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dual": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dual_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "goal": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "barren": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "random": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance": {"order": 3, "weight": 0.0, "fixed": 2, "copies": 2}, + "woth": {"order": 4, "weight": 0.0, "fixed": 7, "copies": 2}, + "sometimes": {"order": 5, "weight": 1.0, "fixed": 0, "copies": 2}, + "important_check": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dual": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dual_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "goal": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "barren": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "random": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 0, "weight": 1.0, "fixed": 0, "copies": 2} } } diff --git a/data/Hints/scrubs.json b/data/Hints/scrubs.json index 188b78190..07ad7367f 100644 --- a/data/Hints/scrubs.json +++ b/data/Hints/scrubs.json @@ -20,24 +20,24 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, - "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, - "entrance": {"order": 6, "weight": 0.0, "fixed": 3, "copies": 2}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 100, "copies": 2}, - "random": {"order": 8, "weight": 9.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, - "goal": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, + "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, + "entrance": {"order": 6, "weight": 0.0, "fixed": 3, "copies": 2}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 100, "copies": 2}, + "random": {"order": 8, "weight": 9.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "goal": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} }, "groups": [], "disabled": [] diff --git a/data/Hints/strong.json b/data/Hints/strong.json index 668aace40..b8a9fb081 100644 --- a/data/Hints/strong.json +++ b/data/Hints/strong.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.00, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 2, "weight": 0.00, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.00, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 3.00, "fixed": 0, "copies": 2}, - "barren": {"order": 5, "weight": 3.00, "fixed": 0, "copies": 1}, - "entrance": {"order": 6, "weight": 1.00, "fixed": 0, "copies": 1}, - "sometimes": {"order": 7, "weight": 0.00, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 2.00, "fixed": 0, "copies": 1}, - "item": {"order": 9, "weight": 1.00, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 0.33, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 0.66, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 0.66, "fixed": 0, "copies": 1}, - "junk": {"order": 13, "weight": 0.00, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.00, "fixed": 0, "copies": 1}, - "goal": {"order": 15, "weight": 0.00, "fixed": 0, "copies": 1}, - "dual_always": {"order": 16, "weight": 0.00, "fixed": 0, "copies": 0}, - "dual": {"order": 17, "weight": 0.00, "fixed": 0, "copies": 0}, - "important_check": {"order": 18, "weight": 0.00, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.00, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 2, "weight": 0.00, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.00, "fixed": 0, "copies": 2}, + "woth": {"order": 4, "weight": 3.00, "fixed": 0, "copies": 2}, + "barren": {"order": 5, "weight": 3.00, "fixed": 0, "copies": 1}, + "entrance": {"order": 6, "weight": 1.00, "fixed": 0, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.00, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 2.00, "fixed": 0, "copies": 1}, + "item": {"order": 9, "weight": 1.00, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 0.33, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 0.66, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 0.66, "fixed": 0, "copies": 1}, + "junk": {"order": 13, "weight": 0.00, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.00, "fixed": 0, "copies": 1}, + "goal": {"order": 15, "weight": 0.00, "fixed": 0, "copies": 1}, + "dual_always": {"order": 16, "weight": 0.00, "fixed": 0, "copies": 0}, + "dual": {"order": 17, "weight": 0.00, "fixed": 0, "copies": 0}, + "important_check": {"order": 18, "weight": 0.00, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/tournament.json b/data/Hints/tournament.json index bfe84da5e..634ac55cf 100644 --- a/data/Hints/tournament.json +++ b/data/Hints/tournament.json @@ -24,23 +24,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, - "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, - "entrance": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 2}, - "sometimes": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 2}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, + "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, + "entrance": {"order": 6, "weight": 1.0, "fixed": 0, "copies": 2}, + "sometimes": {"order": 7, "weight": 1.0, "fixed": 0, "copies": 2}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/useless.json b/data/Hints/useless.json index 7985d5bc0..1b014f648 100644 --- a/data/Hints/useless.json +++ b/data/Hints/useless.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 0}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 0}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 0}, - "woth": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, - "barren": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, - "entrance": {"order": 6, "weight": 0.0, "fixed": 0, "copies": 0}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 0}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 0}, - "item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 0}, - "song": {"order": 10, "weight": 0.0, "fixed": 0, "copies": 0}, - "overworld": {"order": 11, "weight": 0.0, "fixed": 0, "copies": 0}, - "dungeon": {"order": 12, "weight": 0.0, "fixed": 0, "copies": 0}, - "junk": {"order": 13, "weight": 9.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 0}, - "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 0}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 0}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 0}, + "woth": {"order": 4, "weight": 0.0, "fixed": 0, "copies": 0}, + "barren": {"order": 5, "weight": 0.0, "fixed": 0, "copies": 0}, + "entrance": {"order": 6, "weight": 0.0, "fixed": 0, "copies": 0}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 0}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 0}, + "item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 0}, + "song": {"order": 10, "weight": 0.0, "fixed": 0, "copies": 0}, + "overworld": {"order": 11, "weight": 0.0, "fixed": 0, "copies": 0}, + "dungeon": {"order": 12, "weight": 0.0, "fixed": 0, "copies": 0}, + "junk": {"order": 13, "weight": 9.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 0}, + "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/very_strong.json b/data/Hints/very_strong.json index 1173023a7..94dd16967 100644 --- a/data/Hints/very_strong.json +++ b/data/Hints/very_strong.json @@ -12,23 +12,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 3.0, "fixed": 0, "copies": 2}, - "barren": {"order": 5, "weight": 3.0, "fixed": 0, "copies": 1}, - "entrance": {"order": 6, "weight": 2.0, "fixed": 0, "copies": 1}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 1}, - "item": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 0.5, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 1.5, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, - "junk": {"order": 13, "weight": 0.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, - "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, - "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 4, "weight": 3.0, "fixed": 0, "copies": 2}, + "barren": {"order": 5, "weight": 3.0, "fixed": 0, "copies": 1}, + "entrance": {"order": 6, "weight": 2.0, "fixed": 0, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 1}, + "item": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 0.5, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 1.5, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, + "junk": {"order": 13, "weight": 0.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, + "goal": {"order": 15, "weight": 0.0, "fixed": 0, "copies": 1}, + "dual_always": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 17, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 18, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/Hints/very_strong_magic.json b/data/Hints/very_strong_magic.json index 4a36a5227..219fb60c6 100644 --- a/data/Hints/very_strong_magic.json +++ b/data/Hints/very_strong_magic.json @@ -12,24 +12,24 @@ "vague_named_items": false, "use_default_goals": false, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 4, "weight": 3.0, "fixed": 0, "copies": 2}, - "barren": {"order": 5, "weight": 3.0, "fixed": 0, "copies": 1}, - "entrance": {"order": 6, "weight": 2.0, "fixed": 0, "copies": 1}, - "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 1}, - "item": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, - "song": {"order": 10, "weight": 0.5, "fixed": 0, "copies": 1}, - "overworld": {"order": 11, "weight": 1.5, "fixed": 0, "copies": 1}, - "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, - "junk": {"order": 13, "weight": 0.0, "fixed": 0, "copies": 1}, - "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, - "goal": {"order": 15, "weight": 0.0, "fixed": 1, "copies": 2}, - "important_check": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 4, "weight": 3.0, "fixed": 0, "copies": 2}, + "barren": {"order": 5, "weight": 3.0, "fixed": 0, "copies": 1}, + "entrance": {"order": 6, "weight": 2.0, "fixed": 0, "copies": 1}, + "sometimes": {"order": 7, "weight": 0.0, "fixed": 0, "copies": 1}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 1}, + "item": {"order": 9, "weight": 1.0, "fixed": 0, "copies": 1}, + "song": {"order": 10, "weight": 0.5, "fixed": 0, "copies": 1}, + "overworld": {"order": 11, "weight": 1.5, "fixed": 0, "copies": 1}, + "dungeon": {"order": 12, "weight": 1.5, "fixed": 0, "copies": 1}, + "junk": {"order": 13, "weight": 0.0, "fixed": 0, "copies": 1}, + "named-item": {"order": 14, "weight": 0.0, "fixed": 0, "copies": 1}, + "goal": {"order": 15, "weight": 0.0, "fixed": 1, "copies": 2}, + "important_check": {"order": 16, "weight": 0.0, "fixed": 0, "copies": 0} }, - "custom_goals": [ + "custom_goals": [ { "category": "path_of_magic", "priority": 90, @@ -40,7 +40,9 @@ "name": "Magic", "hint_text": "Path of Magic", "color": "Green", - "items": [{"name": "Magic Meter", "quantity": 2, "minimum": 1, "hintable": true}] + "items": [ + {"name": "Magic Meter", "quantity": 2, "minimum": 1, "hintable": true} + ] } ] } diff --git a/data/Hints/weekly.json b/data/Hints/weekly.json index 290e41ec9..c8a62b1b6 100644 --- a/data/Hints/weekly.json +++ b/data/Hints/weekly.json @@ -24,23 +24,23 @@ "vague_named_items": false, "use_default_goals": true, "distribution": { - "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, - "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, - "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, - "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, - "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, - "entrance": {"order": 6, "weight": 9.0, "fixed": 0, "copies": 2}, - "sometimes": {"order": 7, "weight": 9.0, "fixed": 0, "copies": 2}, - "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, - "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "named-item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, - "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, - "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, - "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} + "trial": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 2}, + "entrance_always": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 2}, + "always": {"order": 3, "weight": 0.0, "fixed": 0, "copies": 2}, + "goal": {"order": 4, "weight": 0.0, "fixed": 5, "copies": 2}, + "barren": {"order": 5, "weight": 0.0, "fixed": 3, "copies": 2}, + "entrance": {"order": 6, "weight": 9.0, "fixed": 0, "copies": 2}, + "sometimes": {"order": 7, "weight": 9.0, "fixed": 0, "copies": 2}, + "random": {"order": 8, "weight": 0.0, "fixed": 0, "copies": 2}, + "named-item": {"order": 9, "weight": 0.0, "fixed": 0, "copies": 2}, + "item": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "song": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "overworld": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dungeon": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "junk": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "woth": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 2}, + "dual_always": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "dual": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0}, + "important_check": {"order": 0, "weight": 0.0, "fixed": 0, "copies": 0} } } diff --git a/data/World/Bosses.json b/data/World/Bosses.json index a45db2d99..8526f2546 100644 --- a/data/World/Bosses.json +++ b/data/World/Bosses.json @@ -5,7 +5,7 @@ { "region_name": "Queen Gohma Boss Room", "scene": "Deku Tree Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Queen Gohma": "(Nuts or can_use(Slingshot)) and can_jumpslash" }, @@ -21,7 +21,7 @@ { "region_name": "King Dodongo Boss Room", "scene": "Dodongos Cavern Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat King Dodongo": " ((can_use(Megaton_Hammer) and logic_dc_hammer_floor) or @@ -41,7 +41,7 @@ { "region_name": "Barinade Boss Room", "scene": "Jabu Jabus Belly Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Barinade": "can_use(Boomerang) and (Sticks or Kokiri_Sword)" }, @@ -63,7 +63,7 @@ { "region_name": "Phantom Ganon Boss Room", "scene": "Forest Temple Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Phantom Ganon": " can_use(Hookshot) or can_use(Bow) or (can_use(Slingshot) and Kokiri_Sword)" @@ -80,7 +80,7 @@ { "region_name": "Volvagia Boss Room", "scene": "Fire Temple Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Volvagia": "can_use(Goron_Tunic) and can_use(Megaton_Hammer)" }, @@ -96,7 +96,7 @@ { "region_name": "Morpha Boss Room", "scene": "Water Temple Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Morpha": " can_use(Hookshot) or (logic_water_morpha and (is_adult or Kokiri_Sword))", @@ -114,7 +114,7 @@ { "region_name": "Bongo Bongo Boss Room", "scene": "Shadow Temple Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Bongo Bongo": " (Kokiri_Sword or is_adult) and @@ -133,7 +133,7 @@ { "region_name": "Twinrova Boss Room", "scene": "Spirit Temple Boss", - "is_boss_room": "True", + "is_boss_room": true, "events": { "Defeat Twinrova": "can_use(Mirror_Shield)" }, diff --git a/data/World/Overworld.json b/data/World/Overworld.json index 606d586e4..83e7671c8 100644 --- a/data/World/Overworld.json +++ b/data/World/Overworld.json @@ -2173,7 +2173,6 @@ }, { "region_name": "DMC Pierre Platform", - "font_color": "Red", "scene": "Death Mountain Crater", "hint": "DEATH_MOUNTAIN_CRATER", "locations": { diff --git a/data/settings_mapping.json b/data/settings_mapping.json index e7e6a2ba5..44c95856d 100644 --- a/data/settings_mapping.json +++ b/data/settings_mapping.json @@ -540,7 +540,7 @@ "text": "Items", "col_span": 2, "row_span": [5,5,5], - "settings": [ + "settings": [ "sfx_ocarina", "sfx_bombchu_move", "sfx_hover_boots", @@ -563,7 +563,7 @@ "settings": [ "sfx_link_adult", "sfx_link_child", - "sfx_link_unavailable_msg", + "sfx_link_unavailable_msg", "sfx_navi_overworld", "sfx_navi_enemy", "sfx_horse_neigh",