Commit graph

21253 commits

Author SHA1 Message Date
toaster
9336e39350 Use Zone memory functions for sending compressed saves
Fixes an issue where `SF_RAM` meant `free()` was being called on Zone memory produced by `P_SaveBufferAlloc`
2023-01-03 19:41:27 +00:00
James R
691e84f489 Give item drops a trail upward, fall faster 2023-01-03 05:31:30 -08:00
James R
50d9bf7b7d Faster moving players hit monitors harder 2023-01-03 05:31:30 -08:00
James R
7ce12f37dc Spawn Battle monitors
- Item count has always scaled up with player count. Items
spawn every N tics. Previously, these items were evenly
distributed across all item spots. Now, only one monitor
is spawned at a time and the number of items inside scales
up.

- Emeralds spawn inside of monitors instead of loosely.
- Sphere boxes should spawn in the same way as before.

- Once a monitor has been spawned at an item spot, no more
monitors can be spawned there until that one is destroyed.
There's an additional delay of one spawn interval before
a monitor can be spawned in that location again. This is
so a monitor cannot ever instantly spawn back if one is
destroyed at just the right time.
2023-01-03 05:31:30 -08:00
James R
3491bd0b1d Add Battle monitors
- Includes a struct definition for symmetrical objects
made out of papersprite sides.
- Dimensions of papersprite sides are looked up using
sprite cache.

- Monitors may contain multiple types of items.
- Item RNG is deterministic from the time the monitor is
spawned but the item types are not stored in memory.
Instead the RNG seed is restored every time an item type
needs to be determined. Item types need to be determined
every time the icon on the monitor's screen changes and
when the monitor is popped and drops all its items.
- Monitors sparkle like emeralds if there is an emerald
inside.

- Monitors take damage from players simply bumping into
them. The damage scales up with speed and weight.
- Activating a lightning shield in proximity decimates the
monitor into being able to be destroyed in one hit by
anything thereafter.
- All throwable / deployable items destroy a monitor in
one hit.
2023-01-03 05:31:30 -08:00
James R
3549625095 Add item monitor states
SPR_MSHD
SPR_IMDB
SPR_MTWK

S_MONITOR_DAMAGE
S_MONITOR_DEATH
S_MONITOR_SCREEN1A
S_MONITOR_SCREEN1B
S_MONITOR_SCREEN2A
S_MONITOR_SCREEN2B
S_MONITOR_SCREEN3A
S_MONITOR_SCREEN3B
S_MONITOR_SCREEN4A
S_MONITOR_SCREEN4B
S_MONITOR_STAND
S_MONITOR_CRACKA
S_MONITOR_CRACKB

S_MONITOR_BIG_SHARD
S_MONITOR_SMALL_SHARD
S_MONITOR_TWINKLE

MT_MONITOR
MT_MONITOR_PART
MT_MONITOR_SHARD
2023-01-03 05:31:30 -08:00
James R
ae16f124db K_GetTotallyRandomResult: use NULL roulette data
This fixes random paper items spawner RNG not advancing.
2023-01-03 05:30:53 -08:00
James R
339cb1e8b8 K_KartGetItemOdds: apply GTR_CIRCUIT checks
- No restriction on whether more than one player may
receive the same type of shield outside of Race.
- SPB is now technically allowed outside of Race, if item
odds permit.
- powerItems and assorted checks no longer apply outside
of Race.
2023-01-03 05:29:59 -08:00
James R
a37eccd708 Split powerItem etc conditions from K_KartGetItemOdds 2023-01-03 04:42:48 -08:00
James R
aab661cad8 Split shields and SPB special conditions from K_KartGetItemOdds 2023-01-03 04:42:48 -08:00
James R
5bdbbd1695 Comptime.cmake: escape \backslashes and "quotes" in git subject line 2023-01-02 20:06:30 -08:00
Oni
e400625da8 Merge branch 'broly-sigfpe' into 'master'
Fix Broly SIGFPE

See merge request KartKrew/Kart!841
2023-01-03 02:49:58 +00:00
Oni
46005089f1 Merge branch 'rulesify' into 'master'
Rulesify (resolves #375)

Closes #360 and #375

See merge request KartKrew/Kart!836
2023-01-03 02:43:52 +00:00
Sal
2335c849fe Merge branch 'monitors-prep' into 'master'
Misc. changes for the sake of monitors

See merge request KartKrew/Kart!805
2023-01-03 00:52:52 +00:00
Sal
3f6cc8a183 Merge branch 'cmake-build-type-titlescreen' into 'master'
Show CMAKE_BUILD_TYPE on title screen

See merge request KartKrew/Kart!849
2023-01-03 00:51:30 +00:00
Sally Coolatta
aa4fd8ab13 Add functions to initialize savebuffer_t
g_demo.c is mostly unaltered because it is made of twigs.
2023-01-02 19:47:59 -05:00
Sal
cab15b7d07 Merge branch 'file-and-header-fix' into 'master'
File and header fix (resolves #370)

Closes #370

See merge request KartKrew/Kart!848
2023-01-03 00:40:38 +00:00
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
Sally Coolatta
a22265b50b Use srb2 namespace for written map
Used to be ringracers, but it needs to be SRB2 for SRB2 features in the editor.
2023-01-01 18:21:32 -05:00
Sally Coolatta
f20440984c Add activation flags to -writetextmap 2023-01-01 18:19:04 -05:00
Sally Coolatta
283959ac11 Delete map configs
These belong to the High Voltage Ring repo now.
2023-01-01 18:11:22 -05:00
Sally Coolatta
0d67b12c74 Merge branch 'master' into acs 2023-01-01 17:13:31 -05:00
Sally Coolatta
345e7f83b0 Copy first mapthing tag to their mobjs
Allows the ThingCount and ThingSound ACS functions to fully work now, and adds significantly more possibilities for scripting later.
2023-01-01 17:07:46 -05: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