Commit graph

522 commits

Author SHA1 Message Date
James R
4ce0476d17 Extern comprevision_abbrev_bin in all builds too 2024-04-05 16:45:44 -07:00
toaster
7f6de407f1 Copyright update: Add Kart Krew (2024) in general for high-traffic inherited sourcefiles 2024-04-02 17:42:38 +01:00
Eidolon
21a407e478 Update RR mainwads loading 2024-03-21 19:29:49 -05:00
James R
1a330dd471 Raise TRAVERSEMAX 2 -> 8
- Improves nextwaypoint searching on a problem spot in
  Endless Mine
- I think the sight checking fail state can trigger too
  quickly, so this makes it more lenient? (I'm sorry,
  I don't really understand it myself.)
2024-03-06 18:48:32 -08:00
James R
5eeb45228c DEVELOP: add debugtraversemax cvar to improve sight check consistency 2024-03-06 18:48:32 -08:00
James R
c6bdf4eae3 Remove RANGECHECK, replace with devmode prints
- All code that would I_Error behind RANGECHECK, simply
  return
- Add debug prints under devmode render
2024-03-03 17:31:33 -08:00
James R
56e710266c M_TokenizerOpen: pass size in as argument instead of calling strlen implicitly
This function is used for parsing TEXTMAP and the data is
not NUL-terminated.
2024-02-08 18:16:41 -08:00
James R
a879975e83 devmode DEMO: replay buffer usage displayed in real-time on the HUD
- Buffer usage in megabytes, bytes and percentage
- Approximate usage per second
- Estimated time until buffer runs out and replay is stopped
2024-01-29 02:20:26 -08:00
Sally Coolatta
de3d9a29c8 Make PWRLV work in Battle
Additionally, add DBG_PWRLV for devmode so the debug prints can be accessed without needing to edit the code any.
2024-01-23 00:00:26 -05:00
Eidolon
2bad8126ac Delete outdated memcpy optimization
The libc memcpy is faster
2023-09-24 18:32:22 -05:00
James R.
472f7d060c Kill HW3SOUND related code (in files that are actually used) 2023-09-22 02:00:42 -07:00
Sally Coolatta
867253540c Sonic 3-style intermission coloring
Not just tan, but blue & a tiny bit of green!
2023-09-07 16:19:37 -04:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
toaster
e1b7cb66cb Rework the Spray Can system to ACTUALLY be what we want
Instead of being specific to each level, Spray Cans are stored in a list on gamedata that will be stepped along each Spray Can you collect.
They are only assigned to a level on collection - which prevents you from farming the same easy location for every colour in the game.

In addition, this new system is one step short of dehardcoding them entirely. Now only Spray Cans specifically asked for by the existence of UC_SPRAYCAN will be put in the list, and if a secondary parameter is either "Yes" or "True", it will be put at the head of the list. This could technically support custom skincolours one day, but the author of this commit doesn't care to do the last bit of work necessary to make it happen.

There's a slight extra overhead in that skincolor_t now also holds a `cache_spraycan` (renamed from `cachedcan`, which maps had previously)

Currently, there's no safeguard against grabbing it on a custom course - you'll lose the Spray Can as soon as you load a fresh game again - but  I consider that easy to fix (tomorrow) and necessary before merger, because the author of this commit does NOT want complaints on release because we forgot to protect users who keep on losing their skincolors.
2023-08-23 00:46:46 +01:00
toaster
1d06637a38 First pass at assigning unique spraycans to level headers
Increments gamedata minor version, be aware
- M_AssignSpraycans
    - Called in M_FinaliseGameData.
    - Attaches a hardcoded set of colours to all race maps in cup order, stopping once we run out.
    - The colours are shuffled, with some "freebies" always at the head of the list.
    - Integrates partial lists pretty well.
    - In DEVELOP builds, I_Errors if it produces corrupted state.
- G_LoadGameData, G_SaveGameData
    - Save & Load is implemented for these assignments
2023-08-19 15:08:55 +01:00
toaster
5036719280 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into seeecret-colors
# Conflicts:
#	src/k_menudraw.c
2023-06-26 23:25:47 +01:00
toaster
12ff436877 Make a first-class feature instead of a passworded secret
- Now called "Grand Prix Backup"
- Filename is now `gpringsav.bkp`
- Since available in standard contexts, do a little extra guarding against unsporting behaviour:
    - In non-DEVELOP builds, delete Grand Prix Backup when returning to the titlescreen/menus.
- "undo your extra work and make it more generic" - Tyron
2023-06-25 23:44:37 +01:00
toaster
e372d348cd Live Event Backup
Associated menu stuff is rough and unpolished, but it's 1am for the author of this commit.
- Activated for this session by either of the following Passwords.
    - `savetheframes`
    - `savetheanimals`
    - The idea is that if Ring Racers were ever ran at a GDQ, runners would swear their alliegance to a particular Metroid routing at the startup stage, because I think it's funny and cute.
- A live event backup is created/overwritten on non-cheated grandprix level change.
- It's wiped on reaching the podium.
- When hitting PLAY on the main menu, if a live event backup exists, make a Menu Message.
    - If you hit A, turn live event backups on for this session, and load the backup.
    - If you hit B/X, delete the backup and proceed to character select.
        - Done this way to avoid cheating a different character to the end of GP.
- Unlike the (maybe a little over-)engineering of ringdata.dat, liveringbak.bkp is streamlined as all hells and has very little recovery for differing file lists.
2023-06-25 23:44:37 +01:00
wolfy852
b1524a8c7f intermission skincolor + demolition of sanity 2023-05-10 14:42:53 +01:00
Sally Coolatta
d953049c78 ACS: User properties can tell bool from string 2023-05-02 18:44:30 -04:00
Sally Coolatta
c486ec19af SECRET_COLOR 2023-04-25 14:19:52 +01:00
James R
5ee4461bfc hardware/hw_main.c: remove unused clipping code, remove ifdef NEWCLIP 2023-04-08 21:08:07 +01:00
AJ Martinez
535fc17875 Fix RRID/crypto primitive size defines 2023-03-30 20:36:10 -07:00
Eidolon
610351b872 Normalize all volume scales to 0-100 2023-03-08 15:22:29 -06:00
SteelT
ff15a4bf69 Make PARANOIA be on by default for DEVELOP builds 2023-02-26 22:27:52 -05:00
James R
601fb49d6d Turn on RANGECHECK in all builds 2023-02-18 22:34:51 -08:00
James R
a77234233b doomdef.h: enable most debugging ifndef NDEBUG 2023-02-14 04:16:57 -08:00
James R
4e51ad6c78 Add devmode music
Song: <NOTHING>

        Song:    DEMOZ
      Format:      OGG
      Volume:   50/100
      Loop A: 00:00.65
      Loop B: 01:06.00
     Elapsed: 01:09.00
2023-01-12 03:29:43 -08:00
James R
55636fa690 Separate git commit subject line from comprevision, add SRB2_COMP_NOTE 2023-01-05 18:32:20 -08:00
James R
f5b985bcc3 doomdef.h: refactor comptime externs 2023-01-05 18:30:12 -08:00
James R
5887c36111 Show CMAKE_BUILD_TYPE on title screen
Includes a hint if optimizations may have been turned off.
2023-01-02 01:46:05 -08:00
Eidolon
6af003771d Add SRB2_ASSERT, srb2::NotNull<T>
Add SRB2_ASSERT, superceding I_Assert

This assertion macro always expands to a call of srb2::do_assert, which
is overloaded with two templates: one which applies if the provided
Level is less than or equal to the SRB2_ASSERTION_LEVEL, and one which
is a no-op. When optimizations are enabled, this will verifiably remove
the evaluation of the expression in all cases, instead of evaluating the
expression and doing nothing with it.

Add srb2::NotNull wrapper utility

This is meant to be used in places where pointers are used as
parameters. It can be used with any pointer-like type, not just raw
pointers. During construction of NotNull, the pointer will be asserted
not-null in debug and paranoia builds, and in release optimizations with
no assertions, the code decays gracefully to standard pointer-passing.
2022-12-30 23:49:29 -06:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
VelocitOni
8cd36dbf03 Merge branch 'master' into unlockables-undefeatable 2022-12-18 01:59:04 -05:00
Eidolon
15acefcc33 c++: Make some defines C++-valid 2022-12-12 16:38:25 -06:00
toaster
803490d7aa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/d_clisrv.h
#	src/doomstat.h
#	src/g_demo.h
#	src/m_cond.h
2022-12-10 21:54:58 +00:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
toaster
6d0637d39d Unlockable skins (in a way friendly to #define MAXSKINS 255)
Mammoth commit, sorry. I only realised halfway through writing it that SECRET_SKIN was only partially merged.

Ports from 2.2:
- Merge SECRET_SKIN (STJr/SRB2!1474)
    - Default skin is now handled by checking all skins for unlock status, and I_Erroring if none are available
    - Don't show skin names on game startup, to keep our secrets hidden
    - Unlockables now have string variables zallocated.
         - For skin names rather than numbers.
    - Correctly clean up memory when freeing unlockables and emblems.

Bespoke code:
- For temporary testing. `unlocks.pk3`
    - Using this for rapid testing gameboot SOC instead of patch.pk3 because of the intent to turn that into scripts.pk3
- Don't not save gamedata in DEVELOP builds, even if you've used cheats!
- `player->availabilities` is now an array of UINT8
    - (MAXSKINS + 7)/8 entries, or 32 bytes.
    - Included with XD_ADDPLAYER instead of XD_NAMEANDCOLOR.
         - Simplifies a lot of logic with respect to demos, skin changes mid-game, etc.
             - Seriously, there's a lot of random places in the code that just iterate over MAXSPLITSCREENPLAYERS and g_localplayers to update availabilities in real time in a way that's not particularly netsafe...
         - Lines up with the plan for handling unlocks when returning to menus.
         - Was included with XD_ADDBOT, but that actually overruns the netxcmd buffer at first mapload with 7 bots. We might need to consider expanding the size of the netxcmd buffer...
    - In demos, can be interpreted as both relative to the original replay and the current skin list depending on boolean context provided to R_SkinUsable.
    - Used for SF_IRONMAN (and will crash if all other skins are inaccessible).
- Grand Prix bot randomisation uses the host's unlocks.
- Don't show locked characters on the fancy new character select.
-  DXD_JOINDATA for demos
    - Replaces the dual-purpose behaviour of DXD_PLAYSTATE
    - Contains availabilities
    - Handles bot material in a different way
- Forceskin restrictions
    - Won't run in demos, because it's assumed recorded DXD_SKIN will handle all the conversions the original match had
    - Won't run if K_CanChangeRules says no
- Correctly set `mapvisited` on level visit, even in [fake gasp] MULTIPLAYER/NETGAMES!! 🥹
- Added updating unlockables and extra emblems on `mapvisited` update.
    - Currently fails to produce the cecho, but that'll be stripped out entirely in a future commit so I'm not bothered.
2022-11-27 22:53:29 +00:00
Sally Coolatta
0233c26386 Chengi's new position numbers 2022-11-17 21:11:01 -05:00
James R
58bb648b0a Merge branch 'udmf-cherrypick' into 'master'
Update our UDMF

Closes STJr/SRB2#862

See merge request KartKrew/Kart!727
2022-10-29 06:54:48 +00:00
toaster
ce020d7207 timelimitintics-related shenanigans
- Play a countdown sound (same as introcountdown) per each of the last 3 seconds
- Jitter the time display HUD extra strong in a two-tic window around the above
- Fix timelimitintics not being set in TESTOVERTIMEINFREEPLAY builds (which is now all DEVELOP builds)
2022-10-16 14:21:52 +01:00
Sally Coolatta
7559169144 Fix Trick Panel TERRAIN not working 2022-10-11 01:31:06 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
Sal
1300ec5d56 Merge branch 'commit-version' into 'master'
Compare git commit before joining netgames

See merge request KartKrew/Kart!721
2022-10-01 02:54:58 +00:00
Sal
e9d2785cc3 Merge branch 'you-have-uncommitted-changes' into 'master'
The programmer took a nap. Hold out, programmer!

See merge request KartKrew/Kart!722
2022-10-01 02:14:15 +00:00
James R
62b2718261 Print on the title screen and in console if there are uncommitted changes 2022-09-29 15:31:53 -07:00
James R
d176aefd88 Compare git commit when joining netgames in DEVELOP builds 2022-09-29 12:55:07 -07:00
Sally Coolatta
80d9637dda devmode cheat online 2022-09-29 12:19:45 -04:00
James R
048e7e807c Remove macro to disable noclip camera 2022-09-29 01:37:51 -07:00
Sally Coolatta
85499045f9 Merge branch 'master' into cheats-streamline 2022-09-27 15:41:17 -04:00