Compare commits

...
573 Commits
v2 ... v5
Author SHA1 Message Date
Alug 040faa4c1c Merge branch 'Saturn-Next' into Saturn 2023-12-17 13:29:30 +01:00
Alug 640934634d fix typo 2023-12-17 12:45:13 +01:00
Alug 9842815557 fix compiler warning 2023-12-16 19:11:54 +01:00
Alug 4d19769dd0 you forgor this X) 2023-12-16 14:55:26 +01:00
indev dd75012982 Simplify calculating transparency flags a bit 2023-12-16 11:36:16 +03:00
Alug 9d48ac5bad hide fpscounter when you hide the hud
this was so absolutely annoying sometimes lmao
2023-12-16 07:04:01 +01:00
Alug 0dc8f320a9 make fps counter and ping display also translucent 2023-12-16 07:03:37 +01:00
Alug c9e96949a3 v5 2023-12-15 23:34:53 +01:00
indev 2d70bd0c73 Merge pull request #83 from Indev450/gl3mipmaps
make mipmaps less stuttery
2023-12-16 00:37:34 +03:00
indev 3949add6af Fix NOHW compilation 2023-12-16 00:31:28 +03:00
indev b87eeaa873 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-12-16 00:21:21 +03:00
Alug b56402a0a9 software sprites should do the same as opengl
no idea why it even was like that tbh

sliptiding was not toggable here

Fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/82
2023-12-16 05:31:49 +01:00
indev b1a47f164e Fix birdmod map-music-resume feature not working in cases when you use grow with invincibility 2023-12-16 00:21:09 +03:00
indev 7fa0820a93 Merge pull request #81 from Indev450/hflip
FF_HORIZONTALFLIP and mobj->mirrored
2023-12-15 00:53:01 +03:00
Alug f2ad6199bf experiment: change max LOD to 16
suprisingly, this made stutters even less for some reason, will need to test things
2023-12-13 01:04:12 +01:00
indev 14f0e70a9b Retreive OpenGL version only once at startup 2023-12-13 00:31:49 +03:00
alufolie91 58147117be gl 1.4 and gl2 can use GL_GENERATE_MIPMAP
uhhhhhhh
2023-12-12 11:12:23 +01:00
Alug 5c4e00694a uh oops
accidentally broke polyobjects
2023-12-12 09:26:49 +01:00
alufolie91 8d123f5e83 use the old thing when gl version below 3.0
also should compile for those with gl version lower than 3 hopefully

uhhh idk if this even is right at all tbh
2023-12-12 08:25:59 +01:00
alufolie91 d78fb05be0 use glGenerateMipmap instead of gluBuild2DMipmaps
as advised by https://www.khronos.org/opengl/wiki/Common_Mistakes#gluBuild2DMipmaps

fixes the godawful stuttering everywhere with mipmaps enabled
2023-12-12 07:50:23 +01:00
alufolie91 b9124e717d i slep
Zzz...
2023-12-12 06:35:48 +01:00
alufolie91 84c2721d8b disable here instead of in function itself 2023-12-12 04:56:22 +01:00
Alug 1569ec7a8b shrug 2023-12-11 14:51:08 +01:00
Alug f741c3ff17 eee 2023-12-10 17:13:54 +01:00
Alug ff31eb7d17 Zzz... 2023-12-10 17:07:00 +01:00
Alug 52b5db7ad0 use hwr_useshader also in palshader
this ensures palshader stuff can only do things when shaders are on AND availible
2023-12-09 08:14:33 +01:00
Alug f10608ea2c smh 2023-12-09 07:52:47 +01:00
Alug 364eb1b0c8 clean up a little + add some comments 2023-12-09 07:52:11 +01:00
Alug 0e2d793a7a add HWR_UseShader bool for shader stuff
just to make things look neater
2023-12-09 07:42:13 +01:00
Alug 9b8c569c9e reorder things a little 2023-12-09 07:38:12 +01:00
Alug 9402a006f4 FF_HORIZONTALFLIP and mobj->mirrored
from: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/987
2023-12-07 18:35:27 +01:00
Alug 6aae3d5f90 more accurate transparent fof plane brigthness for palrendering mode 2023-12-07 17:54:27 +01:00
Alug b5cdc0ca94 just use simple boolean for flashpal
more sane than whatever tf it was before
2023-12-07 00:13:45 +01:00
Alug 28c0339261 a 2023-12-06 23:31:46 +01:00
alufolie91 d7cb89a232 Merge remote-tracking branch 'origin/hayaautoload' into Saturn-Next 2023-12-06 23:29:31 +01:00
hayaunderscore 98b132fcc4 use partialaddwadfile for addon autoload 2023-12-06 17:25:26 +01:00
alufolie91 37377a42e6 postload 2023-12-06 17:25:20 +01:00
hayaunderscore 088f1800ff AUTOLOADING HECK YEAH 2023-12-06 17:24:54 +01:00
alufolie91 a96fb7d247 prevent tab rankings from crashing when map has no name
thought i already did that lol
2023-12-05 22:18:32 +01:00
Alug ca30725f8d more stuff 2023-12-05 01:37:10 +01:00
Alug 6d8337dbad more zzz... 2023-12-05 01:21:50 +01:00
Alug 6a8360ab46 revert R_PointOnSegSide
no idea, was just guesswork and might actually slow things down so i revert it
2023-12-05 01:11:39 +01:00
Alug ddeb438a29 clean up colour hud a little 2023-12-05 01:06:41 +01:00
Alug 11fdaf1515 lol 2023-12-05 00:50:33 +01:00
Alug 7c68d50548 move stuff in pause menu Zzz... 2023-12-05 00:45:13 +01:00
Alug c81a434f0b was a bit ugly 2023-12-05 00:25:27 +01:00
alufolie91 c88f3dc302 Revert "Port Prevent dropped ticcmds due to interp timing jutter from srb2-next"
This reverts commit fed1b23b8b.
2023-12-04 23:51:24 +01:00
alufolie91 ffb22a954f forgor some of those 2023-12-04 23:46:20 +01:00
hayaunderscore 31f9937d7e Fix horizon lines not rendering with portals + fix portal wall z-fighting 2023-12-04 10:28:29 +01:00
Alug 1abdc6c747 Revert "Fix horizon lines not rendering on levels with portals"
This reverts commit ccb2c4ef18.
2023-12-03 22:36:28 +01:00
indev 122cb918a1 Merge pull request #80 from Indev450/musictest
Musictest
2023-12-03 14:30:39 +03:00
hayaunderscore a92f05b864 MUSCINFO
separate lump for music test stuff
2023-12-03 02:39:16 +01:00
alufolie91 a457bc4187 :chonkbuncle: 2023-12-02 22:51:55 +01:00
alufolie91 bb5b888aef Merge branch 'Saturn-Next' into musictest 2023-12-02 21:24:52 +01:00
alufolie91 2797fa9a05 add global toggle for bird music things + move stuff to s_sound
well reason a global toggle is, cause stuff always does stuff even when "disabled" and i cant be assed trying to unmangle this mess

like this we can just turn off everything and game behaves like vanilla

default is off so everythings disabled

if someone wants to do a better approach go ahead
2023-12-01 19:14:15 +01:00
alufolie91 7d5c63d8ee assign bool instead of if else thing 2023-12-01 16:39:47 +01:00
alufolie91 39b70b3686 add drawstretchypatch lua support 2023-12-01 16:13:45 +01:00
alufolie91 34933fdf82 optimise span drawers a little 2023-12-01 15:25:47 +01:00
hayaunderscore ccb2c4ef18 Fix horizon lines not rendering on levels with portals 2023-12-01 09:38:09 +01:00
alufolie91 ea5ac63e0f a 2023-12-01 09:36:40 +01:00
indev de04223443 Merge pull request #78 from Indev450/opengl-polyobj-nozcalloc
Opengl polyobj nozcalloc
2023-11-30 20:13:17 +03:00
indev 20467bdc1e Merge pull request #79 from Indev450/anigif-optimization
Optimize gif recording in opengl a bit
2023-11-30 20:12:50 +03:00
alufolie91 fc458128cf show file of where the music comes from + toggle
ty indev c:
2023-11-28 11:42:46 +01:00
Alug e57ad13004 align stuff proper + make it kart menu blue 2023-11-28 09:39:02 +01:00
alufolie91 88e8c0541b show some music info on bottom right when playing in music test
also allows the game to read "usage" from musicdefs
2023-11-28 07:34:03 +01:00
indev 2a3a63ca28 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-28 01:46:43 +03:00
indev c2ddac2c1e Allow using localskins for any kind of mobj from lua 2023-11-28 01:46:28 +03:00
alufolie91 9de9b72940 do the same for lighttable tex 2023-11-27 22:34:02 +01:00
alufolie91 4cb3b5bc0d fix hudcolor when returning from time attacking 2023-11-27 22:28:28 +01:00
alufolie91 dc190be6b3 Zzz...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2023-11-27 21:58:28 +01:00
alufolie91 0373b19269 hopefully fix older hardware crashing even if they dont use palshader
also guard the last InitPalette, we do not need to call it if we dont use palshader

also if either pglTexImage3D or ltcachetail->id is null, the game wont crash now, instead returns, and turns off the palshader so all should work hopefully
2023-11-27 21:46:18 +01:00
Alug 3610096c35 this always annoyed me
why was it always offcenter like that?
2023-11-27 19:05:17 +01:00
Alug 2b75d0b26b replace those with gl error messages instead 2023-11-27 18:35:38 +01:00
Alug a27dc33e25 1 extra row
hope this right lul
2023-11-27 15:58:13 +01:00
Alug 3718c5bd51 fix small gap on some resolutions 2023-11-27 15:45:44 +01:00
Alug a256e170ab fix interpolation speeding things up + make box wider 2023-11-27 15:37:22 +01:00
Alug 2009ed38f0 we dont have that stuff so remove it 2023-11-27 15:19:21 +01:00
indev 7599d9ddd4 Fix assigning null character out of string bounds 2023-11-27 17:06:38 +03:00
indev 0907c219af Change maximum string length for name in music test 2023-11-27 16:57:38 +03:00
indev 0ae1f2606f Merge branch 'musictest' of ssh://github.com/Indev450/SRB2Kart-Saturn into musictest 2023-11-27 16:49:54 +03:00
indev 2abb65403f Make music names in music test scroll 2023-11-27 16:49:48 +03:00
alufolie91 223e858d00 musictest should return you to music options menu 2023-11-27 14:25:26 +01:00
alufolie91 2769847c90 remove unused things + move stuff around
e
2023-11-27 14:13:15 +01:00
alufolie91 0fc3d9d4d6 do NOT change how sound freeslotting works
reasons
2023-11-27 14:03:54 +01:00
alufolie91 d6702be08b make it its own thing, add back normal sound test 2023-11-27 13:58:35 +01:00
alufolie91 d41c7bedd8 port musictest from srb2 + making it not crash
thing is super ugly, also replaces current sound test for now, which needs to be fixed
2023-11-27 13:23:53 +01:00
alufolie91 d0f9993385 add more stuff to experimental video menu + smol cleanup
might aswell add the other things
2023-11-27 06:09:02 +01:00
Alug caf05f5923 e 2023-11-27 05:48:02 +01:00
Alug cc996759be add stuff the experimental video stuff
idk description could be better but i suck at writing lmao

those three things were introduced back in v.5.3  internal (before release) which was the version which had some performance regression

those were looked into and from my testing saturn often performs better than vanilla

however those features still may tax computers from others, so i decided to make toggles for those things
2023-11-27 05:35:20 +01:00
Alug 51de2a4610 Merge branch 'Saturn-Next' of https://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-27 05:21:31 +01:00
Alug e15c9558fa toggle for slope midtexture pegging fix
also fixes a wrong ESLOPE ifdef
2023-11-27 05:21:26 +01:00
Alug 29edb49861 toggle for slope midtexture pegging fix 2023-11-27 05:20:33 +01:00
Alug 7ce3d0c733 add toggle for texture zfight fix 2023-11-27 04:40:13 +01:00
Alug fb8cdbb9cc only do it like that in pal rendering mode 2023-11-27 04:23:28 +01:00
Alug 882554a3fe splitwallfix toggle
idk maybe some still get worse performance from this
2023-11-27 04:10:39 +01:00
indev 40a8554cc9 Attempt to fix rare 'server player kick' bug 2023-11-26 23:52:07 +03:00
alufolie91 146a80e91c Dont mark this shit as modify doofus 2023-11-25 10:38:24 +01:00
hayaunderscore b533dbee55 Localskin support probably 2023-11-25 10:37:48 +01:00
hayaunderscore 3ede4eb1a6 Remove this dumb debug print 2023-11-25 10:37:43 +01:00
hayaunderscore 5813c2b3c3 Experimental SPRTINFO support
Based of leftover code from patch rotation
2023-11-25 10:37:35 +01:00
NepDisk 2b1dc82bfa Fix complilation due to menu code 2023-11-25 00:55:29 +03:00
NepDisk 0b59c156a0 Merge branch 'cleanedupcharpicker' into stacking-dev
Merge the new character select menu I created
2023-11-23 08:58:27 +01:00
NepDisk 03fb7fd145 Oops forgot to remove this 2023-11-23 08:58:04 +01:00
NepDisk f99e516e63 SkinSearch command. 2023-11-23 08:57:55 +01:00
Alug f62642f855 your hudcolor choice should overwrite everything else
also "fixes" the splitscreen issue thats been mentioned,
now whichever hudcolor you choose gets applied, regardless of splitscreen or if you sswitch viewpoints
2023-11-22 20:54:19 +01:00
NepDisk 3adad0ed18 Add Saturn peeps to credits :D 2023-11-22 09:10:26 +01:00
Alug 429976faf8 a 2023-11-22 08:27:16 +01:00
Alug 1d40c26fd9 make players snap when looking back and using sloperoll
always looked a bit weird tbh
2023-11-22 06:47:42 +01:00
indev 4c730ec84d Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-22 01:48:59 +03:00
indev 2d25fabe64 Fix few missing packet type names in d_net.c 2023-11-22 01:48:41 +03:00
Alug 095ec063fb spriteoffsets should be 0 + a little more oraganized 2023-11-21 22:22:03 +01:00
NepDisk ab8d3e2642 Change default offset so stat display doesn't go over mr 2023-11-21 19:41:59 +01:00
Alug cbd59a04f6 toggle for localskin menus
well wanna be able to toggle things
2023-11-21 17:34:07 +01:00
Alug e49e6b8998 toggle for playing music while paused 2023-11-21 17:02:10 +01:00
alufolie91 02cd4e753d make software horizonlines also extend fofs 2023-11-20 22:40:41 +01:00
indev d06f923066 Fix filesearch trying to open file symlinks as directory 2023-11-20 16:10:02 +03:00
Alug bb9f7c8196 also hide the other localskin menu in option menu when youre server 2023-11-19 08:46:34 +01:00
Alug bf2c786a02 make pause menu look more like vanilla now that some things get disabled
I HATE MENU CODE AAAAAAAAAAAAa
2023-11-19 08:02:13 +01:00
alufolie91 7d66da2b94 lol 2023-11-19 06:43:29 +01:00
hayaunderscore f346f075ee Fix localskin options not being available for server admins 2023-11-19 06:10:53 +01:00
Alug 38c612a752 add "find" command to search for for cvars
its better than "help", more organized and it shows any variable containing what you searched for

from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2217
2023-11-19 02:27:42 +01:00
Alug d77ccd0dfc fixeur symlinks
i hope
2023-11-19 01:28:28 +01:00
Alug 7ba146b4ff Improve file search performance on Linux and FreeBSD
from: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2198
2023-11-19 00:56:18 +01:00
Alug cf8ef69fed fix an overflow crash in terminal lul
could hold down the a key before and make the game crash

from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2206
2023-11-19 00:51:27 +01:00
indev 2f5b894c47 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-18 19:41:06 +03:00
indev e248b85380 Apply translucenthud for the VIEWPOINT text 2023-11-18 19:40:58 +03:00
NepDisk 84cc8d10a7 Quick bug fix for pages 2023-11-18 06:18:07 +01:00
NepDisk 0b4e70faf3 perfstats for PreThinkFrame and PostThinkFrame plus small rewrite 2023-11-18 06:14:03 +01:00
alufolie91 78018e1f78 I_SetSongTrack(int) should be I_SetSongTrack(INT32)
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2213
2023-11-18 05:13:04 +01:00
alufolie91 7a2f925078 Make module music volume more accurate
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2215
2023-11-18 05:09:45 +01:00
Alug ec1123251f fix sliptide toggle for 3d models 2023-11-17 23:45:17 +01:00
Alug cc408cc859 fix not being able to close warning screen when a mod spams warnings
lmao
2023-11-17 23:28:53 +01:00
Alug 16f8299c4a fix admin menu stuff
uuuuhhh
2023-11-17 20:48:27 +01:00
alufolie91 10953dbb3a add toggle to hide player ip addresses in nodes or listplayers command
also add "listplayers" command, which is pretty much the same as "nodes" but with colors and it looks better

tho kept "nodes" command just in case its needed for smth
2023-11-17 20:29:07 +01:00
NepDisk 49aaa25255 Mouse Controls for saturn 2023-11-17 18:10:14 +01:00
indev ccbb894a6b Remove repeating code in VHS effect 2023-11-16 21:16:56 +03:00
indev 54542031a1 Fix the opengl VHS effect on linux 2023-11-16 20:20:49 +03:00
NepDisk ff04b83ec0 English (UK) 2023-11-16 18:06:35 +01:00
NepDisk b03faeff25 Do highresportaits for saturn specfically 2023-11-16 18:06:29 +01:00
alufolie91 d1becfcf0c this is better
like srb2 does it, but kk forgor
2023-11-16 17:19:13 +01:00
Alug 3c078c6676 uhh should be fixed_t or not? 2023-11-16 03:23:17 +01:00
alufolie91 4e6dc92033 fix "Resynching..." speeding up with interpolation
:p
2023-11-16 03:15:18 +01:00
Alug 8d607594ff add stuff to menu 2023-11-15 23:38:36 +01:00
Alug 71486a4982 opengl vhs effect
im in so much pain
2023-11-15 23:17:42 +01:00
Alug 9ae1f20735 actually only do it if its not centered 2023-11-15 21:24:39 +01:00
Alug 53febafd50 eeh do it later
idk looks better imo
2023-11-15 20:53:25 +01:00
alufolie91 7f7ea2c592 reset camera when joining from spec
camera look never got reset when you enter a game from spec, so if you looked up or down, you also did so ingame lol
2023-11-15 20:47:28 +01:00
Alug dc1dfe0d4d smh 2023-11-15 20:13:19 +01:00
alufolie91 48e3c14d30 hide screentex toggle in software
its an opengl only thing, so no need to toggle if in software mode
2023-11-15 20:09:09 +01:00
alufolie91 16b3687774 forgor 2023-11-15 19:58:13 +01:00
Alug cf101ccc5d add "experimental video options" menu
for a few things that might be interesting for some

also make some adjustments
2023-11-15 19:51:05 +01:00
Alug d04a6ad5ee Add more cvars to menu and lower minimum vote time 2023-11-15 19:45:22 +01:00
NepDisk 840c7ea154 Update speedometer code to refernce new values 2023-11-15 19:39:06 +01:00
NepDisk 268300913d fix for real this time 2023-11-15 19:39:01 +01:00
NepDisk 7a4ef35e7b forgot discord support ugh... 2023-11-15 19:38:33 +01:00
Alug 84140f3faa Revert "why did i remove this back then??"
i saw what this did again
fix for avoiding precip crash, cause precip doesent have that stuff

This reverts commit 2e4e0a8554538c841fb4c7be63449b32365d6bc0.
2023-11-15 10:12:07 +01:00
NepDisk 673a03e033 Stat display enable and disable luahook 2023-11-14 20:59:38 +01:00
Alug 32d4a38b9e just always reset palette regardless
the palshader palette however only gets reset when you enter palshader mode

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2023-11-14 20:06:11 +01:00
Alug 7cc4d1f601 simplify this stuff
idk why i didnt do it like this in the first place tbh

no need for 3 seperate onchanges, i can just do shit like this

all of them pretty much did the same anyways

now the shader and all two palshader toggles reset palette stuff when it detects that youre in palrender mode aaaA
2023-11-14 20:02:07 +01:00
Alug 25e60a9882 ugh toggling shaders also needs to reset palette shit sometimes 2023-11-14 19:35:37 +01:00
Alug 79582ce73d we use them tho its good to future proof just in case 2023-11-14 18:31:19 +01:00
NepDisk 3526a52827 Allow holepunching to be disabled via a new define plus part 2 to masterserver 2023-11-14 18:29:48 +01:00
NepDisk 4b8bc46358 Master server 'b gone. Makes disabling the define actually alone the compile to work 2023-11-14 18:29:34 +01:00
Alug ddd6488b55 Fix typos and reword some stuff 2023-11-14 18:27:20 +01:00
Alug dfccca4026 Add a toggle to cut precip in half
ye this pretty much cuts the weather thinker count in half

since weather spawns all mobjs regardless of distance setting
its  good for ppl who like weather effects but have weaker hardware
2023-11-14 06:08:38 +01:00
Alug d33c1e83de Revert "refactor weather switching"
This reverts commit 873a611b33b0a3ef62633c1e8327c86ab0617655.

eeh i dont trust it tbh
2023-11-14 02:32:56 +01:00
alufolie91 2ffc7293af screw it, revamp the whole thing
blurgh like this theres never a condition where paletteshader shit runs even if you have shaders turned off and stuff
2023-11-13 22:44:23 +01:00
Alug fde184b7a7 Merge branch 'Saturn-Next' of https://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-13 21:52:25 +01:00
Alug 7163194ce9 fixup paletteshader stuff
uaghgegheuaghuagheghg

now every dumb edge case should be covered
and the palette should never turn to garbage if you toggle stuff around
2023-11-13 21:52:18 +01:00
indev ec97111d26 Make K_GetHudColor use player skincolor instead of color cvar when possible. Also fix compilation warning 2023-11-13 21:38:13 +03:00
Alug 6d24d5a44a reset palshader lookup if you toggle the thing
otherwise it can sometimes screw up and show garbage colors when toggling

idk if this is the right way tho
2023-11-13 18:53:56 +01:00
NepDisk 3700dc3bae Fix P-meter speedo not scaling on mobjscaled map 2023-11-13 01:23:44 +01:00
indev 6114bdd9dc Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-13 01:36:01 +03:00
indev 2fe912eebf Fix compilation with NOTHREADS 2023-11-13 01:35:49 +03:00
Alug ccf6840cd5 forgor and fixuer typos :p 2023-11-12 18:21:16 +01:00
alufolie91 955c7f0cfb remove some tooltips for things we dont have 2023-11-12 17:56:59 +01:00
alufolie91 994fd6354f fix kk typo lol
fixes the X symbol with itembox offsets changed
2023-11-12 17:30:08 +01:00
indev 30602a8eb7 Fix crash related to localskins and stat display 2023-11-12 19:10:51 +03:00
alufolie91 2290c1955b oops we dont have that menu lol 2023-11-12 17:04:45 +01:00
hayaunderscore f167db0cc6 Fix weird stutter on grow and invinc music stutters 2023-11-12 17:00:44 +01:00
hayaunderscore 42e04ce981 haya you fucking dumbass
never use mo->player here again
2023-11-12 16:59:15 +01:00
Alug 41cf467f2a Revert "Revert "localskin rework incoming!!!!!""
This reverts commit 25b5e5f510.
2023-11-12 16:58:26 +01:00
alufolie91 2ca7c8178f Implement tooltips for rest of the menus (Aside from HUD and data options)
by @NepDisk ty much
2023-11-12 16:57:38 +01:00
alufolie91 c4d8de471e P-MeterSpeedometer
by @NepDisk thx much
2023-11-12 16:56:52 +01:00
Alug 2a49236914 Fix colourizedhudcolor not respecting your colourized hud choice
make the stuff also grey out in the menu if you disable stuff
2023-11-12 16:43:33 +01:00
Alug fcf0836e7b Fix shadows from sometimes crashing on mapload
this properly fixes the mapchange spam from crashing the game

P_RunShadows, like any other thinker function, should also be called in preticker not just ticker

potentioally also fixes other issues
2023-11-12 16:09:34 +01:00
Alug 284845aad6 Cleanup Splitwall and remove smth we dont need
Perhaps not removing the endpegmul setting to 0 in some cases caused many of those division by zero crashes aswell

since i reverted the stuff relating to this a while back
2023-11-12 02:08:36 +01:00
Alug 44b2937ea1 Avoid a devision by zero in Splitwall and make it static 2023-11-12 01:46:58 +01:00
alufolie91 00c20f7c8c revert this thing
just incase, dont wanna break high res support
2023-11-12 00:39:04 +01:00
alufolie91 e74a28a2c1 Fix old big room fix
no idea what i was thinking
but kart does use viewx and viewy for those originially, so just let me do a 64bit version of R_PointToAngleEx
2023-11-11 22:08:48 +01:00
alufolie91 91ed5c4871 why did i remove this back then?? 2023-11-11 21:38:12 +01:00
alufolie91 7ca88fb131 make it save lol 2023-11-11 21:29:44 +01:00
alufolie91 76047e75d5 Toggle for FOF wall cutoff when slopes
was testing things, so might aswell add this
2023-11-11 21:01:53 +01:00
Alug 25b5e5f510 Revert "localskin rework incoming!!!!!"
This reverts commit 6196185d62.
2023-11-11 17:39:17 +01:00
indev 4377a6d7fe Remove unnecessary Z_Calloc from HWR_AddPolyObjectSegs
Effect is most likely unnoticable but still having less calls to Z_Calloc and Z_Free would be better
2023-11-11 18:43:37 +03:00
indev 5cfe9a4c4e Optimize gif recording in opengl a bit 2023-11-11 18:27:24 +03:00
Alug b5f90ab5b9 Merge branch 'Saturn-Next' of https://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-10 22:37:48 +01:00
Alug badf395dad Remove WIndows shake thing
noone likes it
also theres been reports of this thing triggering false positives in anti viruses
2023-11-10 22:37:40 +01:00
indev 1e13abea19 Attempt to fix the rewrite bug 2023-11-10 18:59:58 +03:00
alufolie91 ca08c7b6e4 Merge remote-tracking branch 'origin/hayathings' into Saturn-Next 2023-11-10 16:24:35 +01:00
alufolie91 d427cd60b2 fix merge conflicts 2023-11-10 16:22:49 +01:00
hayaunderscore f29240f3e8 FUCKING TYPO 2023-11-10 16:16:24 +01:00
hayaunderscore 6196185d62 localskin rework incoming!!!!! 2023-11-10 16:16:07 +01:00
alufolie91 ba825cf688 Fix some issues 2023-11-10 16:16:02 +01:00
hayaunderscore cbbc356386 yeah yeah yeah 2023-11-10 16:15:43 +01:00
alufolie91 62cc95da95 Tooltips....
WIP, and only for the Saturn Options for now,,,,,,
2023-11-10 16:15:28 +01:00
indev 48ae18cede Merge pull request #77 from Indev450/stat-display-hud
Stat display hud
2023-11-10 18:11:23 +03:00
Alug cd804c5984 Fix FOFs with transferline flag and many linedefs randomly crashing
linenum could go out of bounds if you use more than 4 linedefs for such setup, hence making the game unable to retrieve textures and therefore crashing the games sometimes

Visually its not perfect, but you shouldnt do it anyways, atleast it wont crash everything now

