Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (not_paused_or_in_game_over_screen // checks if menu short == 0 and debug menu activator short == 0
- && (playing_horse_back_archery // if minigame state == 1
- || scene_setup < 4 // this is why wrong warps give RI
- || in_ranch_scene_setup_4) // ranch horse race
- && (no_textbox_on_screen // this causes nothing to update b or c
- || in_bombchu_bowling_with_textbox_on_screen)
- && (not_dead) // (global_context.0x10A20 == 0)
- && (current_cutscene < 0xFFF0
- || in_ranch_watching_cutscene_0) // ranch horse race intro cutscene
- {
- if (riding_epona // RC epona counts as riding epona
- || playing_shooting_gallery // this flag gets unset when outside shooting gallery (not just by stopping minigame)
- || playing_bombchu_bowling)
- {
- if (b != blank) { // this was to prevent putting item on b repeatedly
- // this check causes any item on epona with blank b
- if (temp_b == 255) { // if b is dimmed but not blank when you start playing game or riding epona, all buttons should be undimmed
- temp_b = 0 // undim b
- undim all c buttons
- }
- if (b != sling/bow/chu/blank) // if dont have minigame item or blank on b. also b was already checked to not be blank
- {
- temp_b = b // place original b item on temp_b
- if (playing_bombchu_bowling)
- b = bombchu // put bombchu on b
- else {
- b = bow // put bow on b
- if (playing_shooting_gallery)
- if(are_child)
- b = slingshot // put slingshot on b
- else // if riding epona
- if (bow slot == empty)
- b = blank // put blank on b
- }
- dim all c buttons
- }
- }
- }
- else if (in_chamber_of_sages)
- {
- // this just hides the HUD
- }
- else if (in_fishing_pond)
- {
- if (playing_fishing_minigame) // used to put rod on b when playing
- // this flag gets unset when outside fishing pond (not jsut by leaving through door)
- {
- if (b != fishing rod) // only do this once, when start minigame
- {
- temp_b = b // place orignal b item on temp_b
- b = fishing rod // put rod on b
- }
- }
- else if (fishing rod on b) // used to remove rod from b when stop
- // if enter pond with rod on b, push temp_b to b, and dim b+c
- {
- b = temp_b // restore original b item
- temp_b = 255 // dim b
- dim all c buttons
- }
- else { // used to dim buttons when in pond, when not playing
- // if enter pond without rod on b, dim b+c
- temp_b = 255 // dim b
- dim all c buttons
- }
- }
- else if (no_textbox_on_screen))
- {
- if (not_in_room_with_heat_timer && swimming_state_set)
- {
- temp_b = 255
- if (standing_underwater_with_iron_boots_for_4_seconds)
- dim all c buttons except hookshot/longshot
- else
- dim all c buttons
- }
- else if (crawling || climbing_on_ladder_or_wall) // down a or blank a
- {
- if (temp_b != 255)
- {
- temp_b = 255
- dim all c buttons
- }
- }
- else if (rented_horse_from_ingo) // event_inf is a table of shorts. the 1 bit is checked in the first entry of this table. so (event_inf[0] & 1 == 1)
- // this flag gets set when you say yes to ingo to ride a horse. then gets unset when you ask to leave the corral
- // this is how windy b works
- {
- if (riding_epona) // impossible to be true, because there is a check higher up for "riding epona"
- {
- if (b != bow && b != blank)
- if (bow_slot == empty)
- b = blank
- else
- b = bow
- }
- else
- {
- if (b == bow || b == blank)
- if (b != sword_item) // has to be true. sword item means "0x3B kokiri sword", "0x3C master sword", "0x3C biggoron sword/giant's knife", "0x55 giant's knife"
- b = temp_b
- else
- temp_b = b // impossible to reach?
- }
- dim all c buttons except ocarina
- }
- else
- {
- if (b_not_restricted_in_current_scene)
- {
- if (b == sling/bow/bombchu/blank)
- {
- if (b != blank || sword_not_equipped_flag == 0)
- b = temp_b
- }
- else if (temp_b == 255)
- {
- if (temp_b == 255 || temp_b == 0)
- temp_b = 0
- else
- b = temp_b
- }
- // if you have blank b and sword_not_equipped == 1 (sword hasn't been equipped), do nothing
- // if you have blank b and sword_not_equipped == 0 (sword has been equipped), b = temp b
- // if you have sling/bow/bombchu on b, b = temp b
- // else if b is dimmed, undim it
- // else do nothing
- }
- else if (b_restricted_in_current_scene)
- {
- if (b == sling/bow/bombchu/blank)
- {
- if (b != blank || sword_not_equipped_flag == 1)
- b = temp_b
- }
- else
- {
- temp_b = 255
- }
- // if you have blank b and sword_not_equipped == 1, do nothing
- // if you have blank b and sword_not_equipped == 0, b = temp b
- // if you have sling/bow/bombchu on b, b = temp b
- // else dim b
- }
- restrict certain buttons/items depending on current scene
- (this includes FW outside dungeons,
- c buttons and weapons in houses,
- ocarina in boss rooms, and more)
- // for a full list, go here: https://docs.google.com/spreadsheets/d/1SLJzamokLb7wDOaJh5x8DsxmMBy9oIYawyDN3dAWppw/edit#gid=577133954
- }
- }
- }
Add Comment
Please, Sign In to add comment