Reorganized config menu tabs, hide debug menu behind manual config file edit, added missing recompiler config file

This commit is contained in:
Mr-Wiseguy 2024-03-15 12:13:29 -04:00
parent ff5dd7f50c
commit 0775299aae
11 changed files with 706 additions and 42 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
# VSCode file settings
.vscode/settings.json
.vscode/c_cpp_properties.json
# Input elf and rom files
*.elf

View File

@ -26,9 +26,9 @@
nav-down:#res_auto;
}
</style>
<link type="text/template" href="config_menu/graphics.rml" />
<link type="text/template" href="config_menu/general.rml" />
<link type="text/template" href="config_menu/controls.rml" />
<link type="text/template" href="config_menu/control_options.rml" />
<link type="text/template" href="config_menu/graphics.rml" />
<link type="text/template" href="config_menu/sound.rml" />
<link type="text/template" href="config_menu/debug.rml" />
</head>
@ -38,12 +38,12 @@
<div class="centered-page" onclick="close_config_menu_backdrop">
<div class="centered-page__modal">
<tabset class="tabs" id="config_tabset">
<tab class="tab" id="tab_graphics" autofocus>
<div>Graphics</div>
<tab class="tab" autofocus>
<div>General</div>
<div class="tab__indicator"></div>
</tab>
<panel class="config" data-model="graphics_model">
<template src="config-menu__graphics" />
<panel class="config" data-model="general_model">
<template src="config-menu__general" />
</panel>
<tab class="tab">
<div>Controls</div>
@ -52,12 +52,12 @@
<panel class="config" data-model="controls_model">
<template src="config-menu__controls" />
</panel>
<tab class="tab">
<div>Control Options</div>
<tab class="tab" id="tab_graphics">
<div>Graphics</div>
<div class="tab__indicator"></div>
</tab>
<panel class="config" data-model="control_options_model">
<template src="config-menu__control-options" />
<panel class="config" data-model="graphics_model">
<template src="config-menu__graphics" />
</panel>
<tab class="tab">
<div>Sound</div>
@ -66,11 +66,11 @@
<panel class="config" data-model="sound_options_model">
<template src="config-menu__sound" />
</panel>
<tab class="tab">
<tab class="tab" data-model="debug_model" data-if="debug_enabled">
<div>Debug</div>
<div class="tab__indicator"></div>
</tab>
<panel class="config" data-model="debug_model">
<panel class="config" data-model="debug_model" data-if="debug_enabled">
<template src="config-menu__debug" />
</panel>
</tabset>

View File

@ -1,4 +1,4 @@
<template name="config-menu__control-options">
<template name="config-menu__general">
<head>
</head>
<body>
@ -7,7 +7,7 @@
<div class="config__row">
<div class="config-option">
<label class="config-option__title">Targeting Mode</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="targeting_mode" data-checked="targeting_mode" value="Switch" id="tm_switch"/>
<label class="config-option__tab-label" for="tm_switch">Switch</label>
<input type="radio" name="targeting_mode" data-checked="targeting_mode" value="Hold" id="tm_hold"/>
@ -16,7 +16,7 @@
</div>
<div class="config-option">
<label class="config-option__title">Rumble Strength</label>
<div class="config-option__list config-option__list">
<div class="config-option__range-wrapper config-option__list">
<label class="config-option__range-label">{{rumble_strength}}</label>
<input class="nav-vert" id="rumble_strength_input" type="range" min="0" max="100" style="flex: 1; margin: 0dp;" data-value="rumble_strength"/>
</div>

View File