ty much indev <3
2023-11-10 01:01:24 +01:00
indev c338453ce9 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-09 21:34:53 +03:00
indev 6d5d1a1339 Fix RA ghosts failing to load 2023-11-09 21:34:40 +03:00
alufolie91 953e1734b4 Merge remote-tracking branch 'origin/spriteclip' into Saturn-Next 2023-11-09 18:00:36 +01:00
NepDisk cc01c576a3 move zero down for saturn menu by 5 2023-11-09 19:53:13 +03:00
NepDisk 018bac2be6 Add menus and redo saturn menu offsets so it fits 2023-11-09 19:51:49 +03:00
indev c01bc39659 Add stat display 2023-11-09 11:20:31 +03:00
NepDisk 5d49fd9411 Add shortcuts for current/next map to map command 2023-11-08 23:31:08 +01:00
Alug 23775b6ec0 Fix the gravstretch setting sometimes not saving
I hate this so much but it works
I used the same values the game presented before so the behaviour (hopefully) shouldnt change and like this i atleast can call off "Off"
2023-11-08 23:22:00 +01:00
alufolie91 b8ada40a72 fix highres sprites 2023-11-08 18:55:21 +01:00
alufolie91 58c72ab345 make it actually do something
knew it didnt really work before
2023-11-08 18:46:41 +01:00
alufolie91 143dc55f90 Merge remote-tracking branch 'origin/Saturn-Next' into spriteclip 2023-11-08 18:46:00 +01:00
Alug 227664bd12 Zzzzz... 2023-11-08 17:25:05 +01:00
alufolie91 3ee2e47724 Fix uninitialized reads in PreparePolygon
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1392
2023-11-08 17:24:59 +01:00
Alug 4aa4e235a5 Hide localskin menu stuff when youre the host/offline play
now only shows if you are a player in a netgame
2023-11-08 17:20:21 +01:00
Alug 76521ec0dd make wide lap sticker go back to normal when race is finished 2023-11-08 15:16:51 +01:00
Alug dfae95c7a3 fix the flashpal issue for good 2023-11-08 09:43:13 +01:00
alufolie91 7a31dffcdc Merge branch 'Saturn' into Saturn-Next
oh somehow this didnt make it into next
2023-11-07 00:23:35 +01:00
Alug 0f27f573f6 remove asm leftover 2023-11-06 15:52:16 +01:00
NepDisk 67d2673dc0 Add menu option for showing all maps 2023-11-06 11:50:23 +01:00
NepDisk c36564df1e Add toggle for ping icon 2023-11-06 11:49:50 +01:00
NepDisk 4ed6066e97 Ping measurement menu option 2023-11-06 11:49:35 +01:00
NepDisk 4e7a5d1b89 Fix offset looking ping icon in compact
Alug: grrrrrr frame delay measurement users..
2023-11-06 11:48:09 +01:00
indev c70ef22141 Add option to masterserver_debug to not print verbose debug messages in console (errors are still printed) 2023-11-06 13:25:49 +03:00
indev d15f69dfcd Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-06 12:01:04 +03:00
indev 27734387c0 Fix compilation with NOHW and NOOPENMPT 2023-11-06 12:00:47 +03:00
Alug b05eb4d848 paletteshader fix for potatoes 2023-11-06 02:02:20 +01:00
Alug 5e079a3990 Revert "Improve file search performance on Linux and FreeBSD"
This reverts commit 5c54f7dc7a.

smth smth doesent support symlinks
2023-11-06 01:13:58 +01:00
Alug 39964e995d add slopecontrast
same as wall contrast but for slopes
gives slopes a bit more contrast instead of them having the same brightness as everything else
there to clog up the opengl menu even more :p
2023-11-06 01:13:36 +01:00
Alug 8d80118a72 fix ping command showing a random players ms ping instead of your ping
bruh
2023-11-05 22:17:46 +01:00
Alug 5a163be5e8 Fix crash in FixedDiv when passing -2147483648
lul
2023-11-05 21:31:47 +01:00
Alug 429d8620e1 Use nanosleep for I_SleepDuration on *nix
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2184
2023-11-05 21:12:03 +01:00
Alug 5c54f7dc7a Improve file search performance on Linux and FreeBSD
from: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2198
2023-11-05 21:00:03 +01:00
Alug 153ae53f8c sigh 2023-11-05 18:29:45 +01:00
Alug 95e54e97e5 show gamemap in tab ranking screen instead of gametype
this time functional
2023-11-05 16:51:58 +01:00
Alug 949bbebf7b fix ping stuff with new fps counter shit
goddammit i never do anything when im tired again
2023-11-05 16:29:55 +01:00
Alug ef1eea5ba8 Revert "show mapname instead of gametype in tab ranking"
This reverts commit cb03260e43.
2023-11-05 01:31:34 +01:00
Gustaf Alhäll d3ea2eb287 Fix FreeBSD build errors 2023-11-05 01:14:11 +01:00
Alug 383b395c78 bruh 2023-11-05 01:11:56 +01:00
Alug cb03260e43 show mapname instead of gametype in tab ranking
who tf needs the gametype the mapname much more useful
2023-11-05 01:08:58 +01:00
Alug e8a92dd836 add a "compact" fps counter option
it just removes the "FPS" text and moves the ping display much further down

also dont show it during startup
2023-11-05 00:16:18 +01:00
alufolie91 a6296445da windows 10 and 11 support :trollge: 2023-11-04 23:35:01 +01:00
alufolie91 2658003a1a move this out of NONET compile stuff
was error on my part sry indev :c
2023-11-04 23:31:27 +01:00
hayaunderscore 54c6196412 Fun fact: visual scale already factors for scale
So no need for this!
2023-11-04 23:27:32 +01:00
Alug 4b3989f18c v4 <- when next branch uses old version name lmao 2023-11-04 23:13:53 +01:00
Alug 3b41873893 make the thing compile, remove drmingw stuff from 64bit builds
and properly link libbacktrace

rip in piece drmingw but we got goddamn 64bit crashlogs now c:
2023-11-04 23:09:39 +01:00
Alug a211badb73 Update README.md
bruh this formatting
2023-11-04 21:11:25 +01:00
Alug 262a07ea9a Update README.md
before i forgert that later lmao
2023-11-04 21:10:45 +01:00
Alug ef323c66c7 Update README.md
i most likely forgor smth
but the most important thing was libbacktrace dependency for building the gam,e
2023-11-04 21:07:22 +01:00
indev 74c8b05469 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-11-04 23:00:11 +03:00
alufolie91 8028c285ff Add libs and DLLs for libbacktrace 2023-11-04 21:02:35 +01:00
indev 966b273ecd More information in debug log 2023-11-04 23:00:05 +03:00
Alug bf2eecf9a4 Update README.md
i most likely forgor smth
but the most important thing was libbacktrace dependency for building the gam,e
2023-11-04 20:39:19 +01:00
indev 84d9665467 Bye bye unix-specific backtrace 2023-11-04 22:30:38 +03:00
indev df60b9ceee Try to get full traceback in all builds, or fall back to simple traceback if that failed 2023-11-04 22:00:17 +03:00
indev 37459d3d09 Simple backtrace in non-debug builds 2023-11-03 17:46:36 +03:00
indev 3e0cc1bb48 Use asctime instead of manually formatting time 2023-11-03 15:54:17 +03:00
indev ae5cf2116f Don't use unix-specific functions for libbacktrace crash report 2023-11-03 15:37:31 +03:00
indev 6c1426f1f3 Always include time.h 2023-11-03 15:18:55 +03:00
indev 067ebba4d4 Don't use libbacktrace on win32 2023-11-03 15:12:44 +03:00
indev dc16f8b4a6 Make libbacktrace crash reports append to file instead of overwriting. Add more info into libbacktrace crash reports 2023-11-03 15:04:38 +03:00
indev 9ed348c8a8 Use libbacktrace for crash logs (wip) 2023-11-03 14:11:56 +03:00
Alug 3ccf44a0be fixuer localskin stuff
Fixes the Apply to all players and displaying player not working (thx haya c: )

Fixes the Vibrating? player animation speeding up when uncapped in localskinmenu

Make so that the char spin speed respects the setting from saturn options (and add pain support )
2023-11-02 15:02:26 +01:00
Alug ee2bc85fe7 v4 2023-10-31 11:02:12 +01:00
alufolie91 9b3bfaabad Merge remote-tracking branch 'origin/Saturn-Next' into Saturn 2023-10-31 11:01:00 +01:00
alufolie91 3f8a227769 comment that out for now
we dont use it yet, so lets not make compiler cry about smth unused
2023-10-30 20:59:38 +01:00
indev 7993df1be7 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-10-30 12:36:23 +03:00
indev f2b0b8359e Add description for custom lua features 2023-10-30 12:35:57 +03:00
alufolie91 7d7c053fc1 Revert "more sprite rotation anlges = smoother sprite rotation"
This reverts commit 0921eb57c4792fc5cb2b120de04d8905513ae75c.
2023-10-30 08:19:55 +01:00
alufolie91 25398af8f5 add toggle for dark itembox bg
some may dislike how it looks with the colour hud
2023-10-27 18:54:53 +02:00
alufolie91 c98971953c Merge remote-tracking branch 'ball/colorizeditembox' into Saturn-Next 2023-10-26 02:08:11 +02:00
alufolie91 d9739755ce Merge remote-tracking branch 'origin/command-history' into Saturn-Next 2023-10-26 02:07:43 +02:00
NepDisk 895bd2da15 Made this a menu option anyway lololololol 2023-10-25 19:57:46 -04:00
NepDisk 8950e31f4c Colorized Itembox 2023-10-25 19:26:34 -04:00
indev 601928f49f Only add command to history if it differs from previous one 2023-10-24 20:57:42 +03:00
alufolie91 773e243c88 ugh make that save lol 2023-10-23 15:34:38 +02:00
indev 311f3a6cf4 Merge branch 'Saturn-Next' of ssh://github.com/Indev450/SRB2Kart-Saturn into Saturn-Next 2023-10-22 13:00:05 +03:00
NepDisk fed1b23b8b Port Prevent dropped ticcmds due to interp timing jutter from srb2-next 2023-10-22 12:01:14 +02:00
indev 5c2d8f6901 Fix characters with SF_HIRES flag being displayed too big in grid skin select menu 2023-10-22 12:59:25 +03:00
alufolie91 68b88e40b5 smol change 2023-10-21 15:44:38 +02:00
alufolie91 6f3770a54a update the credits and menu
add ppl to credits, and just have less seperation between the ppl that contributed to saturn
move flashpal setting to opengl options
2023-10-21 12:57:55 +02:00
alufolie91 eaf2506b4f almost forgor
respect the menu caps choice
2023-10-21 12:24:12 +02:00
alufolie91 2cec4c8b52 add M_DrawGenericScrollMenu
will most likely need this since saturn menu esp is starting to fill up
2023-10-21 12:12:35 +02:00
alufolie91 7ebccc19db fixuer de typo 2023-10-21 12:06:43 +02:00
alufolie91 797d080df0 Join last server button in multiplayer menu (thx nep c:)
from:  https://github.com/NepDisk/srb2k-planeptune/commit/3f42ca357e16702a47a1197a738d92741b38950f

also now finally works with server browser
2023-10-21 11:42:19 +02:00
alufolie91 7c6b03145d uncap water effects
also caps software heatwave effect since it was sped up with interp

note : waterofs was left out, due to it producing stutters on water surfaces in softwaremode
2023-10-21 03:20:23 +02:00
alufolie91 7b136a62c4 revert this part
well with how some kart mapss are set up, this doesent work out
2023-10-21 03:05:30 +02:00
alufolie91 fec433372d clean up shader stuff a bit
Makes the game not "hard crash" when it fails to compile shaders
Fixes issues with shader leveltime
also fixes an issue where certain textures were blurred with shaders enables
2023-10-21 02:49:14 +02:00
alufolie91 41a827727d Merge remote-tracking branch 'origin/fix-bool-types-w-checkmultiplewads' into Saturn-Next 2023-10-20 22:19:35 +02:00
indev bfd0f0c7c2 Fix wrong boolean constants used in W_CheckMultipleWads. That was causing compilation error on linux, and maybe on other non windows platforms 2023-10-20 15:38:53 +03:00
alufolie91 21c9ae8f7e revert this again
despite what kk says, opengl sdl render hint is so much worse performancewise in software mode.
some of the feedback we´ve gotten on saturn also more or less confirms this
2023-10-20 08:09:07 +02:00
alufolie91 581b503edf Uncap palette lump palettes & allow flashpal palettes to display during pause 2023-10-20 07:45:00 +02:00
alufolie91 d380391d80 Clean up the backtrace code and make it use write() more safely. 2023-10-19 11:15:03 +02:00
alufolie91 ff41393edd Fix segfaults on some systems due to polyvertex being NULL
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2065
2023-10-19 10:46:30 +02:00
alufolie91 654784690e we dont have asm stuff 2023-10-19 10:12:32 +02:00
alufolie91 cd682e3961 Avoid branch prediction slowdowns in bla bla but better
i hope
2023-10-19 09:39:35 +02:00
alufolie91 cd4482dd97 Merge remote-tracking branch 'sdfadfsa/gitlab-ci' into Saturn-Next 2023-10-18 15:11:56 +02:00
hayaunderscore 6eb96a4992 clean up extra.kart and extra2.kart lump checking 2023-10-18 15:03:53 +02:00
Alam Ed Arias 3c3c59928d Makefile: support for Mingw64 toolchain 2023-10-18 00:02:17 -04:00
Alam Ed Arias 01911e4d37 Clear unused-but-set-variable warnings 2023-10-18 00:02:17 -04:00
Alam Ed Arias 37c65ca7e4 Makefile: PREFIX overwrite make's default CC and CXX 2023-10-17 23:14:09 -04:00
Alam Ed Arias cb4ffe6f60 no Dr. Mingw support for Win x64 build 2023-10-17 23:12:14 -04:00
Alam Ed Arias 98f8b49e45 Makefile: support toolchain envs 2023-10-17 22:36:17 -04:00
Alam Ed Arias bf6be522ea GitLib CI: SRB2 2.1 codebase use WFLAGS to control warning flags 2023-10-17 21:46:56 -04:00
Alam Ed Arias 2365ee9cb0 GitLab CI: SRB2 2.1 wants nasm 2023-10-17 21:46:56 -04:00
Alam Ed Arias 16c70e7b29 GitLab CI: Compile the SDL version of Win32 builds 2023-10-17 21:46:37 -04:00
Alam Ed Arias 46f0385566 d_netfile.c: Update libcurl support to 7.88 2023-10-17 21:45:47 -04:00
Alam Ed Arias 579c5ab052 Makefile: Support GCC version 11, 12 and 13 2023-10-17 21:45:34 -04:00
Alam Ed Arias 94e7430dd9 copy gitlib-ci config from SRB2's next 2023-10-17 20:57:14 -04:00
Alam Ed Arias 7fea4894a2 Add support for GCC 13.2 2023-10-17 20:55:26 -04:00
Alam Ed Arias a5b99199fc Clear implicit-const-int-float-conversion warnings 2023-10-17 20:05:48 -04:00
Alam Ed Arias 79e2596ce6 Clear missing-noreturn warnings 2023-10-17 19:57:56 -04:00
Alam Ed Arias 1b82918384 Clear misleading-indentation warnings 2023-10-17 19:56:27 -04:00
Alam Ed Arias 4e9e18df82 Clear unused-but-set-variable warnings 2023-10-17 19:54:07 -04:00
Alug cec92474d2 Add check for "extra.kart" files contents......
make lapcounter bigger when a map has 10 or more laps (needs updated extra.kart),
fixed menu not greying out user defined hud colour
2023-10-18 01:27:37 +02:00
Alug d8f3dca2fc more sprite rotation anlges = smoother sprite rotation 2023-10-17 22:58:14 +02:00
alufolie91 89576adbcf Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Next 2023-10-16 02:12:22 +02:00
Alug d9b8bd0b8c Add Colourized Hud Color to menu 2023-10-16 02:12:15 +02:00
Alug 525f1b317c Merge pull request #75 from Indev450/more-colorized-hud
More colorized hud
2023-10-16 02:11:16 +02:00
Alug ac119f9d42 Merge pull request #76 from Indev450/pspawnmapthing-null-check
Add null check into P_SpawnMapThing so game doesn't crash if it fails…
2023-10-16 02:11:10 +02:00
Alug a18af5b3e0 Add toggle for CECHO messages
Well you could turn em off with "cechoflags" before, but this is easier and it also saves
2023-10-16 02:10:12 +02:00
alufolie91 ae87cdc8d9 Show "OVERTIME" in karttimer when overtime occurs in battle
instead of it just showing "00´00´00"
2023-10-16 02:08:18 +02:00
indev f2f324c487 Add null check into P_SpawnMapThing so game doesn't crash if it fails to spawn mapthing for some reason 2023-10-13 01:30:46 +03:00
indev 8cd848e44d Default value for colorizedhudcolor is now called 'Skin Color' 2023-10-12 23:40:11 +03:00
indev d83842df55 Allow selecting hud color via colorizedhudcolor cvar. 'None' means use current player's skincolor 2023-10-12 21:35:18 +03:00
alufolie91 0a0567c311 Add a check if stplyr even exists
cause the game otherwise crashes in some situations
2023-10-12 11:32:48 +02:00
alufolie91 1c067d7eec pls 2023-10-12 00:32:12 +02:00
alufolie91 1b5c155dda Revert " Fix a series of buffer overflows in SOC loading"
This reverts commit 1af9e362e0.
2023-10-12 00:26:16 +02:00
alufolie91 8065761c38 Fix spelling "Colourized Hud" 2023-10-11 18:44:46 +02:00
alufolie91 118bb5b107 unfuck sound stuff
-Fix sound sometimes not unmuting when unfocusing and refocusing the game

- Fix the game not being able to turn sound on when starting the game with sound and music disabled

- Fix the sound toggles looking weird in the menu
2023-10-11 17:21:41 +02:00
alufolie91 d1db73342a lowercase kc_ uhgugugeusg 2023-10-11 12:58:16 +02:00
alufolie91 f3e8630049 fix color hud menu grey out thingie 2023-10-11 12:18:41 +02:00
alufolie91 17b1369085 uh also make it support the small minimap icons 2023-10-11 11:41:39 +02:00
alufolie91 497b7e983e give "libd_drawOnMinimap" support for hud offsets 2023-10-11 11:22:33 +02:00
alufolie91 e8e24be6e1 ah move it to saturn options instead
both menus are cramped, but eh, we already had the speedometer toggle there, so this should be also there for consistency
2023-10-11 02:00:25 +02:00
alufolie91 52e2c2bc17 Add colorized hud to menu, make default off
Its in HUD Options since it makes the most sense its in there.
Also off by default, as always
2023-10-11 01:43:36 +02:00
alufolie91 d5d3445fae HUD colorization
https://github.com/NepDisk/srb2k-nepanus/commit/6e45c9bb5ebf8a7335e05316c1e1f70cab1fb160
2023-10-11 01:24:16 +02:00
alufolie91 f22fcbc31c Merge remote-tracking branch 'origin/lua-localskin-fields' into Saturn-Next 2023-10-11 01:22:37 +02:00
alufolie91 275f2f7c28 Merge remote-tracking branch 'origin/miscfixes2' into Saturn-Next 2023-10-11 01:22:02 +02:00
alufolie91 b96663ffb8 Merge remote-tracking branch 'origin/Saturn' into Saturn-Next 2023-10-11 01:21:56 +02:00
indev 939aedd384 Add mobj.localskin and player.localskin fields 2023-10-09 13:43:06 +03:00
Alug b3509e46dd Revert "Avoid branch prediction slowdowns in R_PointOnSide and R_PointOnSegSide"
This reverts commit c5476ff8f9.
2023-10-09 07:39:52 +02:00
Alug 869ddb0b35 Revert "optimise mipmaps"
This reverts commit 7dae68561e.
2023-10-09 06:56:16 +02:00
Alug 466ab2883b remove this
uneeded and i think it crashes
2023-10-09 06:54:49 +02:00
Alug 544c471a9c Add toggle for showing all race maps in level select
"showallmaps yes/no"
2023-10-08 23:27:27 +02:00
alufolie91 b3c1111cd3 forgor 1 line 2023-10-08 03:36:30 +02:00
alufolie91 2fa79155de make the player afterimage sprites follow however the player sprite look
playerafter images now support things like saltyhop and gravstretching to make them feel more grounded or whatever
2023-10-08 03:34:56 +02:00
indev 8af91b8c9b Attempt to fix some replays segfaulting when trying unarchive lua tables from demo 2023-10-06 18:33:55 +02:00
Alug 7dae68561e optimise mipmaps
https://git.do.srb2.org/STJr/SRB2/-/commit/cc12496e9c3fce929546640bbe2c1b35056d7a86
2023-10-05 21:32:08 +02:00
Alug c5476ff8f9 Avoid branch prediction slowdowns in R_PointOnSide and R_PointOnSegSide
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2168/diffs

a bit experimental
2023-10-05 20:55:03 +02:00
alufolie91 2071684fec forgor this oops 2023-10-05 01:05:12 +02:00
alufolie91 50cde90736 add all gl commands even when in software mode
this makes the game not reset some things everytime you switch from opengl to software and back to opengl
2023-10-05 01:04:30 +02:00
alufolie91 b00538a123 lol 2023-10-05 00:38:07 +02:00
alufolie91 1f900c4c75 remove some double defines and move some stuffs 2023-10-04 22:33:14 +02:00
alufolie91 72890d6ed4 move those where they belong 2023-10-04 22:14:02 +02:00
alufolie91 1a13e70b37 rename to maptitle to not conflict with mods 2023-10-04 02:44:32 +02:00
alufolie91 21dcd757b5 toggable stagetitles
basically what it says, made a toggle for stagetitles.
2023-10-04 02:35:18 +02:00
alufolie91 817c4a4042 add some missing stuff to m_menu.c 2023-10-03 12:18:59 +02:00
Alug ea2281355a forgor to delet 2023-10-03 04:12:55 +02:00
Alug 643c7a851d lemme change the audio buffersize for less sound lag pls
"buffersize" command
2023-10-03 04:11:41 +02:00
Alug 3d56f3f212 ugh oops 2023-10-03 03:04:20 +02:00
Alug f086d9a698 nah dont wanna mess with software
leave it as is
2023-10-03 02:58:58 +02:00
alufolie91 e4cd3f8bb7 comment this out for now 2023-10-03 02:56:00 +02:00
alufolie91 4647fd80b9 Revert "fix some things resetting when switching to software from ogl and back"
i am a dumbass lmao


This reverts commit 6f998f922b.
2023-10-03 02:53:15 +02:00
alufolie91 2ce9803257 remove direct3d stuff aswell as minigl stuff 2023-10-03 02:38:09 +02:00
alufolie91 90623359c7 total destruction
removed wince, wii, psp, ps3, msdos and gp2x things aswell as removing sdl 1.2 things since that cant be used with kart anyways
2023-10-03 02:10:33 +02:00
alufolie91 8ecf4f26a7 death 2023-10-03 01:12:07 +02:00
alufolie91 b5c525a990 rip wii and psp 2023-10-03 01:02:45 +02:00
alufolie91 09fcff21ed red light of death, bye ps3 2023-10-03 00:35:02 +02:00
alufolie91 eb229e1844 get Xecuted
rip xbox
2023-10-03 00:06:21 +02:00
alufolie91 22bdf442d4 rip dreamcast sweet prince 2023-10-02 23:38:23 +02:00
alufolie91 f92a7582c6 oops 2023-10-02 23:05:59 +02:00
alufolie91 d158eae377 wtf online mp3 playlists, die! 2023-10-02 23:04:02 +02:00
alufolie91 67c67ec1b0 rip in pieces cd music
death
2023-10-02 23:02:23 +02:00
alufolie91 6f998f922b fix some things resetting when switching to software from ogl and back
also add a missing hwrender ifdef
2023-10-02 22:01:42 +02:00
Alug 859c0181a1 Merge pull request #74 from Indev450/lua-fix-drawpingnum
Fix v.drawPingNum flickering in any fps higher than 35
2023-10-02 15:32:00 +02:00
indev 6a8bfb0da2 This can be const too 2023-10-02 13:08:05 +03:00
indev 26fae628da Forgor to remove first V_DrawPingNum, also change colormap type to const to silence warning 2023-10-02 13:01:36 +03:00
indev 7ce18078f0 Fix v.drawPingNum flickering in any fps higher than 35 2023-10-02 12:31:36 +03:00
alufolie91 c9289dec5a fix opengl sprite shadows 2023-10-02 00:47:52 +02:00
lug420 2ba311705f redo gif recording
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/928?commit_id=ab7987d1cf34fd5d30ce82385bf1c81caf1cb2d3
2023-10-01 02:32:13 +02:00
alufolie91 5201ccd6d2 Optimize HWR_RenderBatches polygon sorting 2023-10-01 02:31:38 +02:00
alufolie91 74a6f76621 oops this doesent belong here 2023-10-01 02:20:17 +02:00
alufolie91 1702cc249d why even 2023-10-01 02:14:25 +02:00
alufolie91 0fbe87a481 change those to UINT32 2023-10-01 01:43:04 +02:00
alufolie91 ad3a5e9329 avoid a crash in intermission drawer
https://git.do.srb2.org/STJr/SRB2/-/commit/38c74cecc04b4cc06158b337b4ce71f45a11984d
2023-10-01 01:10:39 +02:00
alufolie91 2a3acc7286 Fix G_GhostTicker crashing trying to read netvars as ghost data 2023-09-30 22:16:45 +02:00
alufolie91 e7fc777e57 Lua: disallow bitwise not on anything but number values
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1262
2023-09-30 22:12:55 +02:00
alufolie91 5cd4b79ecf Fix sigsegv caused by bad target check in A_Custom3DRotate
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1430
2023-09-30 22:09:50 +02:00
alufolie91 1af9e362e0 Fix a series of buffer overflows in SOC loading
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1457
2023-09-30 22:06:17 +02:00
alufolie91 9c35e61f6c lower max precip dist again
3072 should be absolute max, it already tanks performance

