Commit graph

545 commits

Author SHA1 Message Date
AJ Martinez
3c68ab7674 Improved spindash + ebrake 2024-05-01 20:35:49 -07:00
Sally Coolatta
f1f7edbe9a Show last lap time on HUD
Inspired by RoyKirbs' Joypolis journey
2024-04-11 03:05:11 -04:00
toaster
d0724c263a Bring roundsplayed_t into the highest common denominator header
No indirect, hard-to-maintain magic number range in modetimeplayed arrays
2024-04-06 21:01:56 +01:00
Eidolon
23e4df3c90 Add per-map time stats and TA/SPB time stats 2024-04-06 11:25:31 -05:00
Eidolon
c22d6d75db Add several skin record stats, profile rounds 2024-04-06 11:25:31 -05:00
toaster
7f6de407f1 Copyright update: Add Kart Krew (2024) in general for high-traffic inherited sourcefiles 2024-04-02 17:42:38 +01:00
Sally Coolatta
af6340741e Add speed to gametype
Set a specific gamespeed per gametype. KARTSPEED_AUTO for it to be decided by game settings.

Wanted this for a while, but also it makes game speed display logic for DRP very straightforward.
2024-03-22 16:58:36 -04:00
James R
5445d59d57 Replays: larger buffers for player name, skin name, color name; bump demo version 0x0009 -> 0x000A
- Name buffers are the same size as everywhere else
  - Billiards Cactus no longer gets cut short
  - Long player names no longer get cut short
- System in place to allow easily changing the buffer
  sizes across all the demo code
2024-03-19 01:23:51 -07:00
James R
0ce93b2d96 Add g_fast_forward_clock_stop, means to end g_fast_forward early if too much real world time is taken 2024-03-18 02:42:22 -07:00
toaster
6e46f97847 As promised, Encore (alt)music
- `EncoreMusic` on mapheader
    - Supports up to 3 alt musics, as with every other type
- Do not vape/nightcoreify if provided
- To avoid complicating the Alt Music logic too much, uses "side B" of the same Prison Egg CD
    - That is to say, if there are 2 encore tracks and 3 normal tracks, the second Encore track will only play if you've gotten the CD associated with the second normal track

I haven't actually tested it *with* any Encore music, but I've triplechecked literally everywhere to make sure it didn't break standard play
2024-03-10 21:18:15 +00:00
James R
717dcf0209 restartlevel: preserve last map's gametype
- gametype can be changed without changing gamemap,
  through the pause menu option
2024-03-09 05:20:49 -08:00
James R
0707c9e5ec Add g_musicfade, generic system to fade out the level music for a brief period 2024-03-08 17:53:07 -08:00
James R
9f982a574e Add LapsPerSection property to map headers, fixes finish line distance in hybrid section-circuit maps
- It is possible to have a circuit map separated into
  sections, where there are multiple "laps" before making
  a full loop
- Normally the lap count is used to multiply the finish
  line distance, but it fails for these maps
- The LapsPerSection property fixes the calculation by
  specifying how many laps make up a full loop
  - Default = 1 lap (most maps)
2024-03-03 03:06:52 -08:00
James R
1f3b5dea0a Remove cv_showinputjoy (unused) 2024-03-02 00:16:31 -08:00
Eidolon
f4f7c5b1eb Add fault start mapthing 36 and prefer it for TA
Fixes KartKrew/Kart#1063
2024-02-24 19:15:00 -06:00
toaster
7e217b74f5 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into separate-spb-attack-records
# Conflicts:
#	src/g_game.c
2024-02-23 00:57:40 +00:00
Eidolon
b1cf0207bf Remove unused _saveid fields from in-mem gamedata 2024-02-21 18:44:44 -06:00
toaster
3f78c9d2e6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into separate-spb-attack-records
# Conflicts:
#	src/menus/play-local-race-time-attack.c
#	src/p_setup.cpp
2024-02-11 23:27:33 +00:00
Oni
4ea946067a Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables

See merge request KartKrew/Kart!1811
2024-02-03 19:40:52 +00:00
Sal
3958c15dfe New Credits 2024-01-28 23:31:30 +00:00
James R
ff07b92f18 Gamedata: save SPB Attack times separately from normal Time Attack
Bumps gamedata version! Gamedata version 10 -> 11
2024-01-27 04:23:44 -08:00
James R
05d8d83dcc Refactor recorddata_t and separate into recordtimes_t 2024-01-27 04:13:01 -08:00
toaster
6fdec66dc3 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy 2024-01-26 00:29:06 +00:00
James R
db4e2e692b Add LobbySize option to level headers, controls whether the map appears in vote, based on player count
- Prevents a map from appearing on the vote screen if
  there are too many players
