Commit graph

48 commits

Author SHA1 Message Date
Eidolon
892a6b8620 Merge public master 2025-08-12 16:49:14 -05:00
Eidolon
255570cfca Dynamically allocate skins
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.

This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.

This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
2025-08-12 15:33:00 -05:00
toaster
f8aaa43f73 Reset *all* First Boot specific state in M_ClearSecrets, not M_ClearStats
Guarantees wiping gamedata will send you through goner again, since otherwise why are we wiping gonerlevel
Also fixes restarting Goner's audio
2025-07-24 20:03:47 +01:00
toaster
56df65d18c Extra newline for "do you want to play the tutorial again" text 2025-07-24 19:52:02 +01:00
toaster
8a7df9678e Add photosensitivity warning to Goner
Allows you to turn on reducevfx, screenshake, and screen tilting with one confirm input
Shows up every time game boots just in case you get into Sunbeam and it's too much and need to restart
(also dummied out Kickstart Accel option)
2025-07-24 19:28:27 +01:00
toaster
340b1914d2 Add MBF_CANTRESTORE
Replaces hardcoded exception to restoreMenu
2025-07-24 18:22:25 +01:00
toaster
f0fbd07804 Got better at working in CPP... we don't want a forward_list here, we want a deque! 2025-07-24 13:28:59 +01:00
toaster
585683b978 Fix Proceed password "fake crash"
Didn't always properly reset text, now it does
2025-07-24 13:12:23 +01:00
toaster
1a57416b16 Minor adjustments for Goner Choice
- "session" -> "tutorial"
- make it clear that Addons and Online *will* eventually be unlocked in Tails' Way, just not immediately
- Don't allow looping inputs (pressing right when Eggman's Way is selected and vicea versa)
2025-07-24 12:54:58 +01:00
toaster
c5ab5ec71e Fix minor edge case with error message for Eggman's Way 2025-07-23 19:34:42 +01:00
toaster
295e8dd0ce Add Goner Choice
- Selection between Tails' Way (existing Tutorial) and Eggman's Way (Playground)
    - Semi-passable UI
    - Characterful descriptions
- Add "PlaygroundRoute" condition to Challenges
    - Fires if you select Eggman's Way
- 0 Chao Keys unless you go back to Goner for the outro (which Playground skips)
2025-07-23 19:25:52 +01:00
toaster
830cfe76da Round Queue UI on Level Select
- Only works in Match Race and Online level selects
- Shows in-progress state on Pause and Cup Grid, but no direct influence available on those screens
- Z to queue current highlighted map
    - Pending until you press A, then sent to server
    - When done online, tries to send one at a time to avoid overloading connection
- C to clear
    - Removes one from pending first
    - If you're out of pending maps, prompts whether you want to clear server's queue
2025-06-01 00:25:20 +01:00
Eidolon
bd7646346b Use new containers and json 2025-03-16 18:45:11 -05:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
toaster
bb733ebbd7 Password field always visible across first boot menu 2024-04-26 14:38:59 +01:00
toaster
1034dd7ec9 Grand Prix course preview adjustment: Show Prison Break stages too, just like on Challenges Board preview
- All gametypes will be shown in the drawer, as opposed to just Race
- However, don't attempt to add the preview pic for CUPCACHE_SPECIAL (the Sealed Star)
2024-04-09 17:47:30 +01:00
James R.
607611daaf Merge branch 'goner-free' into 'master'
V_ScaledWordWrap allocates Zone memory, so be sure to free Goner's usage

See merge request KartKrew/Kart!2198
2024-04-03 01:09:39 +00:00
toaster
d7f4cd2d8f Copyright update for Viv Grannell specifically (the author of this commit) 2024-04-02 17:38:18 +01:00
toaster
54d7f06420 V_ScaledWordWrap allocates Zone memory, so be sure to free Goner's usage 2024-03-31 12:29:12 +01:00
toaster
3789316756 Goner password adjustments
- After inputting an incorrect password on Goner, guarantee the "are you online" line doesn't play
- When using either GDQ password, don't allow re-entry
2024-03-30 21:18:10 +00:00
James R
acbb7eb463 Add password checking system
Co-authored-by: toaster <rollerorbital@gmail.com>
2024-03-28 00:09:11 -07:00
James R
11dc5b7318 Fix line endings 2024-03-28 00:09:02 -07:00
toaster
382110362a Profiles segment of Goner: Direct people to the Accessibility options *just* before you open up a Profile Card for the first time 2024-03-22 15:24:52 +00:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
toaster
3430ba9697 Press down on Goner Setup to complete existing text line early 2023-12-22 21:17:27 +00:00
toaster
c93e02af4a Additional Goner BG polish
- Helper functions for eased X/Y
- Don't jump Metal's camera around when doing things rapidly
- Don't have ctrl alt del open mouths when not on the main Goner menu itself
2023-12-18 20:14:23 +00:00
toaster
c6edfa0de5 Goner Setup Polish
- Imply passage of time when returning from Tutorial to Outro by resetting all the background variables
- Add an additive layer to the Options cogs, so they show up over an extremely dark background
- Metal Sonic will not focus on Tails/Eggman until video is restored
- Don't draw the Miles Electric transparent unless it's completely in its upright position
2023-12-18 17:01:29 +00:00
toaster
55e3abf58d Teach players how to interact with Goner Setup just before input is first required
- Checks for whether a Gamepad is connected
    - If yes, says you can use "your Gamepad"
    - If no, says you can use "Enter, ESC, and the Arrow Keys"
