Commit graph

21330 commits

Author SHA1 Message Date
toaster
31dcb3346e K_drawKartTimestamp: Still draw your best record even if the map has no ET_TIME medals 2023-02-05 19:48:25 +00:00
toaster
1df3da8379 G_TickTimeStickerMedals: Do not call in demo.playback 2023-02-05 19:26:18 +00:00
toaster
d1c7a90a7c G_UpdateTimeStickerMedals: Put an actual message on the sticker where an invalid medal ghost tag is handled
Fixes a function reshuffling error that would have put control flow back in a loop with invalid properties
2023-02-05 19:25:23 +00:00
toaster
e7b63a5fad G_UpdateTimeStickerMedals, M_StartTimeAttack: If you've beaten all game-provided times, show your personal best record on the in-level HUD instead. 2023-02-05 19:17:07 +00:00
toaster
eab22e73a6 G_UpdateRecords: Play Medal-get sound on successful ET_TIME Medal get 2023-02-05 18:45:02 +00:00
toaster
55b7d21051 G_TickTimeStickerMedals, G_UpdateRecords, K_drawTimestamp: Jitter HUD on both Medal-earning success and general failure to reach desired time 2023-02-05 18:44:25 +00:00
toaster
eb16f9d5a9 G_TickTimeStickerMedals: Move the failed-record sound handling out of K_drawKartTimestamp 2023-02-05 18:31:59 +00:00
toaster
9c95d2d975 G_UpdateTimeStickerMedals: Use a memset to initialise the struct, rather than relying on manual pick-outs 2023-02-05 18:02:21 +00:00
toaster
4522ba3b4d stickermedalinfo, UpdateTimeStickerMedals: A centralised struct for Medal info attached to the time sticker.
- K_drawKartTimestamp: Significantly less messy, no longer dependent on static variables, and no longer iterates over M_GetLevelEmblems every rendered frame(!!)
    - TODO: Still handles playing sound in the drawer
- K_PrepareTimeAttack: Initial generation of a struct of emblems/text is handled on the menu
- G_UpdateRecords: Updated in-game if you unlock the next medal there
This commit was amended to centralise the new material in g_game.c and reduce the number of header additions required.
2023-02-05 17:42:28 +00:00
toaster
63fbdcfbc0 M_StartControlPanel: Do not activate if map change is pending
Prevents restoreMenu being burned when pressing start during long GP/Match Race fade.
2023-02-05 14:09:30 +00:00
toaster
de526a7889 D_ClearState: Prevent opportunities for double-wipes 2023-02-05 13:35:15 +00:00
toaster
e874b5ba18 G_DoLoadLevel: do not apply profile if demo is played from titlescreen 2023-02-05 13:33:31 +00:00
toaster
ac2255572a K_drawKartTimestamp: Do not update visible emblems on level completion unless you got more than one on completion
TODO: this code relies heavily on static variables. It has always done so, but the extent to which they're currently employed is worth a fresh look
2023-02-05 00:35:22 +00:00
toaster
2207115424 Time Attack: Update Medals on player exit, not on intermission
- M_UpdateRecordReplays: Split out M_UpdateRecords
- P_DoPlayerExit: Call M_UpdateRecords in modeattacking
2023-02-05 00:21:08 +00:00
toaster
42969d8d15 M_CheckLevelEmblems: Support tagging ET_TIME emblems
An ET_TIME emblem with a nonzero tag is directly bound to a staff ghost's finish time. This will make late development medal implementation signifcantly easier.
2023-02-04 22:17:47 +00:00
toaster
2d54acae30 M_DrawTimeAttack: Fix Medal drawing for timestamp
K_drawKartTimestamp uses gamemap index instead of mapheaderinfo index
2023-02-04 22:16:33 +00:00
toaster
ed07a74fb4 staffbrief_t: Change datatype of stored times to tic_t 2023-02-04 21:01:49 +00:00
toaster
75ffdf06cd reademblemdata: Change defaults for part-provided Medal definitions 2023-02-04 20:38:15 +00:00
toaster
f1e925553d M_CompletionEmblems: Fix check for ET_MAP 2023-02-04 20:33:19 +00:00
toaster
3bfd4be29e AltTitle_OnChange: Actually correctly set cv_alttitle instead of cv_itemfinder if modified when unlocked 2023-02-04 18:04:56 +00:00
toaster
4446b1ed9e K_drawKartHUD: Draw a special mini version of RR's title logo instead of that of SRB2Kart's 2023-02-04 18:04:18 +00:00
toaster
604ac1101b demovars_s: Remove unused fromtitle property
Was superseded by demo.title
2023-02-04 17:14:23 +00:00
toaster
c6dde48245 g_demo.c, M_EndModeAttackRun, D_ClearState - Unset demo.title in one specific place
Fixes returning from title demo to titlescreen
2023-02-04 17:13:07 +00:00
toaster
e67fea3b84 s_sound.c - Add exceptions for demo.rewinding and demo.title to all new music setter functions introduced with 2.2 merge 2023-02-04 17:11:46 +00:00
toaster
84a98475ff Command_ExitGame_f: Return to title if restoreMenu is NULL 2023-02-04 17:07:24 +00:00
toaster
59f9609160 G_AddGhost, G_LoadRecordGhosts: Re-add support for loading staff ghosts.
- UINT8 *buffer for AddGhost must now be allocated and filled externally.
- Introduce P_TryAddExternalGhost helper function for existing external ghosts.
- Call vRes_Free(curmapvirt) later, and NULL to make incorrect usage immediately obvious.
2023-02-04 15:46:15 +00:00
toaster
3e0ba74003 P_PlaybackSetViews: Support C-button reset to 1p view 2023-02-04 11:07:29 +00:00
toaster
6dd32deecb M_HandleStaffReplay, M_DrawTimeAttack: Re-support selecting staff replays from the menu 2023-02-04 11:06:57 +00:00
toaster
a2fadd2ff4 M_ChangeCvar: Split out core of function into M_ChangeCvarDirect, to prevent future code duplication 2023-02-04 11:06:28 +00:00
toaster
3ca1c554c4 M_HandleMenuInput: Pass a choice of 2 to IT_CVAR/IT_ARROWS routines
- Permits IT_ARROWS routines to distinguish between a rightward input and an A-button input.
- Only M_ChangeCvar needed to change to accomodate this - every other example of IT_ARROWS already acommodates this
2023-02-04 10:44:47 +00:00
toaster
96297aad1c Title demos: Add support for game loading vRes staff ghosts as title demos 2023-02-03 18:23:59 +00:00
toaster
29ddf06f1e G_DoPlayDemo: Add support for replays stored inside map vres 2023-02-03 18:18:43 +00:00
toaster
1efc5883e0 G_DoPlayDemo: Remove memory leak in pdemoname 2023-02-03 18:16:18 +00:00
toaster
f378dfe3f6 ACS Environment::loadModule: Free vres after generation
Discovered (temporary) memory leak while writing the following commit
2023-02-03 13:53:26 +00:00
toaster
99bf1c10e8 staffbrief_t
- Demos are VERY large and should not be cached for every map in the game all at once.
- Instead, store a small amount of data related to staff ghosts for later reference.
    - best time (for use in Medals)
    - best lap (maybe use for Medals too)
    - player name (for use in Time Attack menu)