also with precip dist on 4096 you literally hit the games vissprite limit and things start to disappear
2023-09-30 21:25:47 +02:00
alufolie91 e2a1147eea Fix PRIdS define for Windows MINGW64
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1367
2023-09-30 21:00:35 +02:00
alufolie91 503629024a comptime refactoring
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1776
2023-09-30 20:48:41 +02:00
alufolie91 1fa7eb24ac Compile with -rdynamic for UNIXCOMMON platforms
should fix backtrace logging only showing adresses
2023-09-30 20:14:55 +02:00
alufolie91 ac211aabe8 Print a backtrace when SRB2 crashes in a Unix-like environment.
good stuff

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1288
2023-09-30 20:07:08 +02:00
alufolie91 e9e501bb10 Merge remote-tracking branch 'origin/weathershit' into Saturn 2023-09-30 11:16:34 +02:00
alufolie91 1bc674d73f Merge remote-tracking branch 'origin/removeasmstuff' into Saturn 2023-09-30 11:16:31 +02:00
Alug 10a724a048 fix software mode flashpals when gr_paletteshader is turned off 2023-09-29 22:43:20 +02:00
Alug 7a780bf898 make precip interpolation toggable
saves a few frames while looking basically the same
2023-09-29 21:07:58 +02:00
alufolie91 b9d6d510be Revert "completely remove precip interpolation"
This reverts commit c444d4180e.
2023-09-29 20:48:09 +02:00
alufolie91 5d98bde04c a 2023-09-29 20:24:12 +02:00
alufolie91 1059a7ca5e Revert "Revert "Clean up and simplify zone memory allocation" and "Some memory allocations have been properly aligned" Fixes #35"
This reverts commit 44c9b87557.
2023-09-29 16:15:48 +02:00
alufolie91 05173de41f forgor 2023-09-29 15:35:48 +02:00
alufolie91 ec1cd5f933 rip in pieces asm code
this thing makes software crash so goddamn often, its useless nowadays anyways, and SRB2 removed it some time ago aswell

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2074?commit_id=7634a960314d5a576656cc4300a74caf889f8d7f
2023-09-29 15:34:29 +02:00
alufolie91 074be933ad remove asm FixedDiv and FixedMul functions
DIE!
2023-09-29 15:15:13 +02:00
alufolie91 41229be341 Merge branch 'Saturn' into weathershit 2023-09-27 17:22:49 +02:00
Alug 1336848f1d Merge pull request #73 from Indev450/lua-remove-unneeded-interpolation
Remove unneeded interpolation from R_PlayerSliptideAngle
2023-09-27 16:03:08 +02:00
indev e10ed14a3c Remove unneeded interpolation from R_PlayerSliptideAngle (this function is only used from lua, and lua is always running at 35 fps anyway) 2023-09-27 12:36:10 +03:00
alufolie91 dc0e67515b compiler complains 2023-09-27 06:00:27 +02:00
alufolie91 6544851ba5 c90 shit 2023-09-27 05:45:29 +02:00
Alug 02fab76406 remove all that crap
nothing uses it, leftovers from cep port
2023-09-27 02:17:23 +02:00
Alug acb139a8c6 die 2023-09-27 02:02:03 +02:00
Alug 82fe3e5362 ughuguha 2023-09-27 02:00:40 +02:00
Alug 26b28f9b4d why are these here?? 2023-09-27 01:49:54 +02:00
alufolie91 689f5add60 smooooth console
uncap console opening/closing animation
2023-09-27 00:48:21 +02:00
alufolie91 c444d4180e completely remove precip interpolation
DIE!
2023-09-27 00:46:48 +02:00
alufolie91 c4312e3f2f smooooth console
uncap console opening/closing animation
2023-09-26 22:54:34 +02:00
alufolie91 50526d2728 remove parts of precip interpolation
it looks exactly the same, but improves performance on maps with weather a bit
2023-09-26 22:44:52 +02:00
alufolie91 04edcd03f2 refactor weather switching 2023-09-26 22:42:39 +02:00
hayaunderscore 09cb8779e4 Fix an issue where flats dont look correctly without retoggling gr_paletteshader 2023-09-26 21:21:47 +02:00
alufolie91 d86eec52ae precip doesent need that stuff interpolated 2023-09-26 21:18:41 +02:00
lug420 e6a1e58405 uaaagheue 2023-09-18 17:14:59 +02:00
lug420 ea10c9ac13 v3 2023-09-18 16:00:19 +02:00
indev e6d3f3f27c Merge pull request #72 from Indev450/localskins
Localskins
2023-09-18 16:52:11 +03:00
indev f713b7fb60 Merge pull request #71 from Indev450/paletteshader
Paletteshader
2023-09-18 16:51:58 +03:00
indev c35a542d60 Merge pull request #70 from Indev450/slopetexture
Slopetexture
2023-09-18 16:51:45 +03:00
indev e6c699faf4 Merge pull request #69 from Indev450/lua-more-rotation-fields
Add mo.rollsum and player.sliproll fields. Rendering and frame interp…
2023-09-18 16:51:34 +03:00
indev f626b4b031 Merge pull request #61 from Indev450/animatedvotescreens
Animatedvotescreens
2023-09-18 16:51:23 +03:00
indev aed81c0ff5 Merge pull request #60 from Indev450/sdldraganddrop-utf8-on-windows
Sdldraganddrop utf8 on windows
2023-09-18 16:51:07 +03:00
indev 1354f2f302 Merge pull request #59 from Indev450/softwarestuff
Softwarestuff
2023-09-18 16:50:49 +03:00
indev 8ea5d0f729 Merge pull request #58 from Indev450/no-discordrpc-when-cvar-is-off
No discordrpc when cvar is off
2023-09-18 16:50:29 +03:00
alufolie91 a4f5f3b7dc Merge remote-tracking branch 'origin/paletteshader' into Saturn-Next 2023-09-18 15:41:14 +02:00
lug420 ab93865255 make flashpals toggable
could be a bit distracting for some
2023-09-18 15:39:13 +02:00
hayaunderscore 1ecdd3dae6 fix compilation error 2023-09-18 14:49:56 +02:00
hayaunderscore ddcd6b0d31 Redo localskin command 2023-09-18 14:49:19 +02:00
alufolie91 5196f1c5b9 Merge remote-tracking branch 'origin/Saturn' into localskins 2023-09-18 14:47:56 +02:00
alufolie91 e4afbc93fe Merge remote-tracking branch 'origin/Saturn' into Saturn-Next 2023-09-17 02:08:50 +02:00
alufolie91 ec62d20a7c Merge remote-tracking branch 'origin/paletteshader' into Saturn-Next 2023-09-17 02:07:51 +02:00
Alug 9dd6ec718f Merge pull request #68 from hayaunderscore/paletteshader
`P_FlashPal` support in palette renderering
2023-09-17 01:52:12 +02:00
hayaunderscore 69237d6a3a Fix stuttering and gamma 2023-09-17 07:28:47 +08:00
hayaunderscore 426cbee752 Make flashpals work
I hate this
2023-09-17 07:28:34 +08:00
alufolie91 d8ed0681ab Merge remote-tracking branch 'origin/paletteshader' into Saturn-Next 2023-09-15 21:36:18 +02:00
lug420 c2f3486e6d Revert "(hopefully) make flashpals work with palette rendering"
This reverts commit e4a575cc5e.
2023-09-15 21:36:05 +02:00
alufolie91 784093603e Merge remote-tracking branch 'origin/paletteshader' into Saturn-Next 2023-09-15 20:56:49 +02:00
lug420 e4a575cc5e (hopefully) make flashpals work with palette rendering 2023-09-15 20:54:57 +02:00
lug420 f00c9d8c23 dont do this in dedi
unecessary if someone runs this thing in dedi mode
2023-09-15 20:54:25 +02:00
indev 9440a22e88 Merge pull request #67 from Indev450/paletteshader
Paletteshader
2023-09-14 21:55:25 +03:00
lug420 f70f7152ab let the thing do its thing
fixes switching of paletterenderer thing
2023-09-14 20:24:36 +02:00
lug420 8c7f35fa29 absolute hell
lighttable sorting was on even with the palette shader disabled, but, we dont need that shit for non palette renderer mode

hope this shit doesent break anything ever pls
2023-09-14 19:17:46 +02:00
lug420 fe74e69da6 dont need this 2023-09-14 18:42:35 +02:00
alufolie91 c170f53948 Merge remote-tracking branch 'origin/slopetexture' into paletteshader 2023-09-14 18:32:10 +02:00
alufolie91 13fd825bcf hackiest shit to make custom shaders not kill palette shader
this is so super dumb its unreal
but it works
2023-09-14 03:43:11 +02:00
indev 8ee4fc2fa1 Oops used upscaled image >< 2023-09-14 00:18:22 +03:00
indev 679a8387c9 Add logo (WIP) 2023-09-14 00:09:33 +03:00
alufolie91 00f3805721 Merge remote-tracking branch 'origin/lua-more-rotation-fields' into Saturn-Next 2023-09-13 21:47:09 +02:00
alufolie91 ab2194e053 Merge remote-tracking branch 'origin/slopetexture' into Saturn-Next 2023-09-13 21:44:26 +02:00
lug420 9044a46b31 fix fullscreen toggle and resolution changes 2023-09-13 21:32:35 +02:00
indev 53d76ea037 Merge pull request #66 from Indev450/no-discordrpc-when-cvar-is-off
No discordrpc when cvar is off (into saturn-next)
2023-09-13 21:23:02 +03:00
indev f3a28c83d8 Merge pull request #65 from Indev450/softwarestuff
Softwarestuff (into saturn-next)
2023-09-13 21:21:59 +03:00
indev b1e2986f65 Merge pull request #64 from Indev450/sdldraganddrop-utf8-on-windows
Sdldraganddrop utf8 on windows (into saturn-next)
2023-09-13 21:21:14 +03:00
indev 267b53a90e Merge pull request #63 from Indev450/animatedvotescreens
Animatedvotescreens (merge into saturn-next)
2023-09-13 21:20:12 +03:00
indev e1b41d2c58 Merge pull request #62 from Indev450/fix-lua-onchange-error-in-error-handling
Fix 'error in error handling' for cases when error happens in cvar.fu…
2023-09-13 21:16:54 +03:00
lug420 3204095afb revert "redo parts of the lighttable shader"
die
2023-09-13 16:09:58 +02:00
lug420 538de7d2d2 fix memfree command on 64bit 2023-09-13 04:42:35 +02:00
alufolie91 2cba586d9c im good at coding
absolute bruh thing, but it somehow works, fixes the midtextures, and doesent kill performance lmao
2023-09-13 03:54:12 +02:00
alufolie91 ad4d587a52 screw you
bleh, pegging midtextures to slopes now works correctly, but cutting them is broken again
atleast this fixes the performance issues
no idea tho why it screws up things so much
2023-09-13 02:58:20 +02:00
alufolie91 a929636a28 Revert "cleanup HWR_SplitWall"
This reverts commit 06a2508a9c.
2023-09-13 02:56:11 +02:00
alufolie91 06a2508a9c cleanup HWR_SplitWall
e
2023-09-13 01:52:25 +02:00
alufolie91 64b2e2ee37 Fix bugs with HWR_SplitWall and sloped midtextures but cleaner
performance still pretty bad, atleast this is cleaner than last time
2023-09-13 01:40:52 +02:00
alufolie91 b6ef6eb801 revert sloped midtexture fix for now
huge performance regression on some maps
ill look into it in the future again maybe
2023-09-12 21:03:58 +02:00
indev b4d48cc9ec Set palette uniform in InitPalette instead of DrawScreenFinalTexture 2023-09-12 21:55:35 +03:00
alufolie91 f83a937dc5 redo parts of the lighttable shader
this caused performance drops before even with the whole thing disabled
2023-09-12 18:56:51 +02:00
alufolie91 e2acb4c3fc only do this when were running the palette shader 2023-09-12 17:07:19 +02:00
alufolie91 5bf722a1fb only allow this thing when shaders are enabled aswell
yes i will do it like that
no i wont use gl_allowshaders
i want this thing to be able to affect the menus and hud, just like software :p
2023-09-12 01:50:46 +02:00
alufolie91 0751484439 fix some effects
idk lmao but this fixes a few effects to be "on par" with software renderer
aswell as menus and hud stuff
2023-09-12 00:38:50 +02:00
alufolie91 e5b16c7aa0 Merge remote-tracking branch 'origin/Saturn' into paletteshader 2023-09-11 20:45:20 +02:00
lug420 bac058d128 forgor some things 2023-09-11 20:07:03 +02:00
haya dd4a9ae890 i may be stupid 2023-09-11 20:01:27 +02:00
hayaunderscore f91687209b fix horizon lines on batching somewhat 2023-09-11 20:01:22 +02:00
lug420 ec4140a9d2 remove custom shader toggle + clear colormaps when toggle palette shader
the custom shader toggle often broke stuff when toggled while palette shader was active

also clearing colormaps when toggling palette shader is ugly midlevel but atleast it doesent visually break completely

def need to somehow reinitialze colormaps instead or smth
2023-09-11 20:00:09 +02:00
lug420 2553c9e878 cleanup a bit
remove debug prints and vars
clean stuff up a bit
2023-09-11 18:30:35 +02:00
lug420 f9f33aa53a add lighttabble shader
this was way too much headache
set up a basic condition atm, so lighttable generation turns off if the paletteshader is turned off
this will break visually if the shader is turned on midrace atm
will implement smth better
2023-09-11 18:13:59 +02:00
hayaunderscore 4455ebe58f Fix issue with upside-down salty hop 2023-09-11 16:03:18 +02:00
alufolie91 35cfdea9e7 allow opengl to also use widescreen backgrounds for votes
thanks kk for locking this to software mode only despite this working without issues in opengl aswell
2023-09-11 15:55:59 +02:00
indev 346433d248 Shutdown DiscordRPC when discordrp cvar is set to Off 2023-09-11 13:17:12 +03:00
indev 16a7e69292 Don't init discord rich presence untill discordrp is set to On
Haven't tested this since i'm on linux and the feature looks like it is windows only
2023-09-11 13:01:29 +03:00
Alug 441824fc70 Merge pull request #57 from hayaunderscore/paletteshader
Fix shader compile error and level palettes
2023-09-11 10:40:01 +02:00
hayaunderscore f46b77ab7b fix shader compile error, fix custom level palettes 2023-09-11 14:00:36 +08:00
alufolie91 561af0e601 smol adjustment 2023-09-11 02:14:22 +02:00
alufolie91 362c21505d smol fixup
fixes the weird black/white screen on game start
2023-09-11 01:04:43 +02:00
alufolie91 d3d40de996 unfuck this thing change lut size to full 64
holy fuck, goddamit, im so mad at this
2023-09-10 18:59:31 +02:00
alufolie91 3ce4653bb5 smol adjustment 2023-09-10 16:57:38 +02:00
alufolie91 a639c87a90 rework this thing, use parts of the new palette renderer
this atleast completely fixed the stutters and prob the memory leaks the thing had before

its still super messy and idk
2023-09-10 16:43:42 +02:00
alufolie91 3aac16432a adjust things more
try to mitigate performance loss and stutters
readjust the look a bit
cleanup stuff a bit
this thing still pretty much runs badly
2023-09-09 16:18:46 +02:00
lug420 1c9ea1eb2e fix a crash with rotsprites
+ clean up this absolute mess
2023-09-09 01:38:23 +02:00
indev a47aea4c9f Fix 'error in error handling' for cases when error happens in cvar.func right when cvar is registered 2023-09-08 18:29:05 +03:00
alufolie91 c31e7ff2b3 Optimize sprite rendering by ignoring completely occluded sprites
backport of the srb2 thing
judging by perfstats it often cuts the spritecount in half
take with a grain of salt since i barely tested it
software mode only btw

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2131?commit_id=b8313ceda283ac0c8dd9ab6141e83a31f0bb9639
2023-09-08 12:44:13 +02:00
indev 9cd0e6c385 Why is this 'variable-sized' and can't be initialized like that??? 2023-09-08 12:00:10 +03:00
indev c23a0f08c4 Merge pull request #55 from Indev450/rotsnap
smoother slope rotation for players
2023-09-08 11:51:55 +03:00
indev 3ff865b1b6 Merge pull request #56 from Indev450/sdldraganddrop
Addfile per drag and drop
2023-09-08 11:51:31 +03:00
indev cdedf1349c Attempt to fix non-ansii filenames on windows 2023-09-08 11:47:19 +03:00
alufolie91 7beab3b582 fix the sprite renderstats again
aAAaaa
2023-09-08 10:42:31 +02:00
alufolie91 b1b592f88d readd the stuff blubuabb 2023-09-08 10:38:48 +02:00
lug420 8737a40a4d bleh 2023-09-07 23:55:26 +02:00
lug420 71ce5be570 me wondering why the hw sprite perfstats were broken
+ removing some stuff we dont need
2023-09-07 23:54:22 +02:00
indev b883d02abb Use P_AddWadFile directly instead of command so non-ansii file names also supported 2023-09-07 19:28:53 +03:00
alufolie91 09f79a6934 Addfile per drag and drop
https://git.do.srb2.org/SteelT/SRB2/-/commit/01cc2b91e189e4d268eddd38f3ba917133a07adc
2023-09-07 17:24:06 +02:00
lug420 9bdcfe9750 adjust some stuff
bleh looks alr, but def loose some color depth with it
2023-09-07 15:59:10 +02:00
lug420 b767180473 readd the lookup texture, adjust its size
it runs a bit better like this, but also is a bit darker
def needs adjustments
2023-09-07 14:38:10 +02:00
indev acb5d96788 Merge pull request #54 from Indev450/misc-fixes
Fix few typos
2023-09-06 19:58:45 +03:00
indev 228a932598 Fix few typos 2023-09-06 19:54:14 +03:00
lug420 b53cc6fd2b fuck it palette renderer "lite"
remove the goddamn lookup textures, this atleast runs okish and looks not that bad
2023-09-06 18:29:26 +02:00
lug420 01cd8f5a0f 4fps
this thing runs like crap 4fps
2023-09-06 18:02:04 +02:00
alufolie91 9732e74bf3 more work
https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/commit/140dba15b86ad7e206c50c8336103bee89e6b032
2023-09-06 15:24:31 +02:00
alufolie91 2ed4a7b548 Palette Lookup Texture
https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/commit/9562a95d0adb9384b5db26145ed03cb5d3e5a893
https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/commit/d8a329b89dad75a57e076d88b8d5d1fdb5f959bc
2023-09-06 15:19:39 +02:00
alufolie91 52c11d1444 paletteshader
stuff from hannu
https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/commit/2530e8b2938eb3ecb6f56b6cdc9916f387a72c6a

this thing tanks my framerate to hell
2023-09-06 15:12:18 +02:00
alufolie91 78d50e4c43 just a bit more
looks even better like this imo
2023-09-05 23:01:03 +02:00
indev 7f05d27f42 Allow lua to change vote background via hud.setVoteBackground 2023-09-05 12:47:49 +03:00
alufolie91 3675fdd361 smoother slope rotation for players
dont snap player directly to whatever theyre standing on
instead make the sprite rotate a bit smoother
see: https://git.do.srb2.org/haya_/Kart-Public/-/commit/8448d75b031fa86cdb854d13eda4712352d35a89
2023-09-05 09:13:12 +02:00
alufolie91 98dfe528d8 remove this 2023-09-04 16:37:11 +02:00
alufolie91 7da590df94 Fix sprite scale column iteration crash
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2130
2023-09-04 15:30:42 +02:00
alufolie91 90cc5a6cb0 Fix a possible crash in R_RenderMaskedSegRange
https://git.do.srb2.org/STJr/SRB2/-/commit/55b4458001b2ffe76774ff07a11b56ebf1f70de9
2023-09-04 15:30:21 +02:00
alufolie91 ca9277366c anim screen stuff 2023-09-01 19:43:24 +02:00
indev e79bf24bcd Add lua memory usage in memfree command output 2023-09-01 18:34:06 +03:00
indev 2c1201ff34 Add mo.rollsum and player.sliproll fields. Rendering and frame interpolation code was used, so they are NOT synch safe! 2023-09-01 12:45:23 +03:00
alufolie91 c4ff1a3aca forgor to readd those 2023-09-01 10:12:06 +02:00
alufolie91 5760f25c74 readd the namecheck to addlocalskin menu
until we find a better way to check for skins c:
2023-08-31 13:41:25 +02:00
indev 0a6f700c6f Addon browser can now be in 2 states - loading addons and loading localskins, which fixes its behavior when trying to load character addon as server admin 2023-08-31 13:59:30 +03:00
alufolie91 3147dfb012 2.1 2023-08-31 11:18:38 +02:00
Alug 5007a33bbf Merge pull request #49 from Indev450/fixspeedometer
fix the speedometer
2023-08-31 10:57:03 +02:00
Alug c65acfa90e Merge pull request #50 from Indev450/nospecialmusic
Nospecialmusic
2023-08-31 10:56:50 +02:00
Alug b167c19137 Merge pull request #51 from hayaunderscore/readme-refactor
make the readme look more consistent
2023-08-31 10:56:15 +02:00
alufolie91 d48b08856e Support for Animated Votingscreens
i hate the interpolation i hate it
no idea honestly if those play correctly atm but atleast they dont freak out with uncapped
https://gitlab.com/blondedradio/srb-2-k-cep/-/commit/776a547087cdef46b2bdbfc3ddc9d4d963bbea4b
2023-08-31 10:42:43 +02:00
alufolie91 9ba5c9a38b bruuuuuh 2023-08-31 03:35:42 +02:00
haya 1a9f30a328 ok github markdown 2023-08-31 07:06:17 +08:00
haya 97058bfcf6 try being consistent 2023-08-31 07:05:06 +08:00
alufolie91 bd41bbb304 fix the speedometer
things got swapped X)
also removed the extra number, kart adds a 3rd one if needed
2023-08-31 00:24:16 +02:00
alufolie91 f47cb885cc eeeeheheheeheheh ifdefs 2023-08-30 22:27:52 +02:00
alufolie91 1ab243d93a add shit to menu 2023-08-30 22:26:38 +02:00
alufolie91 15d59cbbd8 i dont want any special music
no to grow and star music!
2023-08-30 22:20:07 +02:00
Alug c88d2dadb0 Update README.md again 2023-08-30 21:15:07 +02:00
alufolie91 a4e96d2380 bruh 2023-08-30 19:20:35 +02:00
alufolie91 002c550263 more fixes
ugh
2023-08-30 19:17:51 +02:00
alufolie91 25b9bc4100 smol fix 2023-08-30 19:15:22 +02:00
alufolie91 7105606475 more menu shit
- Youll now get a preview of what skin is going to be used.
- Removed redundant code
https://git.do.srb2.org/haya_/Kart-Public/-/commit/a6728c26f76bfc94f7bc07aa076c8979c9bef5c9
2023-08-30 19:14:41 +02:00
alufolie91 71e4005226 add menu n shit
https://git.do.srb2.org/haya_/Kart-Public/-/commit/b85a55137cfef0a18b297c59e62018586323a2e9
2023-08-30 19:12:56 +02:00
alufolie91 76b66b41b6 Argh!
https://git.do.srb2.org/haya_/Kart-Public/-/commit/217f15452c1fda9ea3c0d00650d470e13e14e0f5
2023-08-30 18:58:26 +02:00
alufolie91 43e1331594 another localfile thingie
https://git.do.srb2.org/haya_/Kart-Public/-/commit/4a60babf75ce6362d32a1633b12a718d65bcd18c
2023-08-30 18:51:10 +02:00
alufolie91 23ba3d493b issues fixing 2023-08-30 18:50:00 +02:00
alufolie91 487cbc495a more changes
https://git.do.srb2.org/haya_/Kart-Public/-/commit/9e3919195d143956e31bf092f6822cab61d1ee81
2023-08-30 18:47:57 +02:00
alufolie91 faeb4d22ed Add a -force parameter to addskins, fix localskin not playing the right sounds
https://git.do.srb2.org/haya_/Kart-Public/-/commit/932e9b92c3551dc4910157ea8d3eea1145ccfc40
2023-08-30 18:43:55 +02:00
alufolie91 9dc2ad4f32 add localskinall command
https://git.do.srb2.org/haya_/Kart-Public/-/commit/958fe796eb070b6678cd45ea835a998d8dc6d2c9
2023-08-30 17:39:41 +02:00
alufolie91 ceae12baba fix an issue with desynchs
https://git.do.srb2.org/haya_/Kart-Public/-/commit/a47d965b82e45bcf600217899a2cd6951024093b
2023-08-30 17:34:28 +02:00
alufolie91 58c58e9542 fix shit even more
https://git.do.srb2.org/haya_/Kart-Public/-/commit/37d72b4680bbb1ecb68aaa817f2afc8b34deab96
2023-08-30 17:31:57 +02:00
alufolie91 46c7bf8b03 fix shit
https://git.do.srb2.org/haya_/Kart-Public/-/commit/e4ba8b9a753fe741f1e5a65490ae0d2d645baa97
2023-08-30 17:24:50 +02:00
alufolie91 c011d09e33 fix for localskins not properly saving when returning back into the titlescreen
https://git.do.srb2.org/haya_/Kart-Public/-/commit/e679dfe0aa059cca68bc67da5a45c12c26dfd9ac
2023-08-30 17:11:38 +02:00
alufolie91 65fadcf709 fix
https://git.do.srb2.org/haya_/Kart-Public/-/commit/b6b3dcb3f08b470d6075c2949b2dee364afb5c99
2023-08-30 17:09:40 +02:00
alufolie91 e2b06aa600 Ghost and signpost support
https://git.do.srb2.org/haya_/Kart-Public/-/commit/f07179589414b15605da14901f742342ab53de66
2023-08-30 17:08:50 +02:00
alufolie91 7ab0a808a9 Show which skin is the real one 2023-08-30 17:05:21 +02:00
alufolie91 bc7ce5c983 "immersion"
https://git.do.srb2.org/haya_/Kart-Public/-/commit/4547347e219158c1d11a6f373c9c94a7bd2ee789
2023-08-30 17:04:40 +02:00
alufolie91 6e55d88816 more shit
https://git.do.srb2.org/haya_/Kart-Public/-/commit/28fa3039c147d7b479b8d4ddfca50918c620aa2f
2023-08-30 17:02:05 +02:00
alufolie91 97f0ea1b0f initial support
https://git.do.srb2.org/haya_/Kart-Public/-/commit/a464df2165d62528af46d7ef0a6cbdbf29c3d07c
2023-08-30 16:59:23 +02:00
James R 684b016487 Merge branch 'fix-ban-txt-crash' into 'master'
Fix ban.txt crashing game

