Commit Graph

45 Commits

Author SHA1 Message Date
briaguya b8c7c71578
allow setting device visibility in controller mapping window (#4165) 2024-06-02 12:13:03 -04:00
Ted Newman 844413b391
Add Modifier buttons to input viewer and support individual button outline modes (#3966)
* Add Modifier buttons to input viewer and support individual button outline modes

* Clearer naming

* Remove hardcoded indent values

* clean up diff

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2024-05-09 23:57:31 -04:00
Malkierian 6443a986d9
Final Step of CVar macro/sectionalizing (#4107)
* p

* Missed the prefix renames.

* More missed ones.

* Mostly finished cleanup.
Removed a few CVars and some related functionality.

* Bit more (prepping non-existent title card color editing).

* Resolve gCrowdControl.

* Final cleanup.

* Universal constant, not acceleration...

* Preset CVars.
2024-05-05 14:14:55 -05:00
briaguya 345cef9b78
detangle zapdutils (#4096) 2024-05-01 22:47:40 -04:00
briaguya 8480f37f77
fetch imgui (#4094) 2024-04-30 22:49:54 -04:00
briaguya 552bb2886f
support lus renamespacing (#4075) 2024-04-28 21:36:44 -04:00
Malkierian 33aef87907
CVar Macro Cleanup (#4062)
* Standardized CVar macros to have `CVAR_` at the front instead of the end.
Removed excluded and replaced sequence macros.

* Missed a few developer CVars outside of `SohMenuBar.cpp`

* 1 more.
2024-04-21 10:25:06 -05:00
Malkierian e2622af004
Step 3 of CVar macro/sectionalizing: Dev Tools, Cheats, Audio Editor, Remote (#4030)
* Swapped Audio Editor CVars.

* Swapped Cheat CVars.

* Swapped Developer Tools CVars. Also a couple General CVars.

* Added REMOTE_CVAR.
Swapped Remote CVars.

* Missed an include.
2024-04-20 18:56:32 +00:00
Malkierian 694a876a70
Step 2 of CVar macro/sectionalizing: Trackers/Windows (#3238)
* Add all macros.

Replace all randomizer seed setting CVars with appropriate macro.

Cleaned up non-gameplay-critical things that are part of Spock Race rando presets (like RTA timing, displaying timer, displaying the glitch lineup tick, or Fast File Select).

* Wrong slash...

* Fix DEVELOPER_CVAR macro.
Add GENERAL_CVAR macro.

* Change Item Tracker CVars, including open window CVar.

* Swapped open window CVars.

* Swapped Entrance Tracker CVars.

* Swapped Check Tracker CVars.
Changed Item Tracker "HudEditMode" to "Draggable".

* Renamed `RANDOMIZER_CVAR` to `RANDO_ENHANCEMENT_CVAR`.
Swapped rando enhancement CVars.

* Mirroring last commit from part 1 in randomizer.cpp

* Another mirror from pt 1
2024-04-20 18:34:02 +00:00
briaguya bcbe4cb1c3
we crash if we try to SPDLOG in the destructors (#3951)
* we crash if we try to SPDLOG in the destructors

* rip em out

* newline

* add to destroy

* Revert "rip em out"

This reverts commit 738a9b80f3.

* Revert "we crash if we try to SPDLOG in the destructors"

This reverts commit 327d305e00.
2024-02-21 00:21:26 -05:00
Ted Newman db958ab3f4
New input viewer (#3890)
* Move input viewer into SoH

* Remove unnecessary comments

* Update button outline mode to match default viewer

* Fix ambiguous call

* CVar name changes and minor fixes

* Two more cvars

* Separate C-buttons into individual toggles

* Account for text height regardless of scale

* A few extra comments

* Use new LoadTextureFromRawImage to load layer textures
2024-02-15 19:37:19 -06:00
Pepe20129 961b2626ad
Merge controller menus (#3860)
* Merge controller menus

* Re-run Build

* Update SohInputEditorWindow.h

* Update soh/soh/Enhancements/controls/SohInputEditorWindow.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* pin switch devkit docker image

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2024-02-01 22:10:46 -06:00
Eric Hoey d9310e4543
Swim Speed Modifiers (#3308)
* Add CVars for swimming, apply to swim speed calc

* Prevent modifer from working underwater

* Re-enable swim speed mod when underwater, use new (orig) function for y-velocity while diving

* Add to presets list

* Fix spacing

* block out vanilla + comments

* re-org vanilla code block in a sane way

* new documentation format

* rename Surface function + comment for usage

* handle merge conflicts, but like an adult this time
2024-02-01 19:32:50 -06:00
Josh Bodner 01529126ba
Imgui polish (#3481)
* Rearrange menus for better layout on smaller screens.

* Automatically calculate +/- increments for float sliders

* Add needed header

* Use stringstream instead of format since apparently most platforms don't actually support all of c++20 yet boooooo

* Add header that only Mac complained about for some reason

* Theoretical performance improvement

* Actual performance improvement
2024-01-15 09:22:56 -06:00
Eric Hoey a0258f0fca
Add Invert Y-Axis and Apply Right-Stick Aiming to Z-Weapon Aiming (#3304)
* Add right-stick aiming to third-person aim

* Add Z-aiming CVar and inversion to Z-aiming

* Create calculation for rel.right_stick and apply it in Z-aiming

* Move option to First-Person section to match shield

* Fix max/min aiming heights

* Expand min/max + comment

* block out vanilla + comments

* block vanilla code better

* Remove extra space

* new documentation formatting

* rewrite ==0 and !=0
2024-01-08 12:21:18 -06:00
briaguya 776c3a51ee
stick sensitivity (#3725) 2023-12-23 18:48:06 -05:00
briaguya 0a59ce6d99
upgrade to docking imgui 1.90.0 (#3402)
ce0d0ac829
2023-12-23 18:12:52 -05:00
Garrett Cox 2cb3a3664e Implement gMoveWhileFirstPerson 2023-12-20 20:26:07 +00:00
briaguya 351f896cfa Merge branch 'develop' into delta-to-dev 2023-11-29 02:16:54 -05:00
Garrett Cox fdcd9a7508
Race Integrity QoL (#3445)
* Add gDisableChangingSettings

* Add support for dropping a config file to overwrite CVars
2023-11-28 23:42:37 -05:00
briaguya 76e90c0928
Controllers (#3378)
* lay some groundwork

* use custom window (which is currently identical to the LUS window)

* start making it shippy

* start moving stuff out of gamecontroleditor

* clean up shouldrumble

* include the other way

* wii u

* latest lus main

* notch snap angle buttons

* buttons on all the sliders

* just use a hidden id

* handle debug for port 2 and rename tabs so everything fits

* button line buttons look better

* padding fixed

* clang format

* bump to latest LUS main

* big buttons

* just default the analog stick options to open for now

* fix wii u build

* bonus: make it all scale-aware

* clang format

* fix horizontal scrolling

* fix all +/- buttons

* keyboard set defaults

* axis threshold helper text

* bonus: test rumble button

* clang format

* fix otrexporter submodule

* bump to latest lus main
2023-11-20 08:02:15 -05:00
Tina H. (sheepytina) a04ee354d4
Add "Navi Targeting Colors" options to Controller LED Color (#3254)
* Add a (not yet functional) "Navi" option.

* It works!

* Slightly better name for this menu option.

* Revert accidental commit of comments in z_en_elf.c

* Renaming and tweaks.

* Temporary fix(?) for compile error on non-Windows platforms.

* … Just pretend this particular commit doesn't exist. :OHYEAH:

* A more suitable fix. + Partial suggestions from review.

In-progress implementation of Cosmetics Navi colours.

* Convert relevant code to use Color_RGB8 sans alpha, matching the controller LED.

Defaults are now labeled for clarity.

* Revert back to Color_RGBA8. + Implement Cosmetics Navi colours.

Add Color conversion functions.

* Tidy comments.

* Changed mind yet a third time. Uses Color_RGB8 sans alpha again.

Uses CVarGetColor24 instead of CVarGetColor to drop alpha from cosmetics editor values, like how Tunic Colors does it.
This of course does require me to go with the prior idea of storing the Navi colours without alpha channels.

* Color type conversion functions removed

as they're no longer needed.

* Tidy up commented out code once more.

* Fix a typo

* Suggestion from code review. (Yeah nah you're totally right though.)

* Correct indentation.

* A minor goof in the comments was bothering me.
2023-10-30 10:55:53 -05:00
PhysicBerry 738172d9ed
Add Shield Aim Invert X & Y Axis Options (#3055)
* Added Shield Aim Invert Y Axis Option

Adds an option in the menu that allows players to invert the shield aiming across the Y Axis. Defaults as checked to replicate original behavior.

* Shield Aiming Improvements

Added an option to invert X Axis Shield Aiming and corrected the default value for Y Axis Shield Aiming.
2023-08-25 13:00:11 -05:00
Garrett Cox f85b04336c
Add option to prevent speed modifier from affecting jump velocity (#2874) 2023-06-14 23:25:48 -04:00
briaguya 6de0d8b69d
properly set imgui invert aiming y default (#2956)
Co-authored-by: briaguya <briaguya@alice>
2023-06-12 19:14:42 -04:00
briaguya 2308ab8823
build soh with LUS 1.0.0 (#2881)
* Bump LUS

* Ship -> LUS namespace change

* z_scene_otr Ship -> LUS namespace

* Starting to get SoH to build with LUS imgui changes.

* start stuff

* gamecontroleditor build issues resolved maybe

* cosmetics editor and what not

* console

* actor viewer

* more stuff

* more stuff

* on to errors that make sense

* putting this down for a bit

* no idea what these errors mean now

* some kind of progress maybe

* latest lus main

* more

* back to linker errors and being lost

* Fixes command function signature.

* More fixes

* Even more fixes

* Bump LUS

* More Fixes.

* Fixes even more errors.

* lus bump

* input editor as var

* audio editor working

* it builds with this

* bump lus

* it opens

* bump lus to latest main again

* make sure to do all the command registering in debugconsole

* lus and what not

* switch type stuff plz

* undo

* do the thing that fixes the thing

* fix mac?

* correctly show/hide menubar on boot

* bump lus

* input blocking updates

* bump lus

* Bump LUS

* Press F1 to open enhancement menus moved to SoH

* lus and rendering backend stuff

* audio backend and lus

* Bump LUS

* Fixes WindowBackend dropdown

* Bump LUS

* misc -> utils and moves binarytools to utils.

* Window refactor

* bump lus

* make it work

* Fixes for moved files again

* Bump LUS

* Mercury -> Config

* Bump LUS

* Reacts to removed LUS hooks and bump LUS

* Remove Hook: GfxInit

* Removes debug audio_setgamevolume to 1

* use non-crashing branch of lus

* fix: make audio init work without hooks

* game icon stuff

* multifix bmp

* use input viewer class branch for now

* just "Ship" it's cleaner

* Bump LUS

* Removed ExitGame hook.

* Bump LUS

* Hook system removed from LUS.

* More LUS updates

* Changes to make window position saving.

* Bump LUS

* Bump LUS (for real)

* LUS resources now return a specialized pointer.

* Bump LUS

* Fixes issue in SetPathways::GetPointerSize

* Bump LUS to 1.0.0

* builds but crashes

* fix crash

* better macro names in debug console

* remove commeted out line

* remove redundant check tracker settings window logic

* remove commented out line

* move the *

* remove extra seqplayers enum def

* this sneaky little guy was hiding behind a wii u ifdef

* remove extra check tracker header

---------

Co-authored-by: Kenix <kenixwhisperwind@gmail.com>
Co-authored-by: briaguya <briaguya@alice>
2023-06-03 15:27:45 -04:00
Malkierian 0c7e80a190
Improve Controller LED Control (#2864)
* Add brightness control and on/off toggle for tunic LED colors.

* Removed toggle, mentioned brightness of 0% for turning off LEDs.

* Set up grabbing tunic color values from Cosmetics Editor for cosmetics sync.

* Why these stupid differences between Windows and Linux compilers?

* Fix Mac build errors? Also try to move the color fetching back into the switch statements to lessen potential computational load.

* Real fix?

* Move "Customize Game Controls" button under "Controller Configuration" button under Settings -> Controller. Renamed "Controller Configuration" to "Configure Controller" and "Customize Game Controls" to "Customize In-game Controls"

* Added LEDColor and LEDColorSource enums for code clarity.

Moved controller LED brightness to new LED Colors group in "Customize In-game Controls" menu.

Added combobox to choose between vanilla tunics, cosmetics tunics, health, and custom as color sources.

Added critical health override checkbox to allow display of red when health is low even when other sources are selected.

Port color pickers have not been implemented yet, default color is white.

* Moved LED control to OTRControllerCallback and wrapped it in a check to `CanSetLed()`.

* Move settings to Port 1 tab in Customize In-game Controls and limited application of colors in `OTRControllerCallback` to port 1.

* UI clarity updates.

* Removed unnecessary LED color enum.

Added custom color picker to port 1 color settings.

* Changed Critical Health Override default to true.

* Modified logic to not do color fetching and instead default to {0,0,0,0} when brightness is off.

* Fix bad cvar string for custom color.

* Cleaning up some post-merge artifacts.

* Update soh/soh/Enhancements/controls/GameControlEditor.h

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Some name changes.

* idea for cleaning up controller callback stuff

* Rearranged color source checks to make sure criticalOverride is applied regardless of other settings.

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
2023-05-28 18:40:53 -04:00
briaguya f34df2f064
remove what i assume to be accidentally copied stuff from a diff (#2909) 2023-05-22 09:33:31 -04:00
Garrett Cox 2ea72f835a
Cleanup cvars that are set on boot (#2863) 2023-05-10 09:08:35 -04:00
Kenix3 77987a42cf
Bump LUS (#2855)
* Bump LUS

* Ship -> LUS namespace change

* z_scene_otr Ship -> LUS namespace
2023-05-07 23:01:12 -04:00
Kenix3 4980ae8dcc
Lus updates (#2822)
* Changes for LUS renames in ResourceManager and Archive.

* Moves WriteSaveFile and ReadSaveFile to SaveManager.

* Removes ImGui namespace.

* Bump LUS

* Update soh/soh/GameMenuBar.cpp

* Bump LUS

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-03 20:46:26 -04:00
Josh Bodner 21d82e7c4c
Cleanup of ImGui code (#2576)
* Change sliders to have +/- buttons by default

* Remove unnecessary margin setting

* Add +/- buttons to remaining sliders and fix some broken UI

* Update EnhancementComboBox to not need array size

* Remove redundant widgets from randomizer

* Miscellaneous fixes

* Fix Switch build break

* Consolidate disabled styling in widgets

* Simplify widget logic

* Merge with most recent PRs

* Fix audio fanfare and sound effect sliders mixup

* Fix sliders being one button too wide

* Fix sliders being too long

* Fix sliders being too long on console
2023-04-01 16:10:49 -04:00
Bigs d275740c88
Separate X/Y axis sensitivity sliders (#2472)
* Update z_camera.c

* Update GameControlEditor.cpp

* Update GameControlEditor.cpp

* Update GameControlEditor.cpp

Adding Sliders for first person X and Y axis

* Update z_player.c

Modified variables to allowed separate sensitivity settings for x and y axis
2023-02-15 20:42:21 -05:00
aMannus 612700c2ab
Change gPauseAnyCursor into combobox (#2423)
* Change gPauseAnyCursor into combobox

* Add enums

* Change naming
2023-01-31 06:53:22 -05:00
briaguya ba13e6b2c4 refactor: use LUS 1.0 RC
Co-authored-by: kenix3 <kenixwhisperwind@gmail.com>
Co-authored-by: David Chavez <david@dcvz.io>
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
2023-01-17 00:33:56 -05:00
frizzle101101 cabcfb009c
improving free cam settings configurability (#1987)
* Initial camera distance slider

* works with freecam

* improving the settings configurability, adding distance slider and transition speed for the free camera
adding seperate sensitivity and invert settings for aiming/first person camera

* spelling

* tooltip msg on camera invvert

* typos

* removing the original free camera checkbox in experimental menu

* adding name change to new presets file

Co-authored-by: RaelCappra <rael.cappra@gmail.com>
2022-12-12 16:10:28 -05:00
Ada 9027d85671
TWEAK: Game controls menu simplification (#2007) 2022-11-28 23:45:07 +01:00
briaguya 3914781ebf
Import libultraship as a submodule (#1943)
Co-authored-by: briaguya <briaguya>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: David Chavez <davi@dcvz.io>
2022-11-14 11:22:34 +01:00
Ada c914bd20b8
Adds camera sensitivity option back (#1817)
* Adds camera sensitivity option

* Fixes default values

* Fixes default values (for real this time)
2022-10-21 00:39:42 -04:00
Josh Bodner 8df4d640ac
Add support for extra buttons to be used as walk speed modifiers (#449) 2022-10-10 08:28:19 +02:00
briaguya 9804035dc0 fix: match auto center option text to behavior 2022-10-01 13:46:58 -04:00
PurpleHato 694c6c9832
FIX: Set back default comportment of some Views (#1615)
* FIX: Set back default comportment of some Views

- Renamed Auto-Center First Person View to Disable Auto-Centering in First Person View and make it necessary to be checked to take effect and not being active by default

- Disable gInvertYAxis being enabled by default (which it not vanilla)

* Tweak: small whoopsie
2022-09-27 19:32:28 -04:00
David Chavez 0ce0ab1260
Phase 1: Separate ImGui Drawing From LUS (#1310)
* Update LUS imported paths

* Introduce GameMenuBar

* Fix imports after LUS import paths change

* Move Randomizer

* Replace needs_save

* Migrate Developer Tools

* Migrate Cheats

* Migrate Enhancements

* Separate UIWidgets

* Add missing Hooks.cpp file

* Migrate Settings

* Remove UI methods from LUS

* Cleanup imports and exposed properties

* Cleanup more methods

* Fix project generation

* Fix CI compilation

* Remove resolved TODO
2022-09-03 00:00:04 -04:00
Ada d735616020
Adds game specific camera options (#1212)
* Adds inversion options

* Fixes compilation

* Adds options to new detailed control editor

* Fixes inversion on C-Up view

* Fixes right stick aiming

* Fixes right stick aiming again

* Adds tooltip function + tooltips to gamecontroleditor.cpp

* Fixes tooltip for X axis

* Uses LUS tooltip function instead of new one

* Adds padding to camera control editor

To fit more in line with other enhancement checkboxes
2022-08-23 20:12:14 -04:00
lilDavid 46a421f933
Add window to customize specific controls (#1122) 2022-08-16 09:43:09 +02:00