- LobbySize
  - Duel - 2 players max
  - Small - 5 players max
  - Medium - 10 players max
  - Large - 16 players max (default if not set)
- Future proofing
  - Doesn't count bot players in gametypes that don't
    support bots
2024-01-13 22:56:17 -08:00
toaster
325079a39a Delete everything major flagged up by listunusedsprites
Notable deletions:
- Metal Sonic Race
    - Includes all the specialised recording/playback apparatus which made g_demo.c harder to read
- A bunch of hyperspecialised code inside several A_ actions
- EXCEPTION: intentfully left in the spriteless SMK stuff for Sal's add-on down the line.
2024-01-11 01:21:43 +00:00
Oni
df5c866573 Merge branch 'map-access-flingerdinger' into 'master'
Stronger Course progression restriction

Closes #832, #859, and #839

See merge request KartKrew/Kart!1795
2024-01-09 08:11:12 +00:00
toaster
4994ceef2c Gamedata: A Course only needs to be beaten to be stored as an unloaded mapheader record, not need FinishNeeded/a Time Attack record 2024-01-07 13:59:42 +00:00
toaster
83366b6507 More universal Course restriction based on progression
All courses are restricted in Match Race/Time Attack/Online if not visited in GP UNLESS:
- It is the first Race Course of a Cup
- Course has "NoVisitNeeded = True`
    - The Controls Tutorial and Test Run are the only two stages that will need this

The above replaces:
- A lot of restricted courses having to be marked with `FinishNeeded = True`
    - Hidden Palace
    - Sealed Stars 1-14
        - Once Special Mode is unlocked, it will now be possible to practice Sealed Stars before rematching them in GP
- Almost all Tutorial-specific behaviour, since it was heinously hacky

HOWEVER, `FinishNeeded = True` was left in specifically for future releases, and I reserve the right to use it on Adventure Example again before launch.
2024-01-07 13:57:05 +00:00
James R
df0d342e04 Let level darkness be changed per splitscreen, use player_t variables
Modifies netsave.

- Add darkness_start, darkness_end to player_t
2024-01-05 15:56:24 -08:00
James R
8430489673 Replace darktimer/darkness with g_darkness
Modifies netsave.

- Instead of setting a timer, set a start time and end
  time
- Interpolated darkness value itself doesn't need to be
  netsynced
2024-01-05 15:56:24 -08:00
Eidolon
7521e42e62 Add automedal time configs and calculation 2024-01-03 12:24:33 -06:00
Eidolon
746da46321 Read staff ghosts from pk3 directory 2024-01-02 21:05:43 -06:00
Sally Coolatta
5eaf2613c6 Show rank on intermission 2023-12-13 01:28:22 -05:00
James R
5d0c062785 Add g_reloadingMap, true if the map is restarted/retried 2023-11-27 06:28:29 -08:00
James R
d3f9c6e826 Remove mapmusflags 2023-11-27 05:38:20 -08:00
Oni
25d10e382a Merge branch 'locked-cuprow' into 'master'
Second row of cups is invisible if none of them are unlocked

See merge request KartKrew/Kart!1652
2023-11-22 07:30:36 +00:00
toaster
21f152989d Clear separation between basegame and mods
- Always force a page seperation between the last core files cup and the first modded cup
- Lost and Found sits exactly between them
    - If any cup on the last page of basegame is unlocked, place LnF on the last core page
    - Else, LnF is the first "cup" on the first Modded page
    - It's done this way so no Core material is spoiled if you haven't unlocked it yet. We want people to believe RR contains only 7 cups unless they go above and beyond

Also address Volt's bug report: Prevent the first page of cups from being overridden if everything is locked
2023-11-21 22:59:12 +00:00
toaster
382119b8fb Second row of cups is invisible if none of them are unlocked
- Controlled by M_CupSecondRowLocked
    - Looks for any Cup with associated unlockable that's on the second row
    - Cached on load for both relevant menus - Cupgrid and Challenges
- Custom cups will be stretched out onto more pages
    - Side incentive of unlocking more material: Less annoying interactions with custom material