2023-02-03 00:55:34 +00:00
Oni
79796b00f5 Merge branch 'sprite-brightmaps' into 'master'
Rudimentary sprite brightmap support

See merge request KartKrew/Kart!801
2023-02-02 05:49:31 +00:00
Oni
4cc8e46cf8 Merge branch 'minigen-verbose' into 'master'
Verbose minigen - "RR_GREENHILLS-MINIMAP.png"

See merge request KartKrew/Kart!903
2023-02-02 05:25:30 +00:00
Oni
b3a299e7e6 Merge branch 'menu-flow-polish' into 'master'
Menu flow polish

See merge request KartKrew/Kart!907
2023-02-02 03:52:37 +00:00
toaster
61020a2621 M_HandleMenuMessage
Do not permit a menu message to be interacted with if it has not completely risen.
Fixes the occasional skip if you hold the button a fraction of a frame too long, which most scarily could happen on the data erase confirmation...
2023-02-01 23:34:23 +00:00
toaster
fd575deb10 D_ClearState, D_StartTItle: Fix music restarting if shared between connection screen/playsim and menu 2023-02-01 23:26:33 +00:00
toaster
69484cd55a Failed net connection: Catch another exit to title, and replace with menu restore. 2023-02-01 23:19:50 +00:00
toaster
5b0b118ee5 M_SpecificMenuRestore: Fix a bug where setup_numplayers was always being set to 1, instead of only when "skipping" character select via netgame connection 2023-02-01 23:16:48 +00:00
toaster
03d422560d menu_t, M_PlayMenuJam: const char *music parameter
If Playing(), does nothing.
- If NULL, cycle between Cascade Cave as is traditional.
- If ".", stop music. (will one day be used for sound test)
- Any other case, call S_ChangeMusicInternal on the string directly

Notable menu sets:
- All Extra menus, excepting the Replay Hut, use "EXTRAS"
- Replay Hut uses "REPLAY"
- All online menus use "NETMD2".
    - I know we wanted to do something with switching between "NETMDE" and "NETMD2". I would prefer a more consistent API for transferring song position across between tracks be implemented before implementing this.
    - Known bug: Music restarts when exiting from failed connection screen
    - Known bug: Music goes back to Cascade Cave when selecting "GO" for server creation
        - Wontfix as we want that button to go directly to the voting screen, which we can do in a voting revamp branch
- Data Erase, Profile Erase: "SHWDN2"
    - Not in the spec but I think it's both funny and a valuable tell for the most "dangerous" menu to play with.
    - Also shifts the background to SKINCOLOR_BLACK
2023-02-01 23:15:51 +00:00
toaster
f46fbf0418 Remove MessageDef
This was a dummy conditional which was necessary in the old menu system; this is no longer the case as of newmenus.
2023-02-01 22:39:35 +00:00
toaster
f630bbb1cf Challenges menu: More complicated music behaviour
- Pure silence when challenges are being unlocked
- Begin playing the menujam as control returns to the player
2023-02-01 22:14:26 +00:00
toaster
57b22f32d5 M_PlayMenuJam
Pre-emptive work for more complicated menu music behaviour, permitting consistent implementation of the cycling music.
2023-02-01 22:12:41 +00:00
toaster
d31e5ac76f M_HandleReplayHutList: Repair handling for selecting replays
It seems to be an interaction with running transitions, which I was trying to avoid for this menu anyways.
2023-01-31 20:09:36 +00:00
toaster
0305249a36 PLAY_MP_OptSelectDef: Adjust the unwinding boxes
- Make them open in a snappier fashion, not a leisurely step
- Fix the open box missing an entire row of pixels at the top
2023-01-31 15:54:19 +00:00
toaster
39dadf1b1e PLAY_MP_OptSelectDef: Integrate M_MPOptSelectInit into M_SpecificMenuRestore 2023-01-31 15:52:46 +00:00
toaster
7b483f9c75 PLAY_RaceGamemodesMenu: Slight rephrase of the Grand Prix menu tooltip 2023-01-31 14:39:51 +00:00