Commit graph

21083 commits

Author SHA1 Message Date
toaster
e73e0bd835 Don't treat players with 0 lives that are exiting (definitely just completed a race) as irrelevant in P_CheckRacers counts
Fixes special stages not booting you back to the title screen after running out of lives on them
2023-01-02 20:20:47 +00:00
toaster
26f3490ba8 Increased memory safety with cupgrid memory allocation
Also clearer variable name for length of cupgrid page in memory
2023-01-02 13:32:12 +00:00
toaster
4b9797fe26 Correct for recursive iteration of multiple mines in succession clobbering filescope minehitlag 2023-01-02 13:08:11 +00: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
James R
8a92f03f7b Set fuse for Battle items 2023-01-01 18:38:53 -08:00
James R
71004d4b46 Halve spawn time for Battle items 2023-01-01 18:38:53 -08:00
James R
3965f77763 Add BATTLE_SPAWN_INTERVAL 2023-01-01 18:38:53 -08:00
James R
6eb8da1a56 Add K_GetTotallyRandomResult, for battle item spawners 2023-01-01 18:38:53 -08:00
James R
a94e18c277 Add K_UpdateMobjItemOverlay 2023-01-01 18:38:53 -08:00
James R
43aa162fcb Add K_GetChaosEmeraldColor 2023-01-01 18:38:53 -08:00
James R
2e4b5bd061 Clean up P_FuseThink flicker condition 2023-01-01 18:38:53 -08:00
toaster
718eb8b11f Permit losing a life when exited if the player has PF_NOCONTEST 2023-01-02 00:54:24 +00:00
James R
151dccf32f Parity between title screen and menu version info 2023-01-01 15:40:51 -08:00
toaster
c10bd068de Fix loading a map in a seperate file before loading a file with the relevant header 2023-01-01 23:39:28 +00:00
toaster
3dc5d019bc Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into save_p-unglobal 2023-01-01 21:16:29 +00:00
Eidolon
d13f2c34b9 Merge branch 'cxx-foundations' into 'master'
Add SRB2_ASSERT, srb2::NotNull

See merge request KartKrew/Kart!843
2023-01-01 21:05:51 +00:00
Eidolon
2e229dcdde Merge branch 'discord-rpc-internal' into 'master'
cmake: build discord-rpc internally

See merge request KartKrew/Kart!846
2023-01-01 20:54:56 +00:00
Eidolon
19c5711092 cmake: build discord-rpc internally 2023-01-01 14:50:52 -06:00
Sal
21774564da Merge branch 'fix-c++-strcasestr' into 'master'
Fix strcasestr redefine warnings for G++