See merge request KartKrew/Kart-Public!329
2023-08-14 11:41:53 +00:00
James R 0b55e8df7b Rename HAVE_STRLCPY to SRB2_HAVE_STRLCPY, fix non-glibc compile
- Fix compile with msvcrt
- Fix compile with SDL 2.28.2
2023-08-14 04:40:00 -07:00
indev f9880e8413 Fix ban.txt crashing game 2023-08-05 14:50:12 +03:00
James R c499a8387e Fix glibc 2.38 compile
glibc 2.38 added strlcpy and strlcat.
2023-08-03 16:45:34 -07:00
363 changed files with 10010 additions and 64472 deletions

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
- v1-SRB2-APT
- run:
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:
key: v1-SRB2-APT
paths:
+2
View File
@@ -16,3 +16,5 @@
#Appveyor
/appveyor.yml -crlf -whitespace
# Other
*.c text=auto
*.h text=auto
+436
View File
@@ -0,0 +1,436 @@
default:
image: debian:stable-slim
stages: # List of stages for jobs, and their order of execution
- build
variables:
GIT_STRATEGY: clone
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
.job_template: &job_build # This job runs in the build stage, which runs first.
stage: build
cache:
- key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG
fallback_keys:
- cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH
- cache-$CI_PROJECT_PATH_SLUG-default
paths:
- ccache
- ccache_statslog
- key: apt-$CI_JOB_IMAGE
paths:
- apt-cache
unprotect: true
before_script:
- - |
# debconf
echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment"
- export DEBIAN_FRONTEND="noninteractive"
- export DEBIAN_PRIORITY="low"
- export DEBCONF_NONINTERACTIVE_SEEN="true"
- |
# debconf
echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K"
- - |
# dpkg_aa
echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg"
- dpkg --add-architecture i386
- dpkg --add-architecture amd64
- dpkg --add-architecture arm64
- |
# dpkg_aa
echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K"
- - |
# apt_conf
echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf"
- export APT_CACHE_DIR=`pwd`/apt-cache
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
- touch /etc/apt/apt.conf.d/99build
- |
# apt.conf
echo Adding options to apt.conf':'
- |
# APT::Install-Recommends
echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build
- |
# quit
echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build
- |
# APT::Get::Assume-Yes
echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build
- |
# Dir::Cache::Archives
echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build
- |
# apt_conf
echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K"
- - |
# apt_update
echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing"
- apt-get update
- |
# apt_update
echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K"
- - |
# apt_pre
echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages"
- apt-get install apt-utils
- |
# apt_pre
echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K"
- - |
# apt_upgrade
echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
- apt-get upgrade
- |
# apt_update
echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K"
- - |
# apt_common
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
- apt-get install make git ccache
- |
# apt_common
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
- - |
# ccache_config
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
- mkdir --parents --verbose ~/.ccache/
- touch ~/.ccache/ccache.conf
- |
# cache.conf
echo Adding ccache configution option
- |
# base_dir
echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf
- |
# cache_dir
echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf
- |
# compiler_check
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
- |
# stats_log
echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf
- |
# max_size
echo max_size = 50M | tee --append ~/.ccache/ccache.conf
- |
# ccache_config
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
- - |
# cache_reset
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
- ccache --zero-stats
- ccache --show-stats
- |
# ccache_reset
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
after_script:
- - |
# apt_clean
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
- apt-get autoclean
- |
# apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
- - |
# ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
- ccache --show-stats --verbose
- ccache --show-log-stats --verbose
- |
# ccahe_stats
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
Debian testing GCC:
<<: *job_build
image: debian:testing-slim
allow_failure: true
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debian GCC testing"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
variables:
CC: gcc
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Windows x86:
<<: *job_build
artifacts:
paths:
- "bin/"
- "src/comptime.h"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
variables:
PREFIX: i686-w64-mingw32
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-i686-win32
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian stable:amd64:
<<: *job_build
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debian amd64"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
variables:
CC: x86_64-linux-gnu-gcc
OBJCOPY: x86_64-linux-gnu-objcopy
OBJDUMP: x86_64-linux-gnu-objdump
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian stable:i386:
<<: *job_build
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debian i386"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
variables:
CC: i686-linux-gnu-gcc
OBJCOPY: i686-linux-gnu-objcopy
OBJDUMP: i686-linux-gnu-objdump
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-i686-linux-gnu || apt-get install gcc
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian stable:arm64:
<<: *job_build
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debian arm64"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64"
variables:
CC: aarch64-linux-gnu-gcc
OBJCOPY: aarch64-linux-gnu-objcopy
OBJDUMP: aarch64-linux-gnu-objdump
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Windows x64:
<<: *job_build
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Win64"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
variables:
PREFIX: x86_64-w64-mingw32
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install gcc-mingw-w64-x86-64-win32
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian stable Clang:
<<: *job_build
allow_failure: true
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debian Clang"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
variables:
CC: clang
WFLAGS: -Wno-cast-align
script:
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install clang
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
Debian testing Clang:
extends: Debian stable Clang
image: debian:testing-slim
artifacts:
paths:
- "bin/"
- "src/comptime.h"
expose_as: "Debina Clang testing"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
variables:
CC: clang
WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
+1 -4
View File
@@ -109,13 +109,10 @@ FILE_PATTERNS = *.c \
*.mm \
*.dox
RECURSIVE = YES
EXCLUDE = ./src/djgppdos/internal.h \
./src/djgppdos/setup.c \
./src/sdl/IMG_xpm.c \
EXCLUDE = ./src/sdl/IMG_xpm.c \
./src/sdl/SRB2DC/scramble.c
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */src/hardware/*/* \
*/src/djgppdos/bcd.? \
*/src/sdl/SDL_main/* \
*/src/*/*_private.h \
*/src/sdl/*/*help.? \
+39
View File
@@ -0,0 +1,39 @@
# SRB2Kart Saturn: Custom lua features
## mobj.localskin and player.localskin fields
Allow reading and assigning localskins to players. Local skins for other objects aren't supported currently.
## mobj.rollsum field
**Not netsafe**. Returns total sprite rotation value, taking sliptideroll and sloperoll cvars value into account.
Mainly for use in visual-only addons like secondcolor.
## player.sliproll field
**Not netsafe**. Returns player's current sliptide roll angle, taking sliptideroll cvar value into account.
## hud.setVoteBackground(name)
Changes vote background texture prefix (game looks for PREFIX + "W" or "C" (depends on resolution) + FRAME\_NUMBER).
## hud.add(fn, "vote") and hud.add(fn, "intermission")
Hud hooks for vote screen and intermission screen. They only get drawer (`v`) as argument.
To check if those hooks are available, check if globals FEATURE\_VOTEHUD and FEATURE\_INERMISSIONHUD
exist.
## mobj.spritexscale, mobj.spriteyscale, mobj.spritexoffset, mobj.spriteyoffset, mobj.rollangle, mobj.sloperoll, mobj.rollmodel fields
Same fields as in SRB2 2.2
## S\_StopSoundByNum
Allows stopping specific sound globally. Because this function starts with S\_, like state, checking
if it exists is a bit more complicated:
```lua
if rawget(_G, "S_StopSoundByNum") ~= nil then
... -- Can use it
end
```
+43 -17
View File
@@ -6,51 +6,74 @@
- Sprites player rotation on slopes; going on hills, levitate, going down, and so on alters your sprites (configurable)
- You can alter all the base kart HUD element offsets on the fly in the Saturn Options settings menu
- "addfilelocal" Command, for those who want to use things like their custom hud in netgames (Same as addfile but completely client sided)
- OpenMPT for Tracker module playback (Complete with filters) fixed looping issues while even sounding better than the old GME playback
- `addfilelocal` Command, for those who want to use things like their custom hud in netgames (Same as addfile but completely client sided)
- Palette rendering, make the OpenGL renderer (almost) look like software mode!
- OpenMPT for Tracker module playback instead of GME
- Fixes looping and sounds better
- Allows filter configuration
- Colourize your Kart HUD, to either your player color or whichever colour you like! (optional / requieres extra2.kart file)
- The minimal brightness with Shaders can be configured, now you can seeeee in dark areas (0-255 , uses Sector brightness values)
- Lua hooks for Intermission (ex: You can make hostmod votes still visible during intermission!)
- Lua hooks for Vote Screen (ex: You can make hostmod votes still visible during map vote screen!)
- Lua HUD hooks for Intermission (ex: You can make hostmod votes still visible during intermission!)
- Lua HUD hooks for Vote Screen (ex: You can make hostmod votes still visible during map vote screen!)
- Saltyhop! do a funny hop
- Smaller Speedometer (optional / requieres extra.kart file)
- Record Attack input display can now be used everywhere
- Smaller minimap icons and also show player names on the minimap (toggable)
- "showmusiccredits" command, shows you the current music track again
- "listskins" show a list of all skins currently loaded
- Visual Portals from Haya´s HEP Client
- Toggable lowercase menu´s also from Haya´s HEP client
- Support for animated votescreens!
- `showmusiccredit` command, shows you the current music track again
- `listskins` show a list of all skins currently loaded
- Visual Portals from Haya's HEP Client
- Horizonline effect in OpenGL (watch the endless bricks on SNES Bowsers Castle!)
- Localskins! use whatever skin you like!
- Toggable lowercase menu's also from Haya's HEP client
- Everything that Galaxy has
## Improvements / Bug fixes
- Replay size has been increased to 10MiB minimum, to make replay overflows very unlikely to happen (can be set to 100MiB max with "maxdemosize" command in console)
- Music changes now properly show the music credits (ex: Kart maps with easter eggs that alter the music) *The mapper still has to provide a MusicDEF for this to work.
- Replay size has been increased to 10MiB minimum, to make replay overflows very unlikely to happen
- can be set to 100MiB max with `maxdemosize` command in console
- Music changes now properly show the music credits (ex: Kart maps with easter eggs that alter the music)
- The mapper still has to provide a MusicDEF for this to work.
- Configurable chatlog length (yay can read those messages from 30 mins ago without opening log.txt)
- Configurable timeout for waiting to join a full server (in vanilla this is capped to 5 minutes before it boots you out)
- Characters now spin in skin selection menu (configurable)
- HTTP Addon download speed has been raised dramatically (configurable with "downloadspeed" command)
- HTTP Addon download speed has been raised dramatically
- configurable with `downloadspeed` command
- HWR Drawnodes have been refactored, this should fix a few rare crashes esp in regards to OpenGL Visportals
- The Position Number in the corner is alot smaller now (half the size!)
- Toggable Lap animation
- Main menu shows the current renderer being used
- MSAA and A2C Antialiasing support (Configurable in renderer.txt file)
- A simple button to rejoin your last visited server
- Ability to show ALL maps in the mapselect screen, this includes hidden or hellmaps "showallmaps yes/no"
- Ability to toggle the Stagetitlecard "maptitles on/off"
## Performance / Debugging
- Access for `mobj_t` and `player_t` fields from Lua has been completely rewritten, for much better performance with many Lua scripts
- Lua shows Tracebacks whenever an error occurs
- The Lua Perfstats page now has multiple pages and is more organized (ps_thinkframe_page X in console)
- People with lower end hardware can disable "screen textures" with "gr_screentextures" command, huge performance gain with minimal visual loss (Note intermission screen background is broken with this)
- Software mode has gotten "ffloorclip", which boosts performance on maps with many Floor over Floor roads
- People with lower end hardware can disable "screen textures" with "gr_screentextures" command, huge performance gain with minimal visual loss
- Intermission backgrounds, heat wave effects and etc are broken with this
- `ffloorclip`, exclusive to Software, which boosts performance on maps with many Floor over Floor sectors
## Technical fixes
- ZFigthing Textures in Opengl mode have been fixed in engine (well almost all of it)
- Fof's intersecting with slopes have less issues and now render correctly in Opengl
- FOFs intersecting with slopes have less issues and now render correctly in Opengl
- Midtextures on slopes in Opengl are fixed, many weird guardrails and fences, aswell as some of those sticking out textures from the ground on some maps should be gone
- The annoying depraction messages for "P_TeleportMove" and "P_AproxDistance" have been silenced
- The annoying depraction messages for `P_TeleportMove` and `P_AproxDistance` have been silenced
- Silenced the annoying "cant find next map..." messages as theyre super useless and annoying anyways
- Added a small cooldown on "map" command due to spamming causing a SIGSEGV
- Added a small cooldown on `map` command due to spamming causing a SIGSEGV
- Many bugfixes to the Software renderer, so its much less prone to crashing
- Many bugfixes to the OpenGL renderer (too many too list all of them here; check the changelogs for more information)
- Bugfixes to the soundsystem, mainly regarding Sound muting
- Refactored Zone Memory Allocations (helps a bit with large maps)
- Many many more crash fixes and other bugfixes to the basegame (too many too list all of them here; check the changelogs for more information)
- Crash Backtraces have been replaced by libbacktrace (except for 32bit Windows builds)
Crashlogs now contain alot more informations. and even more if your build has debug symbols
Also allows 64bit Windows builds to produce Crashlogs!
## MISC
- Bird's Camara Tilting feature is no longer turned on by default
@@ -61,13 +84,16 @@
- A2C antialiasing makes transparent surfaces even more transparent
- You tell us! c:
## Note
Check the LUASTUFF file for more information on all the lua things Saturn has.
## Dependencies
- NASM (x86 builds only)
- SDL2 (Linux/OS X only)
- SDL2-Mixer (Linux/OS X only)
- libupnp (Linux/OS X only)
- libgme (Linux/OS X only)
- libopenmpt (Linux/OS X only)
- libbacktrace (Linux/OS X only)
## Compiling
-18
View File
@@ -1996,24 +1996,6 @@ HW3SOUND for 3D hardware sound support
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/v_video.h" />
<Unit filename="src/vid_copy.s">
<Option compilerVar="CC" />
<Option compiler="avrgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gnu_gcc_compiler_for_mingw32" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gnu_gcc_compiler_for_mingw64" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="armelfgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="tricoregcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="ppcgcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option compiler="gcc" use="1" buildCommand="$compiler $options -x assembler-with-cpp -c $file -o $object" />
<Option target="Debug Native/SDL" />
<Option target="Release Native/SDL" />
<Option target="Debug Linux/SDL" />
<Option target="Release Linux/SDL" />
<Option target="Debug Mingw/SDL" />
<Option target="Release Mingw/SDL" />
<Option target="Debug Mingw/DirectX" />
<Option target="Release Mingw/DirectX" />
</Unit>
<Unit filename="src/w_wad.c">
<Option compilerVar="CC" />
</Unit>
-3
View File
@@ -25,9 +25,6 @@
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'">
<ClCompile>
<PreprocessorDefinitions>USEASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
+1 -51
View File
@@ -5,7 +5,7 @@ Ver=3
IsCpp=0
Type=0
UnitCount=279
Folders=A_Asm,B_Bot,BLUA,D_Doom,F_Frame,G_Game,H_Hud,Hw_Hardware,Hw_Hardware/r_opengl,I_Interface,I_Interface/Dummy,I_Interface/SDL,I_Interface/Win32,LUA,M_Misc,P_Play,R_Rend,S_Sounds,W_Wad
Folders=B_Bot,BLUA,D_Doom,F_Frame,G_Game,H_Hud,Hw_Hardware,Hw_Hardware/r_opengl,I_Interface,I_Interface/Dummy,I_Interface/SDL,I_Interface/Win32,LUA,M_Misc,P_Play,R_Rend,S_Sounds,W_Wad
CommandLine=
CompilerSettings=00000000000100000111e1
PchHead=-1
@@ -1473,36 +1473,6 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit149]
FileName=src\tmap.nas
Folder=A_Asm
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=1
BuildCmd=nasm.exe -g -o $@ -f win32 src/tmap.nas
[Unit150]
FileName=src\asm_defs.inc
Folder=A_Asm
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit151]
FileName=src\vid_copy.s
Folder=A_Asm
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=1
BuildCmd=$(CC) $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@
[Unit152]
FileName=src\y_inter.h
Folder=H_Hud
@@ -1543,26 +1513,6 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit156]
FileName=src\p5prof.h
Folder=A_Asm
Compile=1
CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[Unit157]
FileName=src\tmap_mmx.nas
Folder=A_Asm
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=1
BuildCmd=nasm.exe -g -o $@ -f win32 src/tmap_mmx.nas
[Unit159]
FileName=src\lzf.h
Folder=W_Wad
-8
View File
@@ -11,8 +11,6 @@ environment:
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
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_URL: http://upx.sourceforge.net/download/upx391w.zip
CCACHE_EXE: ccache.exe
@@ -46,7 +44,6 @@ environment:
ASSET_CLEAN: 0
cache:
- nasm-2.12.01.zip
- upx391w.zip
- ccache.exe
- C:\Users\appveyor\.ccache
@@ -58,10 +55,6 @@ install:
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
- 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"
- 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
@@ -78,7 +71,6 @@ before_build:
- set "Path=%MINGW_SDK%\bin;%Path%"
- if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
- mingw32-make --version
- if not [%X86_64%] == [1] ( nasm -v )
- if not [%NOUPX%] == [1] ( upx -V )
- ccache -V
- ccache -s
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-5
View File
@@ -1,5 +0,0 @@
/*.elf
/*.self
/*.pkg
/*.BIN
/pkg
-5
View File
@@ -1,5 +0,0 @@
/*.elf
/*.self
/*.pkg
/*.BIN
/pkg
-4
View File
@@ -1,4 +0,0 @@
/EBOOT.PBP
/PARAM.SFO
/SRB2PSP.PBP
/SRB2PSP.elf
-3
View File
@@ -1,3 +0,0 @@
/*.elf
/*.dol
/apps
-3
View File
@@ -1,3 +0,0 @@
/*.elf
/*.dol
/apps
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-3
View File
@@ -1,3 +0,0 @@
*.arm9
*.elf*
*.nds
-3
View File
@@ -1,3 +0,0 @@
*.arm9
*.elf*
*.nds
@@ -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)
@@ -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)
@@ -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)
+23 -32
View File
@@ -1,54 +1,45 @@
#!/bin/bash -e
#!/bin/sh
path="."
if [ x"$1" != x ]; then
path="$1"
fi
versiongit() {
gitbranch=`git rev-parse --abbrev-ref HEAD`
gitversion=`git rev-parse HEAD`
cat <<EOF > $path/comptime.h
version() {
cat <<EOF > "$path/comptime.h"
// Do not edit! This file was autogenerated
// by the $0 script with git
//
const char* compbranch = "$gitbranch";
const char* comprevision = "${gitversion:0:8}";
const char* compbranch = "$1";
const char* comprevision = "$2";
EOF
exit 0
}
versiongit() {
gitbranch="$(git rev-parse --abbrev-ref HEAD)"
gitversion="$(git rev-parse HEAD | cut -c -8)"
version "$gitbranch" "$gitversion";
exit 0
}
versionsvn() {
svnrevision=`svnversion -n $1`
cat <<EOF > $path/comptime.h
// Do not edit! This file was autogenerated
// by the $0 script with subversion
//
const char* compbranch = "Subversion";
const char* comprevision = "r$svnrevision";
EOF
exit 0
svnrevision="$(svnversion -n "$1")"
version "Subversion" "r$svnrevision";
exit 0
}
versionfake() {
cat <<EOF > $path/comptime.h
// Do not edit! This file was autogenerated
// by the $0 script with an unknown or nonexist SCM
//
const char* compbranch = "Unknown";
const char* comprevision = "illegal";
EOF
version "Unknown" "illegal";
}
compversion() {
touch $path/comptime.c
versionfake
test -d $path/.svn && versionsvn
test -d $path/../.git && versiongit
exit 1
touch "$path/comptime.c"
versionfake
[ -d "$path/.svn" ] && versionsvn "$@"
[ -d "$path/../.git" ] && versiongit
exit 1
}
test -f $path/comptime.c && compversion
[ -f "$path/comptime.c" ] && compversion "$@"
exit 2
+1 -3
View File
@@ -23,10 +23,8 @@ and don't forget to build r_opengl.dll for srb2dd.
## srb2kart, 64-bit
* libs\dll-binaries\x86_64\exchndl.dll
* libs\dll-binaries\x86_64\libgme.dll
* libs\dll-binaries\x86_64\discord-rpc.dll
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
* libs\SDL2\x86_64-w64-mingw32\bin\SDL2.dll
* libs\SDL2_mixer\x86_64-w64-mingw32\bin\*.dll (get everything)
* libs\libopenmpt\x86_64\bin\mingw\libopenmpt.dll
* libs\libopenmpt\x86_64\bin\mingw\libopenmpt.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
# Copyright (C) 2012-2016 Free Software Foundation, Inc.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# (1) Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# (2) Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# (3) The name of the author may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+36
View File
@@ -0,0 +1,36 @@
# libbacktrace
A C library that may be linked into a C/C++ program to produce symbolic backtraces
Initially written by Ian Lance Taylor <iant@golang.org>.
This is version 1.0.
It is likely that this will always be version 1.0.
The libbacktrace library may be linked into a program or library and
used to produce symbolic backtraces.
Sample uses would be to print a detailed backtrace when an error
occurs or to gather detailed profiling information.
In general the functions provided by this library are async-signal-safe,
meaning that they may be safely called from a signal handler.
The libbacktrace library is provided under a BSD license.
See the source files for the exact license text.
The public functions are declared and documented in the header file
backtrace.h, which should be #include'd by a user of the library.
Building libbacktrace will generate a file backtrace-supported.h,
which a user of the library may use to determine whether backtraces
will work.
See the source file backtrace-supported.h.in for the macros that it
defines.
As of October 2020, libbacktrace supports ELF, PE/COFF, Mach-O, and
XCOFF executables with DWARF debugging information.
In other words, it supports GNU/Linux, *BSD, macOS, Windows, and AIX.
The library is written to make it straightforward to add support for
other object file and debugging formats.
The library relies on the C++ unwind API defined at
https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html
This API is provided by GCC and clang.
+188
View File
@@ -0,0 +1,188 @@
/* backtrace.h -- Public header file for stack backtrace library.
Copyright (C) 2012-2020 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
#ifndef BACKTRACE_H
#define BACKTRACE_H
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The backtrace state. This struct is intentionally not defined in
the public interface. */
struct backtrace_state;
/* The type of the error callback argument to backtrace functions.
This function, if not NULL, will be called for certain error cases.
The DATA argument is passed to the function that calls this one.
The MSG argument is an error message. The ERRNUM argument, if
greater than 0, holds an errno value. The MSG buffer may become
invalid after this function returns.
As a special case, the ERRNUM argument will be passed as -1 if no
debug info can be found for the executable, but the function
requires debug info (e.g., backtrace_full, backtrace_pcinfo). The
MSG in this case will be something along the lines of "no debug
info". Similarly, ERRNUM will be passed as -1 if there is no
symbol table, but the function requires a symbol table (e.g.,
backtrace_syminfo). This may be used as a signal that some other
approach should be tried. */
typedef void (*backtrace_error_callback) (void *data, const char *msg,
int errnum);
/* Create state information for the backtrace routines. This must be
called before any of the other routines, and its return value must
be passed to all of the other routines. FILENAME is the path name
of the executable file; if it is NULL the library will try
system-specific path names. If not NULL, FILENAME must point to a
permanent buffer. If THREADED is non-zero the state may be
accessed by multiple threads simultaneously, and the library will
use appropriate atomic operations. If THREADED is zero the state
may only be accessed by one thread at a time. This returns a state
pointer on success, NULL on error. If an error occurs, this will
call the ERROR_CALLBACK routine.
Calling this function allocates resources that cannot be freed.
There is no backtrace_free_state function. The state is used to
cache information that is expensive to recompute. Programs are
expected to call this function at most once and to save the return
value for all later calls to backtrace functions. */
extern struct backtrace_state *backtrace_create_state (
const char *filename, int threaded,
backtrace_error_callback error_callback, void *data);
/* The type of the callback argument to the backtrace_full function.
DATA is the argument passed to backtrace_full. PC is the program
counter. FILENAME is the name of the file containing PC, or NULL
if not available. LINENO is the line number in FILENAME containing
PC, or 0 if not available. FUNCTION is the name of the function
containing PC, or NULL if not available. This should return 0 to
continuing tracing. The FILENAME and FUNCTION buffers may become
invalid after this function returns. */
typedef int (*backtrace_full_callback) (void *data, uintptr_t pc,
const char *filename, int lineno,
const char *function);
/* Get a full stack backtrace. SKIP is the number of frames to skip;
passing 0 will start the trace with the function calling
backtrace_full. DATA is passed to the callback routine. If any
call to CALLBACK returns a non-zero value, the stack backtrace
stops, and backtrace returns that value; this may be used to limit
the number of stack frames desired. If all calls to CALLBACK
return 0, backtrace returns 0. The backtrace_full function will
make at least one call to either CALLBACK or ERROR_CALLBACK. This
function requires debug info for the executable. */
extern int backtrace_full (struct backtrace_state *state, int skip,
backtrace_full_callback callback,
backtrace_error_callback error_callback,
void *data);
/* The type of the callback argument to the backtrace_simple function.
DATA is the argument passed to simple_backtrace. PC is the program
counter. This should return 0 to continue tracing. */
typedef int (*backtrace_simple_callback) (void *data, uintptr_t pc);
/* Get a simple backtrace. SKIP is the number of frames to skip, as
in backtrace. DATA is passed to the callback routine. If any call
to CALLBACK returns a non-zero value, the stack backtrace stops,
and backtrace_simple returns that value. Otherwise
backtrace_simple returns 0. The backtrace_simple function will
make at least one call to either CALLBACK or ERROR_CALLBACK. This
function does not require any debug info for the executable. */
extern int backtrace_simple (struct backtrace_state *state, int skip,
backtrace_simple_callback callback,
backtrace_error_callback error_callback,
void *data);
/* Print the current backtrace in a user readable format to a FILE.
SKIP is the number of frames to skip, as in backtrace_full. Any
error messages are printed to stderr. This function requires debug
info for the executable. */
extern void backtrace_print (struct backtrace_state *state, int skip, FILE *);
/* Given PC, a program counter in the current program, call the
callback function with filename, line number, and function name
information. This will normally call the callback function exactly
once. However, if the PC happens to describe an inlined call, and
the debugging information contains the necessary information, then
this may call the callback function multiple times. This will make
at least one call to either CALLBACK or ERROR_CALLBACK. This
returns the first non-zero value returned by CALLBACK, or 0. */
extern int backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback,
void *data);
/* The type of the callback argument to backtrace_syminfo. DATA and
PC are the arguments passed to backtrace_syminfo. SYMNAME is the
name of the symbol for the corresponding code. SYMVAL is the
value and SYMSIZE is the size of the symbol. SYMNAME will be NULL
if no error occurred but the symbol could not be found. */
typedef void (*backtrace_syminfo_callback) (void *data, uintptr_t pc,
const char *symname,
uintptr_t symval,
uintptr_t symsize);
/* Given ADDR, an address or program counter in the current program,
call the callback information with the symbol name and value
describing the function or variable in which ADDR may be found.
This will call either CALLBACK or ERROR_CALLBACK exactly once.
This returns 1 on success, 0 on failure. This function requires
the symbol table but does not require the debug info. Note that if
the symbol table is present but ADDR could not be found in the
table, CALLBACK will be called with a NULL SYMNAME argument.
Returns 1 on success, 0 on error. */
extern int backtrace_syminfo (struct backtrace_state *state, uintptr_t addr,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback,
void *data);
#ifdef __cplusplus
} /* End extern "C". */
#endif
#endif
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
-2
View File
@@ -1,2 +0,0 @@
# DON'T REMOVE
# This keeps the folder from disappearing
+1 -1
View File
@@ -76,7 +76,7 @@ LOCAL_SRC_FILES := am_map.c \
android/i_system.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
+2 -52
View File
@@ -3,6 +3,7 @@
# Core sources
set(SRB2_CORE_SOURCES
am_map.c
args.c
b_bot.c
command.c
comptime.c
@@ -52,6 +53,7 @@ set(SRB2_CORE_SOURCES
set(SRB2_CORE_HEADERS
am_map.h
args.h
b_bot.h
byteptr.h
command.h
@@ -196,32 +198,6 @@ source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES})
source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES})
set(SRB2_ASM_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s
)
set(SRB2_NASM_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/tmap_mmx.nas
${CMAKE_CURRENT_SOURCE_DIR}/tmap.nas
)
if(MSVC)
list(APPEND SRB2_NASM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tmap_vc.nas)
endif()
set(SRB2_NASM_OBJECTS
${CMAKE_CURRENT_BINARY_DIR}/tmap_mmx.obj
${CMAKE_CURRENT_BINARY_DIR}/tmap.obj
)
if(MSVC)
list(APPEND SRB2_NASM_OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/tmap_vc.obj)
endif()
source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES})
### Configuration
set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL
"Enable Lua interpreter support")
@@ -239,10 +215,6 @@ set(SRB2_CONFIG_HAVE_CURL ON CACHE BOOL
"Enable curl support, used for downloading files via HTTP.")
set(SRB2_CONFIG_HWRENDER ON CACHE BOOL
"Enable hardware rendering through OpenGL.")
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_STATIC_OPENGL OFF CACHE BOOL
"Use statically linked OpenGL. NOT RECOMMENDED.")
@@ -533,28 +505,6 @@ if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL})
endif()
endif()
if(${SRB2_CONFIG_USEASM})
#SRB2_ASM_FLAGS can be used to pass flags to either nasm or yasm.
if(${CMAKE_SYSTEM} 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)
add_definitions(-DUSEASM)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse)
else()
set(SRB2_USEASM OFF)
add_definitions(-DNONX86 -DNORUSEASM)
endif()
# Targets
+5 -256
View File
@@ -8,14 +8,11 @@
# terms of the GNU General Public License, version 2.
# See the 'LICENSE' file for more details.
#
# -DPC_DOS -> use DOS specific code (eg:textmode stuff)...
# -DLINUX -> use for the GNU/Linux specific
# -D_WINDOWS -> use for the Win32/DirectX specific
# -DHAVE_SDL -> use for the SDL interface
#
# Sets:
# Compile the DGJPP/DOS version with 'make WATTCP=1'
# Compile the DirectX/Mingw version with 'make MINGW=1'
# Compile the Mingw version with 'make MINGW=1'
# Compile the SDL/Mingw version with 'make MINGW=1 SDL=1'
# Compile the SDL/Linux version with 'make LINUX=1'
# Compile the SDL/Solaris version with 'make SOLARIS=1'
@@ -62,7 +59,6 @@
# Compile a debug version, add 'DEBUGMODE=1'
# Compile with less warnings, add 'RELAXWARNINGS=1'
# Generate compiler errors for most compiler warnings, add 'ERRORMODE=1'
# Compile without NASM's tmap.nas, add 'NOASM=1'
# Compile without 3D hardware support, add 'NOHW=1'
# Compile with GDBstubs, add 'RDB=1'
# Compile without PNG, add 'NOPNG=1'
@@ -88,7 +84,6 @@ ALL_SYSTEMS=\
MINGW64\
HAIKU\
DUMMY\
DJGPPDOS\
MINGW\
UNIX\
LINUX\
@@ -149,10 +144,6 @@ D_FILES=$(D_DIR)/srb2.srb \
PKG_CONFIG?=pkg-config
ifdef WIILINUX
LINUX=1
endif
ifdef PANDORA
LINUX=1
endif
@@ -166,7 +157,6 @@ endif
ifdef MINGW64
MINGW=1
NONX86=1
NOASM=1
# MINGW64 should not necessarily imply X86_64=1, but we make that assumption elsewhere
# Once that changes, remove this
X86_64=1
@@ -176,12 +166,6 @@ ifdef HAIKU
SDL=1
endif
ifdef NDS
# Include this before the main Makefile.cfg
EXENAME?=srb2.elf
include nds/Makefile.cfg
endif
include Makefile.cfg
ifdef DUMMY
@@ -189,7 +173,6 @@ NOPNG=1
NOZLIB=1
NONET=1
NOHW=1
NOASM=1
NOIPX=1
EXENAME?=srb2dummy
OBJS=$(OBJDIR)/i_video.o
@@ -198,7 +181,6 @@ endif
ifdef HAIKU
NOIPX=1
NOASM=1
ifndef NONET
LIBS=-lnetwork
endif
@@ -207,35 +189,11 @@ PNG_CFLAGS?=
PNG_LDFLAGS?=-lpng
endif
ifdef WIILINUX
NONX86=1
NOTERMIOS=1
NOHW=1
CFLAGS+=-DWMINPUT
NOTERMIOS=1
NOPOSTPROCESSING=1
endif
ifdef PANDORA
NONX86=1
NOHW=1
endif
ifdef WII
NONX86=1
NOHW=1
NOPOSTPROCESSING=1
endif
ifdef PS3N
NONX86=1
NOHW=1
endif
ifdef DJGPPDOS
include djgppdos/Makefile.cfg
endif
ifndef NOOPENMPT
HAVE_OPENMPT=1
endif
@@ -267,26 +225,8 @@ ifdef MACOSX
UNIXCOMMON=1
endif
ifdef NDS
NOPNG=1
NOZLIB=1
NONET=1
#NOHW=1
NOASM=1
NOIPX=1
NONX86=1
OBJS+=$(OBJDIR)/i_video.o
LIBS+=-lm
endif
ifdef SDL
#SDL 2.0
ifndef SDL12
include sdl/Makefile.cfg
#SDL 1.2
else
include sdl12/Makefile.cfg
endif #ifndef SDL12
endif #ifdef SDL
ifdef DISTCC
@@ -300,7 +240,6 @@ endif
MSGFMT?=msgfmt
ifndef ECHO
NASM:=@$(NASM)
REMOVE:=@$(REMOVE)
CC:=@$(CC)
CXX:=@$(CXX)
@@ -331,10 +270,8 @@ endif
ifdef NOHW
OPTS+=-DNOHW
else
ifndef DC
#Hurdler: not really supported and not tested recently
#OPTS+=-DUSE_PALETTED_TEXTURE
endif
OPTS+=-DHWRENDER
OBJS+=$(OBJDIR)/hw_bsp.o $(OBJDIR)/hw_draw.o $(OBJDIR)/hw_light.o \
$(OBJDIR)/hw_main.o $(OBJDIR)/hw_clip.o $(OBJDIR)/hw_md2.o $(OBJDIR)/hw_cache.o $(OBJDIR)/hw_trick.o \
@@ -355,12 +292,6 @@ ifdef X86_64
endif
endif
ifndef NOASM
ifndef NONX86
OBJS+=$(OBJDIR)/tmap.o $(OBJDIR)/tmap_mmx.o
OPTS+=-DUSEASM
endif
endif
ifndef NOPNG
OPTS+=-DHAVE_PNG
@@ -470,14 +401,6 @@ else
OBJS:=$(OBJDIR)/md5.o $(OBJS)
endif
ifdef FAKEDC
OPTS+=-DDC
endif
ifdef FAKEPSP
OPTS+=-DPSP
endif
ifdef NOPOSTPROCESSING
OPTS+=-DNOPOSTPROCESSING
endif
@@ -511,16 +434,6 @@ else
endif
CFLAGS+=-g $(OPTS) $(ARCHOPTS) $(WINDRESFLAGS)
ifdef YASM
ifdef STABS
NASMOPTS?= -g stabs
else
NASMOPTS?= -g dwarf2
endif
else
NASMOPTS?= -g
endif
ifdef PROFILEMODE
# build with profiling information
CFLAGS+=-pg
@@ -624,9 +537,8 @@ OBJS:=$(i_main_o) \
$(OBJDIR)/i_tcp.o \
$(OBJDIR)/i_time.o \
$(OBJDIR)/lzf.o \
$(OBJDIR)/vid_copy.o \
$(OBJDIR)/b_bot.o \
$(i_cdmus_o) \
$(OBJDIR)/args.o \
$(i_net_o) \
$(i_system_o) \
$(i_sound_o) \
@@ -642,53 +554,19 @@ POS:=$(BIN)/en.mo
OPTS+=-DGETTEXT
endif
ifdef DJGPPDOS
all: pre-build $(BIN)/$(EXENAME)
endif
ifdef XBOX
all: pre-build $(BIN)/$(BINNAME)
endif
ifdef PS3N
all: pre-build $(BIN)/$(PKGNAME)
endif
ifdef WII
all: pre-build $(BIN)/$(DOLNAME)
endif
ifdef PANDORA
all: pre-build $(BIN)/$(PNDNAME)
endif
ifdef PSP
all: pre-build $(BIN)/$(BINNAME) post-build
endif
ifdef DC
all: pre-build $(BIN)/$(BINNAME) post-build
endif
ifndef DC
ifndef PSP
ifndef XBOX
ifdef MINGW
ifndef SDL
all: pre-build $(BIN)/$(EXENAME) dll
endif
endif
endif
endif
ifdef SDL
all: pre-build $(BIN)/$(EXENAME)
endif
endif
ifdef NDS
all: $(BIN)/$(EXENAME:.elf=.nds)
endif
ifdef DUMMY
all: $(BIN)/$(EXENAME)
@@ -700,9 +578,9 @@ cleandep:
pre-build:
ifdef WINDOWSHELL
-..\comptime.bat .
-$(.)..\comptime.bat .
else
-@../comptime.sh .
-$(.)../comptime.sh .
endif
clean:
@@ -717,14 +595,8 @@ ifdef CYGWIN32
$(REMOVE) $(OBJDIR)/*.res
endif
#make a big srb2.s that is the disasm of the exe (dos only ?)
asm:
$(CC) $(LDFLAGS) $(OBJS) -o $(OBJDIR)/tmp.exe $(LIBS)
$(OBJDUMP) -d $(OBJDIR)/tmp.exe --no-show-raw-insn > srb2.s
$(REMOVE) $(OBJDIR)/tmp.exe
# executable
# NOTE: DJGPP's objcopy do not have --add-gnu-debuglink
$(BIN)/$(EXENAME): $(POS) $(OBJS)
-$(MKDIR) $(BIN)
@@ -742,12 +614,10 @@ endif
# mac os x lsdlsrb2 does not like objcopy
ifndef MACOSX
ifndef PSP
$(OBJCOPY) $(BIN)/$(EXENAME) $(BIN)/$(DBGNAME)
$(OBJCOPY) --strip-debug $(BIN)/$(EXENAME)
-$(OBJCOPY) --add-gnu-debuglink=$(BIN)/$(DBGNAME) $(BIN)/$(EXENAME)
endif
endif
ifndef NOUPX
-$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME)
endif
@@ -772,7 +642,7 @@ else
dll : opengl_dll
endif
ifdef MINGW
all_dll: opengl_dll minigl_dll ds3d_dll fmod_dll openal_dll
all_dll: opengl_dll ds3d_dll fmod_dll openal_dll
opengl_dll: $(BIN)/r_opengl.dll
$(BIN)/r_opengl.dll: $(OBJDIR)/ogl_win.o $(OBJDIR)/r_opengl.o
@@ -783,12 +653,6 @@ ifndef NOUPX
-$(UPX) $(UPX_OPTS) $@
endif
minigl_dll: $(BIN)/r_minigl.dll
$(BIN)/r_minigl.dll: $(OBJDIR)/r_minigl.o
-$(MKDIR) $(BIN)
@echo Linking R_MiniGL.dll...
$(CC) --shared $^ -o $@ -g -Wl,--add-stdcall-alias -lgdi32
ds3d_dll: $(BIN)/s_ds3d.dll
$(BIN)/s_ds3d.dll: $(OBJDIR)/s_ds3d.o
@echo Linking S_DS3d.dll...
@@ -868,16 +732,6 @@ endif
$(REMOVE) $(OBJDIR)/depend.ped
@echo "Created dependency file, depend.dep"
ifdef DC
$(OBJDIR)/v_video.o: v_video.c doomdef.h doomtype.h g_state.h m_swap.h r_local.h \
tables.h m_fixed.h screen.h command.h m_bbox.h r_main.h d_player.h \
p_pspr.h info.h d_think.h sounds.h p_mobj.h doomdata.h d_ticcmd.h \
r_data.h r_defs.h r_state.h r_bsp.h r_segs.h r_plane.h r_sky.h \
r_things.h r_draw.h v_video.h hu_stuff.h d_event.h w_wad.h console.h \
i_video.h z_zone.h doomstat.h d_clisrv.h d_netcmd.h
$(CC) $(CFLAGS) -fno-omit-frame-pointer $(WFLAGS) -c $< -o $@
endif
ifdef VALGRIND
$(OBJDIR)/z_zone.o: z_zone.c
$(CC) $(CFLAGS) $(WFLAGS) -DHAVE_VALGRIND $(VALGRIND_CFLAGS) -c $< -o $@
@@ -907,117 +761,12 @@ $(OBJDIR)/%.o: hardware/%.c
$(OBJDIR)/%.o: blua/%.c
$(CC) $(CFLAGS) $(LUA_CFLAGS) $(WFLAGS) -c $< -o $@
$(OBJDIR)/%.o: %.nas
$(NASM) $(NASMOPTS) -o $@ -f $(NASMFORMAT) $<
$(OBJDIR)/vid_copy.o: vid_copy.s asm_defs.inc
$(CC) $(OPTS) $(ASFLAGS) -x assembler-with-cpp -c $< -o $@
$(OBJDIR)/%.o: %.s
$(CC) $(OPTS) -x assembler-with-cpp -c $< -o $@
$(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
$(WINDRES) -i $< -O rc $(WINDRESFLAGS) --include-dir=win32 -o $@ -O coff
ifdef DC
$(OBJDIR)/romdisk.img:
$(KOS_GENROMFS) -f romdisk.img -d ../data -v
$(OBJDIR)/romdisk.o: romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
$(OBJDIR)/dchelp.o: $(INTERFACE)/SRB2DC/dchelp.c
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
$(OBJDIR)/i_udp.o: $(INTERFACE)/SRB2DC/i_udp.c
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
$(BIN)/IP.BIN: $(INTERFACE)/SRB2DC/IP.BIN
$(CP) $< $@
$(BIN)/SRB2DC.cdi.pass1: $(INTERFACE)/SRB2DC/SELFBOOT.BIN
$(CP) $< $@
$(BIN)/$(BINNAME): $(BIN)/$(EXENAME)
$(KOS_OBJCOPY) -R .stack -O binary $< $@
$(BIN)/1ST_READ.BIN: $(BIN)/$(BINNAME) $(BIN)/scramble
$(BIN)/scramble $< $@
$(BIN)/scramble: $(INTERFACE)/SRB2DC/scramble.c
-$(MKDIR) $(BIN)
$(HOSTCC) $< -o $@
iso: $(BIN)/SRB2DC.iso
cdi: $(BIN)/SRB2DC.cdi
$(BIN)/SRB2DC.iso.pass1: $(BIN)/1ST_READ.BIN $(BIN)/IP.BIN
-$(MKDIR) $(BIN)/cdrom
$(CP) $(BIN)/1ST_READ.BIN $(D_FILES) $(BIN)/cdrom
$(MKISOFS) -l -r -o $@ $(BIN)/cdrom
$(BIN)/SRB2DC.iso.pass2: $(BIN)/SRB2DC.iso.pass1
$(DD) if=$< of=$@ bs=2048 skip=16 status=noxfer
$(BIN)/SRB2DC.iso: $(BIN)/SRB2DC.iso.pass2 $(BIN)/IP.BIN
@cat $(BIN)/IP.BIN $(BIN)/SRB2DC.iso.pass2 > $@
$(BIN)/SRB2DC.cdi: $(BIN)/SRB2DC.iso.pass2 $(BIN)/SRB2DC.cdi.pass1 $(BIN)/IP.BIN
@cat $(BIN)/SRB2DC.cdi.pass1 $(BIN)/IP.BIN $(BIN)/SRB2DC.iso.pass2 > $@
post-build: $(BIN)/1ST_READ.BIN
endif
ifdef XBOX
$(OBJDIR)/xboxhelp.o: $(INTERFACE)/SRB2XBOX/xboxhelp.c
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
$(BIN)/$(BINNAME): $(BIN)/$(EXENAME)
$(CXBE) -OUT:"$@" -DUMPINFO:"$(BIN)/SRB2XBOX.cxbe" -TITLE:"Sonic Robo Blast 2" $<
endif
ifdef NDS
$(BIN)/$(EXENAME:.elf=.nds): $(BIN)/$(EXENAME:.elf=.arm9)
$(NDSTOOL) -c $@ -9 $(BIN)/$(EXENAME:.elf=.arm9)
%.arm9: %.elf
$(OBJCOPY) -O binary $< $@
endif
ifdef MINGW
ifndef SDL
ifndef NOHW
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
$(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
$(OBJDIR)/r_minigl.o: hardware/r_minigl/r_minigl.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
endif
endif
endif
ifdef SDL
ifdef MINGW
+138 -153
View File
@@ -12,29 +12,32 @@
# to avoid a false positive with the version detection...
SUPPORTED_GCC_VERSIONS:=\
101 102\
91 92 93\
81 82 83 84\
71 72 73 74 75\
61 62 63 64\
51 52 53 54 55\
40 41 42 43 44 45 46 47 48 49
132 131 130 13\
123 122 121 120 12\
114 113 112 111 110 11\
105 104 103 102 101 100 10\
95 94 93 92 91 90\
85 84 83 82 81 80\
75 74 73 72 71 70\
64 63 62 61 60\
55 54 53 52 51 50\
49 48 47 46 45 44 43 42 41 40
LATEST_GCC_VERSION=10.2
LATEST_GCC_VERSION=13.2
# gcc or g++
ifdef PREFIX
CC=$(PREFIX)-gcc
CXX=$(PREFIX)-g++
OBJCOPY=$(PREFIX)-objcopy
OBJDUMP=$(PREFIX)-objdump
STRIP=$(PREFIX)-strip
WINDRES=$(PREFIX)-windres
CC:=$(PREFIX)-gcc
CXX:=$(PREFIX)-g++
OBJCOPY?=$(PREFIX)-objcopy
OBJDUMP?=$(PREFIX)-objdump
STRIP?=$(PREFIX)-strip
WINDRES?=$(PREFIX)-windres
else
OBJCOPY=objcopy
OBJDUMP=objdump
STRIP=strip
WINDRES=windres
OBJCOPY?=objcopy
OBJDUMP?=objdump
STRIP?=strip
WINDRES?=windres
endif
# because Apple screws with us on this
@@ -51,7 +54,10 @@ ifeq (,$(filter GCC%,$(.VARIABLES)))
version:=$(shell $(CC) --version)
# check if this is in fact GCC
ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version))))
version:=$(shell $(CC) -dumpversion)
shellversion:=$(shell $(CC) -dumpversion)
# Try to remove "-win32"
version:=$(subst -win32,.0,$(shellversion))
# Turn version into words of major, minor
v:=$(subst ., ,$(version))
@@ -71,11 +77,99 @@ ifeq (,$(filter GCC%,$(.VARIABLES)))
endif
endif
ifdef GCC132
GCC131=1
endif
ifdef GCC131
GCC130=1
endif
ifdef GCC13
GCC130=1
endif
ifdef GCC130
GCC123=1
endif
ifdef GCC123
GCC122=1
endif
ifdef GCC122
GCC121=1
endif
ifdef GCC121
GCC120=1
endif
ifdef GCC12
GCC120=1
endif
ifdef GCC120
GCC114=1
endif
ifdef GCC114
GCC113=1
endif
ifdef GCC113
GCC112=1
endif
ifdef GCC112
GCC111=1
endif
ifdef GCC111
GCC110=1
endif
ifdef GCC11
GCC110=1
endif
ifdef GCC110
GCC105=1
endif
ifdef GCC105
GCC104=1
endif
ifdef GCC104
GCC103=1
endif
ifdef GCC103
GCC102=1
endif
ifdef GCC102
GCC101=1
endif
ifdef GCC101
GCC100=1
endif
ifdef GCC10
GCC100=1
endif
ifdef GCC100
GCC93=1
endif
ifdef GCC95
GCC94=1
endif
ifdef GCC94
GCC93=1
endif
@@ -88,6 +182,14 @@ GCC91=1
endif
ifdef GCC91
GCC90=1
endif
ifdef GCC90
GCC85=1
endif
ifdef GCC85
GCC84=1
endif
@@ -104,6 +206,10 @@ GCC81=1
endif
ifdef GCC81
GCC80=1
endif
ifdef GCC80
GCC75=1
endif
@@ -124,6 +230,10 @@ GCC71=1
endif
ifdef GCC71
GCC70=1
endif
ifdef GCC70
GCC64=1
endif
@@ -140,6 +250,10 @@ GCC61=1
endif
ifdef GCC61
GCC60=1
endif
ifdef GCC60
GCC55=1
endif
@@ -160,6 +274,10 @@ GCC51=1
endif
ifdef GCC51
GCC50=1
endif
ifdef GCC50
GCC49=1
endif
@@ -204,10 +322,6 @@ ifdef GCC295
GCC29=1
endif
ifdef DC
NOCASTALIGNWARN=1
endif
OLDWFLAGS:=$(WFLAGS)
# -W -Wno-unused
WFLAGS=-Wall
@@ -264,15 +378,11 @@ endif
ifdef GCC40
WFLAGS+=-Wold-style-definition
endif
ifndef XBOX
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
endif
ifdef GCC40
WFLAGS+=-Wmissing-field-initializers
endif
ifndef XBOX
WFLAGS+=-Wmissing-noreturn
endif
#WFLAGS+=-Wmissing-format-attribute
#WFLAGS+=-Wno-multichar
#WFLAGS+=-Wno-deprecated-declarations
@@ -344,28 +454,14 @@ endif
#indicate platform and what interface use with
ifndef WINCE
ifndef XBOX
ifndef PSP
ifndef DC
ifndef WII
ifndef PS3N
ifndef LINUX
ifndef FREEBSD
ifndef CYGWIN32
ifndef MINGW
ifndef MINGW64
ifndef SDL
ifndef NDS
ifndef DUMMY
DJGPPDOS=1
endif
endif
endif
endif
endif
endif
endif
$(error No interface or platform flag defined)
endif
endif
endif
@@ -375,7 +471,6 @@ endif
endif
#determine the interface directory (where you put all i_*.c)
i_cdmus_o=$(OBJDIR)/i_cdmus.o
i_net_o=$(OBJDIR)/i_net.o
i_system_o=$(OBJDIR)/i_system.o
i_sound_o=$(OBJDIR)/i_sound.o
@@ -383,12 +478,6 @@ i_main_o=$(OBJDIR)/i_main.o
#set OBJDIR and BIN's starting place
OBJDIR=../objs
BIN=../bin
#Nasm ASM and rm
ifdef YASM
NASM?=yasm
else
NASM?=nasm
endif
REMOVE?=rm -f
CP?=cp
MKDIR?=mkdir -p
@@ -404,23 +493,12 @@ UPX_OPTS+=-q
endif
#Interface Setup
ifdef DJGPPDOS
INTERFACE=djgppdos
NASMFORMAT=coff
OBJDIR:=$(OBJDIR)/djgppdos
ifdef WATTCP
OBJDIR:=$(OBJDIR)/wattcp
endif
WFLAGS+=-Wno-format
BIN:=$(BIN)/Dos
else
ifdef DUMMY
INTERFACE=dummy
OBJDIR:=$(OBJDIR)/dummy
BIN:=$(BIN)/dummy
else
ifdef LINUX
NASMFORMAT=elf -DLINUX
SDL=1
ifdef LINUX64
OBJDIR:=$(OBJDIR)/Linux64
@@ -432,7 +510,6 @@ endif
else
ifdef FREEBSD
INTERFACE=sdl
NASMFORMAT=elf -DLINUX
SDL=1
OBJDIR:=$(OBJDIR)/FreeBSD
@@ -440,7 +517,6 @@ ifdef FREEBSD
else
ifdef SOLARIS
INTERFACE=sdl
NASMFORMAT=elf -DLINUX
SDL=1
OBJDIR:=$(OBJDIR)/Solaris
@@ -448,7 +524,6 @@ ifdef SOLARIS
else
ifdef CYGWIN32
INTERFACE=sdl
NASMFORMAT=win32
SDL=1
OBJDIR:=$(OBJDIR)/cygwin
@@ -456,83 +531,13 @@ ifdef CYGWIN32
else
ifdef MINGW64
INTERFACE=win32
#NASMFORMAT=win64
OBJDIR:=$(OBJDIR)/Mingw64
BIN:=$(BIN)/Mingw64
else
ifdef WII
INTERFACE=sdl12
NONX86=1
STATIC=1
PREFIX?=powerpc-eabi
SDL=1
SDL12=1
SDLMAIN=1
OBJDIR:=$(OBJDIR)/Wii
BIN:=$(BIN)/Wii
NOUPX=1
else
ifdef PS3N
INTERFACE=sdl12
NONX86=1
STATIC=1
PREFIX?=ppu
SDL=1
SDL12=1
# unsure?
#SDLMAIN=1
# can't compile SDL_mixer for ps3...
NOMIXER=1
OBJDIR:=$(OBJDIR)/PS3
BIN:=$(BIN)/PS3
else
ifdef MINGW
INTERFACE=win32
NASMFORMAT=win32
OBJDIR:=$(OBJDIR)/Mingw
BIN:=$(BIN)/Mingw
else
ifdef XBOX
INTERFACE=sdl12
NASMFORMAT=win32
PREFIX?=/usr/local/openxdk/bin/i386-pc-xbox
SDL=1
SDL12=1
OBJDIR:=$(OBJDIR)/XBOX
BIN:=$(BIN)/XBOX
else
ifdef PSP
INTERFACE=sdl12
NONX86=1
SDL=1
SDL12=1
OBJDIR:=$(OBJDIR)/PSP
BIN:=$(BIN)/PSP
NOUPX=1
else
ifdef DC
INTERFACE=sdl12
NONX86=1
SDL=1
SDL12=1
OBJDIR:=$(OBJDIR)/DC
BIN:=$(BIN)/DC
NOUPX=1
else
ifdef WINCE
INTERFACE=sdl12
NONX86=1
PREFIX?=arm-wince-pe
SDL=1
SDL12=1
OBJDIR:=$(OBJDIR)/WinCE
BIN:=$(BIN)/WinCE
else
ifdef NDS
INTERFACE=nds
OBJDIR:=$(OBJDIR)/nds
BIN:=$(BIN)/nds
NOUPX=1
endif
endif
endif
@@ -540,20 +545,6 @@ endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
ifdef GP2X
ifdef SDL
SDL12=1
endif
endif
ifdef ARCHNAME
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
@@ -564,13 +555,7 @@ OBJDUMP_OPTS?=--wide --source --line-numbers
LD=$(CC)
ifdef SDL
# SDL 2.0
ifndef SDL12
INTERFACE=sdl
# SDL 1.2
else
INTERFACE=sdl12
endif
OBJDIR:=$(OBJDIR)/SDL
endif
-5
View File
@@ -42,11 +42,6 @@ static const UINT8 NOCLIMBGRAYS = 204;
static const UINT8 NOCLIMBBROWNS = (2*16);
static const UINT8 NOCLIMBYELLOWS = (11*16);
#ifdef _NDS
#undef BACKGROUND
#endif
// Automap colors
#define BACKGROUND DBLACK
#define WALLCOLORS (REDS + REDRANGE/2)
+1 -1
View File
@@ -24,7 +24,7 @@ static INT64 start_time; // as microseconds since the epoch
// I should probably return how much memory is remaining
// for this process, considering Android's process memory limit.
UINT32 I_GetFreeMem(UINT32 *total)
size_t I_GetFreeMem(size_t *total)
{
// what the heck? sysinfo() is partially missing in bionic?
/* struct sysinfo si; */
-2
View File
@@ -24,12 +24,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define APNG_H
#ifndef _MSC_VER
#ifndef _WII
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
-43
View File
@@ -1,43 +0,0 @@
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2018 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file asm_defs.inc
/// \brief must match the C structures
#ifndef __ASM_DEFS__
#define __ASM_DEFS__
// this makes variables more noticable,
// and make the label match with C code
// Linux, unlike DOS, has no "_" 19990119 by Kin
// and nasm needs .data code segs under linux 20010210 by metzgermeister
// FIXME: nasm ignores these settings, so I put the macros into the makefile
#ifdef __ELF__
#define C(label) label
#define CODE_SEG .data
#else
#define C(label) _##label
#define CODE_SEG .text
#endif
/* This is a more readable way to access the arguments passed from C code */
/* PLEASE NOTE: it is supposed that all arguments passed from C code are */
/* 32bit integer (INT32, long, and most *pointers) */
#define ARG1 8(%ebp)
#define ARG2 12(%ebp)
#define ARG3 16(%ebp)
#define ARG4 20(%ebp)
#define ARG5 24(%ebp)
#define ARG6 28(%ebp)
#define ARG7 32(%ebp)
#define ARG8 36(%ebp)
#define ARG9 40(%ebp) //(c)tm ... Allegro by Shawn Hargreaves.
#endif
+11 -12
View File
@@ -686,6 +686,15 @@ static void codearith (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2) {
}
static void codeunaryarith (FuncState *fs, OpCode op, expdesc *e) {
expdesc e2;
e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
if (!isnumeral(e))
luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
codearith(fs, op, e, &e2);
}
static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,
expdesc *e2) {
int o1 = luaK_exp2RK(fs, e1);
@@ -706,18 +715,8 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) {
expdesc e2;
e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
switch (op) {
case OPR_MINUS: {
if (!isnumeral(e))
luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
codearith(fs, OP_UNM, e, &e2);
break;
}
case OPR_BNOT: {
if (e->k == VK)
luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
codearith(fs, OP_BNOT, e, &e2);
break;
}
case OPR_MINUS: codeunaryarith(fs, OP_UNM, e); break;
case OPR_BNOT: codeunaryarith(fs, OP_BNOT, e); break;
case OPR_NOT: codenot(fs, e); break;
case OPR_LEN: {
luaK_exp2anyreg(fs, e); /* cannot operate on constants */
-2
View File
@@ -445,7 +445,6 @@ static int io_readline (lua_State *L) {
static int g_write (lua_State *L, FILE *f, int arg) {
int nargs = lua_gettop(L) - 1;
int status = 1;
size_t count;
for (; nargs--; arg++) {
if (lua_type(L, arg) == LUA_TNUMBER) {
/* optimization: could be done exactly as for strings */
@@ -455,7 +454,6 @@ static int g_write (lua_State *L, FILE *f, int arg) {
else {
size_t l;
const char *s = luaL_checklstring(L, arg, &l);
count += l;
if (ftell(f) + l > FILELIMIT)
{
luaL_error(L,"write limit bypassed in file. Changes have been discarded.");
+90 -30
View File
@@ -49,6 +49,7 @@ static void COM_CEchoDuration_f(void);
static void COM_Exec_f(void);
static void COM_Wait_f(void);
static void COM_Help_f(void);
static void COM_Find_f(void);
static void COM_Toggle_f(void);
static void COM_Add_f(void);
@@ -277,7 +278,7 @@ static xcommand_t *com_commands = NULL; // current commands
#define MAX_ARGS 80
static size_t com_argc;
static char *com_argv[MAX_ARGS];
char *com_argv[MAX_ARGS];
static const char *com_null_string = "";
static char *com_args = NULL; // current command args or NULL
@@ -299,6 +300,7 @@ void COM_Init(void)
COM_AddCommand("exec", COM_Exec_f);
COM_AddCommand("wait", COM_Wait_f);
COM_AddCommand("help", COM_Help_f);
COM_AddCommand("find", COM_Find_f);
COM_AddCommand("toggle", COM_Toggle_f);
COM_AddCommand("add", COM_Add_f);
RegisterNetXCmd(XD_NETVAR, Got_NetVar);
@@ -327,6 +329,16 @@ const char *COM_Argv(size_t arg)
return com_argv[arg];
}
/** Returns all of the console command arguments
*
* \return String pointer to the argv table.
* \sa COM_ArgvList
*/
char **COM_ArgvList(void)
{
return com_argv;
}
/** Gets all console command arguments.
*
* \return String pointer to all arguments for the last command.
@@ -810,7 +822,7 @@ static void COM_Help_f(void)
if (cvar)
{
CONS_Printf("\x82""Variable %s:\n", cvar->name);
CONS_Printf(M_GetText(" flags :"));
CONS_Printf(M_GetText(" flags: "));
if (cvar->flags & CV_SAVE)
CONS_Printf("AUTOSAVE ");
if (cvar->flags & CV_FLOAT)
@@ -864,30 +876,9 @@ static void COM_Help_f(void)
return;
}
CONS_Printf("No exact match, searching...\n");
// commands
CONS_Printf("\x82""Commands:\n");
for (cmd = com_commands; cmd; cmd = cmd->next)
{
if (!strstr(cmd->name, help))
continue;
CONS_Printf("%s ",cmd->name);
i++;
}
CONS_Printf("No variable or command named %s", help);
CONS_Printf("\x82""\nCheck wiki.srb2.org for more or try typing help without arguments\n");
// variables
CONS_Printf("\x82""\nVariables:\n");
for (cvar = consvar_vars; cvar; cvar = cvar->next)
{
if ((cvar->flags & CV_NOSHOWHELP) || (!strstr(cvar->name, help)))
continue;
CONS_Printf("%s ", cvar->name);
i++;
}
CONS_Printf("\x82""\nCheck wiki.srb2.org for more or type help <command or variable>\n");
CONS_Debug(DBG_GAMELOGIC, "\x87Total : %d\n", i);
}
return;
}
@@ -917,6 +908,78 @@ static void COM_Help_f(void)
}
}
static void COM_Find_f(void)
{
static char prefix[80];
xcommand_t *cmd;
consvar_t *cvar;
cmdalias_t *alias;
const char *match;
const char *help;
size_t helplen;
boolean matchesany;
if (COM_Argc() != 2)
{
CONS_Printf(M_GetText("find <text>: Search for variables, commands and aliases containing <text>\n"));
return;
}
help = COM_Argv(1);
helplen = strlen(help);
CONS_Printf("\x82""Variables:\n");
matchesany = false;
for (cvar = consvar_vars; cvar; cvar = cvar->next)
{
if (cvar->flags & CV_NOSHOWHELP)
continue;
match = strstr(cvar->name, help);
if (match != NULL)
{
memcpy(prefix, cvar->name, match - cvar->name);
prefix[match - cvar->name] = '\0';
CONS_Printf(" %s\x83%s\x80%s\n", prefix, help, &match[helplen]);
matchesany = true;
}
}
if (!matchesany)
CONS_Printf(" (none)\n");
CONS_Printf("\x82""Commands:\n");
matchesany = false;
for (cmd = com_commands; cmd; cmd = cmd->next)
{
match = strstr(cmd->name, help);
if (match != NULL)
{
memcpy(prefix, cmd->name, match - cmd->name);
prefix[match - cmd->name] = '\0';
CONS_Printf(" %s\x83%s\x80%s\n", prefix, help, &match[helplen]);
matchesany = true;
}
}
if (!matchesany)
CONS_Printf(" (none)\n");
CONS_Printf("\x82""Aliases:\n");
matchesany = false;
for (alias = com_alias; alias; alias = alias->next)
{
match = strstr(alias->name, help);
if (match != NULL)
{
memcpy(prefix, alias->name, match - alias->name);
prefix[match - alias->name] = '\0';
CONS_Printf(" %s\x83%s\x80%s\n", prefix, help, &match[helplen]);
matchesany = true;
}
}
if (!matchesany)
CONS_Printf(" (none)\n");
}
/** Toggles a console variable. Useful for on/off values.
*
* This works on on/off, yes/no values only
@@ -1445,7 +1508,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -1464,9 +1527,6 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
CONS_Alert(CONS_WARNING, "Netvar not found with netid %hu\n", netid);
return;
}
#if 0 //defined (GP2X) || defined (PSP)
CONS_Printf("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue);
#endif
DEBFILE(va("Netvar received: %s [netid=%d] value %s\n", cvar->name, netid, svalue));
Setvalue(cvar, svalue, stealth);
@@ -1587,7 +1647,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
if (var->flags & CV_NETVAR)
{
// send the value of the variable
XBOXSTATIC UINT8 buf[128];
UINT8 buf[128];
UINT8 *p = buf;
if (!(server || (IsPlayerAdmin(consoleplayer))))
{
+4
View File
@@ -33,8 +33,12 @@ typedef void (*com_func_t)(void);
void COM_AddCommand(const char *name, com_func_t func);
int COM_AddLuaCommand(const char *name);
#define MAX_ARGS 80
extern char *com_argv[MAX_ARGS];
size_t COM_Argc(void);
const char *COM_Argv(size_t arg); // if argv > argc, returns empty string
char **COM_ArgvList(void);
char *COM_Args(void);
size_t COM_CheckParm(const char *check); // like M_CheckParm :)
size_t COM_CheckPartialParm(const char *check);
+39 -74
View File
@@ -12,9 +12,6 @@
#ifdef __GNUC__
#include <unistd.h>
#ifdef _XBOX
#include <openxdk/debug.h>
#endif
#endif
#include "doomdef.h"
@@ -23,6 +20,7 @@
#include "g_input.h"
#include "hu_stuff.h"
#include "keys.h"
#include "r_main.h"
#include "r_defs.h"
#include "sounds.h"
#include "st_stuff.h"
@@ -36,10 +34,6 @@
#include "m_menu.h"
#include "filesrch.h"
#ifdef _WINDOWS
#include "win32/win_main.h"
#endif
#ifdef HWRENDER
#include "hardware/hw_main.h"
#endif
@@ -374,14 +368,10 @@ static void CON_SetupColormaps(void)
CON_SetupBackColormap();
}
//
// Setup the console text buffer
//
// for WII, libogc already has a CON_Init function, we must rename it here
#ifdef _WII
void CON_InitWii(void)
#else
void CON_Init(void)
#endif
{
INT32 i;
@@ -456,6 +446,8 @@ void CON_Init(void)
Unlock_state();
}
}
//
// Console input initialization
//
static void CON_InputInit(void)
@@ -602,32 +594,38 @@ static void CON_ChangeHeight(void)
//
static void CON_MoveConsole(void)
{
fixed_t conspeed;
static fixed_t fracmovement = 0;
Lock_state();
conspeed = FixedDiv(cons_speed.value*vid.fdupy, FRACUNIT);
// instant
if (!cons_speed.value)
{
con_curlines = con_destlines;
Unlock_state();
return;
}
// up/down move to dest
if (con_curlines < con_destlines)
// Not instant - Increment fracmovement fractionally
fracmovement += FixedMul(cons_speed.value*vid.fdupy, renderdeltatics);
if (con_curlines < con_destlines) // Move the console downwards
{
con_curlines += FixedInt(conspeed);
if (con_curlines > con_destlines)
con_curlines = con_destlines;
con_curlines += FixedInt(fracmovement); // Move by fracmovement's integer value
if (con_curlines > con_destlines) // If we surpassed the destination...
con_curlines = con_destlines; // ...clamp to it!
}
else if (con_curlines > con_destlines)
else // Move the console upwards
{
con_curlines -= FixedInt(conspeed);
con_curlines -= FixedInt(fracmovement);
if (con_curlines < con_destlines)
con_curlines = con_destlines;
if (con_destlines == 0) // If the console is being closed, not just moved up...
con_tick = 0; // ...don't show the blinking cursor
}
fracmovement %= FRACUNIT; // Reset fracmovement's integer value, but keep the fraction
Unlock_state();
}
@@ -724,10 +722,6 @@ void CON_Ticker(void)
CON_ChangeHeight();
}
// console movement
if (con_destlines != con_curlines)
CON_MoveConsole();
// clip the view, so that the part under the console is not drawn
con_clipviewtop = -1;
if (cons_backpic.value) // clip only when using an opaque background
@@ -875,7 +869,9 @@ boolean CON_Responder(event_t *ev)
static UINT8 consdown = false; // console is treated differently due to rare usage
// sequential completions a la 4dos
static char completion[80];
static char completioncmd[80 + sizeof("find ")] = "find ";
static char *completion = &completioncmd[sizeof("find ")-1];
static INT32 comskips, varskips;
const char *cmd = "";
@@ -954,7 +950,6 @@ boolean CON_Responder(event_t *ev)
// show all cvars/commands that match what we have inputted
if (key == KEY_TAB)
{
size_t i, len;
if (!completion[0])
{
@@ -963,19 +958,8 @@ boolean CON_Responder(event_t *ev)
strcpy(completion, inputlines[inputline]);
comskips = varskips = 0;
}
len = strlen(completion);
//first check commands
CONS_Printf("\nCommands:\n");
for (i = 0, cmd = COM_CompleteCommand(completion, i); cmd; cmd = COM_CompleteCommand(completion, ++i))
CONS_Printf(" \x83" "%s" "\x80" "%s\n", completion, cmd+len);
if (i == 0) CONS_Printf(" (none)\n");
//now we move on to CVARs
CONS_Printf("Variables:\n");
for (i = 0, cmd = CV_CompleteVar(completion, i); cmd; cmd = CV_CompleteVar(completion, ++i))
CONS_Printf(" \x83" "%s" "\x80" "%s\n", completion, cmd+len);
if (i == 0) CONS_Printf(" (none)\n");
COM_BufInsertText(completioncmd);
return true;
}
@@ -1148,7 +1132,10 @@ boolean CON_Responder(event_t *ev)
CONS_Printf("\x86""%c""\x80""%s\n", CON_PROMPTCHAR, inputlines[inputline]);
inputline = (inputline+1) & 31;
// Only add command to history if it differs from previous one
if (strcmp(inputlines[inputline], inputlines[(inputline-1) & 31]))
inputline = (inputline+1) & 31;
inputhist = inputline;
CON_InputClear();
@@ -1215,10 +1202,10 @@ boolean CON_Responder(event_t *ev)
// allow people to use keypad in console (good for typing IP addresses) - Calum
if (key >= KEY_KEYPAD7 && key <= KEY_KPADDEL)
{
XBOXSTATIC char keypad_translation[] = {'7','8','9','-',
'4','5','6','+',
'1','2','3',
'0','.'};
char keypad_translation[] = {'7','8','9','-',
'4','5','6','+',
'1','2','3',
'0','.'};
key = keypad_translation[key - KEY_KEYPAD7];
}
@@ -1376,7 +1363,7 @@ static void CON_Print(char *msg)
void CON_LogMessage(const char *msg)
{
XBOXSTATIC char txt[8192], *t;
char txt[8192], *t;
const char *p = msg, *e = txt+sizeof (txt)-2;
for (t = txt; *p != '\0'; p++)
@@ -1413,28 +1400,12 @@ void CONS_Printf(const char *fmt, ...)
va_end(argptr);
// echo console prints to log file
#ifndef _arch_dreamcast
DEBFILE(txt);
#endif
if (!con_started)
{
#if defined (_XBOX) && defined (__GNUC__)
if (!keyboard_started) debugPrint(txt);
#endif
#ifdef PC_DOS
CON_LogMessage(txt);
free(txt);
return;
#endif
}
else
// write message in con text buffer
if (con_started)
CON_Print(txt);
#ifndef PC_DOS
CON_LogMessage(txt);
#endif
Lock_state();
@@ -1447,19 +1418,9 @@ void CONS_Printf(const char *fmt, ...)
// if not in display loop, force screen update
if (startup)
{
#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL))
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE);
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
W_UnlockCachedPatch(con_backpic);
I_LoadingScreen(txt); // Win32/OS2 only
#else
// here we display the console text
CON_Drawer();
I_FinishUpdate(); // page flip or blit buffer
#endif
}
}
@@ -1774,6 +1735,10 @@ void CON_Drawer(void)
if (con_curlines <= 0)
CON_ClearHUD();
}
// console movement
if (con_curlines != con_destlines)
CON_MoveConsole();
if (con_curlines > 0)
CON_DrawConsole();
-4
View File
@@ -14,11 +14,7 @@
#include "command.h"
#include "i_threads.h"
#ifdef _WII
void CON_InitWii(void);
#else
void CON_Init(void);
#endif
boolean CON_Responder(event_t *ev);
+153 -44
View File
@@ -10,9 +10,7 @@
/// \file d_clisrv.c
/// \brief SRB2 Network game communication and protocol, all OS independent parts.
#if !defined (UNDER_CE)
#include <time.h>
#endif
#ifdef __GNUC__
#include <unistd.h> //for unlink
#endif
@@ -49,6 +47,7 @@
#include "k_kart.h"
#include "s_sound.h" // sfx_syfail
#include "m_perfstats.h"
#include "d_main.h"
#ifdef CLIENT_LOADINGSCREEN
// cl loading screen
@@ -56,10 +55,6 @@
#include "f_finale.h"
#endif
#ifdef _XBOX
#include "sdl12/SRB2XBOX/xboxhelp.h"
#endif
#ifdef HAVE_DISCORDRPC
#include "discord.h"
#endif
@@ -177,6 +172,8 @@ static textcmdtic_t *textcmds[TEXTCMD_HASH_SIZE] = {NULL};
consvar_t cv_showjoinaddress = {"showjoinaddress", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_shownodeip = {"showipinnodelist", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t playbackspeed_cons_t[] = {{1, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_playbackspeed = {"playbackspeed", "1", 0, playbackspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -452,7 +449,7 @@ static void ExtraDataTicker(void)
{
if (server)
{
XBOXSTATIC UINT8 buf[3];
UINT8 buf[3];
buf[0] = (UINT8)i;
buf[1] = KICK_MSG_CON_FAIL;
@@ -1073,7 +1070,7 @@ static void SV_SendResynch(INT32 node)
if (resynch_score[node] > (unsigned)cv_resynchattempts.value*250)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)nodetoplayer[node];
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -1833,7 +1830,7 @@ static void SV_SavedGame(void)
{
size_t length;
UINT8 *savebuffer;
XBOXSTATIC char tmpsave[264];
char tmpsave[264];
if (!cv_dumpconsistency.value)
return;
@@ -1875,7 +1872,7 @@ static void CL_LoadReceivedSavegame(void)
{
UINT8 *savebuffer = NULL;
size_t length, decompressedlen;
XBOXSTATIC char tmpsave[264];
char tmpsave[264];
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
@@ -1905,6 +1902,15 @@ static void CL_LoadReceivedSavegame(void)
demo.title = false;
automapactive = false;
if (!postautoloaded)
{
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
if (W_AddAutoloadedLocalFiles(autoloadwadfilespost) == 0)
CONS_Printf("D_AutoloadFile(): Are you sure you put in valid files or what?\n");
D_CleanFile(autoloadwadfilespost);
postautoloaded = true;
}
// load a base level
if (P_LoadNetGame())
{
@@ -1945,12 +1951,13 @@ static void CL_LoadReceivedSavegame(void)
static void SendAskInfo(INT32 node)
{
tic_t asktime;
#ifdef HOLEPUNCH
if (node != 0 && node != BROADCASTADDR &&
cv_rendezvousserver.string[0])
{
I_NetRequestHolePunch(node);
}
#endif
asktime = I_GetTime();
@@ -2639,7 +2646,7 @@ static void CL_ConnectToServer(void)
tic_t asksent;
#endif
#ifdef JOININGAME
XBOXSTATIC char tmpsave[264];
char tmpsave[264];
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
#endif
@@ -3351,7 +3358,7 @@ static void Command_Nodes(void)
{
CONS_Printf("%.2u: %*s", i, (int)maxlen, player_names[i]);
CONS_Printf(" - %.2d", playernode[i]);
if (I_GetNodeAddress && (address = I_GetNodeAddress(playernode[i])) != NULL)
if ((I_GetNodeAddress && (address = I_GetNodeAddress(playernode[i])) != NULL) && (cv_shownodeip.value))
CONS_Printf(" - %s", address);
if (IsPlayerAdmin(i))
@@ -3365,6 +3372,94 @@ static void Command_Nodes(void)
}
}
//Screw the base game nodes lets replace with listplayers instead.
static void Command_Listplayers(void)
{
const char *address;
int width = 0;
boolean admin;
boolean spectator;
/*
Mode of player status for an individual player (admin, spectator).
1 for admin
2 for spectator
4 for both
*/
int mode = 0;
INT32 totalplayers = 0;
const char *cc;
const char *pcc;
INT32 i;
int n;
for (i = 0; i < MAXPLAYERS; ++i)
if (playeringame[i])
{
n = strlen(player_names[i]);
if (n > width)
width = n;
if (mode != 7)
{
admin = IsPlayerAdmin(i);
spectator = players[i].spectator;
if (admin)
mode |= 1;
if (spectator)
mode |= 2;
if (admin && spectator)
mode |= 4;
}
}
for (i = 0; i < MAXPLAYERS; ++i)
if (playeringame[i])
{
admin = IsPlayerAdmin(i);
spectator = players[i].spectator;
if (admin)
cc = "\x85";/* red */
else if (spectator)
cc = "\x86";/* gray */
else
cc = "";
pcc = HU_SkinColorToConsoleColor(players[i].skincolor);
CONS_Printf("%.2d: ""%s""%-*s""\x80", i, pcc,width, player_names[i]);
if ((I_GetNodeAddress && (address = I_GetNodeAddress(playernode[i])) != NULL) && (cv_shownodeip.value))
CONS_Printf(" -- %s", address);
else/* print spacer */
{
/* ...but not if there's a crammed status and were admin */
if (mode != 7 || !admin)
CONS_Printf(" -- ");/* -- self */
}
if (admin)
CONS_Printf(M_GetText("%s"" (admin)"),cc);
if (spectator)
CONS_Printf(M_GetText("%s"" (spectator)"),cc);
CONS_Printf("\n");
totalplayers++;
}
if (totalplayers == 1)
CONS_Printf("\nThere is 1 player in the game.\n");
else
CONS_Printf("\nThere are %d players in the game.\n", totalplayers);
}
static void Command_Ban(void)
{
if (COM_Argc() < 2)
@@ -3381,7 +3476,7 @@ static void Command_Ban(void)
if (server || IsPlayerAdmin(consoleplayer))
{
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
UINT8 buf[3 + MAX_REASONLENGTH];
UINT8 *p = buf;
const SINT8 pn = nametonum(COM_Argv(1));
@@ -3498,7 +3593,7 @@ static void Command_Kick(void)
if (server || IsPlayerAdmin(consoleplayer))
{
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
UINT8 buf[3 + MAX_REASONLENGTH];
UINT8 *p = buf;
const SINT8 pn = nametonum(COM_Argv(1));
@@ -3550,7 +3645,7 @@ static void Command_Kick(void)
static void Got_KickCmd(UINT8 **p, INT32 playernum)
{
INT32 pnum, msg;
XBOXSTATIC char buf[3 + MAX_REASONLENGTH];
char buf[3 + MAX_REASONLENGTH];
char *reason = buf;
kickreason_t kickreason = KR_KICK;
UINT32 banMinutes = 0;
@@ -3930,6 +4025,7 @@ void D_ClientServerInit(void)
COM_AddCommand("reloadbans", Command_ReloadBan);
COM_AddCommand("connect", Command_connect);
COM_AddCommand("nodes", Command_Nodes);
COM_AddCommand("listplayers", Command_Listplayers);
#ifdef HAVE_CURL
COM_AddCommand("set_http_login", Command_set_http_login);
COM_AddCommand("list_http_logins", Command_list_http_logins);
@@ -4124,7 +4220,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal add player command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4209,7 +4305,7 @@ static void Got_RemovePlayer(UINT8 **p, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal remove player command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4221,6 +4317,13 @@ static void Got_RemovePlayer(UINT8 **p, INT32 playernum)
pnum = READUINT8(*p);
reason = READUINT8(*p);
if (pnum == serverplayer)
{
CONS_Alert(CONS_WARNING, "Attempt to remove server player\n");
return;
}
CL_RemovePlayer(pnum, reason);
#ifdef HAVE_DISCORDRPC
@@ -4231,7 +4334,7 @@ static void Got_RemovePlayer(UINT8 **p, INT32 playernum)
static boolean SV_AddWaitingPlayers(void)
{
INT32 node, n, newplayer = false;
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
UINT8 newplayernum = 0;
// What is the reason for this? Why can't newplayernum always be 0?
@@ -4304,7 +4407,7 @@ void CL_AddSplitscreenPlayer(void)
void CL_RemoveSplitscreenPlayer(UINT8 p)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
if (cl_mode != CL_CONNECTED)
return;
@@ -4890,7 +4993,7 @@ static boolean CheckForSpeedHacks(UINT8 p)
|| netcmds[maketic%TICQUEUE][p].sidemove > MAXPLMOVE || netcmds[maketic%TICQUEUE][p].sidemove < -MAXPLMOVE
|| netcmds[maketic%TICQUEUE][p].driftturn > KART_FULLTURN || netcmds[maketic%TICQUEUE][p].driftturn < -KART_FULLTURN)
{
XBOXSTATIC char buf[2];
char buf[2];
CONS_Alert(CONS_WARNING, M_GetText("Illegal movement value received from node %d\n"), playernode[p]);
//D_Clearticcmd(k);
@@ -4912,11 +5015,11 @@ static boolean CheckForSpeedHacks(UINT8 p)
*
*/
static void HandlePacketFromPlayer(SINT8 node)
{FILESTAMP
XBOXSTATIC INT32 netconsole;
XBOXSTATIC tic_t realend, realstart;
XBOXSTATIC UINT8 *pak, *txtpak, numtxtpak;
FILESTAMP
{
INT32 netconsole;
tic_t realend, realstart;
UINT8 *pak, *txtpak, numtxtpak;
txtpak = NULL;
@@ -5061,7 +5164,7 @@ FILESTAMP
}
else
{
XBOXSTATIC UINT8 buf[3];
UINT8 buf[3];
buf[0] = (UINT8)netconsole;
buf[1] = KICK_MSG_CON_FAIL;
@@ -5174,7 +5277,7 @@ FILESTAMP
nodewaiting[node] = 0;
if (netconsole != -1 && playeringame[netconsole])
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)netconsole;
if (netbuffer->packettype == PT_NODETIMEOUT)
buf[1] = KICK_MSG_TIMEOUT;
@@ -5219,7 +5322,7 @@ FILESTAMP
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)node;
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -5244,7 +5347,7 @@ FILESTAMP
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)node;
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -5295,7 +5398,7 @@ FILESTAMP
}
else
{
DEBFILE(va("frame not in bound: %u\n", neededtic));
DEBFILE(va("frame not in bound: %u (bounds are from %u to %u)\n", neededtic, realstart, realend));
/*if (realend < neededtic - 2 * TICRATE || neededtic + 2 * TICRATE < realstart)
I_Error("Received an out of order PT_SERVERTICS packet!\n"
"Got tics %d-%d, needed tic %d\n\n"
@@ -5311,7 +5414,7 @@ FILESTAMP
if (server)
{
XBOXSTATIC char buf[2];
char buf[2];
buf[0] = (char)node;
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -5330,7 +5433,7 @@ FILESTAMP
if (server)
{
XBOXSTATIC char buf[2];
char buf[2];
buf[0] = (char)node;
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -5361,7 +5464,7 @@ FILESTAMP
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)node;
buf[1] = KICK_MSG_CON_FAIL;
SendNetXCmd(XD_KICK, &buf, 2);
@@ -5384,9 +5487,9 @@ FILESTAMP
*
*/
static void GetPackets(void)
{FILESTAMP
XBOXSTATIC SINT8 node; // The packet sender
FILESTAMP
{
SINT8 node; // The packet sender
player_joining = false;
@@ -6085,7 +6188,7 @@ static inline void PingUpdate(void)
UINT8 minimumkicklevel = (nonlaggers > 0) ? PINGKICK_LIMIT : PINGKICK_TICQUEUE;
for (i = 0; i < MAXPLAYERS; i++)
{
XBOXSTATIC char buf[2];
char buf[2];
if (!playeringame[i] || pingkick[i] < minimumkicklevel)
continue;
@@ -6149,6 +6252,7 @@ static void UpdatePingTable(void)
}
}
#ifdef HOLEPUNCH
static void RenewHolePunch(void)
{
if (cv_rendezvousserver.string[0])
@@ -6164,6 +6268,7 @@ static void RenewHolePunch(void)
}
}
}
#endif
// Handle timeouts to prevent definitive freezes from happenning
static void HandleNodeTimeouts(void)
@@ -6190,19 +6295,21 @@ void NetKeepAlive(void)
UpdatePingTable();
// Sryder: What is FILESTAMP???
FILESTAMP
// Sryder: What is FILESTAMP??? << lmao
GetPackets();
FILESTAMP
#ifdef MASTERSERVER
MasterClient_Ticker();
#endif
#ifdef HOLEPUNCH
if (netgame && serverrunning)
{
RenewHolePunch();
}
#endif
if (client)
{
@@ -6305,9 +6412,9 @@ void NetUpdate(void)
if (server)
CL_SendClientCmd(); // send it
FILESTAMP
GetPackets(); // get packet from client or from server
FILESTAMP
// client send the command after a receive of the server
// the server send before because in single player is beter
@@ -6315,10 +6422,12 @@ FILESTAMP
MasterClient_Ticker(); // Acking the Master Server
#endif
#ifdef HOLEPUNCH
if (netgame && serverrunning)
{
RenewHolePunch();
}
#endif
if (client)
{
+2
View File
@@ -515,6 +515,8 @@ extern consvar_t cv_kicktime;
extern consvar_t cv_showjoinaddress;
extern consvar_t cv_playbackspeed;
extern consvar_t cv_shownodeip;
#define BASEPACKETSIZE offsetof(doomdata_t, u)
#define FILETXHEADER offsetof(filetx_pak, data)
#define BASESERVERTICSSIZE offsetof(doomdata_t, u.serverpak.cmds[0])
+211 -119
View File
@@ -15,7 +15,7 @@
/// plus functions to parse command line parameters, configure game
/// parameters, and call the startup functions.
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
#include <sys/stat.h>
#include <sys/types.h>
#endif
@@ -24,22 +24,12 @@
#include <unistd.h> // for getcwd
#endif
#ifdef PC_DOS
#include <stdio.h> // for snprintf
int snprintf(char *str, size_t n, const char *fmt, ...);
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
#endif
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#ifdef _WIN32
#include <direct.h>
#include <malloc.h>
#endif
#if !defined (UNDER_CE)
#include <time.h>
#elif defined (_XBOX)
#define NO_TIME
#endif
#include "doomdef.h"
#include "am_map.h"
@@ -76,7 +66,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "fastcmp.h"
#include "r_fps.h" // Frame interpolation/uncapped
#include "keys.h"
#include "filesrch.h" // refreshdirmenu
#include "filesrch.h" // refreshdirmenu, pathisdirectory
#include "d_protocol.h"
#include "m_perfstats.h"
@@ -86,18 +76,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "config.h.in"
#endif
#ifdef _XBOX
#include "sdl12/SRB2XBOX/xboxhelp.h"
#endif
#ifdef HWRENDER
#include "hardware/hw_main.h" // 3D View Rendering
#endif
#ifdef _WINDOWS
#include "win32/win_main.h" // I_DoStartupMouse
#endif
#ifdef HW3SOUND
#include "hardware/hw3sound.h"
#endif
@@ -112,8 +94,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
// platform independant focus loss
UINT8 window_notinfocus = false;
INT32 window_x;
INT32 window_y;
//
// DEMO LOOP
@@ -123,6 +103,13 @@ static const char *pagename = "MAP1PIC";
static char *startupwadfiles[MAX_WADFILES];
static char *startuppwads[MAX_WADFILES];
// autoloading
static char *autoloadwadfiles[MAX_WADFILES];
char *autoloadwadfilespost[MAX_WADFILES];
boolean autoloading;
boolean autoloaded;
boolean postautoloaded;
boolean devparm = false; // started game with -devparm
boolean singletics = false; // timedemo
@@ -134,19 +121,11 @@ INT32 postimgparam[MAXSPLITSCREENPLAYERS];
// These variables are only true if
// whether the respective sound system is disabled
// or they're init'ed, but the player just toggled them
#ifdef _XBOX
#ifndef NO_MIDI
boolean midi_disabled = true;
#endif
boolean sound_disabled = true;
boolean digital_disabled = true;
#else
#ifndef NO_MIDI
boolean midi_disabled = false;
#endif
boolean sound_disabled = false;
boolean digital_disabled = false;
#endif
#ifdef DEBUGFILE
INT32 debugload = 0;
@@ -154,13 +133,8 @@ INT32 debugload = 0;
char savegamename[256];
#ifdef _arch_dreamcast
char srb2home[256] = "/cd";
char srb2path[256] = "/cd";
#else
char srb2home[256] = ".";
char srb2path[256] = ".";
#endif
boolean usehome = true;
const char *pandf = "%s" PATHSEP "%s";
@@ -185,10 +159,6 @@ void D_PostEvent(const event_t *ev)
events[eventhead] = *ev;
eventhead = (eventhead+1) & (MAXEVENTS-1);
}
// just for lock this function
#if defined (PC_DOS) && !defined (DOXYGEN)
void D_PostEvent_end(void) {};
#endif
// modifier keys
// Now handled in I_OsPolling
@@ -663,11 +633,6 @@ void D_SRB2Loop(void)
// Pushing of + parameters is now done back in D_SRB2Main, not here.
#ifdef _WINDOWS
CONS_Printf("I_StartupMouse()...\n");
I_DoStartupMouse();
#endif
I_UpdateTime(cv_timescale.value);
oldentertics = I_GetTime();
@@ -802,9 +767,6 @@ void D_SRB2Loop(void)
// consoleplayer -> displayplayers (hear sounds from viewpoint)
S_UpdateSounds(); // move positional sounds
// check for media change, loop music..
I_UpdateCD();
#ifdef HW3SOUND
HW3S_EndFrameUpdate();
#endif
@@ -928,7 +890,131 @@ static void D_AddFile(const char *file, char **filearray)
filearray[pnumwadfiles] = newfile;
}
static inline void D_CleanFile(char **filearray)
// Taken from TSoURDt3rd
// https://github.com/StarManiaKG/The-Story-of-Uncapped-Revengence-Discord-the-3rd/blob/main/src/STAR/star_functions.c
static INT32 D_DetectFileType(const char* filename)
{
if (pathisdirectory(filename) == 1)
return 1;
else
{
if (!stricmp(&filename[strlen(filename) - 4], ".wad"))
return 2;
else if (!stricmp(&filename[strlen(filename) - 4], ".pk3"))
return 3;
else if (!stricmp(&filename[strlen(filename) - 5], ".kart"))
return 4;
else if (!stricmp(&filename[strlen(filename) - 4], ".lua"))
return 5;
else if (!stricmp(&filename[strlen(filename) - 4], ".soc"))
return 6;
else if (!stricmp(&filename[strlen(filename) - 4], ".cfg"))
return 7;
else if (!stricmp(&filename[strlen(filename) - 4], ".txt"))
return 8;
}
return 0;
}
// autoload that shit
static void D_AutoloadFile(const char *file, char **filearray)
{
size_t pnumwadfiles;
char *newfile;
INT32 fileType = D_DetectFileType(file);
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
;
newfile = malloc(strlen(file) + 1);
if (!newfile)
I_Error("No more free memory to AutoloadFile %s",file);
if (!fileType)
{
CONS_Printf("D_AutoloadFile: File %s is unknown or invalid\n", file);
return;
}
strcpy(newfile, file);
if (fileType <= 6)
filearray[pnumwadfiles] = newfile;
else
COM_BufAddText(va("exec %s\n", newfile));
}
static char *strremove(char *str, const char *sub) {
char *p, *q, *r;
if (*sub && (q = r = strstr(str, sub)) != NULL) {
size_t len = strlen(sub);
while ((r = strstr(p = r + len, sub)) != NULL) {
while (p < r)
*q++ = *p++;
}
while ((*q++ = *p++) != '\0')
continue;
}
return str;
}
// FIND THEM
static void D_FindAddonsToAutoload(void)
{
FILE *autoloadconfigfile;
const char *autoloadpath;
boolean postload;
INT32 i;
char wadsToAutoload[256] = "", renameAutoloadStrings[256] = "";
// does it exist tho
autoloadpath = va("%s"PATHSEP"%s",srb2home,AUTOLOADCONFIGFILENAME);
autoloadconfigfile = fopen(autoloadpath, "r");
// If the file is found, run our shit
if (!autoloadconfigfile) // nope outta here
return;
while (fgets(wadsToAutoload, sizeof wadsToAutoload, autoloadconfigfile) != NULL)
{
postload = false;
// skip if commented or empty
if ((wadsToAutoload[1] == '\0' || wadsToAutoload[1] == '\n')
|| (wadsToAutoload[0] == '#'))
continue;
// this marks it so that it loads after loading server addons
else if (fastncmp(wadsToAutoload, "postload ", 9)) {
strremove(wadsToAutoload, "postload ");
postload = true;
}
// Remove Any Empty or Skipped Lines
for (i = 0; wadsToAutoload[i] != '\0'; i++)
{
if (wadsToAutoload[i] == '\n')
wadsToAutoload[i] = '\0';
}
// LOAD IT
if (!postload)
D_AutoloadFile(wadsToAutoload, autoloadwadfiles);
else
D_AutoloadFile(wadsToAutoload, autoloadwadfilespost);
// end it here
for (i = 0; wadsToAutoload[i] != '\0'; i++)
wadsToAutoload[i] = '\0';
}
// we dont want memory leaks around here do we?
fclose(autoloadconfigfile);
}
void D_CleanFile(char **filearray)
{
size_t pnumwadfiles;
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
@@ -958,13 +1044,22 @@ static boolean AddIWAD(void)
}
boolean found_extra_kart;
boolean found_extra2_kart;
boolean snw_speedo; // snowy speedometer check
boolean clr_hud; // colour hud check
boolean big_lap; // bigger lap counter
boolean big_lap_color; // bigger lap counter but colour
boolean kartzspeedo; // kartZ speedometer
boolean statdp; // New stat
static void IdentifyVersion(void)
{
const char *srb2waddir = NULL;
found_extra_kart = false;
found_extra2_kart = false;
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
#if defined (__unix__) || defined (UNIXCOMMON) || defined (HAVE_SDL)
// change to the directory where 'srb2.srb' is found
srb2waddir = I_LocateWad();
#endif
@@ -976,17 +1071,11 @@ static void IdentifyVersion(void)
}
else
{
#if !defined(_WIN32_WCE) && !defined(_PS3)
if (getcwd(srb2path, 256) != NULL)
srb2waddir = srb2path;
else
#endif
{
#ifdef _arch_dreamcast
srb2waddir = "/cd";
#else
srb2waddir = srb2path;
#endif
}
}
@@ -1020,6 +1109,12 @@ static void IdentifyVersion(void)
D_AddFile(va(pandf,srb2waddir,"extra.kart"), startupwadfiles);
found_extra_kart = true;
}
// completely optional 2: Back with a vengence
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra2.kart"))) {
D_AddFile(va(pandf,srb2waddir,"extra2.kart"), startupwadfiles);
found_extra2_kart = true;
}
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
#define MUSICTEST(str) \
@@ -1037,28 +1132,6 @@ static void IdentifyVersion(void)
#endif
}
/* ======================================================================== */
// Just print the nice red titlebar like the original SRB2 for DOS.
/* ======================================================================== */
#ifdef PC_DOS
static inline void D_Titlebar(char *title1, char *title2)
{
// SRB2 banner
clrscr();
textattr((BLUE<<4)+WHITE);
clreol();
cputs(title1);
// standard srb2 banner
textattr((RED<<4)+WHITE);
clreol();
gotoxy((80-strlen(title2))/2, 2);
cputs(title2);
normvideo();
gotoxy(1,3);
}
#endif
//
// Center the title string, then add the date and time of compilation.
//
@@ -1086,7 +1159,6 @@ static inline void D_MakeTitleString(char *s)
strcpy(s, temp);
}
//
// D_SRB2Main
//
@@ -1117,7 +1189,7 @@ void D_SRB2Main(void)
"in this program.\n\n");
// keep error messages until the final flush(stderr)
#if !defined (PC_DOS) && !defined (_WIN32_WCE) && !defined(NOTERMIOS)
#if !defined(NOTERMIOS)
if (setvbuf(stderr, NULL, _IOFBF, 1000))
I_OutputMsg("setvbuf didnt work\n");
#endif
@@ -1139,29 +1211,23 @@ void D_SRB2Main(void)
// identify the main IWAD file to use
IdentifyVersion();
#if !defined (_WIN32_WCE) && !defined(NOTERMIOS)
#if !defined(NOTERMIOS)
setbuf(stdout, NULL); // non-buffered output
#endif
#if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X)
#if 0 //defined (_DEBUG)
devparm = M_CheckParm("-nodebug") == 0;
#else
devparm = M_CheckParm("-debug") != 0;
#endif
// for dedicated server
#if !defined (_WINDOWS) //already check in win_main.c
dedicated = M_CheckParm("-dedicated") != 0;
#endif
strcpy(title, "SRB2Kart");
strcpy(srb2, "SRB2Kart");
D_MakeTitleString(srb2);
#ifdef PC_DOS
D_Titlebar(srb2, title);
#endif
#if defined (__OS2__) && !defined (HAVE_SDL)
// set PM window title
snprintf(pmData->title, sizeof (pmData->title),
@@ -1183,13 +1249,8 @@ void D_SRB2Main(void)
if (!userhome)
{
#if ((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__) && !defined (DC) && !defined (PSP) && !defined(GP2X)
#if (defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)
I_Error("Please set $HOME to your home directory\n");
#elif defined (_WIN32_WCE) && 0
if (dedicated)
snprintf(configfile, sizeof configfile, "/Storage Card/SRB2DEMO/d"CONFIGFILENAME);
else
snprintf(configfile, sizeof configfile, "/Storage Card/SRB2DEMO/"CONFIGFILENAME);
#else
if (dedicated)
snprintf(configfile, sizeof configfile, "d"CONFIGFILENAME);
@@ -1246,10 +1307,6 @@ void D_SRB2Main(void)
fclose(tmpfile);
remove(testfile);
}
#ifdef _arch_dreamcast
strcpy(downloaddir, "/ram"); // the dreamcast's TMP
#endif
}
D_SetupProtocol();
@@ -1260,6 +1317,9 @@ void D_SRB2Main(void)
if (M_CheckParm("-password") && M_IsNextParm())
D_SetPassword(M_GetNextParm());
// FIND THEM
D_FindAddonsToAutoload();
// add any files specified on the command line with -file wadfile
// to the wad list
if (!(M_CheckParm("-connect") && !M_CheckParm("-server")))
@@ -1345,8 +1405,48 @@ void D_SRB2Main(void)
#endif //ifndef DEVELOP
if (found_extra_kart) // found the funny, add it in!
mainwads++;
if (found_extra_kart || found_extra2_kart) // found the funny, add it in!
{
// HAYA: These are seperated for a reason lmao
if (found_extra_kart)
mainwads++;
if (found_extra2_kart)
mainwads++;
// now check for speedometer stuff
if (W_CheckMultipleLumps("SP_SMSTC", "K_TRNULL", "SP_MKMH", "SP_MMPH", "SP_MFRAC", "SP_MPERC", NULL))
snw_speedo = true;
// check for bigger lap count
if (W_CheckMultipleLumps("K_STLAPB", "K_STLA2B", NULL))
big_lap = true;
// now check for colour hud stuff
if (W_CheckMultipleLumps("K_SCTIME", "K_SCTIMW", "K_SCLAPS", "K_SCLAPW", \
"K_SCBALN", "K_SCBALW", "K_SCKARM", "K_SCTOUT", "K_ISMULC", "K_ITMULC", "K_ITBC","K_ITBCD", "K_ISBC", "K_ISBCD", NULL))
clr_hud = true;
// check for bigger lap count but color** its color bitch
if (W_CheckMultipleLumps("K_SCLAPB", "K_SCLA2B", NULL))
big_lap_color = true;
// kartzspeedo
if (W_CheckMultipleLumps("K_KZSP1", "K_KZSP2", "K_KZSP3", "K_KZSP4", "K_KZSP5", \
"K_KZSP6", "K_KZSP7", "K_KZSP8", "K_KZSP9", "K_KZSP10", "K_KZSP11", "K_KZSP12", \
"K_KZSP13", "K_KZSP14", "K_KZSP15", "K_KZSP16", "K_KZSP17", "K_KZSP18", "K_KZSP19", \
"K_KZSP20", "K_KZSP21", "K_KZSP22", "K_KZSP23", "K_KZSP24", "K_KZSP25", NULL))
kartzspeedo = true;
// stat display for extended player setup
if (W_CheckMultipleLumps("K_STATNB", "K_STATN1", "K_STATN2", "K_STATN3", "K_STATN4", \
"K_STATN5", "K_STATN6", NULL))
statdp = true;
}
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
if (W_AddAutoloadedLocalFiles(autoloadwadfiles) == 0)
CONS_Printf("D_AutoloadFile(): Are you sure you put in valid files or what?\n");
D_CleanFile(autoloadwadfiles);
//
// search for maps
@@ -1416,6 +1516,13 @@ void D_SRB2Main(void)
CONS_Printf("I_StartupGraphics()...\n");
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
#ifdef HWRENDER
if (rendermode == render_opengl)
{
@@ -1433,12 +1540,7 @@ void D_SRB2Main(void)
HU_Init();
COM_Init();
// libogc has a CON_Init function, we must rename SRB2's CON_Init in WII/libogc
#ifndef _WII
CON_Init();
#else
CON_InitWii();
#endif
D_RegisterServerCommands();
D_RegisterClientCommands(); // be sure that this is called before D_CheckNetGame
@@ -1452,7 +1554,7 @@ void D_SRB2Main(void)
G_LoadGameData();
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
#if defined (__unix__) || defined (UNIXCOMMON) || defined (HAVE_SDL)
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen
#endif
@@ -1482,10 +1584,6 @@ void D_SRB2Main(void)
}
}
// Initialize CD-Audio
if (M_CheckParm("-usecd") && !dedicated)
I_InitCD();
if (M_CheckParm("-noupload"))
COM_BufAddText("downloading 0\n");
@@ -1544,6 +1642,7 @@ void D_SRB2Main(void)
I_InitMusic();
S_InitSfxChannels(cv_soundvolume.value);
S_InitMusicDefs();
S_InitMTDefs();
}
CONS_Printf("ST_Init(): Init status bar.\n");
@@ -1772,26 +1871,19 @@ const char *D_Home(void)
#ifdef ANDROID
return "/data/data/org.srb2/";
#endif
#ifdef _arch_dreamcast
char VMUHOME[] = "HOME=/vmu/a1";
putenv(VMUHOME); //don't use I_PutEnv
#endif
if (M_CheckParm("-home") && M_IsNextParm())
userhome = M_GetNextParm();
else
{
#if defined (GP2X)
usehome = false; //let use the CWD
return NULL;
#elif !((defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)) && !defined (__APPLE__) && !defined(_WIN32_WCE)
#if !(defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON))
if (FIL_FileOK(CONFIGFILENAME))
usehome = false; // Let's NOT use home
else
#endif
userhome = I_GetEnv("HOME"); //Alam: my new HOME for srb2
}
#if defined (_WIN32) && !defined(_WIN32_WCE) //Alam: only Win32 have APPDATA and USERPROFILE
#ifdef _WIN32 //Alam: only Win32 have APPDATA and USERPROFILE
if (!userhome && usehome) //Alam: Still not?
{
char *testhome = NULL;
+16 -3
View File
@@ -26,6 +26,20 @@ extern const char *pandf; //Alam: how to path?
extern char srb2path[256]; //Alam: SRB2's Home
extern boolean found_extra_kart; // for use in k_kart.c
extern boolean found_extra2_kart; // for use in k_kart.c
extern boolean snw_speedo; // snowy speedometer check
extern boolean clr_hud; // colour hud check
extern boolean big_lap; // bigger lap counter
extern boolean big_lap_color; //bigger lap counter but colour
extern boolean kartzspeedo; //kartZ speedo
extern boolean statdp; //stat display for extended player setup
extern boolean autoloading;
extern boolean autoloaded;
extern boolean postautoloaded;
extern char *autoloadwadfilespost[MAX_WADFILES];
// the infinite loop of D_SRB2Loop() called from win_main for windows version
void D_SRB2Loop(void) FUNCNORETURN;
@@ -39,12 +53,11 @@ void D_SRB2Main(void);
// Called by IO functions when input is detected.
void D_PostEvent(const event_t *ev);
#if defined (PC_DOS) && !defined (DOXYGEN)
void D_PostEvent_end(void); // delimiter for locking memory
#endif
void D_ProcessEvents(void);
void D_CleanFile(char **filearray);
const char *D_Home(void);
//
+11 -7
View File
@@ -51,7 +51,9 @@ doomcom_t *doomcom = NULL;
/// \brief network packet data, points inside doomcom
doomdata_t *netbuffer = NULL;
/// \brief hole punching packet, also points inside doomcom
#ifdef HOLEPUNCH
holepunch_t *holepunchpacket = NULL;
#endif
#ifdef DEBUGFILE
FILE *debugfile = NULL; // put some net info in a file during the game
@@ -75,8 +77,10 @@ boolean (*I_NetCanGet)(void) = NULL;
void (*I_NetCloseSocket)(void) = NULL;
void (*I_NetFreeNodenum)(INT32 nodenum) = NULL;
SINT8 (*I_NetMakeNodewPort)(const char *address, const char* port) = NULL;
#ifdef HOLEPUNCH
void (*I_NetRequestHolePunch)(INT32 node) = NULL;
void (*I_NetRegisterHolePunch)(void) = NULL;
#endif
boolean (*I_NetOpenSocket)(void) = NULL;
boolean (*I_Ban) (INT32 node) = NULL;
void (*I_ClearBans)(void) = NULL;
@@ -827,6 +831,10 @@ static const char *packettypename[NUMPACKETTYPE] =
"CLIENTJOIN",
"NODETIMEOUT",
"RESYNCHING",
"TELLFILESNEEDED",
"MOREFILESNEEDED",
"PING"
};
@@ -1349,14 +1357,11 @@ boolean D_CheckNetGame(void)
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
netbuffer = (doomdata_t *)(void *)&doomcom->data;
#ifdef HOLEPUNCH
holepunchpacket = (holepunch_t *)(void *)&doomcom->data;
#endif
#ifdef DEBUGFILE
#ifdef _arch_dreamcast
//debugfile = stderr;
if (debugfile)
CONS_Printf(M_GetText("debug output to: %s\n"), "STDERR");
#else
if (M_CheckParm("-debugfile"))
{
char filename[21];
@@ -1374,7 +1379,6 @@ boolean D_CheckNetGame(void)
else
CONS_Alert(CONS_WARNING, M_GetText("cannot debug output to file %s!\n"), va("%s" PATHSEP "%s", srb2home, filename));
}
#endif
#endif
D_ClientServerInit();
@@ -1464,7 +1468,7 @@ void Command_Ping_f(void)
if (!server && playeringame[consoleplayer])
{
CONS_Printf("\nYour ping is %d frames (%d ms)\n", playerpingtable[consoleplayer], (INT32)(playerpingtable[i] * (1000.00f / TICRATE)));
CONS_Printf("\nYour ping is %d frames (%d ms)\n", playerpingtable[consoleplayer], (INT32)(playerpingtable[consoleplayer] * (1000.00f / TICRATE)));
}
}
+262 -108
View File
@@ -49,6 +49,7 @@
#include "m_anigif.h"
#include "k_kart.h" // SRB2kart
#include "y_inter.h"
#include "fastcmp.h"
#include "m_perfstats.h"
#ifdef NETGAME_DEVMODE
@@ -141,6 +142,8 @@ static void Command_SetViews_f(void);
static void Command_Addfilelocal(void);
static void Command_Addfile(void);
static void Command_Addskins(void);
static void Command_GLocalSkin(void);
static void Command_ListWADS_f(void);
#ifdef DELFILE
static void Command_Delfile(void);
@@ -192,6 +195,8 @@ static void Command_Isgamemodified_f(void);
static void Command_Cheats_f(void);
static void Command_ListSkins(void);
static void Command_SkinSearch(void);
#ifdef _DEBUG
static void Command_Togglemodified_f(void);
@@ -210,7 +215,7 @@ void SendWeaponPref3(void);
void SendWeaponPref4(void);
static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}};
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
static CV_PossibleValue_t mouse2port_cons_t[] = {{0, "/dev/gpmdata"}, {1, "/dev/ttyS0"},
{2, "/dev/ttyS1"}, {3, "/dev/ttyS2"}, {4, "/dev/ttyS3"}, {0, NULL}};
#else
@@ -289,6 +294,10 @@ consvar_t cv_skin = {"skin", DEFAULTSKIN, CV_SAVE|CV_CALL|CV_NOINIT, NULL, Skin_
consvar_t cv_skin2 = {"skin2", DEFAULTSKIN2, CV_SAVE|CV_CALL|CV_NOINIT, NULL, Skin2_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_skin3 = {"skin3", DEFAULTSKIN3, CV_SAVE|CV_CALL|CV_NOINIT, NULL, Skin3_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_skin4 = {"skin4", DEFAULTSKIN4, CV_SAVE|CV_CALL|CV_NOINIT, NULL, Skin4_OnChange, 0, NULL, NULL, 0, 0, NULL};
// haha I've beaten you now, ONLINE
consvar_t cv_localskin = {"internal___localskin", "none", CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_showlocalskinmenus = {"showlocalskinmenus", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_skipmapcheck = {"skipmapcheck", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -296,8 +305,10 @@ INT32 cv_debug;
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
//WTF
consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) || defined(HAVE_SDL) || defined(_WINDOWS) //joystick 1 and 2
#if defined(HAVE_SDL) || defined(_WINDOWS) //joystick 1 and 2
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,
@@ -321,7 +332,7 @@ consvar_t cv_joyscale4 = {"joyscale4", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale4,
consvar_t cv_joyscale = {"joyscale", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; //Alam: Dummy for save
consvar_t cv_joyscale2 = {"joyscale2", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; //Alam: Dummy for save
#endif
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
consvar_t cv_mouse2port = {"mouse2port", "/dev/gpmdata", CV_SAVE, mouse2port_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_mouse2opt = {"mouse2opt", "0", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
#else
@@ -370,6 +381,9 @@ consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, C
consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
//Save server ip
consvar_t cv_lastserver = {"lastserver", "", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -404,7 +418,7 @@ consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", CV_NOSHOWHELP,
consvar_t cv_kartdebugnodes = {"kartdebugnodes", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartdebugcolorize = {"kartdebugcolorize", "Off", CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
static CV_PossibleValue_t votetime_cons_t[] = {{1, "MIN"}, {3600, "MAX"}, {0, NULL}};
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ringslinger = {"ringslinger", "No", CV_NETVAR|CV_NOSHOWHELP|CV_CALL|CV_CHEAT, CV_YesNo,
@@ -447,6 +461,7 @@ static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_forceskin = {"forceskin", "Off", CV_NETVAR|CV_CALL|CV_CHEAT, Forceskin_cons_t, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_fakelocalskin = {"fakelocalskin", "None", CV_SAVE, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_allowexitlevel = {"allowexitlevel", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -468,6 +483,8 @@ consvar_t cv_showping = {"showping", "Always", CV_SAVE, showping_cons_t, NULL, 0
static CV_PossibleValue_t pingmeasurement_cons_t[] = {{0, "Frames"}, {1, "Milliseconds"}, {0, NULL}};
consvar_t cv_pingmeasurement = {"pingmeasurement", "Frames", CV_SAVE, pingmeasurement_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_pingicon = {"pingicon", "On", CV_SAVE, CV_OnOff, 0, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_luaimmersion = {"luaimmersion", "On", CV_SAVE, CV_OnOff, 0, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_minihead = {"smallminimapplayers", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -498,7 +515,7 @@ static CV_PossibleValue_t skinselectspin_cons_t[] = {
consvar_t cv_skinselectspin = {"skinselectspin", "5", CV_SAVE, skinselectspin_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t perfstats_cons_t[] = {
{0, "Off"}, {1, "Rendering"}, {2, "Logic"}, {3, "ThinkFrame"}, {0, NULL}};
{0, "Off"}, {1, "Rendering"}, {2, "Logic"}, {3, "ThinkFrame"}, {4, "PreThinkFrame"}, {5, "PostThinkFrame"}, {0, NULL}};
consvar_t cv_perfstats = {"perfstats", "Off", CV_CALL, perfstats_cons_t, PS_PerfStats_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ps_thinkframe_page = {"ps_thinkframe_page", "1", CV_CALL, CV_Natural, PS_ThinkFrame_Page_OnChange, 0, NULL, NULL, 0, 0, NULL};
@@ -512,8 +529,8 @@ consvar_t cv_ps_descriptor = {"ps_descriptor", "Average", 0, ps_descriptor_cons_
consvar_t cv_showtrackaddon = {"showtrackaddon", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t skinselectmenu_t[] = {{SKINMENUTYPE_SCROLL, "Scoll"}, {SKINMENUTYPE_2D, "2d"}, {SKINMENUTYPE_GRID, "Grid"}, {0, NULL}};
consvar_t cv_skinselectmenu = {"skinselectmenu", "Grid", CV_SAVE, skinselectmenu_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t skinselectmenu_t[] = {{SKINMENUTYPE_SCROLL, "Scroll"}, {SKINMENUTYPE_2D, "2d"}, {SKINMENUTYPE_GRID, "Grid"}, {SKINMENUTYPE_EXTENDED, "Extended"}, {0, NULL}};
consvar_t cv_skinselectmenu = {"skinselectmenu", "Extended", CV_SAVE, skinselectmenu_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t skinselectgridsort_t[] ={
{ SKINMENUSORT_REALNAME, "Real name" },
@@ -643,6 +660,8 @@ void D_RegisterServerCommands(void)
COM_AddCommand("addfilelocal", Command_Addfilelocal);
COM_AddCommand("addfile", Command_Addfile);
COM_AddCommand("addskins", Command_Addskins);
COM_AddCommand("localskin", Command_GLocalSkin);
COM_AddCommand("listwad", Command_ListWADS_f);
#ifdef DELFILE
@@ -709,8 +728,6 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_powerstones);
CV_RegisterVar(&cv_competitionboxes);
CV_RegisterVar(&cv_matchboxes);
CV_RegisterVar(&cv_slamsound);
/*CV_RegisterVar(&cv_recycler);
CV_RegisterVar(&cv_teleporters);
@@ -763,6 +780,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_joinnextround);
#endif
CV_RegisterVar(&cv_showjoinaddress);
CV_RegisterVar(&cv_shownodeip);
CV_RegisterVar(&cv_blamecfail);
#endif
@@ -776,15 +794,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_pingtimeout);
CV_RegisterVar(&cv_showping);
CV_RegisterVar(&cv_pingmeasurement);
CV_RegisterVar(&cv_minihead);
CV_RegisterVar(&cv_showminimapnames);
CV_RegisterVar(&cv_showlapemblem);
CV_RegisterVar(&cv_showtrackaddon);
CV_RegisterVar(&cv_showviewpointtext);
CV_RegisterVar(&cv_pingicon);
#ifdef SEENAMES
CV_RegisterVar(&cv_allowseenames);
@@ -802,6 +812,8 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_recordmultiplayerdemos);
CV_RegisterVar(&cv_netdemosyncquality);
CV_RegisterVar(&cv_maxdemosize);
CV_RegisterVar(&cv_cechotoggle);
}
// =========================================================================
@@ -885,6 +897,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_playername);
CV_RegisterVar(&cv_playercolor);
CV_RegisterVar(&cv_skin); // r_things.c (skin NAME)
CV_RegisterVar(&cv_localskin);
// secondary player (splitscreen)
CV_RegisterVar(&cv_playername2);
CV_RegisterVar(&cv_playercolor2);
@@ -927,6 +940,8 @@ void D_RegisterClientCommands(void)
COM_AddCommand("displayplayer", Command_Displayplayer_f);
CV_RegisterVar(&cv_audbuffersize);
#ifdef HAVE_OPENMPT
CV_RegisterVar(&cv_modfilter);
CV_RegisterVar(&cv_stereosep);
@@ -949,33 +964,18 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_chatnotifications);
CV_RegisterVar(&cv_chatbacktint);
CV_RegisterVar(&cv_songcredits);
CV_RegisterVar(&cv_showfreeplay);
CV_RegisterVar(&cv_item_xoffset);
CV_RegisterVar(&cv_item_yoffset);
CV_RegisterVar(&cv_time_xoffset);
CV_RegisterVar(&cv_time_yoffset);
CV_RegisterVar(&cv_laps_xoffset);
CV_RegisterVar(&cv_laps_yoffset);
CV_RegisterVar(&cv_spdm_xoffset);
CV_RegisterVar(&cv_spdm_yoffset);
CV_RegisterVar(&cv_posi_xoffset);
CV_RegisterVar(&cv_posi_yoffset);
CV_RegisterVar(&cv_face_xoffset);
CV_RegisterVar(&cv_face_yoffset);
CV_RegisterVar(&cv_stcd_xoffset);
CV_RegisterVar(&cv_stcd_yoffset);
CV_RegisterVar(&cv_chek_yoffset);
CV_RegisterVar(&cv_mini_xoffset);
CV_RegisterVar(&cv_mini_yoffset);
CV_RegisterVar(&cv_want_xoffset);
CV_RegisterVar(&cv_want_yoffset);
CV_RegisterVar(&cv_showinput);
CV_RegisterVar(&cv_newspeedometer);
CV_RegisterVar(&cv_saltyhop);
CV_RegisterVar(&cv_saltyhopsfx);
CV_RegisterVar(&cv_saltysquish);
CV_RegisterVar(&cv_showfreeplay);
CV_RegisterVar(&cv_growmusic);
CV_RegisterVar(&cv_supermusic);
CV_RegisterVar(&cv_showtrackaddon);
CV_RegisterVar(&cv_showviewpointtext);
CV_RegisterVar(&cv_luaimmersion);
CV_RegisterVar(&cv_fakelocalskin);
CV_RegisterVar(&cv_showlocalskinmenus);
//CV_RegisterVar(&cv_crosshair);
//CV_RegisterVar(&cv_crosshair2);
@@ -1041,7 +1041,7 @@ void D_RegisterClientCommands(void)
// WARNING: the order is important when initialising mouse2
// we need the mouse2port
CV_RegisterVar(&cv_mouse2port);
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
CV_RegisterVar(&cv_mouse2opt);
#endif
CV_RegisterVar(&cv_controlperkey);
@@ -1089,10 +1089,6 @@ void D_RegisterClientCommands(void)
#endif
CV_RegisterVar(&cv_numChannels);
// i_cdmus.c
CV_RegisterVar(&cd_volume);
CV_RegisterVar(&cdUpdate);
// screen.c
CV_RegisterVar(&cv_fullscreen);
CV_RegisterVar(&cv_renderview);
@@ -1110,17 +1106,12 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_ps_thinkframe_page);
CV_RegisterVar(&cv_ps_samplesize);
CV_RegisterVar(&cv_ps_descriptor);
CV_RegisterVar(&cv_invincmusicfade);
CV_RegisterVar(&cv_growmusicfade);
CV_RegisterVar(&cv_respawnfademusicout);
CV_RegisterVar(&cv_respawnfademusicback);
CV_RegisterVar(&cv_resetspecialmusic);
CV_RegisterVar(&cv_resume);
CV_RegisterVar(&cv_fading);
//Value used to store last server player has joined
CV_RegisterVar(&cv_lastserver);
CV_RegisterVar(&cv_showallmaps);
CV_RegisterVar(&cv_showmusicfilename);
// ingame object placing
COM_AddCommand("objectplace", Command_ObjectPlace_f);
@@ -1166,6 +1157,7 @@ void D_RegisterClientCommands(void)
#endif
COM_AddCommand("listskins", Command_ListSkins);
COM_AddCommand("skinsearch", Command_SkinSearch);
}
/**
@@ -1424,7 +1416,7 @@ static void SetPlayerName(INT32 playernum, char *newname)
CONS_Printf(M_GetText("Player %d sent a bad name change\n"), playernum+1);
if (server && netgame)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -1508,7 +1500,7 @@ static INT32 snacpending = 0, snac2pending = 0, snac3pending = 0, snac4pending =
//
static void SendNameAndColor(void)
{
XBOXSTATIC char buf[MAXPLAYERNAME+2];
char buf[MAXPLAYERNAME+2];
char *p;
p = buf;
@@ -1630,7 +1622,7 @@ static void SendNameAndColor(void)
static void SendNameAndColor2(void)
{
INT32 secondplaya = -1;
XBOXSTATIC char buf[MAXPLAYERNAME+2];
char buf[MAXPLAYERNAME+2];
char *p;
if (splitscreen < 1 && !botingame)
@@ -1758,7 +1750,7 @@ static void SendNameAndColor2(void)
static void SendNameAndColor3(void)
{
INT32 thirdplaya = -1;
XBOXSTATIC char buf[MAXPLAYERNAME+2];
char buf[MAXPLAYERNAME+2];
char *p;
if (splitscreen < 2)
@@ -1878,7 +1870,7 @@ static void SendNameAndColor3(void)
static void SendNameAndColor4(void)
{
INT32 fourthplaya = -1;
XBOXSTATIC char buf[MAXPLAYERNAME+2];
char buf[MAXPLAYERNAME+2];
char *p;
if (splitscreen < 3)
@@ -2066,7 +2058,7 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
if (kick)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
buf[0] = (UINT8)playernum;
@@ -2102,7 +2094,7 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
void SendWeaponPref(void)
{
XBOXSTATIC UINT8 buf[1];
UINT8 buf[1];
buf[0] = 0;
if (cv_flipcam.value)
@@ -2114,7 +2106,7 @@ void SendWeaponPref(void)
void SendWeaponPref2(void)
{
XBOXSTATIC UINT8 buf[1];
UINT8 buf[1];
buf[0] = 0;
if (cv_flipcam2.value)
@@ -2126,7 +2118,7 @@ void SendWeaponPref2(void)
void SendWeaponPref3(void)
{
XBOXSTATIC UINT8 buf[1];
UINT8 buf[1];
buf[0] = 0;
if (cv_flipcam3.value)
@@ -2138,7 +2130,7 @@ void SendWeaponPref3(void)
void SendWeaponPref4(void)
{
XBOXSTATIC UINT8 buf[1];
UINT8 buf[1];
buf[0] = 0;
if (cv_flipcam4.value)
@@ -2933,7 +2925,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal map change received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3016,7 +3008,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
static void Command_Pause(void)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
UINT8 *cp = buf;
if (COM_Argc() > 1)
@@ -3058,7 +3050,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal pause command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3090,7 +3082,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
if (paused)
{
if (!menuactive || netgame)
if ((!menuactive || netgame) && (!cv_pausemusic.value))
S_PauseAudio();
}
else
@@ -3121,7 +3113,7 @@ static void Command_ReplayMarker(void)
// Command for stuck characters in netgames, griefing, etc.
static void Command_Respawn(void)
{
XBOXSTATIC UINT8 buf[4];
UINT8 buf[4];
UINT8 *cp = buf;
WRITEINT32(cp, consoleplayer);
@@ -3171,7 +3163,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3245,7 +3237,7 @@ static void Got_Clearscores(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal clear scores command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3768,7 +3760,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3783,7 +3775,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3821,7 +3813,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -3874,7 +3866,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
if (server && ((NetPacket.packet.newteam < 0 || NetPacket.packet.newteam > 3) || error))
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4055,7 +4047,7 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
(void)salt;
memset(dest, 0, 16);
#else
XBOXSTATIC char tmpbuf[256];
char tmpbuf[256];
const size_t sl = strlen(salt);
if (len > 256-sl)
@@ -4113,7 +4105,7 @@ static void Command_Login_f(void)
// If we have no MD5 support then completely disable XD_LOGIN responses for security.
CONS_Alert(CONS_NOTICE, "Remote administration commands are not supported in this build.\n");
#else
XBOXSTATIC UINT8 finalmd5[MD5_LEN];
UINT8 finalmd5[MD5_LEN];
const char *pw;
if (!netgame)
@@ -4220,7 +4212,7 @@ void RemoveAdminPlayer(INT32 playernum)
static void Command_Verify_f(void)
{
XBOXSTATIC char buf[8]; // Should be plenty
char buf[8]; // Should be plenty
char *temp;
INT32 playernum;
@@ -4263,7 +4255,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal verification received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4282,7 +4274,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
static void Command_RemoveAdmin_f(void)
{
XBOXSTATIC char buf[8]; // Should be plenty
char buf[8]; // Should be plenty
char *temp;
INT32 playernum;
@@ -4319,7 +4311,7 @@ static void Got_Removal(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4399,7 +4391,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal motd change received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4420,7 +4412,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
static void Command_RunSOC(void)
{
const char *fn;
XBOXSTATIC char buf[255];
char buf[255];
size_t length = 0;
if (COM_Argc() != 2)
@@ -4462,7 +4454,7 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal runsoc command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4530,7 +4522,7 @@ static void Command_Addfilelocal(void)
static void Command_Addfile(void)
{
const char *fn, *p;
XBOXSTATIC char buf[256];
char buf[256];
char *buf_p = buf;
INT32 i;
int musiconly; // W_VerifyNMUSlumps isn't boolean
@@ -4564,7 +4556,7 @@ static void Command_Addfile(void)
// Add file on your client directly if it is trivial, or you aren't in a netgame.
if (!(netgame || multiplayer) || musiconly)
{
P_AddWadFile(fn);
P_AddWadFile(fn, false);
return;
}
@@ -4613,6 +4605,156 @@ static void Command_Addfile(void)
SendNetXCmd(XD_ADDFILE, buf, buf_p - buf);
}
// i hate myself
static boolean DumbStartsWith(const char *pre, const char *str)
{
size_t lenpre = strlen(pre),
lenstr = strlen(str);
return lenstr < lenpre ? false : memcmp(pre, str, lenpre) == 0;
}
/** Adds something at runtime.
*/
static void
Command_Addskins (void)
{
if (COM_Argc() > 3)
{
CONS_Printf(
"addskins <file>: Load a skin file.\n");
return;
}
// no forcing?
/*
if (fasticmp(COM_Argv(2), "-force") || fasticmp(COM_Argv(2), "-f")) {
CONS_Alert(CONS_NOTICE, M_GetText("Adding file %s. May or may not be a skin.\n"), COM_Argv(1));
P_AddWadFile(COM_Argv(1), 0, true);
} else {
if (DumbStartsWith("KC_", COM_Argv(1))) {
P_AddWadFile(COM_Argv(1), 0, true);
} else if (DumbStartsWith("KCL_", COM_Argv(1))) {
if (!demo.playback) {
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is a skin with lua. Include -force or -f to force it to load.\n"), COM_Argv(1));
return;
} else {
*/
P_AddWadFile(COM_Argv(1), true);
/*
}
} else {
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is not a skin.\n"), COM_Argv(1));
return;
}
}
*/
}
// args n stuff
#include "args.h"
static void Command_GLocalSkin (void)
{
size_t first_option;
size_t option_display;
size_t option_all;
size_t option_player;
option_player = COM_CheckPartialParm("-p");
option_display = COM_CheckPartialParm("-d");
option_all = COM_CheckPartialParm("-a");
char* fuck; // local skin name
if (!( first_option = COM_FirstOption() ))
first_option = COM_Argc();
if (first_option < 2)
{
/* holy fucking shit */
CONS_Printf("localskin <name> [-player <name>] [-display <number>] [-all]:\n");
CONS_Printf(M_GetText("Set a localskin via its internal name (usually printed on the console).\n\n\
* Using \"-player\" will set a localskin to a specified player.\n\
Defaults to yourself.\n\
* Using \"-display\" will set a localskin to the displayed player.\n\
Defaults to 0, which is the first player displayed.\n\
Can go up to 3 for splitscreen.\n\
* Using \"-all\" will set a localskin to ALL players.\n\
* \"localskin none\" removes the localskin, just like how\n\
\"forceskin none\" does.\n"));
return;
}
fuck = ConcatCommandArgv(1, first_option);
char* player_name = player_names[consoleplayer];
char* display_num = "0";
size_t dnum = 0;
if (option_display) // -display
{
// handle default: 0
if (COM_Argv(option_display + 1)[0] == "" || COM_Argv(option_display + 1)[0] != "-")
display_num = COM_Argv(option_display + 1);
if (isdigit(display_num[0]) || display_num == "0")
{
dnum = atoi(display_num);
if (dnum > 3 || dnum < 0) // nuh uh
dnum = 0;
SetLocalPlayerSkin(displayplayers[dnum], fuck, NULL);
CONS_Printf("Successfully applied localskin to displayed player.\n");
return;
}
CONS_Printf("Could not apply localskin.\n");
return;
}
else if (option_all) // -all
{
int i;
for (i = 0; i < MAXPLAYERS; ++i)
{
if (!playeringame[i])
continue;
SetLocalPlayerSkin(i, fuck, NULL);
}
CONS_Printf("Successfully applied localskin to all players.\n");
return;
}
else // -player or no other arguments
{
if (option_player)
{
int i;
player_name = COM_Argv(option_player + 1);
for (i = 0; i < MAXPLAYERS; ++i)
{
if (fasticmp(player_names[i], player_name))
SetLocalPlayerSkin(i, fuck, NULL);
}
CONS_Printf("Successfully applied localskin to specified player.\n");
return;
}
else
{
SetLocalPlayerSkin(consoleplayer, fuck, &cv_localskin);
CONS_Printf("Successfully applied localskin.\n");
return;
}
CONS_Printf("Could not apply localskin.\n");
return;
}
}
#ifdef DELFILE
/** removes the last added pwad at runtime.
* Searches for sounds, maps, music and images to remove
@@ -4676,7 +4818,7 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
if ((playernum != serverplayer && !IsPlayerAdmin(playernum)) || kick)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
@@ -4725,7 +4867,7 @@ static void Got_Delfilecmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal delfile command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4758,7 +4900,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -4769,7 +4911,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
ncs = findfile(filename,md5sum,true);
if (ncs != FS_FOUND || !P_AddWadFile(filename))
if (ncs != FS_FOUND || !P_AddWadFile(filename, false))
{
Command_ExitGame_f();
if (ncs == FS_FOUND)
@@ -4832,8 +4974,6 @@ static void Command_Version_f(void)
// Base library
#if defined( HAVE_SDL)
CONS_Printf("SDL ");
#elif defined(_WINDOWS)
CONS_Printf("DD ");
#endif
// OS
@@ -4858,11 +4998,6 @@ static void Command_Version_f(void)
else // 16-bit? 128-bit?
CONS_Printf("Bits Unknown ");
// No ASM?
#ifdef NOASM
CONS_Printf("\x85" "NOASM " "\x80");
#endif
// Debug build
#ifdef _DEBUG
CONS_Printf("\x85" "DEBUG " "\x80");
@@ -5450,7 +5585,7 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal exitlevel command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -5472,7 +5607,7 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -5537,7 +5672,7 @@ static void Got_PickVotecmd(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
@@ -5925,6 +6060,25 @@ static void Command_ListSkins(void)
}
}
static void Command_SkinSearch(void)
{
size_t i;
UINT16 s;
UINT16 ic = 0;
//skin_t *skininput = &skins[s];
for (i = 1; i < COM_Argc(); i++){
for( s = 0 ; s < numallskins ; s++ )
{
skin_t *skininput = &skins[s];
if (strcasestr(skininput->realname,COM_Argv(i)))
{
ic++;
CONS_Printf("%d. %s%s:\x80 %s\n", ic,HU_SkinColorToConsoleColor(skininput->prefcolor),skininput->realname,skininput->name);
}
}
}
CONS_Printf("Total %d skins.\n", ic);
}
/** Sends a color change for the console player, unless that player is moving.
* \sa cv_playercolor, Color2_OnChange, Skin_OnChange
@@ -6162,7 +6316,7 @@ void Got_DiscordInfo(UINT8 **p, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal Discord info command received from %s\n"), player_names[playernum]);
if (server)
{
XBOXSTATIC UINT8 buf[2];
UINT8 buf[2];
buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL;
+13 -2
View File
@@ -21,6 +21,7 @@
extern consvar_t cv_playername;
extern consvar_t cv_playercolor;
extern consvar_t cv_skin;
extern consvar_t cv_localskin;
// secondary splitscreen player
extern consvar_t cv_playername2;
extern consvar_t cv_playercolor2;
@@ -40,6 +41,8 @@ extern consvar_t cv_splitplayers;
extern consvar_t cv_seenames, cv_allowseenames;
#endif
extern consvar_t cv_usemouse;
//WTF
extern consvar_t cv_mouseturn;
extern consvar_t cv_usejoystick;
extern consvar_t cv_usejoystick2;
extern consvar_t cv_usejoystick3;
@@ -56,7 +59,7 @@ extern consvar_t cv_joyscale4;
// splitscreen with second mouse
extern consvar_t cv_mouse2port;
extern consvar_t cv_usemouse2;
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
extern consvar_t cv_mouse2opt;
#endif
@@ -110,6 +113,9 @@ extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink;
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana;
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
//Lastserver
extern consvar_t cv_lastserver;
extern consvar_t cv_kartminimap;
extern consvar_t cv_kartcheck;
extern consvar_t cv_kartinvinsfx;
@@ -149,6 +155,7 @@ extern consvar_t cv_maxping;
extern consvar_t cv_pingtimeout;
extern consvar_t cv_showping;
extern consvar_t cv_pingmeasurement;
extern consvar_t cv_pingicon;
//extern consvar_t cv_smallpos;
extern consvar_t cv_showminimapnames;
@@ -157,6 +164,9 @@ extern consvar_t cv_minihead;
extern consvar_t cv_showlapemblem;
extern consvar_t cv_showviewpointtext;
extern consvar_t cv_luaimmersion;
extern consvar_t cv_fakelocalskin;
extern consvar_t cv_showlocalskinmenus;
extern consvar_t cv_skipmapcheck;
@@ -176,7 +186,8 @@ typedef enum
{
SKINMENUTYPE_SCROLL = 0,
SKINMENUTYPE_2D, // 1
SKINMENUTYPE_GRID // 2
SKINMENUTYPE_GRID, // 2
SKINMENUTYPE_EXTENDED // 3
} skinmenutype_t;
typedef enum
+33 -22
View File
@@ -11,21 +11,17 @@
/// \brief Transfer a file using HSendPacket.
#include <stdio.h>
#ifndef _WIN32_WCE
#ifdef __OS2__
#include <sys/types.h>
#endif // __OS2__
#include <sys/stat.h>
#endif
#if !defined (UNDER_CE)
#include <time.h>
#endif
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)) && !defined (_XBOX)
#ifdef _WIN32
#include <io.h>
#include <direct.h>
#elif !defined (_WIN32_WCE) && !(defined (_XBOX) && !defined (__GNUC__))
#else
#include <sys/types.h>
#include <dirent.h>
#include <utime.h>
@@ -34,13 +30,9 @@
#ifdef __GNUC__
#include <unistd.h>
#include <limits.h>
#elif defined (_WIN32) && !defined (_WIN32_WCE)
#elif defined (_WIN32)
#include <sys/utime.h>
#endif
#ifdef __DJGPP__
#include <dir.h>
#include <utime.h>
#endif
#ifdef HAVE_CURL
#include "curl/curl.h"
@@ -72,8 +64,13 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid);
#ifdef HAVE_CURL
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream);
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 35, 0)
int curlprogress_callbackx(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow);
#define XFERINFOFUNCTION
#else
int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
#endif
#endif
// Sender structure
typedef struct filetx_s
@@ -489,7 +486,6 @@ INT32 CL_CheckFiles(void)
{
INT32 i, j;
char wadfilename[MAX_WADPATH];
size_t packetsize = 0;
size_t filestoload = 0;
boolean downloadrequired = false;
@@ -513,7 +509,7 @@ INT32 CL_CheckFiles(void)
for (i = 0, j = mainwads+1; i < fileneedednum || j < numwadfiles;)
{
if (j < numwadfiles && !wadfiles[j]->important)
if (j < numwadfiles && (!wadfiles[j]->important || wadfiles[j]->localfile))
{
// Unimportant on our side. still don't care.
++j;
@@ -562,7 +558,7 @@ INT32 CL_CheckFiles(void)
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
// Check in already loaded files
for (j = mainwads+1; wadfiles[j]; j++)
for (j = mainwads+1; j < numwadfiles; j++)
{
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
if (!stricmp(wadfilename, fileneeded[i].filename) &&
@@ -574,8 +570,6 @@ INT32 CL_CheckFiles(void)
}
}
packetsize += nameonlylength(fileneeded[i].filename) + 22;
fileneeded[i].status = findfile(fileneeded[i].filename, fileneeded[i].md5sum, true);
CONS_Debug(DBG_NETPLAY, "found %d\n", fileneeded[i].status);
return 4;
@@ -1142,7 +1136,7 @@ size_t nameonlylength(const char *s)
filestatus_t checkfilemd5(char *filename, const UINT8 *wantedmd5sum)
{
#if defined (NOMD5) || defined (_arch_dreamcast)
#if defined (NOMD5)
(void)wantedmd5sum;
(void)filename;
#else
@@ -1194,11 +1188,7 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
// if not found at all, just move on without doing anything
// finally check "." directory
#ifdef _arch_dreamcast
homecheck = filesearch(filename, "/cd", wantedmd5sum, completepath, 10);
#else
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
#endif
if (homecheck != FS_NOTFOUND) // if not found this time, fall back on the below return statement
return homecheck; // otherwise return the result we got
@@ -1214,6 +1204,18 @@ size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
return written;
}
#ifdef XFERINFOFUNCTION
int curlprogress_callbackx(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{
(void)clientp;
(void)ultotal;
(void)ulnow; // Function prototype requires these but we won't use, so just discard
curl_dlnow = dlnow;
curl_dltotal = dltotal;
getbytes = curl_dlnow / (time(NULL) - curl_starttime); // To-do: Make this more accurate???
return 0;
}
#else
int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
{
(void)clientp;
@@ -1224,6 +1226,7 @@ int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ul
getbytes = curl_dlnow / (time(NULL) - curl_starttime); // To-do: Make this more accurate???
return 0;
}
#endif
void CURLPrepareFile(const char* url, int dfilenum)
{
@@ -1253,7 +1256,11 @@ void CURLPrepareFile(const char* url, int dfilenum)
curl_easy_setopt(http_handle, CURLOPT_URL, va("%s/%s", url, curl_realname));
// Only allow HTTP and HTTPS
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0)
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS_STR, "http,https");
#else
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
#endif
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
@@ -1277,7 +1284,11 @@ void CURLPrepareFile(const char* url, int dfilenum)
curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, curl_curfile->file);
curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, curlwrite_data);
curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0L);
#ifdef XFERINFOFUNCTION
curl_easy_setopt(http_handle, CURLOPT_XFERINFOFUNCTION, curlprogress_callbackx);
#else
curl_easy_setopt(http_handle, CURLOPT_PROGRESSFUNCTION, curlprogress_callback);
#endif
curl_curfile->status = FS_DOWNLOADING;
lastfilenum = dfilenum;
@@ -1331,7 +1342,7 @@ void CURLGetFile(void)
if (easyres == CURLE_HTTP_RETURNED_ERROR)
curl_easy_getinfo(e, CURLINFO_RESPONSE_CODE, &response_code);
easy_handle_error = (response_code) ? va("HTTP reponse code %ld", response_code) : curl_easy_strerror(easyres);
easy_handle_error = (response_code) ? va("HTTP response code %ld", response_code) : curl_easy_strerror(easyres);
curl_curfile->status = FS_FALLBACK;
curl_curfile->currentsize = curl_origfilesize;
curl_curfile->totalsize = curl_origtotalfilesize;
+3
View File
@@ -371,6 +371,7 @@ typedef struct player_s
angle_t viewrollangle;
angle_t tilt;
angle_t tilt_sprite;
// Mouse aiming, where the guy is looking at!
// It is updated with cmd->aiming.
@@ -415,6 +416,8 @@ typedef struct player_s
UINT8 skincolor;
INT32 skin;
INT32 localskin; // current localskin number
boolean skinlocal; // determines if localskin is a skin already loaded in the server
UINT32 score; // player score
fixed_t dashspeed; // dashing speed
+4 -11
View File
@@ -43,12 +43,6 @@
#include "r_draw.h" // translation colormap consts (for lua)
#endif
#ifdef PC_DOS
#include <stdio.h> // for snprintf
//int snprintf(char *str, size_t n, const char *fmt, ...);
int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
#endif
// Free slot names
// The crazy word-reading stuff uses these.
static char *FREE_STATES[NUMSTATEFREESLOTS];
@@ -1888,7 +1882,7 @@ static void readframe(MYFILE *f, INT32 num)
{
size_t z;
boolean found = false;
XBOXSTATIC char actiontocompare[32];
char actiontocompare[32];
memset(actiontocompare, 0x00, sizeof(actiontocompare));
strlcpy(actiontocompare, word2, sizeof (actiontocompare));
@@ -3159,9 +3153,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
char *word2;
INT32 i;
// do a copy of this for cross references probleme
//XBOXSTATIC actionf_t saveactions[NUMSTATES];
//XBOXSTATIC const char *savesprnames[NUMSPRITES];
XBOXSTATIC const char *savesfxnames[NUMSFX];
const char *savesfxnames[NUMSFX];
if (!deh_loaded)
initfreeslots();
@@ -3181,7 +3173,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
dbg_line = -1; // start at -1 so the first line is 0.
while (!myfeof(f))
{
XBOXSTATIC char origpos[128];
char origpos[128];
INT32 size = 0;
char *traverse;
@@ -8285,6 +8277,7 @@ struct {
// Frame settings
{"FF_FRAMEMASK",FF_FRAMEMASK},
{"FF_HORIZONTALFLIP",FF_HORIZONTALFLIP},
{"FF_PAPERSPRITE",FF_PAPERSPRITE},
{"FF_ANIMATE",FF_ANIMATE},
{"FF_FULLBRIGHT",FF_FULLBRIGHT},
+43 -2
View File
@@ -37,7 +37,9 @@
// length of IP strings
#define IP_SIZE 21
consvar_t cv_discordrp = {"discordrp", "On", CV_SAVE|CV_CALL, CV_OnOff, DRPC_UpdatePresence, 0, NULL, NULL, 0, 0, NULL};
static void Discordrp_OnChange(void);
consvar_t cv_discordrp = {"discordrp", "On", CV_SAVE|CV_CALL, CV_OnOff, Discordrp_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_discordstreamer = {"discordstreamer", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_discordasks = {"discordasks", "Yes", CV_SAVE|CV_CALL, CV_YesNo, DRPC_UpdatePresence, 0, NULL, NULL, 0, 0, NULL};
@@ -47,6 +49,8 @@ discordRequest_t *discordRequestList = NULL;
static char self_ip[IP_SIZE];
boolean drpc_init = false;
/*--------------------------------------------------
static char *DRPC_XORIPString(const char *input)
@@ -315,6 +319,9 @@ void DRPC_RemoveRequest(discordRequest_t *removeRequest)
--------------------------------------------------*/
void DRPC_Init(void)
{
if (drpc_init || !cv_discordrp.value) return;
drpc_init = true;
DiscordEventHandlers handlers;
memset(&handlers, 0, sizeof(handlers));
@@ -325,10 +332,36 @@ void DRPC_Init(void)
handlers.joinRequest = DRPC_HandleJoinRequest;
Discord_Initialize(DISCORD_APPID, &handlers, 1, NULL);
I_AddExitFunc(Discord_Shutdown);
I_AddExitFunc(DRPC_Shutdown);
DRPC_UpdatePresence();
}
void DRPC_Shutdown(void)
{
if (!drpc_init)
{
CONS_Printf("DiscordRPC never started\n");
return;
}
CONS_Printf("Shutting down DiscordRPC\n");
Discord_Shutdown();
drpc_init = false;
}
static void Discordrp_OnChange(void)
{
if (cv_discordrp.value)
{
DRPC_UpdatePresence();
}
else
{
DRPC_Shutdown();
}
}
/*--------------------------------------------------
static void DRPC_GotServerIP(UINT32 address)
@@ -402,6 +435,10 @@ static void DRPC_EmptyRequests(void)
--------------------------------------------------*/
void DRPC_UpdatePresence(void)
{
if (!cv_discordrp.value) return;
if (!drpc_init) DRPC_Init();
char detailstr[48+1];
char mapimg[8+1];
@@ -443,14 +480,18 @@ void DRPC_UpdatePresence(void)
// Server info
if (netgame)
{
#ifdef MASTERSERVER
if (cv_advertise.value)
{
discordPresence.state = "Public";
}
else
{
#endif
discordPresence.state = "Private";
#ifdef MASTERSERVER
}
#endif
discordPresence.partyId = server_context; // Thanks, whoever gave us Mumble support, for implementing the EXACT thing Discord wanted for this field!
discordPresence.partySize = D_NumPlayers(); // Players in server
+7
View File
@@ -64,6 +64,13 @@ void DRPC_RemoveRequest(discordRequest_t *removeRequest);
void DRPC_Init(void);
/*--------------------------------------------------
void DRPC_Shutdown(void);
Shutdown Discord Rich Presence if it was started at all.
--------------------------------------------------*/
void DRPC_Shutdown(void);
/*--------------------------------------------------
void DRPC_UpdatePresence(void);
-48
View File
@@ -1,48 +0,0 @@
#
# djgppdos/makefile.cfg for SRB2/DOS
#
#
#now for the DOS stuff, go DOS!
#
# options
OPTS=-DPC_DOS
WFLAGS+=-Wno-cast-qual
NOHW=1
NOHS=1
PNG_CFLAGS=
PNG_LDFLAGS=-lpng -lz
ifdef WATTCP
OPTS+=-DWATTCP
NOOBJDUMP=1
endif
#ifdef DEBUGMODE
LIBS=-lalld
#else
# LIBS=-lalleg
#endif
ifndef NONET
ifdef WATTCP
LIBS+=-lwatt
else
LIBS+=-lsocket
endif
endif
ifdef RDB
LIBS+=-lgdbst -ldzcom
OPTS+=-DREMOTE_DEBUGGING
endif
OBJS=$(OBJDIR)/i_video.o $(OBJDIR)/vid_vesa.o
# name of the exefile
ifdef WATTCP
EXENAME?=srb2dos.exe
else
EXENAME?=srb2w16.exe
endif
Loaded 100 of 363 files, more files were not shown because too many files have changed in this diff. Show more