@ -7,7 +7,7 @@
<div class="config__row">
<div class="config-option">
<label class="config-option__title">Resolution</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="resolution" data-checked="res_option" value="Original" id="res_original" style="nav-left:none;nav-up:#tab_graphics"/>
<label class="config-option__tab-label" for="res_original">Original</label>
<input type="radio" name="resolution" data-checked="res_option" value="Original2x" id="res_2x" style="nav-up:#tab_graphics"/>
@ -18,7 +18,7 @@
</div>
<div class="config-option">
<label class="config-option__title">Window Mode</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="windowmode" data-checked="wm_option" value="Windowed" id="wm_windowed" style="nav-up:#tab_graphics"/>
<label class="config-option__tab-label" for="wm_windowed">Windowed</label>
<input type="radio" name="windowmode" data-checked="wm_option" value="Fullscreen" id="wm_fullscreen" style="nav-right:none;nav-up:#tab_graphics"/>
@ -29,7 +29,7 @@
<div class="config__row">
<div class="config-option">
<label class="config-option__title">Aspect Ratio</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="aspectratio" data-checked="ar_option" value="Original" id="ar_original" style="nav-left:none"/>
<label class="config-option__tab-label" for="ar_original">Original</label>
<input type="radio" name="aspectratio" data-checked="ar_option" value="Expand" id="ar_expand" style="nav-up:#res_2x"/>
@ -38,7 +38,7 @@
</div>
<div class="config-option">
<label class="config-option__title">MS Anti-Aliasing</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="antialiasing" data-checked="msaa_option" value="None" id="msaa_none" style="nav-down:#apply_button"/>
<label class="config-option__tab-label" for="msaa_none">None</label>
<input type="radio" name="antialiasing" data-checked="msaa_option" value="MSAA2X" id="msaa_2x" style="nav-down:#apply_button"/>
@ -54,7 +54,7 @@
<div class="config__row">
<div class="config-option">
<label class="config-option__title">Framerate</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="refreshrate" data-checked="rr_option" value="Original" id="rr_original" style="nav-left:none;nav-down:#apply_button"/>
<label class="config-option__tab-label" for="rr_original">Original</label>
<input type="radio" name="refreshrate" data-checked="rr_option" value="Display" id="rr_display" style="nav-down:#apply_button"/>

View File

@ -14,7 +14,7 @@
</div>
<div class="config-option">
<label class="config-option__title">Low Health Beeps</label>
<div class="config-option__list config-option__list">
<div class="config-option__list">
<input type="radio" name="lhb" data-checked="low_health_beeps_enabled" value="1" id="lhb_on"/>
<label class="config-option__tab-label" for="lhb_on">On</label>
<input type="radio" name="lhb" data-checked="low_health_beeps_enabled" value="0" id="lhb_off"/>

View File

@ -16,6 +16,9 @@ namespace recomp {
void reset_graphics_options();
std::filesystem::path get_app_folder_path();
bool get_debug_mode_enabled();
void set_debug_mode_enabled(bool enabled);
};
#endif
#endif

View File