See merge request KartKrew/Kart!844
2023-01-01 19:41:14 +00:00
toaster
8f78b37e57 Fix yellowmap not being included
Was going to `#include "console.h"` but not worth it for literally one placeholder index
2023-01-01 16:02:55 +00:00
toaster
a020ea86c8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify
# Conflicts:
#	src/k_boss.h
#	src/k_specialstage.h
#	src/y_inter.h
2023-01-01 16:02:05 +00:00
toaster
4bbe3d7177 Draw Rings/Lives HUD even when not GTR_CIRCUIT 2023-01-01 14:55:58 +00:00
toaster
d5cd4f6798 Make placeholder for vote screen gametype color yellowmap[0] instead of 255 cyan 2023-01-01 14:54:58 +00:00
Sally Coolatta
761be01dbb Contain end & size into savebuffer_t
I would've liked to make it use a single allocate function to do this very cleanly, but these cases were very clearly not meant to be standardized and use wildly different methods to allocate & free...
2023-01-01 00:23:23 -08:00
James R
77d54a09fe Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2023-01-01 00:23:23 -08:00
James R
061f8b0587 g_demo.c: use savebuffer_t 2023-01-01 00:23:21 -08:00
Sally Coolatta
38a35b6f78 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2023-01-01 00:22:56 -08:00
toaster
42a6b03e48 Remove "circuitmap"
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
2022-12-31 23:27:59 +00:00
toaster
84b066245e Demo savemode text is consistent colour now 2022-12-31 23:14:43 +00:00
toaster
425a02d09b Make GTR_BUMPERS less monolithic
* Battle-like item box respawn handling inverse of GTR_CIRCUIT
* Make battle fullscreen overlay forbid GTR_CIRCUIT
* Make GTR_ITEMARROWS actually do something
* Make everything related to points actually use GTR_POINTLIMIT
* Fobid sphere addition without GTR_SPHERES, to mirror ring addition forbidding
2022-12-31 23:12:41 +00:00
toaster
c23a2d8dca Don't force a reset of the level in GTR_BUMPER when lonesome if not GTR_CAPSULES 2022-12-31 22:49:20 +00:00
toaster
3357f56c9e G_RandMap should consider & all valid flags for gametype, not ==. 2022-12-31 22:44:49 +00:00
toaster
94bcf79710 Restrict collecting rings in GTR_SPHERES, not GTR_BUMPERS! 2022-12-31 22:34:19 +00:00
toaster
98646ef65b Fix arrangement of gametype rules between SOC and constants 2022-12-31 22:33:09 +00:00
toaster
36d6fcaba4 Add a preview for Special Attack unlock type 2022-12-31 21:43:39 +00:00
toaster
05241341b8 Remove the last few instances of gametype-specific colorisation 2022-12-31 21:38:52 +00:00
toaster
a2c5ff6ac8 Remove the duplication of levellist.netgame into cupgrid.netgame 2022-12-31 20:56:00 +00:00
toaster
e0c4c235df Move "return" in "Are you sure you want to return to the menu?" to the next line, to balance the lines out a little better 2022-12-31 20:34:11 +00:00
toaster
76ea72ceac Prevent entering the cup or level select if there's no valid maps to pick from. 2022-12-31 20:33:31 +00:00
toaster
c857153c29 Unstaged closing brace 2022-12-31 19:03:13 +00:00
toaster
6b18f869b9 Prevent a special stage win by sneaking ahead of the UFO to the goal line 2022-12-31 19:02:22 +00:00
toaster
5b027ff2fe Instead of preventing lives for GTR_CAPSULES, prevent them for it being GPEVENT_BONUS 2022-12-31 19:00:52 +00:00
toaster
a86ed5c6cb Rework the conditions for the previous commit
- The "never force a retry" condition is now `!G_GametypeUsesLives()`
- In GT_SPECIAL *and* GT_VERSUS, check for K_IsPlayerLosing before retry, instead of bespoke check
2022-12-31 18:59:56 +00:00
toaster
39e68d1ae3 Clear UFO pointer if its object was removed (matches up with general mobjthinker P_SetTarget handling) 2022-12-31 18:45:04 +00:00
toaster
44555be704 Change the conditions for forced retry at end of round
- If modeattacking, never
- If Sealed Star, if the UFO still exists or the emerald hasn't been picked up
2022-12-31 17:57:22 +00:00
toaster
36b1f5f488 Have a Cup visibly locked if no levels are accessible by the current rules of menusearch_t
- Solved by leveraging M_GetFirstLevelInList alongside existing M_CountLevelsInList calls
- Also optimises the above calls in the M_CupLocked case, since that's no longer being directly used otherwise
2022-12-31 17:50:49 +00:00
toaster
2db7562c24 LF2_FINISHNEEDED
- Replacement for LF2_VISITNEEDED, which was itself a Kart-specific inversion of LF2_NOVISITNEEDED
- Prevents selection in time attack before you've beaten the level in another context (GP, or MP if applicable)
- Should be used for Sealed Stars (and Adventure Example) exclusively IMO, but usable for others too
Related adjustments:
- Allow a map to have a `TypeOfLevel` of 0 without error
- Change the Condition String for UC_MAPVISITED to "Finish a round on X" (previously "Beat X")
2022-12-31 16:22:46 +00:00
toaster
dc7222821c Move M_Init() to fix saving of some menu-specific cvars 2022-12-31 16:05:04 +00: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
James R
e9dc22a399 Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
2022-12-30 20:17:26 -08:00