- Show ENTER and ESC on any Message prompt (instead of A/B/X) if no Gamepad is connected
    - Add M_DrawMediocreKeyboardKey, a genericisation of the previous entry in the series' Time Attack HUD
2023-12-18 14:30:58 +00:00
toaster
ca6ebd89d8 Minor dialogue/Tails posing updates
- Assign poses for Outro and GDQ Passwords
- Flicker camera when showing visuals after using a GDQ Password
2023-12-18 14:09:11 +00:00
toaster
f5722b7569 Intro adjustments
- Force to play when selecting "START GAME" from the Goner Setup
- Make far shorter on the First Boot, obscuring the extended Kart Krew vroom, to prevent it playing identically twice
- Prevent skipping the intro at all if Ring Cup hasn't been unlocked
    - Both for the shortened initial startup and the START GAME first encounter
- It already clears dirmenu if relevant, don't do that twice
2023-12-18 01:10:37 +00:00
toaster
fe669ff281 Goner Setup Background part 2
- Eggman's mouth moves
- Smooth camera movement
- Smooth Miles Electric movement
- Less fragile/instant blinking
2023-12-18 00:46:20 +00:00
toaster
129fad2010 First pass at adding background to Goner Setup
Tails and Eggman talking to each other/Metal Sonic/the player.
2023-12-17 19:37:03 +00:00
toaster
a15a836755 Minor phrasing updates to dialog 2023-12-17 13:18:58 +00:00
toaster
647a9d0a0e Goner setup music: Change behaviour
- Hook into M_PlayMenuJam, to reduce bespoke behaviour
- Use the finalised track string
- Play on the Sound Options menu
Also, use MAIN_Goner as reference for the password field's presence, because I lost like 30 minutes to a related bug
2023-12-17 13:18:35 +00:00
toaster
1505167422 Goner Setp: Add scroll 2023-12-09 17:32:15 +00:00
toaster
536bed7dc6 When resetting the Goner Setup, make sure itemOn is set to a valid entry 2023-12-08 13:46:10 +00:00
toaster
c82d24b4bc Music starts after Sound Options completed
Currently plays _OCEAN for testing, but will be changed to play _GONER when Journey In Modulating Time's short loop is ready.
Explicitly restricts the basic title screen's music from playing, too.
2023-12-08 13:08:06 +00:00
toaster
f09c0a4b6c Forgot to commit compilation corrections last night
- Fix repeat for GDGONER_VIDEO text
- M_GonerSurveyResponse
2023-12-08 13:05:07 +00:00
toaster
11fcb0b9ae Goner Setup: Cook 3 - Add "Outro"
One last guaranteed visit to the setup, to get a sendoff before the game truly begins.
(The "survey program" joke is now themed softlock prevention.)
2023-12-07 23:36:02 +00:00
toaster
8a2445820e General clearup relating to Goner Setup
- Clean up handling of goner_levelworking to retry current dialogue if something changes gamedata->gonerlevel
- Create wrapper func for resetting ALL text
- Gamedata-modifying cheats will set to GDGONER_DONE
2023-12-07 23:11:05 +00:00
toaster
ae8db80a75 Goner Setup: Background has stronger presence
- Show pure blue with NO SIGNAL when Video Options have not been configured
- Show underneath other menus
2023-12-07 23:06:37 +00:00
toaster
9d24a4cb6d Fix some oversights caused by the Goner Setup's access to various Options menus 2023-12-04 21:03:51 +00:00
toaster
85d8cfdf85 menu_t: Add bgroutine
All backgrounds are now handled by a seperate routine.
This will allow more fine handling without a ton of special cases everywhere.
Creates an absolutely nasty diff because all menu_t have been updated in one blast 🥹
For the things that DO need to draw outside of GS_MENU (M_DrawOptionsCogs, the Wrongwarp), the behaviourflag MBF_DRAWBGWHILEPLAYING has also been added.
2023-12-04 20:10:03 +00:00
toaster
36c3dbfc0e Goner setup polish
- Checkpoint sound for reaching a new option
- Fix header text for Video and Sound menus
- Reset password field access when menu is reset by gamedata wipe
2023-12-04 13:06:55 +00:00
toaster
e91115a8fa Goner Setup: Cook 2
- More dialogue
- Restrict access to your choices based on your progress through the Goner Setup.
- Save progress through the setup to gamedata
    - Resets to beginning when Challenges is cleared
- Passwords
    - Only permit the password entry in like the first two seconds
        - Preemptively disarms potentially annoying people in stream chats
    - Make wrongwarp also quit the game on exit instead of returning to the title screen
    - Add GDQ cheats
        - `savetheanimals`
        - `savetheframes`
        - Both do practically the same thing, with slightly modified dialogue.
            - Skips all of the normal dialogue.
            - Performing a social experiment on anyone who might stream this game at a charity event. :)
2023-12-03 22:34:06 +00:00
toaster
40566274d9 Jart DM assistance
- anonymous namespace for filescope variables, funcs
- Step away from std::optional, use anonymous initialiser instead
2023-12-03 13:01:33 +00:00
toaster
ffb34204f5 Goner setup: cook
- Build list of incoming text
    - First pass of very first section of dialogue
- Use srb2::Dialogue::Typewriter class to handle ticking through dialogue
- Store history log as incoming text is processed (possible todo: scrolling?)
2023-12-02 23:40:02 +00:00
toaster
299e0c3b71 main-goner.cpp: convert from C sourcefile
Also fixes sleepily-commited compilation-breaking typo
2023-12-02 15:40:20 +00:00
Renamed from src/menus/main-goner.c (Browse further)