@ -45,9 +45,11 @@ namespace recomp {
Menu get_current_menu();
enum class ConfigSubmenu {
Graphics,
General,
Controls,
Graphics,
Audio,
Debug,
Count
};

617
overlays.us.rev1.txt Normal file
View File

@ -0,0 +1,617 @@
..ovl_title
..ovl_select
..ovl_opening
..ovl_file_choose
..ovl_daytelop
..ovl_kaleido_scope
..ovl_player_actor
..ovl_En_Test
..ovl_En_GirlA
..ovl_En_Part
..ovl_En_Light
..ovl_En_Door
..ovl_En_Box
..ovl_En_Pametfrog
..ovl_En_Okuta
..ovl_En_Bom
..ovl_En_Wallmas
..ovl_En_Dodongo
..ovl_En_Firefly
..ovl_En_Horse
..ovl_En_Arrow
..ovl_En_Elf
..ovl_En_Niw
..ovl_En_Tite
..ovl_En_Peehat
..ovl_En_Holl
..ovl_En_Dinofos
..ovl_En_Hata
..ovl_En_Zl1
..ovl_En_Viewer
..ovl_En_Bubble
..ovl_Door_Shutter
..ovl_En_Boom
..ovl_En_Torch2
..ovl_En_Minifrog
..ovl_En_St
..ovl_Obj_Wturn
..ovl_En_River_Sound
..ovl_En_Ossan
..ovl_En_Famos
..ovl_En_Bombf
..ovl_En_Am
..ovl_En_Dekubaba
..ovl_En_M_Fire1
..ovl_En_M_Thunder
..ovl_Bg_Breakwall
..ovl_Door_Warp1
..ovl_Obj_Syokudai
..ovl_Item_B_Heart
..ovl_En_Dekunuts
..ovl_En_Bbfall
..ovl_Arms_Hook
..ovl_En_Bb
..ovl_Bg_Keikoku_Spr
..ovl_En_Wood02
..ovl_En_Death
..ovl_En_Minideath
..ovl_En_Vm
..ovl_Demo_Effect
..ovl_Demo_Kankyo
..ovl_En_Floormas
..ovl_En_Rd
..ovl_Bg_F40_Flift
..ovl_Obj_Mure
..ovl_En_Sw
..ovl_Object_Kankyo
..ovl_En_Horse_Link_Child
..ovl_Door_Ana
..ovl_En_Encount1
..ovl_Demo_Tre_Lgt
..ovl_En_Encount2
..ovl_En_Fire_Rock
..ovl_Bg_Ctower_Rot
..ovl_Mir_Ray
..ovl_En_Sb
..ovl_En_Bigslime
..ovl_En_Karebaba
..ovl_En_In
..ovl_En_Bom_Chu
..ovl_En_Horse_Game_Check
..ovl_En_Rr
..ovl_En_Fr
..ovl_En_Fishing
..ovl_Obj_Oshihiki
..ovl_Eff_Dust
..ovl_Bg_Umajump
..ovl_En_Insect
..ovl_En_Butte
..ovl_En_Fish
..ovl_Item_Etcetera
..ovl_Arrow_Fire
..ovl_Arrow_Ice
..ovl_Arrow_Light
..ovl_Obj_Kibako
..ovl_Obj_Tsubo
..ovl_En_Ik
..ovl_Demo_Shd
..ovl_En_Dns
..ovl_Elf_Msg
..ovl_En_Honotrap
..ovl_En_Tubo_Trap
..ovl_Obj_Ice_Poly
..ovl_En_Fz
..ovl_En_Kusa
..ovl_Obj_Bean
..ovl_Obj_Bombiwa
..ovl_Obj_Switch
..ovl_Obj_Lift
..ovl_Obj_Hsblock
..ovl_En_Okarina_Tag
..ovl_En_Goroiwa
..ovl_En_Daiku
..ovl_En_Nwc
..ovl_Item_Inbox
..ovl_En_Ge1
..ovl_Obj_Blockstop
..ovl_En_Sda
..ovl_En_Clear_Tag
..ovl_En_Gm
..ovl_En_Ms
..ovl_En_Hs
..ovl_Bg_Ingate
..ovl_En_Kanban
..ovl_En_Attack_Niw
..ovl_En_Mk
..ovl_En_Owl
..ovl_En_Ishi
..ovl_Obj_Hana
..ovl_Obj_Lightswitch
..ovl_Obj_Mure2
..ovl_En_Fu
..ovl_En_Stream
..ovl_En_Mm
..ovl_En_Weather_Tag
..ovl_En_Ani
..ovl_En_Js
..ovl_En_Okarina_Effect
..ovl_En_Mag
..ovl_Elf_Msg2
..ovl_Bg_F40_Swlift
..ovl_En_Kakasi
..ovl_Obj_Makeoshihiki
..ovl_Oceff_Spot
..ovl_En_Torch
..ovl_Shot_Sun
..ovl_Obj_Roomtimer
..ovl_En_Ssh
..ovl_Oceff_Wipe
..ovl_Effect_Ss_Dust
..ovl_Effect_Ss_Kirakira
..ovl_Effect_Ss_Bomb2
..ovl_Effect_Ss_Blast
..ovl_Effect_Ss_G_Spk
..ovl_Effect_Ss_D_Fire
..ovl_Effect_Ss_Bubble
..ovl_Effect_Ss_G_Ripple
..ovl_Effect_Ss_G_Splash
..ovl_Effect_Ss_G_Fire
..ovl_Effect_Ss_Lightning
..ovl_Effect_Ss_Dt_Bubble
..ovl_Effect_Ss_Hahen
..ovl_Effect_Ss_Stick
..ovl_Effect_Ss_Sibuki
..ovl_Effect_Ss_Stone1
..ovl_Effect_Ss_Hitmark
..ovl_Effect_Ss_Fhg_Flash
..ovl_Effect_Ss_K_Fire
..ovl_Effect_Ss_Solder_Srch_Ball
..ovl_Effect_Ss_Kakera
..ovl_Effect_Ss_Ice_Piece
..ovl_Effect_Ss_En_Ice
..ovl_Effect_Ss_Fire_Tail
..ovl_Effect_Ss_En_Fire
..ovl_Effect_Ss_Extra
..ovl_Effect_Ss_Dead_Db
..ovl_Effect_Ss_Dead_Dd
..ovl_Effect_Ss_Dead_Ds
..ovl_Oceff_Storm
..ovl_Obj_Demo
..ovl_En_Minislime
..ovl_En_Nutsball
..ovl_Oceff_Wipe2
..ovl_Oceff_Wipe3
..ovl_En_Dg
..ovl_En_Si
..ovl_Obj_Comb
..ovl_Obj_Kibako2
..ovl_En_Hs2
..ovl_Obj_Mure3
..ovl_En_Tg
..ovl_En_Wf
..ovl_En_Skb
..ovl_En_Gs
..ovl_Obj_Sound
..ovl_En_Crow
..ovl_En_Cow
..ovl_Oceff_Wipe4
..ovl_En_Zo
..ovl_Effect_Ss_Ice_Smoke
..ovl_Obj_Makekinsuta
..ovl_En_Ge3
..ovl_Obj_Hamishi
..ovl_En_Zl4
..ovl_En_Mm2
..ovl_Door_Spiral
..ovl_Obj_Pzlblock
..ovl_Obj_Toge
..ovl_Obj_Armos
..ovl_Obj_Boyo
..ovl_En_Grasshopper
..ovl_Obj_Grass
..ovl_Obj_Grass_Carry
..ovl_Obj_Grass_Unit
..ovl_Bg_Fire_Wall
..ovl_En_Bu
..ovl_En_Encount3
..ovl_En_Jso
..ovl_Obj_Chikuwa
..ovl_En_Knight
..ovl_En_Warp_tag
..ovl_En_Aob_01
..ovl_En_Boj_01
..ovl_En_Boj_02
..ovl_En_Boj_03
..ovl_En_Encount4
..ovl_En_Bom_Bowl_Man
..ovl_En_Syateki_Man
..ovl_Bg_Icicle
..ovl_En_Syateki_Crow
..ovl_En_Boj_04
..ovl_En_Cne_01
..ovl_En_Bba_01
..ovl_En_Bji_01
..ovl_Bg_Spdweb
..ovl_En_Mt_tag
..ovl_Boss_01
..ovl_Boss_02
..ovl_Boss_03
..ovl_Boss_04
..ovl_Boss_05
..ovl_Boss_06
..ovl_Boss_07
..ovl_Bg_Dy_Yoseizo
..ovl_En_Boj_05
..ovl_En_Sob1
..ovl_En_Go
..ovl_En_Raf
..ovl_Obj_Funen
..ovl_Obj_Raillift
..ovl_Bg_Numa_Hana
..ovl_Obj_Flowerpot
..ovl_Obj_Spinyroll
..ovl_Dm_Hina
..ovl_En_Syateki_Wf
..ovl_Obj_Skateblock
..ovl_Effect_En_Ice_Block
..ovl_Obj_Iceblock
..ovl_En_Bigpamet
..ovl_Bg_Dblue_Movebg
..ovl_En_Syateki_Dekunuts
..ovl_Elf_Msg3
..ovl_En_Fg
..ovl_Dm_Ravine
..ovl_Dm_Sa
..ovl_En_Slime
..ovl_En_Pr
..ovl_Obj_Toudai
..ovl_Obj_Entotu
..ovl_Obj_Bell
..ovl_En_Syateki_Okuta
..ovl_Obj_Shutter
..ovl_Dm_Zl
..ovl_En_Ru
..ovl_En_Elfgrp
..ovl_Dm_Tsg
..ovl_En_Baguo
..ovl_Obj_Vspinyroll
..ovl_Obj_Smork
..ovl_En_Test2
..ovl_En_Test3
..ovl_En_Test4
..ovl_En_Bat
..ovl_En_Sekihi
..ovl_En_Wiz
..ovl_En_Wiz_Brock
..ovl_En_Wiz_Fire
..ovl_Eff_Change
..ovl_Dm_Statue
..ovl_Obj_Fireshield
..ovl_Bg_Ladder
..ovl_En_Mkk
..ovl_Demo_Getitem
..ovl_En_Dnb
..ovl_En_Dnh
..ovl_En_Dnk
..ovl_En_Dnq
..ovl_Bg_Keikoku_Saku
..ovl_Obj_Hugebombiwa
..ovl_En_Firefly2
..ovl_En_Rat
..ovl_En_Water_Effect
..ovl_En_Kusa2
..ovl_Bg_Spout_Fire
..ovl_En_Dy_Extra
..ovl_En_Bal
..ovl_En_Ginko_Man
..ovl_En_Warp_Uzu
..ovl_Obj_Driftice
..ovl_En_Look_Nuts
..ovl_En_Mushi2
..ovl_En_Fall
..ovl_En_Mm3
..ovl_Bg_Crace_Movebg
..ovl_En_Dno
..ovl_En_Pr2
..ovl_En_Prz
..ovl_En_Jso2
..ovl_Obj_Etcetera
..ovl_En_Egol
..ovl_Obj_Mine
..ovl_Obj_Purify
..ovl_En_Tru
..ovl_En_Trt
..ovl_En_Test5
..ovl_En_Test6
..ovl_En_Az
..ovl_En_Estone
..ovl_Bg_Hakugin_Post
..ovl_Dm_Opstage
..ovl_Dm_Stk
..ovl_Dm_Char00
..ovl_Dm_Char01
..ovl_Dm_Char02
..ovl_Dm_Char03
..ovl_Dm_Char04
..ovl_Dm_Char05
..ovl_Dm_Char06
..ovl_Dm_Char07
..ovl_Dm_Char08
..ovl_Dm_Char09
..ovl_Obj_Tokeidai
..ovl_En_Mnk
..ovl_En_Egblock
..ovl_En_Guard_Nuts
..ovl_Bg_Hakugin_Bombwall
..ovl_Obj_Tokei_Tobira
..ovl_Bg_Hakugin_Elvpole
..ovl_En_Ma4
..ovl_En_Twig
..ovl_En_Po_Fusen
..ovl_En_Door_Etc
..ovl_En_Bigokuta
..ovl_Bg_Icefloe
..ovl_fbdemo_triforce
..ovl_fbdemo_wipe1
..ovl_fbdemo_wipe3
..ovl_fbdemo_wipe4
..ovl_fbdemo_wipe5
..ovl_Effect_Ss_Sbn
..ovl_Obj_Ocarinalift
..ovl_En_Time_Tag
..ovl_Bg_Open_Shutter
..ovl_Bg_Open_Spot
..ovl_Bg_Fu_Kaiten
..ovl_Obj_Aqua
..ovl_En_Elforg
..ovl_En_Elfbub
..ovl_En_Fu_Mato
..ovl_En_Fu_Kago
..ovl_En_Osn
..ovl_Bg_Ctower_Gear
..ovl_En_Trt2
..ovl_Obj_Tokei_Step
..ovl_Bg_Lotus
..ovl_En_Kame
..ovl_Obj_Takaraya_Wall
..ovl_Bg_Fu_Mizu
..ovl_En_Sellnuts
..ovl_Bg_Dkjail_Ivy
..ovl_Obj_Visiblock
..ovl_En_Takaraya
..ovl_En_Tsn
..ovl_En_Ds2n
..ovl_En_Fsn
..ovl_En_Shn
..ovl_En_Stop_heishi
..ovl_Obj_Bigicicle
..ovl_En_Lift_Nuts
..ovl_En_Tk
..ovl_Bg_Market_Step
..ovl_Obj_Lupygamelift
..ovl_En_Test7
..ovl_Obj_Lightblock
..ovl_Mir_Ray2
..ovl_En_Wdhand
..ovl_En_Gamelupy
..ovl_Bg_Danpei_Movebg
..ovl_En_Snowwd
..ovl_En_Pm
..ovl_En_Gakufu
..ovl_Elf_Msg4
..ovl_Elf_Msg5
..ovl_En_Col_Man
..ovl_En_Talk_Gibud
..ovl_En_Giant
..ovl_Obj_Snowball
..ovl_Boss_Hakugin
..ovl_En_Gb2
..ovl_En_Onpuman
..ovl_Bg_Tobira01
..ovl_En_Tag_Obj
..ovl_Obj_Dhouse
..ovl_Obj_Hakaisi
..ovl_Bg_Hakugin_Switch
..ovl_En_Snowman
..ovl_TG_Sw
..ovl_En_Po_Sisters
..ovl_En_Pp
..ovl_En_Hakurock
..ovl_En_Hanabi
..ovl_Obj_Dowsing
..ovl_Obj_Wind
..ovl_En_Racedog
..ovl_En_Kendo_Js
..ovl_Bg_Botihasira
..ovl_En_Fish2
..ovl_En_Pst
..ovl_En_Poh
..ovl_Obj_Spidertent
..ovl_En_Zoraegg
..ovl_En_Kbt
..ovl_En_Gg
..ovl_En_Maruta
..ovl_Obj_Snowball2
..ovl_En_Gg2
..ovl_Obj_Ghaka
..ovl_En_Dnp
..ovl_En_Dai
..ovl_Bg_Goron_Oyu
..ovl_En_Kgy
..ovl_En_Invadepoh
..ovl_En_Gk
..ovl_En_An
..ovl_En_Bee
..ovl_En_Ot
..ovl_En_Dragon
..ovl_Obj_Dora
..ovl_En_Bigpo
..ovl_Obj_Kendo_Kanban
..ovl_Obj_Hariko
..ovl_En_Sth
..ovl_Bg_Sinkai_Kabe
..ovl_Bg_Haka_Curtain
..ovl_Bg_Kin2_Bombwall
..ovl_Bg_Kin2_Fence
..ovl_Bg_Kin2_Picture
..ovl_Bg_Kin2_Shelf
..ovl_En_Rail_Skb
..ovl_En_Jg
..ovl_En_Tru_Mt
..ovl_Obj_Um
..ovl_En_Neo_Reeba
..ovl_Bg_Mbar_Chair
..ovl_Bg_Ikana_Block
..ovl_Bg_Ikana_Mirror
..ovl_Bg_Ikana_Rotaryroom
..ovl_Bg_Dblue_Balance
..ovl_Bg_Dblue_Waterfall
..ovl_En_Kaizoku
..ovl_En_Ge2
..ovl_En_Ma_Yts
..ovl_En_Ma_Yto
..ovl_Obj_Tokei_Turret
..ovl_Bg_Dblue_Elevator
..ovl_Obj_Warpstone
..ovl_En_Zog
..ovl_Obj_Rotlift
..ovl_Obj_Jg_Gakki
..ovl_Bg_Inibs_Movebg
..ovl_En_Zot
..ovl_Obj_Tree
..ovl_Obj_Y2lift
..ovl_Obj_Y2shutter
..ovl_Obj_Boat
..ovl_Obj_Taru
..ovl_Obj_Hunsui
..ovl_En_Jc_Mato
..ovl_Mir_Ray3
..ovl_En_Zob
..ovl_Elf_Msg6
..ovl_Obj_Nozoki
..ovl_En_Toto
..ovl_En_Railgibud
..ovl_En_Baba
..ovl_En_Suttari
..ovl_En_Zod
..ovl_En_Kujiya
..ovl_En_Geg
..ovl_Obj_Kinoko
..ovl_Obj_Yasi
..ovl_En_Tanron1
..ovl_En_Tanron2
..ovl_En_Tanron3
..ovl_Obj_Chan
..ovl_En_Zos
..ovl_En_S_Goro
..ovl_En_Nb
..ovl_En_Ja
..ovl_Bg_F40_Block
..ovl_Bg_F40_Switch
..ovl_En_Po_Composer
..ovl_En_Guruguru
..ovl_Oceff_Wipe5
..ovl_En_Stone_heishi
..ovl_Oceff_Wipe6
..ovl_En_Scopenuts
..ovl_En_Scopecrow
..ovl_Oceff_Wipe7
..ovl_Eff_Kamejima_Wave
..ovl_En_Hg
..ovl_En_Hgo
..ovl_En_Zov
..ovl_En_Ah
..ovl_Obj_Hgdoor
..ovl_Bg_Ikana_Bombwall
..ovl_Bg_Ikana_Ray
..ovl_Bg_Ikana_Shutter
..ovl_Bg_Haka_Bombwall
..ovl_Bg_Haka_Tomb
..ovl_En_Sc_Ruppe
..ovl_Bg_Iknv_Doukutu
..ovl_Bg_Iknv_Obj
..ovl_En_Pamera
..ovl_Obj_HsStump
..ovl_En_Hidden_Nuts
..ovl_En_Zow
..ovl_En_Talk
..ovl_En_Al
..ovl_En_Tab
..ovl_En_Nimotsu
..ovl_En_Hit_Tag
..ovl_En_Ruppecrow
..ovl_En_Tanron4
..ovl_En_Tanron5
..ovl_En_Tanron6
..ovl_En_Daiku2
..ovl_En_Muto
..ovl_En_Baisen
..ovl_En_Heishi
..ovl_En_Demo_heishi
..ovl_En_Dt
..ovl_En_Cha
..ovl_Obj_Dinner
..ovl_Eff_Lastday
..ovl_Bg_Ikana_Dharma
..ovl_En_Akindonuts
..ovl_Eff_Stk
..ovl_En_Ig
..ovl_En_Rg
..ovl_En_Osk
..ovl_En_Sth2
..ovl_En_Yb
..ovl_En_Rz
..ovl_En_Scopecoin
..ovl_En_Bjt
..ovl_En_Bomjima
..ovl_En_Bomjimb
..ovl_En_Bombers
..ovl_En_Bombers2
..ovl_En_Bombal
..ovl_Obj_Moon_Stone
..ovl_Obj_Mu_Pict
..ovl_Bg_Ikninside
..ovl_Eff_Zoraband
..ovl_Obj_Kepn_Koya
..ovl_Obj_Usiyane
..ovl_En_Nnh
..ovl_Obj_Kzsaku
..ovl_Obj_Milk_Bin
..ovl_En_Kitan
..ovl_Bg_Astr_Bombwall
..ovl_Bg_Iknin_Susceil
..ovl_En_Bsb
..ovl_En_Recepgirl
..ovl_En_Thiefbird
..ovl_En_Jgame_Tsn
..ovl_Obj_Jgame_Light
..ovl_Obj_Yado
..ovl_Demo_Syoten
..ovl_Demo_Moonend
..ovl_Bg_Lbfshot
..ovl_Bg_Last_Bwall
..ovl_En_And
..ovl_En_Invadepoh_Demo
..ovl_Obj_Danpeilift
..ovl_En_Fall2
..ovl_Dm_Al
..ovl_Dm_An
..ovl_Dm_Ah
..ovl_Dm_Nb
..ovl_En_Drs
..ovl_En_Ending_Hero
..ovl_Dm_Bal
..ovl_En_Paper
..ovl_En_Hint_Skb
..ovl_Dm_Tag
..ovl_En_Bh
..ovl_En_Ending_Hero2
..ovl_En_Ending_Hero3
..ovl_En_Ending_Hero4
..ovl_En_Ending_Hero5
..ovl_En_Ending_Hero6
..ovl_Dm_Gm
..ovl_Obj_Swprize
..ovl_En_Invisible_Ruppe
..ovl_Obj_Ending
..ovl_En_Rsn

View File

@ -13,6 +13,7 @@
#include <pwd.h>
#endif
constexpr std::u8string_view general_filename = u8"general.json";
constexpr std::u8string_view graphics_filename = u8"graphics.json";
constexpr std::u8string_view controls_filename = u8"controls.json";
constexpr std::u8string_view sound_filename = u8"sound.json";
@ -111,6 +112,28 @@ std::filesystem::path recomp::get_app_folder_path() {
return recomp_dir;
}
void save_general_config(const std::filesystem::path& path) {
std::ofstream config_file{path};
nlohmann::json config_json{};
recomp::to_json(config_json["targeting_mode"], recomp::get_targeting_mode());
config_json["rumble_strength"] = recomp::get_rumble_strength();
config_json["debug_mode"] = recomp::get_debug_mode_enabled();
config_file << std::setw(4) << config_json;
}
void load_general_config(const std::filesystem::path& path) {
std::ifstream config_file{path};
nlohmann::json config_json{};
config_file >> config_json;
recomp::set_targeting_mode(from_or_default(config_json, "targeting_mode", recomp::TargetingMode::Switch));
recomp::set_rumble_strength(from_or_default(config_json, "rumble_strength", 25));
recomp::set_debug_mode_enabled(from_or_default(config_json, "debug_mode", false));
}
void assign_mapping(recomp::InputDevice device, recomp::GameInput input, const std::vector<recomp::InputField>& value) {
for (size_t binding_index = 0; binding_index < std::min(value.size(), recomp::bindings_per_input); binding_index++) {
recomp::set_input_binding(input, binding_index, device, value[binding_index]);
@ -187,10 +210,6 @@ void add_input_bindings(nlohmann::json& out, recomp::GameInput input, recomp::In
void save_controls_config(const std::filesystem::path& path) {
nlohmann::json config_json{};
config_json["options"] = {};
recomp::to_json(config_json["options"]["targeting_mode"], recomp::get_targeting_mode());
config_json["options"]["rumble_strength"] = recomp::get_rumble_strength();
config_json["keyboard"] = {};
config_json["controller"] = {};
@ -241,9 +260,6 @@ void load_controls_config(const std::filesystem::path& path) {
nlohmann::json config_json{};
config_file >> config_json;
recomp::set_targeting_mode(from_or_default(config_json["options"], "targeting_mode", recomp::TargetingMode::Switch));
recomp::set_rumble_strength(from_or_default(config_json["options"], "rumble_strength", 25));
if (!load_input_device_from_json(config_json, recomp::InputDevice::Keyboard, "keyboard")) {
assign_all_mappings(recomp::InputDevice::Keyboard, recomp::default_n64_keyboard_mappings);
@ -278,10 +294,18 @@ void load_sound_config(const std::filesystem::path& path) {
void recomp::load_config() {
std::filesystem::path recomp_dir = recomp::get_app_folder_path();
std::filesystem::path general_path = recomp_dir / general_filename;
std::filesystem::path graphics_path = recomp_dir / graphics_filename;
std::filesystem::path controls_path = recomp_dir / controls_filename;
std::filesystem::path sound_path = recomp_dir / sound_filename;
if (std::filesystem::exists(general_path)) {
load_general_config(general_path);
}
else {
save_general_config(general_path);
}
if (std::filesystem::exists(graphics_path)) {
load_graphics_config(graphics_path);
}
@ -316,6 +340,7 @@ void recomp::save_config() {
std::filesystem::create_directories(recomp_dir);
save_general_config(recomp_dir / general_filename);
save_graphics_config(recomp_dir / graphics_filename);
save_controls_config(recomp_dir / controls_filename);
save_sound_config(recomp_dir / sound_filename);

View File

@ -8,12 +8,12 @@
#include "RmlUi/Core.h"
ultramodern::GraphicsConfig new_options;
Rml::DataModelHandle graphics_model_handle;
Rml::DataModelHandle general_model_handle;
Rml::DataModelHandle controls_model_handle;
Rml::DataModelHandle control_options_model_handle;
Rml::DataModelHandle graphics_model_handle;
Rml::DataModelHandle sound_options_model_handle;
// True if controller config menu is open, false if keyboard config menu is open, undefined otherwise
bool configuring_controller = false;
bool configuring_controller = false;
template <typename T>
void get_option(const T& input, Rml::Variant& output) {
@ -108,8 +108,8 @@ int recomp::get_rumble_strength() {
void recomp::set_rumble_strength(int strength) {
control_options_context.rumble_strength = strength;
if (control_options_model_handle) {
control_options_model_handle.DirtyVariable("rumble_strength");
if (general_model_handle) {
general_model_handle.DirtyVariable("rumble_strength");
}
}
@ -119,8 +119,8 @@ recomp::TargetingMode recomp::get_targeting_mode() {
void recomp::set_targeting_mode(recomp::TargetingMode mode) {
control_options_context.targeting_mode = mode;
if (control_options_model_handle) {
control_options_model_handle.DirtyVariable("targeting_mode");
if (general_model_handle) {
general_model_handle.DirtyVariable("targeting_mode");
}
}
@ -175,6 +175,7 @@ struct DebugContext {
int area_index = 0;
int scene_index = 0;
int entrance_index = 0;
bool debug_enabled = false;
DebugContext() {
for (const auto& area : recomp::game_warps) {
@ -442,8 +443,8 @@ public:
controls_model_handle = constructor.GetModelHandle();
}
void make_control_options_bindings(Rml::Context* context) {
Rml::DataModelConstructor constructor = context->CreateDataModel("control_options_model");
void make_general_bindings(Rml::Context* context) {
Rml::DataModelConstructor constructor = context->CreateDataModel("general_model");
if (!constructor) {
throw std::runtime_error("Failed to make RmlUi data model for the control options menu");
}
@ -451,7 +452,7 @@ public:
constructor.Bind("rumble_strength", &control_options_context.rumble_strength);
bind_option(constructor, "targeting_mode", &control_options_context.targeting_mode);
control_options_model_handle = constructor.GetModelHandle();
general_model_handle = constructor.GetModelHandle();
}
void make_sound_options_bindings(Rml::Context* context) {
@ -471,6 +472,9 @@ public:
if (!constructor) {
throw std::runtime_error("Failed to make RmlUi data model for the debug menu");
}
// Bind the debug mode enabled flag.
constructor.Bind("debug_enabled", &debug_context.debug_enabled);
// Register the array type for string vectors.
constructor.RegisterArray<std::vector<std::string>>();
@ -489,9 +493,9 @@ public:
}
void make_bindings(Rml::Context* context) override {
make_graphics_bindings(context);
make_general_bindings(context);
make_controls_bindings(context);
make_control_options_bindings(context);
make_graphics_bindings(context);
make_sound_options_bindings(context);
make_debug_bindings(context);
}
@ -500,3 +504,14 @@ public:
std::unique_ptr<recomp::MenuController> recomp::create_config_menu() {
return std::make_unique<ConfigMenu>();
}
bool recomp::get_debug_mode_enabled() {
return debug_context.debug_enabled;
}
void recomp::set_debug_mode_enabled(bool enabled) {
debug_context.debug_enabled = enabled;
if (debug_context.model_handle) {
debug_context.model_handle.DirtyVariable("debug_enabled");
}
}

View File

@ -88,6 +88,7 @@ public:
recomp::register_event(listener, "open_settings",
[](const std::string& param, Rml::Event& event) {
recomp::set_current_menu(recomp::Menu::Config);
recomp::set_config_submenu(recomp::ConfigSubmenu::General);
}
);
recomp::register_event(listener, "exit_game",