Skip to content

Commit

Permalink
dx track_ui complete cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Dec 11, 2024
1 parent 25c84be commit 78ac1d4
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 322 deletions.
12 changes: 6 additions & 6 deletions .dtacheckfns
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dump_tour_properties 0 0
dx_acceleration_mode 2 2
dx_active_player_var_reset 0 0
dx_add_player_sinks 0 0
dx_adjust_streak_popup_interval 2 2
dx_streak_interval 2 2
dx_apply_remote_textures 0 0
dx_apply_remote_track_speeds 0 0
dx_author_finder_var_reset 0 0
Expand All @@ -76,7 +76,7 @@ dx_check_first_note 1 1
dx_check_for_band_miss 0 0
dx_check_for_dupe 1 1
dx_check_for_high_score 1 1
dx_check_for_streak_popup 4 4
dx_check_for_streak_popup 3 3
dx_clean_solo_box 2 2
dx_cook_crowd 1 1
dx_countdown_var_reset 0 0
Expand Down Expand Up @@ -109,13 +109,13 @@ dx_get_this_countdown_array 0 0
dx_handle_final_note_report 4 4
dx_hide_everything 2 2
dx_hide_solo_box 2 2
dx_indv_note_streak 2 2
dx_indv_note_streak 6 6
dx_invalidate_scores 0 0
dx_log_objs 2 2
dx_log_objs_type 3 3
dx_log_writer 2 2
dx_midi_parser_var_reset 0 0
dx_miss_fc_remover 3 3
dx_miss_fc_remover 2 2
dx_modal_messenger 1 1
dx_modal_messenger_symbol 1 1
dx_modifier_dta_reader 0 0
Expand All @@ -130,7 +130,7 @@ dx_mtv_time_remaining_handler 0 0
dx_new_set_song_progress 1 1
dx_new_set_song_progress_backer 1 1
dx_noise_setter 1 1
dx_note_streak_popup 2 2
dx_note_streak_popup 3 3
dx_note_streak_remover 2 2
dx_od_ready_popup 1 1
dx_overdrive_color_var_reset 0 0
Expand Down Expand Up @@ -180,7 +180,7 @@ dx_special_char_sanitize 0 0
dx_state_pos_tracker 0 0
dx_state_setup 2 2
dx_store_meta_info 4 4
dx_store_note_hit_info 5 5
dx_store_note_hit_info 6 6
dx_streak_timer_gen 0 0
dx_sv_menu_logo_set 1 1
dx_sync_remote_textures 1 1
Expand Down
2 changes: 1 addition & 1 deletion _ark/dx/game/dx_game_reset_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
{set_var {sprint "dx_stop_od_" $i} FALSE}
{set_var {sprint $i "_missed_once"} FALSE}
{set_var {sprint $i "_caughtmissed"} FALSE}
{set_var {sprint "num_gems_combo_" $i} FALSE}
}
{foreach $entry (guitar bass drum keys real_guitar real_bass real_drum real_keys)
{set_var {sprint $entry "_milosong"} FALSE}
{set_var {sprint $entry "_firstnote"} FALSE}
{set_var {sprint $entry "_finalnote"} FALSE}
{set_var {sprint "num_gems_combo_" $entry} FALSE}
}
}
{func
Expand Down
4 changes: 2 additions & 2 deletions _ark/dx/track/callbacks/dx_track_callback_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

{func
dx_store_note_hit_info
($instrument $num_gems_hit $num_gems_combo $num_gems_pass $num_gems_miss)
($slot $instrument $num_gems_hit $num_gems_combo $num_gems_pass $num_gems_miss)
{set_var {sprint "num_gems_hit_" $instrument} $num_gems_hit}
{set_var {sprint "num_gems_combo_" $instrument} $num_gems_combo}
{set_var {sprint "num_gems_combo_" $slot} $num_gems_combo}
{set_var {sprint "num_gems_pass_" $instrument} $num_gems_pass}
{set_var {sprint "num_gems_miss_" $instrument} $num_gems_miss}
}
Expand Down
26 changes: 14 additions & 12 deletions _ark/dx/track/callbacks/dx_track_callbacks.dta
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
(miss ;when a note is missed (overstrum)
{beatmatch foreach_active_player $player ;handle adding the appropriate callbacks to each player
{unless {! {eval {var {sprint {$player instrument} "_firstnote"}}}}
{dx_miss_fc_remover $player {$player instrument} {{$player get_user} get_slot_num}}
{dx_miss_fc_remover $player {{$player get_user} get_slot_num}}
}
}
{dx_acceleration_mode {modifier_mgr is_modifier_active mod_fastermode} 0}
{dx_perfection_resetter {modifier_mgr is_modifier_active mod_perfection}}
)
(pass ;when a note is passed (ignored)
{beatmatch foreach_active_player $player
{dx_miss_fc_remover $player {$player instrument} {{$player get_user} get_slot_num}} ;logic to remove the fc indicator upon miss/pass
{dx_miss_fc_remover $player {{$player get_user} get_slot_num}} ;logic to remove the fc indicator upon miss/pass
}
{dx_acceleration_mode {modifier_mgr is_modifier_active mod_fastermode} 0}
{dx_perfection_resetter {modifier_mgr is_modifier_active mod_perfection}}
Expand Down Expand Up @@ -64,26 +64,26 @@
{$this check_fc} ;run the logic to check if we are in an fc or not
{set [num_gems_hit] {'+' [num_gems_hit] 1}} ;increment the notes hit counter
{set [num_gems_combo] {'+' [num_gems_combo] 1}} ;increment the notes comboed counter
{dx_store_note_hit_info [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{dx_check_for_streak_popup $dx_note_streak_popups [player] [track_instrument] [num_gems_combo]}
{dx_indv_note_streak $dx_track_streak [track_instrument]}
{dx_store_note_hit_info [slot] [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{dx_note_streak_popup $dx_note_streak_popups [player] [num_gems_combo]}
{dx_indv_note_streak $dx_track_streak [player] [slot] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
)
(miss ;when a note is missed (overstrum)
{if {dx_check_first_note [track_instrument]}
{set [num_gems_miss] {'+' [num_gems_miss] 1}} ;increment the notes missed counter
{set [num_gems_combo] 0} ;reset the notes comboed counter
{dx_store_note_hit_info [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{dx_store_note_hit_info [slot] [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{$this check_missed} ;run the logic to check our current misses
{dx_indv_note_streak $dx_track_streak [track_instrument]}
{dx_indv_note_streak $dx_track_streak [player] [slot] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
}
)
(pass ;when a note is passed (ignored)
{$this first_note}
{set [num_gems_pass] {'+' [num_gems_pass] 1}} ;increment the notes passed counter
{set [num_gems_combo] 0} ;reset the notes comboed counter
{dx_store_note_hit_info [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{dx_store_note_hit_info [slot] [track_instrument] [num_gems_hit] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
{$this check_missed} ;run the logic to check our current misses
{dx_indv_note_streak $dx_track_streak [track_instrument]}
{dx_indv_note_streak $dx_track_streak [player] [slot] [num_gems_combo] [num_gems_pass] [num_gems_miss]}
)
(first_note
{if {! {dx_check_first_note [track_instrument]}} ;if the first note has not been hit/missed/passed yet, track that the first note has been hit/missed/passed
Expand All @@ -103,12 +103,13 @@
(accuracy 0)
(negative 0)
(total 0)
(perfects 0)
(perfects_indicator
($accuracy)
{if {== $accuracy -8675309}
{if_else {> {+ [num_gems_miss] [num_gems_hit] [num_gems_pass]} 10}
{dx_perfect_hit $dx_perfects_indicator [track_instrument] [player] [slot] $dx_detailed_hit_stats [timing] hide}
{dx_perfect_hit $dx_perfects_indicator [track_instrument] [player] [slot] $dx_detailed_hit_stats [timing] oops}
{dx_perfect_hit $dx_perfects_indicator [track_instrument] [player] [slot] $dx_detailed_hit_stats [timing] invalid}
}
}
{if {!= $accuracy -8675309}
Expand All @@ -131,7 +132,8 @@
{cond
({&& {< [offset] 25} {> [offset] -25}}
{dx_perfect_hit $dx_perfects_indicator [track_instrument] [player] [slot] $dx_detailed_hit_stats [timing] perfect}
{dx_perfect_hit_ctr $dx_perfects_ctr [track_instrument] [player] [slot]}
{++ [perfects]} ;increment local counter
{dx_perfect_hit_ctr $dx_perfects_ctr [player] [slot] $dx_detailed_hit_stats [perfects]} ;fire on screen
)
({&& {< [offset] 40} {> [offset] -40}}
{dx_perfect_hit $dx_perfects_indicator [track_instrument] [player] [slot] $dx_detailed_hit_stats [timing] great}
Expand Down Expand Up @@ -179,7 +181,7 @@
{beatmatch foreach_active_player $player ;iterate through each player, grab the combo from the relevant callback, add them all together
{if {! {eval {var {sprint {$player instrument} "_finalnote"}}}}
{set $dx_streak 0}
{set $dx_streak {+ $dx_streak {eval {var {sprint "num_gems_combo_" {$player instrument}}}}}}
{set $dx_streak {+ $dx_streak {eval {var {sprint "num_gems_combo_" {{$player get_user} get_slot_num}}}}}}
}
}
)
Expand Down
4 changes: 2 additions & 2 deletions _ark/dx/track/track/dx_track_panel_handles.dta
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
{beatmatch foreach_active_player $player
{if {!= {$player instrument} vocals}
{dx_track_label dx_track_label_username $dx_track_username_size $dx_track_username_font $dx_track_username_alignment $dx_track_username_kerning {{$player get_user} get_slot_num} $dx_track_username_x $dx_track_username_y $dx_track_username_r $dx_track_username_g $dx_track_username_b TRUE}
{dx_track_label_perfect dx_track_label_perfect $dx_track_perfect_size $dx_track_perfect_font $dx_track_perfect_alignment $dx_track_perfect_kerning {{$player get_user} get_slot_num} $dx_track_perfect_x $dx_track_perfect_y $dx_track_perfect_r $dx_track_perfect_g $dx_track_perfect_b TRUE}
{dx_track_label_perfect_ctr dx_track_label_perfect_ctr $dx_track_perfect_ctr_size $dx_track_perfect_ctr_font $dx_track_perfect_ctr_alignment $dx_track_perfect_ctr_kerning {{$player get_user} get_slot_num} $dx_track_perfect_ctr_x $dx_track_perfect_ctr_y $dx_track_perfect_ctr_r $dx_track_perfect_ctr_g $dx_track_perfect_ctr_b TRUE}
{dx_track_label_streak dx_track_label_perfect $dx_track_perfect_size $dx_track_perfect_font $dx_track_perfect_alignment $dx_track_perfect_kerning {{$player get_user} get_slot_num} $dx_track_perfect_x $dx_track_perfect_y $dx_track_perfect_r $dx_track_perfect_g $dx_track_perfect_b TRUE}
{dx_track_label_streak dx_track_label_perfect_ctr $dx_track_perfect_ctr_size $dx_track_perfect_ctr_font $dx_track_perfect_ctr_alignment $dx_track_perfect_ctr_kerning {{$player get_user} get_slot_num} $dx_track_perfect_ctr_x $dx_track_perfect_ctr_y $dx_gold_ui_r $dx_gold_ui_g $dx_gold_ui_b TRUE}
{dx_track_label_streak dx_track_label_streak $dx_track_streak_size $dx_track_streak_font $dx_track_streak_alignment $dx_track_streak_kerning {{$player get_user} get_slot_num} $dx_track_streak_x $dx_track_streak_y $dx_track_streak_r $dx_track_streak_g $dx_track_streak_b TRUE}
{dx_track_label_overdrive dx_track_label_overdrive $dx_track_overdrive_size $dx_track_overdrive_font $dx_track_overdrive_alignment $dx_track_overdrive_kerning {{$player get_user} get_slot_num} $dx_track_overdrive_x $dx_track_overdrive_y $dx_track_overdrive_r $dx_track_overdrive_g $dx_track_overdrive_b TRUE}
}
Expand Down
2 changes: 1 addition & 1 deletion _ark/dx/track/track_ui/dx_track_fc_ui_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
{func
dx_miss_fc_remover
($player $instrument $slot)
($player $slot)
{unless {coop_track_panel get dx_is_nohud} ; this could break if someone were to disable performance mode mid song
{set_this coop_track_panel}
{if {! {eval {var {sprint $slot "_caughtmissed"}}}}
Expand Down
Loading

0 comments on commit 78ac1d4

Please sign in to comment.