- Pages with nothing unlocked are completely skipped over

Also moves a bunch of minor things which previously used magic numbers to the CUPMENU_COLUMNS/CUPMENU_ROWS defines, for sanity
2023-11-20 21:09:33 +00:00
toaster
66844457cd gpRank_t: Prevent overflow in stored rank
Resolves most of #772.
- Match maximum size of levels array to ROUNDQUEUE_MAX, to prevent edge cases
- Explicitly check that numLevels does not equal/exceed array size before writing
2023-11-19 16:33:16 +00:00
toaster
0762b93ef2 Tutorial skipping challenge - first pass
- Go to a MainCfg-specified map on its guessed gametype
    - `TutorialChallengeMap = RR_ZonedCity`
- Some unique settings
    - K_CanChangeRules() == false
    - If GTR_CIRCUIT, make it Hard Speed
    - If GTR_BUMPERS, die in one hit
    - If GTR_BOTS, make them all difficulty 13 of the default bot skin
    - No Medals or Spray Cans during the Tutorial Challenge
- Complete the stage in 1st place or don't bother at all
- Has the "Give up" menu option available, but no "Try Again"
- Condition for successfully completing the Tutorial Skip
    - `Condition1 = TutorialSkip`

Related bugfixes:
- Correctly wipe skipstats when returning to the Title/menus
- Typing of `ultimatemode` (hey this isn't accessible by anything right now I wonder)
2023-11-16 21:44:52 +00:00
Oni
3b04bde5b9 Merge branch 'will-it-blend' into 'master'
Will It Blend

See merge request KartKrew/Kart!1589
2023-11-05 18:45:51 +00:00
AJ Martinez
506ab31f7f Mania-style time trials 2023-11-02 06:51:51 -07:00
toaster
e060e9dadc More consistent handling of special event round icons
- Gametypes have "GPpic" and "GPpicMini" parameters
- These are shown in contexts where a Round Number would be shown in GP, but an eventmode is under way.
- Instead of having different rules to show up on the pause menu, titlecard, and tally/intermission...
    - Pause Menu Roundqueue, Tally, and Intermission have all been aligned to the same rules.
    - As long as the titlecard is standard, it will show the GP Pic per those rules. (GTR_SPECIALSTART and GTR_BOSS still have their unique behaviour here)
2023-10-25 20:34:40 +01:00
toaster
de79dfe983 UCRP_MAPDESTROYOBJECTS
You have to destroy all objects of a certain list of types.
UNLIKE OTHER CHALLENGES, this is dependent on a mapheader parameter!!
The author of this commit just didn't want to create too laggy a condition check.
- `Condition1 = MapDestroyObjects RR_ESPRESSOLANE tables & chairs
- Map RR_ESPRESSOLANE
    - DestroyObjectsForChallenges = MT_ESPTABLE,MT_ESPCHAIR
2023-10-19 17:28:55 +01:00
toaster
acad8754c8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into break-through-them-all 2023-10-17 23:32:08 +01:00
AJ Martinez
680c063e3a "DARKNESS" mapheader option for Shrink lighting 2023-10-12 21:07:04 -07:00
toaster
d784f6ad4a SECRET_ALTMUSIC
Restricts a map's alt music, in order of music definition.
Supports out-of-order discoveries!
2023-10-08 21:22:58 +01:00
toaster
8fd809f8b1 M_PrecacheLevelLocks(void): Implement a SECOND level of cacheing for Map and Cup unlocks
Determining whether a map or cup is unlocked or not is now linear-time.
- Attempted to cache SECRET_SKIN et al as well, but skins are loaded after unlocks... oh well.
- Was staring down the barrel of a triple-nested loop for implementing SECRET_ALTMUSIC, so did this first to set good precedent.
2023-10-08 18:25:20 +01:00
toaster
d386800c1e Ancient Shrine: Code the rest of the owl
- If a follower with the specific Mystic Melody sound effect (DSMELODY) is used on the Shrine by a local player...
- Activates the shrine after two seconds!
    - This is clientside only.
- Stores on the mapheaderinfo's mapvisited record
2023-10-06 22:24:40 +01:00
toaster
21a4e7ae43 Remove last vestiges of Emerald Hunt behaviour from vanilla SRB2
Was in places the author of this commit needed to look
2023-10-05 22:57:39 +01:00