diff --git a/_ark/ps4/dx/macros/dx_overshell_macros.dta b/_ark/ps4/dx/macros/dx_overshell_macros.dta index d110ca8..c2d5e38 100644 --- a/_ark/ps4/dx/macros/dx_overshell_macros.dta +++ b/_ark/ps4/dx/macros/dx_overshell_macros.dta @@ -111,4 +111,23 @@ {dx_file_rename "ps4/track/shared/particles/textures/particle_spark_cluster.bmp_ps4" "ps4/track/shared/particles/textures/particle_spark_cluster1.bmp_ps4"} {dx_file_rename "ps4/track/shared/particles/textures/particle_spark_dense.bmp_ps4" "ps4/track/shared/particles/textures/particle_spark_dense1.bmp_ps4"} {dx_file_rename "ps4/track/shared/particles/textures/particle_spiral_flare.bmp_ps4" "ps4/track/shared/particles/textures/particle_spiral_flare1.bmp_ps4"} +) + +#define WRITE_GEM_COLOR_DTAS +( + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/greenr.dta" {array ({/ $gemcolgr 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/greeng.dta" {array ({/ $gemcolgg 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/greenb.dta" {array ({/ $gemcolgb 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/redr.dta" {array ({/ $gemcolrr 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/redg.dta" {array ({/ $gemcolrg 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/redb.dta" {array ({/ $gemcolrb 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/yellowr.dta" {array ({/ $gemcolyr 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/yellowg.dta" {array ({/ $gemcolyg 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/yellowb.dta" {array ({/ $gemcolyb 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/bluer.dta" {array ({/ $gemcolbr 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/blueg.dta" {array ({/ $gemcolbg 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/blueb.dta" {array ({/ $gemcolbb 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/oranger.dta" {array ({/ $gemcolor 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/orangeg.dta" {array ({/ $gemcolog 255})}} + {write_file "data:/GoldHEN/RB4DX/settings/theme/gem/colors/orangeb.dta" {array ({/ $gemcolob 255})}} ) \ No newline at end of file diff --git a/_ark/ps4/dx/overshell/dx_slider_states.dta b/_ark/ps4/dx/overshell/dx_slider_states.dta index 7b44779..a9d94a8 100644 --- a/_ark/ps4/dx/overshell/dx_slider_states.dta +++ b/_ark/ps4/dx/overshell/dx_slider_states.dta @@ -59,4 +59,371 @@ (on_cancel {$this show_state kState_RB4DXVisSettings} {$this trigger_cancel_effects}) +) + +#define RGB_DATA +( + {switch $gemchanged + ("Green" + {switch $gemcolchanged + (R + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolgr} ("+" "0" "-")} + ) + (G + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolgg} ("+" "0" "-")} + ) + (B + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolgb} ("+" "0" "-")} + ) + } + ) + ("Red" + {switch $gemcolchanged + (R + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolrr} ("+" "0" "-")} + ) + (G + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolrg} ("+" "0" "-")} + ) + (B + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolrb} ("+" "0" "-")} + ) + } + ) + ("Yellow" + {switch $gemcolchanged + (R + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolyr} ("+" "0" "-")} + ) + (G + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolyg} ("+" "0" "-")} + ) + (B + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolyb} ("+" "0" "-")} + ) + } + ) + ("Blue" + {switch $gemcolchanged + (R + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolbr} ("+" "0" "-")} + ) + (G + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolbg} ("+" "0" "-")} + ) + (B + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolbb} ("+" "0" "-")} + ) + } + ) + ("Orange" + {switch $gemcolchanged + (R + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolor} ("+" "0" "-")} + ) + (G + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolog} ("+" "0" "-")} + ) + (B + {$this setup_confirm_actions {sprintf "Gem Color: %d" $gemcolob} ("+" "0" "-")} + ) + } + ) + } +) +#define RGB_ADD +( + {switch $gemchanged + ("Green" + {switch $gemcolchanged + (R + {unless {> {+ $gemcolgr 1} 255} + {set $gemcolgr {+ $gemcolgr 1}} + } + ) + (G + {unless {> {+ $gemcolgg 1} 255} + {set $gemcolgg {+ $gemcolgg 1}} + } + ) + (B + {unless {> {+ $gemcolgb 1} 255} + {set $gemcolgb {+ $gemcolgb 1}} + } + ) + } + ) + ("Red" + {switch $gemcolchanged + (R + {unless {> {+ $gemcolrr 1} 255} + {set $gemcolrr {+ $gemcolrr 1}} + } + ) + (G + {unless {> {+ $gemcolrg 1} 255} + {set $gemcolrg {+ $gemcolrg 1}} + } + ) + (B + {unless {> {+ $gemcolrb 1} 255} + {set $gemcolrb {+ $gemcolrb 1}} + } + ) + } + ) + ("Yellow" + {switch $gemcolchanged + (R + {unless {> {+ $gemcolyr 1} 255} + {set $gemcolyr {+ $gemcolyr 1}} + } + ) + (G + {unless {> {+ $gemcolyg 1} 255} + {set $gemcolyg {+ $gemcolyg 1}} + } + ) + (B + {unless {> {+ $gemcolyb 1} 255} + {set $gemcolyb {+ $gemcolyb 1}} + } + ) + } + ) + ("Blue" + {switch $gemcolchanged + (R + {unless {> {+ $gemcolbr 1} 255} + {set $gemcolbr {+ $gemcolbr 1}} + } + ) + (G + {unless {> {+ $gemcolbg 1} 255} + {set $gemcolbg {+ $gemcolbg 1}} + } + ) + (B + {unless {> {+ $gemcolbb 1} 255} + {set $gemcolbb {+ $gemcolbb 1}} + } + ) + } + ) + ("Orange" + {switch $gemcolchanged + (R + {unless {> {+ $gemcolor 1} 255} + {set $gemcolor {+ $gemcolor 1}} + } + ) + (G + {unless {> {+ $gemcolgg 1} 255} + {set $gemcolog {+ $gemcolog 1}} + } + ) + (B + {unless {> {+ $gemcolgb 1} 255} + {set $gemcolob {+ $gemcolob 1}} + } + ) + } + ) + } +) +#define RGB_SUB +( + {switch $gemchanged + ("Green" + {switch $gemcolchanged + (R + {unless {< {- $gemcolgr 1} 0} + {set $gemcolgr {- $gemcolgr 1}} + } + ) + (G + {unless {< {- $gemcolgg 1} 0} + {set $gemcolgg {- $gemcolgg 1}} + } + ) + (B + {unless {< {- $gemcolgb 1} 0} + {set $gemcolgb {- $gemcolgb 1}} + } + ) + } + ) + ("Red" + {switch $gemcolchanged + (R + {unless {< {<- $gemcolrr 1} 0} + {set $gemcolrr {<- $gemcolrr 1}} + } + ) + (G + {unless {< {<- $gemcolrg 1} 0} + {set $gemcolrg {<- $gemcolrg 1}} + } + ) + (B + {unless {< {<- $gemcolrb 1} 0} + {set $gemcolrb {<- $gemcolrb 1}} + } + ) + } + ) + ("Yellow" + {switch $gemcolchanged + (R + {unless {< {<- $gemcolyr 1} 0} + {set $gemcolyr {<- $gemcolyr 1}} + } + ) + (G + {unless {< {<- $gemcolyg 1} 0} + {set $gemcolyg {<- $gemcolyg 1}} + } + ) + (B + {unless {< {<- $gemcolyb 1} 0} + {set $gemcolyb {<- $gemcolyb 1}} + } + ) + } + ) + ("Blue" + {switch $gemcolchanged + (R + {unless {< {<- $gemcolbr 1} 0} + {set $gemcolbr {<- $gemcolbr 1}} + } + ) + (G + {unless {< {<- $gemcolbg 1} 0} + {set $gemcolbg {<- $gemcolbg 1}} + } + ) + (B + {unless {< {<- $gemcolbb 1} 0} + {set $gemcolbb {<- $gemcolbb 1}} + } + ) + } + ) + ("Orange" + {switch $gemcolchanged + (R + {unless {< {<- $gemcolor 1} 0} + {set $gemcolor {<- $gemcolor 1}} + } + ) + (G + {unless {< {<- $gemcolgg 1} 0} + {set $gemcolog {<- $gemcolog 1}} + } + ) + (B + {unless {< {<- $gemcolgb 1} 0} + {set $gemcolob {<- $gemcolob 1}} + } + ) + } + ) + } +) +#define RGB_RESET +( + {switch $gemchanged + ("Green" + {switch $gemcolchanged + (R + {set $gemcolgr 0} + ) + (G + {set $gemcolgg 0} + ) + (B + {set $gemcolgb 0} + ) + } + ) + ("Red" + {switch $gemcolchanged + (R + {set $gemcolrr 0} + ) + (G + {set $gemcolrg 0} + ) + (B + {set $gemcolrb 0} + ) + } + ) + ("Yellow" + {switch $gemcolchanged + (R + {set $gemcolyr 0} + ) + (G + {set $gemcolyg 0} + ) + (B + {set $gemcolyb 0} + ) + } + ) + ("Blue" + {switch $gemcolchanged + (R + {set $gemcolbr 0} + ) + (G + {set $gemcolbg 0} + ) + (B + {set $gemcolbb 0} + ) + } + ) + ("Orange" + {switch $gemcolchanged + (R + {set $gemcolor 0} + ) + (G + {set $gemcolog 0} + ) + (B + {set $gemcolob 0} + ) + } + ) + } +) +(kState_RB4DXRGBSlider + (view confirm_action) + (enter + RGB_DATA + ) + (SELECT_MSG + {local $list_data {($objId UIListCom) get_data_in_column token}} + {switch $list_data + ("+" + RGB_ADD + RGB_DATA + ) + ("0" + RGB_RESET + RGB_DATA + ) + ("-" + RGB_SUB + RGB_DATA + ) + } + ) + (on_cancel + {$this show_state kState_RB4DXRGBSelect} + {$this trigger_cancel_effects}) ) \ No newline at end of file diff --git a/_ark/ps4/dx/overshell/dx_track_theme_states.dta b/_ark/ps4/dx/overshell/dx_track_theme_states.dta index d0398df..1dd8ac9 100644 --- a/_ark/ps4/dx/overshell/dx_track_theme_states.dta +++ b/_ark/ps4/dx/overshell/dx_track_theme_states.dta @@ -8,6 +8,7 @@ "Strikeline Texture" {if_else $noshine "Highway Shine: OFF" "Highway Shine: ON"} {if_else $gemshine "Gem Shine: OFF" "Gem Shine: ON"} + {if_else $gemcolors "Custom Gem Colors: ON" "Custom Gem Colors: OFF"} ) } ) @@ -16,6 +17,7 @@ (enter {set $noshine {dx_file_exists "ps4/track/shared/track_skin_swap.sgraph_ps4ps4"}} {set $gemshine {dx_file_exists "ps4/track/guitar/gem_unlit.sgraph_ps4ps4"}} + {set $gemcolors {file_exists "settings/theme/gem/colors/enabled.dta"}} {set $dx_cur_state thm} RB4DXTHM_DATA ) @@ -72,6 +74,14 @@ {$this show_state kState_RB4DXSLTexSelector} {$this trigger_select_effects} ) + ("Custom Gem Colors: ON" + {$this show_state kState_RB4DXGemColorConfirm} + {$this trigger_select_effects} + ) + ("Custom Gem Colors: OFF" + {$this show_state kState_RB4DXGemColorSettings} + {$this trigger_select_effects} + ) } ) (on_cancel @@ -187,4 +197,45 @@ {$this show_state kState_RB4DXTrackTheme} {$this trigger_cancel_effects} ) +) + +;Gem Color Settings +(kState_RB4DXGemColorSettings + (view {$this get_auto_list_view}) + (enter + {$this setup_confirm_actions a ("Green" "Red" "Yellow" "Blue" "Orange")} + {unless $gemcolors + {dx_write_null_file "settings/theme/gem/colors/enabled.dta"} + WRITE_GEM_COLOR_DTAS + } + ) + (SELECT_MSG + {local $list_data {($objId UIListCom) get_data_in_column token}} + {set $gemchanged $list_data} + {$this show_state kState_RB4DXRGBSelect} + {$this trigger_select_effects} + ) + (on_cancel + WRITE_GEM_COLOR_DTAS + {$this show_state kState_RB4DXTrackTheme} + {$this trigger_cancel_effects} + ) +) + +;Gem Color Settings +(kState_RB4DXRGBSelect + (view {$this get_auto_list_view}) + (enter + {$this setup_confirm_actions a ("R" "G" "B")} + ) + (SELECT_MSG + {local $list_data {($objId UIListCom) get_data_in_column token}} + {set $gemcolchanged $list_data} + {$this show_state kState_RB4DXRGBSlider} + {$this trigger_select_effects} + ) + (on_cancel + {$this show_state kState_RB4DXGemColorSettings} + {$this trigger_cancel_effects} + ) ) \ No newline at end of file diff --git a/_ark/ps4/dx/overshell/dx_warn_states.dta b/_ark/ps4/dx/overshell/dx_warn_states.dta index 9722ade..2df36fd 100644 --- a/_ark/ps4/dx/overshell/dx_warn_states.dta +++ b/_ark/ps4/dx/overshell/dx_warn_states.dta @@ -163,6 +163,31 @@ ) ) +(kState_RB4DXGemColorConfirm + (view confirm_action) + (enter + {$this setup_confirm_actions "Would you like to reset gem colors to default or edit your colors?" ("Reset" "Edit")} + ) + (SELECT_MSG + {local $list_data {($objId UIListCom) get_data_in_column token} + } + {switch $list_data + ("Reset" + {dx_file_delete "settings/theme/gem/colors/enabled.dta"} + {$this show_state kState_RB4DXTrackTheme} + ) + ("Edit" + {$this show_state kState_RB4DXGemColorSettings} + ) + } + {$this trigger_select_effects} + ) + (on_cancel + {$this show_state kState_RB4DXTrackTheme} + {$this trigger_cancel_effects} + ) +) + (kState_RB4DXAutoplayHowTo (view confirm_action) (enter diff --git a/_ark/ps4/dx/ui/dx_init.dta b/_ark/ps4/dx/ui/dx_init.dta index fb422e6..1c9a48d 100644 --- a/_ark/ps4/dx/ui/dx_init.dta +++ b/_ark/ps4/dx/ui/dx_init.dta @@ -75,4 +75,21 @@ } ;controller binding -SET_PAD_BINDING_VAR \ No newline at end of file +SET_PAD_BINDING_VAR + +;default gem colors (TODO: READ FROM USER DTAS) +{set $gemcolgr 33} +{set $gemcolgg 93} +{set $gemcolgb 2} +{set $gemcolrr 229} +{set $gemcolrg 4} +{set $gemcolrb 8} +{set $gemcolyr 202} +{set $gemcolyg 164} +{set $gemcolyb 8} +{set $gemcolbr 3} +{set $gemcolbg 82} +{set $gemcolbb 139} +{set $gemcolor 190} +{set $gemcolog 48} +{set $gemcolob 5} \ No newline at end of file diff --git a/_ark/ps4/dx/ui/init_dev.dta b/_ark/ps4/dx/ui/init_dev.dta index f8ac412..68f8229 100644 --- a/_ark/ps4/dx/ui/init_dev.dta +++ b/_ark/ps4/dx/ui/init_dev.dta @@ -12,6 +12,9 @@ {dx_file_mkdir "settings/controller/type/vox"} {dx_file_mkdir "settings/controller/binding"} {dx_file_mkdir "settings/controller/binding/pad"} ;TODO: maybe add bindings for non-pad controllers? + {dx_file_mkdir "settings/theme"} + {dx_file_mkdir "settings/theme/gem"} + {dx_file_mkdir "settings/theme/gem/colors"} ) #define UPDATE_SETTINGS ( diff --git a/_build/GoldHEN/plugins/RB4DX-Plugin.prx b/_build/GoldHEN/plugins/RB4DX-Plugin.prx index 59fe441..e50d5f2 100644 Binary files a/_build/GoldHEN/plugins/RB4DX-Plugin.prx and b/_build/GoldHEN/plugins/RB4DX-Plugin.prx differ