Compare commits

...

354 commits

Author SHA1 Message Date
NepDisk
2ace4b2500 Fix bots not being able to trigger things 2025-04-24 00:37:15 -04:00
NepDisk
d82d148a17 [PATCH] Fix Crash with stepup clamp
How silly. Thanks Alug so much!
2025-04-23 18:16:30 -04:00
Sally Coolatta
2c50b2ee58 Remove P_NightsItemChase
Keeps being called in some strange instance by rings, even though the case that calls it shouldn't happen, and causing a crash -- just delete it.
2025-04-23 18:02:37 -04:00
Sally Coolatta
617d9f9f7b Polish ring spill
More circular by using pitch, takes gravity into account, actually has a code path for ring loss that's more than 5 rings
2025-04-23 17:15:32 -04:00
Sally Coolatta
272ebc164d Make ring respawn a division
Lets it stay very long for 1v1 like we want, but not matter the closer it gets to 8 players. Tired of people spamming rings to compensate for this problem :V
2025-04-23 17:14:25 -04:00
toaster
61f498bf9c MT_FLINGRING: Nullify fuse on touch
If the fuse caused the flingring to be deleted, it would hog a spot on player->pickuprings until the player respawned.

This is not a perfect solution, but it should resolve the problem in practice.

Needs testing to confirm this doesn't introduce TA desync, but in the worst case I would wager it affects a single digit number of runs at worst.
2025-04-23 17:06:38 -04:00
NepDisk
527baece19 Use Proper CLAMP here 2025-04-23 15:47:13 -04:00
NepDisk
e10af1eb70 Fix rare crash in K_SetRespawnAtNextWaypoint 2025-04-22 22:21:17 -04:00
NepDisk
39302801ad remove end dist slow down.
Probably isn't needed here
2025-04-22 17:59:49 -04:00
NepDisk
3fb79e4a1f Start chaining at half of sneaker time for more consistency 2025-04-22 16:41:04 -04:00
NepDisk
9b9e4db51e Let bots chain some boosts with rings 2025-04-22 16:31:40 -04:00
NepDisk
fc8d8d3032 Nerf bot ring gain 2025-04-22 15:22:50 -04:00
NepDisk
152b8f6852 Update party archive code 2025-04-22 14:46:41 -04:00
NepDisk
9fa5c4c68c Fixing bot desyncs online 2025-04-22 14:09:10 -04:00
NepDisk
b3805d3437 Don't let bots cheese spinout 2025-04-22 13:45:59 -04:00
Sally Coolatta
a1a9f3556a No 1 PWRLV point in lobby of bots/guests, either 2025-04-22 13:43:09 -04:00
NepDisk
40927a2760 Run speed calc for pogosprings 2025-04-22 12:45:39 -04:00
NepDisk
fef77b3be4 ItemOdds tweak, Nerf bots a bit 2025-04-22 01:29:18 -04:00
NepDisk
19d5cbfb60 Adjust odds a little bit 2025-04-21 22:15:15 -04:00
Gustaf Alhäll
b08deed2e9 Fix use-after-free when loading addons after searching addons 2025-04-22 03:42:23 +02:00
NepDisk
20d98b5f84 Actually fix mickey mouse glitch 2025-04-21 21:03:10 -04:00
NepDisk
066b5f461f Fix the Mickey Mouse glitch 2025-04-21 20:39:59 -04:00
NepDisk
f14bd6c599 Expose previtem roulette to lua 2025-04-21 20:27:03 -04:00
NepDisk
d5fdd9957f Fix splitscren parties not working in kart scripts 2025-04-21 20:20:35 -04:00
NepDisk
105eb85bd3 Get rings from any itembox, expose more functions to lua and battle related things 2025-04-21 19:56:04 -04:00
NepDisk
e2ab07a266 Setup b_socheader for c++ 2025-04-21 14:31:42 -04:00
NepDisk
012df40fcd Terrain Def Mapheader toggle 2025-04-21 13:31:41 -04:00
NepDisk
b8c0b29606 Unlobotimize bots
Whoops friction sure is funny eh?
2025-04-20 20:01:13 -04:00
JugadorXEI
448495c91c Make loop end point thing sorting consistent (fixes loop desyncs) 2025-04-20 13:17:53 -04:00
NepDisk
099bdb1be0 Custom width and height support 2025-04-19 22:43:03 -04:00
Alug
d8b6b8e981 make a backup of save data before writing to it 2025-04-19 14:18:18 -04:00
NepDisk
ed7b667aa7 Update File headers to use BLANKART 2025-04-19 13:33:28 -04:00
Eidolon
7a0949b99c Prevent integer div by 0 in curl progress callback
If the curl callback is called at the exact same time as the
download begins, this callback would cause an integer division by
zero.
2025-04-19 03:11:38 -04:00
NepDisk
007f09edc3 Include compile instructions.
SRB2 guide doesn't really work the same for this anymore.
2025-04-18 17:56:49 +00:00
NepDisk
869bf3bd9d Update the hashbrowns 2025-04-17 03:14:33 -04:00
NepDisk
e9c2f20599 Merge pull request 'Port SRB2Kart v1 and SRB2 2.1 Objects' (#45) from portv1objects into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/45
2025-04-17 06:54:20 +00:00
NepDisk
cc881cdabd Merge branch 'blankart-dev' into portv1objects 2025-04-15 18:28:50 -04:00
GenericHeroGuy
d5a1bc253e Fix Windy Canyon 2025-04-16 00:16:21 +02:00
NepDisk
06d35a774e Merge branch 'blankart-dev' into portv1objects 2025-04-15 16:41:57 -04:00
NepDisk
1d1f697f2f Compat changes for TOLs 2025-04-15 16:39:19 -04:00
NepDisk
89478cdd47 Fix lingering nights score 2025-04-13 18:07:29 -04:00
NepDisk
a524831f1e Port v1 objects pt 7: HOHOHO MERRY CHRISTMAS 2025-04-13 18:02:55 -04:00
NepDisk
af06da6560 Port v1 objects pt 6: Port 2.1 bosses 2025-04-13 17:39:35 -04:00
NepDisk
67fd8018a8 Fix RAGuard and other minor fixes 2025-04-13 15:09:51 -04:00
NepDisk
5d886b83ba Fix RAGuard and other minor fixes 2025-04-13 15:07:10 -04:00
James R
e6ba08802e p_saveg.c: replace unknown thinker error with assert
It is undefined behavior to cast function pointer to
void*.
2025-04-13 13:58:04 -04:00
NepDisk
20fcb6231e Merge branch 'blankart-dev' into portv1objects 2025-04-13 12:36:44 -04:00
GenericHeroGuy
721b483d93 Reorder skincolors to match Kart 2025-04-13 18:28:09 +02:00
NepDisk
bc7056ce24 Merge branch 'blankart-dev' into portv1objects 2025-04-13 11:22:52 -04:00
NepDisk
15deb55e96 Acutally fix this. 2025-04-13 11:20:05 -04:00
NepDisk
c56e66a36c Merge branch 'blankart-dev' into portv1objects 2025-04-13 10:51:23 -04:00
NepDisk
f2bb124ab7 Fix TSR in compatmode 2025-04-13 10:50:36 -04:00
NepDisk
976495df59 Merge branch 'blankart-dev' into portv1objects 2025-04-13 08:52:23 -04:00
NepDisk
539395b8ea Make TA itembreaker always use deathmatch start 0 if race start doesn't exist 2025-04-13 08:51:53 -04:00
NepDisk
f153776929 Merge branch 'blankart-dev' into portv1objects 2025-04-13 06:54:03 -04:00
NepDisk
8bf5180385 RA preset fixes 2025-04-13 06:53:47 -04:00
NepDisk
4976e1eb74 Merge branch 'blankart-dev' into portv1objects 2025-04-12 18:53:23 -04:00
NepDisk
2e9c286ecf Safe Guard variables for TA
Also enforces Chain offroad for mdoes that use chaining
2025-04-12 18:52:54 -04:00
NepDisk
15a02fdeed Merge branch 'blankart-dev' into portv1objects 2025-04-12 13:23:55 -04:00
NepDisk
274cd8e65b Update hash for menu stuff and remove NOMD5SUM 2025-04-12 13:21:58 -04:00
NepDisk
d8c7bbbc7e Merge pull request 'Add Support for Multiple records per map.' (#44) from trimaprecords into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/44
2025-04-12 17:13:38 +00:00
NepDisk
28a493dbc3 Tri map records pt.3: Finalize changes 2025-04-12 13:12:24 -04:00
NepDisk
807e95a011 Tri map records pt.2: prevent menu crashes 2025-04-12 09:38:17 -04:00
NepDisk
0ab033c497 Tri map records pt.1 2025-04-12 09:13:58 -04:00
NepDisk
febd689aab Fix some mario mode objects 2025-04-11 22:40:49 -04:00
NepDisk
bfea7f239a Merge branch 'blankart-dev' into portv1objects 2025-04-11 12:56:55 -04:00
NepDisk
14b1f52573 Stacking deincrementor tweaks 2025-04-11 12:56:26 -04:00
NepDisk
6125e1d5d0 Merge branch 'blankart-dev' into portv1objects 2025-04-11 10:04:42 -04:00
NepDisk
f7cff08ae6 Disable emblem updates when RA mods are on 2025-04-11 10:04:02 -04:00
NepDisk
c9101e4cbd Merge branch 'blankart-dev' into portv1objects 2025-04-11 08:29:08 -04:00
NepDisk
e01b29ac09 Fix up some issues with TA mods commit
Thanks GHG for the help
2025-04-11 08:23:57 -04:00
NepDisk
ecb359ef1f Merge branch 'blankart-dev' into portv1objects 2025-04-10 20:03:35 -04:00
NepDisk
8a1d8dafa7 Finish kart purple drfit globalization 2025-04-10 20:02:49 -04:00
NepDisk
4f3044ac97 Merge branch 'blankart-dev' into portv1objects 2025-04-10 19:55:23 -04:00
NepDisk
9cd4294c21 TA support for extra game toggles 2025-04-10 19:53:44 -04:00
NepDisk
94cc3ac59f Remove some confcliting objects 2025-04-10 11:56:54 -04:00
NepDisk
4369ed7a07 Merge branch 'blankart-dev' into portv1objects 2025-04-10 09:57:55 -04:00
LJ Sonic
3f30e97609 No longer store wadnum in sprnames 2025-04-10 09:54:02 -04:00
NepDisk
af9d7a4522 Merge branch 'blankart-dev' into portv1objects 2025-04-09 20:04:47 -04:00
NepDisk
dede660e89 Reduce wall transfer tilting and make it only affect the player 2025-04-09 20:03:24 -04:00
NepDisk
9085bf51c4 Merge branch 'blankart-dev' into portv1objects 2025-04-09 18:33:13 -04:00
NepDisk
036a87f0a2 More stacking customization cvars 2025-04-09 18:31:31 -04:00
NepDisk
a580bc9433 Port v1 objects pt 4.5: extra stuff 2025-04-09 16:39:58 -04:00
NepDisk
f0a6a112ac Port v1 objects pt 4 2025-04-09 13:45:35 -04:00
NepDisk
c3dc9918ba Merge branch 'blankart-dev' into portv1objects 2025-04-08 13:26:13 -04:00
NepDisk
4c6052c707 [PATCH] Adjust Slipdash Spark Visuals 2025-04-08 13:25:26 -04:00
NepDisk
b39f76ccf4 Merge branch 'blankart-dev' into portv1objects 2025-04-08 12:18:44 -04:00
NepDisk
a53c2d87da Restore power giving for some effects 2025-04-08 12:18:12 -04:00
NepDisk
2868c4e077 Merge branch 'blankart-dev' into portv1objects 2025-04-08 11:05:07 -04:00
NepDisk
c1047bee92 Making zero indexing require compatmode 2025-04-08 09:22:52 -04:00
NepDisk
1d709184a9 Merge branch 'blankart-dev' into portv1objects 2025-04-07 21:51:30 -04:00
NepDisk
9e2c77f03f Make sfxinfo zero indexed again 2025-04-07 21:40:57 -04:00
NepDisk
daf5fdf748 Remove Bumper Death animation 2025-04-07 21:01:01 -04:00
NepDisk
32b9b82dc2 Port v1 objects pt 3 2025-04-07 17:54:14 -04:00
NepDisk
f77e310c5e [PATCH] Compat changes 2025-04-07 15:50:56 -04:00
NepDisk
46d8a7c2b1 Merge branch 'blankart-dev' into portv1objects 2025-04-07 12:54:53 -04:00
NepDisk
e550ae380e Port driftsparkpulse 2025-04-07 12:54:24 -04:00
NepDisk
1fb07bacb7 Port v1 objects pt 2 2025-04-07 00:32:32 -04:00
NepDisk
7983b94cf3 Porting v1 objects part 1 2025-04-06 12:34:50 -04:00
NepDisk
45c09ba1a2 Readd missing sprite, fix spacing on thinker code 2025-04-06 10:06:11 -04:00
NepDisk
93d35d275d Minor fixes for menu and lua 2025-04-05 21:37:37 -04:00
NepDisk
3445e6b6e6 Fix new waypoint jank 2025-04-05 11:38:12 -04:00
Alug
d5c257d2ac fix one -Wmaybe-uninitialized warning 2025-04-05 14:47:21 +02:00
NepDisk
4588a450f4 Hacky fix for shovellnight map 2025-04-03 19:40:05 -04:00
NepDisk
53ac62dfbd [PATCH]OpenGl fix for FOFs 2025-04-03 13:35:20 -04:00
NepDisk
d05167a2db Update hash 2025-04-03 11:49:54 -04:00
GenericHeroGuy
c936c24d15 Replace mainwads with an enum
The mainwads check in G_SetGameModified is replaced by a modifiedgame check
in D_SRB2Main
2025-04-03 17:36:13 +02:00
NepDisk
721d0f9450 Port the SRB1 badniks 2025-04-03 10:15:19 -04:00
NepDisk
889170823d Merge pull request 'Spectator freecam' (#35) from freecamspectate into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/35
2025-04-02 21:54:50 +00:00
NepDisk
a0f5e41a23 Fix party system interaction with freecam 2025-04-02 16:57:35 -04:00
NepDisk
fb5d81a26c Fix Copy Paste in wallrange code 2025-04-02 16:28:25 -04:00
Alug
2350f98aed disable compiling with ipv6 support
see commit before
2025-04-02 16:25:37 -04:00
Alug
c0b1458acc bugfixes for sock stuff + kinda fix ipv6
thx srb2!
sadly we cannot really make use of ipv6 since vanilla clients cant really handle stuff well ontop of the server browser not supporting them anyways, sad!
its probably better to just disable ipv6 compile completely
however this also has minor cleanups and bugfixes for ipv4 too (server browser now should work proper if you rerfresh it often and then close and open it again etc)
2025-04-02 16:24:54 -04:00
Alug
a3b50ad518 better check for destinationnode 2025-04-02 16:12:48 -04:00
Alug
9bf9f6f9a3 make the whole tcp stack return errno errors 2025-04-02 16:11:39 -04:00
NepDisk
0e79925607 [PATCH] Convert kart renderer related changes to use mapnamespace system instead of UDMF
Thanks Alug!
2025-04-02 16:04:54 -04:00
James R
06c584d1fd Don't reset camera position when spectating
Fixes a software renderer crash due to hitlag VFX from the
player's death (death from spectating) being too close to
the camera.
2025-04-01 23:12:37 -04:00
James R
30cf74eb3e G_DoPlayDemo: clear camera_t
- Fixes freecam not being reset between restarts
2025-04-01 21:22:19 -04:00
NepDisk
79e81564c4 Freecam pause exception 2025-04-01 20:47:02 -04:00
NepDisk
104bfaa7fe Fix democam not moving 2025-04-01 20:30:09 -04:00
NepDisk
f81c764057 Fix Splitscreen freecam
Based on fec0f13419 0b7a6ed7f5
2025-04-01 18:36:40 -04:00
NepDisk
911afb22a6 Move freecam state to camera_t
Based on fa89576f34 p1 still controls both cameras for now.
2025-04-01 13:57:27 -04:00
NepDisk
408a64ab4b Merge branch 'blankart-dev' into freecamspectate 2025-04-01 13:21:58 -04:00
NepDisk
62dac53cdd Prevent replays from asserting on start 2025-04-01 11:10:37 -04:00
NepDisk
d767f383a4 Fix accel sticking after previous accel fix 2025-03-31 23:51:38 -04:00
James R
b049abe0a7 ArchiveSectors: send diff5 2025-04-01 01:23:35 +02:00
NepDisk
ca9ef29e2a Netsync slipdash active 2025-03-31 18:50:58 -04:00
GenericHeroGuy
48f3cea3af Make slipdash actually activate next round lol 2025-03-31 22:31:05 +02:00
NepDisk
ae8385f309 Merge pull request 'Slipdash' (#34) from slipdash into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/34
2025-03-31 18:05:41 +00:00
NepDisk
2e2b90f843 Finalize Cvar and push check to lua 2025-03-31 14:04:06 -04:00
NepDisk
52d8520eea Fix ccache compile error 2025-03-31 13:19:34 -04:00
NepDisk
b58a98e268 Fix accel being overwritten 2025-03-31 12:43:17 -04:00
GenericHeroGuy
e92803dd25 Handling boost, tweaked visuals 2025-03-31 18:06:21 +02:00
NepDisk
aaadef0c76 Make the speedboost half the thrust 2025-03-31 11:17:07 -04:00
NepDisk
bf1eae6e8b Small slipdash tweaks
the rate for charging the slipdash has been increased and it now applies speedboost (no accel!) of the exact same speed as its thrust for speed value smoothing. Squishedtimer also removes slipdashcharge.
2025-03-30 22:43:00 -04:00
NepDisk
3ed9956de7 Merge branch 'blankart-dev' into slipdash 2025-03-30 20:07:36 -04:00
NepDisk
9a8c89b1d8 Various HUD additions
Wide lap sticker, hud element offsets, GetHudColor Helper, Circle Input display option
2025-03-30 20:05:09 -04:00
GenericHeroGuy
68e0a62966 The slipdash 2025-03-31 01:55:33 +02:00
NepDisk
5b7442e040 Merge branch 'blankart-dev' into freecamspectate 2025-03-30 11:40:24 -04:00
NepDisk
6bb171e4fc Add bot controller to line special check 2025-03-30 11:40:01 -04:00
James R.
d22a1d0622 R_ResetViewInterpolation: wait an extra tic if R_UpdateViewInterpolation has not run yet, do not add extra time for subsequent calls 2025-03-30 11:13:37 -04:00
NepDisk
f3ecfae3d8 Revert 'Invert freecam turning in encore'
This reverts commit 3bab18cb21.
2025-03-30 11:06:53 -04:00
NepDisk
d6ed7e0373 No longer needed since it applies to freecam already 2025-03-30 11:05:50 -04:00
Alug
8eced6db14 oops smol error 2025-03-30 10:42:50 -04:00
Alug
9587afa23b let postimg stuff also apply to freecam 2025-03-30 10:41:03 -04:00
Alug
7656b519bf fix postimg data types mismatch
also remove the "postimgflag_t" typedef since its useless
and use smoler type for everything we dont need much space lol
2025-03-30 10:38:36 -04:00
Alug
6b1de73341 move postimg flags to camera struct
- also dont let water and heat be applied on top of each other since it does not look good (water postimg takes priority over heat)
- also save a little time in opengl splitscreen since it does not support heat or wöter effects
2025-03-30 10:33:48 -04:00
NepDisk
c63d596533 Remove unsued new menu file 2025-03-30 09:46:57 -04:00
Eidolon
3bab18cb21 Invert freecam turning in encore
Fixes KartKrew/Kart#652
2025-03-30 09:03:20 -04:00
James R
c4825fb7e7 R_ViewRollAngle: don't apply camera tilting while using freecam 2025-03-30 09:02:34 -04:00
James R
872b31563d P_DemoCameraMovement: even out vertical angle after toggling
After turning on freecam, the vertical angle is tilted
slightly downward (this is carried over from normal
chasecam).

Interpolate that angle back to normal while moving
forward. This makes it so you don't need to manually
adjust the vertical angle, since it would cause forward
movement to send you into the ground.
2025-03-30 09:02:15 -04:00
James R
c84d9f24fd P_DemoCameraMovement: don't let A button press from menu carry over to rise camera 2025-03-30 09:01:29 -04:00
James R
e0a191f4d5 Replace spectator movement with demo freecam 2025-03-30 08:55:40 -04:00
James R
6531cc065e Fix sound handling in demo freecam
- Object sounds are audible from the location of the
  camera
- Certain HUD sounds should no longer be audible
  - For instance, lap complete sfx
2025-03-30 08:44:56 -04:00
James R
10e4fb183d ST_overlayDrawer: hide VIEWPOINT text when using demo freecam 2025-03-30 08:42:54 -04:00
James R
f72aa63f36 Interpolate view, even when paused
Fixes slideshow movement with demo freecam while paused.
Does not appear to jitter like texture scrollers do.
2025-03-30 08:42:43 -04:00
NepDisk
fcbb77f70d Fix scripttype enum 2025-03-29 12:11:55 -04:00
NepDisk
d72f4e8917 Assorted RR party changes 2025-03-29 08:42:27 -04:00
NepDisk
b04b8a097a Let rings chain other boosts but don't let other boosts chain rings 2025-03-28 18:48:05 -04:00
Alug
fe30efacdd refactor postimg stuff so it can be combined with each other better
thx much indev! <3
everything now works with encore!
software now also supports screen effects in splitscreen!
2025-03-28 18:22:01 -04:00
GenericHeroGuy
28eafd639e Fix D-pad inputs in menu from pads other than player 1's 2025-03-28 16:15:26 +01:00
NepDisk
b08372074a Adjust bot respawn condition 2025-03-28 10:45:43 -04:00
GenericHeroGuy
486bb208c2 Fix flat alignment on Kart maps 2025-03-28 14:17:56 +01:00
NepDisk
d748cf360e Merge remote-tracking branch 'origin/cherries' into blankart-dev 2025-03-27 17:54:03 -04:00
GenericHeroGuy
2c49adda4d something something consistency 2025-03-27 22:48:56 +01:00
James R
9f6e9c109e Let savecheckpoint work online, work at all
Actually respawns you at this location! 😃

Uses object Z position instead of floor height.
2025-03-27 22:35:01 +01:00
James R
2462a5fcba Let relativeteleport work online
Requires all x, y, z arguments. Floats supported.

Old: rteleport -x 1 -y 2 -z 3
New: rteleport 1.1 2.2 3.3
2025-03-27 21:56:08 +01:00
James R
2f36b9931d Remove macro to disable noclip camera 2025-03-27 21:43:42 +01:00
James R
4cb545a0e1 Cleanup order and indentation of item definitions 2025-03-27 21:25:00 +01:00
NepDisk
42b7ec2ca6 Wipe waterrun timer on hit 2025-03-27 15:58:59 -04:00
NepDisk
3a2fd842cd Port improved GL floor clipping fix 2025-03-27 08:57:55 -04:00
NepDisk
2ed793518e Remove extra height from boostflame 2025-03-27 00:24:38 -04:00
NepDisk
769f41dba1 Use 32 instead of maxplayers 2025-03-27 00:13:21 -04:00
GenericHeroGuy
fa5cf63d83 Fix the intermission background
Also, if there's no y_buffer available, draw SRB2BACK instead of whatever
garbage is in screens[1]
2025-03-26 23:06:21 +01:00
NepDisk
d2f4ee4dae Update MD5 again lmao 2025-03-26 14:58:00 -04:00
NepDisk
e774c74257 Update MD5 for main.pk3 2025-03-26 14:39:45 -04:00
NepDisk
f338eec51a Merge pull request 'Hardcoded Stacking and Chaining' (#33) from stackingmaybe into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/33
2025-03-26 18:30:19 +00:00
GenericHeroGuy
6d4e165fe0 Merge pull request 'Unhardcode Menus' (#32) from socmenus into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/32
2025-03-26 18:21:52 +00:00
NepDisk
d225476b9b Redisable NOMD5 2025-03-26 14:12:49 -04:00
NepDisk
39da549760 Almost forgot to give perfect start mowing privilages 2025-03-26 14:06:04 -04:00
GenericHeroGuy
4b3b96536d Expose gc_respawn 2025-03-26 18:53:21 +01:00
GenericHeroGuy
dc791e494d Merge branch 'blankart-dev' into socmenus 2025-03-26 18:49:30 +01:00
NepDisk
945704849f stacking part 6: Implement customization cvars 2025-03-26 13:35:26 -04:00
NepDisk
a68eb51465 stacking part 5: Implement stacking visual 2025-03-26 09:37:29 -04:00
NepDisk
64eb425b78 stacking pt.4.5: Ring Adjustments
Rings are now capped for all modes to around chao's max duration. Ringboost affect on chaintimer has been capped to prevent them from desynching too much due to ring chaining nerf
2025-03-25 23:35:25 -04:00
NepDisk
0ae44e0fa0 stacking pt.4: Finish Chaining
Again thanks to Indev for helping me figure out why the last tick wouldn't deincrement
2025-03-25 19:14:40 -04:00
GenericHeroGuy
3c3b509aa7 Remove M_MenuItemRange
I don't like else-if chains,
but I also don't like weird, unnecessary constraints
2025-03-26 00:11:08 +01:00
GenericHeroGuy
68a29ad0dc Don't use K&R syntax for messagebox routines which was removed in C23
Yup, that's not just a function declaration thing...
Starting to doubt if this is a net improvement
2025-03-25 23:33:33 +01:00
NepDisk
f0b6ef89eb stacking pt.3: start work on chaining 2025-03-25 18:03:39 -04:00
GenericHeroGuy
eeeca0a6ba And maybe clear the message box when clearing menus... 2025-03-25 21:34:09 +01:00
GenericHeroGuy
fd7eb9e06d Refined message box code, consistent DrawPatchFill
M_StartMessage now takes a function pointer instead of an object pointer.
No more FUNCPTRCAST
2025-03-25 21:23:57 +01:00
NepDisk
7091195a95 stacking pt.2: finish stacking 2025-03-25 15:07:20 -04:00
GenericHeroGuy
f27e486f4b Fix M_GetGametypeColor crash 2025-03-25 19:38:52 +01:00
GenericHeroGuy
8c2803607d Show names for menu/menuitem warnings 2025-03-25 17:11:52 +01:00
NepDisk
bedf22442e Merge branch 'blankart-dev' into stackingmaybe 2025-03-25 11:51:46 -04:00
NepDisk
e1b419c83d Fix develop compile 2025-03-25 11:51:11 -04:00
GenericHeroGuy
016435b3b9 Fix jank attack
Consistently call D_StartTitle, don't glitch out on invalid replays etc
2025-03-25 15:55:56 +01:00
NepDisk
23f4f41ff3 Merge branch 'blankart-dev' into stackingmaybe 2025-03-25 10:49:54 -04:00
NepDisk
032e08afef Update main.pk3 hash
We are now enforcing this now that we acutally have files. Remember to use zopfil with blankart-assets
2025-03-25 10:15:42 -04:00
NepDisk
7229a2828f Move Hashes and filename 2025-03-25 10:05:44 -04:00
NepDisk
e38e38c471 Remove out of date doc folder 2025-03-25 09:54:18 -04:00
NepDisk
64474e5f56 Merge pull request 'Remove broken/unused projects and targets' (#31) from removeunusedprojects into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/31
2025-03-25 13:39:12 +00:00
NepDisk
f9df5bcab0 remove even more unused/broken stuff 2025-03-25 09:31:28 -04:00
NepDisk
5def7a990a Merge pull request 'Remove ASM and old unused SRB2 platform code' (#30) from removeasm into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/30
2025-03-25 13:20:17 +00:00
tertu marybig
8060a2e30b Remove FixedMul and FixedDiv2 asm implementations
Actually works this time
2025-03-25 09:12:20 -04:00
NepDisk
6aa61e4ebb Unshit-ify lua_playerlib.c 2025-03-25 04:10:37 -04:00
NepDisk
b3e6f05ee0 Update lua compat stuff
This removes pw_goop setting being incorrect.
This also lets scripts write into kartstuff if they don't match a metatable like pw_powers.
2025-03-25 02:24:47 -04:00
NepDisk
5c11010b60 Add more names to credits 2025-03-25 02:15:43 -04:00
NepDisk
86bc778f60 Remove unused platform code 2025-03-24 22:45:29 -04:00
NepDisk
e5d77fbc3b Remove NASM from circle ci 2025-03-24 22:36:04 -04:00
NepDisk
2a0b0d4bae Remove ASM 2025-03-24 22:35:18 -04:00
NepDisk
58e5cb079e Prevent dedi from ending up on titlescreen
Thanks Indev!
2025-03-24 22:12:00 -04:00
GenericHeroGuy
784fc8f46c Last-minute curse: no menus for dedis, empty item names instead of '.' 2025-03-25 01:35:07 +01:00
Gustaf Alhäll
ba4718883c Fix Windows build 2025-03-24 19:00:50 -04:00
Gustaf Alhäll
6511baabaf Fix LAN discovery for SRB2 servers 2025-03-24 19:00:29 -04:00
NepDisk
35a7f420af Fix spectate button, allow respawning local players 2-4, allow respawn to be binded to button 2025-03-24 18:54:58 -04:00
GenericHeroGuy
0fda4cf017 Add custom options menu
A dedicated menu for addons to insert their own options submenus
2025-03-24 23:45:09 +01:00
GenericHeroGuy
0a573d3c5c Fix player setup menu checking the wrong menuitems
The skin option is now grayed-out when forceskin is enabled for presumably
the first time since 2017
2025-03-24 21:45:15 +01:00
GenericHeroGuy
6235219a9f Move version info stuff so it doesn't draw when a message box is shown 2025-03-24 20:31:57 +01:00
NepDisk
ceed76cc73 Repair parties for blankart 2025-03-24 14:24:23 -04:00
James R
a5be688b82 Replays: keep party in sync with current viewpoints
- More and more parts of the game rely on parties
- Parties are assumed to match the displayplayers
- This fixes A/B/C/D nametags
2025-03-24 13:57:04 -04:00
NepDisk
ad290b3604 add back removed comments for G_ResetView 2025-03-24 12:44:14 -04:00
James R
591a909eea Software: krangle directional lighting in 3P/4P splitscreen 2025-03-24 12:39:22 -04:00
James R
04744338a6 Director: skip splitscreen players when switching
This makes sure director only tries switching to players
who aren't splitscreen players.
2025-03-24 12:37:40 -04:00
James R.
36ad821c79 K_drawKartMinimap: fix splitscreen player icons 2025-03-24 12:33:24 -04:00
Oni
2c36b047dd Merge branch 'fix-splitscreen-hud-tracking-bleed' into 'master'
K_drawKartNameTags: crop HUD tracking to splitscreen viewports

See merge request KartKrew/Kart!1542
2025-03-24 12:31:43 -04:00
GenericHeroGuy
8a6a49ce03 Menutype header
Also add more than 1 freeslot
2025-03-24 17:09:27 +01:00
GenericHeroGuy
eb481b6ac4 Remove unused SRB2 menutypes
Also remove MP_OFFLINESERVER, since that's just MP_SPLITSCREEN (oops)
2025-03-24 16:39:17 +01:00
NepDisk
616941841c Fix being able to reverse in the air 2025-03-24 11:16:33 -04:00
James R
fd8917092e Improve displayplayers command
- Tabulate data
- Show party members
2025-03-24 10:25:59 -04:00
NepDisk
37c960a14a Various fixes from RR 2025-03-24 10:24:26 -04:00
James R
af09ba91ec Completely rewrite party management code
Replaces g_splitscreen.c with g_party.cpp. Simplifies
party management functions.

Moves externs out of already bloated doomstat.h and
g_game.h into g_party.h.

Cuts down on globals spam.
2025-03-24 09:43:34 -04:00
NepDisk
cf09ac0023 Check for removed mobj for loop 2025-03-24 09:26:50 -04:00
NepDisk
2876e2adc6 Properly fix shearing crash without the ugly hack 2025-03-23 22:30:36 -04:00
NepDisk
f845a3aca5 Adjust bar colors for spee ringbar and fix 11 offset to look better 2025-03-23 21:12:22 -04:00
NepDisk
7b54760030 Changes for Spee ring meter 2025-03-23 20:01:55 -04:00
NepDisk
071fa97191 Repair ring award special 2025-03-23 18:59:31 -04:00
NepDisk
fe2fc49ac1 fix copypaste errors in new bot respawn ticccmd code 2025-03-23 15:33:11 -04:00
NepDisk
f40771dd97 bot and respawn improvements
Bot respawn incrementer is based on RR's general antigrief incrementer with edits and additions
2025-03-23 14:14:46 -04:00
GenericHeroGuy
a609c7b5ce Replace prevmenu with menustack
menustack[0] replaces both menuactive and activeMenuId
Hopefully this is the last major change to the codebase...
2025-03-23 01:47:19 +01:00
NepDisk
247b566275 Toggle for singleplayer itembreaker 2025-03-22 17:08:20 -04:00
NepDisk
7270ae178d Support for MF2_SHADOW 2025-03-22 16:57:35 -04:00
GenericHeroGuy
4933f96422 Clean up menuitem functions 2025-03-22 20:54:12 +01:00
NepDisk
bbd22ad1af Hack to fix R_IsViewpointThirdPerson crashing due to invalid player ref
Basically to explain due to R_InterpolateView being called here it can possibly
pass an invalid player ref to R_IsViewpointThirdPerson since the player mobj hasn't been created yet.

Thanks to GenericHeroGuy for helping me figure this out.
2025-03-22 14:58:18 -04:00
NepDisk
259bc5dd97 Fix small p_tick.c mistakes 2025-03-22 13:19:59 -04:00
NepDisk
0d6fa2178c Use stringl for netreplay wadlist 2025-03-22 11:32:18 -04:00
NepDisk
32709797a3 Remove advancedemo
0230b57aa8
2025-03-22 11:29:45 -04:00
James R
c2333d038c Move software shearing conditions from R_SetupFreelook into G_FinalClipAimingPitch 2025-03-22 11:17:46 -04:00
NepDisk
7fe7bd6ec0 Fix client dedicrash due to my stupidity 2025-03-22 10:47:18 -04:00
GenericHeroGuy
f51868ed3f No more menu_t definitions, use menutype constants everywhere 2025-03-22 01:40:33 +01:00
GenericHeroGuy
c119f0c31d The Python script I used for testing 2025-03-22 00:50:33 +01:00
GenericHeroGuy
fca25051cb SOC the server connection menu 2025-03-22 00:45:38 +01:00
NepDisk
42ddaa5b1f Move itemblink and itemblinkmode to player_t to restore hyudoro behaviour 2025-03-21 13:36:10 -04:00
GenericHeroGuy
8471ecabd8 SOC the Discord menus
Thanks nep for making rich presence build again lol
2025-03-21 18:00:05 +01:00
GenericHeroGuy
802a86422d Impromptu support for menuitem replacement
Need this for Discord menus right about now
2025-03-21 17:47:48 +01:00
NepDisk
7069c920df Stacking pt 1 2025-03-21 12:12:23 -04:00
NepDisk
1e47df835a Don't waste bubble if it doesn't collide 2025-03-21 10:34:32 -04:00
NepDisk
7849287441 Sweep Midtexture lines to prevent gremlins 2025-03-21 10:28:38 -04:00
GenericHeroGuy
8465dd5fcf Fix compile and missing menus 2025-03-21 14:28:45 +01:00
GenericHeroGuy
fedf429c9b Merge branch 'blankart-dev' into socmenus 2025-03-21 13:58:19 +01:00
NepDisk
863fa76c25 Repair discord support and enable opus for windows by default 2025-03-20 23:19:36 -04:00
GenericHeroGuy
d0bb9a33ce DEATH TO ALL HARDCODE MENUS
except master server and discord :^)
2025-03-20 02:14:28 +01:00
GenericHeroGuy
65a86671fe Menuitem names, GO! 2025-03-20 01:35:30 +01:00
GenericHeroGuy
bb3688a8c3 Remove commented out stuff in m_menu.c 2025-03-19 17:13:27 +01:00
GenericHeroGuy
8abf268cf4 Expose gamecontrol constants
Not gonna leave control setup broken until the Lua input library is merged
2025-03-19 15:11:35 +01:00
GenericHeroGuy
3d016d4009 Sweep through the remaining menus
Server list remains untouched because I can't test it
2025-03-19 13:47:42 +01:00
GenericHeroGuy
f3226c84a4 SOC the pause menus
Oops, I reopened pandora's box :^)
2025-03-19 00:49:22 +01:00
GenericHeroGuy
56dcba3594 SOC the entire main menu 2025-03-18 23:16:44 +01:00
NepDisk
9ca6075a9e Fix thundershield not killing the spb and add DMG_VOLTAGE
Ported the fix from RR since it made the most sense
2025-03-18 01:11:28 -04:00
GenericHeroGuy
e19abad972 Whoops forgot about GL 2025-03-17 23:46:34 +01:00
NepDisk
abcb9842dd Fix wacky workbench bouncy and other line based effects running many times 2025-03-17 18:46:12 -04:00
GenericHeroGuy
6a43aac0d5 Fix the Lua Linedef Flags conundrum 2025-03-17 23:01:09 +01:00
GenericHeroGuy
197be8cb00 Fix FOF sides clipping in Kart maps 2025-03-17 22:14:07 +01:00
NepDisk
76ec93f957 Allow Mobjs to waterrun
Waterrunning has been moved over to flag2 MF2_WATERRUN
Applying the flag allows to stand/move on water.
2025-03-17 14:16:44 -04:00
NepDisk
b84257f2ab Fix water stepup conditions 2025-03-17 11:36:03 -04:00
GenericHeroGuy
b77a66d8bb Fix Spelunky 2025-03-17 00:42:53 +01:00
GenericHeroGuy
d916fee3a6 Expose menu routines/drawers
Plus some extras for SOCcing more menus
2025-03-16 22:21:50 +01:00
GenericHeroGuy
480c91516d Rename titlepics to headers, fold quit routines into normal routines
To avoid confusion with all the TitlePicsAbc stuff in SOC
None of the extant quit routines ever return false, do this to simplify SOC
code and maybe prevent evil trap menus :P
2025-03-16 22:03:41 +01:00
NepDisk
de415e3331 Make the flameshield more understandable by giving it a second meter 2025-03-16 10:48:26 -04:00
NepDisk
ffa9a782e4 Add missing hud toggles to menu 2025-03-15 09:36:42 -04:00
GenericHeroGuy
0e30c0c5eb SOC menus, part 1 2025-03-15 04:03:44 +01:00
GenericHeroGuy
a23197cf8d god i hate cvars 2025-03-15 03:54:17 +01:00
NepDisk
56d1ebb490 HUD drawing code clean up and add rings and lives hud toggles for lua 2025-03-14 22:22:25 -04:00
NepDisk
0a41771926 Fix many cases of ? with replacements 2025-03-14 20:26:51 -04:00
NepDisk
24d52d593e Refactor bubbleshield collide, use splitflags for analog input display, don't run waypoint update code on legacy checkpoints 2025-03-14 17:31:51 -04:00
NepDisk
bffe2268f3 Add more stuff to the menu 2025-03-14 12:17:39 -04:00
NepDisk
d60322311f Music test from Saturn Pt2: I got it to stop crashing lmao
It was conflicting with the musicdef backwards compat and tried using Source when it doesn't exist.
2025-03-14 11:44:08 -04:00
NepDisk
a17aec9d37 Fix stale target in A_SSMineExplode (crash)
1dad6be6a4
2025-03-13 23:45:03 -04:00
NepDisk
52601bdfc2 New input display option for stick display 2025-03-13 22:14:31 -04:00
NepDisk
0fdc4eb436 Remove K_BumpException for examination 2025-03-13 19:06:45 -04:00
NepDisk
a5bb96ce9b Cup changes to allow the same map in multiple 2025-03-13 13:56:15 -04:00
NepDisk
ad44ec0aa7 Merge pull request 'Refactored Input code' (#26) from newinput into blankart-dev
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/26
2025-03-13 17:40:51 +00:00
NepDisk
663ba19923 Fix more Music Test Crashes 2025-03-13 13:28:40 -04:00
NepDisk
bf211f9772 Merge branch 'blankart-dev' into newinput 2025-03-13 06:44:39 -04:00
NepDisk
7de921f471 Reset Rolling here as per usual 2025-03-13 06:43:55 -04:00
NepDisk
a256adcb90 Merge branch 'blankart-dev' into newinput 2025-03-13 06:37:02 -04:00
NepDisk
0495190a08 Fix Stepup issues for the most aprt.
This fixes midtexture stepover and extreme stepup such as the jank line in greenhils
2025-03-13 06:36:16 -04:00
NepDisk
793bd45ebb Merge branch 'blankart-dev' into newinput 2025-03-13 04:02:09 -04:00
NepDisk
da4f6c62a2 Rings rebalances
Ring burst now depends on damagetype. ie 5 from orbinaut and jawz and 3 from banana and 10 for sniping. Ring Fuse has also been lowered to 20*TICRATE from 60*TICRATE
Kitchen Sink targets get all their rings dropped at once on impact.
2025-03-13 03:54:18 -04:00
NepDisk
24b5d0c9b2 Add a few more people to the credits 2025-03-13 02:52:37 -04:00
NepDisk
89c5ece49b Merge branch 'blankart-dev' into newinput 2025-03-13 01:50:07 -04:00
NepDisk
cdd3516f0b Remove CLIENTBACKUPTICS
Removes the second part added by 6e7adedaa0
This is to be closer to kart and to remove some freezes I sometimes feel
2025-03-13 01:48:02 -04:00
NepDisk
7ce17d2c6e Various random changes
Menus, rotation and more!
2025-03-13 01:07:13 -04:00
NepDisk
6c9b038438 Add input display toggle 2025-03-13 00:08:07 -04:00
GenericHeroGuy
15e12d2c96 Fix default controls and loading controls 2025-03-13 02:44:17 +01:00
GenericHeroGuy
b3ce5c8a85 Prettier default controls table
See if you can spot the new default controls I added :^)
(i needed an excuse to put a KEY_AXIS1 in there in case these get updated)
2025-03-13 00:44:03 +01:00
GenericHeroGuy
b5be67d8d3 Always convert Item presses to backspace in M_Responder 2025-03-13 00:17:54 +01:00
GenericHeroGuy
0859c8a710 Use defaults behavior instead of hardcoded keys for most controls
Same behavior if you leave the controls at their defaults or unbind them,
but now if you bind them to some other key then the default keys they use
are freed up (a bit jank tho for screenshot keys...)
2025-03-13 00:11:28 +01:00
NepDisk
175e7e3cab Revert 'Use Author like RR for now'
This reverts commit 1d4da50b00.
2025-03-12 15:28:37 -04:00
NepDisk
dc68da6da3 Whoops forgot to add sloperoll and slopepitch to precipmobj_t 2025-03-12 15:08:38 -04:00
NepDisk
1d4da50b00 Use Author like RR for now 2025-03-12 14:48:28 -04:00
NepDisk
f1c27ff963 Use musicdef from main.pk3 instead. 2025-03-12 14:45:15 -04:00
NepDisk
1f6e8f25cd Music Test port from Saturn pt1
Mostly ported over but its kind of broken for whatever reason...
2025-03-12 12:36:07 -04:00
NepDisk
c13e4b1d61 Modify M_ChangeCvar conditions 2025-03-11 23:23:50 -04:00
NepDisk
8f0a8860c6 Default turnsmoothing to Off
Someone is bound to complain at first if these is on by default
2025-03-11 22:58:55 -04:00
NepDisk
52b532f265 Make sloperoll+pitch toggleable and make cameratilt not rely on sloperoll toggle
The toggle is handled in renderer for both gl and software!
2025-03-11 22:48:02 -04:00
NepDisk
a55393bf4c Add camera tilting to menu 2025-03-11 22:01:47 -04:00
NepDisk
33c2d09557 Remove remaining uses of line->special in processspecial 2025-03-11 19:49:06 -04:00
GenericHeroGuy
20d11760bb Whoops, turn smoothing doesn't apply to sidemove 2025-03-11 23:46:55 +01:00
GenericHeroGuy
bfcee5d6c2 Remove menu defaults/backup code from G_PlayerInputAnalog
Nothing except the extra event loop in CL_ServerConnectionTicker uses this,
because we still use old menus with events rather than inputs,
and that has its own system for default controls.

The third argument is now 'digital' to get rid of that pesky global boolean
2025-03-11 22:21:45 +01:00
GenericHeroGuy
f547af9992 Simplify gamepad axis code
Yes I intentionally spelled it JOYAXISES to not conflict with the old define
2025-03-11 20:38:37 +01:00
Eidolon
4d65f09eb7 Port Ediolon's SDL GameController work
Basically instantly solved all of the issues that made this branch completely unusable
2025-03-11 20:01:25 +01:00
NepDisk
26da74c4aa Karma doesn't combo. 2025-03-11 11:42:06 -04:00
NepDisk
df6be21c24 Revert SPB explosion bypass like to be like v1 2025-03-11 11:38:50 -04:00
Sally Coolatta
e1ffc206e7 Finish some unused SDL hat input support to use events rather than polling all of the time 2025-03-11 15:17:51 +01:00
NepDisk
b15a3a1c09 Update extras/udmf-spec.txt 2025-03-11 12:05:28 +00:00
GenericHeroGuy
e669ca6edb Restore turn smoothing in the most horrific way possible 2025-03-11 01:44:25 +01:00
NepDisk
8e9370c11f Item odd changes
Drop target was dropped a point.
FlameShield was made slighty more common since its less strong.
The change for superings in useodds 0 has been dropped a point.
2025-03-10 19:37:05 -04:00
NepDisk
077b34b37f Make legacy waypoint helper and expose K_RingsActive and K_UsingLegacyCheckpoints to lua 2025-03-10 19:14:35 -04:00
GenericHeroGuy
fb230a27d3 Restore mouse aiming 2025-03-11 00:04:34 +01:00
GenericHeroGuy
e61c43a852 Merge branch 'blankart-dev' into newinput 2025-03-10 23:26:30 +01:00
GenericHeroGuy
c719ad49aa MISSING BRACES AROUND INITIALIZER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
amazing warning spam
2025-03-10 23:19:36 +01:00
GenericHeroGuy
4cf9c7f6b6 Make vertical aiming work again 2025-03-10 23:08:47 +01:00
NepDisk
c6377f884f Update some ACS documentation 2025-03-10 17:19:45 -04:00
NepDisk
8884f7d3c9 Add WumboSpasm to the credits 2025-03-10 15:22:52 -04:00
NepDisk
95750e50e4 Implement MultiItems into capsules/dropped items as well 2025-03-10 15:18:58 -04:00
NepDisk
9d2c895b2a Fix offset for options main status 2025-03-10 14:20:23 -04:00
NepDisk
178ba3b4a6 Fix copy paste mistake 2025-03-10 14:16:22 -04:00
NepDisk
7ad73c040d Add Camera submenu from Saturn 2025-03-10 14:14:07 -04:00
GenericHeroGuy
167414af2f Control setup menu changes
* Gamepad select option now displays the name of your gamepad on the right
* Switch to thin font when bind names are too long
* Reduced margins and shortened some control names to fit longer binds
* Fixed deadzone cvar always being player 1's
* Fixed missing arrows on deadzone cvar (this NEEDS to be a macro...)
* Only accept inputs from the current player's gamepad, shouldn't be a
  problem since your chosen gamepad is displayed now
* Show all 8 instead of 7 gamepads in gamepad select
2025-03-10 18:14:51 +01:00
NepDisk
e8adbfb8b7 Fix typo in namespace code 2025-03-10 12:57:45 -04:00
GenericHeroGuy
ef1489aa04 Cleanup, fix menu controls and keyboard 2025-03-10 15:06:52 +01:00
toaster
144e967ee5 Rework the entire G_PlayerInputAnalog system.
* Previous control checking flow:
    * Current controller/keyboard (userbound controls).
    * If on a menu:
        * Current controller/keyboard (default controls).
        * All controllers not in use by a player (default controls).
* New control checking flow:
    * Current controller/keyboard (userbound controls).
    * If player 0 and just checked a controller, check keyboard (userbound controls).
    * If on a menu:
        * Check all controllers not in use by a player (userbound controls).
        * If keys are inaccessible/unbound and keybind is necessary to navigate menus, repeat eveyrhting with default controls.
* Instead of duplicated code, control the flow in a finer fashion.
* Now able to detect if gamepad inputs are possible to recieve (via checking deviceID), instead of assuming they are.
* If a keybind is set but inaccessible by the above metric, make it flash on the Profile Controls screen.
* Fix out-of-order key mappings for a given bind being invisible on the Profile Controls menu.
2025-03-10 11:04:00 +01:00
Sally Coolatta
a0348420f7 Fix menu multiplayer breaking again 2025-03-08 01:00:57 +01:00
Sally Coolatta
a934e09b0c Properly implement joystick axes
NOW it's fully navigable with controller
2025-03-08 01:00:56 +01:00
Sally Coolatta
9b3067a7a2 Fix control saving 2025-03-08 00:56:53 +01:00
Sally Coolatta
11bd4c453e Almost multiplayer char select
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
2025-03-08 00:21:37 +01:00
Sally Coolatta
0a98ca63ab First pass on character select device select
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V

Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.

(G: finally, a commit that mostly survived... deviceResponding is useless
    for us right now but might as well keep it. maybe easier assignment on
    the multiplayer setup menu in the future?)
2025-03-07 23:44:59 +01:00
GenericHeroGuy
d286ff3bdf Ok, get this outta here already 2025-03-07 22:47:50 +01:00
NepDisk
b4b9a250d4 Merge branch 'blankart-dev' into newinput 2025-03-07 12:56:51 -05:00
GenericHeroGuy
84850ba8a3 Update input handling in menus to use key bindings (port-ish of f17b9484)
G_GetControlForKey -> G_ControlBoundToKey, to make it usable everywhere
2025-03-07 18:12:59 +01:00
GenericHeroGuy
7740b0dccd Add back joywait
For some reason I thought this didn't do anything kek
2025-03-07 13:11:42 +01:00
GenericHeroGuy
26ca5be4e0 Fix replay freecam by reusing G_BuildTiccmd 2025-03-07 01:39:10 +01:00
GenericHeroGuy
f419ccee57 New input handling (port of cd8862f0)
More or less a port with gamecontrols left untouched.

Some notable differences:
* ev_joystick now has a separate data1 for each axis, rather than having you
  check which of data2/3 is INT32_MAX and which one isn't
  (pissed me off when updating menu code...)
* Gutted the 1.6 upgrade code, since we're not upgrading from anything :P
* G_GetControlForKey, a helper for menu code
* Turn smoothing code left unused as a reminder to fix it
* Various small fixes so this commit is playable and doesn't segfault

Menu changes:
* Max 4 binds, joystick axes are now bindable like any other button
* The gamepad options submenu has been replaced by its two remaining options
  after the removal of axis cvars (gamepad select and deadzone)

See cd8862f0's message for more details
2025-03-07 00:05:35 +01:00
254 changed files with 13538 additions and 68525 deletions

View file

@ -43,7 +43,7 @@ jobs:
- v1-SRB2-APT - v1-SRB2-APT
- run: - run:
name: Install SDK name: Install SDK
command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client command: apt-get -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
- save_cache: - save_cache:
key: v1-SRB2-APT key: v1-SRB2-APT
paths: paths:

View file

@ -71,6 +71,7 @@ cmake_dependent_option(
OFF "NOT SRB2_CONFIG_SYSTEM_LIBRARIES" OFF "NOT SRB2_CONFIG_SYSTEM_LIBRARIES"
OFF OFF
) )
option(SRB2_CONFIG_ENABLE_DISCORDRPC "Enable Discord RPC features" ON)
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON) option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF) option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF) option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
@ -121,7 +122,7 @@ else()
CPMAddPackage( CPMAddPackage(
NAME Ccache.cmake NAME Ccache.cmake
GITHUB_REPOSITORY TheLartians/Ccache.cmake GITHUB_REPOSITORY TheLartians/Ccache.cmake
VERSION 1.2 VERSION 1.2.5
) )
endif() endif()

269
Doxyfile
View file

@ -1,269 +0,0 @@
# Doxyfile 1.4.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = SRB2
PROJECT_NUMBER = 1.09
OUTPUT_DIRECTORY = ./doc/SRB2
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ./src
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox
RECURSIVE = YES
EXCLUDE = ./src/sdl/IMG_xpm.c \
./src/sdl/SRB2DC/scramble.c
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */src/hardware/*/* \
*/src/sdl/SDL_main/* \
*/src/*/*_private.h \
*/src/sdl/*/*help.? \
*/src/md5.? \
*/src/sdl/filter/*
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
#USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN \
HWRENDER \
DIRECTFULLSCREEN \
HW3SOUND \
LOGMESSAGES \
WALLSPLATS \
FLOORSPLATS
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

View file

@ -3,7 +3,6 @@
[SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/). [SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
## Dependencies ## Dependencies
- NASM (x86 builds only)
- SDL2 (Linux/OS X only) - SDL2 (Linux/OS X only)
- SDL2-Mixer (Linux/OS X only) - SDL2-Mixer (Linux/OS X only)
- libupnp (Linux/OS X only) - libupnp (Linux/OS X only)
@ -12,7 +11,27 @@
## Compiling ## Compiling
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2. Linux:
```
git clone https://codeberg.org/NepDisk/blankart.git
cd blankart
mkdir build
cd build
cmake ..
make -j$(nproc)
```
Windows MSYS2:
```
git clone https://codeberg.org/NepDisk/blankart.git
cd blankart
mkdir build
cd build
cmake -G "MSYS Makefiles" ..ƒƒ
./_deps/sdl2_mixer-src/external/download.sh
cmake -G "MSYS Makefiles" ..ƒƒ
make -j$(nproc)
```
## Disclaimer ## Disclaimer
Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2. Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.

2159
SRB2.cbp

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerOutput>All</AssemblerOutput>
<SmallerTypeCheck>false</SmallerTypeCheck>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<Link>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View file

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)bin\VC10\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)objs\VC10\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<SDLCheck>true</SDLCheck>
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>advapi32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'">
<ClCompile>
<PreprocessorDefinitions>USEASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<CustomBuild>
<Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command>
<Message>Compiling %(Filename).nas with NASM...</Message>
<Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(PlatformTarget)'!='x86'">
<CustomBuild>
<LinkObjects>false</LinkObjects>
</CustomBuild>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

3093
Srb2.dev

File diff suppressed because it is too large Load diff

View file

@ -7,8 +7,6 @@ environment:
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead # c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
MINGW_SDK: c:\msys64\mingw32 MINGW_SDK: c:\msys64\mingw32
CFLAGS: -Wno-implicit-fallthrough CFLAGS: -Wno-implicit-fallthrough
NASM_ZIP: nasm-2.12.01
NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip
UPX_ZIP: upx391w UPX_ZIP: upx391w
UPX_URL: http://upx.sourceforge.net/download/upx391w.zip UPX_URL: http://upx.sourceforge.net/download/upx391w.zip
CCACHE_EXE: ccache.exe CCACHE_EXE: ccache.exe
@ -40,17 +38,12 @@ environment:
ASSET_CLEAN: 0 ASSET_CLEAN: 0
cache: cache:
- nasm-2.12.01.zip
- upx391w.zip - upx391w.zip
- ccache.exe - ccache.exe
- C:\Users\appveyor\.ccache - C:\Users\appveyor\.ccache
- C:\Users\appveyor\srb2_cache - C:\Users\appveyor\srb2_cache
install: install:
- if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip"
- 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%NASM_ZIP%" "%MINGW_SDK%\bin" nasm.exe || exit 0
- if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip" - if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip"
- 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null - 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0 - robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0
@ -65,7 +58,6 @@ configuration:
before_build: before_build:
- set "Path=%MINGW_SDK%\bin;%Path%" - set "Path=%MINGW_SDK%\bin;%Path%"
- mingw32-make --version - mingw32-make --version
- nasm -v
- if not [%NOUPX%] == [1] ( upx -V ) - if not [%NOUPX%] == [1] ( upx -V )
- ccache -V - ccache -V
- ccache -s - ccache -s

View file

@ -1,46 +0,0 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# support for the yasm assembler
set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS nasm yasm asm)
if(NOT CMAKE_ASM_YASM_OBJECT_FORMAT)
if(WIN32)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
set(CMAKE_ASM_YASM_OBJECT_FORMAT win64)
else()
set(CMAKE_ASM_YASM_OBJECT_FORMAT win32)
endif()
elseif(APPLE)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
set(CMAKE_ASM_YASM_OBJECT_FORMAT macho64)
else()
set(CMAKE_ASM_YASM_OBJECT_FORMAT macho)
endif()
else()
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
set(CMAKE_ASM_YASM_OBJECT_FORMAT elf64)
else()
set(CMAKE_ASM_YASM_OBJECT_FORMAT elf)
endif()
endif()
endif()
set(CMAKE_ASM_YASM_COMPILE_OBJECT "<CMAKE_ASM_YASM_COMPILER> <FLAGS> -f ${CMAKE_ASM_YASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
# Load the generic ASMInformation file:
set(ASM_DIALECT "_YASM")
include(CMakeASMInformation)
set(ASM_DIALECT)

View file

@ -1,27 +0,0 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
set(CMAKE_ASM_YASM_COMPILER_LIST nasm yasm)
if(NOT CMAKE_ASM_YASM_COMPILER)
find_program(CMAKE_ASM_YASM_COMPILER yasm
"$ENV{ProgramFiles}/YASM")
endif()
# Load the generic DetermineASM compiler file with the DIALECT set properly:
set(ASM_DIALECT "_YASM")
include(CMakeDetermineASMCompiler)
set(ASM_DIALECT)

View file

@ -1,23 +0,0 @@
#=============================================================================
# Copyright 2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that the selected ASM_NASM "compiler" works.
# For assembler this can only check whether the compiler has been found,
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
set(ASM_DIALECT "_YASM")
include(CMakeTestASMCompiler)
set(ASM_DIALECT)

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>"$(SolutionDir)comptime.bat" "$(ProjectDir).."</Command>
<Message>Getting revision number from the SCM system</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View file

@ -1,32 +0,0 @@
#Add-on Makefile for wxDev-C++ project file
ifdef ComSpec
COMSPEC=$(ComSpec)
endif
ifdef COMSPEC
OBJCOPY?=objcopy.exe
OBJDUMP?=objdump.exe
GZIP?=gzip.exe
else
OBJCOPY?=objcopy
OBJDUMP?=objdump
GZIP?=gzip
endif
DBGNAME=$(BIN).debug
OBJDUMP_OPTS?=--wide --source --line-numbers
GZIP_OPTS?=-9 -f -n
GZIP_OPT2=$(GZIP_OPTS) --rsyncable
UPX?=upx
UPX_OPTS?=--best --preserve-build-id
UPX_OPTS+=-q
all-after:
$(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt"
$(OBJCOPY) $(BIN) $(DBGNAME)
$(OBJCOPY) --strip-debug $(BIN)
-$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN)
-$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
ifndef COMSPEC
-$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
endif
-$(UPX) $(UPX_OPTS) $(BIN)

View file

@ -9,7 +9,6 @@ GNU/Linux
Dependencies: Dependencies:
SDL 1.2.7 or better (from libsdl.org) SDL 1.2.7 or better (from libsdl.org)
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org) SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
libPNG 1.2.7 libPNG 1.2.7
Zlib 1.2.3 Zlib 1.2.3
The Xiph.org libogg and libvorbis libraries The Xiph.org libogg and libvorbis libraries

1
doc/.gitignore vendored
View file

@ -1 +0,0 @@
/SRB2

View file

@ -1,93 +0,0 @@
================================================================
How to add Low-res modes to your XF86Config under Linux MANUALLY
================================================================
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!!
This document explains how to add low-res modes like 320x200 to your
X-Server configuration, because some new setup tools for the X-Server
do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
I do not take any responsibility for damage done to your monitor, your
videocard, your harddisk, your cat, your dog or anything else!!!
IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY
MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!!
OK, if you have read up to here, you either know what you do or really
die-hard want those low-res modes. Here is what to do:
Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is
what you have to add to the definition of your modeslines:
# Low-res Doublescan modes
# If your chipset does not support doublescan, you get a 'squashed'
# resolution like 320x400.
# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio
Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan
# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan
# 320x240 @ 72 Hz, 36.5 kHz hsync
Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan
# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio
ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan
# 400x300 @ 60 Hz, 37.8 kHz hsync
Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan
# 400x300 @ 72 Hz, 48.0 kHz hsync
Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan
If your video card only supports a specific set of discrete dotclocks
(RAMDAC) you may have to replace the dotclocks given here by one of the
specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe
that nowadays all cards and monitors should work with these settings, but
if you have outdated hardware you better check the frequencies yourself. If
there is any uncertainty, please check the "XFree86 Video Timings HOWTO".
Then have a look at the section "Screen" with the appropriate driver
(usually either "svga" or "accel"). Under Subsection "Display" there
are modes for the given color depth. Add the desired modes. As an
example I give you my screens definition here with low-res modes in
16 bit color depth:
Section "Screen"
Driver "accel"
Device "3D Charger"
Monitor "Iiyama Pro 450"
DefaultColorDepth 16
Subsection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
Virtual 1280 1024
EndSubsection
Subsection "Display"
Depth 16
Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!!
ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^
Virtual 1152 864
EndSubsection
Subsection "Display"
Depth 24
Modes "800x600" "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
Subsection "Display"
Depth 32
Modes "800x600" "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
EndSection
Once again: important is, that you edit the correct Screen section.
If you use the SVGA Server and edit the ACCEL Server, you might
wonder where your new modes have gone.
If everything went fine and you want to say thank you, just write
to "metzgermeister@users.sourceforge.net". If your monitor blew
up and you want to kill me, find me playing Legacy or Q3A on the net
and frag me (with your second monitor, hehe).
- metzgermeister

View file

@ -1,212 +0,0 @@
1-99 : Player Starts
1 - Player 1 Start 1
2 - Player 2 Start 2
3 - Player 3 Start 3
4 - Player 4 Start 4
5 - Player 5 Start 4001
6 - Player 6 Start 4002
7 - Player 7 Start 4003
8 - Player 8 Start 4004
9 - Player 9 Start 4005
10 - Player 10 Start 4006
11 - Player 11 Start 4007
12 - Player 12 Start 4008
13 - Player 13 Start 4009
14 - Player 14 Start 4010
15 - Player 15 Start 4011
16 - Player 16 Start 4012
17 - Player 17 Start 4013
18 - Player 18 Start 4014
19 - Player 19 Start 4015
20 - Player 20 Start 4016
21 - Player 21 Start 4017
22 - Player 22 Start 4018
23 - Player 23 Start 4019
24 - Player 24 Start 4020
25 - Player 25 Start 4021
26 - Player 26 Start 4022
27 - Player 27 Start 4023
28 - Player 28 Start 4024
29 - Player 29 Start 4025
30 - Player 30 Start 4026
31 - Player 31 Start 4027
32 - Player 32 Start 4028
33 - Player Match Start 11
34 - Red Team Start 87
35 - Blue Team Start 89
36 - Tag start New
100 - 199 : Enemies
100 - Blue Crawla 3004
101 - Red Crawla 9
102 - GFZ Fish 58
103 - Gold Buzz 5005
104 - Red Buzz 5006
105 - Jetty-Syn Bomber 3005
106 - Jetty-Syn Gunner 22
107 - Crawla Commander 21
108 - Deton 71
109 - Skim 56
110 - THZ Turret 2004
111 - Pop-up Turret 42
200 - 299 : Bosses and their associated items (if any)
200 - Boss 1 16
201 - Boss 2 2008
290 - Boss Fly Point 17
291 - EggTrap Center 2049
300 - 399 : Collectibles
300 - Ring 2014
301 - Homing Ring 69
302 - Rail Ring 3003
303 - Infinity Ring 80
304 - Automatic Ring 26
305 - Explosion Ring 54
306 - Red CTF Flag 31
307 - Blue CTF Flag 34
308 - Special Stage Token 2013
309 - Emerald 1 420
310 - Emerald 2 421
311 - Emerald 3 422
312 - Emerald 4 423
313 - Emerald 5 424
314 - Emerald 6 425
315 - Emerald 7 426
316 - Hunting Emerald 1 64
317 - Hunting Emerald 2 3002
318 - Hunting Emerald 3 3001
400 - 499 : Boxes
400 - Super Ring Box 2011
401 - Grey Ring Box 2012
402 - Ring Shield Box 48
403 - Fire Shield Box 2002
404 - Bomb Shield Box 2018
405 - Jump Shield Box 35
406 - Water Shield Box 2028
407 - Sneaker Box 25
408 - Invincibility Box 2022
409 - 1-Up Box 41
410 - Eggman Box 2005
411 - Mixup Box 78
412 - Question Box 3000
500 - 599 : Interactive Objects (friendly or otherwise - includes springs)
500 - Bubble Patch 33
501 - Level End Sign 86
502 - Starpost 3006
520 - Spike Ball -1
521 - Special Stage Spike Ball 23
522 - Ceiling Spike 67
523 - Floor Spike 68
540 - Fan 32
541 - Steam Riser 30
550 - Yellow Spring 28
551 - Red Spring 79
552 - Blue Spring 5004
553 - Yellow Spring Down 65
554 - Red Spring Down 66
555 - Yellow Diagonal Spring 2015
556 - Red Diagonal Spring 38
557 - Yellow Diag Spring Down 20
558 - Red Diag Spring Down 39
600 - 699 : Special placement patterns
600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84
601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44
602 - Diagonal rings (5) 76
603 - Diagonal rings (10) 77
604 - A ring of rings 47
605 - A BIGGER ring of rings 2007
606 - A ring of wing items 2048
607 - A BIGGER ring of wing items 2010
608 - A ring of rings and wings (alternating) 2046
609 - A BIGGER ring of rings and wings (alternating) 2047
700 - 799 : Powerup indicators/environmental effects/miscellany
700 - Ambient Water 1a (S) 2026
701 - Ambient Water 1b (S) 2024
702 - Ambient Water 2a (M) 2023
703 - Ambient Water 2b (M) 2045
704 - Ambient Water 3a (L) 83
705 - Ambient Water 3b (L) 2019
706 - Ambient Water 4a (XL) 2025
707 - Ambient Water 4b (XL) 27
708 - Random Ambient 1 14
709 - Random Ambient 2 43
750 - Chaos Spawner 8
751 - Teleport Point 5003
752 - Alternate View Point 5007
753 - Zoom Tube Waypoint 18
754 - Pusher 5001
755 - Puller 5002
756 - Street Light 2003
800 - 899 : Greenflower Scenery
800 - Flower 1 36
801 - Flower 2 70
802 - Flower 3 73
804 - Berry Bush 74
805 - Bush 75
900 - 999 : Techno Hill Scenery
900 - THZ Plant 2035
901 - Alarm 2006
1000 - 1099 : Deep Sea Scenery
1000 - Gargoyle 81
1100 - 1199 : Castle Eggman Scenery
1100 - Ceiling Chain 49
1101 - Torch Flame 24
1102 - Eggman Statue 52
1103 - CEZ Flower 2001
1200 - 1299 : Arid Canyon Scenery
1300 - 1399 : Red Volcano Scenery
1400 - 1499 : Dark City Scenery
1500 - 1599 : Doom Ship Scenery
1600 - 1699 : Egg Rock/Final Fight Scenery
1700 - 1799 : NiGHTS Items
1700 - Axis 72
1701 - Axis Transfer (Normal) 61
1702 - Axis Transfer (Line) 46
1703 - Nights Drone 60
1704 - Nights Bumper 82
1705 - Hoop 57
1706 - Nights Wing 37
1707 - Super Loop Powerup 3007
1708 - Drill Refill Powerup 3008
1709 - Helper Powerup 3009
1710 - Egg Capsule 40
1800 - 1849 : Mario Items
1800 - Coin 10005
1801 - Goomba 10000
1802 - Blue Goomba 10001
1803 - FireFlower 50
1804 - Shell 10
1805 - Puma 29
1806 - Koopa 19
1807 - Axe 12
1808 - Mario Bush 1 10002
1809 - Mario Bush 2 10003
1810 - Toad 10004
1850 - 1899 : Christmas Items
1850 - Xmas Pole 5
1851 - Candy Cane 13
1852 - Snowman 6
1900 - 1999 : Misc Scenery
1900 - Stalagmite 0
1901 - Stalagmite 1
1902 - Stalagmite 2
1903 - Stalagmite 3
1904 - Stalagmite 4
1905 - Stalagmite 5
1906 - Stalagmite 6
1907 - Stalagmite 7
1908 - Stalagmite 8
1909 - Stalagmite 9

View file

@ -1,223 +0,0 @@
Description OldNum NewNum Description
Old Water 14 Removed
Level Parameters/Misc:
Per-Sector Gravity 64 1
Custom Exit 71 2
Zoom Tube Parameters 18 3
Speed Pad 65 4
Camera Scanner 63 5
Disable Linedef 73 6
Flat Alignment 66 7
Sector Special Parameters New 8
Mace Parameters New 9
Sprite Cull Height New 10
Rope Hang Parameters New 11
Rock Spawner Parameters New 12
PolyObjects
Marks first line in PolyObject New 20
Explicitly includes a PolyObject line New 21
PolyObject: Parameters New 22
PolyObject: Waving Flag New 31
Level-Load Effects:
Instant Floor Lower 26 50
Instant Ceiling Raise 24 51
Continuously Falling Sector 88 52
Continuous Floor/Ceiling Mover 2 53
Continuous Floor Mover 3 54
Continuous Ceiling Mover 4 55
Continuous Two-Speed Floor/Ceiling Mover 6 56
Continuous Two-Speed Floor Mover 7 57
Continuous Two-Speed Ceiling Mover 8 58
Activate Floating Platform 232 59
Activate Floating Platform (Adjustable Speed) 233 60
Crusher 1 (Ceiling to Floor) 43 61
Crusher 2 (Floor to Ceiling) 50 62
Fake Floor/Ceiling 242 63
Appearing/Disappearing FOF New 64
Bridge Thinker New 65
Floor Over Floors:
"Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100
"Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101
"Floor Over Floor: Solid, Translucent " 44 102
"Floor Over Floor: Solid, Sides Only " 69 103
"Floor Over Floor: Solid, No Sides " 51 104
"Floor Over Floor: Solid, Invisible " 57 105
"Floor Over Floor: Water, Opaque " 48 120
"Floor Over Floor: Water, Translucent " 45 121
"Floor Over Floor: Water, Opaque, No Sides " 75 122
"Floor Over Floor: Water, Translucent, No Sides " 74 123
"Floor Over Floor: Platform, Opaque " 59 140
"Floor Over Floor: Platform, Translucent " 81 141
"Floor Over Floor: Platform, Translucent, No Sides " 77 142
Floor Over Floor: Bobbing (Air) 38 150
Floor Over Floor: Adjustable Bobbing (Air) 68 151
Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152
"Floor Over Floor: Floating, Bobbing " 34 160
Floor Over Floor: Crumbling (Respawn) 36 170
Floor Over Floor: Crumbling (No Respawn) 35 171
"Floor Over Floor: Crumbling (Respawn), Platform " 79 172
"Floor Over Floor: Crumbling (No Respawn), Platform " 80 173
"Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174
"Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175
"Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176
"Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177
"Floor Over Floor: Crumbling (Respawn), Floating " 37 178
"Floor Over Floor: Crumbling (No Respawn), Floating " 42 179
"Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180
"Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190
"Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191
"Floor Over Floor: Rising Platform, Solid, Translucent " 91 192
"Floor Over Floor: Rising Platform, Solid, Invisible " 94 193
"Floor Over Floor: Rising Platform, Platform, Opaque " 92 194
"Floor Over Floor: Rising Platform, Platform, Translucent " 93 195
Floor Over Floor: Light Block 49 200
Floor Over Floor: Half Light Block 47 201
Floor Over Floor: Fog Block 46 202
"Floor Over Floor: Intangible, Opaque " 62 220
"Floor Over Floor: Intangible, Translucent " 52 221
"Floor Over Floor: Intangible, Sides Only " 67 222
"Floor Over Floor: Intangible, Invisible " 58 223
Floor Over Floor: Mario Block 41 250
Floor Over Floor: Thwomp Block 54 251
Floor Over Floor: Shatter Block 76 252
"Floor Over Floor: Shatter Block, Translucent " 86 253
Floor Over Floor: Bustable Block 55 254
Floor Over Floor: Spin Bust Block 78 255
"Floor Over Floor: Spin Bust Block, Translucent " 84 256
Floor Over Floor: Quicksand Block 56 257
Floor Over Floor: Laser Block 53 258
Floor Over Floor: Custom 87 259
Linedef Executor Triggers:
Trigger Linedef Executor (Continuous) 96 300
Trigger Linedef Executor (Each Time) 97 301
Trigger Linedef Executor (Once) 98 302
Trigger Linedef Executor (Ring Count - Continuous) 95 303
Trigger Linedef Executor (Ring Count - Once) 99 304
Trigger Linedef Executor (Character Ability - Continuous) 19 305
Trigger Linedef Executor (Character Ability - Each Time) 20 306
Trigger Linedef Executor (Character Ability - Once) 21 307
"Trigger Linedef Executor (Race Only, Once) " 9 308
Trigger Linedef Executor (CTF Red Team - Continuous) 10 309
Trigger Linedef Executor (CTF Red Team - Each Time) 11 310
Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311
Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312
Trigger Linedef Executor (No More Enemies - Once) 15 313
Trigger Linedef Executor (# of Pushables - Continuous) New 314
Trigger Linedef Executor (# of Pushables - Once) New 315
Trigger Linedef Executors (PolyObject - Land On) New 316
Trigger Linedef Executor (Level Load) New 399
Linedef Executor Options:
Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400
Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401
Linedef Executor: Set Tagged Sector's Light Level 103 402
Linedef Executor: Move Tagged Sector's Floor 106 403
Linedef Executor: Move Tagged Sector's Ceiling 107 404
Linedef Executor: Lower Floor by Line 108 405
Linedef Executor: Raise Floor by Line 109 406
Linedef Executor: Lower Ceiling by Line 110 407
Linedef Executor: Raise Ceiling by Line 111 408
Linedef Executor: Change Calling Sector's Tag 112 409
Linedef Executor: Change Front Sector's Tag 114 410
Linedef Executor: Stop Plane Movement 116 411
Linedef Executor: Teleport Player to Tagged Sector 104 412
Linedef Executor: Change Music 105 413
Linedef Executor: Play SFX 115 414
Linedef Executor: Run Script 113 415
Linedef Executor: Start Adjustable Fire Flicker 119 416
Linedef Executor: Start Adjustable Glowing Light 120 417
Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418
Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419
Linedef Executor: Fade Light Level 117 420
Linedef Executor: Stop Lighting Effect 118 421
Linedef Executor: Cut-Away View 121 422
Linedef Executor: Change Sky 123 423
Linedef Executor: Change Weather 124 424
Linedef Executor: Change Object State 125 425
Linedef Executor: Stop Object 122 426
Linedef Executor: Award Score 126 427
Linedef Executor: Start Platform Movement 127 428
Linedef Executor: Crush Ceiling Once New 429
Linedef Executor: Crush Floor Once New 430
Linedef Executor: Crush Floor & Ceiling Once New 431
Linedef Executor: Enable 2D Mode New 432
Linedef Executor: Disable 2D Mode New 433
Linedef Executor: Award Custom Power New 434
Linedef Executor: Stop Conveyor New 435
Linedef Executor: Start Conveyor New 436
Linedef Executor: Disable Player Movement New 437
Linedef Executor: Execute Linedef Executor New 450
Linedef Executor: PolyObject: Door Slide New 480
Linedef Executor: PolyObject: Door Swing New 481
Linedef Executor: PolyObject: Move XY New 482
Linedef Executor: PolyObject: Move XY w/ override New 483
Linedef Executor: PolyObject: Rotate Right New 484
Linedef Executor: PolyObject: Rotate Right w/ override New 485
Linedef Executor: PolyObject: Rotate Left New 486
Linedef Executor: PolyObject: Rotate Left w/ override New 487
Linedef Executor: PolyObject: Start waypoint movement New 488
Linedef Executor: PolyObject: Make Invisible New 489
Linedef Executor: PolyObject: Make Visible New 490
Scrollers/Pushers:
Scroll Wall First Side Left 100 500
Scroll Wall First Side Opposite Direction 85 501
Scroll Wall According to Linedef 254 502
Acc Scroll Wall According to Linedef 218 503
Disp Scroll Wall According to Linedef 249 504
Scroll Texture by Offsets 255 505
Scroll Floor Texture 251 510
Acc Scroll Floor Texture 215 511
Disp Scroll Floor Texture 246 512
Scroll Ceiling Texture 250 513
Acc Scroll Ceiling Texture 214 514
Disp Scroll Ceiling Texture 245 515
Carry Objects on Floor (no scroll) 252 520
Acc Carry Objects on Floor 216 521
Disp Carry Objects on Floor 247 522
Carry Objects on Ceiling 203 523
Acc Carry Objects on Ceiling 205 524
Disp Carry Objects on Ceiling 201 525
Scroll Floor Texture and Carry Objects 253 530
Acc Scroll Floor Texture and Carry Objects 217 531
Disp Scroll Floor Texture and Carry Objects 248 532
Scroll Ceiling Texture and Carry Objects 202 533
Acc Scroll Ceiling Texture and Carry Objects 204 534
Disp Scroll Ceiling Texture and Carry Objects 200 535
Friction 223 540
Horizontal Wind 224 541
Upwards Wind 229 542
Downwards Wind 230 543
Horizontal Current 225 544
Upwards Current 227 545
Downwards Current 228 546
Boom Push/Pull Thing 226 547
Lighting:
Floor Lighting 213 600
Ceiling Lighting 5 601
Adjustable Pulsating Light 60 602
Adjustable Flickering Light 61 603
Adjustable Blinking Light (unsynchronized) New 604
Adjustable Blinking Light (synchronized) New 605
Colormap 16 606

Binary file not shown.

View file

@ -1,78 +0,0 @@
Removed:
- Buttons 1-20 690-709
- Button 21 (THZ2 A/740 B/741 D/742 E/745 710
- Close Door Blazing (Tag 743) 711
- Raise Ceiling to Highest (Tag 744) 981
- THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986
Stuff to Remove/Change:
- Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine
- Light Blinks On Every 1 Second 3 Add Linedef Combine
- Light Pulses Smoothly 8 Remove
- Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine
- Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine
- Light Flickers Like Fire 17 Remove
? - Damage (Fire) and Current 519 Remove (convert to combination)
? - Damage (Water) and Current 984 Remove (convert to combination)
Section 1:
1 - Damage (Generic) 11
2 - Damage (Water) 983
3 - Damage (Fire) 7
4 - Damage (Electrical) 18
5 - Spikes 4
6 - Death Pit (Camera Mod) 16
7 - Death Pit (No Camera Mod) 5
8 - Instant Kill 10
9 - Ring Drainer (Floor Touch) 978
10 - Ring Drainer (No Floor Touch) 980
11 - Special Stage Damage 9
12 - Space Countdown 6
13 - Ramp Sector (Increase step-up) 992
14 - Non-Ramp Sector (Don't step-down) 996
15 - Bouncy Sector (FOF Control Only) 14
Section 2: << 4
1 - Trigger Linedef Exec (Pushable Objects) 971
2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972
3 - Trigger Linedef Exec (Floor Touch/All Pls) 973
4 - Trigger Linedef Exec (Anywhere in Sec) 974
5 - Trigger Linedef Exec (Floor Touch) 975
6 - Trigger Linedef Exec (Emerald Check) 967
7 - Trigger Linedef Exec (NiGHTS Mare) 968
8 - Check for linedef executor on FOFs (ANY) 970
9 - Egg Trap Capsule 666
10 - Special Stage Time/Rings, Par 990
11 - Custom Global Gravity 991
Section 3: << 8
1 - Ice/Sludge (required?!) 256
2 - Wind/Current (required?!) 512
3 - Ice/Sludge and Wind/Current 768
4 - Conveyor Belt 985
5 - Speed Pad (No Spin) 976
6 - Speed Pad (Spin) 977
7 - Bustable Block Sprite Parameter 1500-1515
8 - "
9 - "
10 - "
11 - "
12 - "
13 - "
14 - "
15 - "
Section 4: << 12
1 - Starpost Activator 993
2 - Special Stage Goal Combine 33
2 - Exit Sector Combine 982
2 - No Tag Zone Combine 987
2 - CTF: Flag Return Combine 995
3 - CTF: Red Team Base 988
4 - CTF: Blue Team Base 989
5 - Fan Sector 997
6 - Super Sonic Transform 969
7 - Spinner 979
8 - Zoom Tube Start 998
9 - Zoom Tube End 999
10 - Finish Line 994

View file

@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View file

@ -1,307 +0,0 @@
SRB2
Release v1.09, ? 2005.
Last Updated: June 2005
Original game & sources by: Id Software.
Additions: (c)1998 by: Fabrice Denis & Boris Pereira
(c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe
(c)2000 by: Boris Pereira & Thierry Van Elsuwe
(c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis
Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for
their large contribution and to other DooM LEGACY & SRB2 Team members.
Web site: http://www.SRB2.org/
e-mail: none@none.com
OpenGL specific:
Web site: http://legacy.newdoom.com/gl
-----------------------------------------------------------------------
F.A.Q.
-----------------------------------------------------------------------
If you have any trouble with SRB2, you might find a solution
here.
If you find a solution to a problem that was not listed here,
please tell us so that we can update the FAQ and help other people!
Mail your hardware/software problems to:
None@none.com subject: FAQ
--------
CONTENTS
--------
[0] Miscellaneous
[1] Mouse/Joystick/Keyboard
[2] Video
[3] Sound
[4] Network
[5] Troubleshooting
-----------------
[0] MISCELLANEOUS
-----------------
* under win95 or OS/2, I don't have enough memory. How can i handle with ?
Tell win95 to put more dpmi memory for your dos box.
Or use the -mb option.
---------------------------
[1] MOUSE/JOYSTICK/KEYBOARD
---------------------------
* My mouse/joystick does not work in SRB2.
First, check that the mouse/joystick is activated : go at the
console and type either 'use_mouse' (or use the respective
menuitem) or 'use_joystick'.
If it tells '0' or off than the mouse/joystick is not used,
set the variable to 1. eg: 'use_mouse 1'.
For the joystick, different values will support different
types of joystick, check the console documentation for the
command 'use_joystick' for more.
Even if the mouse or joystick is activated, you have to
set up the contols into the Setup Controls menu. That is:
tell what use you will make of the mouse/joystick buttons.
---------
[2] VIDEO
---------
* Where are the other video modes ? I have only '320x200' in the
Video Modes menu.
DOS
---
SRB2 adds new video modes only if a VESA2 (or better) driver
is present. The VESA2 driver is a standard of 'talking' between a
program and the huge amount of different graphics cards
available today.
If you don't have a VESA2 driver, you can download UNIVBE, or
SMART DISPLAY DOCTOR from
http://www.scitechsoft.com/products/ent/free_titles.html
or if you have an S3 based card, you can download the free
software called 'S3VBE'.
ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip
ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip
http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip
http://www.google.com/search?q=s3vbe318.zip
* The game doesn't restore the video mode I have chosen the last time
I played SRB2.
The current video mode has to be made the 'default' so that it is
saved to the config : press the key 'D' on the Video Options menu
to set the current video mode the default.
* I have some problems with OpenGL mode
Have a look at the FAQ for OpenGL on the glLegacy web site:
http://www.doomnation.com/gllegacy/faqe.htm
# Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution
in fullscreen mode under X and SRB2 is really really slow. Can I
have lower resolutions like 320x200 in fullscreen mode as well?
Probably yes. SRB2 can only use the resolutions offered by the
X-Server. So if all fullscreen modes have a very high resolution you
have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup
(or the appropriate tool coming with your distribution - sax,
xf86config, ...) to do this.
If you do not succeed there, you can enter them manually into your
XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
For a short guide on how to do this, have a look at the file
"Doublescan.txt".
In case of doubt consult the XFree86-HOWTO (or ask your system
administrator :).
# Linux: I cannot have any fullscreen modes at all!
You have only modes above 1024x768 in your XF86Config. Proceed as
described above.
# Linux: After a certain idle time my screensaver jams the display of
SRB2. I can still operate SRB2, but I do not see what's happening
and the screensaver won't go away.
You probably have KDE. The KDE screensaver does not obey the screensaver
rules (at least mine, version 1.1). The solution is to deactivate the
KDE screensaver and use another screensaver (like the xscreensaver,
e.g.). But the hell, when you started SRB2 you should have played it
as well and not left it alone!!!
---------
[3] SOUND
---------
+ DOS:I can't have CD audio music, why ?
Make sure that the MSCDEX driver version 2.0 or later is loaded.
If it says 'MSCDEX version xxx' at game startup, and you still
don't hear the cd music, then probably your card doesn't respond
when SRB2 tries to set the cd volume. If so, make sure your sound
card's mixer have the cd volume set up so that you can hear something.
+ When the CD plays, the game is very 'jerky'. It doesn't do that when
I type 'cd off' in the console.
You have an old/bad cd driver, that can take up to a second to
respond to cd driver commands. Either get the latest version of
your driver, or turn cd update off. Check 'cd_udpate' in the
console documentation for more.
* DOS:How can I *ALWAYS* disable the sounds or music of the game ?
Edit the allegro.cfg file and set digicard/midicard to 0 (none)
* DOS:My sterero sound is reversed, how can I set it the right way ?
Change the console variable 'stereoreverse' to either 1 or 0.
Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable.
* DOS:The sounds are too 'slow', or 'low-pitched'
It seems to be a problem of the auto-detection of some 8bit sound
cards. You will have to set manually the 'sb_freq' value in the
allegro.cfg file to a lower value : 11906, 16129.
* DOS:SRB2 doesn't play any sound/music, but I have a sound
blaster genuine/compatible card.
If you have a genuine or compatible SoundBlaster card, it is very
important that you set the BLASTER environment variable.
If you are playing under DOS, and never installed your sound card
under DOS, run the setup of your sound card for DOS.
Check if the BLASTER variable was set: type 'SET' under dos
(or DOSbox)
Do you see something like 'BLASTER=A220 I5 D1 ...' ?
Yes? If you don't hear sounds/music, then tweak the settings in the
allegro.cfg file until you get something, first try changing the
type of the sound card, it is not always properly detected.
No? You have to set this variable in order that your sound card is
detected. Run the setup that was shipped with your sound card, and
make sure you run the setup for DOS too, it will usually add a
line of the type 'SET BLASTER=... ...' in the autoexec.bat file.
* DOS:How can I have better midi music on my 8bit sound card ?
Use the DIGMID driver, it is supported in SRB2.
What the hell is this? Well, the Gravis Ultrasound uses digital
samples to play midi music. On a simple 8bit card, you can use digital
samples too, which will sound usually better than what is output
by the poor fm synthesis chip of 8bit cards.
You will need to get a Gravis Ultrasound patch set, you can find
several ones for free on internet, it consists of a bunch of '.pat'
files which are the digital samples to play the midi instruments
(eg: piano, conga, guitar, ect.).
Check the Allegro homepage for some links to GUS patches:
http://alleg.sourceforge.net/digmid.html
http://alleg.sourceforge.net/
http://www.talula.demon.co.uk/allegro/digmid.html
http://www.talula.demon.co.uk/allegro/
Now to activate the DIGMID driver:
Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file.
Make sure you leave the 'digi_voices' blank, or set it to a low
value, because the midi music will use digital voices.
At the end of the allegro.cfg file, set the 'patches' value
to the path, where you have installed a Gravis Ultrasound midi
patch set. eg: patches = d:\music\midipat\
# Linux: CD music does not work or only works when run as root.
We do not encourage you to run SRB2 as root (you never know
what SRB2 can do to your system - it's a mighty piece of code :).
There is a common problem with ATAPI CD-rom drives, which are
treated as harddisks. Usually there is a link /dev/cdrom pointing to
device hd[b,c,d]. As harddisks are not supposed to be read directly
via this device (especially not by a common user), there are no read
permissions for "all". For CD-roms you can savely set read permissions
unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc,
set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives
should not have this problem. But if they do, proceed as described
with ATAPI drives.
# Linux: The CD music volume is not set properly.
Go to the console and type "jigglecdvolume 1".
-----------
[4] NETWORK
-----------
* Where can I find Internet servers ?
For the moment there is one public server.
http://srb2.servegame.org/ Master server web page
srb2.servegame.org:28910 current Master Server
* When I start SRB2 with -server or -connect it say :
"BinToPort: Address already in use (EADDRINUSE)"
It appears only when SRB2 crashes or when you leave with ctrl-break.
use -udpport 12345 (or any other free slot) on both sides (client and
server).
This can also happens when there is already a SRB2 running on your
computer if you whant to try two SRB2 running on the same computer
use -clientport 12345 (or any other free slot). Then the second will
connect to the first one.
* Do you use the tcp protocol ?
No, we use the udp protocol which is faster, but don't worry udp is a
part of the internet protocol.
-------------------
[5] Troubleshooting
-------------------
# Linux: SRB2 is hung in fullscreen mode and won´t let me leave.
What shall I do?
Some people press the reset button, but hey, we are not in the
stoneage of operating systems! There are two "proper" ways to
get out: kill your X-Server. You can usually do this by pressing
"CTRL-ALT-BACKSPACE". But if you have other open applications with
important data (probably hacked away on your diploma thesis for 3
weeks without saving once) you can also kill SRB2 directly. Press
"CTRL-ALT-F2" and you will get to a console. Log in, type
"killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7".
Some X-Server crash on this procedure - blame the X-Server for the
loss of 3 weeks work on your diploma thesis :)

View file

@ -1,68 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Sonic Robo Blast 2 Manual
</title>
<link rel="stylesheet" type="text/css" href="srb2manstyle.css">
<!-- Borrowed some javascript code so the height of the iframe is equal to the size of the document - Sonict -->
<script type="text/javascript">
/* free code from dyn-web.com */
function getDocHeight(doc) {
doc = doc || document;
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = document.getElementById(id);
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = 'hidden';
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
ifrm.style.height = getDocHeight( doc ) + "px";
ifrm.style.visibility = 'visible';
}
</script>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p class="c1">
<img src="manual_img/sonicname2.png" alt="SONIC" width="136" height="36">
<br>
<img src="manual_img/srb2banner.png" alt="ROBO BLAST 2" width="224" height="43">
</p>
<p class="c1">
<big><big><strong>Manual</strong></big></big>
</p>
<table class="cf" align="center">
<tr><td class="c">
<ul class="hmenu">
<li class="hmenu"><a class="hmenu" href="intro.htm" target="ifrm">Main</a></li>
<li class="hmenu"><a class="hmenu" href="items.htm" target="ifrm">Items</a></li>
<li class="hmenu"><a class="hmenu" href="playerabilities.htm" target="ifrm">Player Abilities</a></li>
<li class="hmenu"><a class="hmenu" href="basicplay.htm" target="ifrm">Gameplay</a></li>
<li class="hmenu"><a class="hmenu" href="surroundings.htm" target="ifrm">Surroundings</a></li>
</ul>
</td></tr>
<tr><td class="c">
<ul class="hmenu">
<li class="hmenu"><a class="hmenu" href="multiplayer.htm" target="ifrm">Multiplayer</a></li>
<li class="hmenu"><a class="hmenu" href="zones.htm" target="ifrm">Zones</a></li>
<li class="hmenu"><a class="hmenu" href="controls.htm" target="ifrm">Controls</a></li>
<li class="hmenu"><a class="hmenu" href="consolecommands.htm" target="ifrm">Console Commands</a></li>
<li class="hmenu"><a class="hmenu" href="misc.htm" target="ifrm">Misc</a></li>
</ul>
</td></tr>
</table>
<hr>
<p class="c1">
<!-- The "onload" property of the iframe makes an error when validated through the W3C validation checker. -->
<!-- This will not be fixed as it isn't worth the time to fix it up properly. - Sonict -->
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
</p>
</body>
</html>

View file

@ -1,39 +0,0 @@
SVN-RULES
- As you can see, there is sub-directory in the repository, one for eatch
platform (djgpp (dos),win32,SDL) the root directory is for all platform,
so take care of the order we have put in.
- do not commit/upload tests of bugged code, try to fix a maximum of know
bugs and update know bugs list in source.txt. If you must commit your source
make your code in #ifdef so we can disable it
- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature
and visual addition.
- Maximize communications between members, do not impose your changes, if your
are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room.
CODE-RULES
- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred
and for makefile)
- Self documented code, variable and function must have a name that help
understand the code, so do not call variable and function a,b, a2, ...
- the usage of extern in a c file is prohibited, except for declaration of a
function with body (so it is like public keyword in c++)
Also function protos haren't allowed for external function, put it un the
corresponding h file.
- Try to minimize #ifdef usage for :
- code readability
- the main code is for all port so if something is good for a platform all
platform can benefit by this feature
- Take care of platform dependent code, we would like to have code that work
on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl.
GOOD PRACTICE
- Try to put as mush static variable and function on module so it help to
understand the role of the varaible/function in the module also this
help the compiler to optimize
- minimise global variable
- make a log of your work, so you don't need to put a lot of comment in
the code, this will also help us to update the what's new section of doc
when doing final release

View file

@ -1,240 +0,0 @@
1. Compile SRB2
2. Explanation of the code
2.1 The memory model
2.2 Hardware Texture model
1. Compile SRB2
=================
DOS
---
need:
- djgpp 2.03 (http://www.delorie.com/djgpp/)
- allegro 3.12 (http://alleg.sourceforge.net/index.html)
(
- libsocket 0.7.4 (beta 4) or better
for use with Winsock 1.1 (example Windows 3.1)
(http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm)
OR
- Wattcp-32 v2.2 dev.rel 6 or better
For use with a packet driver
(http://www.bgnett.no/~giva/)
(http://groups.yahoo.com/group/watt-32/)
(http://groups.yahoo.com/group/watt-32/files/v2.2/)
)
- bcd 1.03 (inlcude in this package)
- gcc 2.95.2 is recommended
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
compile:
make
make WATTCP=1 (to make a Wattcp-32 version)
debug:
when craching SRB2 will return eip
type make asm, then you will have a 8 megs srb2.s (a assembler file)
the you can find the faulting instruction and function
------------------------------------------------------------------------
Linux/SDL
-----
need:
- tested with gcc 2.95 and 3.X.
- SDL 1.2
- SDL_mixer 1.2
- ibogg and libvorbis (http://Xiph.org/)
- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1
compile
make LINUX=1
debug:
gdb ?
------------------------------------------------------------------------
Win32
-----
need :
- glide 3.x sdk (optional) (http://www.3dfx.com)
- directx6 sdk (or higher) (http://www.micosoft.com/directx)
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
- use src\win32\wLegacy.dsp
- VC6 should also work with VC5, and VS.NET 200X
debug:
press on "step over" with the release version (there is some debug info
on it). Then change the eip in the regster window when you will type
enter the edi will go to the faulting instruction. don't forget that
you can follow the stack for calls.
You can also use trace with the debug version but add -win and -nomouse.
------------------------------------------------------------------------
Win32/minGW/SDL
-----
need:
- tested with gcc 2.95 and 3.X.
- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html
- SDL 1.2
- SDL_mixer 1.2
compile
make minGW=1 SDL=1
or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later
debug:
gdb ?
------------------------------------------------------------------------
WinCE/SDL WIP
-----
need:
- ActiveSync 3.8
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
- ActiveSync 3.7.1, if 3.8 isn't available for your language
http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx
- eMbedded Visual Tools 3.0 - 2002 Edition
http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd
- Pocket PC 2000 SDK
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4
- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this)
http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92
- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this)
http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3
- eMbedded Visual C++ 4.0
http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856
- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2)
http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b
OR
- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support)
http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5
- eMbedded Visual C++ 4.0 Update 5625 (SP4 only)
http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1
- Windows CE: Standard Software Development Kit
http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7
- SDK for Windows Mobile 2003-based Pocket PCs
http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652
- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC
http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C
- Microsoft Device Emulator 1.0 Community Preview
http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website
- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
(if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need)
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762
- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only)
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3
- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE)
compile
use src\SDL\WinCE\SRB2CE.vcw
debug:
?
2. Explanation of the code
==========================
2.1 The memory model (original) (z_zone.c) (by BP)
--------------------
SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function
to allocate in this heap.
Z_Malloc( int size,int tag,void* user )
size is the size in byte
tag can be : PU_STATIC allocated static (like malloc do)
call Z_Free to free it
PU_LEVEL same as static but the zone is "tagged" with the
tag PU_LEVEL, when calling
Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged
with PU_LEVEL are freed (at the end of the level)
PU_CACHE this one _can_ be freed automatiquely by one other
call to Z_Malloc. the *user point to a pointer
to this zone so when freed automatiquely the
pointer is set to NULL so eatch time you use it
you must check if the pointer is not NULL and
reload it.
(...)
2.2 Hardware Texture model (by BP)
--------------------------
Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at
runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware
texture a gr_texture so there is no confusion.
To remind you :
- Texture are set of patch and are associate to linedefs (walls) can be
upper, lower or middle texture. It can have hole on it.
- patch are sprites (the doom patch are run of vertical lines)
- flats are used for floors and ceiling of sectors and have size of 64x64
it can't have hole on it
- pic are new legacy format for picture, it can only handle plain texture
like flats it is now used for hud in full screen for the main picture
of legacy and for coronas (the format was extended to handle 32 bit color
or intensity + alpha, not all are implemented at this time)
Since patch, flat and pic are basic structure represented by only one lump in
the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx)
and init data field to NULL. Since the data structure is allocated in
PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed
(hw_cache.c).
The GlideMipmap_s structures for textures are initialized on
HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level)
the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this
can be changed in runtime in SRB2 (load a wad while runing) it must be
reallocated. Well, at this time it is realloceted at eatch level start. We
can do better, since numtextures change only when a wad is loaded.
The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the
card in fifo order when there is no more place it remove the first gr_texture,
the downloaded field of GlideMipmap_s go to false and when needed it is
reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there
own memory and handle gr_texture memory of the card we no more need to
redownload it but if we not free time to time gr_texture memory in opengl,
it will get alot of memory, so the gr_texture memory is cleared at eatch
new level (same time of texture reallocation). Opengl and 3dfx link the
loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear
textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx !
SRB2 can also draw patch with a differant colormap (thanks to Hurdler).
When needed it create the same gr_texture but just with a differant colormap.
This one is linked with the original in the GlideMipmap_s with the
nextcolormap field.
So when a polygone with a gr_texture must be drawn, first we check if the
gr_textures is not allready loaded in hadware memory (downloaded field) if
not then we check if gr_texture data is there (not grabbed by z_malloc
function) if not we must recompute it eatch type of gr_texture (texture,
patch, flat, pic have there own methode) the we can send the gr_texture
to 3dfx or OpenGl.

File diff suppressed because it is too large Load diff

View file

@ -803,10 +803,6 @@ keywords
Returns the best position of all non-CPU players.\n Returns the best position of all non-CPU players.\n
Intended for branching camera movement in podium maps."; Intended for branching camera movement in podium maps.";
PodiumFinish = "void PodiumFinish(void)\n
Brings up final Grand Prix results screen in podium maps.\n
Does nothing in standard maps.";
SetLineRenderStyle = "void SetLineRenderStyle(int tag, int blend, fixed alpha)\n SetLineRenderStyle = "void SetLineRenderStyle(int tag, int blend, fixed alpha)\n
Changes the rendering of the tagged linedefs' middle textures.\n Changes the rendering of the tagged linedefs' middle textures.\n
- tag: The linedef tag to change.\n - tag: The linedef tag to change.\n
@ -849,18 +845,17 @@ keywords
Ends the level. Ends the level.
- showintermission: Whether to show the results screen. If omitted, use the default behavior."; - showintermission: Whether to show the results screen. If omitted, use the default behavior.";
Music_Play = "void Music_Play(str tune, [bool onlyforactivator])\n Music_Play = "void Music_Play(str song, [bool onlyforactivator])\n
Play a tune. If it's already playing, restarting from the beginning.\n Play a song. If it's already playing, restarting from the beginning.\n
- tune: The ID of the tune. Note: this is separate from the music lump.\n - song: The name of the song lump, without 'O_' at the beginning and without a file extension.\n
- onlyforactivator: Only play the tune for the activator (if activator is a player)."; - onlyforactivator: Only play the song for the activator (if activator is a player).";
Music_StopAll = "void Music_StopAll([bool onlyforactivator])\n Music_StopAll = "void Music_StopAll([bool onlyforactivator])\n
Stop every tune that is currently playing.\n Stop the music that is currently playing.\n
- onlyforactivator: Only stop for the activator (if activator is a player)."; - onlyforactivator: Only stop for the activator (if activator is a player).";
Music_Remap = "void Music_Remap(str tune, str song, [bool onlyforactivator])\n Music_Remap = "void Music_Remap(str song, [bool onlyforactivator])\n
Change the actual song lump that a tune will play.\n Change the song thats playing while keeping its position.\n
- tune: The ID of the tune.\n
- song: The name of the song lump, without 'O_' at the beginning and without a file extension.\n - song: The name of the song lump, without 'O_' at the beginning and without a file extension.\n
- onlyforactivator: Only remap for the activator (if activator is a player)."; - onlyforactivator: Only remap for the activator (if activator is a player).";
@ -869,61 +864,6 @@ keywords
- fade: Time (tics) to fade between full volume and silence.\n - fade: Time (tics) to fade between full volume and silence.\n
- duration: Silent duration (tics) (not including fade in and fade out), -1 = infinite (default if omitted)."; - duration: Silent duration (tics) (not including fade in and fade out), -1 = infinite (default if omitted).";
Freeze = "void Freeze(bool value)\n
Pauses or unpauses the level's thinkers.\n
- value: True to freeze, false to unfreeze.";
Dialogue_SetSpeaker = "void Dialogue_SetSpeaker(str character, int sprite)\n
Display a new dialogue box, using a player skin.\n
- character: The name of the skin to use.\n
- sprite: Which frame of the TALK sprite to display.";
Dialogue_SetCustomSpeaker = "void Dialogue_SetCustomSpeaker(str nametag, str graphic, [str color, str voice])\n
Display a new dialogue box, using a custom nametag, graphic, and voice.\n
- nametag: The name to display on the dialogue box.\n
- graphic: The name of the graphic lump to display.\n
- color: The name of a skincolor to use for the graphic. Defaults to 'None'.\n
- voice: The name of the voice sound effect to use. Defaults to 'sfx_ktalk'.";
Dialogue_NewText = "void Dialogue_NewText(str text)\n
Set the text to start displaying on the current dialogue box.\n
- text: The contents of the dialogue box.";
Dialogue_WaitForDismiss = "void Dialogue_WaitForDismiss(void)\n
Pause the current script until the current dialogue box\n
has been dismissed by the player.";
Dialogue_WaitForText = "void Dialogue_WaitForText(void)\n
Pause the current script until the current dialogue box\n
finishes rendering all of its text.";
Dialogue_NewDismissText = "void Dialogue_NewDismissText(str text)\n
Sets new text to display on the dialogue box, and then waits for\n
the player to dismiss it. This is exactly equivalent to calling\n
Dialogue_NewText and then Dialogue_WaitForDismiss immediately after.\n
- text: The contents of the dialogue box.";
Dialogue_AutoDismiss = "void Dialogue_AutoDismiss(void)\n
Dismisses the current dialogue (including from other threads).";
AddMessage = "void AddMessage(str message, bool interrupt, bool persist)\n
Display a message at the top of every player's HUD.\n
- message: Text of the message.\n
- interrupt: True to interrupt other messages, False to display when they're done.\n
- persist: True to last forever (Tutorial objectives), False to disappear after a time limit.";
AddMessageForPlayer = "void AddMessageForPlayer(str message, bool interrupt, bool persist)\n
Display a message at the top of the triggering player's HUD.\n
- message: Text of the message.\n
- interrupt: True to interrupt other messages, False to display when they're done.\n
- persist: True to last forever (Tutorial objectives), False to disappear after a time limit.";
ClearPersistentMessages = "void ClearPersistentMessages(void)\n
Remove all HUD messages (AddMessage, AddMessageForPlayer) that are set to persist, for all players.\n";
ClearPersistentMessagesForPlayer = "void ClearPersistentMessagesForPlayer(void)\n
Remove the triggering player's HUD messages (AddMessage, AddMessageForPlayer) that are set to persist.\n";
FinishLine = "void FinishLine([bool flip])\n FinishLine = "void FinishLine([bool flip])\n
Increments the current lap of the activating player, like when crossing the finish line.\n Increments the current lap of the activating player, like when crossing the finish line.\n
If called from an activating line and from the wrong side, then it will decrement a lap instead.\n If called from an activating line and from the wrong side, then it will decrement a lap instead.\n
@ -949,9 +889,6 @@ keywords
- BOT_CONTROLLER_FASTFALL: Bots will try to fastfall when they're in the air.\n - BOT_CONTROLLER_FASTFALL: Bots will try to fastfall when they're in the air.\n
- forcedir: Force the bots to drive in an exact angle. Requires BOT_CONTROLLER_FORCEDIR to be set."; - forcedir: Force the bots to drive in an exact angle. Requires BOT_CONTROLLER_FORCEDIR to be set.";
DismountFlyingObject = "void DismountFlyingObject(void)\n
Makes the activator player dismount their Dead Line Rocket or Rideroid.";
GetLineProperty = "any GetLineProperty(int tag, int property)\n GetLineProperty = "any GetLineProperty(int tag, int property)\n
Gets the value of a line property directly.\n Gets the value of a line property directly.\n
- tag: The line tag to retrieve the property from. 0 uses the activating line, if it exists.\n - tag: The line tag to retrieve the property from. 0 uses the activating line, if it exists.\n

View file

@ -10,7 +10,7 @@
// //
// Header for target library libacs. // Header for target library libacs.
// //
// Defines for Dr. Robotnik's Ring Racers' ACS. // Defines for BlanKart's ACS.
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -649,6 +649,7 @@ enum
MF2_LINKDRAW = 1<<28, MF2_LINKDRAW = 1<<28,
MF2_SHIELD = 1<<29, MF2_SHIELD = 1<<29,
MF2_SPLAT = 1<<30, MF2_SPLAT = 1<<30,
MF2_WATERRUN = 1<<31,
}; };
enum enum

View file

@ -298,7 +298,7 @@ special
void -500:CameraWait(1, int), void -500:CameraWait(1, int),
int -501:PodiumPosition(0), int -501:PodiumPosition(0),
void -502:PodiumFinish(0), //void -502:PodiumFinish(0),
void -503:SetLineRenderStyle(3, int, int, fixed), void -503:SetLineRenderStyle(3, int, int, fixed),
void -504:MapWarp(2, str, bool), void -504:MapWarp(2, str, bool),
int -505:AddBot(0, str, int, int), int -505:AddBot(0, str, int, int),

View file

@ -1,10 +1,11 @@
/*********************************************************\ /*********************************************************\
vim: ai vim: ai
Zone Builder Game Configuration Zone Builder Game Configuration
For Dr. Robotnik's Ring Racers For BlanKart
Based on the Configuration for Sonic Robo Blast 2 Version 2.2 Based on the Configuration for Dr. Robotnik's Ring Racers and Sonic Robo Blast 2 Version 2.2
Contributors (alphabetical): Contributors (alphabetical):
* Foxboy * Foxboy
* GenericHeroGuy
* James(/Jart) * James(/Jart)
* JJames19119 * JJames19119
* Kalaron * Kalaron
@ -13,6 +14,7 @@
* MK * MK
* Morpheus * Morpheus
* Neo Chaotikal * Neo Chaotikal
* NepDisk
* Oogaland * Oogaland
* Rob * Rob
* SeventhSentinel * SeventhSentinel
@ -128,12 +130,8 @@ skins
Sonic; Sonic;
Tails; Tails;
Knuckles; Knuckles;
Amy;
Mighty;
Motobug;
Eggman; Eggman;
MetalSonic; MetalSonic;
Fang;
} }
// Gametypes // Gametypes

View file

@ -4558,171 +4558,6 @@ udmf
} }
} }
/*
// We want these objects, but they went over a billion of
// other Ring Racers objects...
hauntedheights
{
color = 10; // Green
title = "Haunted Heights";
2000
{
title = "Smashing Spikeball";
sprite = "FMCEA0";
width = 18;
height = 28;
arg0
{
title = "Initial delay";
}
}
2001
{
title = "HHZ Grass";
sprite = "HHZMA0";
width = 16;
height = 40;
}
2002
{
title = "HHZ Tentacle 1";
sprite = "HHZMB0";
width = 16;
height = 40;
}
2003
{
title = "HHZ Tentacle 2";
sprite = "HHZMC0";
width = 16;
height = 40;
}
2004
{
title = "HHZ Stalagmite (Tall)";
sprite = "HHZME0";
width = 16;
height = 40;
}
2005
{
title = "HHZ Stalagmite (Short)";
sprite = "HHZMF0";
width = 16;
height = 40;
}
2006
{
title = "Jack-o'-lantern 1";
sprite = "PUMKA0";
width = 16;
height = 40;
arg0
{
title = "Flicker";
type = 11;
enum = "yesno";
}
}
2007
{
title = "Jack-o'-lantern 2";
sprite = "PUMKB0";
width = 16;
height = 40;
arg0
{
title = "Flicker";
type = 11;
enum = "yesno";
}
}
2008
{
title = "Jack-o'-lantern 3";
sprite = "PUMKC0";
width = 16;
height = 40;
arg0
{
title = "Flicker";
type = 11;
enum = "yesno";
}
}
2009
{
title = "Purple Mushroom";
sprite = "SHRMD0";
width = 16;
height = 48;
}
2010
{
title = "HHZ Tree";
sprite = "HHPLC0";
width = 12;
height = 40;
}
}
*/
frozenhillside
{
color = 10; // Green
title = "Frozen Hillside";
2100
{
title = "Ice Shard (Small)";
sprite = "FHZIA0";
width = 8;
height = 32;
}
2101
{
title = "Ice Shard (Large)";
sprite = "FHZIB0";
width = 8;
height = 32;
}
2102
{
title = "Crystal Tree (Aqua)";
sprite = "TRE3A0";
width = 20;
height = 200;
}
2103
{
title = "Crystal Tree (Pink)";
sprite = "TRE3B0";
width = 20;
height = 200;
}
2104
{
title = "Amy Cameo";
sprite = "ROSYA1";
width = 16;
height = 48;
arg0
{
title = "Grayscale?";
type = 11;
enum = "noyes";
}
}
2105
{
title = "Mistletoe";
sprite = "XMS6A0";
width = 52;
height = 106;
}
}
tutorial tutorial
{ {
color = 10; // Green color = 10; // Green
@ -4741,148 +4576,6 @@ udmf
} }
} }
/*
// We want these objects, but they went over a billion of
// other Ring Racers objects...
flickies
{
color = 10; // Green
title = "Flickies";
width = 8;
height = 20;
arg0
{
title = "Radius";
}
arg1
{
title = "Flags";
type = 12;
enum
{
1 = "Move aimlessly";
2 = "No movement";
4 = "Hop";
}
}
2200
{
title = "Bluebird";
sprite = "FL01A1";
}
2201
{
title = "Rabbit";
sprite = "FL02A1";
}
2202
{
title = "Chicken";
sprite = "FL03A1";
}
2203
{
title = "Seal";
sprite = "FL04A1";
}
2204
{
title = "Pig";
sprite = "FL05A1";
}
2205
{
title = "Chipmunk";
sprite = "FL06A1";
}
2206
{
title = "Penguin";
sprite = "FL07A1";
}
2207
{
title = "Fish";
sprite = "FL08A1";
arg2
{
title = "Color";
type = 11;
enum
{
0 = "Random";
1 = "Red";
2 = "Cyan";
3 = "Blue";
4 = "Vapor";
5 = "Purple";
6 = "Bubblegum";
7 = "Neon";
8 = "Black";
9 = "Beige";
10 = "Lavender";
11 = "Ruby";
12 = "Salmon";
13 = "Sunset";
14 = "Orange";
15 = "Yellow";
}
}
}
2208
{
title = "Ram";
sprite = "FL09A1";
}
2209
{
title = "Puffin";
sprite = "FL10A1";
}
2210
{
title = "Cow";
sprite = "FL11A1";
}
2211
{
title = "Rat";
sprite = "FL12A1";
}
2212
{
title = "Bear";
sprite = "FL13A1";
}
2213
{
title = "Dove";
sprite = "FL14A1";
}
2214
{
title = "Cat";
sprite = "FL15A1";
}
2215
{
title = "Canary";
sprite = "FL16A1";
}
2216
{
title = "Spider";
sprite = "FS01A1";
}
2217
{
title = "Bat";
sprite = "FS02A0";
}
}
*/
marble marble
{ {
color = 10; // Green color = 10; // Green

40
extras/testms.py Normal file
View file

@ -0,0 +1,40 @@
# connection menu testing script
# "masterserver http://localhost:12345" in console
# i know nothing about HTTP
import http.server
# just enough for two pages...
fakeserverlist = """\
localhost 5029 Discord: Jeffma Balls#6942
localhost 5030 Discord: Jeffma Balls#6942
localhost 5031 Discord: Jeffma Balls#6942
localhost 5032 Discord: Jeffma Balls#6942
localhost 5033 Discord: Jeffma Balls#6942
localhost 5034 Discord: Jeffma Balls#6942
localhost 5035 Discord: Jeffma Balls#6942
localhost 5036 Discord: Jeffma Balls#6942
localhost 5037 Discord: Jeffma Balls#6942
localhost 5038 Discord: Jeffma Balls#6942
localhost 5039 Discord: Jeffma Balls#6942
localhost 5040 Discord: Jeffma Balls#6942
"""
class jart(http.server.BaseHTTPRequestHandler):
def do_GET(self):
response = ""
if self.path.startswith("/games/SRB2Kart/version"):
response = "11 the best version\n"
elif self.path.startswith("/games/SRB2Kart/11/servers") or self.path.startswith("/games/SRB2Kart/10/servers"):
response = fakeserverlist
elif self.path.startswith("/rules"):
response = "Do whatever lol\n\n"
self.send_response(200)
self.end_headers()
if not response:
print("No response!?")
self.wfile.write(bytes(response, "utf-8"))
server = http.server.HTTPServer(("localhost", 12345), jart)
server.serve_forever()

View file

@ -173,7 +173,7 @@ BlanKart's namespace implements the following additional fields:
gravity = <float>; // Sector's gravity multiplier. Default = 1.0. gravity = <float>; // Sector's gravity multiplier. Default = 1.0.
offroad = <float>; // Sector's offroad multiplier. Default = 0.0. offroad = <float>; // Sector's offroad multiplier. Default = 0.0.
damagetype = <string>; // Damage inflicted by the sector. damagetype = <string>; // Damage inflicted by the sector.
// Can be "None", "Generic", "Lava", "DeathPit", "Instakill", or "Stumble". // Can be "None", "Generic", "Lava", "DeathPit", "Instakill".
// Default = "None". // Default = "None".
action = <integer>; // Sector action, same as line special. Default = 0. action = <integer>; // Sector action, same as line special. Default = 0.
@ -217,7 +217,8 @@ BlanKart's namespace implements the following additional fields:
nostepup = <bool>; // true = objects can't step up. nostepup = <bool>; // true = objects can't step up.
doublestepup = <bool>; // true = objects have increased step up. doublestepup = <bool>; // true = objects have increased step up.
nostepdown = <bool>; // true = objects can't step down. nostepdown = <bool>; // true = objects can't step down.
cheatcheckactivator = <bool>; // true = players activate cheat checks when in this sector. starpostactivator = <bool>; // true = players activate starposts when in this sector.
cheatcheckactivator = <bool>; // true = players activate starposts when in this sector.
exit = <bool>; // true = players finish match when entering sector. exit = <bool>; // true = players finish match when entering sector.
deleteitems = <bool>; // true = items instantly explode when entering sector. deleteitems = <bool>; // true = items instantly explode when entering sector.
fan = <bool>; // true = players are propelled upwards in this sector. fan = <bool>; // true = players are propelled upwards in this sector.
@ -225,7 +226,7 @@ BlanKart's namespace implements the following additional fields:
zoomtubeend = <bool>; // true = sector is end of a zoom tube. zoomtubeend = <bool>; // true = sector is end of a zoom tube.
speedpad = <bool>; // true = players are launched forward by this sector. speedpad = <bool>; // true = players are launched forward by this sector.
finishline = <bool>l // true = players gain a lap or finish the race in this sector. Used for legacy support. finishline = <bool>; // true = players gain a lap or finish the race in this sector. Used for legacy support.
sneakerpanel = <bool>; // true = players are speed boosted forward by this sector. sneakerpanel = <bool>; // true = players are speed boosted forward by this sector.
waterpanel = <bool>; // true = players are speed boosted forward by this sector and are able to drive on water. waterpanel = <bool>; // true = players are speed boosted forward by this sector and are able to drive on water.
redpogospring = <bool>; // true = players are bounced into the air by this sector. redpogospring = <bool>; // true = players are bounced into the air by this sector.
@ -303,8 +304,12 @@ RR 1.0: 20.09.2024
BK 1.0: 08.02.2025 BK 1.0: 08.02.2025
- Document spec updated to account for BlanKart differnces. - Document spec updated to account for BlanKart differnces.
BK 1.0: 10.02.25 BK 1.0: 10.02.2025
- Added offset*_* flags. - Added offset*_* flags.
- Added flags for nophysics_floor and nophysics_ceiling. - Added flags for nophysics_floor and nophysics_ceiling.
- Readded effect6 for compat reasons. - Readded effect6 for compat reasons.
- Readded gravityoverride. - Readded gravityoverride.
BK 1.0: 11.03.2025
- Fixed up some typos.
- Added more effects.

View file

@ -1,125 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2DD", "src\win32\Srb2win-vc10.vcxproj", "{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\libpng-src\projects\visualc10\libpng.vcxproj", "{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r_opengl", "src\hardware\r_opengl\r_opengl-vc10.vcxproj", "{51137D5C-4E81-4955-AACF-EA3092006051}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\projects\visualc10\zlib.vcxproj", "{73A5729C-7323-41D4-AB48-8A03C9F81603}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "s_openal", "src\hardware\s_openal\s_openal-vc10.vcxproj", "{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2Win", "src\sdl\Srb2SDL-vc10.vcxproj", "{61BA7D3C-F77D-4D31-B718-1177FE482CF2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM.ActiveCfg = Debug|ARM
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM.Build.0 = Debug|ARM
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM64.ActiveCfg = Debug|ARM64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM64.Build.0 = Debug|ARM64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.ActiveCfg = Debug|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.Build.0 = Debug|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.ActiveCfg = Debug|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.Build.0 = Debug|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM.ActiveCfg = Release|ARM
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM.Build.0 = Release|ARM
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM64.ActiveCfg = Release|ARM64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM64.Build.0 = Release|ARM64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.ActiveCfg = Release|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.Build.0 = Release|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.ActiveCfg = Release|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.Build.0 = Release|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM.ActiveCfg = Debug|ARM
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM.Build.0 = Debug|ARM
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM64.ActiveCfg = Debug|ARM64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM64.Build.0 = Debug|ARM64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.ActiveCfg = Debug|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.Build.0 = Debug|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.ActiveCfg = Debug|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.Build.0 = Debug|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM.ActiveCfg = Release|ARM
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM.Build.0 = Release|ARM
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM64.ActiveCfg = Release|ARM64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM64.Build.0 = Release|ARM64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.ActiveCfg = Release|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.Build.0 = Release|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.ActiveCfg = Release|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.Build.0 = Release|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM.ActiveCfg = Debug|ARM
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM.Build.0 = Debug|ARM
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM64.ActiveCfg = Debug|ARM64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM64.Build.0 = Debug|ARM64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.ActiveCfg = Debug|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.Build.0 = Debug|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.ActiveCfg = Debug|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.Build.0 = Debug|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM.ActiveCfg = Release|ARM
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM.Build.0 = Release|ARM
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM64.ActiveCfg = Release|ARM64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM64.Build.0 = Release|ARM64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.ActiveCfg = Release|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.Build.0 = Release|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.ActiveCfg = Release|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.Build.0 = Release|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM.ActiveCfg = Debug|ARM
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM.Build.0 = Debug|ARM
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM64.ActiveCfg = Debug|ARM64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM64.Build.0 = Debug|ARM64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.ActiveCfg = Debug|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.Build.0 = Debug|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.ActiveCfg = Debug|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.Build.0 = Debug|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM.ActiveCfg = Release|ARM
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM.Build.0 = Release|ARM
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM64.ActiveCfg = Release|ARM64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM64.Build.0 = Release|ARM64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.ActiveCfg = Release|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.Build.0 = Release|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.ActiveCfg = Release|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.Build.0 = Release|x64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|ARM.ActiveCfg = Debug|ARM
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|Win32.ActiveCfg = Debug|Win32
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|x64.ActiveCfg = Debug|x64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|ARM.ActiveCfg = Release|ARM
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|ARM64.ActiveCfg = Release|ARM64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|Win32.ActiveCfg = Release|Win32
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|x64.ActiveCfg = Release|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM.ActiveCfg = Debug|ARM
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM.Build.0 = Debug|ARM
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM64.Build.0 = Debug|ARM64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.ActiveCfg = Debug|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.Build.0 = Debug|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.ActiveCfg = Debug|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.Build.0 = Debug|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM.ActiveCfg = Release|ARM
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM.Build.0 = Release|ARM
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM64.ActiveCfg = Release|ARM64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM64.Build.0 = Release|ARM64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.ActiveCfg = Release|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.Build.0 = Release|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.ActiveCfg = Release|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8C0B5F99-D9B8-4CB2-BA67-5D350E71C6FC}
EndGlobalSection
EndGlobal

View file

@ -1,89 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2win", "src\win32\Srb2win-vc9.vcproj", "{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}"
ProjectSection(ProjectDependencies) = postProject
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\libpng-src\projects\visualc9\libpng.vcproj", "{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}"
ProjectSection(ProjectDependencies) = postProject
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r_opengl", "src\hardware\r_opengl\r_opengl-vc9.vcproj", "{51137D5C-4E81-4955-AACF-EA3092006051}"
ProjectSection(ProjectDependencies) = postProject
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\projects\visualc9\zlib.vcproj", "{73A5729C-7323-41D4-AB48-8A03C9F81603}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "s_openal", "src\hardware\s_openal\s_openal-vc9.vcproj", "{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}"
ProjectSection(ProjectDependencies) = postProject
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2SDL", "src\sdl\Srb2SDL-vc9.vcproj", "{61BA7D3C-F77D-4D31-B718-1177FE482CF2}"
ProjectSection(ProjectDependencies) = postProject
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.ActiveCfg = Debug|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.Build.0 = Debug|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.ActiveCfg = Debug|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.Build.0 = Debug|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.ActiveCfg = Release|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.Build.0 = Release|Win32
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.ActiveCfg = Release|x64
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.Build.0 = Release|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.ActiveCfg = Debug|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.Build.0 = Debug|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.ActiveCfg = Debug|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.Build.0 = Debug|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.ActiveCfg = Release|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.Build.0 = Release|Win32
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.ActiveCfg = Release|x64
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.Build.0 = Release|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.ActiveCfg = Debug|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.Build.0 = Debug|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.ActiveCfg = Debug|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.Build.0 = Debug|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.ActiveCfg = Release|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.Build.0 = Release|Win32
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.ActiveCfg = Release|x64
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.Build.0 = Release|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.ActiveCfg = Debug|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.Build.0 = Debug|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.ActiveCfg = Debug|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.Build.0 = Debug|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.ActiveCfg = Release|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.Build.0 = Release|Win32
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.ActiveCfg = Release|x64
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.Build.0 = Release|x64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|Win32.ActiveCfg = Debug|Win32
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|x64.ActiveCfg = Debug|x64
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|Win32.ActiveCfg = Release|Win32
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|x64.ActiveCfg = Release|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.ActiveCfg = Debug|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.Build.0 = Debug|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.ActiveCfg = Debug|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.Build.0 = Debug|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.ActiveCfg = Release|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.Build.0 = Release|Win32
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.ActiveCfg = Release|x64
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -76,7 +76,7 @@ LOCAL_SRC_FILES := am_map.c \
android/i_system.c \ android/i_system.c \
android/i_video.c android/i_video.c
LOCAL_CFLAGS += -DPLATFORM_ANDROID -DNONX86 -DLINUX -DDEBUGMODE -DNOASM -DNOPIX -DUNIXCOMMON -DNOTERMIOS LOCAL_CFLAGS += -DPLATFORM_ANDROID -DNONX86 -DLINUX -DDEBUGMODE -DNOPIX -DUNIXCOMMON -DNOTERMIOS
LOCAL_MODULE := libsrb2 LOCAL_MODULE := libsrb2

View file

@ -11,15 +11,7 @@ target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)
target_sourcefile(c) target_sourcefile(c)
target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in) target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in)
set(SRB2_ASM_SOURCES vid_copy.s)
set(SRB2_NASM_SOURCES tmap_mmx.nas tmap.nas)
### Configuration ### Configuration
set(SRB2_CONFIG_USEASM OFF CACHE BOOL
"Enable NASM tmap implementation for software mode speedup.")
set(SRB2_CONFIG_YASM OFF CACHE BOOL
"Use YASM in place of NASM.")
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
"Compile a development build of SRB2Kart.") "Compile a development build of SRB2Kart.")
@ -99,6 +91,13 @@ target_link_libraries(SRB2SDL2 PRIVATE tcbrindle::span)
target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt-header-only) target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt-header-only)
target_link_libraries(SRB2SDL2 PRIVATE Tracy::TracyClient) target_link_libraries(SRB2SDL2 PRIVATE Tracy::TracyClient)
target_compile_definitions(SRB2SDL2 PRIVATE -DUSE_STUN)
if(SRB2_CONFIG_ENABLE_DISCORDRPC)
target_link_libraries(SRB2SDL2 PRIVATE DiscordRPC::DiscordRPC)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_DISCORDRPC)
target_sources(SRB2SDL2 PRIVATE discord.c)
endif()
set(SRB2_HAVE_THREADS ON) set(SRB2_HAVE_THREADS ON)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS) target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_THREADS)
@ -118,7 +117,7 @@ if(${SRB2_CONFIG_HAVE_ZLIB})
set(SRB2_HAVE_ZLIB ON) set(SRB2_HAVE_ZLIB ON)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB) target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_ZLIB)
else() else()
message(WARNING "You have specified that ZLIB is available but it was not found. Dr Robotnik's Ring Racers may not compile correctly.") message(WARNING "You have specified that ZLIB is available but it was not found. BlanKart may not compile correctly.")
endif() endif()
endif() endif()
@ -141,7 +140,7 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE) target_compile_definitions(SRB2SDL2 PRIVATE -D_LARGEFILE64_SOURCE)
target_sources(SRB2SDL2 PRIVATE apng.c) target_sources(SRB2SDL2 PRIVATE apng.c)
else() else()
message(WARNING "You have specified that PNG is available but it was not found. Dr Robotnik's Ring Racers may not compile correctly.") message(WARNING "You have specified that PNG is available but it was not found. BlanKart may not compile correctly.")
endif() endif()
endif() endif()
endif() endif()
@ -169,33 +168,6 @@ if(${CMAKE_SYSTEM} MATCHES Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "GNU" AND
target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/include") target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/include")
endif() endif()
if(${SRB2_CONFIG_USEASM})
#SRB2_ASM_FLAGS can be used to pass flags to either nasm or yasm.
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(SRB2_ASM_FLAGS "-DLINUX ${SRB2_ASM_FLAGS}")
endif()
if(${SRB2_CONFIG_YASM})
set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS} nas)
set(CMAKE_ASM_YASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.")
enable_language(ASM_YASM)
else()
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS} nas)
set(CMAKE_ASM_NASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.")
enable_language(ASM_NASM)
endif()
set(SRB2_USEASM ON)
target_compile_definitions(SRB2SDL2 PRIVATE -DUSEASM)
target_compile_options(SRB2SDL2 PRIVATE -msse3 -mfpmath=sse)
target_sources(SRB2SDL2 PRIVATE ${SRB2_ASM_SOURCES}
${SRB2_NASM_SOURCES})
else()
set(SRB2_USEASM OFF)
target_compile_definitions(SRB2SDL2 PRIVATE -DNONX86 -DNORUSEASM)
endif()
# Targets # Targets
# If using CCACHE, then force it. # If using CCACHE, then force it.

View file

@ -47,8 +47,6 @@
# HAVE_MINIUPNPC=1 - Enable automated port forwarding. # HAVE_MINIUPNPC=1 - Enable automated port forwarding.
# Already enabled by default for 32-bit # Already enabled by default for 32-bit
# Windows. # Windows.
# NOASM=1 - Disable hand optimized assembly code for the
# Software renderer.
# NOPNG=1 - Disable PNG graphics support. (TODO: double # NOPNG=1 - Disable PNG graphics support. (TODO: double
# check netplay compatible.) # check netplay compatible.)
# NOCURL=1 - Disable libcurl--HTTP capability. # NOCURL=1 - Disable libcurl--HTTP capability.
@ -87,7 +85,6 @@
# executable. # executable.
# WINDOWSHELL=1 - Use Windows commands. # WINDOWSHELL=1 - Use Windows commands.
# PREFIX= - Prefix to many commands, for cross compiling. # PREFIX= - Prefix to many commands, for cross compiling.
# YASM=1 - Use Yasm instead of NASM assembler.
# STABS=1 - ? # STABS=1 - ?
# ECHO=1 - Print out each command in the build process. # ECHO=1 - Print out each command in the build process.
# NOECHOFILENAMES=1 - Don't print out each that is being # NOECHOFILENAMES=1 - Don't print out each that is being
@ -147,22 +144,6 @@ OBJCOPY?=$(call Prefix,objcopy)
OBJDUMP?=$(call Prefix,objdump) OBJDUMP?=$(call Prefix,objdump)
WINDRES?=$(call Prefix,windres) WINDRES?=$(call Prefix,windres)
ifdef YASM
NASM?=yasm
else
NASM?=nasm
endif
ifdef YASM
ifdef STABS
NASMOPTS?=-g stabs
else
NASMOPTS?=-g dwarf2
endif
else
NASMOPTS?=-g
endif
GZIP?=gzip GZIP?=gzip
GZIP_OPTS?=-9 -f -n GZIP_OPTS?=-9 -f -n
ifdef WINDOWSHELL ifdef WINDOWSHELL
@ -186,8 +167,6 @@ makedir:=../make
opts:=-DCOMPVERSION -g opts:=-DCOMPVERSION -g
libs:= libs:=
nasm_format:=
# This is a list of variables names, of which if defined, # This is a list of variables names, of which if defined,
# also defines the name as a macro to the compiler. # also defines the name as a macro to the compiler.
passthru_opts:= passthru_opts:=
@ -337,7 +316,6 @@ endif
LD:=$(CC) LD:=$(CC)
cc:=$(cc) $(opts) cc:=$(cc) $(opts)
nasm=$(NASM) $(NASMOPTS) -f $(nasm_format)
ifdef UPX ifdef UPX
upx=$(UPX) $(UPX_OPTS) upx=$(UPX) $(UPX_OPTS)
endif endif
@ -415,7 +393,6 @@ $(objdir)/%.$(1) : %.$(2) | $$$$(@D)/
endef endef
$(eval $(call _recipe,o,c,$(cc) -c -o $$@ $$<)) $(eval $(call _recipe,o,c,$(cc) -c -o $$@ $$<))
$(eval $(call _recipe,o,nas,$(nasm) -o $$@ $$<))
$(eval $(call _recipe,o,cpp,$(cxx) -c -o $$@ $$<)) $(eval $(call _recipe,o,cpp,$(cxx) -c -o $$@ $$<))
$(eval $(call _recipe,o,s,$(cc) $(asflags) -c -o $$@ $$<)) $(eval $(call _recipe,o,s,$(cc) $(asflags) -c -o $$@ $$<))
$(eval $(call _recipe,res,rc,$(windres) -i $$< -o $$@)) $(eval $(call _recipe,res,rc,$(windres) -i $$< -o $$@))

View file

@ -1,82 +1,75 @@
# #
# Makefile for feature flags. # Makefile for feature flags.
# #
passthru_opts+=\ passthru_opts+=\
NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
MOBJCONSISTANCY PACKETDROP ZDEBUG\ MOBJCONSISTANCY PACKETDROP ZDEBUG\
HAVE_MINIUPNPC\ HAVE_MINIUPNPC\
HAVE_DISCORDRPC DEVELOP HAVE_DISCORDRPC DEVELOP
# build with debugging information # build with debugging information
ifdef DEBUGMODE ifdef DEBUGMODE
MOBJCONSISTANCY=1 MOBJCONSISTANCY=1
PACKETDROP=1 PACKETDROP=1
opts+=-DPARANOIA -DRANGECHECK opts+=-DPARANOIA -DRANGECHECK
endif endif
ifndef NOHW ifndef NOHW
opts+=-DHWRENDER opts+=-DHWRENDER
sources+=$(call List,hardware/Sourcefile) sources+=$(call List,hardware/Sourcefile)
endif endif
ifndef NOASM ifndef NOMD5
ifndef NONX86 sources+=md5.c
sources+=tmap.nas tmap_mmx.nas endif
opts+=-DUSEASM
endif ifndef NOZLIB
endif ifndef NOPNG
ifdef PNG_PKGCONFIG
ifndef NOMD5 $(eval $(call Use_pkg_config,PNG_PKGCONFIG))
sources+=md5.c else
endif PNG_CONFIG?=$(call Prefix,libpng-config)
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
ifndef NOZLIB $(if $(PNG_STATIC),--static),,--ldflags))
ifndef NOPNG endif
ifdef PNG_PKGCONFIG ifdef LINUX
$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) opts+=-D_LARGEFILE64_SOURCE
else endif
PNG_CONFIG?=$(call Prefix,libpng-config) opts+=-DHAVE_PNG
$(eval $(call Configure,PNG,$(PNG_CONFIG) \ sources+=apng.c
$(if $(PNG_STATIC),--static),,--ldflags)) endif
endif endif
ifdef LINUX
opts+=-D_LARGEFILE64_SOURCE ifndef NOCURL
endif CURLCONFIG?=curl-config
opts+=-DHAVE_PNG $(eval $(call Configure,CURL,$(CURLCONFIG)))
sources+=apng.c opts+=-DHAVE_CURL
endif endif
endif
ifdef HAVE_MINIUPNPC
ifndef NOCURL libs+=-lminiupnpc
CURLCONFIG?=curl-config endif
$(eval $(call Configure,CURL,$(CURLCONFIG)))
opts+=-DHAVE_CURL ifdef HAVE_DISCORDRPC
endif $(eval $(call Propogate_flags,DISCORDRPC))
libs+=-ldiscord-rpc
ifdef HAVE_MINIUPNPC opts+=-DUSE_STUN
libs+=-lminiupnpc sources+=discord.c stun.c
endif endif
ifdef HAVE_DISCORDRPC # (Valgrind is a memory debugger.)
$(eval $(call Propogate_flags,DISCORDRPC)) ifdef VALGRIND
libs+=-ldiscord-rpc VALGRIND_PKGCONFIG?=valgrind
opts+=-DUSE_STUN $(eval $(call Use_pkg_config,VALGRIND))
sources+=discord.c stun.c ZDEBUG=1
endif opts+=-DHAVE_VALGRIND
endif
# (Valgrind is a memory debugger.)
ifdef VALGRIND default_packages:=\
VALGRIND_PKGCONFIG?=valgrind GME/libgme/LIBGME\
$(eval $(call Use_pkg_config,VALGRIND)) OPENMPT/libopenmpt/LIBOPENMPT\
ZDEBUG=1 ZLIB/zlib\
opts+=-DHAVE_VALGRIND
endif $(foreach p,$(default_packages),\
$(eval $(call Check_pkg_config,$(p))))
default_packages:=\
GME/libgme/LIBGME\
OPENMPT/libopenmpt/LIBOPENMPT\
ZLIB/zlib\
$(foreach p,$(default_packages),\
$(eval $(call Check_pkg_config,$(p))))

View file

@ -5,10 +5,6 @@
opts+=-DUNIXCOMMON -DLUA_USE_POSIX opts+=-DUNIXCOMMON -DLUA_USE_POSIX
libs+=-lm libs+=-lm
ifndef nasm_format
nasm_format:=elf -DLINUX
endif
ifndef NOHW ifndef NOHW
opts+=-I/usr/X11R6/include opts+=-I/usr/X11R6/include
libs+=-L/usr/X11R6/lib libs+=-L/usr/X11R6/lib
@ -31,7 +27,6 @@ endif
# FIXME: UNTESTED # FIXME: UNTESTED
#ifdef SOLARIS #ifdef SOLARIS
#NOIPX=1 #NOIPX=1
#NOASM=1
#opts+=-I/usr/local/include -I/opt/sfw/include \ #opts+=-I/usr/local/include -I/opt/sfw/include \
# -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP # -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP
#libs+=-L/opt/sfw/lib -lsocket -lnsl #libs+=-L/opt/sfw/lib -lsocket -lnsl

View file

@ -39,7 +39,6 @@ else ifdef SOLARIS # FIXME: UNTESTED
UNIX=1 UNIX=1
platform=solaris platform=solaris
else ifdef CYGWIN32 # FIXME: UNTESTED else ifdef CYGWIN32 # FIXME: UNTESTED
nasm_format=win32
platform=cygwin platform=cygwin
else ifdef MINGW else ifdef MINGW
ifdef MINGW64 ifdef MINGW64

View file

@ -13,16 +13,6 @@ makedir:=$(makedir)/SDL
sources+=$(call List,sdl/Sourcefile) sources+=$(call List,sdl/Sourcefile)
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
# FIXME: UNTESTED
#ifdef PANDORA
#include sdl/SRB2Pandora/Makefile.cfg
#endif #ifdef PANDORA
# FIXME: UNTESTED
#ifdef CYGWIN32
#include sdl/MakeCYG.cfg
#endif #ifdef CYGWIN32
ifndef NOHW ifndef NOHW
sources+=sdl/ogl_sdl.c sources+=sdl/ogl_sdl.c
endif endif
@ -56,13 +46,6 @@ SDL_LDFLAGS?=$(shell $(SDL_CONFIG) \
$(eval $(call Propogate_flags,SDL)) $(eval $(call Propogate_flags,SDL))
endif endif
# use the x86 asm code
ifndef CYGWIN32
ifndef NOASM
USEASM=1
endif
endif
ifdef MINGW ifdef MINGW
ifndef NOSDLMAIN ifndef NOSDLMAIN
SDLMAIN=1 SDLMAIN=1

View file

@ -13,9 +13,7 @@ sources+=win32/Srb2win.rc
opts+=-DSTDC_HEADERS opts+=-DSTDC_HEADERS
libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32 libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
nasm_format:=win32 SDL?=1
SDL=1
ifndef NOHW ifndef NOHW
opts+=-DUSE_WGL_SWAP opts+=-DUSE_WGL_SWAP

View file

@ -15,7 +15,7 @@ f_wipe.c
g_demo.c g_demo.c
g_game.c g_game.c
g_input.c g_input.c
g_splitscreen.c g_party.cpp
am_map.c am_map.c
command.c command.c
console.c console.c
@ -92,7 +92,6 @@ mserv.c
http-mserv.c http-mserv.c
i_tcp.c i_tcp.c
lzf.c lzf.c
vid_copy.s
lua_script.c lua_script.c
lua_baselib.c lua_baselib.c
lua_mathlib.c lua_mathlib.c
@ -130,3 +129,4 @@ k_director.c
k_follower.c k_follower.c
k_mapuser.c k_mapuser.c
k_stats.c k_stats.c
stun.c

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2024 by Sally "TehRealSalt" Cochenour // Copyright (C) 2024 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour
@ -3189,7 +3189,7 @@ bool CallFunc_ExitLevel(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::W
/*-------------------------------------------------- /*--------------------------------------------------
bool CallFunc_MusicPlay(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC) bool CallFunc_MusicPlay(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
Play a tune. If it's already playing, restart from the Play a song. If it's already playing, restart from the
beginning. beginning.
--------------------------------------------------*/ --------------------------------------------------*/
bool CallFunc_MusicPlay(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC) bool CallFunc_MusicPlay(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
@ -3204,7 +3204,7 @@ bool CallFunc_MusicPlay(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::W
return false; return false;
} }
S_ChangeMusicEx(map->getString(argV[0])->str, 0, false, mapmusposition, 0, 0); S_ChangeMusicEx(map->getString(argV[0])->str, 0, true, mapmusposition, 0, 0);
return false; return false;
} }
@ -3232,22 +3232,22 @@ bool CallFunc_MusicStopAll(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM
/*-------------------------------------------------- /*--------------------------------------------------
bool CallFunc_MusicRemap(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC) bool CallFunc_MusicRemap(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
Change the actual song lump that a tune will play. Change the song while keeping the same music posititon.
--------------------------------------------------*/ --------------------------------------------------*/
bool CallFunc_MusicRemap(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC) bool CallFunc_MusicRemap(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
{ {
ACSVM::MapScope *map = thread->scopeMap; ACSVM::MapScope *map = thread->scopeMap;
UINT32 lastmapmusposition = mapmusposition;
// 0: str tune - id for the tune to play // 0: str song - lump name for the song to map to
// 1: str song - lump name for the song to map to // 1: [bool foractivator] - only do this if the activator is a player and is being viewed
// 2: [bool foractivator] - only do this if the activator is a player and is being viewed
if (argC > 2 && argV[2] && !ACS_ActivatorIsLocal(thread)) if (argC > 1 && argV[1] && !ACS_ActivatorIsLocal(thread))
{ {
return false; return false;
} }
S_ChangeMusicEx(map->getString(argV[1])->str, 0, false, mapmusposition, 0, 0); S_ChangeMusicEx(map->getString(argV[0])->str, 0, true, lastmapmusposition, 0, 0);
return false; return false;
} }

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity) // Copyright (C) 2016 by James Haley, David Hill, et al. (Team Eternity)
// Copyright (C) 2022 by Sally "TehRealSalt" Cochenour // Copyright (C) 2022 by Sally "TehRealSalt" Cochenour
@ -39,9 +39,9 @@ enum acs_scriptType_e
ACS_ST_ENTER = 4, // ENTER: Runs when a player enters the game; both on start of the level, and when un-spectating. ACS_ST_ENTER = 4, // ENTER: Runs when a player enters the game; both on start of the level, and when un-spectating.
ACS_ST_LAP = 5, // LAP: Runs when a player's lap increases from crossing the finish line. ACS_ST_LAP = 5, // LAP: Runs when a player's lap increases from crossing the finish line.
ACS_ST_RACESTART = 6, // RACESTART: Runs when the RACE starts. ACS_ST_RACESTART = 6, // RACESTART: Runs when the RACE starts.
ACS_ST_OVERTIME = 8, // OVERTIME: Runs when Overtime starts in timed game modes. ACS_ST_OVERTIME = 7, // OVERTIME: Runs when Overtime starts in timed game modes.
ACS_ST_GAMEOVER = 9, // GAMEOVER: Runs when the level ends due to a losing condition and no player has an extra life. ACS_ST_GAMEOVER = 8, // GAMEOVER: Runs when the level ends due to a losing condition and no player has an extra life.
ACS_ST_FINISH = 10, // FINISH: Runs when a player finishes ACS_ST_FINISH = 9, // FINISH: Runs when a player finishes
}; };
// //

View file

@ -449,7 +449,7 @@ boolean AM_Responder(event_t *ev)
{ {
//faB: prevent alt-tab in win32 version to activate automap just before //faB: prevent alt-tab in win32 version to activate automap just before
// minimizing the app; doesn't do any harm to the DOS version // minimizing the app; doesn't do any harm to the DOS version
if (!gamekeydown[KEY_LALT] && !gamekeydown[KEY_RALT]) if (!gamekeydown[0][KEY_LALT] && !gamekeydown[0][KEY_RALT])
{ {
bigstate = 0; //added : 24-01-98 : toggle off large view bigstate = 0; //added : 24-01-98 : toggle off large view
AM_Start(); AM_Start();

View file

@ -10,9 +10,18 @@
#ifndef __B_SOC__ #ifndef __B_SOC__
#define __B_SOC__ #define __B_SOC__
#ifdef __cplusplus
extern "C" {
#endif
#include "../doomstat.h" #include "../doomstat.h"
#include "../deh_soc.h" #include "../deh_soc.h"
boolean B_UseWallTransfer(void); boolean B_UseWallTransfer(void);
boolean B_UseTerrainDef(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif

View file

@ -14,6 +14,12 @@ boolean B_UseWallTransfer(void)
{ {
const mapheader_t *mapheader = mapheaderinfo[gamemap - 1]; const mapheader_t *mapheader = mapheaderinfo[gamemap - 1];
boolean value = false; boolean value = false;
if (mapnamespace == MNS_RINGRACERS)
return true;
if (cv_kartwalltransfer.value)
return true;
if (mapheader->use_walltransfer == true) if (mapheader->use_walltransfer == true)
value = true; value = true;
@ -21,11 +27,23 @@ boolean B_UseWallTransfer(void)
if (mapheader->use_walltransfer == false) if (mapheader->use_walltransfer == false)
value = false; value = false;
return value;
}
// Map header toggle for TerrainDefs.
boolean B_UseTerrainDef(void)
{
const mapheader_t *mapheader = mapheaderinfo[gamemap - 1];
boolean value = false;
if (mapnamespace == MNS_RINGRACERS) if (mapnamespace == MNS_RINGRACERS)
return true;
if (mapheader->use_terrain == true)
value = true; value = true;
if (cv_kartwalltransfer.value) if (mapheader->use_terrain == false)
value = true; value = false;
return value; return value;
} }

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Kart Krew. // Copyright (C) 2024 by Kart Krew.
// Copyright (C) 2020 by Sonic Team Junior. // Copyright (C) 2020 by Sonic Team Junior.

View file

@ -59,7 +59,6 @@ static void COM_Choose_f(void);
static void COM_ChooseWeighted_f(void); static void COM_ChooseWeighted_f(void);
static void CV_EnforceExecVersion(void); static void CV_EnforceExecVersion(void);
static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr);
static boolean CV_Command(void); static boolean CV_Command(void);
consvar_t *CV_FindVar(const char *name); consvar_t *CV_FindVar(const char *name);
@ -75,6 +74,7 @@ static char * COM_Purge (char *text, int *lenp);
CV_PossibleValue_t CV_OnOff[] = {{0, "Off"}, {1, "On"}, {0, NULL}}; CV_PossibleValue_t CV_OnOff[] = {{0, "Off"}, {1, "On"}, {0, NULL}};
CV_PossibleValue_t CV_YesNo[] = {{0, "No"}, {1, "Yes"}, {0, NULL}}; CV_PossibleValue_t CV_YesNo[] = {{0, "No"}, {1, "Yes"}, {0, NULL}};
CV_PossibleValue_t CV_Signed[] = {{-999999999, "MIN"}, {999999999, "MAX"}, {0, NULL}};
CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}}; CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}};
CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}}; CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
@ -1625,7 +1625,19 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
const char *overridestr = valstr; const char *overridestr = valstr;
if (CV_CompleteValue(var, &overridestr, &overrideval)) if (numwadfiles == 0 && var->PossibleValue == Color_cons_t)
{
override = true;
if (!strcmp(valstr, "Blue"))
overrideval = SKINCOLOR_BLUE;
else if (!strcmp(valstr, "Orange"))
overrideval = SKINCOLOR_ORANGE;
else if (!strcmp(valstr, "Red"))
overrideval = SKINCOLOR_RED;
else
I_Error("Sorry, you need to add %s to the list of skincolors in Setvalue", valstr);
}
else if (CV_CompleteValue(var, &overridestr, &overrideval))
{ {
if (overridestr) if (overridestr)
{ {
@ -2265,95 +2277,6 @@ static void CV_EnforceExecVersion(void)
CV_StealthSetValue(&cv_execversion, EXECVERSION); CV_StealthSetValue(&cv_execversion, EXECVERSION);
} }
static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
{
#if 1
// We don't have changed axis defaults yet
(void)v;
(void)valstr;
#else
UINT8 i;
// If ALL axis settings are previous defaults, set them to the new defaults
// EXECVERSION < 26 (2.1.21)
for (i = 0; i < 4; i++)
{
if (joyaxis_default[i])
{
if (!stricmp(v->name, "joyaxis_fire"))
{
if (joyaxis_count[i] > 7) return false;
else if (joyaxis_count[i] == 7) return true;
if (!stricmp(valstr, "None")) joyaxis_count[i]++;
else joyaxis_default[i] = false;
}
// reset all axis settings to defaults
if (joyaxis_count[i] == 7)
{
switch (i)
{
default:
COM_BufInsertText(va("%s \"%s\"\n", cv_turnaxis[0].name, cv_turnaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_moveaxis[0].name, cv_moveaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_brakeaxis[0].name, cv_brakeaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_aimaxis[0].name, cv_aimaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_lookaxis[0].name, cv_lookaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_fireaxis[0].name, cv_fireaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_driftaxis[0].name, cv_driftaxis[0].defaultvalue));
break;
}
joyaxis_count[i]++;
return false;
}
}
}
#endif
// we haven't reached our counts yet, or we're not default
return true;
}
// Block the Xbox DInput default axes and reset to the current defaults
static boolean CV_FilterJoyAxisVars2(consvar_t *v, const char *valstr)
{
if (!stricmp(v->name, "joyaxis_turn") && !stricmp(valstr, "X-Axis"))
return false;
if (!stricmp(v->name, "joyaxis2_turn") && !stricmp(valstr, "X-Axis"))
return false;
if (!stricmp(v->name, "joyaxis3_turn") && !stricmp(valstr, "X-Axis"))
return false;
if (!stricmp(v->name, "joyaxis4_turn") && !stricmp(valstr, "X-Axis"))
return false;
if (!stricmp(v->name, "joyaxis_aim") && !stricmp(valstr, "Y-Axis"))
return false;
if (!stricmp(v->name, "joyaxis2_aim") && !stricmp(valstr, "Y-Axis"))
return false;
if (!stricmp(v->name, "joyaxis3_aim") && !stricmp(valstr, "Y-Axis"))
return false;
if (!stricmp(v->name, "joyaxis4_aim") && !stricmp(valstr, "Y-Axis"))
return false;
if (!stricmp(v->name, "joyaxis_fire") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis2_fire") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis3_fire") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis4_fire") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis_drift") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis2_drift") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis3_drift") && !stricmp(valstr, "None"))
return false;
if (!stricmp(v->name, "joyaxis4_drift") && !stricmp(valstr, "None"))
return false;
return true;
}
static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
{ {
// True means allow the CV change, False means block it // True means allow the CV change, False means block it
@ -2363,29 +2286,8 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
if (!(v->flags & CV_SAVE)) if (!(v->flags & CV_SAVE))
return true; return true;
if (GETMAJOREXECVERSION(cv_execversion.value) < 2) // 2 = 1.0.2 // nothing to see here...
{ (void)valstr;
#if 0
// We don't have changed saved cvars yet
if (!stricmp(v->name, "alwaysmlook")
|| !stricmp(v->name, "alwaysmlook2")
|| !stricmp(v->name, "mousemove")
|| !stricmp(v->name, "mousemove2"))
return false;
#endif
// axis defaults were changed to be friendly to 360 controllers
// if ALL axis settings are defaults, then change them to new values
if (!CV_FilterJoyAxisVars(v, valstr))
return false;
}
if (GETMAJOREXECVERSION(cv_execversion.value) < 10) // 10 = 1.6
{
// axis defaults changed again to SDL game controllers
if (!CV_FilterJoyAxisVars2(v, valstr))
return false;
}
return true; return true;
} }

View file

@ -170,6 +170,7 @@ struct consvar_t //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NULL
extern CV_PossibleValue_t CV_OnOff[]; extern CV_PossibleValue_t CV_OnOff[];
extern CV_PossibleValue_t CV_YesNo[]; extern CV_PossibleValue_t CV_YesNo[];
extern CV_PossibleValue_t CV_Signed[];
extern CV_PossibleValue_t CV_Unsigned[]; extern CV_PossibleValue_t CV_Unsigned[];
extern CV_PossibleValue_t CV_Natural[]; extern CV_PossibleValue_t CV_Natural[];

View file

@ -9,23 +9,6 @@
* variables, so you can insert them here too. * variables, so you can insert them here too.
*/ */
/* Manually defined asset hashes
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
* Last updated 2020 / 08 / 30 - Kart v1.3 - patch.kart
* updated 2025 - BlanKart Indev -
*/
#define ASSET_HASH_MAIN_PK3 "daf9a1a67b5e465c13789e96a09f7171"
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034"
#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80"
#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964"
#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98"
#define ASSET_HASH_FOLLOWERS_PK3 "00000000000000000000000000000000"
#ifdef USE_PATCH_FILE
#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000"
#endif
#ifdef CMAKECONFIG #ifdef CMAKECONFIG
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"

View file

@ -153,7 +153,7 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, {
{15,"Periwinkle"}, {16,"Blue"}, {17,"Purple"}, {15,"Periwinkle"}, {16,"Blue"}, {17,"Purple"},
{18,"Lavender"}, {18,"Lavender"},
{0, NULL}}; {0, NULL}};
consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Black", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change); consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Black", CV_CALL|CV_NOINIT|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change);
static CV_PossibleValue_t menuhighlight_cons_t[] = static CV_PossibleValue_t menuhighlight_cons_t[] =
{ {
@ -254,7 +254,7 @@ static void CONS_Bind_f(void)
CONS_Printf("\x82%s", M_GetText("Bind table :\n")); CONS_Printf("\x82%s", M_GetText("Bind table :\n"));
na = 0; na = 0;
for (key = 0; key < NUMINPUTS; key++) for (key = 0; key < NUMINPUTS; key++)
if (!menuactive && bindtable[key]) if (!menustack[0] && bindtable[key])
{ {
CONS_Printf("%s : \"%s\"\n", G_KeynumToString(key), bindtable[key]); CONS_Printf("%s : \"%s\"\n", G_KeynumToString(key), bindtable[key]);
na = 1; na = 1;
@ -461,38 +461,38 @@ void CON_Init(void)
con_destlines = vid.height; con_destlines = vid.height;
con_curlines = vid.height; con_curlines = vid.height;
Unlock_state();
if (!dedicated) if (!dedicated)
{ {
Lock_state();
con_started = true; con_started = true;
con_startup = true; con_startup = true;
consoletoggle = false; consoletoggle = false;
Unlock_state();
CV_RegisterVar(&cons_msgtimeout);
CV_RegisterVar(&cons_hudlines);
CV_RegisterVar(&cons_speed);
CV_RegisterVar(&cons_height);
CV_RegisterVar(&cons_backpic);
CV_RegisterVar(&cons_backcolor);
CV_RegisterVar(&cons_menuhighlight);
COM_AddCommand("bind", CONS_Bind_f);
} }
else else
{ {
Lock_state();
con_started = true; con_started = true;
con_startup = false; con_startup = false;
consoletoggle = true; consoletoggle = true;
Unlock_state();
} }
Unlock_state();
} }
void CON_Register(void)
{
if (dedicated)
return;
CV_RegisterVar(&cons_msgtimeout);
CV_RegisterVar(&cons_hudlines);
CV_RegisterVar(&cons_speed);
CV_RegisterVar(&cons_height);
CV_RegisterVar(&cons_backpic);
CV_RegisterVar(&cons_backcolor);
CV_RegisterVar(&cons_menuhighlight);
COM_AddCommand("bind", CONS_Bind_f);
}
// Console input initialization // Console input initialization
// //
static void CON_InputInit(void) static void CON_InputInit(void)
@ -940,7 +940,7 @@ boolean CON_Responder(event_t *ev)
// let go keyup events, don't eat them // let go keyup events, don't eat them
if (ev->type != ev_keydown && ev->type != ev_console) if (ev->type != ev_keydown && ev->type != ev_console)
{ {
if (ev->data1 == gamecontrol[0][gc_console][0] || ev->data1 == gamecontrol[0][gc_console][1]) if (G_ControlBoundToKey(0, gc_console, ev->data1, false))
consdown = false; consdown = false;
return false; return false;
} }
@ -953,12 +953,12 @@ boolean CON_Responder(event_t *ev)
if (modeattacking || metalrecording || marathonmode) if (modeattacking || metalrecording || marathonmode)
return false; return false;
if (ev->data1 >= KEY_MOUSE1) // See also: HUD_Responder if (ev->data1 >= NUMKEYS) // See also: HUD_Responder
{ {
INT32 i; INT32 i;
for (i = 0; i < num_gamecontrols; i++) for (i = 0; i < num_gamecontrols; i++)
{ {
if (gamecontrol[0][i][0] == ev->data1 || gamecontrol[0][i][1] == ev->data1) if (G_ControlBoundToKey(0, i, ev->data1, false))
break; break;
} }
@ -966,7 +966,7 @@ boolean CON_Responder(event_t *ev)
return false; return false;
} }
if (key == gamecontrol[0][gc_console][0] || key == gamecontrol[0][gc_console][1]) if (G_ControlBoundToKey(0, gc_console, key, false))
{ {
if (consdown) // ignore repeat if (consdown) // ignore repeat
return true; return true;
@ -978,7 +978,7 @@ boolean CON_Responder(event_t *ev)
// check other keys only if console prompt is active // check other keys only if console prompt is active
if (!consoleready && key < NUMINPUTS) // metzgermeister: boundary check!! if (!consoleready && key < NUMINPUTS) // metzgermeister: boundary check!!
{ {
if (! menuactive && bindtable[key]) if (!menustack[0] && bindtable[key])
{ {
COM_BufAddText(bindtable[key]); COM_BufAddText(bindtable[key]);
COM_BufAddText("\n"); COM_BufAddText("\n");

View file

@ -22,6 +22,7 @@ extern "C" {
#endif #endif
void CON_Init(void); void CON_Init(void);
void CON_Register(void);
boolean CON_Responder(event_t *ev); boolean CON_Responder(event_t *ev);

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard // Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew // Copyright (C) 2024 by Kart Krew

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard // Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew // Copyright (C) 2024 by Kart Krew

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard // Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew // Copyright (C) 2024 by Kart Krew

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard // Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew // Copyright (C) 2024 by Kart Krew

View file

@ -1,4 +1,4 @@
// DR. ROBOTNIK'S RING RACERS // BLANKART
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard // Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew // Copyright (C) 2024 by Kart Krew

View file

@ -58,6 +58,8 @@
#include "doomstat.h" #include "doomstat.h"
#include "s_sound.h" // sfx_syfail #include "s_sound.h" // sfx_syfail
#include "r_fps.h" #include "r_fps.h"
#include "m_cond.h" // netUnlocked
#include "g_party.h"
// cl loading screen // cl loading screen
#include "v_video.h" #include "v_video.h"
@ -467,6 +469,11 @@ void D_ResetTiccmds(void)
D_Clearticcmd(textcmds[i]->tic); D_Clearticcmd(textcmds[i]->tic);
} }
ticcmd_t *D_LocalTiccmd(UINT8 ss)
{
return &localcmds[ss][0];
}
void SendKick(UINT8 playernum, UINT8 msg) void SendKick(UINT8 playernum, UINT8 msg)
{ {
UINT8 buf[2]; UINT8 buf[2];
@ -575,7 +582,7 @@ static inline void CL_DrawConnectionStatus(void)
INT32 ccstime = I_GetTime(); INT32 ccstime = I_GetTime();
// Draw background fade // Draw background fade
if (!menuactive) // menu already draws its own fade if (!menustack[0]) // menu already draws its own fade
V_DrawFadeScreen(0xFF00, 16); // force default V_DrawFadeScreen(0xFF00, 16); // force default
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_LOADFILES && cl_mode != CL_CHECKFILES if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_LOADFILES && cl_mode != CL_CHECKFILES
@ -1505,7 +1512,7 @@ static void M_ConfirmConnect(event_t *ev)
{ {
if (ev->type == ev_keydown) if (ev->type == ev_keydown)
{ {
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[0][gc_accelerate][0] || ev->data1 == gamecontrol[0][gc_accelerate][1]) if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || (ev->device != 0 && G_ControlBoundToKey(0, gc_accelerate, ev->data1, true)))
{ {
if (totalfilesrequestednum > 0) if (totalfilesrequestednum > 0)
{ {
@ -1532,7 +1539,7 @@ static void M_ConfirmConnect(event_t *ev)
M_ClearMenus(true); M_ClearMenus(true);
} }
else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE|| ev->data1 == gamecontrol[0][gc_brake][0] || ev->data1 == gamecontrol[0][gc_brake][1]) else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE || (ev->device != 0 && G_ControlBoundToKey(0, gc_brake, ev->data1, true)))
{ {
cl_mode = CL_ABORTED; cl_mode = CL_ABORTED;
M_ClearMenus(true); M_ClearMenus(true);
@ -1588,7 +1595,7 @@ static boolean CL_FinishedFileList(void)
"You may load server addons (if any), and wait for a slot.\n" "You may load server addons (if any), and wait for a slot.\n"
"\n" "\n"
"Press ACCEL to continue or BRAKE to cancel.\n\n" "Press ACCEL to continue or BRAKE to cancel.\n\n"
), FUNCPTRCAST (M_ConfirmConnect), MM_EVENTHANDLER); ), M_ConfirmConnect, MM_EVENTHANDLER);
cl_mode = CL_CONFIRMCONNECT; cl_mode = CL_CONFIRMCONNECT;
} }
else else
@ -1649,13 +1656,13 @@ static boolean CL_FinishedFileList(void)
"You may download, load server addons, and wait for a slot.\n" "You may download, load server addons, and wait for a slot.\n"
"\n" "\n"
"Press ACCEL to continue or BRAKE to cancel.\n\n" "Press ACCEL to continue or BRAKE to cancel.\n\n"
), downloadsize), FUNCPTRCAST(M_ConfirmConnect), MM_EVENTHANDLER); ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER);
else else
M_StartMessage(va(M_GetText( M_StartMessage(va(M_GetText(
"Download of %s additional content is required to join.\n" "Download of %s additional content is required to join.\n"
"\n" "\n"
"Press ACCEL to continue or BRAKE to cancel.\n\n" "Press ACCEL to continue or BRAKE to cancel.\n\n"
), downloadsize), FUNCPTRCAST(M_ConfirmConnect), MM_EVENTHANDLER); ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER);
Z_Free(downloadsize); Z_Free(downloadsize);
cl_mode = CL_CONFIRMCONNECT; cl_mode = CL_CONFIRMCONNECT;
@ -1942,18 +1949,29 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
renderdeltatics = FRACUNIT; renderdeltatics = FRACUNIT;
rendertimefrac = FRACUNIT; rendertimefrac = FRACUNIT;
memset(deviceResponding, false, sizeof (deviceResponding));
if (cl_mode == CL_CONFIRMCONNECT) if (cl_mode == CL_CONFIRMCONNECT)
{ {
D_ProcessEvents(); //needed for menu system to receive inputs D_ProcessEvents(); //needed for menu system to receive inputs
} }
else if (netgame) else if (netgame)
{ {
event_t *ev;
INT32 key;
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1)) for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
G_MapEventsToControls(&events[eventtail]); {
ev = &events[eventtail];
if (ev->type == ev_joystick && G_GetDevicePlayer(ev->device) == 0 && !G_AxisInDeadzone(0, ev))
key = G_AxisToKey(ev);
else if (ev->type == ev_keydown)
key = ev->data1;
else
continue;
if (gamekeydown[KEY_ESCAPE] if (key == KEY_ESCAPE || G_ControlBoundToKey(0, gc_brake, key, true))
|| gamekeydown[KEY_JOY1+1]) cl_mode = CL_ABORTED;
cl_mode = CL_ABORTED; }
} }
if (cl_mode == CL_ABORTED) if (cl_mode == CL_ABORTED)
@ -2555,16 +2573,7 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
LUA_HookPlayerQuit(&players[playernum], reason); // Lua hook for player quitting LUA_HookPlayerQuit(&players[playernum], reason); // Lua hook for player quitting
// don't look through someone's view who isn't there G_LeaveParty(playernum);
if (playernum == displayplayers[0] && !demo.playback)
{
// Call ViewpointSwitch hooks here.
// The viewpoint was forcibly changed.
LUA_HookViewpointSwitch(&players[consoleplayer], &players[consoleplayer], true);
displayplayers[0] = consoleplayer;
}
G_RemovePartyMember(playernum);
// Reset player data // Reset player data
CL_ClearPlayer(playernum); CL_ClearPlayer(playernum);
@ -2583,6 +2592,9 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
LUA_InvalidatePlayer(&players[playernum]); LUA_InvalidatePlayer(&players[playernum]);
// don't look through someone's view who isn't there
G_ResetViews();
K_CheckBumpers(); K_CheckBumpers();
P_CheckRacers(); P_CheckRacers();
@ -3425,9 +3437,9 @@ void SV_ResetServer(void)
Schedule_Clear(); Schedule_Clear();
Automate_Clear(); Automate_Clear();
K_ClearClientPowerLevels(); K_ClearClientPowerLevels();
G_ObliterateParties();
memset(splitscreen_invitations, -1, sizeof splitscreen_invitations); memset(splitscreen_invitations, -1, sizeof splitscreen_invitations);
memset(splitscreen_partied, 0, sizeof splitscreen_partied);
memset(player_name_changes, 0, sizeof player_name_changes); memset(player_name_changes, 0, sizeof player_name_changes);
mynode = 0; mynode = 0;
@ -3514,6 +3526,7 @@ void D_QuitNetGame(void)
Schedule_Clear(); Schedule_Clear();
Automate_Clear(); Automate_Clear();
K_ClearClientPowerLevels(); K_ClearClientPowerLevels();
G_ObliterateParties();
DEBFILE("===========================================================================\n" DEBFILE("===========================================================================\n"
" Log finish\n" " Log finish\n"
@ -3592,7 +3605,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
displayplayers[i] = newplayernum; displayplayers[i] = newplayernum;
g_localplayers[i] = newplayernum; g_localplayers[i] = newplayernum;
} }
splitscreen_partied[newplayernum] = true;
DEBFILE("spawning me\n"); DEBFILE("spawning me\n");
} }
@ -3605,12 +3617,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
players[newplayernum].splitscreenindex = splitscreenplayer; players[newplayernum].splitscreenindex = splitscreenplayer;
players[newplayernum].bot = false; players[newplayernum].bot = false;
playerconsole[newplayernum] = console;
splitscreen_original_party_size[console] =
++splitscreen_party_size[console];
splitscreen_original_party[console][splitscreenplayer] =
splitscreen_party[console][splitscreenplayer] = newplayernum;
if (netgame) if (netgame)
{ {
char joinmsg[256]; char joinmsg[256];
@ -4902,8 +4908,8 @@ static void HandlePacketFromPlayer(SINT8 node)
txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots txtpak = (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots
* netbuffer->u.serverpak.numtics]; * netbuffer->u.serverpak.numtics];
if (realend > gametic + CLIENTBACKUPTICS) if (realend > gametic + BACKUPTICS)
realend = gametic + CLIENTBACKUPTICS; realend = gametic + BACKUPTICS;
cl_packetmissed = realstart > neededtic; cl_packetmissed = realstart > neededtic;
if (realstart <= neededtic && realend > neededtic) if (realstart <= neededtic && realend > neededtic)
@ -5349,10 +5355,10 @@ static void SV_SendTics(void)
{ {
// assert supposedtics[n]>=nettics[n] // assert supposedtics[n]>=nettics[n]
realfirsttic = supposedtics[n]; realfirsttic = supposedtics[n];
lasttictosend = maketic;
lasttictosend = nettics[n] + CLIENTBACKUPTICS; if (lasttictosend - nettics[n] >= BACKUPTICS)
if (lasttictosend > maketic) lasttictosend = nettics[n] + BACKUPTICS-1;
lasttictosend = maketic;
if (realfirsttic >= lasttictosend) if (realfirsttic >= lasttictosend)
{ {
@ -5590,14 +5596,6 @@ boolean TryRunTics(tic_t realtics)
if (ticking) if (ticking)
{ {
if (advancedemo)
{
if (timedemo_quit)
COM_ImmedExecute("quit");
else
D_StartTitle();
}
else
{ {
boolean tickInterp = true; boolean tickInterp = true;

View file

@ -43,7 +43,6 @@ applications may follow different packet versions.
// Networking and tick handling related. // Networking and tick handling related.
#define BACKUPTICS 512 // more than enough for most timeouts.... #define BACKUPTICS 512 // more than enough for most timeouts....
#define CLIENTBACKUPTICS 32
#define MAXTEXTCMD 512 #define MAXTEXTCMD 512
// No. of tics your controls can be delayed by. // No. of tics your controls can be delayed by.
@ -513,6 +512,7 @@ extern UINT8 playerconsole[MAXPLAYERS];
INT32 D_NumPlayers(void); INT32 D_NumPlayers(void);
boolean D_IsPlayerHumanAndGaming(INT32 player_number); boolean D_IsPlayerHumanAndGaming(INT32 player_number);
void D_ResetTiccmds(void); void D_ResetTiccmds(void);
ticcmd_t *D_LocalTiccmd(UINT8 ss);
tic_t GetLag(INT32 node); tic_t GetLag(INT32 node);
UINT8 GetFreeXCmdSize(UINT8 playerid); UINT8 GetFreeXCmdSize(UINT8 playerid);

View file

@ -29,9 +29,6 @@ typedef enum
ev_console, ev_console,
ev_mouse, ev_mouse,
ev_joystick, ev_joystick,
ev_joystick2,
ev_joystick3,
ev_joystick4,
} evtype_t; } evtype_t;
// Event structure. // Event structure.

View file

@ -80,6 +80,17 @@
#include <tracy/tracy/Tracy.hpp> #include <tracy/tracy/Tracy.hpp>
// Put hashes here to get them out of header hell.
#define ASSET_HASH_MAIN_PK3 "88203c9fa8e85e61913af275450adfdf"
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034"
#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80"
#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964"
#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98"
#ifdef USE_PATCH_FILE
#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000"
#endif
#ifdef CMAKECONFIG #ifdef CMAKECONFIG
#include "config.h" #include "config.h"
#else #else
@ -120,7 +131,6 @@ boolean devparm = false; // started game with -devparm
boolean singletics = false; // timedemo boolean singletics = false; // timedemo
boolean lastdraw = false; boolean lastdraw = false;
postimg_t postimgtype[MAXSPLITSCREENPLAYERS];
INT32 postimgparam[MAXSPLITSCREENPLAYERS]; INT32 postimgparam[MAXSPLITSCREENPLAYERS];
// These variables are in effect // These variables are in effect
@ -130,7 +140,6 @@ INT32 postimgparam[MAXSPLITSCREENPLAYERS];
boolean sound_disabled = false; boolean sound_disabled = false;
boolean digital_disabled = false; boolean digital_disabled = false;
boolean advancedemo;
#ifdef DEBUGFILE #ifdef DEBUGFILE
INT32 debugload = 0; INT32 debugload = 0;
#endif #endif
@ -187,6 +196,11 @@ void D_ProcessEvents(void)
boolean eaten; boolean eaten;
// i have to reset this somewhere or else your camera just glides away!
for (size_t i = 0; i < 4; i++)
gamekeydown[0][KEY_MOUSEMOVE + i] = 0;
memset(deviceResponding, false, sizeof (deviceResponding));
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1)) for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
{ {
ev = &events[eventtail]; ev = &events[eventtail];
@ -247,6 +261,120 @@ void D_ProcessEvents(void)
} }
} }
static void D_RenderLevel(void)
{
UINT8 i;
R_ApplyLevelInterpolators(R_UsingFrameInterpolation() ? rendertimefrac : FRACUNIT);
viewwindowy = 0;
viewwindowx = 0;
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
objectsdrawn = 0;
ps_rendercalltime = I_GetPreciseTime();
if (rendermode == render_soft)
{
if (cv_homremoval.value)
{
if (cv_homremoval.value == 1)
{
// Clear the software screen buffer to remove HOM
memset(screens[0], 31, vid.width * vid.height * vid.bpp);
}
else
{
//'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
memset(screens[0], 32+(timeinmap&15), vid.width * vid.height * vid.bpp);
}
}
if (r_splitscreen == 2) // Draw over the fourth screen so you don't have to stare at a HOM :V
{
// V_DrawPatchFill, but for the fourth screen only
patch_t *pat = static_cast<patch_t*>(W_CachePatchName("SRB2BACK", PU_CACHE));
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
for (x = vid.width>>1; x < vid.width; x += pw)
{
for (y = vid.height>>1; y < vid.height; y += ph)
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
}
}
}
for (i = 0; i <= r_splitscreen; i++)
{
if (players[displayplayers[i]].mo || players[displayplayers[i]].playerstate == PST_DEAD)
{
viewssnum = i;
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_RenderPlayerView();
else
#endif
if (rendermode != render_none)
{
if (i > 0) // Splitscreen-specific
{
switch (i)
{
case 1:
if (r_splitscreen > 1)
{
viewwindowx = viewwidth;
viewwindowy = 0;
}
else
{
viewwindowx = 0;
viewwindowy = viewheight;
}
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
break;
case 2:
viewwindowx = 0;
viewwindowy = viewheight;
M_Memcpy(ylookup, ylookup3, viewheight*sizeof (ylookup[0]));
break;
case 3:
viewwindowx = viewwidth;
viewwindowy = viewheight;
M_Memcpy(ylookup, ylookup4, viewheight*sizeof (ylookup[0]));
default:
break;
}
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
}
R_RenderPlayerView();
if (i > 0)
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
}
}
}
if (rendermode == render_soft)
{
for (i = 0; i <= r_splitscreen; i++)
{
R_ApplyViewMorph(i);
V_DoPostProcessor(i, postimgparam[i]);
}
}
ps_rendercalltime = I_GetPreciseTime() - ps_rendercalltime;
R_RestoreLevelInterpolators();
}
// //
// D_Display // D_Display
// draw current display, possibly wiping it from the previous // draw current display, possibly wiping it from the previous
@ -370,6 +498,18 @@ static bool D_Display(void)
// Catch runaway clipping rectangles. // Catch runaway clipping rectangles.
V_ClearClipRect(); V_ClearClipRect();
// intermission background
if (lastdraw)
{
if (rendermode == render_soft && !automapactive && !dedicated && cv_renderview.value)
{
D_RenderLevel();
Y_ConsiderScreenBuffer();
usebuffer = true;
}
lastdraw = false;
}
// do buffered drawing // do buffered drawing
switch (gamestate) switch (gamestate)
{ {
@ -465,128 +605,7 @@ static bool D_Display(void)
if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction && curbghide && (!hidetitlemap))) if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction && curbghide && (!hidetitlemap)))
{ {
if (!automapactive && !dedicated && cv_renderview.value) if (!automapactive && !dedicated && cv_renderview.value)
{ D_RenderLevel();
R_ApplyLevelInterpolators(R_UsingFrameInterpolation() ? rendertimefrac : FRACUNIT);
viewwindowy = 0;
viewwindowx = 0;
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
objectsdrawn = 0;
ps_rendercalltime = I_GetPreciseTime();
if (rendermode == render_soft)
{
if (cv_homremoval.value)
{
if (cv_homremoval.value == 1)
{
// Clear the software screen buffer to remove HOM
memset(screens[0], 31, vid.width * vid.height * vid.bpp);
}
else
{
//'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
memset(screens[0], 32+(timeinmap&15), vid.width * vid.height * vid.bpp);
}
}
if (r_splitscreen == 2) // Draw over the fourth screen so you don't have to stare at a HOM :V
{
// V_DrawPatchFill, but for the fourth screen only
patch_t *pat = static_cast<patch_t*>(W_CachePatchName("SRB2BACK", PU_CACHE));
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
for (x = vid.width>>1; x < vid.width; x += pw)
{
for (y = vid.height>>1; y < vid.height; y += ph)
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
}
}
}
for (i = 0; i <= r_splitscreen; i++)
{
if (players[displayplayers[i]].mo || players[displayplayers[i]].playerstate == PST_DEAD)
{
viewssnum = i;
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_RenderPlayerView();
else
#endif
if (rendermode != render_none)
{
if (i > 0) // Splitscreen-specific
{
switch (i)
{
case 1:
if (r_splitscreen > 1)
{
viewwindowx = viewwidth;
viewwindowy = 0;
}
else
{
viewwindowx = 0;
viewwindowy = viewheight;
}
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
break;
case 2:
viewwindowx = 0;
viewwindowy = viewheight;
M_Memcpy(ylookup, ylookup3, viewheight*sizeof (ylookup[0]));
break;
case 3:
viewwindowx = viewwidth;
viewwindowy = viewheight;
M_Memcpy(ylookup, ylookup4, viewheight*sizeof (ylookup[0]));
default:
break;
}
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
}
R_RenderPlayerView();
if (i > 0)
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
}
}
}
if (rendermode == render_soft)
{
for (i = 0; i <= r_splitscreen; i++)
{
R_ApplyViewMorph(i);
if (postimgtype[i])
V_DoPostProcessor(i, postimgtype[i], postimgparam[i]);
}
}
ps_rendercalltime = I_GetPreciseTime() - ps_rendercalltime;
R_RestoreLevelInterpolators();
}
if (lastdraw)
{
if (rendermode == render_soft)
{
VID_BlitLinearScreen(screens[0], screens[1], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
Y_ConsiderScreenBuffer();
usebuffer = true;
}
lastdraw = false;
}
ps_uitime = I_GetPreciseTime(); ps_uitime = I_GetPreciseTime();
@ -888,11 +907,14 @@ void D_SRB2Loop(void)
{ {
rendertimefrac = FRACUNIT; rendertimefrac = FRACUNIT;
} }
rendertimefrac_unpaused = g_time.timefrac;
} }
else else
{ {
renderdeltatics = realtics * FRACUNIT; renderdeltatics = realtics * FRACUNIT;
rendertimefrac = FRACUNIT; rendertimefrac = FRACUNIT;
rendertimefrac_unpaused = FRACUNIT;
} }
if ((interp || doDisplay) && !frameskip) if ((interp || doDisplay) && !frameskip)
@ -967,15 +989,6 @@ void D_SRB2Loop(void)
} }
} }
//
// D_AdvanceDemo
// Called after each demo or intro demosequence finishes
//
void D_AdvanceDemo(void)
{
advancedemo = true;
}
// ========================================================================= // =========================================================================
// D_SRB2Main // D_SRB2Main
// ========================================================================= // =========================================================================
@ -1048,30 +1061,19 @@ void D_StartTitle(void)
//demosequence = -1; //demosequence = -1;
G_SetGametype(GT_RACE); // SRB2kart G_SetGametype(GT_RACE); // SRB2kart
paused = false; paused = false;
advancedemo = false;
F_InitMenuPresValues(); F_InitMenuPresValues();
// clear cmd building stuff // clear cmd building stuff
memset(gamekeydown, 0, NUMKEYS); memset(gamekeydown, 0, sizeof(gamekeydown));
memset(deviceResponding, false, sizeof (deviceResponding));
F_StartTitleScreen(); F_StartTitleScreen();
currentMenu = &MainDef; // reset the current menu ID
// Reset the palette // Reset the palette
if (rendermode != render_none) if (rendermode != render_none)
V_SetPaletteLump("PLAYPAL"); V_SetPaletteLump("PLAYPAL");
// The title screen is obviously not a tutorial! (Unless I'm mistaken) // The title screen is obviously not a tutorial! (Unless I'm mistaken)
/*
if (tutorialmode && tutorialgcs)
{
G_CopyControls(gamecontrol[0], gamecontroldefault[0][gcs_custom], gcl_full, num_gcl_full); // using gcs_custom as temp storage
M_StartMessage("Do you want to \x82save the recommended \x82movement controls?\x80\n\nPress 'Y' or 'Enter' to confirm\nPress 'N' or any key to keep \nyour current controls",
M_TutorialSaveControlResponse, MM_YESNO);
}
*/
tutorialmode = false; tutorialmode = false;
} }
@ -1146,7 +1148,7 @@ static void ChangeDirForUrlHandler(void)
static boolean AddIWAD(void) static boolean AddIWAD(void)
{ {
char * path = va(pandf,srb2path,"srb2.srb"); char * path = va(pandf,srb2path, SRB2NAME);
if (FIL_ReadFileOK(path)) if (FIL_ReadFileOK(path))
{ {
@ -1184,7 +1186,7 @@ static void IdentifyVersion(void)
// Load the IWAD // Load the IWAD
if (! AddIWAD()) if (! AddIWAD())
{ {
I_Error("srb2.srb not found! Expected in %s\n", srb2waddir); I_Error("%s not found! Expected in %s\n", SRB2NAME, srb2waddir);
} }
// will be overwritten in case of -cdrom or unix/win home // will be overwritten in case of -cdrom or unix/win home
@ -1194,33 +1196,15 @@ static void IdentifyVersion(void)
// if you change the ordering of this or add/remove a file, be sure to update the md5 // if you change the ordering of this or add/remove a file, be sure to update the md5
// checking in D_SRB2Main // checking in D_SRB2Main
#define MAINNAME "main.pk3"
#define TEXTURESNAME "textures.kart"
#define MAPSNAME "maps.kart"
#define PATCHNAME "patch.pk3"
#define MUSICNAME "music.kart"
#define FOLLOWERSNAME "followers.pk3"
#define CHARSNAME "chars.kart"
#define GRAPHICSNAME "gfx.kart"
#define SOUNDSNAME "sounds.kart"
D_AddFile(startupiwads, va(pandf,srb2waddir,GRAPHICSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,GRAPHICSNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,TEXTURESNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,TEXTURESNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,CHARSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,CHARSNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,MAPSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,MAPSNAME));
D_AddFile(startupiwads, va(pandf,srb2waddir,MAINNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,MAINNAME));
//D_AddFile(startupiwads, va(pandf,srb2waddir,FOLLOWERSNAME));
#ifdef USE_PATCH_FILE #ifdef USE_PATCH_FILE
D_AddFile(startupiwads, va(pandf,srb2waddir,PATCHNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,PATCHNAME));
#endif #endif
//// ////
#undef MAINNAME
#undef TEXTURESNAME
#undef MAPSNAME
#undef PATCHNAME
#undef FOLLOWERSNAME
#undef CHARSNAME
#undef GRAPHICSNAME
#if !defined (HAVE_SDL) || defined (HAVE_MIXER) #if !defined (HAVE_SDL) || defined (HAVE_MIXER)
@ -1237,10 +1221,7 @@ static void IdentifyVersion(void)
MUSICTEST(SOUNDSNAME) MUSICTEST(SOUNDSNAME)
MUSICTEST(MUSICNAME) MUSICTEST(MUSICNAME)
#undef MUSICNAME
#undef MUSICTEST #undef MUSICTEST
#undef SOUNDSNAME
#endif #endif
} }
@ -1475,48 +1456,56 @@ void D_SRB2Main(void)
// Have to be done here before files are loaded // Have to be done here before files are loaded
M_InitCharacterTables(); M_InitCharacterTables();
D_RegisterServerCommands();
D_RegisterClientCommands(); // be sure that this is called before D_CheckNetGame
R_RegisterEngineStuff();
S_RegisterSoundStuff();
CON_Register();
M_Init();
if (!dedicated)
{
CV_RegisterVar(&cv_ticrate);
CV_RegisterVar(&cv_constextsize);
}
I_RegisterSysCommands();
#ifdef HWRENDER
// Lactozilla: Add every hardware mode CVAR and CCMD.
// Has to be done before the configuration file loads,
// ~~but after the OpenGL library loads.~~ G: no lol
HWR_AddCommands();
#endif
// load wad, including the main wad file // load wad, including the main wad file
CONS_Printf("W_InitMultipleFiles(): Adding IWAD and main PWADs.\n"); CONS_Printf("W_InitMultipleFiles(): Adding IWAD and main PWADs.\n");
W_InitMultipleFiles(startupiwads, false); W_InitMultipleFiles(startupiwads, false);
D_CleanFile(startupiwads); D_CleanFile(startupiwads);
mainwads = 0;
#ifndef DEVELOP #ifndef DEVELOP
// Check MD5s of autoloaded files // Check MD5s of autoloaded files
// Note: Do not add any files that ignore MD5! // Note: Do not add any files that ignore MD5!
W_VerifyFileMD5(mainwads, ASSET_HASH_SRB2_SRB); // srb2.srb W_VerifyFileMD5(MAINWAD_SRB2, ASSET_HASH_SRB2_SRB);
wadfiles[mainwads]->compatmode = true; W_VerifyFileMD5(MAINWAD_GFX, ASSET_HASH_GFX_KART);
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_KART); // gfx.kart W_VerifyFileMD5(MAINWAD_TEXTURES, ASSET_HASH_TEXTURES_KART);
wadfiles[mainwads]->compatmode = true; W_VerifyFileMD5(MAINWAD_CHARS, ASSET_HASH_CHARS_KART);
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_KART); // textures.kart W_VerifyFileMD5(MAINWAD_MAPS, ASSET_HASH_MAPS_KART);
wadfiles[mainwads]->compatmode = true; W_VerifyFileMD5(MAINWAD_MAIN, ASSET_HASH_MAIN_PK3);
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_KART); // chars.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); // maps.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAIN_PK3); // main.pk3
//mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3
#ifdef USE_PATCH_FILE #ifdef USE_PATCH_FILE
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3 W_VerifyFileMD5(MAINWAD_PATCH, ASSET_HASH_PATCH_PK3);
#endif #endif
#else
mainwads++; // gfx.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; // textures.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; // chars.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; // maps.kart
wadfiles[mainwads]->compatmode = true;
mainwads++; // main.pk3
//mainwads++; // followers.pk3
#ifdef USE_PATCH_FILE
mainwads++; // patch.pk3
#endif
#endif //ifndef DEVELOP #endif //ifndef DEVELOP
wadfiles[MAINWAD_SRB2]->compatmode = true;
wadfiles[MAINWAD_GFX]->compatmode = true;
wadfiles[MAINWAD_TEXTURES]->compatmode = true;
wadfiles[MAINWAD_CHARS]->compatmode = true;
wadfiles[MAINWAD_MAPS]->compatmode = true;
wadfiles[MAINWAD_MAIN]->compatmode = false;
#ifdef USE_PATCH_FILE
wadfiles[MAINWAD_PATCH]->compatmode = false;
#endif
R_InitPaletteRemap(); R_InitPaletteRemap();
// now do it again for the SOC colors in main.pk3! // now do it again for the SOC colors in main.pk3!
@ -1538,13 +1527,6 @@ void D_SRB2Main(void)
CONS_Printf("I_StartupGraphics()...\n"); CONS_Printf("I_StartupGraphics()...\n");
I_StartupGraphics(); I_StartupGraphics();
#ifdef HWRENDER
// Lactozilla: Add every hardware mode CVAR and CCMD.
// Has to be done before the configuration file loads,
// but after the OpenGL library loads.
HWR_AddCommands();
#endif
//--------------------------------------------------------- CONSOLE //--------------------------------------------------------- CONSOLE
// setup loading screen // setup loading screen
SCR_Startup(); SCR_Startup();
@ -1564,15 +1546,11 @@ void D_SRB2Main(void)
timelimits[GT_BATTLE] = 2; timelimits[GT_BATTLE] = 2;
D_RegisterServerCommands();
D_RegisterClientCommands(); // be sure that this is called before D_CheckNetGame
R_RegisterEngineStuff();
S_RegisterSoundStuff();
I_RegisterSysCommands();
CON_SetLoadingProgress(LOADED_HUINIT); CON_SetLoadingProgress(LOADED_HUINIT);
if (modifiedgame)
I_Error("modifiedgame set during startup!");
CONS_Printf("W_InitMultipleFiles(): Adding external PWADs.\n"); CONS_Printf("W_InitMultipleFiles(): Adding external PWADs.\n");
// HACK: Refer to https://git.do.srb2.org/KartKrew/RingRacers/-/merge_requests/29#note_61574 // HACK: Refer to https://git.do.srb2.org/KartKrew/RingRacers/-/merge_requests/29#note_61574
@ -1597,8 +1575,6 @@ void D_SRB2Main(void)
//--------------------------------------------------------- CONFIG.CFG //--------------------------------------------------------- CONFIG.CFG
M_FirstLoadConfig(); // WARNING : this do a "COM_BufExecute()" M_FirstLoadConfig(); // WARNING : this do a "COM_BufExecute()"
M_Init();
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) #if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen
#endif #endif

View file

@ -20,9 +20,31 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern boolean advancedemo;
// Store file nameres here for future reference else where.
#define MAINNAME "main.pk3"
#define SRB2NAME "srb2.srb"
#define TEXTURESNAME "textures.kart"
#define MAPSNAME "maps.kart"
#define PATCHNAME "patch.pk3"
#define MUSICNAME "music.kart"
#define CHARSNAME "chars.kart"
#define GRAPHICSNAME "gfx.kart"
#define SOUNDSNAME "sounds.kart"
typedef enum
{
MAINWAD_SRB2,
MAINWAD_GFX,
MAINWAD_TEXTURES,
MAINWAD_CHARS,
MAINWAD_MAPS,
MAINWAD_MAIN,
#ifdef USE_PATCH_FILE
MAINWAD_PATCH,
#endif
NUMMAINWADS
} mainwad_t;
// make sure not to write back the config until it's been correctly loaded // make sure not to write back the config until it's been correctly loaded
extern tic_t rendergametic; extern tic_t rendergametic;
@ -39,7 +61,6 @@ void D_SRB2Loop(void) FUNCNORETURN;
// D_SRB2Main() // D_SRB2Main()
// Not a globally visible function, just included for source reference, // Not a globally visible function, just included for source reference,
// calls all startup code, parses command line options. // calls all startup code, parses command line options.
// If not overrided by user input, calls D_AdvanceDemo.
// //
void D_SRB2Main(void); void D_SRB2Main(void);
@ -56,7 +77,6 @@ const char *D_Home(void);
// //
// BASE LEVEL // BASE LEVEL
// //
void D_AdvanceDemo(void);
void D_StartTitle(void); void D_StartTitle(void);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -337,7 +337,7 @@ static boolean Processackpak(void)
node->remotefirstack = netbuffer->ackreturn; node->remotefirstack = netbuffer->ackreturn;
// Search the ackbuffer and free it // Search the ackbuffer and free it
for (i = 0; i < MAXACKPACKETS; i++) for (i = 0; i < MAXACKPACKETS; i++)
if (ackpak[i].acknum && ackpak[i].destinationnode == node - nodes if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode
&& cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0) && cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0)
{ {
RemoveAck(i); RemoveAck(i);
@ -1201,26 +1201,32 @@ static void Internal_FreeNodenum(INT32 nodenum)
(void)nodenum; (void)nodenum;
} }
static char *I_NetSplitAddress(char *host, char **port)
{
boolean v4 = (host[0] != '[');
host = strtok(host, v4 ? ":" : "[]");
if (port)
*port = strtok(NULL, ":");
return host;
}
SINT8 I_NetMakeNode(const char *hostname) SINT8 I_NetMakeNode(const char *hostname)
{ {
SINT8 newnode = -1; SINT8 newnode = -1;
if (I_NetMakeNodewPort) if (I_NetMakeNodewPort)
{ {
char *localhostname = strdup(hostname); char *localhostname = strdup(hostname);
char *t = localhostname; char *port;
const char *port;
if (!localhostname) if (!localhostname)
return newnode; return newnode;
// retrieve portnum from address! // retrieve portnum from address!
strtok(localhostname, ":"); hostname = I_NetSplitAddress(localhostname, &port);
port = strtok(NULL, ":");
// remove the port in the hostname as we've it already newnode = I_NetMakeNodewPort(hostname, port);
while ((*t != ':') && (*t != '\0'))
t++;
*t = '\0';
newnode = I_NetMakeNodewPort(localhostname, port);
free(localhostname); free(localhostname);
} }
return newnode; return newnode;

View file

@ -64,6 +64,7 @@
#include "doomstat.h" #include "doomstat.h"
#include "deh_tables.h" #include "deh_tables.h"
#include "m_perfstats.h" #include "m_perfstats.h"
#include "g_party.h"
#define CV_RESTRICT CV_NETVAR #define CV_RESTRICT CV_NETVAR
@ -150,6 +151,11 @@ static void KartEncore_OnChange(void);
static void KartComeback_OnChange(void); static void KartComeback_OnChange(void);
static void KartEliminateLast_OnChange(void); static void KartEliminateLast_OnChange(void);
static void KartRings_OnChange(void); static void KartRings_OnChange(void);
static void KartPurpleDrift_OnChange(void);
static void KartStacking_OnChange(void);
static void KartChaining_OnChange(void);
static void KartSlipdash_OnChange(void);
static void KartItemBreaker_OnChange(void);
static void Schedule_OnChange(void); static void Schedule_OnChange(void);
@ -177,7 +183,11 @@ static void Command_ListWADS_f(void);
static void Command_ListDoomednums_f(void); static void Command_ListDoomednums_f(void);
static void Command_RunSOC(void); static void Command_RunSOC(void);
static void Command_Pause(void); static void Command_Pause(void);
static void Command_Respawn(void); static void Command_Respawn(void);
static void Command_Respawn2(void);
static void Command_Respawn3(void);
static void Command_Respawn4(void);
static void Command_Version_f(void); static void Command_Version_f(void);
#ifdef UPDATE_ALERT #ifdef UPDATE_ALERT
@ -244,7 +254,7 @@ static CV_PossibleValue_t joyport_cons_t[] = {{1, "/dev/js0"}, {2, "/dev/js1"},
{4, "/dev/js3"}, {0, NULL}}; {4, "/dev/js3"}, {0, NULL}};
#else #else
// accept whatever value - it is in fact the joystick device number // accept whatever value - it is in fact the joystick device number
#define usejoystick_cons_t NULL static CV_PossibleValue_t usejoystick_cons_t[] = {{0, "MIN"}, {MAXGAMEPADS, "MAX"}, {0, NULL}};
#endif #endif
static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2, "Points"}, {0, NULL}}; static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2, "Points"}, {0, NULL}};
@ -255,8 +265,6 @@ static CV_PossibleValue_t sleeping_cons_t[] = {{0, "MIN"}, {1000/TICRATE, "MAX"}
static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}}; static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}};
consvar_t cv_showinputjoy = CVAR_INIT ("showinputjoy", "Off", 0, CV_OnOff, NULL);
static consvar_t cv_dummyconsvar = CVAR_INIT ("dummyconsvar", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, DummyConsvar_OnChange); static consvar_t cv_dummyconsvar = CVAR_INIT ("dummyconsvar", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, DummyConsvar_OnChange);
consvar_t cv_restrictskinchange = CVAR_INIT ("restrictskinchange", "No", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); consvar_t cv_restrictskinchange = CVAR_INIT ("restrictskinchange", "No", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL);
@ -329,8 +337,8 @@ consvar_t cv_usemouse = CVAR_INIT ("use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_
consvar_t cv_laglesscam = CVAR_INIT ("laglesscamera", "Off", CV_SAVE,CV_OnOff, NULL); consvar_t cv_laglesscam = CVAR_INIT ("laglesscamera", "Off", CV_SAVE,CV_OnOff, NULL);
consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS] = { consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS] = {
CVAR_INIT ("use_gamepad", "1", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick1), CVAR_INIT ("use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick1),
CVAR_INIT ("use_gamepad2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick2), CVAR_INIT ("use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick2),
CVAR_INIT ("use_joystick3", "3", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick3), CVAR_INIT ("use_joystick3", "3", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick3),
CVAR_INIT ("use_joystick4", "4", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick4) CVAR_INIT ("use_joystick4", "4", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick4)
}; };
@ -361,7 +369,6 @@ consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = { //Alam: Dummy for save
#endif #endif
// SRB2kart // SRB2kart
consvar_t cv_superring = CVAR_INIT ("superring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_sneaker = CVAR_INIT ("sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_sneaker = CVAR_INIT ("sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_rocketsneaker = CVAR_INIT ("rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_rocketsneaker = CVAR_INIT ("rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_invincibility = CVAR_INIT ("invincibility", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_invincibility = CVAR_INIT ("invincibility", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
@ -370,18 +377,19 @@ consvar_t cv_eggmanmonitor = CVAR_INIT ("eggmanmonitor", "On", CV_NETVAR|CV_C
consvar_t cv_orbinaut = CVAR_INIT ("orbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_orbinaut = CVAR_INIT ("orbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_jawz = CVAR_INIT ("jawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_jawz = CVAR_INIT ("jawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_mine = CVAR_INIT ("mine", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_mine = CVAR_INIT ("mine", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_landmine = CVAR_INIT ("landmine", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_droptarget = CVAR_INIT ("droptarget", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_ballhog = CVAR_INIT ("ballhog", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_ballhog = CVAR_INIT ("ballhog", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_selfpropelledbomb = CVAR_INIT ("selfpropelledbomb", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_selfpropelledbomb = CVAR_INIT ("selfpropelledbomb", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_grow = CVAR_INIT ("grow", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_grow = CVAR_INIT ("grow", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_shrink = CVAR_INIT ("shrink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_shrink = CVAR_INIT ("shrink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_thundershield = CVAR_INIT ("thundershield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_thundershield = CVAR_INIT ("thundershield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_bubbleshield = CVAR_INIT ("bubbleshield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_flameshield = CVAR_INIT ("flameshield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_hyudoro = CVAR_INIT ("hyudoro", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_hyudoro = CVAR_INIT ("hyudoro", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_pogospring = CVAR_INIT ("pogospring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_pogospring = CVAR_INIT ("pogospring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_kitchensink = CVAR_INIT ("kitchensink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_kitchensink = CVAR_INIT ("kitchensink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_superring = CVAR_INIT ("superring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_landmine = CVAR_INIT ("landmine", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_bubbleshield = CVAR_INIT ("bubbleshield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_flameshield = CVAR_INIT ("flameshield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_droptarget = CVAR_INIT ("droptarget", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_dualsneaker = CVAR_INIT ("dualsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_dualsneaker = CVAR_INIT ("dualsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_triplesneaker = CVAR_INIT ("triplesneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_triplesneaker = CVAR_INIT ("triplesneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
@ -431,21 +439,70 @@ static CV_PossibleValue_t kartbot_cons_t[] = {
{0, NULL} {0, NULL}
}; };
consvar_t cv_kartbot = CVAR_INIT ("kartbot", "0", CV_NETVAR, kartbot_cons_t, NULL); consvar_t cv_kartbot = CVAR_INIT ("kartbot", "0", CV_NETVAR, kartbot_cons_t, NULL);
consvar_t cv_kartbot_modifiermax = CVAR_INIT ("kartbot_modifiermax", "1.0", CV_NETVAR|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_karteliminatelast = CVAR_INIT ("karteliminatelast", "Yes", CV_NETVAR|CV_CHEAT|CV_CALL, CV_YesNo, KartEliminateLast_OnChange); consvar_t cv_karteliminatelast = CVAR_INIT ("karteliminatelast", "Yes", CV_NETVAR|CV_CALL, CV_YesNo, KartEliminateLast_OnChange);
// Toggles for new features // Toggles for new features
consvar_t cv_kartrings = CVAR_INIT ("kartrings", "No", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_YesNo, KartRings_OnChange); consvar_t cv_kartrings = CVAR_INIT ("kartrings", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartRings_OnChange);
// Stacking related
consvar_t cv_kartstacking = CVAR_INIT ("kartstacking", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartStacking_OnChange);
consvar_t cv_kartstacking_calc_arg_offset = CVAR_INIT ("kartstacking_calcargoffset", "0.32", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_maxvanillaboost = CVAR_INIT ("kartstacking_maxvanillaboost", "0.375", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_speedboostdropoff = CVAR_INIT ("kartstacking_speedboostdropoff", "0.01", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_speedboostdropoff_brake = CVAR_INIT ("kartstacking_speedboostdropoff_brake", "0.05", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
// V recreates neptunes old ass misread of stacking code lmao
consvar_t cv_kartstacking_accelstack = CVAR_INIT ("kartstacking_accelstack", "Off", CV_NETVAR, CV_OnOff, NULL);
// Vanilla Stacking boosts.
consvar_t cv_kartstacking_sneaker_easyspeedboost = CVAR_INIT ("vanillaboost_sneaker_easyspeedboost", "0.8317", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_sneaker_normalspeedboost = CVAR_INIT ("vanillaboost_sneaker_normalspeedboost", "0.5", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_sneaker_hardspeedboost = CVAR_INIT ("vanillaboost_sneaker_hardspeedboost", "0.2756", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_sneaker_accelboost = CVAR_INIT ("vanillaboost_sneaker_accelboost", "8.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_sneaker_maxgrade = CVAR_INIT ("vanillaboost_sneaker_maxgrade", "3", CV_NETVAR|CV_CHEAT, CV_Natural, NULL);
consvar_t cv_kartstacking_sneaker_stackable = CVAR_INIT ("vanillaboost_sneaker_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_invincibility_speedboost = CVAR_INIT ("vanillaboost_invincibility_speedboost", "0.375", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_invincibility_accelboost = CVAR_INIT ("vanillaboost_invincibility_accelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_invincibility_stackable = CVAR_INIT ("vanillaboost_invincibility_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_grow_speedboost = CVAR_INIT ("vanillaboost_grow_speedboost", "0.2", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_grow_accelboost = CVAR_INIT ("vanillaboost_grow_accelboost", "0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_grow_stackable = CVAR_INIT ("vanillaboost_grow_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_flame_speedval = CVAR_INIT ("vanillaboost_flame_speedval", "0.80", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_flame_accelboost = CVAR_INIT ("vanillaboost_flame_accelboost", "3.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_flame_stackable = CVAR_INIT ("vanillaboost_flame_stackable", "Off", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_start_speedboost = CVAR_INIT ("vanillaboost_start_speedboost", "0.25", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_start_accelboost = CVAR_INIT ("vanillaboost_start_accelboost", "6.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_start_stackable = CVAR_INIT ("vanillaboost_start_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_drift_speedboost = CVAR_INIT ("vanillaboost_drift_speedboost", "0.25", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_drift_accelboost = CVAR_INIT ("vanillaboost_drift_accelboost", "4.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_drift_stackable = CVAR_INIT ("vanillaboost_drift_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartstacking_ring_speedboost = CVAR_INIT ("vanillaboost_ring_speedboost", "0.2", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_ring_accelboost = CVAR_INIT ("vanillaboost_ring_accelboost", "4.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
consvar_t cv_kartstacking_ring_stackable = CVAR_INIT ("vanillaboost_ring_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
consvar_t cv_kartchaining = CVAR_INIT ("kartchaining", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartChaining_OnChange);
consvar_t cv_kartchainingoffroad = CVAR_INIT ("kartchaining_chainoffroad", "No", CV_NETVAR, CV_YesNo, NULL);
consvar_t cv_kartitembreaker = CVAR_INIT ("kartitembreaker", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartItemBreaker_OnChange);
consvar_t cv_kartwalltransfer = CVAR_INIT ("BG_forcewalltransfer", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_kartwalltransfer = CVAR_INIT ("BG_forcewalltransfer", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL);
consvar_t cv_kartusepwrlv = CVAR_INIT ("kartusepwrlv", "Yes", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); consvar_t cv_kartusepwrlv = CVAR_INIT ("kartusepwrlv", "Yes", CV_NETVAR, CV_YesNo, NULL);
consvar_t cv_kartpurpledrift = CVAR_INIT ("kartpurpledrift", "No", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); consvar_t cv_kartpurpledrift = CVAR_INIT ("kartpurpledrift", "No", CV_NETVAR, CV_YesNo, KartPurpleDrift_OnChange);
consvar_t cv_kartbumpspark = CVAR_INIT ("kartbumpspark", "No", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); consvar_t cv_kartbumpspark = CVAR_INIT ("kartbumpspark", "No", CV_NETVAR, CV_YesNo, NULL);
consvar_t cv_kartbumpspring = CVAR_INIT ("kartbumpspring", "No", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); consvar_t cv_kartbumpspring = CVAR_INIT ("kartbumpspring", "No", CV_NETVAR, CV_YesNo, NULL);
consvar_t cv_kartslipdash = CVAR_INIT ("kartslipdash", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartSlipdash_OnChange);
static CV_PossibleValue_t kartdebugitem_cons_t[] = static CV_PossibleValue_t kartdebugitem_cons_t[] =
{ {
@ -491,6 +548,7 @@ consvar_t cv_autobalance = CVAR_INIT ("autobalance", "Off", CV_SAVE|CV_NETVAR|CV
consvar_t cv_teamscramble = CVAR_INIT ("teamscramble", "Off", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT, teamscramble_cons_t, TeamScramble_OnChange); consvar_t cv_teamscramble = CVAR_INIT ("teamscramble", "Off", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT, teamscramble_cons_t, TeamScramble_OnChange);
consvar_t cv_scrambleonchange = CVAR_INIT ("scrambleonchange", "Off", CV_SAVE|CV_NETVAR, teamscramble_cons_t, NULL); consvar_t cv_scrambleonchange = CVAR_INIT ("scrambleonchange", "Off", CV_SAVE|CV_NETVAR, teamscramble_cons_t, NULL);
consvar_t cv_friendlyfire = CVAR_INIT ("friendlyfire", "Off", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL);
consvar_t cv_itemfinder = CVAR_INIT ("itemfinder", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, ItemFinder_OnChange); consvar_t cv_itemfinder = CVAR_INIT ("itemfinder", "Off", CV_CALL|CV_NOSHOWHELP, CV_OnOff, ItemFinder_OnChange);
// Scoring type options // Scoring type options
@ -738,7 +796,11 @@ void D_RegisterServerCommands(void)
COM_AddCommand("runsoc", Command_RunSOC); COM_AddCommand("runsoc", Command_RunSOC);
COM_AddCommand("pause", Command_Pause); COM_AddCommand("pause", Command_Pause);
COM_AddCommand("respawn", Command_Respawn); COM_AddCommand("respawn", Command_Respawn);
COM_AddCommand("respawn2", Command_Respawn2);
COM_AddCommand("respawn3", Command_Respawn3);
COM_AddCommand("respawn4", Command_Respawn4);
COM_AddCommand("gametype", Command_ShowGametype_f); COM_AddCommand("gametype", Command_ShowGametype_f);
COM_AddCommand("version", Command_Version_f); COM_AddCommand("version", Command_Version_f);
@ -777,6 +839,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_itemrespawn); CV_RegisterVar(&cv_itemrespawn);
// misc // misc
CV_RegisterVar(&cv_friendlyfire);
CV_RegisterVar(&cv_pointlimit); CV_RegisterVar(&cv_pointlimit);
CV_RegisterVar(&cv_numlaps); CV_RegisterVar(&cv_numlaps);
@ -998,7 +1061,6 @@ void D_RegisterClientCommands(void)
// HUD // HUD
CV_RegisterVar(&cv_itemfinder); CV_RegisterVar(&cv_itemfinder);
CV_RegisterVar(&cv_showinputjoy);
// time attack ghost options are also saved to config // time attack ghost options are also saved to config
CV_RegisterVar(&cv_ghost_besttime); CV_RegisterVar(&cv_ghost_besttime);
@ -1057,16 +1119,7 @@ void D_RegisterClientCommands(void)
{ {
CV_RegisterVar(&cv_kickstartaccel[i]); CV_RegisterVar(&cv_kickstartaccel[i]);
CV_RegisterVar(&cv_shrinkme[i]); CV_RegisterVar(&cv_shrinkme[i]);
CV_RegisterVar(&cv_turnaxis[i]);
CV_RegisterVar(&cv_moveaxis[i]);
CV_RegisterVar(&cv_brakeaxis[i]);
CV_RegisterVar(&cv_aimaxis[i]);
CV_RegisterVar(&cv_lookaxis[i]);
CV_RegisterVar(&cv_fireaxis[i]);
CV_RegisterVar(&cv_driftaxis[i]);
CV_RegisterVar(&cv_lookbackaxis[i]);
CV_RegisterVar(&cv_deadzone[i]); CV_RegisterVar(&cv_deadzone[i]);
CV_RegisterVar(&cv_digitaldeadzone[i]);
} }
// filesrch.c // filesrch.c
@ -1501,14 +1554,12 @@ static void ForceAllSkins(INT32 forcedskin)
} }
static const char * static const char *
VaguePartyDescription (int playernum, int *party_sizes, int default_color) VaguePartyDescription (int playernum, int size, int default_color)
{ {
static char party_description static char party_description
[1 + MAXPLAYERNAME + 1 + sizeof " and x others"]; [1 + MAXPLAYERNAME + 1 + sizeof " and x others"];
const char *name; const char *name;
int size;
name = player_names[playernum]; name = player_names[playernum];
size = party_sizes[playernum];
/* /*
less than check for the dumb compiler because I KNOW it'll less than check for the dumb compiler because I KNOW it'll
complain about "writing x bytes into an area of y bytes"!!! complain about "writing x bytes into an area of y bytes"!!!
@ -1923,7 +1974,7 @@ static void Got_PartyInvite(UINT8 **cp,INT32 playernum)
HU_AddChatText(va( HU_AddChatText(va(
"\x82*You have been invited to join %s.", "\x82*You have been invited to join %s.",
VaguePartyDescription( VaguePartyDescription(
playernum, splitscreen_party_size, '\x82') playernum, G_PartySize(playernum), '\x82')
), true); ), true);
} }
} }
@ -1932,8 +1983,6 @@ static void Got_PartyInvite(UINT8 **cp,INT32 playernum)
static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum) static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum)
{ {
int invitation; int invitation;
int old_party_size;
int views;
(void)cp; (void)cp;
@ -1949,12 +1998,12 @@ static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum)
if (invitation >= 0) if (invitation >= 0)
{ {
if (splitscreen_partied[invitation]) if (G_IsPartyLocal(invitation))
{ {
HU_AddChatText(va( HU_AddChatText(va(
"\x82*%s joined your party!", "\x82*%s joined your party!",
VaguePartyDescription( VaguePartyDescription(
playernum, splitscreen_original_party_size, '\x82') playernum, G_LocalSplitscreenPartySize(playernum), '\x82')
), true); ), true);
} }
else if (playernum == consoleplayer) else if (playernum == consoleplayer)
@ -1962,18 +2011,11 @@ static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum)
HU_AddChatText(va( HU_AddChatText(va(
"\x82*You joined %s's party!", "\x82*You joined %s's party!",
VaguePartyDescription( VaguePartyDescription(
invitation, splitscreen_party_size, '\x82') invitation, G_PartySize(invitation), '\x82')
), true); ), true);
} }
old_party_size = splitscreen_party_size[invitation]; G_JoinParty(invitation, playernum);
views = splitscreen_original_party_size[playernum];
if (( old_party_size + views ) <= MAXSPLITSCREENPLAYERS)
{
G_RemovePartyMember(playernum);
G_AddPartyMember(invitation, playernum);
}
splitscreen_invitations[playernum] = -1; splitscreen_invitations[playernum] = -1;
} }
@ -2031,21 +2073,16 @@ static void Got_LeaveParty(UINT8 **cp,INT32 playernum)
splitscreen_invitations[playernum] = -1; splitscreen_invitations[playernum] = -1;
if (splitscreen_party_size[playernum] > if (G_IsPartyLocal(playernum) && playernum != consoleplayer)
splitscreen_original_party_size[playernum])
{ {
if (splitscreen_partied[playernum] && playernum != consoleplayer) HU_AddChatText(va(
{ "\x85*%s left your party.",
HU_AddChatText(va( VaguePartyDescription(
"\x85*%s left your party.", playernum, G_LocalSplitscreenPartySize(playernum), '\x85')
VaguePartyDescription( ), true);
playernum, splitscreen_original_party_size, '\x85')
), true);
}
G_RemovePartyMember(playernum);
G_ResetSplitscreen(playernum);
} }
G_LeaveParty(playernum);
} }
void D_SendPlayerConfig(UINT8 n) void D_SendPlayerConfig(UINT8 n)
@ -2093,6 +2130,12 @@ void D_Cheat(INT32 playernum, INT32 cheat, ...)
switch (cheat) switch (cheat)
{ {
case CHEAT_SAVECHECKPOINT:
COPY(WRITEFIXED, fixed_t); // x
COPY(WRITEFIXED, fixed_t); // y
COPY(WRITEFIXED, fixed_t); // z
break;
case CHEAT_RINGS: case CHEAT_RINGS:
case CHEAT_LIVES: case CHEAT_LIVES:
// If you're confused why 'int' instead of // If you're confused why 'int' instead of
@ -2108,6 +2151,12 @@ void D_Cheat(INT32 playernum, INT32 cheat, ...)
COPY(WRITEINT32, INT32); COPY(WRITEINT32, INT32);
break; break;
case CHEAT_RELATIVE_TELEPORT:
COPY(WRITEFIXED, fixed_t);
COPY(WRITEFIXED, fixed_t);
COPY(WRITEFIXED, fixed_t);
break;
case CHEAT_DEVMODE: case CHEAT_DEVMODE:
COPY(WRITEUINT32, UINT32); COPY(WRITEUINT32, UINT32);
break; break;
@ -2219,7 +2268,7 @@ static void Command_View_f(void)
return; return;
} }
if (demo.freecam) if (camera[viewnum-1].freecam)
return; return;
displayplayerp = &displayplayers[viewnum-1]; displayplayerp = &displayplayers[viewnum-1];
@ -2293,13 +2342,6 @@ static void Command_SetViews_f(void)
UINT8 splits; UINT8 splits;
UINT8 newsplits; UINT8 newsplits;
if (!( demo.playback && multiplayer ))
{
CONS_Alert(CONS_NOTICE,
"You must be viewing a multiplayer replay to use this.\n");
return;
}
if (COM_Argc() != 2) if (COM_Argc() != 2)
{ {
CONS_Printf("setviews <views>: set the number of split screens\n"); CONS_Printf("setviews <views>: set the number of split screens\n");
@ -2310,12 +2352,33 @@ static void Command_SetViews_f(void)
newsplits = atoi(COM_Argv(1)); newsplits = atoi(COM_Argv(1));
newsplits = min(max(newsplits, 1), 4); newsplits = min(max(newsplits, 1), 4);
if (newsplits > splits)
if (newsplits > splits && demo.playback && multiplayer)
{
G_AdjustView(newsplits, 0, true); G_AdjustView(newsplits, 0, true);
}
else else
{ {
r_splitscreen = newsplits-1; // Even if the splits go beyond the real number of
R_ExecuteSetViewSize(); // splitscreen players, displayplayers was filled
// with duplicates of P1 (see Got_AddPlayer).
if (demo.playback)
{
G_SyncDemoParty(consoleplayer, newsplits-1);
}
else
{
r_splitscreen = newsplits-1;
R_ExecuteSetViewSize();
}
// If promoting (outside of replays), make sure the
// camera is in the correct position.
UINT8 i;
for (i = splits + 1; i <= newsplits; ++i)
{
G_FixCamera(i);
}
} }
} }
@ -2332,7 +2395,7 @@ Command_Invite_f (void)
return; return;
} }
if (r_splitscreen >= MAXSPLITSCREENPLAYERS) if (G_PartySize(consoleplayer) >= MAXSPLITSCREENPLAYERS)
{ {
CONS_Alert(CONS_WARNING, "Your party is full!\n"); CONS_Alert(CONS_WARNING, "Your party is full!\n");
return; return;
@ -2351,9 +2414,9 @@ Command_Invite_f (void)
return; return;
} }
if (invitee == consoleplayer) if (G_IsPartyLocal(invitee))
{ {
CONS_Alert(CONS_WARNING, "You cannot invite yourself! Bruh!\n"); CONS_Alert(CONS_WARNING, "That player is already a member of your party.\n");
return; return;
} }
@ -2361,20 +2424,21 @@ Command_Invite_f (void)
{ {
CONS_Alert(CONS_WARNING, CONS_Alert(CONS_WARNING,
"That player has already been invited to join another party.\n"); "That player has already been invited to join another party.\n");
return;
} }
if (( splitscreen_party_size[consoleplayer] + if ((G_PartySize(consoleplayer) + G_LocalSplitscreenPartySize(invitee)) > MAXSPLITSCREENPLAYERS)
splitscreen_original_party_size[invitee] ) > MAXSPLITSCREENPLAYERS)
{ {
CONS_Alert(CONS_WARNING, CONS_Alert(CONS_WARNING,
"That player joined with too many " "That player joined with too many "
"splitscreen players for your party.\n"); "splitscreen players for your party.\n");
return;
} }
CONS_Printf( CONS_Printf(
"Inviting %s...\n", "Inviting %s...\n",
VaguePartyDescription( VaguePartyDescription(
invitee, splitscreen_original_party_size, '\x80') invitee, G_LocalSplitscreenPartySize(invitee), '\x80')
); );
buffer[0] = invitee; buffer[0] = invitee;
@ -2412,12 +2476,13 @@ Command_CancelInvite_f (void)
{ {
CONS_Alert(CONS_WARNING, CONS_Alert(CONS_WARNING,
"You have not invited this player!\n"); "You have not invited this player!\n");
return;
} }
CONS_Printf( CONS_Printf(
"Rescinding invite to %s...\n", "Rescinding invite to %s...\n",
VaguePartyDescription( VaguePartyDescription(
invitee, splitscreen_original_party_size, '\x80') invitee, G_LocalSplitscreenPartySize(invitee), '\x80')
); );
buffer[0] = invitee; buffer[0] = invitee;
@ -2457,7 +2522,7 @@ Command_RejectInvite_f (void)
static void static void
Command_LeaveParty_f (void) Command_LeaveParty_f (void)
{ {
if (r_splitscreen > splitscreen) if (G_PartySize(consoleplayer) > G_LocalSplitscreenPartySize(consoleplayer))
{ {
CONS_Printf("\x85Leaving party...\n"); CONS_Printf("\x85Leaving party...\n");
@ -2833,7 +2898,7 @@ static void Command_Map_f(void)
mustmodifygame = !(netgame || multiplayer) && !majormods; mustmodifygame = !(netgame || multiplayer) && !majormods;
if (mustmodifygame && !option_force) if (mustmodifygame)
{ {
/* May want to be more descriptive? */ /* May want to be more descriptive? */
CONS_Printf(M_GetText("Sorry, level change disabled in single player.\n")); CONS_Printf(M_GetText("Sorry, level change disabled in single player.\n"));
@ -3081,10 +3146,6 @@ static void Command_Map_f(void)
return; return;
} }
if (tutorialmode && tutorialgcs)
{
G_CopyControls(gamecontrol[0], gamecontroldefault[0][gcs_custom], gcl_full, num_gcl_full); // using gcs_custom as temp storage
}
tutorialmode = false; // warping takes us out of tutorial mode tutorialmode = false; // warping takes us out of tutorial mode
D_MapChange(newmapnum, newgametype, newencoremode, newresetplayers, 0, false, fromlevelselect); D_MapChange(newmapnum, newgametype, newencoremode, newresetplayers, 0, false, fromlevelselect);
@ -3318,7 +3379,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
if (paused) if (paused)
{ {
if (!menuactive || netgame) if (!menustack[0] || netgame)
S_PauseAudio(); S_PauseAudio();
} }
else else
@ -3329,34 +3390,58 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
} }
// Command for stuck characters in netgames, griefing, etc. // Command for stuck characters in netgames, griefing, etc.
static void Command_Respawn(void) static void HandleRespawnCommand(UINT8 localplayer)
{ {
UINT8 buf[4]; UINT8 buf[4];
UINT8 *cp = buf; UINT8 *cp = buf;
if (!(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING)) if (!(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING))
{ {
CONS_Printf(M_GetText("You must be in a level to use this.\n")); CONS_Printf(M_GetText("You must be in a level to use this.\n"));
return; return;
} }
if (players[consoleplayer].mo && !P_IsObjectOnGround(players[consoleplayer].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore. if (players[g_localplayers[localplayer]].mo && !P_IsObjectOnGround(players[g_localplayers[localplayer]].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore.
{ {
CONS_Printf(M_GetText("You must be on the floor to use this.\n")); CONS_Printf(M_GetText("You must be on the floor to use this.\n"));
return; return;
} }
// todo: this probably isnt necessary anymore with v2 if (players[g_localplayers[localplayer]].mo && (P_PlayerInPain(&players[g_localplayers[localplayer]]) || spbplace == players[g_localplayers[localplayer]].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
{ {
CONS_Printf(M_GetText("Nice try.\n")); CONS_Printf(M_GetText("Nice try.\n"));
return; return;
} }
WRITEINT32(cp, consoleplayer); if (localplayer != 0 && !g_localplayers[localplayer])
SendNetXCmd(XD_RESPAWN, &buf, 4); {
CONS_Printf(M_GetText("There is no player to respawn.\n"));
return;
}
WRITEINT32(cp, g_localplayers[localplayer]);
SendNetXCmdForPlayer(localplayer, XD_RESPAWN, &buf, sizeof(buf));
}
// Command for stuck characters in netgames, griefing, etc.
static void Command_Respawn(void)
{
HandleRespawnCommand(0);
}
static void Command_Respawn2(void)
{
HandleRespawnCommand(1);
}
static void Command_Respawn3(void)
{
HandleRespawnCommand(2);
}
static void Command_Respawn4(void)
{
HandleRespawnCommand(3);
} }
static void Got_Respawn(UINT8 **cp, INT32 playernum) static void Got_Respawn(UINT8 **cp, INT32 playernum)
@ -3378,7 +3463,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
if (!P_IsObjectOnGround(players[respawnplayer].mo)) if (!P_IsObjectOnGround(players[respawnplayer].mo))
return; return;
P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 1,DMG_INSTAKILL); P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 1, DMG_INSTAKILL);
demo_extradata[playernum] |= DXD_RESPAWN; demo_extradata[playernum] |= DXD_RESPAWN;
} }
} }
@ -3676,24 +3761,6 @@ void P_SetPlayerSpectator(INT32 playernum)
players[playernum].pflags &= ~PF_WANTSTOJOIN; players[playernum].pflags &= ~PF_WANTSTOJOIN;
players[playernum].playerstate = PST_REBORN; players[playernum].playerstate = PST_REBORN;
/*if (cv_spectatormusic.value && (players[displayplayers[0]].spectator == true) && !r_splitscreen)
{
if (P_UseContinuousLevelMusic())
{
if (!stricmp(Music_Song("level_nosync"), cv_spectatormusiclump.string))
{
// Do not reset music if it is the same
Music_BatchExempt("level_nosync");
}
Music_Remap("level_nosync", cv_spectatormusiclump.string);
}
else
{
Music_Remap("level", cv_spectatormusiclump.string);
}
}*/
} }
//todo: This and the other teamchange functions are getting too long and messy. Needs cleaning. //todo: This and the other teamchange functions are getting too long and messy. Needs cleaning.
@ -3771,24 +3838,19 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
//Safety first! //Safety first!
// (not respawning spectators here...) // (not respawning spectators here...)
if (!players[playernum].spectator) wasspectator = (players[playernum].spectator == true);
if (!wasspectator)
{ {
if (players[playernum].mo) if (gamestate == GS_LEVEL && players[playernum].mo)
{ {
P_DamageMobj(players[playernum].mo, NULL, NULL, 1, // The following will call P_SetPlayerSpectator if successful
(NetPacket.packet.newteam ? DMG_INSTAKILL : DMG_SPECTATOR)); P_DamageMobj(players[playernum].mo, NULL, NULL, 1, DMG_SPECTATOR);
}
//else
if (!NetPacket.packet.newteam)
{
players[playernum].playerstate = PST_REBORN;
} }
//...but because the above could return early under some contexts, we try again here
P_SetPlayerSpectator(playernum);
} }
else
wasspectator = true;
players[playernum].pflags &= ~PF_WANTSTOJOIN;
//Now that we've done our error checking and killed the player //Now that we've done our error checking and killed the player
//if necessary, put the player on the correct team/status. //if necessary, put the player on the correct team/status.
@ -3838,22 +3900,6 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
else if (NetPacket.packet.newteam == 0 && !wasspectator) else if (NetPacket.packet.newteam == 0 && !wasspectator)
HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false); // "entered the game" text was moved to P_SpectatorJoinGame HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false); // "entered the game" text was moved to P_SpectatorJoinGame
// Reset away view (some code referenced from P_SpectatorJoinGame)
{
UINT8 i = 0;
INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers);
for (i = 0; i < r_splitscreen; i++)
{
if (localplayertable[i] == playernum)
{
LUA_HookViewpointSwitch(players+playernum, players+playernum, true);
displayplayers[i] = playernum;
break;
}
}
}
/*if (G_GametypeHasTeams()) /*if (G_GametypeHasTeams())
{ {
if (NetPacket.packet.newteam) if (NetPacket.packet.newteam)
@ -4749,7 +4795,7 @@ static void Command_ListWADS_f(void)
nameonly(tempname = va("%s", wadfiles[i]->filename)); nameonly(tempname = va("%s", wadfiles[i]->filename));
if (!i) if (!i)
CONS_Printf("\x82 IWAD\x80: %s\n", tempname); CONS_Printf("\x82 IWAD\x80: %s\n", tempname);
else if (i <= mainwads) else if (i < NUMMAINWADS)
CONS_Printf("\x82 * %.2d\x80: %s\n", i, tempname); CONS_Printf("\x82 * %.2d\x80: %s\n", i, tempname);
else if (!wadfiles[i]->important) else if (!wadfiles[i]->important)
CONS_Printf("\x86 %.2d: %s\n", i, tempname); CONS_Printf("\x86 %.2d: %s\n", i, tempname);
@ -4923,11 +4969,6 @@ static void Command_Version_f(void)
else // 16-bit? 128-bit? else // 16-bit? 128-bit?
CONS_Printf("Bits Unknown "); CONS_Printf("Bits Unknown ");
// No ASM?
#ifdef NOASM
CONS_Printf("\x85" "NOASM " "\x80");
#endif
// Debug build // Debug build
#ifdef _DEBUG #ifdef _DEBUG
CONS_Printf("\x85" "DEBUG " "\x80"); CONS_Printf("\x85" "DEBUG " "\x80");
@ -5700,6 +5741,20 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
break; break;
} }
case CHEAT_SAVECHECKPOINT: {
fixed_t x = READFIXED(*cp);
fixed_t y = READFIXED(*cp);
fixed_t z = READFIXED(*cp);
player->starpostx = x>>FRACBITS;
player->starposty = y>>FRACBITS;
player->starpostz = z>>FRACBITS;
CV_CheaterWarning(targetPlayer, va("temporary checkpoint created at %d, %d, %d",
x / FRACUNIT, y / FRACUNIT, z / FRACUNIT));
break;
}
case CHEAT_RINGS: { case CHEAT_RINGS: {
SINT8 rings = READSINT8(*cp); SINT8 rings = READSINT8(*cp);
@ -5763,6 +5818,39 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
break; break;
} }
case CHEAT_RELATIVE_TELEPORT: {
fixed_t x = READFIXED(*cp);
fixed_t y = READFIXED(*cp);
fixed_t z = READFIXED(*cp);
float f[3] = {
FIXED_TO_FLOAT(x),
FIXED_TO_FLOAT(y),
FIXED_TO_FLOAT(z),
};
char t[3][9];
if (!P_MobjWasRemoved(player->mo))
{
P_MapStart();
P_SetOrigin(player->mo,
player->mo->x + x,
player->mo->y + y,
player->mo->z + z);
P_MapEnd();
S_StartSound(player->mo, sfx_mixup);
}
strlcpy(t[0], M_Ftrim(f[0]), sizeof t[0]);
strlcpy(t[1], M_Ftrim(f[1]), sizeof t[1]);
strlcpy(t[2], M_Ftrim(f[2]), sizeof t[2]);
CV_CheaterWarning(targetPlayer, va("relative teleport by %d%s, %d%s, %d%s",
(int)f[0], t[0], (int)f[1], t[1], (int)f[2], t[2]));
break;
}
case CHEAT_DEVMODE: { case CHEAT_DEVMODE: {
UINT32 flags = READUINT32(*cp); UINT32 flags = READUINT32(*cp);
cht_debug = flags; cht_debug = flags;
@ -5775,35 +5863,85 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
} }
} }
static const char *displayplayer_compose_col(int playernum)
{
return va("\x84(%d) \x83%s\x80", playernum, player_names[playernum]);
}
static int displayplayer_col_len(const char *text)
{
int n = strlen(text);
int k = n;
int i;
for (i = 0; i < n; ++i)
{
if (!isprint(text[i]))
k--;
}
return k;
}
static void displayplayer_calc_col(int *col, const char *text)
{
if (text && text[0] != ' ')
{
int n = displayplayer_col_len(text);
if (*col < n)
*col = n;
}
}
static void displayplayer_print_col(int *col, const char *text)
{
if (text)
{
if (*col)
{
int n = *col - displayplayer_col_len(text);
CONS_Printf("%s%*s ", text, n, "");
}
}
else
CONS_Printf("\n");
}
static void displayplayer_iter_table(int table[5], void(*col_cb)(int*,const char*))
{
int i;
col_cb(&table[0], "");
for (i = 0; i < 4; ++i)
col_cb(&table[1 + i], va(" %d", i));
col_cb(NULL, NULL);
col_cb(&table[0], "g_local");
for (i = 0; i <= splitscreen; ++i)
col_cb(&table[1 + i], displayplayer_compose_col(g_localplayers[i]));
col_cb(NULL, NULL);
col_cb(&table[0], "display");
for (i = 0; i <= r_splitscreen; ++i)
col_cb(&table[1 + i], displayplayer_compose_col(displayplayers[i]));
col_cb(NULL, NULL);
col_cb(&table[0], "local party");
for (i = 0; i < G_LocalSplitscreenPartySize(consoleplayer); ++i)
col_cb(&table[1 + i], displayplayer_compose_col(G_LocalSplitscreenPartyMember(consoleplayer, i)));
col_cb(NULL, NULL);
col_cb(&table[0], "final party");
for (i = 0; i < G_PartySize(consoleplayer); ++i)
col_cb(&table[1 + i], displayplayer_compose_col(G_PartyMember(consoleplayer, i)));
col_cb(NULL, NULL);
}
/** Prints the number of displayplayers[0]. /** Prints the number of displayplayers[0].
*
* \todo Possibly remove this; it was useful for debugging at one point.
*/ */
static void Command_Displayplayer_f(void) static void Command_Displayplayer_f(void)
{ {
int playernum; int table[5] = {0};
int i; displayplayer_iter_table(table, displayplayer_calc_col);
for (i = 0; i <= splitscreen; ++i) displayplayer_iter_table(table, displayplayer_print_col);
{
playernum = g_localplayers[i];
CONS_Printf(
"local player %d: \x84(%d) \x83%s\x80\n",
i,
playernum,
player_names[playernum]
);
}
CONS_Printf("\x83----------------------------------------\x80\n");
for (i = 0; i <= r_splitscreen; ++i)
{
playernum = displayplayers[i];
CONS_Printf(
"display player %d: \x84(%d) \x83%s\x80\n",
i,
playernum,
player_names[playernum]
);
}
} }
/** Quits a game and returns to the title screen. /** Quits a game and returns to the title screen.
@ -5813,6 +5951,12 @@ void Command_ExitGame_f(void)
{ {
INT32 i; INT32 i;
if (dedicated)
{
CONS_Printf("This command cannot be used on dedicated server\n");
return;
}
LUA_HookBool(false, HOOK(GameQuit)); LUA_HookBool(false, HOOK(GameQuit));
D_QuitNetGame(); D_QuitNetGame();
@ -6909,16 +7053,170 @@ static void KartRings_OnChange(void)
return; return;
} }
if (cv_kartrings.value) if (!K_RingsActive() && cv_kartrings.value)
{ {
CONS_Printf(M_GetText("Rings will be turned \"On\" Next Round.\n")); CONS_Printf(M_GetText("Rings will be turned \"On\" Next Round.\n"));
} }
else else if (K_RingsActive() && !cv_kartrings.value)
{ {
CONS_Printf(M_GetText("Rings will be turned \"Off\" Next Round.\n")); CONS_Printf(M_GetText("Rings will be turned \"Off\" Next Round.\n"));
} }
} }
static void KartPurpleDrift_OnChange(void)
{
if (K_CanChangeRules() == false)
{
return;
}
if (!K_PurpleDriftActive() && cv_kartpurpledrift.value)
{
if (leveltime < starttime)
{
purpledriftactive = true;
CONS_Printf(M_GetText("4-tier drifting has been turned \"On\".\n"));
}
else
{
CONS_Printf(M_GetText("4-tier drifting will be turned \"On\" Next Round.\n"));
}
}
else if (K_PurpleDriftActive() && !cv_kartpurpledrift.value)
{
if (leveltime < starttime)
{
purpledriftactive = false;
CONS_Printf(M_GetText("4-tier drifting has been turned \"Off\".\n"));
}
else
{
CONS_Printf(M_GetText("4-tier drifting will be turned \"Off\" next round.\n"));
}
}
}
static void KartStacking_OnChange(void)
{
if (K_CanChangeRules() == false)
{
return;
}
if (!K_StackingActive() && cv_kartstacking.value)
{
if (leveltime < starttime)
{
stackingactive = true;
CONS_Printf(M_GetText("Boost Stacking has been turned \"On\".\n"));
}
else
{
CONS_Printf(M_GetText("Boost Stacking will be turned \"On\" next round.\n"));
}
}
else if (K_StackingActive() && !cv_kartstacking.value)
{
if (leveltime < starttime)
{
stackingactive = false;
CONS_Printf(M_GetText("Boost Stacking has been turned \"Off\".\n"));
}
else
{
CONS_Printf(M_GetText("Boost Stacking will be turned \"Off\" next round.\n"));
}
}
}
static void KartChaining_OnChange(void)
{
if (K_CanChangeRules() == false)
{
return;
}
if (!K_ChainingActive() && cv_kartchaining.value)
{
if (leveltime < starttime)
{
chainingactive = true;
CONS_Printf(M_GetText("Boost Chaining has been turned \"On\".\n"));
}
else
{
CONS_Printf(M_GetText("Boost Chaining will be turned \"On\" Next Round.\n"));
}
}
else if (K_ChainingActive() && !cv_kartchaining.value)
{
if (leveltime < starttime)
{
chainingactive = false;
CONS_Printf(M_GetText("Boost Chaining has been turned \"Off\".\n"));
}
else
{
CONS_Printf(M_GetText("Boost Chaining will be turned \"Off\" next round.\n"));
}
}
}
static void KartSlipdash_OnChange(void)
{
if (K_CanChangeRules() == false)
{
return;
}
if (!K_SlipdashActive() && cv_kartslipdash.value)
{
if (leveltime < starttime)
{
slipdashactive = true;
CONS_Printf(M_GetText("Slipdashing has been turned \"On\".\n"));
}
else
{
CONS_Printf(M_GetText("Slipdashing will be turned \"On\" Next Round.\n"));
}
}
else if (K_SlipdashActive() && !cv_kartslipdash.value)
{
if (leveltime < starttime)
{
slipdashactive = false;
CONS_Printf(M_GetText("Slipdashing has been turned \"Off\".\n"));
}
else
{
CONS_Printf(M_GetText("Slipdashing will be turned \"Off\" next round.\n"));
}
}
}
static void KartItemBreaker_OnChange(void)
{
if (K_CanChangeRules() == false)
{
return;
}
if (!multiplayer)
{
return;
}
if (!itembreaker && cv_kartitembreaker.value)
{
CONS_Printf(M_GetText("Singleplayer Item Breaker will be turned \"On\" Next Round.\n"));
}
else if (itembreaker && !cv_kartitembreaker.value)
{
CONS_Printf(M_GetText("Singleplayer Item Breaker will be turned \"Off\" Next Round.\n"));
}
}
static void Schedule_OnChange(void) static void Schedule_OnChange(void)
{ {
size_t i; size_t i;

View file

@ -71,14 +71,37 @@ extern consvar_t cv_spectatorreentry, cv_antigrief;
#endif #endif
// SRB2kart items // SRB2kart items
extern consvar_t cv_superring, cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana; extern consvar_t
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine, cv_landmine, cv_droptarget; cv_sneaker,
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink; cv_rocketsneaker,
extern consvar_t cv_thundershield, cv_bubbleshield, cv_flameshield; cv_invincibility,
extern consvar_t cv_hyudoro, cv_pogospring, cv_kitchensink; cv_banana,
cv_eggmanmonitor,
cv_orbinaut,
cv_jawz,
cv_mine,
cv_ballhog,
cv_selfpropelledbomb,
cv_grow,
cv_shrink,
cv_thundershield,
cv_hyudoro,
cv_pogospring,
cv_kitchensink,
cv_superring,
cv_landmine,
cv_bubbleshield,
cv_flameshield,
cv_droptarget;
extern consvar_t cv_dualsneaker, cv_triplesneaker, cv_triplebanana, cv_decabanana; extern consvar_t
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz; cv_dualsneaker,
cv_triplesneaker,
cv_triplebanana,
cv_decabanana,
cv_tripleorbinaut,
cv_quadorbinaut,
cv_dualjawz;
extern consvar_t cv_kartminimap; extern consvar_t cv_kartminimap;
extern consvar_t cv_kartcheck; extern consvar_t cv_kartcheck;
@ -93,14 +116,58 @@ extern consvar_t cv_kartgametypepreference;
extern consvar_t cv_kartspeedometer; extern consvar_t cv_kartspeedometer;
extern consvar_t cv_kartvoices; extern consvar_t cv_kartvoices;
extern consvar_t cv_kartbot; extern consvar_t cv_kartbot;
extern consvar_t cv_kartbot_modifiermax;
extern consvar_t cv_karteliminatelast; extern consvar_t cv_karteliminatelast;
extern consvar_t cv_kartusepwrlv; extern consvar_t cv_kartusepwrlv;
extern consvar_t cv_kartrings; extern consvar_t cv_kartrings;
extern consvar_t cv_kartstacking;
extern consvar_t cv_kartstacking_calc_arg_offset;
extern consvar_t cv_kartstacking_maxvanillaboost;
extern consvar_t cv_kartstacking_speedboostdropoff;
extern consvar_t cv_kartstacking_speedboostdropoff_brake;
extern consvar_t cv_kartstacking_accelstack;
extern consvar_t cv_kartstacking_sneaker_easyspeedboost;
extern consvar_t cv_kartstacking_sneaker_normalspeedboost;
extern consvar_t cv_kartstacking_sneaker_hardspeedboost;
extern consvar_t cv_kartstacking_sneaker_accelboost;
extern consvar_t cv_kartstacking_sneaker_maxgrade;
extern consvar_t cv_kartstacking_sneaker_stackable;
extern consvar_t cv_kartstacking_invincibility_speedboost;
extern consvar_t cv_kartstacking_invincibility_accelboost;
extern consvar_t cv_kartstacking_invincibility_stackable;
extern consvar_t cv_kartstacking_flame_speedval;
extern consvar_t cv_kartstacking_flame_accelboost;
extern consvar_t cv_kartstacking_flame_stackable;
extern consvar_t cv_kartstacking_grow_speedboost;
extern consvar_t cv_kartstacking_grow_accelboost;
extern consvar_t cv_kartstacking_grow_stackable;
extern consvar_t cv_kartstacking_start_speedboost;
extern consvar_t cv_kartstacking_start_accelboost;
extern consvar_t cv_kartstacking_start_stackable;
extern consvar_t cv_kartstacking_drift_speedboost;
extern consvar_t cv_kartstacking_drift_accelboost;
extern consvar_t cv_kartstacking_drift_stackable;
extern consvar_t cv_kartstacking_ring_speedboost;
extern consvar_t cv_kartstacking_ring_accelboost;
extern consvar_t cv_kartstacking_ring_stackable;
extern consvar_t cv_kartchaining;
extern consvar_t cv_kartchainingoffroad;
extern consvar_t cv_kartitembreaker;
extern consvar_t cv_kartwalltransfer; extern consvar_t cv_kartwalltransfer;
extern consvar_t cv_kartpurpledrift; extern consvar_t cv_kartpurpledrift;
extern consvar_t cv_kartbumpspark; extern consvar_t cv_kartbumpspark;
extern consvar_t cv_kartbumpspring; extern consvar_t cv_kartbumpspring;
extern consvar_t cv_kartslipdash;
extern consvar_t cv_votetime; extern consvar_t cv_votetime;

View file

@ -158,13 +158,13 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
#ifdef DEVELOP #ifdef DEVELOP
i = 0; i = 0;
#else #else
i = mainwads + 1; i = NUMMAINWADS;
#endif #endif
for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
{ {
// If it has only music/sound lumps, don't put it in the list // If it has only music/sound lumps, don't put it in the list
if (i > mainwads && !wadfiles[i]->important) if (i >= NUMMAINWADS && !wadfiles[i]->important)
continue; continue;
if (firstfile) if (firstfile)
@ -190,7 +190,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
/* don't send mainwads!! */ /* don't send mainwads!! */
#ifdef DEVELOP #ifdef DEVELOP
if (i <= mainwads) if (i < NUMMAINWADS)
filestatus += (2 << 4); filestatus += (2 << 4);
#endif #endif
@ -555,7 +555,7 @@ INT32 CL_CheckFiles(void)
#ifdef DEVELOP #ifdef DEVELOP
j = 0; j = 0;
#else #else
j = mainwads + 1; j = NUMMAINWADS;
#endif #endif
for (i = 0; i < fileneedednum || j < numwadfiles;) for (i = 0; i < fileneedednum || j < numwadfiles;)
{ {
@ -605,7 +605,7 @@ INT32 CL_CheckFiles(void)
#ifdef DEVELOP #ifdef DEVELOP
j = 0; j = 0;
#else #else
j = mainwads + 1; j = NUMMAINWADS;
#endif #endif
for (; wadfiles[j]; j++) for (; wadfiles[j]; j++)
{ {
@ -1410,15 +1410,15 @@ void PT_FileFragment(void)
filename = va("%s", file->filename); filename = va("%s", file->filename);
nameonly(filename); nameonly(filename);
if (!strcmp(filename, "main.pk3") if (!strcmp(filename, MAINNAME)
|| !strcmp(filename, "srb2.srb") || !strcmp(filename, SRB2NAME)
|| !strcmp(filename, "gfx.kart") || !strcmp(filename, GRAPHICSNAME)
|| !strcmp(filename, "textures.kart") || !strcmp(filename, TEXTURESNAME)
|| !strcmp(filename, "chars.kart") || !strcmp(filename, CHARSNAME)
|| !strcmp(filename, "maps.kart") || !strcmp(filename, MAPSNAME)
|| !strcmp(filename, "patch.pk3") || !strcmp(filename, PATCHNAME)
|| !strcmp(filename, "sounds.kart") || !strcmp(filename, SOUNDSNAME)
|| !strcmp(filename, "music.kart") || !strcmp(filename, MUSICNAME)
) )
{ {
I_Error("Tried to download \"%s\"", filename); I_Error("Tried to download \"%s\"", filename);
@ -1766,12 +1766,25 @@ size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
int curlprogress_callback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) int curlprogress_callback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{ {
time_t curtime;
(void)clientp; (void)clientp;
(void)ultotal; (void)ultotal;
(void)ulnow; // Function prototype requires these but we won't use, so just discard (void)ulnow; // Function prototype requires these but we won't use, so just discard
curtime = time(NULL);
curl_dlnow = dlnow; curl_dlnow = dlnow;
curl_dltotal = dltotal; curl_dltotal = dltotal;
getbytes = curl_dlnow / (time(NULL) - curl_starttime); // To-do: Make this more accurate???
if (curtime > curl_starttime)
{
getbytes = curl_dlnow / (curtime - curl_starttime); // To-do: Make this more accurate???
}
else
{
getbytes = 0;
}
return 0; return 0;
} }

View file

@ -102,16 +102,18 @@ typedef enum
PF_UPDATEMYRESPAWN = 1<<19, PF_UPDATEMYRESPAWN = 1<<19,
PF_FLIPCAM = 1<<20, PF_FLIPCAM = 1<<20,
PF_TRUSTWAYPOINTS = 1<<21, // Do not activate lap cheat prevention next time finish line distance is updated PF_TRUSTWAYPOINTS = 1<<21, // Do not activate lap cheat prevention next time finish line distance is updated
PF_FREEZEWAYPOINTS = 1<<22, // Skip the next waypoint/finish line distance update
PF_HITFINISHLINE = 1<<23, // Already hit the finish line this tic
PF_WRONGWAY = 1<<24, // Moving the wrong way with respect to waypoints?
PF_HITFINISHLINE = 1<<22, // Already hit the finish line this tic PF_SHRINKME = 1<<25, // "Shrink me" cheat preference
PF_WRONGWAY = 1<<23, // Moving the wrong way with respect to waypoints? PF_SHRINKACTIVE = 1<<26, // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
PF_SHRINKME = 1<<24, // "Shrink me" cheat preference // up to 1<<29 is free
PF_SHRINKACTIVE = 1<<25, // "Shrink me" cheat is in effect. (Can't be disabled mid-race) PF_ATTACKDOWN = 1<<30, // For lua compat, don't use!
PF_SLIDING = 1<<31, // For lua compat, don't use!
// up to 1<<30 is free
PF_SLIDING = 1<<31,
} pflags_t; } pflags_t;
typedef enum typedef enum
@ -228,9 +230,6 @@ typedef enum
typedef enum typedef enum
{ {
// Unsynced, HUD or clientsided effects // Unsynced, HUD or clientsided effects
// Item box
khud_itemblink, // Item flashing after roulette, serves as a mashing indicator
khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
// Rings // Rings
khud_ringlock, // Ring lock khud_ringlock, // Ring lock
@ -428,6 +427,7 @@ struct botvars_t
tic_t itemconfirm; // When high enough, they will use their item tic_t itemconfirm; // When high enough, they will use their item
SINT8 turnconfirm; // Confirm turn direction SINT8 turnconfirm; // Confirm turn direction
UINT32 respawnconfirm; // Confirm when respawn is needed.
}; };
@ -454,6 +454,13 @@ struct sonicloopvars_t
sonicloopcamvars_t camera; sonicloopcamvars_t camera;
}; };
struct boostinfo_t {
fixed_t stackspeedboost;
fixed_t nonstackspeedboost;
fixed_t accelboost;
UINT8 grade;
};
// ======================================================================== // ========================================================================
// PLAYER STRUCTURE // PLAYER STRUCTURE
// ======================================================================== // ========================================================================
@ -566,12 +573,13 @@ struct player_t
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
fixed_t driftcharge; // Charge your drift so you can release a burst of speed fixed_t driftcharge; // Charge your drift so you can release a burst of speed
UINT8 driftboost; // (0 to 125) - Boost you get from drifting UINT8 driftboost; // (0 to 125) - Boost you get from drifting
tic_t driftsparkGrowTimer;
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
INT32 aizdrifttilt; INT32 aizdrifttilt;
INT32 aizdriftturn; INT32 aizdriftturn;
fixed_t slipdashcharge; // charge up a dash with a sliptide!
INT32 underwatertilt; SINT8 slipdashdir; // no snaking allowed :^)
fixed_t offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed fixed_t offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
UINT8 pogospring; // Pogo spring bounce effect UINT8 pogospring; // Pogo spring bounce effect
@ -585,6 +593,9 @@ struct player_t
fixed_t speedboost; // Boost value smoothing for max speed fixed_t speedboost; // Boost value smoothing for max speed
fixed_t accelboost; // Boost value smoothing for acceleration fixed_t accelboost; // Boost value smoothing for acceleration
angle_t boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted. angle_t boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
boostinfo_t boostinfo; // Stores values used for setting speed and accel boosts.
UINT8 numsneakers; // Number of stacked sneakers
UINT8 numboosts; // Number of Boosts stacking this frame
UINT8 tripwireState; // see tripwirestate_t UINT8 tripwireState; // see tripwirestate_t
UINT8 tripwirePass; // see tripwirepass_t UINT8 tripwirePass; // see tripwirepass_t
@ -592,6 +603,9 @@ struct player_t
UINT8 tripwireReboundDelay; // When failing Tripwire, brieftly lock out speed-based tripwire pass (anti-cheese) UINT8 tripwireReboundDelay; // When failing Tripwire, brieftly lock out speed-based tripwire pass (anti-cheese)
UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem") UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem")
UINT16 previtemroulette; // Used determining when to give rings after hitting item boxes
UINT16 itemblink; // Item flashing after roulette, serves as a mashing indicator. Also prevents item from being stolen.
UINT16 itemblinkmode; // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark) UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark)
// Item held stuff // Item held stuff
@ -624,8 +638,9 @@ struct player_t
SINT8 stolentimer; // you are being stolen from SINT8 stolentimer; // you are being stolen from
UINT16 sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters) UINT16 sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters)
UINT16 realsneakertimer;// Duration of a Sneaker Boosts acutal time that doesn't get chained.(used for chainoffroad and tripwires)
UINT8 floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel UINT8 floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel
boolean waterrun; // Tracks condition of water run UINT16 chaintimer; // Stores current chain timer length.
UINT8 boostcharge; // Charge during race start UINT8 boostcharge; // Charge during race start

View file

@ -78,6 +78,7 @@ struct ticcmd_t
{ {
SINT8 turnconfirm; SINT8 turnconfirm;
SINT8 itemconfirm; SINT8 itemconfirm;
SINT8 respawnconfirm;
} bot; } bot;
} ATTRPACK; } ATTRPACK;

View file

@ -59,23 +59,14 @@ static inline int lib_freeslot(lua_State *L)
} }
else if (fastcmp(type, "SPR")) else if (fastcmp(type, "SPR"))
{ {
char wad;
spritenum_t j; spritenum_t j;
lua_getfield(L, LUA_REGISTRYINDEX, "WAD");
wad = (char)lua_tointeger(L, -1);
lua_pop(L, 1);
for (j = SPR_FIRSTFREESLOT; j <= SPR_LASTFREESLOT; j++) for (j = SPR_FIRSTFREESLOT; j <= SPR_LASTFREESLOT; j++)
{ {
if (used_spr[(j-SPR_FIRSTFREESLOT)/8] & (1<<(j%8))) if (used_spr[(j-SPR_FIRSTFREESLOT)/8] & (1<<(j%8)))
{
if (!sprnames[j][4] && memcmp(sprnames[j],word,4)==0)
sprnames[j][4] = wad;
continue; // Already allocated, next. continue; // Already allocated, next.
}
// Found a free slot! // Found a free slot!
CONS_Printf("Sprite SPR_%s allocated.\n",word); CONS_Printf("Sprite SPR_%s allocated.\n",word);
strncpy(sprnames[j],word,4); strncpy(sprnames[j],word,4);
//sprnames[j][4] = 0;
used_spr[(j-SPR_FIRSTFREESLOT)/8] |= 1<<(j%8); // Okay, this sprite slot has been named now. used_spr[(j-SPR_FIRSTFREESLOT)/8] |= 1<<(j%8); // Okay, this sprite slot has been named now.
// Lua needs to update the value in _G if it exists // Lua needs to update the value in _G if it exists
LUA_UpdateSprName(word, j); LUA_UpdateSprName(word, j);
@ -197,6 +188,21 @@ static inline int lib_freeslot(lua_State *L)
CONS_Alert(CONS_WARNING, "Ran out of free PRECIP slots!\n"); CONS_Alert(CONS_WARNING, "Ran out of free PRECIP slots!\n");
} }
} }
else if (fastcmp(type, "MN"))
{
menutype_t i;
for (i = 0; i < NUMMENUFREESLOTS; i++)
if (!FREE_MENUS[i]) {
CONS_Printf("Menu MN_%s allocated.\n",word);
FREE_MENUS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
strcpy(FREE_MENUS[i],word);
lua_pushinteger(L, MN_FIRSTFREESLOT + i);
r++;
break;
}
if (i == NUMMENUFREESLOTS)
CONS_Alert(CONS_WARNING, "Ran out of free menu slots!\n");
}
Z_Free(s); Z_Free(s);
lua_remove(L, 1); lua_remove(L, 1);
continue; continue;
@ -347,11 +353,6 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (fastncmp("TOL_", word, 4)) { else if (fastncmp("TOL_", word, 4)) {
p = word+4; p = word+4;
if (lua_compatmode && fastcmp(p, "MATCH"))
{
CacheAndPushConstant(L, word, ((lua_Integer)TOL_BATTLE));
return 1;
}
for (i = 0; TYPEOFLEVEL[i].name; i++) for (i = 0; TYPEOFLEVEL[i].name; i++)
if (fastcmp(p, TYPEOFLEVEL[i].name)) { if (fastcmp(p, TYPEOFLEVEL[i].name)) {
CacheAndPushConstant(L, word, TYPEOFLEVEL[i].flag); CacheAndPushConstant(L, word, TYPEOFLEVEL[i].flag);
@ -362,37 +363,12 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (fastncmp("ML_", word, 3)) { else if (fastncmp("ML_", word, 3)) {
p = word+3; p = word+3;
for (i = 0; i < 20; i++) const char *const *list = lua_compatmode ? ML_LIST_KART : ML_LIST;
if (ML_LIST[i] && fastcmp(p, ML_LIST[i])) { for (i = 0; list[i]; i++)
if (fastcmp(p, list[i])) {
CacheAndPushConstant(L, word, ((lua_Integer)1<<i)); CacheAndPushConstant(L, word, ((lua_Integer)1<<i));
return 1; return 1;
} }
// Aliases
if (fastcmp(p, "EFFECT1"))
{
lua_pushinteger(L, (lua_Integer)ML_SKEWTD);
return 1;
}
if (fastcmp(p, "EFFECT2"))
{
lua_pushinteger(L, (lua_Integer)ML_NOSKEW);
return 1;
}
if (fastcmp(p, "EFFECT3"))
{
lua_pushinteger(L, (lua_Integer)ML_MIDPEG);
return 1;
}
if (fastcmp(p, "EFFECT4"))
{
lua_pushinteger(L, (lua_Integer)ML_MIDSOLID);
return 1;
}
if (fastcmp(p, "EFFECT5"))
{
lua_pushinteger(L, (lua_Integer)ML_WRAPMIDTEX);
return 1;
}
if (mathlib) return luaL_error(L, "linedef flag '%s' could not be found.\n", word); if (mathlib) return luaL_error(L, "linedef flag '%s' could not be found.\n", word);
return 0; return 0;
} }
@ -489,6 +465,13 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
if (lua_compatmode)
for (i = 0; MOBJ_ALIASES[i].n; i++)
if (fastcmp(p, MOBJ_ALIASES[i].n)) {
CacheAndPushConstant(L, word, MOBJ_ALIASES[i].v);
return 1;
}
return luaL_error(L, "mobjtype '%s' does not exist.\n", word); return luaL_error(L, "mobjtype '%s' does not exist.\n", word);
} }
else if (fastncmp("SPR_",word,4)) { else if (fastncmp("SPR_",word,4)) {
@ -499,7 +482,7 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
return 1; return 1;
} }
for (i = 0; i < NUMSPRITES; i++) for (i = 0; i < NUMSPRITES; i++)
if (!sprnames[i][4] && fastncmp(p,sprnames[i],4)) { if (fastncmp(p,sprnames[i],4)) {
// updating overridden sprnames is not implemented for soc parser, // updating overridden sprnames is not implemented for soc parser,
// so don't use cache // so don't use cache
if (mathlib) if (mathlib)
@ -633,7 +616,15 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (fastncmp("MN_",word,3)) { else if (fastncmp("MN_",word,3)) {
p = word+3; p = word+3;
for (i = 0; i < NUMMENUTYPES; i++) for (i = 0; i < NUMMENUFREESLOTS; i++) {
if (!FREE_MENUS[i])
break;
if (fastcmp(p, FREE_MENUS[i])) {
CacheAndPushConstant(L, word, MN_FIRSTFREESLOT+i);
return 1;
}
}
for (i = 0; i < MN_FIRSTFREESLOT; i++)
if (fastcmp(p, MENUTYPES_LIST[i])) { if (fastcmp(p, MENUTYPES_LIST[i])) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
@ -739,7 +730,7 @@ void LUA_UpdateSprName(const char *name, lua_Integer value)
if (!lua_isnil(gL, -1)) if (!lua_isnil(gL, -1))
{ {
lua_pushstring(gL, name); lua_pushstring(gL, fullname);
lua_pushinteger(gL, value); lua_pushinteger(gL, value);
lua_rawset(gL, LUA_GLOBALSINDEX); lua_rawset(gL, LUA_GLOBALSINDEX);
} }

View file

@ -158,7 +158,8 @@ void clear_levels(void)
P_DeleteFlickies(nummapheaders); P_DeleteFlickies(nummapheaders);
Z_Free(mapheaderinfo[nummapheaders]->mainrecord); for (SINT8 k = 0; k < MAXMAPRECORDS; k++)
Z_Free(mapheaderinfo[nummapheaders]->mainrecord[k]);
Patch_Free(mapheaderinfo[nummapheaders]->thumbnailPic); Patch_Free(mapheaderinfo[nummapheaders]->thumbnailPic);
Patch_Free(mapheaderinfo[nummapheaders]->minimapPic); Patch_Free(mapheaderinfo[nummapheaders]->minimapPic);
@ -430,15 +431,10 @@ void readfreeslots(MYFILE *f)
for (i = SPR_FIRSTFREESLOT; i <= SPR_LASTFREESLOT; i++) for (i = SPR_FIRSTFREESLOT; i <= SPR_LASTFREESLOT; i++)
{ {
if (used_spr[(i-SPR_FIRSTFREESLOT)/8] & (1<<(i%8))) if (used_spr[(i-SPR_FIRSTFREESLOT)/8] & (1<<(i%8)))
{
if (!sprnames[i][4] && memcmp(sprnames[i],word,4)==0)
sprnames[i][4] = (char)f->wad;
continue; // Already allocated, next. continue; // Already allocated, next.
}
// Found a free slot! // Found a free slot!
strncpy(sprnames[i],word,4);
//sprnames[i][4] = 0;
CONS_Printf("Sprite SPR_%s allocated.\n",word); CONS_Printf("Sprite SPR_%s allocated.\n",word);
strncpy(sprnames[i],word,4);
used_spr[(i-SPR_FIRSTFREESLOT)/8] |= 1<<(i%8); // Okay, this sprite slot has been named now. used_spr[(i-SPR_FIRSTFREESLOT)/8] |= 1<<(i%8); // Okay, this sprite slot has been named now.
// Lua needs to update the value in _G if it exists // Lua needs to update the value in _G if it exists
LUA_UpdateSprName(word, i); LUA_UpdateSprName(word, i);
@ -534,6 +530,16 @@ void readfreeslots(MYFILE *f)
} else } else
deh_warning("Ran out of free PRECIP slots!\n"); deh_warning("Ran out of free PRECIP slots!\n");
} }
else if (fastcmp(type, "MN"))
{
for (i = 0; i < NUMMENUFREESLOTS; i++)
if (!FREE_MENUS[i]) {
CONS_Printf("Menu MN_%s allocated.\n",word);
FREE_MENUS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
strcpy(FREE_MENUS[i],word);
break;
}
}
else else
deh_warning("Freeslots: unknown enum class '%s' for '%s_%s'", type, type, word); deh_warning("Freeslots: unknown enum class '%s' for '%s_%s'", type, type, word);
} }
@ -1123,7 +1129,7 @@ void readlevelheader(MYFILE *f, char * name)
{ {
P_AllocMapHeader((INT16)(num = nummapheaders)); P_AllocMapHeader((INT16)(num = nummapheaders));
} }
else if (f->wad > mainwads) else if (f->wad >= NUMMAINWADS)
{ {
// only mark as a major mod if it replaces an already-existing mapheaderinfo // only mark as a major mod if it replaces an already-existing mapheaderinfo
G_SetGameModified(multiplayer, true); G_SetGameModified(multiplayer, true);
@ -1536,6 +1542,13 @@ void readlevelheader(MYFILE *f, char * name)
mapheaderinfo[num]->use_walltransfer = true; mapheaderinfo[num]->use_walltransfer = true;
else else
mapheaderinfo[num]->use_walltransfer = false; mapheaderinfo[num]->use_walltransfer = false;
}
else if (fastcmp(word, "TERRAIN") || fastcmp(word, "TERRAINDEF"))
{
if (i || word2[0] == 'T' || word2[0] == 'Y')
mapheaderinfo[num]->use_terrain = true;
else
mapheaderinfo[num]->use_terrain = false;
} }
// ignored for compatibility // ignored for compatibility
else if (fastcmp(word, "NEXTLEVEL") || fastcmp(word, "TIMEATTACK") || fastcmp(word, "RECORDATTACK")) else if (fastcmp(word, "NEXTLEVEL") || fastcmp(word, "TIMEATTACK") || fastcmp(word, "RECORDATTACK"))
@ -2135,6 +2148,225 @@ void readtextprompt(MYFILE *f, INT32 num)
Z_Free(s); Z_Free(s);
} }
static menu_t *allocmenu(INT32 num)
{
if (num < 0 || num >= NUMMENUTYPES)
I_Error("Tried to allocate out-of-range menu number");
menu_t *menu = menudefs[num];
if (menu == NULL)
{
menudefs[num] = menu = Z_Calloc(sizeof(menu_t), PU_STATIC, NULL);
menu->drawroutine = M_DrawGenericMenu;
}
return menu;
}
// super secret menu cvars... :shushing_face:
static struct { const char *name; consvar_t *var; } HIDDENVARS[] = {
{ "CHOOSESKIN", &cv_chooseskin },
{ "DUMMYGPDIFFICULTY", &cv_dummygpdifficulty },
{ "DUMMYGPENCORE", &cv_dummygpencore },
{ "DUMMYGPCUP", &cv_dummygpcup },
{ "NEXTMAP", &cv_nextmap },
{ "NEWGAMETYPE", &cv_newgametype },
{ "DUMMYRINGS", &cv_dummyrings },
{ "DUMMYLIVES", &cv_dummylives },
{ "DUMMYMENUPLAYER", &cv_dummymenuplayer },
{ "DUMMYTEAM", &cv_dummyteam },
{ "DUMMYSPECTATE", &cv_dummyspectate },
{ "DUMMYSCRAMBLE", &cv_dummyscramble },
{ "DUMMYATTACKINGRINGS", &cv_dummyattackingrings },
{ "DUMMYATTACKINGSTACKING", &cv_dummyattackingstacking },
{ "DUMMYATTACKINGCHAINING", &cv_dummyattackingchaining },
{ "DUMMYATTACKINGSLIPDASH", &cv_dummyattackingslipdash },
{ "DUMMYATTACKINGPURPLEDRIFT", &cv_dummyattackingpurpledrift },
{ NULL, NULL }
};
#define WARN(str, ...) deh_warning("MenuItem " ITEMNAMEFMT ": " str, menuitem->itemname, __VA_ARGS__)
#define WARN0(str) deh_warning("MenuItem " ITEMNAMEFMT ": " str, menuitem->itemname)
static void readmenuitem(MYFILE *f, menuitem_t *menuitem)
{
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
char *word = s;
char *word2;
char *tmp;
UINT16 status = 0;
boolean actionset = false;
boolean textset = false;
// taking quite possibly the only opportunity i'll ever get
// to avoid three tabs of indentation...
do if (myfgets(s, MAXLINELEN, f))
{
if (s[0] == '\n')
break;
// First remove trailing newline, if there is one
tmp = strchr(s, '\n');
if (tmp)
*tmp = '\0';
tmp = strchr(s, '#');
if (tmp)
*tmp = '\0';
if (s == tmp)
continue; // Skip comment lines, but don't break.
// Get the part before the " = "
tmp = strchr(s, '=');
if (tmp)
*(tmp-1) = '\0';
else
break;
strupr(word);
// Now get the part after
word2 = tmp += 2;
//strupr(word2);
if (fastcmp(word, "PATCH"))
{
menuitem->patch = Z_StrDup(word2);
}
else if (fastncmp(word, "TEXT", 4))
{
UINT16 flags = IT_STRING;
if (fastcmp(word+4, "HEADER"))
flags = IT_HEADER;
else if (fastcmp(word+4, "SECRET"))
flags = IT_SECRET;
else if (fastcmp(word+4, "WHITE"))
flags = IT_WHITESTRING;
else if (fastcmp(word+4, "DISABLED"))
flags = IT_DISABLED;
else if (fastcmp(word+4, "2"))
flags = IT_STRING2;
else if (word[4])
{
WARN("unknown word '%s'", word);
continue;
}
if (textset)
{
WARN0("text already set!");
continue;
}
textset = true;
status |= flags;
menuitem->text = Z_StrDup(word2);
}
else if (fastncmp(word, "CVAR", 4))
{
UINT16 flags = IT_CVAR;
if (fastcmp(word+4, "SLIDER"))
flags |= IT_CV_SLIDER;
else if (fastcmp(word+4, "STRING"))
flags |= IT_CV_STRING;
else if (fastcmp(word+4, "INTEGER"))
flags |= IT_CV_INTEGERSTEP;
else if (word[4])
{
WARN("unknown word '%s'", word);
continue;
}
if (actionset)
{
WARN0("action already set!");
continue;
}
consvar_t *cvar = CV_FindVar(word2);
if (!cvar)
for (size_t i = 0; HIDDENVARS[i].name; i++)
if (fasticmp(word2, HIDDENVARS[i].name))
{
cvar = HIDDENVARS[i].var;
break;
}
if (!cvar)
{
WARN("unable to find cvar '%s'", word2);
continue;
}
actionset = true;
status |= flags;
menuitem->itemaction.cvar = cvar;
}
else if (fastcmp(word, "SUBMENU"))
{
if (actionset)
{
WARN0("action already set!");
continue;
}
menutype_t mn = get_menutype(word2);
if (mn == MN_NONE)
{
WARN("unknown menu '%s'", word2);
continue;
}
actionset = true;
status |= IT_SUBMENU;
allocmenu(mn);
menuitem->itemaction.submenu = mn;
}
else if (fastncmp(word, "CALL", 4) || fastcmp(word, "KEYHANDLER") || fastcmp(word, "ARROWS"))
{
UINT16 flags;
if (word[0] == 'C')
{
flags = IT_CALL;
if (fastcmp(word+4, "NOTMODIFIED"))
flags |= IT_CALL_NOTMODIFIED;
else if (word[4])
{
WARN("unknown word '%s'", word);
continue;
}
}
else if (word[0] == 'K')
flags = IT_KEYHANDLER;
else if (word[0] == 'A')
flags = IT_ARROWS;
else
I_Error("bruh"); // i should probably just make "CALL" the stem for all of these
if (actionset)
{
WARN0("action already set!");
continue;
}
void (*routine)(INT32) = get_menuroutine(word2);
if (!routine)
{
WARN("unknown call routine '%s'", word2);
continue;
}
actionset = true;
status |= flags;
menuitem->itemaction.routine = routine;
}
else if (fastcmp(word, "ALPHAKEY") || fastcmp(word, "Y"))
{
menuitem->alphaKey = get_number(word2);
}
else
WARN("unknown word '%s'", word);
}
while (!myfeof(f)); // finish when the line is empty
menuitem->status = status;
Z_Free(s);
}
#undef WARN
#undef WARN0
#define WARN(str, ...) deh_warning("Menu %s: " str, num < MN_FIRSTFREESLOT ? MENUTYPES_LIST[num] : FREE_MENUS[num - MN_FIRSTFREESLOT], __VA_ARGS__)
void readmenu(MYFILE *f, INT32 num) void readmenu(MYFILE *f, INT32 num)
{ {
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL); char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
@ -2143,6 +2375,8 @@ void readmenu(MYFILE *f, INT32 num)
char *tmp; char *tmp;
INT32 value; INT32 value;
menu_t *menudef = allocmenu(num);
do do
{ {
if (myfgets(s, MAXLINELEN, f)) if (myfgets(s, MAXLINELEN, f))
@ -2166,7 +2400,40 @@ void readmenu(MYFILE *f, INT32 num)
if (tmp) if (tmp)
*(tmp-1) = '\0'; *(tmp-1) = '\0';
else else
break; {
// ...or get the word after the space. yay special syntax!
word2 = strchr(s, ' ');
if (word2)
{
*word2++ = '\0';
if (*word2 == '\0' || *word2 == ' ') // trailing space(s) after MenuItem doesn't count
word2 = NULL;
else
strupr(word2);
}
strupr(word);
if (fastcmp(word, "MENUITEM"))
{
if (word2 && strlen(word2) > ITEMNAMELEN)
{
WARN("item name %s is too long (max %d characters)", word2, ITEMNAMELEN);
continue;
}
menuitem_t *item = word2 ? M_CheckMenuItem(num, word2) : NULL;
if (item == NULL)
{
menudef->menuitems = Z_Realloc(menudef->menuitems, sizeof(menuitem_t)*(menudef->numitems+1), PU_STATIC, NULL);
item = menudef->menuitems + menudef->numitems++;
strncpy(item->itemname, word2 ? word2 : "", ITEMNAMELEN);
item->text = "";
}
readmenuitem(f, item);
}
else
WARN("unknown word '%s'", word);
continue;
}
strupr(word); strupr(word);
// Now get the part after // Now get the part after
@ -2315,11 +2582,47 @@ void readmenu(MYFILE *f, INT32 num)
menupres[num].exitwipe = get_number(word2); menupres[num].exitwipe = get_number(word2);
titlechanged = true; titlechanged = true;
} }
// MENUDEF STARTS HERE
else if (fastcmp(word, "HEADERPIC"))
{
menudef->headerpic = Z_StrDup(word2);
}
else if (fastcmp(word, "DRAWROUTINE"))
{
void (*drawer)(void) = get_menudrawer(word2);
if (drawer == NULL)
{
WARN("unknown draw routine '%s'", word2);
continue;
}
menudef->drawroutine = drawer;
}
else if (fastcmp(word, "X"))
{
menudef->x = value;
}
else if (fastcmp(word, "Y"))
{
menudef->y = value;
}
else if (fastcmp(word, "QUITROUTINE"))
{
void (*routine)(INT32) = get_menuroutine(word2);
if (!routine)
{
WARN("unknown quit routine '%s'", word2);
continue;
}
menudef->quitroutine = routine;
}
else
WARN("unknown word '%s'", word);
} }
} while (!myfeof(f)); // finish when the line is empty } while (!myfeof(f)); // finish when the line is empty
Z_Free(s); Z_Free(s);
} }
#undef WARN
void readframe(MYFILE *f, INT32 num) void readframe(MYFILE *f, INT32 num)
{ {
@ -4018,7 +4321,7 @@ spritenum_t get_sprite(const char *word)
if (fastncmp("SPR_",word,4)) if (fastncmp("SPR_",word,4))
word += 4; // take off the SPR_ word += 4; // take off the SPR_
for (i = 0; i < NUMSPRITES; i++) for (i = 0; i < NUMSPRITES; i++)
if (!sprnames[i][4] && memcmp(word,sprnames[i],4)==0) if (memcmp(word,sprnames[i],4)==0)
return i; return i;
deh_warning("Couldn't find sprite named 'SPR_%s'",word); deh_warning("Couldn't find sprite named 'SPR_%s'",word);
return SPR_NULL; return SPR_NULL;
@ -4061,13 +4364,43 @@ menutype_t get_menutype(const char *word)
return atoi(word); return atoi(word);
if (fastncmp("MN_",word,3)) if (fastncmp("MN_",word,3))
word += 3; // take off the MN_ word += 3; // take off the MN_
for (i = 0; i < NUMMENUTYPES; i++) for (i = 0; i < NUMMENUFREESLOTS; i++) {
if (!FREE_MENUS[i])
break;
if (fastcmp(word, FREE_MENUS[i]))
return MN_FIRSTFREESLOT+i;
}
for (i = 0; i < MN_FIRSTFREESLOT; i++)
if (fastcmp(word, MENUTYPES_LIST[i])) if (fastcmp(word, MENUTYPES_LIST[i]))
return i; return i;
deh_warning("Couldn't find menutype named 'MN_%s'",word); deh_warning("Couldn't find menutype named 'MN_%s'",word);
return MN_NONE; return MN_NONE;
} }
void (*get_menuroutine(const char *word))(INT32)
{ // Returns the value of MR_ enumerations
size_t i;
if (fastncmp("MR_",word,3))
word += 3; // take off the MR_
for (i = 0; MENU_ROUTINES[i].name; i++)
if (fasticmp(word, MENU_ROUTINES[i].name))
return MENU_ROUTINES[i].routine;
deh_warning("Couldn't find menu routine named 'MR_%s'",word);
return NULL;
}
void (*get_menudrawer(const char *word))(void)
{ // Returns the value of MD_ enumerations
size_t i;
if (fastncmp("MD_",word,3))
word += 3; // take off the MD_
for (i = 0; MENU_DRAWERS[i].name; i++)
if (fasticmp(word, MENU_DRAWERS[i].name))
return MENU_DRAWERS[i].drawer;
deh_warning("Couldn't find menu drawer named 'MD_%s'",word);
return NULL;
}
/*static INT16 get_gametype(const char *word) /*static INT16 get_gametype(const char *word)
{ // Returns the value of GT_ enumerations { // Returns the value of GT_ enumerations
INT16 i; INT16 i;

View file

@ -57,6 +57,8 @@ spritenum_t get_sprite(const char *word);
playersprite_t get_sprite2(const char *word); playersprite_t get_sprite2(const char *word);
sfxenum_t get_sfx(const char *word); sfxenum_t get_sfx(const char *word);
menutype_t get_menutype(const char *word); menutype_t get_menutype(const char *word);
void (*get_menuroutine(const char *word))(INT32);
void (*get_menudrawer(const char *word))(void);
//INT16 get_gametype(const char *word); //INT16 get_gametype(const char *word);
//powertype_t get_power(const char *word); //powertype_t get_power(const char *word);
skincolornum_t get_skincolor(const char *word); skincolornum_t get_skincolor(const char *word);

View file

@ -27,12 +27,15 @@
#include "r_data.h" // patchalphastyle_t #include "r_data.h" // patchalphastyle_t
#include "k_boss.h" // spottype_t (for lua) #include "k_boss.h" // spottype_t (for lua)
#include "k_follower.h" // followermode_t (for lua) #include "k_follower.h" // followermode_t (for lua)
#include "g_input.h" // Game controls (for lua)
#include "k_kart.h" // awardscaledrings_t
#include "deh_tables.h" #include "deh_tables.h"
char *FREE_STATES[NUMSTATEFREESLOTS]; char *FREE_STATES[NUMSTATEFREESLOTS];
char *FREE_MOBJS[NUMMOBJFREESLOTS]; char *FREE_MOBJS[NUMMOBJFREESLOTS];
char *FREE_SKINCOLORS[NUMCOLORFREESLOTS]; char *FREE_SKINCOLORS[NUMCOLORFREESLOTS];
char *FREE_MENUS[NUMMENUFREESLOTS];
UINT8 used_spr[(NUMSPRITEFREESLOTS / 8) + 1]; // Bitwise flag for sprite freeslot in use! I would use ceil() here if I could, but it only saves 1 byte of memory anyway. UINT8 used_spr[(NUMSPRITEFREESLOTS / 8) + 1]; // Bitwise flag for sprite freeslot in use! I would use ceil() here if I could, but it only saves 1 byte of memory anyway.
struct flickytypes_s FLICKYTYPES[] = { struct flickytypes_s FLICKYTYPES[] = {
@ -126,6 +129,16 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
#undef _ #undef _
}; };
struct int_const_s const MOBJ_ALIASES[] = {
{"BIRD", MT_FLICKY_01},
{"BUNNY" , MT_FLICKY_02},
{"MOUSE" , MT_FLICKY_12},
{"CHICKEN" , MT_FLICKY_03},
{"REDBIRD", MT_FLICKY_10},
{"COW", MT_FLICKY_11},
{ NULL, 0 }
};
const char *const MOBJFLAG_LIST[] = { const char *const MOBJFLAG_LIST[] = {
"SPECIAL", "SPECIAL",
"SOLID", "SOLID",
@ -165,7 +178,7 @@ const char *const MOBJFLAG_LIST[] = {
// \tMF2_(\S+).*// (.+) --> \t"\1", // \2 // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
const char *const MOBJFLAG2_LIST[] = { const char *const MOBJFLAG2_LIST[] = {
"AXIS", // It's a NiGHTS axis! (For faster checking) "AXIS", // It's a NiGHTS axis! (For faster checking)
"\x01", // free: 1<<1 (name un-matchable) "SHADOW", // alias for RF_GHOSTLY
"DONTRESPAWN", // Don't respawn this object! "DONTRESPAWN", // Don't respawn this object!
"DONTDRAW", // alias for RF_DONTDRAW "DONTDRAW", // alias for RF_DONTDRAW
"AUTOMATIC", // Thrown ring has automatic properties "AUTOMATIC", // Thrown ring has automatic properties
@ -194,6 +207,7 @@ const char *const MOBJFLAG2_LIST[] = {
"AMBUSH", // Alternate behaviour typically set by MTF_AMBUSH "AMBUSH", // Alternate behaviour typically set by MTF_AMBUSH
"LINKDRAW", // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position) "LINKDRAW", // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
"SHIELD", // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use) "SHIELD", // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
"WATERRUN", // Mobj is able to run on Water!
NULL NULL
}; };
@ -267,8 +281,9 @@ const char *const PLAYERFLAG_LIST[] = {
"UPDATEMYRESPAWN", "UPDATEMYRESPAWN",
"FLIPCAM", "FLIPCAM",
"TRUSTWAYPOINTS",
"TRUSTWAYPOINTS", // Do not activate lap cheat prevention next time finish line distance is updated
"FREEZEWAYPOINTS", // Skip the next waypoint/finish line distance update
"HITFINISHLINE", // Already hit the finish line this tic "HITFINISHLINE", // Already hit the finish line this tic
"WRONGWAY", // Moving the wrong way with respect to waypoints? "WRONGWAY", // Moving the wrong way with respect to waypoints?
@ -335,14 +350,31 @@ const char *const ML_LIST[] = {
"MIDPEG", "MIDPEG",
"MIDSOLID", "MIDSOLID",
"WRAPMIDTEX", "WRAPMIDTEX",
"NETONLY",
"NONET",
"EFFECT6",
"NOTBOUNCY",
"TFERLINE",
NULL
};
// Linedef flags for Kart
const char *const ML_LIST_KART[] = {
"IMPASSIBLE",
"BLOCKMONSTERS",
"TWOSIDED",
"DONTPEGTOP",
"DONTPEGBOTTOM",
"EFFECT1",
"NOCLIMB",
"EFFECT2",
"EFFECT3",
"EFFECT4",
"EFFECT5",
"NOSONIC", "NOSONIC",
"NOTAILS", "NOTAILS",
"NOKNUX", "NOKNUX",
"NETONLY", "BOUNCY",
"NETONLY_OLD",
"NONET",
"BLOCKMONSTERS",
"NOTBOUNCY",
"TFERLINE", "TFERLINE",
NULL NULL
}; };
@ -536,8 +568,6 @@ const char *const KARTSTUFF_LIST[] = {
}; };
const char *const KARTHUD_LIST[] = { const char *const KARTHUD_LIST[] = {
"ITEMBLINK",
"ITEMBLINKMODE",
"RINGFRAME", "RINGFRAME",
"RINGTICS", "RINGTICS",
@ -590,98 +620,139 @@ const char *const HUDITEMS_LIST[] = {
}; };
const char *const MENUTYPES_LIST[] = { const char *const MENUTYPES_LIST[] = {
"NONE", #define _(name, ...) #name,
#include "info/menus.h"
#undef _
};
"MAIN", struct menu_routine_s const MENU_ROUTINES[] = {
{ "SINGLEPLAYERMENU", &M_SinglePlayerMenu },
{ "OPTIONS", &M_Options },
{ "ADDONS", &M_Addons },
{ "QUITSRB2", &M_QuitSRB2 },
{ "STATISTICS", &M_Statistics },
{ "HANDLELEVELSTATS", &M_HandleLevelStats },
{ "REPLAYHUT", &M_ReplayHut },
{ "QUITREPLAYHUT", &M_QuitReplayHut },
{ "HANDLEREPLAYHUTLIST", &M_HandleReplayHutList },
{ "GRANDPRIXTEMP", &M_GrandPrixTemp },
{ "TIMEATTACK", &M_TimeAttack },
{ "ITEMBREAKER", &M_ItemBreaker },
{ "STARTGRANDPRIX", &M_StartGrandPrix },
{ "QUITTIMEATTACKMENU", &M_QuitTimeAttackMenu },
{ "CHOOSETIMEATTACK", &M_ChooseTimeAttack },
{ "SETGUESTREPLAY", &M_SetGuestReplay },
{ "REPLAYTIMEATTACK", &M_ReplayTimeAttack },
{ "SRB2KARTPRESET", &M_SRB2KartPreset },
{ "TECHPRESET", &M_TechPreset },
{ "BLANKARTPRESET", &M_BlanKartPreset },
{ "HANDLESTAFFREPLAY", &M_HandleStaffReplay },
{ "SETUPMULTIHANDLER", &M_SetupMultiHandler },
{ "HANDLESETUPMULTIPLAYER", &M_HandleSetupMultiPlayer },
{ "QUITMULTIPLAYERMENU", &M_QuitMultiPlayerMenu },
{ "STARTSERVERMENU", &M_StartServerMenu },
{ "STARTOFFLINESERVERMENU", &M_StartOfflineServerMenu },
{ "STARTSERVER", &M_StartServer },
{ "CONNECTMENUMODCHECKS", &M_ConnectMenuModChecks },
{ "HANDLECONNECTIP", &M_HandleConnectIP },
{ "CANCELCONNECT", &M_CancelConnect },
{ "SETUP1PCONTROLSMENU", &M_Setup1PControlsMenu },
{ "SETUP2PCONTROLSMENU", &M_Setup2PControlsMenu },
{ "SETUP3PCONTROLSMENU", &M_Setup3PControlsMenu },
{ "SETUP4PCONTROLSMENU", &M_Setup4PControlsMenu },
{ "HANDLESERVERPAGE", &M_HandleServerPage },
{ "REFRESH", &M_Refresh },
{ "CONNECT", &M_Connect },
{ "VIDEOMODEMENU", &M_VideoModeMenu },
#ifdef HWRENDER
{ "OPENGLOPTIONSMENU", &M_OpenGLOptionsMenu },
#endif
{ "HANDLEVIDEOMODE", &M_HandleVideoMode },
{ "HANDLESOUNDTEST", &M_HandleSoundTest },
{ "MUSICTEST", &M_MusicTest },
{ "SCREENSHOTOPTIONS", &M_ScreenshotOptions },
{ "ADDONSOPTIONS", &M_AddonsOptions },
{ "ERASEDATA", &M_EraseData },
{ "MANUAL", &M_Manual },
{ "CREDITS", &M_Credits },
{ "BLANCREDITS", &M_BlanCredits },
{ "HANDLEADDONS", &M_HandleAddons },
{ "SELECTABLECLEARMENUS", &M_SelectableClearMenus },
{ "MODEATTACKRETRY", &M_ModeAttackRetry },
{ "MODEATTACKENDGAME", &M_ModeAttackEndGame },
{ "PANDORASBOX", &M_PandorasBox },
{ "EMBLEMHINTS", &M_EmblemHints },
{ "RETRY", &M_Retry },
{ "ENDGAME", &M_EndGame },
{ "MAPCHANGE", &M_MapChange },
{ "SETUPMULTIPLAYER", &M_SetupMultiPlayer },
{ "SETUPMULTIPLAYER2", &M_SetupMultiPlayer2 },
{ "SETUPMULTIPLAYER3", &M_SetupMultiPlayer3 },
{ "SETUPMULTIPLAYER4", &M_SetupMultiPlayer4 },
{ "CONFIRMSPECTATE", &M_ConfirmSpectate },
{ "CONFIRMENTERGAME", &M_ConfirmEnterGame },
{ "EXITPANDORASBOX", &M_ExitPandorasBox },
{ "GETALLEMERALDS", &M_GetAllEmeralds },
{ "DESTROYROBOTS", &M_DestroyRobots },
{ "ULTIMATECHEAT", &M_UltimateCheat },
{ "CONFIRMTEAMSCRAMBLE", &M_ConfirmTeamScramble },
{ "CONFIRMTEAMCHANGE", &M_ConfirmTeamChange },
{ "CONFIRMSPECTATECHANGE", &M_ConfirmSpectateChange },
{ "CHANGELEVEL", &M_ChangeLevel },
{ "HUTSTARTREPLAY", &M_HutStartReplay },
{ "PLAYBACKREWIND", &M_PlaybackRewind },
{ "PLAYBACKPAUSE", &M_PlaybackPause },
{ "PLAYBACKFASTFORWARD", &M_PlaybackFastForward },
{ "PLAYBACKADVANCE", &M_PlaybackAdvance },
{ "PLAYBACKSETVIEWS", &M_PlaybackSetViews },
{ "PLAYBACKADJUSTVIEW", &M_PlaybackAdjustView },
{ "PLAYBACKTOGGLEFREECAM", &M_PlaybackToggleFreecam },
{ "PLAYBACKQUIT", &M_PlaybackQuit },
{ "HANDLEIMAGEDEF", &M_HandleImageDef },
{ "HANDLEMUSICTEST", &M_HandleMusicTest },
{ "SETUP1PJOYSTICKMENU", &M_Setup1PJoystickMenu },
{ "SETUP2PJOYSTICKMENU", &M_Setup2PJoystickMenu },
{ "SETUP3PJOYSTICKMENU", &M_Setup3PJoystickMenu },
{ "SETUP4PJOYSTICKMENU", &M_Setup4PJoystickMenu },
{ "RESETCONTROLS", &M_ResetControls },
{ "CHANGECONTROL", &M_ChangeControl },
{ "ASSIGNJOYSTICK", &M_AssignJoystick },
{ "HANDLEMONITORTOGGLES", &M_HandleMonitorToggles },
#ifdef HAVE_DISCORDRPC
{ "HANDLEDISCORDREQUESTS", &M_HandleDiscordRequests },
#endif
{ NULL, NULL }
};
// Single Player struct menu_drawer_s const MENU_DRAWERS[] = {
"SP_MAIN", { "DRAWGENERICMENU", &M_DrawGenericMenu },
{ "DRAWCENTEREDMENU", &M_DrawCenteredMenu },
"SP_LOAD", { "DRAWPAUSEMENU", &M_DrawPauseMenu },
"SP_PLAYER", { "DRAWCHECKLIST", &M_DrawChecklist },
{ "DRAWLEVELSTATS", &M_DrawLevelStats },
"SP_LEVELSELECT", { "DRAWREPLAYHUT", &M_DrawReplayHut },
"SP_LEVELSTATS", { "DRAWTIMEATTACKMENU", &M_DrawTimeAttackMenu },
{ "DRAWMPMAINMENU", &M_DrawMPMainMenu },
"SP_TIMEATTACK", { "DRAWSETUPMULTIPLAYERMENU", &M_DrawSetupMultiPlayerMenu },
"SP_TIMEATTACK_LEVELSELECT", { "DRAWSERVERMENU", &M_DrawServerMenu },
"SP_GUESTREPLAY", { "DRAWVIDEOMENU", &M_DrawVideoMenu },
"SP_REPLAY", { "DRAWVIDEOMODE", &M_DrawVideoMode },
"SP_GHOST", { "DRAWSKYROOM", &M_DrawSkyRoom },
{ "DRAWHUDOPTIONS", &M_DrawHUDOptions },
"SP_NIGHTSATTACK", { "DRAWADDONS", &M_DrawAddons },
"SP_NIGHTS_LEVELSELECT", { "DRAWEMBLEMHINTS", &M_DrawEmblemHints },
"SP_NIGHTS_GUESTREPLAY", { "DRAWREPLAYSTARTMENU", &M_DrawReplayStartMenu },
"SP_NIGHTS_REPLAY", { "DRAWPLAYBACKMENU", &M_DrawPlaybackMenu },
"SP_NIGHTS_GHOST", { "DRAWIMAGEDEF", &M_DrawImageDef },
{ "DRAWMUSICTEST", &M_DrawMusicTest },
// Multiplayer { "DRAWCONTROL", &M_DrawControl },
"MP_MAIN", { "DRAWJOYSTICK", &M_DrawJoystick },
"MP_SPLITSCREEN", // SplitServer { "DRAWMONITORTOGGLES", &M_DrawMonitorToggles },
"MP_SERVER", { "DRAWCONNECTMENU", &M_DrawConnectMenu },
"MP_CONNECT", #ifdef HAVE_DISCORDRPC
"MP_ROOM", { "DRAWDISCORDREQUESTS", &M_DrawDiscordRequests },
"MP_PLAYERSETUP", // MP_PlayerSetupDef shared with SPLITSCREEN if #defined NONET #endif
"MP_SERVER_OPTIONS", { NULL, NULL }
// Options
"OP_MAIN",
"OP_P1CONTROLS",
"OP_CHANGECONTROLS", // OP_ChangeControlsDef shared with P2
"OP_P1MOUSE",
"OP_P1JOYSTICK",
"OP_JOYSTICKSET", // OP_JoystickSetDef shared with P2
"OP_P1CAMERA",
"OP_P2CONTROLS",
"OP_P2MOUSE",
"OP_P2JOYSTICK",
"OP_P2CAMERA",
"OP_PLAYSTYLE",
"OP_VIDEO",
"OP_VIDEOMODE",
"OP_COLOR",
"OP_OPENGL",
"OP_OPENGL_LIGHTING",
"OP_SOUND",
"OP_SERVER",
"OP_MONITORTOGGLE",
"OP_DATA",
"OP_ADDONS",
"OP_SCREENSHOTS",
"OP_ERASEDATA",
// Extras
"SR_MAIN",
"SR_PANDORA",
"SR_LEVELSELECT",
"SR_UNLOCKCHECKLIST",
"SR_EMBLEMHINT",
"SR_PLAYER",
"SR_SOUNDTEST",
// Addons (Part of MISC, but let's make it our own)
"AD_MAIN",
// MISC
// "MESSAGE",
// "SPAUSE",
// "MPAUSE",
// "SCRAMBLETEAM",
// "CHANGETEAM",
// "CHANGELEVEL",
// "MAPAUSE",
// "HELP",
"SPECIAL"
}; };
struct int_const_s const INT_CONST[] = { struct int_const_s const INT_CONST[] = {
@ -887,13 +958,13 @@ struct int_const_s const INT_CONST[] = {
{"PRECIP_NONE",PRECIP_NONE}, {"PRECIP_NONE",PRECIP_NONE},
{"PRECIP_RAIN",PRECIP_RAIN}, {"PRECIP_RAIN",PRECIP_RAIN},
{"PRECIP_SNOW",PRECIP_SNOW}, {"PRECIP_SNOW",PRECIP_SNOW},
{"PRECIP_BLIZZARD",PRECIP_BLIZZARD},
{"PRECIP_STORM",PRECIP_STORM}, {"PRECIP_STORM",PRECIP_STORM},
{"PRECIP_STORM_NORAIN",PRECIP_STORM_NORAIN}, {"PRECIP_STORM_NORAIN",PRECIP_STORM_NORAIN},
{"PRECIP_STORM_NOSTRIKES",PRECIP_STORM_NOSTRIKES}, {"PRECIP_STORM_NOSTRIKES",PRECIP_STORM_NOSTRIKES},
// Carrying // Carrying
{"CR_NONE",CR_NONE}, {"CR_NONE",CR_NONE},
{"CR_SLIDING",CR_SLIDING},
{"CR_ZOOMTUBE",CR_ZOOMTUBE}, {"CR_ZOOMTUBE",CR_ZOOMTUBE},
// Character flags (skinflags_t) // Character flags (skinflags_t)
@ -934,9 +1005,10 @@ struct int_const_s const INT_CONST[] = {
// for P_DamageMobj // for P_DamageMobj
//// Damage types //// Damage types
{"DMG_NORMAL",DMG_NORMAL}, {"DMG_NORMAL",DMG_NORMAL},
{"DMG_SQUISH",DMG_SQUISH},
{"DMG_WIPEOUT",DMG_WIPEOUT}, {"DMG_WIPEOUT",DMG_WIPEOUT},
{"DMG_EXPLODE",DMG_EXPLODE}, {"DMG_EXPLODE",DMG_EXPLODE},
{"DMG_SQUISH",DMG_SQUISH},
{"DMG_VOLTAGE",DMG_VOLTAGE},
{"DMG_KARMA",DMG_KARMA}, {"DMG_KARMA",DMG_KARMA},
//// Death types //// Death types
{"DMG_INSTAKILL",DMG_INSTAKILL}, {"DMG_INSTAKILL",DMG_INSTAKILL},
@ -1317,6 +1389,42 @@ struct int_const_s const INT_CONST[] = {
{"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS}, {"GS_WAITINGPLAYERS",GS_WAITINGPLAYERS},
{"GS_BLANCREDITS",GS_BLANCREDITS}, {"GS_BLANCREDITS",GS_BLANCREDITS},
// Game controls
{"GC_NULL",gc_null},
{"GC_AIMFORWARD",gc_aimforward},
{"GC_AIMBACKWARD",gc_aimbackward},
{"GC_TURNLEFT",gc_turnleft},
{"GC_TURNRIGHT",gc_turnright},
{"GC_ACCELERATE",gc_accelerate},
{"GC_DRIFT",gc_drift},
{"GC_BRAKE",gc_brake},
{"GC_FIRE",gc_fire},
{"GC_LOOKBACK",gc_lookback},
{"GC_CAMRESET",gc_camreset},
{"GC_CAMTOGGLE",gc_camtoggle},
{"GC_SPECTATE",gc_spectate},
{"GC_LOOKUP",gc_lookup},
{"GC_LOOKDOWN",gc_lookdown},
{"GC_CENTERVIEW",gc_centerview},
{"GC_TALKKEY",gc_talkkey},
{"GC_TEAMKEY",gc_teamkey},
{"GC_SCORES",gc_scores},
{"GC_CONSOLE",gc_console},
{"GC_PAUSE",gc_pause},
{"GC_SYSTEMMENU",gc_systemmenu},
{"GC_SCREENSHOT",gc_screenshot},
{"GC_RECORDGIF",gc_recordgif},
{"GC_VIEWPOINT",gc_viewpoint},
{"GC_CUSTOM1",gc_custom1},
{"GC_CUSTOM2",gc_custom2},
{"GC_CUSTOM3",gc_custom3},
{"GC_RESPAWN",gc_respawn},
{"NUM_GAMECONTROLS",num_gamecontrols},
// screen.h constants
{"BASEVIDWIDTH", BASEVIDWIDTH},
{"BASEVIDHEIGHT", BASEVIDHEIGHT},
// SRB2Kart // SRB2Kart
// kartitems_t // kartitems_t
#define FOREACH( name, n ) { TOSTR (KITEM_ ## name), KITEM_ ## name } #define FOREACH( name, n ) { TOSTR (KITEM_ ## name), KITEM_ ## name }
@ -1373,15 +1481,26 @@ struct int_const_s const INT_CONST[] = {
{"KARTSPEED_EASY", KARTSPEED_EASY}, {"KARTSPEED_EASY", KARTSPEED_EASY},
{"KARTSPEED_NORMAL", KARTSPEED_NORMAL}, {"KARTSPEED_NORMAL", KARTSPEED_NORMAL},
{"KARTSPEED_HARD", KARTSPEED_HARD}, {"KARTSPEED_HARD", KARTSPEED_HARD},
// screen.h constants
{"BASEVIDWIDTH", BASEVIDWIDTH},
{"BASEVIDHEIGHT", BASEVIDHEIGHT},
// Custom client features exposed to lua // Custom client features exposed to lua
{"FEATURE_INTERMISSIONHUD",1}, // This is to trick kart luas that look for this since its already here. {"FEATURE_INTERMISSIONHUD",1}, // This is to trick kart luas that look for this since its already here.
{"FEATURE_VOTEHUD",1}, {"FEATURE_VOTEHUD",1},
// tripwirestate_t
{"TRIPSTATE_NONE", TRIPSTATE_NONE},
{"TRIPSTATE_PASSED", TRIPSTATE_PASSED},
{"TRIPSTATE_BLOCKED", TRIPSTATE_BLOCKED},
// tripwirepass_t
{"TRIPWIRE_NONE", TRIPWIRE_NONE},
{"TRIPWIRE_IGNORE", TRIPWIRE_IGNORE},
{"TRIPWIRE_BOOST", TRIPWIRE_BOOST},
{"TRIPWIRE_BLASTER", TRIPWIRE_BLASTER},
// awardscaledrings_t
{"ASR_ITEMBOX", ASR_ITEMBOX},
{"ASR_SUPERRING", ASR_SUPERRING},
{NULL,0} {NULL,0}
}; };

View file

@ -16,6 +16,7 @@
#include "doomdef.h" // Constants #include "doomdef.h" // Constants
#include "d_think.h" // actionf_t #include "d_think.h" // actionf_t
#include "info.h" // Mobj, state, sprite, etc constants #include "info.h" // Mobj, state, sprite, etc constants
#include "m_menu.h" // NUMMENUFREESLOTS
#include "lua_script.h" #include "lua_script.h"
#ifdef __cplusplus #ifdef __cplusplus
@ -27,6 +28,7 @@ extern "C" {
extern char *FREE_STATES[NUMSTATEFREESLOTS]; extern char *FREE_STATES[NUMSTATEFREESLOTS];
extern char *FREE_MOBJS[NUMMOBJFREESLOTS]; extern char *FREE_MOBJS[NUMMOBJFREESLOTS];
extern char *FREE_SKINCOLORS[NUMCOLORFREESLOTS]; extern char *FREE_SKINCOLORS[NUMCOLORFREESLOTS];
extern char *FREE_MENUS[NUMMENUFREESLOTS];
extern UINT8 used_spr[(NUMSPRITEFREESLOTS / 8) + 1]; // Bitwise flag for sprite freeslot in use! I would use ceil() here if I could, but it only saves 1 byte of memory anyway. extern UINT8 used_spr[(NUMSPRITEFREESLOTS / 8) + 1]; // Bitwise flag for sprite freeslot in use! I would use ceil() here if I could, but it only saves 1 byte of memory anyway.
#define initfreeslots() {\ #define initfreeslots() {\
@ -51,6 +53,16 @@ struct actionpointer_t
const char *name; ///< Name of the action in ALL CAPS. const char *name; ///< Name of the action in ALL CAPS.
}; };
struct menu_routine_s {
const char *name;
void (*routine)(INT32);
};
struct menu_drawer_s {
const char *name;
void (*drawer)(void);
};
struct int_const_s { struct int_const_s {
const char *n; const char *n;
// has to be able to hold both fixed_t and angle_t, so drastic measure!! // has to be able to hold both fixed_t and angle_t, so drastic measure!!
@ -62,6 +74,7 @@ extern actionpointer_t actionpointers[]; // Array mapping action names to action
extern const char *const STATE_LIST[]; extern const char *const STATE_LIST[];
extern struct int_const_s const STATE_ALIASES[]; extern struct int_const_s const STATE_ALIASES[];
extern const char *const MOBJTYPE_LIST[]; extern const char *const MOBJTYPE_LIST[];
extern struct int_const_s const MOBJ_ALIASES[];
extern const char *const MOBJFLAG_LIST[]; extern const char *const MOBJFLAG_LIST[];
extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2 extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
extern const char *const MOBJEFLAG_LIST[]; extern const char *const MOBJEFLAG_LIST[];
@ -70,6 +83,7 @@ extern const char *const PLAYERFLAG_LIST[];
extern const char *const ITEMFLAG_LIST[]; extern const char *const ITEMFLAG_LIST[];
extern const char *const GAMETYPERULE_LIST[]; extern const char *const GAMETYPERULE_LIST[];
extern const char *const ML_LIST[]; // Linedef flags extern const char *const ML_LIST[]; // Linedef flags
extern const char *const ML_LIST_KART[]; // Linedef flags for Kart
extern const char *const MSF_LIST[]; // Sector flags extern const char *const MSF_LIST[]; // Sector flags
extern const char *const SSF_LIST[]; // Sector special flags extern const char *const SSF_LIST[]; // Sector special flags
extern const char *const SD_LIST[]; // Sector damagetype extern const char *const SD_LIST[]; // Sector damagetype
@ -80,6 +94,8 @@ extern const char *const KARTSTUFF_LIST[];
extern const char *const KARTHUD_LIST[]; extern const char *const KARTHUD_LIST[];
extern const char *const HUDITEMS_LIST[]; extern const char *const HUDITEMS_LIST[];
extern const char *const MENUTYPES_LIST[]; extern const char *const MENUTYPES_LIST[];
extern struct menu_routine_s const MENU_ROUTINES[];
extern struct menu_drawer_s const MENU_DRAWERS[];
extern struct int_const_s const INT_CONST[]; extern struct int_const_s const INT_CONST[];

View file

@ -234,6 +234,15 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
readfollower(f); readfollower(f);
continue; continue;
} }
// sigh... menu hack
else if (fastcmp(word, "DISCORDONLY"))
{
#ifdef HAVE_DISCORDRPC
continue;
#else
break;
#endif
}
word2 = strtok(NULL, " "); word2 = strtok(NULL, " ");
if (word2) { if (word2) {
@ -316,7 +325,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
i = get_mobjtype(word2); // find a thing by name i = get_mobjtype(word2); // find a thing by name
if (i < NUMMOBJTYPES && i >= 0) if (i < NUMMOBJTYPES && i >= 0)
{ {
if (i < (MT_FIRSTFREESLOT+freeslotusage[1][1])) if (!mainfile && i < (MT_FIRSTFREESLOT+freeslotusage[1][1]))
{ {
G_SetGameModified(multiplayer, true); // Only a major mod if editing stuff that isn't your own! G_SetGameModified(multiplayer, true); // Only a major mod if editing stuff that isn't your own!
} }
@ -435,7 +444,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
i = get_state(word2); // find a state by name i = get_state(word2); // find a state by name
if (i < NUMSTATES && i >= 0) if (i < NUMSTATES && i >= 0)
{ {
if (i < (S_FIRSTFREESLOT+freeslotusage[0][1])) if (!mainfile && i < (S_FIRSTFREESLOT+freeslotusage[0][1]))
{ {
G_SetGameModified(multiplayer, true); // Only a major mod if editing stuff that isn't your own! G_SetGameModified(multiplayer, true); // Only a major mod if editing stuff that isn't your own!
} }
@ -462,6 +471,9 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
} }
else if (fastcmp(word, "MENU")) else if (fastcmp(word, "MENU"))
{ {
if (dedicated)
continue; // dedis don't need menus, silly!
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_menutype(word2); // find a huditem by name i = get_menutype(word2); // find a huditem by name
if (i >= 1 && i < NUMMENUTYPES) if (i >= 1 && i < NUMMENUTYPES)
@ -517,7 +529,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
while (cup) while (cup)
{ {
if (hash == cup->namehash && fastcmp(cup->name, word2)) if (!mainfile && hash == cup->namehash && fastcmp(cup->name, word2))
{ {
// Only a major mod if editing stuff that isn't your own! // Only a major mod if editing stuff that isn't your own!
G_SetGameModified(multiplayer, true); G_SetGameModified(multiplayer, true);
@ -650,13 +662,13 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (introchanged) if (introchanged)
{ {
menuactive = false; M_ClearMenus(true);
I_UpdateMouseGrab(); I_UpdateMouseGrab();
COM_BufAddText("playintro"); COM_BufAddText("playintro");
} }
else if (titlechanged) else if (titlechanged)
{ {
menuactive = false; M_ClearMenus(true);
I_UpdateMouseGrab(); I_UpdateMouseGrab();
COM_BufAddText("exitgame"); // Command_ExitGame_f() but delayed COM_BufAddText("exitgame"); // Command_ExitGame_f() but delayed
} }

View file

@ -312,6 +312,20 @@ void DRPC_RemoveRequest(discordRequest_t *removeRequest)
Z_Free(removeRequest); Z_Free(removeRequest);
} }
#ifdef _DEBUG
static boolean comregistered = false;
static void COM_DiscordTest_f(void)
{
DiscordUser test = {
.username = "Jeffma Balls",
.discriminator = "6942",
.userId = "69420694206942069",
.avatar = NULL, // doesn't matter
};
DRPC_HandleJoinRequest(&test);
}
#endif
/*-------------------------------------------------- /*--------------------------------------------------
void DRPC_Init(void) void DRPC_Init(void)
@ -334,6 +348,14 @@ void DRPC_Init(void)
Discord_Initialize(DISCORD_APPID, &handlers, 1, NULL); Discord_Initialize(DISCORD_APPID, &handlers, 1, NULL);
I_AddExitFunc(DRPC_Shutdown); I_AddExitFunc(DRPC_Shutdown);
DRPC_UpdatePresence(); DRPC_UpdatePresence();
#ifdef _DEBUG
if (!comregistered)
{
COM_AddCommand("discordtest", COM_DiscordTest_f);
comregistered = true;
}
#endif
} }
void DRPC_Shutdown(void) void DRPC_Shutdown(void)

View file

@ -144,11 +144,6 @@ enum
ML_MIDSOLID = 0x00000200, ML_MIDSOLID = 0x00000200,
ML_WRAPMIDTEX = 0x00000400, ML_WRAPMIDTEX = 0x00000400,
// Compat for old lua scripts.
ML_NOSONIC = 0x00000800,
ML_NOTAILS = 0x00001000,
ML_NOKNUX = 0x00002000,
// Apply effect only in netgames // Apply effect only in netgames
ML_NETONLY = 0x00000800, ML_NETONLY = 0x00000800,
ML_NETONLY_OLD = 0x00003800, // Combination of old ML_NOSONIC, ML_NOTAILS and ML_NOKNUX ML_NETONLY_OLD = 0x00003800, // Combination of old ML_NOSONIC, ML_NOTAILS and ML_NOKNUX

View file

@ -101,7 +101,7 @@
extern "C" { extern "C" {
#endif #endif
#define NOMD5 //#define NOMD5
// Uncheck this to compile debugging code // Uncheck this to compile debugging code
//#define RANGECHECK //#define RANGECHECK
@ -202,6 +202,7 @@ extern char logfilename[1024];
#define PLAYERSMASK (MAXPLAYERS-1) #define PLAYERSMASK (MAXPLAYERS-1)
#define MAXPLAYERNAME 21 #define MAXPLAYERNAME 21
#define MAXSPLITSCREENPLAYERS 4 // Max number of players on a single computer #define MAXSPLITSCREENPLAYERS 4 // Max number of players on a single computer
#define MAXGAMEPADS (MAXSPLITSCREENPLAYERS * 2) // Number of gamepads we'll be allowing
#define MAXSKINS UINT8_MAX #define MAXSKINS UINT8_MAX
#define MAXFOLLOWERS UINT16_MAX #define MAXFOLLOWERS UINT16_MAX
@ -491,10 +492,6 @@ extern int compuncommitted;
/// Dumps the contents of a network save game upon consistency failure for debugging. /// Dumps the contents of a network save game upon consistency failure for debugging.
//#define DUMPCONSISTENCY //#define DUMPCONSISTENCY
/// Who put weights on my recycler? ... Inuyasha did.
/// \note XMOD port.
//#define WEIGHTEDRECYCLER
/// Allow loading of savegames between different versions of the game. /// Allow loading of savegames between different versions of the game.
/// \note XMOD port. /// \note XMOD port.
/// Most modifications should probably enable this. /// Most modifications should probably enable this.
@ -561,10 +558,6 @@ extern int compuncommitted;
#undef UPDATE_ALERT #undef UPDATE_ALERT
#endif #endif
/// - SRB2Kart options -
/// Camera always has noclip.
#define NOCLIPCAM
// p_sight.c // p_sight.c
#define TRAVERSE_MAX 8 #define TRAVERSE_MAX 8

View file

@ -76,7 +76,6 @@ typedef enum
PRECIP_RAIN, PRECIP_RAIN,
PRECIP_SNOW, PRECIP_SNOW,
PRECIP_BLIZZARD,
PRECIP_STORM, PRECIP_STORM,
PRECIP_STORM_NORAIN, PRECIP_STORM_NORAIN,
PRECIP_STORM_NOSTRIKES, PRECIP_STORM_NOSTRIKES,
@ -116,6 +115,7 @@ struct recorddata_t
//UINT32 score; ///< Score when the level was finished. //UINT32 score; ///< Score when the level was finished.
//UINT16 rings; ///< Rings when the level was finished. //UINT16 rings; ///< Rings when the level was finished.
}; };
#define MAXMAPRECORDS 4
// mapvisited is now a set of flags that says what we've done in the map. // mapvisited is now a set of flags that says what we've done in the map.
#define MV_VISITED (1) #define MV_VISITED (1)
@ -127,7 +127,6 @@ struct recorddata_t
// Set if homebrew PWAD stuff has been added. // Set if homebrew PWAD stuff has been added.
extern boolean modifiedgame; extern boolean modifiedgame;
extern boolean majormods; extern boolean majormods;
extern UINT16 mainwads;
extern boolean savemoddata; // This mod saves time/emblem data. extern boolean savemoddata; // This mod saves time/emblem data.
extern boolean imcontinuing; // Temporary flag while continuing extern boolean imcontinuing; // Temporary flag while continuing
extern boolean metalrecording; extern boolean metalrecording;
@ -172,7 +171,6 @@ extern boolean digital_disabled;
// ========================= // =========================
// //
extern boolean menuactive; // Menu overlaid?
extern UINT8 paused; // Game paused? extern UINT8 paused; // Game paused?
extern UINT8 window_notinfocus; // are we in focus? (backend independant -- handles auto pausing and display of "focus lost" message) extern UINT8 window_notinfocus; // are we in focus? (backend independant -- handles auto pausing and display of "focus lost" message)
extern INT32 window_x; extern INT32 window_x;
@ -181,7 +179,6 @@ extern INT32 window_y;
extern boolean nodrawers; extern boolean nodrawers;
extern boolean noblit; extern boolean noblit;
extern boolean lastdraw; extern boolean lastdraw;
extern postimg_t postimgtype[MAXSPLITSCREENPLAYERS];
extern INT32 postimgparam[MAXSPLITSCREENPLAYERS]; extern INT32 postimgparam[MAXSPLITSCREENPLAYERS];
extern INT32 viewwindowx, viewwindowy; extern INT32 viewwindowx, viewwindowy;
@ -195,25 +192,12 @@ extern INT32 displayplayers[MAXSPLITSCREENPLAYERS];
/* g_localplayers[0] = consoleplayer */ /* g_localplayers[0] = consoleplayer */
extern INT32 g_localplayers[MAXSPLITSCREENPLAYERS]; extern INT32 g_localplayers[MAXSPLITSCREENPLAYERS];
/* spitscreen players sync */
extern INT32 splitscreen_original_party_size[MAXPLAYERS];
extern INT32 splitscreen_original_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS];
/* parties */
extern INT32 splitscreen_invitations[MAXPLAYERS];
extern INT32 splitscreen_party_size[MAXPLAYERS];
extern INT32 splitscreen_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS];
/* the only local one */
extern boolean splitscreen_partied[MAXPLAYERS];
extern char * titlemap; extern char * titlemap;
extern boolean hidetitlepics; extern boolean hidetitlepics;
extern char * bootmap; //bootmap for loading a map on startup extern char * bootmap; //bootmap for loading a map on startup
extern char * tutorialmap; // map to load for tutorial extern char * tutorialmap; // map to load for tutorial
extern boolean tutorialmode; // are we in a tutorial right now? extern boolean tutorialmode; // are we in a tutorial right now?
extern INT32 tutorialgcs; // which control scheme is loaded?
extern boolean looptitle; extern boolean looptitle;
@ -384,80 +368,81 @@ extern UINT16 numkartcupheaders;
struct mapheader_t struct mapheader_t
{ {
// Core game information, not user-modifiable directly // Core game information, not user-modifiable directly
char *lumpname; ///< Lump name can be really long char *lumpname; ///< Lump name can be really long
UINT32 lumpnamehash; ///< quickncasehash(->lumpname, MAXMAPLUMPNAME) UINT32 lumpnamehash; ///< quickncasehash(->lumpname, MAXMAPLUMPNAME)
lumpnum_t lumpnum; ///< Lump number for the map, used by vres_GetMap lumpnum_t lumpnum; ///< Lump number for the map, used by vres_GetMap
void *thumbnailPic; ///< Lump data for the level select thumbnail. void *thumbnailPic; ///< Lump data for the level select thumbnail.
void *minimapPic; ///< Lump data for the minimap graphic. void *minimapPic; ///< Lump data for the minimap graphic.
UINT8 mapvisited; ///< A set of flags that says what we've done in the map. UINT8 mapvisited; ///< A set of flags that says what we've done in the map.
recorddata_t *mainrecord; ///< Stores best time attack data recorddata_t *mainrecord[MAXMAPRECORDS]; ///< Stores best time attack data
cupheader_t *cup; ///< Cached cup cupheader_t *cup; ///< Cached cup
// Titlecard information // Titlecard information
char lvlttl[22]; ///< Level name without "Zone". (21 character limit instead of 32, 21 characters can display on screen max anyway) char lvlttl[22]; ///< Level name without "Zone". (21 character limit instead of 32, 21 characters can display on screen max anyway)
char subttl[33]; ///< Subtitle for level char subttl[33]; ///< Subtitle for level
char zonttl[22]; ///< "ZONE" replacement name char zonttl[22]; ///< "ZONE" replacement name
char actnum[3]; ///< SRB2Kart: Now a 2 character long string. char actnum[3]; ///< SRB2Kart: Now a 2 character long string.
// Selection metadata // Selection metadata
char keywords[33]; ///< Keywords separated by space to search for. 32 characters. char keywords[33]; ///< Keywords separated by space to search for. 32 characters.
SINT8 unlockrequired; ///< Is an unlockable required to play this level? -1 if no. SINT8 unlockrequired; ///< Is an unlockable required to play this level? -1 if no.
UINT8 levelselect; ///< Is this map available in the level select? If so, which map list is it available in? UINT8 levelselect; ///< Is this map available in the level select? If so, which map list is it available in?
UINT8 menuflags; ///< LF2_flags: options that affect record attack menus UINT8 menuflags; ///< LF2_flags: options that affect record attack menus
// Operational metadata // Operational metadata
UINT16 levelflags; ///< LF_flags: merged booleans into one UINT16 for space, see below UINT16 levelflags; ///< LF_flags: merged booleans into one UINT16 for space, see below
UINT32 typeoflevel; ///< Combination of typeoflevel flags. UINT32 typeoflevel; ///< Combination of typeoflevel flags.
UINT8 numlaps; ///< Number of laps in circuit mode, unless overridden. UINT8 numlaps; ///< Number of laps in circuit mode, unless overridden.
UINT8 lapspersection; ///< Number of laps per section in hybrid section-circuit maps. UINT8 lapspersection; ///< Number of laps per section in hybrid section-circuit maps.
fixed_t gravity; ///< Map-wide gravity. fixed_t gravity; ///< Map-wide gravity.
// Music information // Music information
char musname[MAXMUSNAMES][7]; ///< Music tracks to play. First dimension is the track number, second is the music string. "" for no music. char musname[MAXMUSNAMES][7]; ///< Music tracks to play. First dimension is the track number, second is the music string. "" for no music.
UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore. UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore.
UINT32 muspos; ///< Music position to jump to. UINT32 muspos; ///< Music position to jump to.
UINT8 musname_size; ///< Number of music tracks defined UINT8 musname_size; ///< Number of music tracks defined
// Sky information // Sky information
UINT8 weather; ///< See preciptype_t UINT8 weather; ///< See preciptype_t
char skytexture[9]; ///< Sky texture to use. char skytexture[9]; ///< Sky texture to use.
INT16 skybox_scalex; ///< Skybox X axis scale. (0 = no movement, 1 = 1:1 movement, 16 = 16:1 slow movement, -4 = 1:4 fast movement, etc.) INT16 skybox_scalex; ///< Skybox X axis scale. (0 = no movement, 1 = 1:1 movement, 16 = 16:1 slow movement, -4 = 1:4 fast movement, etc.)
INT16 skybox_scaley; ///< Skybox Y axis scale. INT16 skybox_scaley; ///< Skybox Y axis scale.
INT16 skybox_scalez; ///< Skybox Z axis scale. INT16 skybox_scalez; ///< Skybox Z axis scale.
// Distance information // Distance information
fixed_t mobj_scale; ///< Defines the size all object calculations are relative to fixed_t mobj_scale; ///< Defines the size all object calculations are relative to
fixed_t default_waypoint_radius; ///< 0 is a special value for DEFAULT_WAYPOINT_RADIUS, but scaled with mobjscale fixed_t default_waypoint_radius; ///< 0 is a special value for DEFAULT_WAYPOINT_RADIUS, but scaled with mobjscale
// Visual information // Visual information
UINT16 palette; ///< PAL lump to use on this map UINT16 palette; ///< PAL lump to use on this map
UINT16 encorepal; ///< PAL for encore mode UINT16 encorepal; ///< PAL for encore mode
mapheader_lighting_t lighting; ///< Wall and sprite lighting mapheader_lighting_t lighting; ///< Wall and sprite lighting
mapheader_lighting_t lighting_encore; ///< Alternative lighting for Encore mode mapheader_lighting_t lighting_encore; ///< Alternative lighting for Encore mode
boolean use_encore_lighting; ///< Whether to use separate Encore lighting boolean use_encore_lighting; ///< Whether to use separate Encore lighting
// Freed animal information // Freed animal information
UINT8 numFlickies; ///< Internal. For freed flicky support. UINT8 numFlickies; ///< Internal. For freed flicky support.
mobjtype_t *flickies; ///< List of freeable flickies in this level. Allocated dynamically for space reasons. Be careful. mobjtype_t *flickies; ///< List of freeable flickies in this level. Allocated dynamically for space reasons. Be careful.
// Script information // Script information
char runsoc[33]; ///< SOC to execute at start of level (32 character limit instead of 63) char runsoc[33]; ///< SOC to execute at start of level (32 character limit instead of 63)
char scriptname[33]; ///< Script to use when the map is switched to. (32 character limit instead of 191) char scriptname[33]; ///< Script to use when the map is switched to. (32 character limit instead of 191)
// Cutscene information // Cutscene information
UINT8 precutscenenum; ///< Cutscene number to play BEFORE a level starts. UINT8 precutscenenum; ///< Cutscene number to play BEFORE a level starts.
UINT8 cutscenenum; ///< Cutscene number to use, 0 for none. UINT8 cutscenenum; ///< Cutscene number to use, 0 for none.
// Lua information // Lua information
UINT8 numCustomOptions; ///< Internal. For Lua custom value support. UINT8 numCustomOptions; ///< Internal. For Lua custom value support.
customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful. customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful.
// BlanKart // BlanKart
boolean use_walltransfer; ///< Whether to use DRRR style wall transfering or not boolean use_walltransfer; ///< Whether to use RR style wall transfering or not
boolean use_terrain; ///< Whether to use gameplay affecting Terrain effects or not (leaves visuals alone)
}; };
@ -545,12 +530,20 @@ enum TypeOfLevel
TOL_BATTLE = 0x0002, ///< Battle TOL_BATTLE = 0x0002, ///< Battle
TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden) TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden)
// Compat
TOL_COMPAT1 = 0x0008, ///< For compat. Handles all the unused kart v1 types.
TOL_COMPAT2 = 0x0010, ///< ^
TOL_COMPAT3 = 0x0020, ///< ^
TOL_COMPAT4 = 0x0040, ///< ^
TOL_COMPAT5 = 0x0080, ///< ^
TOL_COMPAT6 = 0x0100, ///< ^
// Modifiers // Modifiers
TOL_TV = 0x0100 ///< Midnight Channel specific: draw TV like overlay on HUD TOL_TV = 0x0200 ///< Midnight Channel specific: draw TV like overlay on HUD
}; };
#define MAXTOL (1<<31) #define MAXTOL (1<<31)
#define NUMBASETOLNAMES (4) #define NUMBASETOLNAMES (10)
#define NUMTOLNAMES (NUMBASETOLNAMES + NUMGAMETYPEFREESLOTS) #define NUMTOLNAMES (NUMBASETOLNAMES + NUMGAMETYPEFREESLOTS)
struct tolinfo_t struct tolinfo_t
@ -760,7 +753,6 @@ extern boolean singletics;
#include "d_clisrv.h" #include "d_clisrv.h"
extern consvar_t cv_showinputjoy; // display joystick in time attack
extern consvar_t cv_forceskin; // force clients to use the server's skin extern consvar_t cv_forceskin; // force clients to use the server's skin
extern consvar_t cv_downloading; // allow clients to downloading WADs. extern consvar_t cv_downloading; // allow clients to downloading WADs.
extern consvar_t cv_nettimeout; // SRB2Kart: Advanced server options menu extern consvar_t cv_nettimeout; // SRB2Kart: Advanced server options menu

View file

@ -340,17 +340,6 @@ union FColorRGBA
} ATTRPACK; } ATTRPACK;
typedef union FColorRGBA RGBA_t; typedef union FColorRGBA RGBA_t;
typedef enum
{
postimg_none,
postimg_water,
postimg_motion,
postimg_flip,
postimg_heat,
postimg_mirror,
postimg_mirrorflip
} postimg_t;
typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num) typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num)
#define LUMPERROR UINT32_MAX #define LUMPERROR UINT32_MAX

View file

@ -911,13 +911,19 @@ static const char *blancredits[] = {
"", "",
"\1Support Programming", "\1Support Programming",
"\"hayaunderscore\" aka \"DeltaKaynx\"", "\"hayaunderscore\" aka \"DeltaKaynx\"",
"\"WumboSpasm\"",
"\"Anonimous\"",
"", "",
"\1External Programming", "\1External Programming",
"\"Hanicef\"",
"\"Lactozilla\"",
"\"xyzzy\"", "\"xyzzy\"",
"\"SuperJustinBros\"", "\"SuperJustinBros\"",
"", "",
"\1Ring Racers Programming", "\1Ring Racers Programming",
"Kart Krew Dev", "Kart Krew Dev",
"\"JugadorXEI\"",
"\"Kimberly\"",
"", "",
"\1New Graphics Creation", "\1New Graphics Creation",
"\"Spee\"", "\"Spee\"",
@ -928,6 +934,7 @@ static const char *blancredits[] = {
"\"Sunflower\" aka \"AnimeSonic\"", "\"Sunflower\" aka \"AnimeSonic\"",
"Sunflower's Garden", "Sunflower's Garden",
"The Moe Mansion and Birdhouse Team", "The Moe Mansion and Birdhouse Team",
"SRB2Kart Saturn Contributors",
"", "",
"", "",
"\1Thank you", "\1Thank you",
@ -955,7 +962,7 @@ void F_BlanStartCredits(void)
S_StopMusic(); S_StopMusic();
S_StopSounds(); S_StopSounds();
S_ChangeMusicInternal("KMAP04", true); S_ChangeMusicInternal("BLANCD", true);
S_ShowMusicCredit(); S_ShowMusicCredit();
finalecount = 0; finalecount = 0;
@ -1164,8 +1171,6 @@ void F_GameEndTicker(void)
void F_InitMenuPresValues(void) void F_InitMenuPresValues(void)
{ {
menuanimtimer = 0; menuanimtimer = 0;
prevMenuId = 0;
activeMenuId = MainDef.menuid;
// Set defaults for presentation values // Set defaults for presentation values
strncpy(curbgname, "TITLESKY", 9); strncpy(curbgname, "TITLESKY", 9);
@ -1607,7 +1612,7 @@ void F_TitleScreenTicker(boolean run)
} }
// Hold up for a bit if menu or console active // Hold up for a bit if menu or console active
if (menuactive || CON_Ready()) if (menustack[0] || CON_Ready())
{ {
demoIdleLeft = demoIdleTime; demoIdleLeft = demoIdleTime;
return; return;
@ -2236,12 +2241,13 @@ void F_StartTextPrompt(INT32 promptnum, INT32 pagenum, mobj_t *mo, UINT16 postex
static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length) static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length)
{ {
INT32 gcs = gcs_custom; INT32 gcs = 0;
boolean suffixed = true; boolean suffixed = true;
if (!tag || !tag[0] || !tutorialmode) if (!tag || !tag[0] || !tutorialmode)
return false; return false;
/*
if (!strncmp(tag, "TAA", 3)) // Accelerate if (!strncmp(tag, "TAA", 3)) // Accelerate
gcs = G_GetControlScheme(gamecontrol[0], gcl_accelerate, num_gcl_accelerate); gcs = G_GetControlScheme(gamecontrol[0], gcl_accelerate, num_gcl_accelerate);
else if (!strncmp(tag, "TAB", 3)) // Brake else if (!strncmp(tag, "TAB", 3)) // Brake
@ -2254,14 +2260,10 @@ static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length)
gcs = G_GetControlScheme(gamecontrol[0], gcl_item, num_gcl_item); gcs = G_GetControlScheme(gamecontrol[0], gcl_item, num_gcl_item);
else else
gcs = G_GetControlScheme(gamecontrol[0], gcl_full, num_gcl_full); gcs = G_GetControlScheme(gamecontrol[0], gcl_full, num_gcl_full);
*/
switch (gcs) switch (gcs)
{ {
case gcs_kart:
// strncat(tag, "KART", length);
suffixed = false;
break;
default: default:
strncat(tag, "CUSTOM", length); strncat(tag, "CUSTOM", length);
break; break;

View file

@ -21,11 +21,7 @@
#define RPC_NO_WINDOWS_H #define RPC_NO_WINDOWS_H
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef _WIN32_WCE
#include "sdl12/SRB2CE/cehelp.h"
#else
#include <sys/stat.h> #include <sys/stat.h>
#endif
#include <string.h> #include <string.h>
#include "filesrch.h" #include "filesrch.h"
@ -34,7 +30,7 @@
#include "z_zone.h" #include "z_zone.h"
#include "m_menu.h" // Addons_option_Onchange #include "m_menu.h" // Addons_option_Onchange
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && defined (_MSC_VER) && !defined (_XBOX) #if defined (_WIN32) && defined (_MSC_VER) && !defined (_XBOX)
#include <errno.h> #include <errno.h>
#include <io.h> #include <io.h>
@ -314,7 +310,7 @@ static CV_PossibleValue_t addons_cons_t[] = {{0, "Default"},
#endif #endif
{3, "CUSTOM"}, {0, NULL}}; {3, "CUSTOM"}, {0, NULL}};
consvar_t cv_addons_option = CVAR_INIT ("addons_option", "Default", CV_SAVE|CV_CALL, addons_cons_t, Addons_option_Onchange); consvar_t cv_addons_option = CVAR_INIT ("addons_option", "Default", CV_SAVE|CV_CALL|CV_NOINIT, addons_cons_t, Addons_option_Onchange);
consvar_t cv_addons_folder = CVAR_INIT ("addons_folder", "", CV_SAVE, NULL, NULL); consvar_t cv_addons_folder = CVAR_INIT ("addons_folder", "", CV_SAVE, NULL, NULL);
static CV_PossibleValue_t addons_md5_cons_t[] = {{0, "Name"}, {1, "Contents"}, {0, NULL}}; static CV_PossibleValue_t addons_md5_cons_t[] = {{0, "Name"}, {1, "Contents"}, {0, NULL}};
@ -371,76 +367,6 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
return false; return false;
} }
#elif defined (_WIN32_WCE)
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
boolean completepath, int maxsearchdepth)
{
#ifdef __GNUC__
//NONE?
startpath = filename = NULL;
wantedmd5sum = NULL;
maxsearchdepth = 0;
completepath = false;
#else
WIN32_FIND_DATA dta;
HANDLE searchhandle = INVALID_HANDLE_VALUE;
const wchar_t wm[4] = L"*.*";
//if (startpath) SetCurrentDirectory(startpath);
if (FIL_ReadFileOK(filename))
{
// checkfilemd5 returns an FS_* value, either FS_FOUND or FS_MD5SUMBAD
return checkfilemd5(filename, wantedmd5sum);
}
ZeroMemory(&dta,sizeof (dta));
if (maxsearchdepth)
searchhandle = FindFirstFile(wm,&dta);
if (searchhandle != INVALID_HANDLE_VALUE)
{
do
{
if ((dta.cFileName[0]!='.') && (dta.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
//if (SetCurrentDirectory(dta.cFileName))
{ // can fail if we haven't the right
filestatus_t found;
found = filesearch(filename,NULL,wantedmd5sum,completepath,maxsearchdepth-1);
//SetCurrentDirectory("..");
if (found == FS_FOUND || found == FS_MD5SUMBAD)
{
if (completepath)
strcatbf(filename,(char *)dta.cFileName,"\\");
FindClose(searchhandle);
return found;
}
}
}
} while (FindNextFile(searchhandle,&dta)==0);
FindClose(searchhandle);
}
#endif
return FS_NOTFOUND;
}
void closefilemenu(boolean validsize)
{
(void)validsize;
return;
}
void searchfilemenu(char *tempname)
{
(void)tempname;
return;
}
boolean preparefilemenu(boolean samedepth, boolean replayhut)
{
(void)samedepth;
(void)replayhut;
return false;
}
#else #else
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum, boolean completepath, int maxsearchdepth) filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum, boolean completepath, int maxsearchdepth)
@ -730,6 +656,10 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
return false; return false;
} }
if (dirmenu != coredirmenu)
Z_Free(dirmenu);
dirmenu = NULL;
for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items
{ {
Z_Free(coredirmenu[sizecoredirmenu-1]); Z_Free(coredirmenu[sizecoredirmenu-1]);

View file

@ -40,6 +40,7 @@
#include "lua_hook.h" #include "lua_hook.h"
#include "md5.h" // demo checksums #include "md5.h" // demo checksums
#include "p_saveg.h" // savebuffer_t #include "p_saveg.h" // savebuffer_t
#include "g_party.h"
// SRB2Kart // SRB2Kart
#include "d_netfil.h" // nameonly #include "d_netfil.h" // nameonly
@ -53,6 +54,7 @@
#include "k_color.h" #include "k_color.h"
#include "k_follower.h" #include "k_follower.h"
#include "k_grandprix.h" #include "k_grandprix.h"
#include "g_party.h"
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}}; static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL); consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL);
@ -147,6 +149,7 @@ demoghost *ghosts = NULL;
#define ZT_BOT_TURN 0x0001 #define ZT_BOT_TURN 0x0001
#define ZT_BOT_ITEM 0x0002 #define ZT_BOT_ITEM 0x0002
#define ZT_BOT_RESPAWN 0x0004
#define DEMOMARKER 0x80 // demobuf.end #define DEMOMARKER 0x80 // demobuf.end
@ -579,6 +582,8 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
oldcmd[playernum].bot.turnconfirm = READSINT8(demobuf.p); oldcmd[playernum].bot.turnconfirm = READSINT8(demobuf.p);
if (botziptic & ZT_BOT_ITEM) if (botziptic & ZT_BOT_ITEM)
oldcmd[playernum].bot.itemconfirm = READSINT8(demobuf.p); oldcmd[playernum].bot.itemconfirm = READSINT8(demobuf.p);
if (botziptic & ZT_BOT_RESPAWN)
oldcmd[playernum].bot.respawnconfirm = READSINT8(demobuf.p);
} }
G_CopyTiccmd(cmd, &oldcmd[playernum], 1); G_CopyTiccmd(cmd, &oldcmd[playernum], 1);
@ -695,6 +700,13 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
botziptic |= ZT_BOT_ITEM; botziptic |= ZT_BOT_ITEM;
} }
if (cmd->bot.respawnconfirm != oldcmd[playernum].bot.respawnconfirm)
{
WRITESINT8(demobuf.p, cmd->bot.respawnconfirm);
oldcmd[playernum].bot.respawnconfirm = cmd->bot.respawnconfirm;
botziptic |= ZT_BOT_RESPAWN;
}
WRITEUINT16(botziptic_p, botziptic); WRITEUINT16(botziptic_p, botziptic);
} }
@ -1651,13 +1663,11 @@ void G_ConfirmRewind(tic_t rewindtime)
{ {
SINT8 i; SINT8 i;
tic_t j; tic_t j;
boolean oldmenuactive = menuactive, oldsounddisabled = sound_disabled; boolean oldsounddisabled = sound_disabled;
INT32 olddp1 = displayplayers[0], olddp2 = displayplayers[1], olddp3 = displayplayers[2], olddp4 = displayplayers[3]; INT32 olddp1 = displayplayers[0], olddp2 = displayplayers[1], olddp3 = displayplayers[2], olddp4 = displayplayers[3];
UINT8 oldss = splitscreen; UINT8 oldss = splitscreen;
menuactive = false; // Prevent loops
CV_StealthSetValue(&cv_renderview, 0); CV_StealthSetValue(&cv_renderview, 0);
if (rewindtime <= starttime) if (rewindtime <= starttime)
@ -1693,16 +1703,12 @@ void G_ConfirmRewind(tic_t rewindtime)
} }
demo.rewinding = false; demo.rewinding = false;
menuactive = oldmenuactive; // Bring the menu back up
sound_disabled = oldsounddisabled; // Re-enable SFX sound_disabled = oldsounddisabled; // Re-enable SFX
wipegamestate = gamestate; // No fading back in! wipegamestate = gamestate; // No fading back in!
COM_BufInsertText("renderview on\n"); COM_BufInsertText("renderview on\n");
if (demo.freecam)
return; // don't touch from there
splitscreen = oldss; splitscreen = oldss;
displayplayers[0] = olddp1; displayplayers[0] = olddp1;
displayplayers[1] = olddp2; displayplayers[1] = olddp2;
@ -2143,11 +2149,11 @@ void G_BeginRecording(void)
demobuf.p += 1; demobuf.p += 1;
totalfiles = 0; totalfiles = 0;
for (i = mainwads; ++i < numwadfiles; ) for (i = NUMMAINWADS-1; ++i < numwadfiles; )
if (wadfiles[i]->important) if (wadfiles[i]->important)
{ {
nameonly(( filename = va("%s", wadfiles[i]->filename) )); nameonly(( filename = va("%s", wadfiles[i]->filename) ));
WRITESTRINGN(demobuf.p, filename, MAX_WADPATH); WRITESTRINGL(demobuf.p, filename, MAX_WADPATH);
WRITEMEM(demobuf.p, wadfiles[i]->md5sum, 16); WRITEMEM(demobuf.p, wadfiles[i]->md5sum, 16);
WRITEUINT8(demobuf.p, wadfiles[i]->compatmode); WRITEUINT8(demobuf.p, wadfiles[i]->compatmode);
@ -2510,7 +2516,7 @@ static UINT8 G_CheckDemoExtraFiles(UINT8 **pp, boolean quick)
for (j = 0; j < numwadfiles; ++j) for (j = 0; j < numwadfiles; ++j)
{ {
if (wadfiles[j]->important && j > mainwads) if (wadfiles[j]->important && j >= NUMMAINWADS)
nmusfilecount++; nmusfilecount++;
else else
continue; continue;
@ -2546,7 +2552,7 @@ static UINT8 G_CheckDemoExtraFiles(UINT8 **pp, boolean quick)
nmusfilecount = 0; nmusfilecount = 0;
for (j = 0; j < numwadfiles; ++j) for (j = 0; j < numwadfiles; ++j)
if (wadfiles[j]->important && j > mainwads) if (wadfiles[j]->important && j >= NUMMAINWADS)
nmusfilecount++; nmusfilecount++;
if (!error && filesloaded < nmusfilecount) if (!error && filesloaded < nmusfilecount)
@ -2995,11 +3001,11 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s is not a SRB2Kart replay file.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s is not a SRB2Kart replay file.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
demobuf.p += 12; // DEMOHEADER demobuf.p += 12; // DEMOHEADER
@ -3015,11 +3021,11 @@ void G_DoPlayDemo(char *defdemoname)
default: default:
snprintf(msg, 1024, M_GetText("%s is an incompatible replay format and cannot be played.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s is an incompatible replay format and cannot be played.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
@ -3033,11 +3039,11 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s is the wrong type of recording and cannot be played.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s is the wrong type of recording and cannot be played.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
@ -3097,12 +3103,12 @@ void G_DoPlayDemo(char *defdemoname)
} }
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
if (!CON_Ready()) // In the console they'll just see the notice there! No point pulling them out.
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
if (!CON_Ready()) // In the console they'll just see the notice there! No point pulling them out.
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
} }
@ -3141,11 +3147,11 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
@ -3169,11 +3175,11 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s contains no data to be played.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s contains no data to be played.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
@ -3203,6 +3209,7 @@ void G_DoPlayDemo(char *defdemoname)
consoleplayer = 0; consoleplayer = 0;
memset(playeringame,0,sizeof(playeringame)); memset(playeringame,0,sizeof(playeringame));
memset(displayplayers,0,sizeof(displayplayers)); memset(displayplayers,0,sizeof(displayplayers));
memset(camera,0,sizeof(camera)); // reset freecam
// Load players that were in-game when the map started // Load players that were in-game when the map started
p = READUINT8(demobuf.p); p = READUINT8(demobuf.p);
@ -3220,11 +3227,11 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s is a Record Attack replay with %s, and is thus invalid.\n"), pdemoname, (bot ? "bots" : "spectators")); snprintf(msg, 1024, M_GetText("%s is a Record Attack replay with %s, and is thus invalid.\n"), pdemoname, (bot ? "bots" : "spectators"));
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
} }
@ -3236,18 +3243,18 @@ void G_DoPlayDemo(char *defdemoname)
{ {
snprintf(msg, 1024, M_GetText("%s is a Record Attack replay with multiple players, and is thus invalid.\n"), pdemoname); snprintf(msg, 1024, M_GetText("%s is a Record Attack replay with multiple players, and is thus invalid.\n"), pdemoname);
CONS_Alert(CONS_ERROR, "%s", msg); CONS_Alert(CONS_ERROR, "%s", msg);
M_StartMessage(msg, NULL, MM_NOTHING);
Z_Free(pdemoname); Z_Free(pdemoname);
P_SaveBufferFree(&demobuf); P_SaveBufferFree(&demobuf);
demo.playback = false; demo.playback = false;
demo.title = false; demo.title = false;
M_StartMessage(msg, NULL, MM_NOTHING);
return; return;
} }
if (!playeringame[displayplayers[0]] || players[displayplayers[0]].spectator) if (!playeringame[displayplayers[0]] || players[displayplayers[0]].spectator)
displayplayers[0] = consoleplayer = serverplayer = p; displayplayers[0] = consoleplayer = serverplayer = p;
playeringame[p] = true; G_AddPlayer(p, p);
players[p].spectator = spectator; players[p].spectator = spectator;
if (flags & DEMO_KICKSTART) if (flags & DEMO_KICKSTART)
@ -3963,7 +3970,10 @@ static void G_StopTimingDemo(void)
if (restorecv_vidwait != cv_vidwait.value) if (restorecv_vidwait != cv_vidwait.value)
CV_SetValue(&cv_vidwait, restorecv_vidwait); CV_SetValue(&cv_vidwait, restorecv_vidwait);
D_AdvanceDemo(); if (timedemo_quit)
COM_ImmedExecute("quit");
else
D_StartTitle();
} }
// reset engine variable set for the demos // reset engine variable set for the demos
@ -3978,13 +3988,13 @@ void G_StopDemo(void)
demo.timing = false; demo.timing = false;
singletics = false; singletics = false;
demo.freecam = false; {
// reset democam shit too: UINT8 i;
democam.cam = NULL; for (i = 0; i < MAXSPLITSCREENPLAYERS; ++i)
democam.soundmobj = NULL; {
democam.localangle = 0; camera[i].freecam = false;
democam.localaiming = 0; }
democam.keyboardlook = false; }
if (gamestate == GS_INTERMISSION) if (gamestate == GS_INTERMISSION)
Y_EndIntermission(); // cleanup Y_EndIntermission(); // cleanup
@ -4021,10 +4031,12 @@ boolean G_CheckDemoStatus(void)
{ {
G_StopDemo(); G_StopDemo();
if (modeattacking) if (timedemo_quit)
M_EndModeAttackRun(); COM_ImmedExecute("quit");
else if (modeattacking)
M_ModeAttackEndGame(0);
else else
D_AdvanceDemo(); D_StartTitle();
} }
return true; return true;
@ -4140,7 +4152,7 @@ boolean G_DemoTitleResponder(event_t *ev)
return true; return true;
} }
if (ch == KEY_ENTER || ch >= KEY_MOUSE1) if (ch == KEY_ENTER || ch >= NUMKEYS)
{ {
demo.savemode = DSM_WILLSAVE; demo.savemode = DSM_WILLSAVE;
return true; return true;
@ -4171,3 +4183,33 @@ boolean G_DemoTitleResponder(event_t *ev)
return true; return true;
} }
void G_SyncDemoParty(INT32 rem, INT32 newsplitscreen)
{
int r_splitscreen_copy = r_splitscreen;
INT32 displayplayers_copy[MAXSPLITSCREENPLAYERS];
memcpy(displayplayers_copy, displayplayers, sizeof displayplayers);
// If we switch away from someone's view, that player
// should be removed from the party.
// However, it is valid to have the player on multiple
// viewports.
// Remove this player
G_LeaveParty(rem);
// And reset the rest of the party
for (int i = 0; i <= r_splitscreen_copy; ++i)
G_LeaveParty(displayplayers_copy[i]);
// Restore the party, without the removed player, and
// with the order matching displayplayers
for (int i = 0; i <= newsplitscreen; ++i)
G_JoinParty(consoleplayer, displayplayers_copy[i]);
// memcpy displayplayers back to preserve duplicates
// (G_JoinParty will not create duplicates itself)
r_splitscreen = newsplitscreen;
memcpy(displayplayers, displayplayers_copy, sizeof displayplayers);
R_ExecuteSetViewSize();
}

View file

@ -123,6 +123,9 @@ extern UINT8 demo_writerng;
#define DXD_COLOR 0x10 // color changed #define DXD_COLOR 0x10 // color changed
#define DXD_FOLLOWER 0x20 // follower was changed #define DXD_FOLLOWER 0x20 // follower was changed
#define DXD_RESPAWN 0x40 // "respawn" command in console #define DXD_RESPAWN 0x40 // "respawn" command in console
#define DXD_ADDPLAYER (DXD_JOINDATA|DXD_PLAYSTATE|DXD_COLOR|DXD_NAME|DXD_SKIN|DXD_FOLLOWER)
#define DXD_WEAPONPREF 0x80 // netsynced playsim settings were changed #define DXD_WEAPONPREF 0x80 // netsynced playsim settings were changed
#define DXD_PST_PLAYING 0x01 #define DXD_PST_PLAYING 0x01
@ -197,6 +200,8 @@ void G_SaveDemo(void);
boolean G_DemoTitleResponder(event_t *ev); boolean G_DemoTitleResponder(event_t *ev);
void G_SyncDemoParty(INT32 rem, INT32 newsplitscreen);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -78,17 +78,7 @@ extern consvar_t cv_invertmouse;
extern consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_shrinkme[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_shrinkme[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_turnaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_moveaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_brakeaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_aimaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_lookaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_fireaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_driftaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_lookbackaxis[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_deadzone[MAXSPLITSCREENPLAYERS]; extern consvar_t cv_deadzone[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_digitaldeadzone[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff; extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
@ -105,10 +95,7 @@ void weaponPrefChange2(void);
void weaponPrefChange3(void); void weaponPrefChange3(void);
void weaponPrefChange4(void); void weaponPrefChange4(void);
// mouseaiming (looking up/down with the mouse or keyboard)
#define KB_LOOKSPEED (1<<25)
#define MAXPLMOVE (50) #define MAXPLMOVE (50)
#define SLOWTURNTICS (cv_turnsmooth.value * 3)
const char *G_BuildMapName(INT32 map); const char *G_BuildMapName(INT32 map);
INT32 G_MapNumber(const char *mapname); INT32 G_MapNumber(const char *mapname);
@ -126,29 +113,16 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n);
// clip the console player aiming to the view // clip the console player aiming to the view
INT32 G_ClipAimingPitch(INT32 *aiming); INT32 G_ClipAimingPitch(INT32 *aiming);
INT16 G_SoftwareClipAimingPitch(INT32 *aiming); INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
void G_FinalClipAimingPitch(INT32 *aiming, player_t *player, boolean skybox);
typedef enum
{
AXISNONE = 0,
AXISTURN,
AXISMOVE,
AXISBRAKE,
AXISLOOK,
AXISDIGITAL, // axes below this use digital deadzone
AXISFIRE = AXISDIGITAL,
AXISDRIFT,
AXISLOOKBACK,
AXISAIM,
} axis_input_e;
INT32 PlayerJoyAxis(UINT8 player, axis_input_e axissel);
extern angle_t localangle[MAXSPLITSCREENPLAYERS]; extern angle_t localangle[MAXSPLITSCREENPLAYERS];
extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed
INT32 G_PlayerInputAnalog(UINT8 p, INT32 gc, boolean digital);
boolean G_PlayerInputDown(UINT8 p, INT32 gc, boolean digital);
boolean G_ControlBoundToKey(UINT8 p, INT32 gc, INT32 key, boolean defaults);
boolean G_AxisInDeadzone(UINT8 p, event_t *ev);
// //
// GAME // GAME
// //
@ -246,14 +220,11 @@ boolean G_CanView(INT32 playernum, UINT8 viewnum, boolean onlyactive);
INT32 G_FindView(INT32 startview, UINT8 viewnum, boolean onlyactive, boolean reverse); INT32 G_FindView(INT32 startview, UINT8 viewnum, boolean onlyactive, boolean reverse);
INT32 G_CountPlayersPotentiallyViewable(boolean active); INT32 G_CountPlayersPotentiallyViewable(boolean active);
void G_FixCamera(UINT8 view);
void G_ResetViews(void); void G_ResetViews(void);
void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive); void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive);
void G_AdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive); void G_AdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive);
void G_AddPartyMember (INT32 party_member, INT32 new_party_member);
void G_RemovePartyMember (INT32 party_member);
void G_ResetSplitscreen (INT32 playernum);
void G_AddPlayer(INT32 playernum, INT32 console); void G_AddPlayer(INT32 playernum, INT32 console);
void G_SetExitGameFlag(void); void G_SetExitGameFlag(void);
@ -278,9 +249,18 @@ void G_SetGamestate(gamestate_t newstate);
boolean G_GamestateUsesLevel(void); boolean G_GamestateUsesLevel(void);
// Gamedata record shit // Gamedata record shit
void G_AllocMainRecordData(INT16 i); typedef enum
{
RP_KART = 0,
RP_TECH,
RP_BLAN,
RP_CUST,
} recordpreset_e;
SINT8 G_RecordPresetIndex(void);
void G_AllocMainRecordData(INT16 i, SINT8 preset);
void G_ClearRecords(void); void G_ClearRecords(void);
boolean K_EmblemsEnabled(void);
tic_t G_GetBestTime(INT16 map); tic_t G_GetBestTime(INT16 map);
FUNCMATH INT32 G_TicsToHours(tic_t tics); FUNCMATH INT32 G_TicsToHours(tic_t tics);

Some files were not shown because too many files have changed in this diff Show more