Compare commits

..
2006 Commits
Author SHA1 Message Date
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
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
Alug b6be5bc6b4 bruh 2023-08-30 14:57:58 +02:00
Alug fca542cd4e Update README.md
v2 hope i didnt forgor smth again
2023-08-30 14:47:41 +02:00
alufolie91 e3d61b2974 v2 moment 2023-08-30 14:22:56 +02:00
alufolie91 9cb84d214e change default to off 2023-08-30 14:21:17 +02:00
indev 6a0069f08f Merge pull request #48 from Indev450/lua-feature-votehud
Add vote hud hook for lua
2023-08-30 14:51:29 +03:00
indev 4a32bb7f9f Merge pull request #47 from Indev450/fix-udatalib-warnings
Fix few warnings regarding udatalib
2023-08-30 14:45:02 +03:00
indev 3404ca63bc Merge pull request #46 from Indev450/bring-few-mobj-fields-back
Bring sprite scale and rotation mobj fields back.
2023-08-30 14:43:26 +03:00
Alug 238688047e Merge pull request #45 from Indev450/fix-cv-grrenderdistance
Fix cv_grrenderdistance not changing current_bsp_culling_distance bac…
2023-08-30 13:20:37 +02:00
indev c0e24c1119 Fix cv_grrenderdistance not changing current_bsp_culling_distance back after it was changed from max to any other value 2023-08-30 14:09:28 +03:00
alufolie91 cc2bab7736 rename some things
for obvious reasons :p
2023-08-30 12:41:22 +02:00
indev c6d0627f08 Actually fix memfree for gpu textures 2023-08-29 13:17:09 +03:00
indev 6c22b1e01a Fix 'All GPU textures' showing incorrect value in memfree command 2023-08-29 13:07:15 +03:00
alufolie91 144bddea78 Show which renderer youre using on main menu
cause some ppl dont know how to check
and we cant switch the game
2023-08-29 11:42:51 +02:00
indev 050ae2ab6d Add vote hud hook for lua. Use FEATURE_VOTEHUD global to check if this feature is available 2023-08-29 12:09:46 +03:00
alufolie91 f6da608402 Menu stuff
add missing things
rearrange saturn menu
make saturn menu and player distortion menu prettier finally
2023-08-29 10:44:00 +02:00
alufolie91 76685068fe Add Toggle to satlyhop squish effect
just for those who may dislike it
2023-08-29 10:43:16 +02:00
indev d5f1b744bb Fix few warnings regarding udatalib. Use size_t and uint8_t* instead of intptr_t since all offsets are >= 0 anyway 2023-08-29 11:18:08 +03:00
alufolie91 bd221ef0b4 Stop game from using broken draw function
"that sigsegvs at random on some maps for seeming no reason."
actually this fixed some crashes for someone who tested it
See: https://git.do.srb2.org/Galactice/Kart-Public/-/commit/095e1ac621cb0810af7a4efbe7f3fb6e242df5ab
2023-08-29 10:09:26 +02:00
alufolie91 dc42c5b8b5 Change default renderer to Opengl
also turn off 3d models by default
2023-08-29 10:05:33 +02:00
indev c29e6911b1 Merge pull request #44 from Indev450/always-show-music-credit
Return null in S_FindMusicCredit if there are no musicdefs at all
2023-08-29 10:47:11 +03:00
indev 44a31e7561 Comment out cv_smallpos 2023-08-29 10:38:36 +03:00
indev e250e706a0 Merge pull request #43 from Indev450/snowy
Snowy
2023-08-29 10:33:57 +03:00
indev 00f09421b8 Merge branch 'Saturn' into snowy 2023-08-29 10:33:10 +03:00
indev daa747805d Return null in S_FindMusicCredit if there are no musicdefs at all (thanks NepDisk for pointing at that) 2023-08-29 10:32:35 +03:00
indev 3612a9cd02 Merge pull request #42 from Indev450/hidelapemblem
Toggable Lap Emblem Animation
2023-08-29 10:21:24 +03:00
indev 78e94b66ba Merge branch 'Saturn' into hidelapemblem 2023-08-29 10:21:11 +03:00
indev 8fe9173355 Merge pull request #41 from Indev450/squishsound
Squishsound
2023-08-29 10:15:46 +03:00
indev 1210a885d4 Merge branch 'Saturn' into squishsound 2023-08-29 10:15:36 +03:00
indev 25f02f6cd3 Merge pull request #40 from Indev450/fixprecip
Fixprecip
2023-08-29 10:14:14 +03:00
indev d69b6672be Merge pull request #38 from Indev450/dont-record-demo-if-disabled
Attempt to fix demo buffer overflow crash. Also don't record demos at…
2023-08-29 10:13:21 +03:00
indev 24ccc5eee4 Merge pull request #39 from Indev450/always-show-music-credit
Don't show music credit when music is disabled
2023-08-29 10:13:01 +03:00
indev d577944143 Don't show music credit when music is disabled 2023-08-29 10:07:26 +03:00
alufolie91 c4746962bd do the thing for software renderer too
i forgor
2023-08-29 08:18:59 +02:00
alufolie91 664e8c363b raise max precip distance a bit
basically twice as far, cant go higher or else we hit sprite limit and stuff starts disappearing
2023-08-29 07:57:35 +02:00
alufolie91 b5269ebbb5 oops 2023-08-29 07:25:55 +02:00
alufolie91 52b4f65582 Improve rain/weather.
* Better thinker with more return optimisation.
* Better placement of thinking in rendering, to avoid ceiling-mounted sprite glitches.
See: https://git.do.srb2.org/STJr/SRB2/-/commit/6371de806b932d1026904937b19e13feb10fa322
2023-08-29 07:19:31 +02:00
alufolie91 e91c90329d Fix precip interpolation
See: https://git.do.srb2.org/STJr/SRB2/-/commit/6c54af377481a42f639da2db6cefe33d02918bce
2023-08-29 06:57:52 +02:00
alufolie91 ab6f33929d don't check flippedness in HWR_RotateSpritePolyToAim
if the mobj is actually a precipmobj!

precipmobj_t does not have eflags, so P_MobjFlip checking it would actually be accessing memory addresses beyond the end of the struct

perhaps this fixes a rare crash in P_MobjFlip on maps with snow and rain

See: https://git.do.srb2.org/STJr/SRB2/-/commit/197da95a232da92e61f88ee27c754e8671a6624f
2023-08-29 06:49:10 +02:00
Alug 557187a305 Update README.md
smh these confused ppl, ill readd them when next stable build
2023-08-29 06:43:46 +02:00
alufolie91 47f194b82e fix the wanted recticle
also small fix to big players
2023-08-28 22:28:41 +02:00
indev 5da6739077 Don't play slam sound too often 2023-08-28 13:56:19 +03:00
indev 2f689c1ab7 Merge pull request #37 from Indev450/showmusiccredit-command
Add showmusiccredit command
2023-08-28 10:54:08 +03:00
indev 82d30b5abf Don't play landing sound on really small jumps 2023-08-28 10:29:44 +03:00
alufolie91 8c3b6911a3 remove unused thing
we removed the shear fucntion since it completely broke sprite rendering anyways so this stuff goes unused and is just clutter
2023-08-28 01:12:48 +02:00
Alug 294a459fc2 Update README.md
eeeehehehheh
hope i didnt forgor smth again
2023-08-28 01:02:36 +02:00
alufolie91 44c9b87557 Revert "Clean up and simplify zone memory allocation" and "Some memory allocations have been properly aligned" Fixes #35
seems like screwing with the extrabytes/alignbits specifically in the zone memory allocations corrupt something in 32bit software mode
reverting this fixes the issue but comes with a small performance hit on busy maps
2023-08-28 00:52:03 +02:00
alufolie91 911264ccb3 kill smallposition toggle for now and add minimap head size toggle instead
eeeeeeeeeeeeeeeeeeee
2023-08-27 22:33:21 +02:00
indev 9936e38f20 Merge pull request #36 from hayaunderscore/no-break-moment
Fix overlapping speedometer text
2023-08-27 20:57:09 +03:00
haya e1f402b86c i am stupid
💀
2023-08-28 01:37:55 +08:00
indev 124bfe6ca9 Merge pull request #34 from hayaunderscore/visuals-and-friends
Visuals and friends
2023-08-27 20:16:35 +03:00
haya e3b1dba13c Remove precipitation salty values
As per suggestion
2023-08-28 01:06:37 +08:00
haya 6cbd7503f9 revert freeslot limit from master
that was for tmm sorry
2023-08-28 01:03:19 +08:00
haya 1cc4c2df72 Merge branch 'Indev450:Saturn' into Saturn 2023-08-27 18:27:58 +08:00
xyzzy 5726658729 Patch in listskins for Saturn :3
* Listskins lists all loaded skins.
    * It's fun
    * Paginated display.
2023-08-27 13:22:28 +03:00
xyzzy d0a307e5b5 Make alias print a list of all defined aliases.
* Alias with no args not only prints out the help text but all
      command aliases.
    * Alias with just one argument prints all commands that begin with
      the first argument.
2023-08-27 13:22:11 +03:00
indev 9208a7233f Redo slamsound using MFE_JUSTHITFLOOR 2023-08-27 11:13:47 +03:00
haya e58c66facd Merge branch 'Indev450:Saturn' into Saturn 2023-08-27 15:25:18 +08:00
hayaunderscore 8117b528ab fix hanged yoffset upon turning off saltyhop mid start drift 2023-08-27 15:22:46 +08:00
hayaunderscore 9f4df6b80d nuh uh 2023-08-27 15:18:12 +08:00
alufolie91 355a1c2046 fix up 3dmodels
those things werent affected by setting smth in spriteoffsets
also cleans up the code alot

taken from srb2s model plus branch
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1840
2023-08-27 09:06:53 +02:00
hayaunderscore 00d383cc28 Merge branch 'Saturn' of github.com:hayaunderscore/SRB2Kart-Saturn into Saturn 2023-08-27 12:39:06 +08:00
hayaunderscore e46391992a fix precipitation 2023-08-27 12:39:00 +08:00
haya fff8b24309 Merge branch 'Indev450:Saturn' into Saturn 2023-08-27 10:28:11 +08:00
hayaunderscore 59f9705b93 Distracting sprite scaling for saltyhop
Mayo asked for this.
2023-08-27 09:57:08 +08:00
alufolie91 7be1c58ba5 ooof forgot to remove those
sprite offsets shouldnt have two states which are either interpolated and non interpolated goddamit
2023-08-27 03:47:35 +02:00
hayaunderscore da1df719e3 HARDCODED SALTYHOP
`hardcodehop on` on console :)
2023-08-27 09:12:11 +08:00
hayaunderscore b626c095d0 Gray out speedometer option 2023-08-27 08:26:57 +08:00
haya 3df993184b Merge branch 'Indev450:Saturn' into Saturn 2023-08-27 07:34:01 +08:00
alufolie91 ec9c8dba1b Revert "P_RandomFixed should return the same result"
goddamit, it seems to cause desynchs in rare cases
and here i thought it may help with desynchs
2023-08-27 00:56:35 +02:00
alufolie91 171d36158c Toggable Lap Emblem Animation
hides the animation that happens when you do a lap
toggable with "showlapemblem" and in saturn options
2023-08-27 00:45:04 +02:00
indev 22a84a5504 Bring sprite scale and rotation mobj fields back. Hopefully this wouldn't cause synch failures 2023-08-26 15:05:21 +03:00
hayaunderscore 53ead1007e forgor :skull 2023-08-26 14:38:46 +08:00
hayaunderscore e852034ca8 V2 speedometer nonsense
you can get extra.kart from me (for now). It's not the same as snowy_files.kart :V
2023-08-26 14:33:14 +08:00
alufolie91 00112bc4c8 Two small things from Snowy-Kart
- small position number (has been made toggable)
- toggable minimap playernames

from: https://github.com/JadenArcm/Snowy-Kart
2023-08-26 07:27:23 +02:00
hayaunderscore 4a74eaa6b0 mkay 2023-08-26 13:17:03 +08:00
hayaunderscore ed04181899 readd smaller position with input display 2023-08-26 10:02:28 +08:00
hayaunderscore ed86f2c227 tmm stuff 2023-08-26 09:34:49 +08:00
indev 1175247614 Move stretchonground in mobj_t at the end of struct because game assumes precipmobj and mobj have same layout in rendering code -_- 2023-08-25 21:32:26 +03:00
indev f8825c5024 Add showmusiccredit command 2023-08-25 20:48:38 +03:00
alufolie91 9a8ef2c7e0 aaaand add it to the menu 2023-08-25 19:26:02 +02:00
alufolie91 5a7626d88e add toggable sound effect when player squishes after landing
"slamsound" toggles it
2023-08-25 19:19:04 +02:00
alufolie91 6457af1cce fix even more openmpt errors at startup X) 2023-08-25 16:47:00 +02:00
alufolie91 b18b3bf17e OpenMPT bugfixes
remove those startup errors and smoler fixes
goddamn my dumbass made the musicsystem restart at gamestart
2023-08-25 16:11:21 +02:00
alufolie91 1ba44ad8c4 bruh moment 2023-08-25 15:17:33 +02:00
indev d5b28577c1 Attempt to fix demo buffer overflow crash. Also don't record demos at all when netdemo_record is set to Disabled 2023-08-25 13:59:53 +03:00
Alug 09a6bafd14 Update README.md
change this a bit
2023-08-25 04:37:51 +02:00
alufolie91 e59bdf939d almost forgor X) 2023-08-25 04:21:05 +02:00
Alug e9557ffd12 Update README.md 2023-08-24 12:22:32 +02:00
Alug d717eacef9 Update README.md 2023-08-24 11:22:51 +02:00
alufolie91 769065c317 neater menu things again
rearrainging things aggain
also forgor smth :p
2023-08-24 10:45:57 +02:00
Alug 0de8b0879b Update README.md 2023-08-23 20:18:50 +02:00
alufolie91 58b7295f8a Remove unused purge tags and readings from zone memory
oops forgot to remove them when i ported shit from srb2
also got the HWR texture info working c:
2023-08-23 09:12:53 +02:00
Alug d5abb943d6 Merge pull request #32 from Indev450/maxdemo-cvar
Make max demo size a cvar
2023-08-22 17:06:00 +02:00
Alug 36cc02e832 Update README.md 2023-08-22 06:39:12 +02:00
Alug 46dce30427 Update README.md
fiexuer sum speeling misstaeks
and rearranged and maybe reworded some things
2023-08-22 06:38:29 +02:00
alufolie91 e4f47c465d clean up the openmpt menu a bit
also rename the header lol
2023-08-22 06:23:47 +02:00
alufolie91 8ae6d0c60f Add "Stereo Seperation" option for Tracker Modules
i forget how super stereo some of those are, even to the point of being nauseating
2023-08-22 06:21:33 +02:00
alufolie91 84da9e2724 Finally add credits uwu 2023-08-21 20:08:19 +02:00
indev ffd5d14bfe Make max demo size a cvar 2023-08-21 19:45:53 +03:00
Alug ae59f69f23 Update README.md 2023-08-21 18:00:34 +02:00
Alug 1a0ddd0aa3 Update README.md 2023-08-21 17:57:48 +02:00
Alug d85b8340d0 Update README.md 2023-08-21 17:42:26 +02:00
Alug 16f112d1ea Update README.md 2023-08-21 17:35:39 +02:00
Alug b1cc0c78b0 Merge pull request #31 from Indev450/addfilelocal-not-important-wad
Force mark wad files added via 'addfilelocal' as not important
2023-08-21 17:26:41 +02:00
Alug 284f61176f Merge pull request #30 from Indev450/openmpt0.7.2
Openmpt0.7.2
2023-08-21 17:24:52 +02:00
alufolie91 8aca33ab76 bruh
fucking opengl menu appearing in software mode again
2023-08-21 17:20:21 +02:00
alufolie91 8a602eb5d0 Clean up saturn menu a bit
move stuff around and rename "Less Flicker Effect" to "Midnight Channel Flicker" since that option is only for midnight channel vignette flickering
2023-08-20 20:44:33 +02:00
alufolie91 597830c75f Make player distortion menu a bit less squashed 2023-08-20 20:03:49 +02:00
Alug d246512fe1 Merge pull request #29 from Indev450/Saturn
Move secbright to OpenGl menu & remove downloadspeed from saturn menu
2023-08-20 19:51:19 +02:00
alufolie91 f832202059 Move secbright to OpenGl menu & remove downloadspeed from saturn menu
eeeh secbright a Opengl only thing anyways
and having it in Saturn options just made the game sigsegv in Saturn menu
downloadspeed can stay at max, it barely reaches the value ever anyways aswell as why would anyone ever want to lower it
2023-08-20 19:48:28 +02:00
Alug 4cb2be3672 Merge pull request #28 from Indev450/Saturn
Fix NOHW compile
2023-08-20 19:13:14 +02:00
alufolie91 33167988bd Fix NOHW compile
kek
2023-08-20 19:02:31 +02:00
indev e8ab7e6271 Add S_RestartMusic function and call it directly when changing amiga filter types 2023-08-20 16:48:58 +03:00
indev 30e9ccf625 Force mark wad files added via 'addfilelocal' as not important so player can still (re)join servers 2023-08-20 11:29:03 +03:00
Alug a1d08b219d Update README.md
bruh
2023-08-20 01:12:40 +02:00
alufolie91 deaeb99928 We dont need changable dither stuff & remove "unfiltered" from amiga type
"unfiltered" almost acts the same as just disabling the amiga filter
dithering is nothing anyone needs to change
default value is recommended and openmpt chooses the best one with that autmatically anyways
2023-08-20 01:01:38 +02:00
alufolie91 7b346db6bc Chose dither first
psure this should be set first, doesent need to be touched anyways
2023-08-20 01:00:08 +02:00
alufolie91 abf2d2d3a3 Add "RestartMusic" command and let changing "Amiga Type" call it
else it wont apply, the music needs to be restarted for it
the command functions the same as RestartAudio just without restarting the sound system only music playback
2023-08-20 00:31:15 +02:00
alufolie91 3e365e3ab4 Somewhat changable Amiga emulation Types
need to restart music for it to apply for now
2023-08-19 18:59:24 +02:00
alufolie91 2841e37ae9 dont use the amiga type thing with libopenmpt older than 0.5.0
uuuuh hope this is the right way to do it X)
2023-08-19 17:37:34 +02:00
alufolie91 9f31d9748f oops
did the wrong thing brap
2023-08-19 15:55:31 +02:00
alufolie91 f4436f8856 Add a few "if"s, for ppl that cant compile with linopenmpt 0.5.0 or higher
also add ifdef to all openmpt on changes
2023-08-19 15:51:00 +02:00
alufolie91 0875e4f5e0 Prep stuff
no idea how to make these work uuuh
2023-08-19 05:23:35 +02:00
alufolie91 d22f08b064 Add Dithering and Amiga filter type since theyre supported now
set default values
2023-08-19 05:23:18 +02:00
alufolie91 540c9c4b1d Update libopenmpt to 0.7.2 for windows
no idea how to port the Debian packages
2023-08-19 04:52:06 +02:00
alufolie91 3af655e29d Revert "Add mingw-compiled libopenmpt DLLs"
bruh idk why even
2023-08-19 04:50:59 +02:00
alufolie91 fad617bb18 Toggable Lowercase Menu
from HEP client
https://git.do.srb2.org/haya_/Kart-Public/-/commit/12a734bf3ea25c34542a3bf7b6a577cbc55435cc
2023-08-18 17:40:08 +02:00
Alug f0b77c873f Merge pull request #27 from Indev450/no-next-map-found-shutup
Remove the 'can't find next map...' warning since they don't do anyth…
2023-08-18 16:40:58 +02:00
indev db4ada1af2 Merge pull request #26 from Indev450/speeen
Speeen
2023-08-18 17:05:58 +03:00
indev 5dc9b5a066 Merge branch 'Saturn' into speeen 2023-08-18 17:05:47 +03:00
indev 3dcb2e7854 Funny pain spin 2023-08-18 16:50:12 +03:00
indev 40cde109fd Merge pull request #25 from Indev450/DIFFZERO
Refactor hwr drawnodes
2023-08-18 16:23:55 +03:00
indev edf03a7000 Merge branch 'Saturn' into DIFFZERO 2023-08-18 16:23:43 +03:00
Alug e7face606c Merge pull request #24 from Indev450/fix-spectator-checkboolean
Fix specbomb desynching Saturn users
2023-08-16 13:14:43 +02:00
Alug 4052c85549 Merge pull request #23 from Indev450/cv-call-fix-func-case-sensetive
Field 'func' for cvars is case-insensetive again
2023-08-16 13:14:28 +02:00
indev e864f5b14a Use lua_toboolean instead of luaL_checkboolean because kart does that for player.spectator for whatever reason 2023-08-16 11:53:46 +03:00
indev 85083efa76 Field 'func' for cvars is case-insensetive again 2023-08-16 11:43:04 +03:00
indev b3317ece49 Remove the 'can't find next map...' warning since they don't do anything most of the time anyway 2023-08-16 10:17:38 +03:00
alufolie91 301a108b18 Turning off player stretch didnt save after restart
bruh why wtf tho
no idea if this is the right thing to do, but ik other things that use FRACUNIT for values do it like that too
2023-08-15 18:50:40 +02:00
Alug 2a6aad34e2 Merge pull request #22 from Indev450/secbright
Changable min Sectorbrightness with Shaders
2023-08-15 17:20:48 +02:00
alufolie91 31fa7c4af0 We dont need those 2023-08-15 16:55:30 +02:00
Alug 8b780b6b6e Update README.md
smh
2023-08-15 06:59:18 +02:00
Alug 50e6f5ad98 Update README.md
AAAAAAA
2023-08-15 06:56:25 +02:00
alufolie91 283d1b74f4 eh cubic better
im dumbass
2023-08-15 06:54:08 +02:00
alufolie91 fb41c17663 Change some defaults
Turn off all the music stuff from Galaxy/Bird
Turn off Player Stretching by default
Enable Amiga resampler and disable Tracker module filters (as recommended by OpenMPT)
Set addon download speed to max
2023-08-15 06:50:47 +02:00
alufolie91 1a88bb6e20 We dont need those things for dropshadows 2023-08-15 06:21:08 +02:00
alufolie91 6b7aa3d757 match out code oops 2023-08-15 06:08:59 +02:00
alufolie91 8c2f85c9e6 Player afterimages are now affected by scaling/slope rolling too
Ghost Mobjs are now affected by Sloperolling too
and the Sprite scaling/stretching functions also now work with it
they look cooler now
2023-08-15 05:54:00 +02:00
alufolie91 660b66c980 fix splitscreen slope rolling.
bruh how did i forget this lmao
2023-08-15 05:18:52 +02:00
alufolie91 78a182a8a1 oopsie 2023-08-15 05:14:18 +02:00
alufolie91 a6ca3e7000 Refactor hwr drawnodes
This seems to fix the rare "diff is zero" crash on certain maps with visportals in ogl

og: Use single dynamic array instead of three for storing drawnodes
Remove now unnecessary drawcount variable
2023-08-14 17:37:15 +02:00
alufolie91 d954a7f54f Rename HAVE_STRLCPY to SRB2_HAVE_STRLCPY, fix non-glibc compile
- Fix compile with msvcrt
- Fix compile with SDL 2.28.2
see:https://git.do.srb2.org/KartKrew/Kart-Public/-/commit/0b55e8df7bca2510275be4c7ad1123625e867fff
2023-08-14 15:50:22 +02:00
alufolie91 3906030c2f Cool that kart stripped those down to make them even more confusing 2023-08-14 15:47:36 +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
alufolie91 f85bd9f5ea Make min Sector brightness with shaders changable
finally can see shit in the dark with shaders, or not :p
its also added to the options aswell
kinda hope this is the right way to do this, but it works so lul
2023-08-14 03:37:02 +02:00
alufolie91 0e6a09be2b Don't discard zero alpha fog block fragments.
see: https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/commit/80172ee93214969cf446ceac5d66e1fb5f56b068
2023-08-14 03:35:25 +02:00
alufolie91 c1e24cd97f Add skin select spin to menu
also set max value to 10 and rename some stuff
noone needs a speed of 9999999 lmao
2023-08-14 01:33:41 +02:00
alufolie91 d1bdd7e9dc Add spinning character preview in character select screen 2023-08-14 01:23:44 +02:00
alufolie91 7931fa92ba Add patch rotation to SDL files 2023-08-14 00:42:59 +02:00
alufolie91 65ad7b0eeb eeeh idk this should in theory fix 64bit windows rpt logging
but brap windows sucks
2023-08-13 22:59:28 +02:00
alufolie91 3a859bfeef yeee dont need to upload exe´s and stuff to git 2023-08-13 22:55:46 +02:00
alufolie91 a5ee25b238 Dont need that here 2023-08-13 22:54:21 +02:00
Alug 14205f5627 Merge pull request #19 from Indev450/fix-map-cmd-spam-crash
Small hack to prevent map command spam crashing the game
2023-08-13 14:40:36 +02:00
Alug c90745120f Merge pull request #20 from Indev450/tilting-off-by-default
Disable camera tilting by default and remove birdmod warning
2023-08-13 14:38:39 +02:00
Alug 8804819dc9 Merge pull request #21 from Indev450/delete-debug-print-udatalib
Remove debug print from lua_udatalib.c
2023-08-13 14:38:26 +02:00
indev 7a96ed7aa3 Remove debug print from lua_udatalib.c 2023-08-13 12:14:13 +03:00
indev 5feceffb2d Disable camera tilting by default and remove birdmod warning 2023-08-13 12:02:12 +03:00
indev 509e66b6b3 Small hack to prevent map command spam crashing the game 2023-08-13 11:44:35 +03:00
alufolie91 179d2ab764 Cleaned up and translated some comments
brap
2023-08-12 18:21:15 +02:00
alufolie91 c438f14599 v7.1 cause why not 2023-08-12 17:13:04 +02:00
indev e20b87780b Merge pull request #18 from Indev450/fix-opengl-menu-in-software
OpenGL options should be hidden in software mode again now
2023-08-12 18:00:14 +03:00
Alug 0cad0f8828 Update README.md
ee hope i didnt forget anything
2023-08-12 16:59:31 +02:00
indev cc248d7c44 Remove op_video_gravstretch from video options enum since it isn't here anymore. OpenGL options should be hidden in software mode again now 2023-08-12 17:51:01 +03:00
indev 172c49a968 Merge pull request #17 from Indev450/always-show-music-credit
Always show music credit
2023-08-12 17:29:43 +03:00
indev da3bfa2740 Merge pull request #16 from Indev450/OpenMPT
Open mpt
2023-08-12 17:28:53 +03:00
indev e6fe945945 Merge pull request #15 from Indev450/fix-invisible-sprites
Fix sprites being invisible on mid-race join
2023-08-12 17:21:00 +03:00
alufolie91 7c3ae35c66 Don't clip if the 3D floor is fog
see: https://git.do.srb2.org/STJr/SRB2/-/commit/47b8c0648b2b87fdf7ec388e1f0c3b48239c8cff?merge_request_iid=1284
2023-08-12 02:10:30 +02:00
alufolie91 760a078450 Fix 3D floor culling with polyobject segs
see: https://git.do.srb2.org/STJr/SRB2/-/commit/0ffb241c0a1705273c0c93790b67d2ce3474ad0e?merge_request_iid=1284
2023-08-12 02:09:32 +02:00
Alug 153260eefd why is this here lmao 2023-08-10 12:28:11 +02:00
alufolie91 ad10797559 Add toggable Amiga resampler for supported Amiga modules
for that epic Amiga sound
2023-08-09 22:11:18 +02:00
alufolie91 db85329307 absolute bruh moment 2023-08-09 19:49:04 +02:00
Alug 699b79c9a2 wtf??? 2023-08-09 19:14:31 +02:00
alufolie91 fc6abe8a8c smh 2023-08-09 19:02:52 +02:00
alufolie91 6a18e37dcb So much shit at this point idk
Alot of bugfixes, compile fixes no idea since im messy asf
2023-08-09 18:31:13 +02:00
alufolie91 84445e4673 Makefile, CMake and other build fixes for OpentMPT 2023-08-09 17:34:13 +02:00
alufolie91 7ad28e484e im a dumbass 2023-08-09 16:59:44 +02:00
alufolie91 a3af1888dd MUS_MODPLUG fix
see: https://git.do.srb2.org/STJr/SRB2/-/commit/87c015e34042bd0083e46e1b2364ead81d11e4a1?merge_request_iid=494
2023-08-09 16:52:31 +02:00
alufolie91 aefa3eef1a MP Libopenmpt: Fix UINT32->double cast
see: https://git.do.srb2.org/STJr/SRB2/-/commit/b38f6f6125dc0aa8f6e7179ff02fbaa98b528909?merge_request_iid=494
2023-08-09 16:46:34 +02:00
alufolie91 5bbbb9eca1 Move cv_modfilter from mixer_sound.c to s_sound.c for other targets
see: https://git.do.srb2.org/STJr/SRB2/-/commit/b48b5a29a4b97464eee135c3fa7bc465dfdfa809?merge_request_iid=494
2023-08-09 16:43:48 +02:00
alufolie91 7915a2450e Add inital support for libopenmpt
this should replace the dreadful GME for tracker music
see: https://git.do.srb2.org/STJr/SRB2/-/commit/4d89beb1053b86757e411d4a6934c36696b8e811?merge_request_iid=494
2023-08-09 16:40:09 +02:00
alufolie91 c140459f3c Check if GME_VERSION is defined.
see: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1372
2023-08-09 16:10:29 +02:00
alufolie91 2b8bca307c Fix SPC looping on libgme versions >= 0.6.3
See: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1302
2023-08-09 16:09:34 +02:00
indev 0cc1d04deb Merge pull request #14 from Indev450/change-chat-fadeout-time-limits
Change chat fadeout time minimum value to 1 second
2023-08-09 14:44:12 +03:00
indev 473c22ba50 Merge pull request #13 from Indev450/fix-ban-txt-crash
Fix ban.txt crash
2023-08-09 14:40:36 +03:00
indev 17d64e1f29 Add small hack so encore music doesn't get shown twice 2023-08-09 14:20:01 +03:00
indev 2915772231 Change chat fadeout time minimum value to 1 second 2023-08-08 12:41:32 +03:00
indev efb03e70ad Fix linedef 413 showing wrong music credit sometimes 2023-08-06 13:50:05 +03:00
indev 3dacb7d682 Fix sprites being invisible on mid-race join 2023-08-05 18:09:11 +03:00
alufolie91 63f0d15fbf Lets make it v7
so much shit was added since initial v6 so lets just go straight to v7 c:
2023-08-05 13:52:41 +02:00
indev f9880e8413 Fix ban.txt crashing game 2023-08-05 14:50:12 +03:00
indev f67684b31a Fix ban.txt crash 2023-08-05 14:41:52 +03:00
indev dfcc959adb Always show music credit with linedef action 413, regardless of fade 2023-08-05 13:12:13 +03:00
indev 94aabd7f62 Merge pull request #9 from Indev450/configure-chat-log-size
Configure chat log size
2023-08-05 10:59:45 +03:00
indev ac0eae29ca Merge pull request #10 from Indev450/lua-feature-intermissionhud
Add intermission hud hook
2023-08-05 10:59:34 +03:00
indev 16134dcf47 Merge pull request #11 from Indev450/MSAA
Msaa
2023-08-05 10:59:23 +03:00
indev 7ed71eaba8 Merge pull request #12 from Indev450/zzoneshit
"Clean up and simplify zone memory allocation"
2023-08-05 10:59:04 +03:00
alufolie91 84f53b9b69 no idea how tf i git works smh
from Kart-Public/master "Fix glibc 2.38 compile"
glibc 2.38 added strlcpy and strlcat.
https://git.do.srb2.org/KartKrew/Kart-Public/-/commit/c499a8387e1daf9519d443251444beafbdeacea2

smth smth apple ass
2023-08-04 23:43:13 +02:00
James R c499a8387e Fix glibc 2.38 compile
glibc 2.38 added strlcpy and strlcat.
2023-08-03 16:45:34 -07:00
indev cf9ac98ffd Use realloc because reallocarray doesn't exist for some versions of C ;-; 2023-08-03 11:17:04 +03:00
xyzzy a9c1e50cf8 Add missing files to .gitignore 2023-08-02 15:32:18 +03:00
indev e5017a6436 Add intermission hud hook 2023-08-02 14:33:19 +03:00
indev 746a2d4b05 Make amount of messages saved in log configurable via cvar 2023-08-02 12:52:56 +03:00
indev 826549be4c Make MSAA and A2C configurable in renderer.txt 2023-08-01 13:31:50 +03:00
alufolie91 4a881682df "Clean up and simplify zone memory allocation"
more like, port zone memory stuff from srb2, idk may fix some stutter issues and give better performance in some cases
still, see: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2059
2023-08-01 11:11:58 +02:00
alufolie91 3bcbee7f73 MSAA support, Alpha to coverage support
Port from Birdhouse
- msaa is enabled with command line parameter -msaa <number of samples>
- alpha to coverage is enabled with parameter -a2c
- note: a2c has issues with transparent surfaces becoming less opaque

Need to find a way to make it toggable from cvar/menu somehow

See: https://git.do.srb2.org/bird/Kart-Public/-/commit/6de9344875ff5d1b140cc4345cf155a15cc1102f
2023-07-31 19:40:30 +02:00
Alug 9351feba4c Merge pull request #7 from Indev450/luastopsoundbynum
Expose S_StopSoundByNum to lua
2023-07-31 17:25:45 +02:00
alufolie91 91b1409039 Some render bugfixes from HEP client
see: https://git.do.srb2.org/haya_/Kart-Public/-/commit/7622b977769061d63b69bcdccb0065d0ca0895e7
2023-07-31 14:29:02 +02:00
alufolie91 dbfa2a8852 P_RandomFixed should return the same result
maybe fixes desynchs between 64bit and 32bit clients
see: https://git.do.srb2.org/bird/Kart-Public/-/commit/a7bbc76c7c94c37ea62fe338451f7f4b70487a19
2023-07-31 14:25:49 +02:00
alufolie91 6bc1a6c515 software ffloorclip cleanup
code looks nicer, since i accidentally ported the old deprecated thing, works good now
2023-07-31 14:24:46 +02:00
indev 8247f9fc02 Expose S_StopSoundByNum to lua 2023-07-29 13:30:42 +03:00
alufolie91 6465fbe86b Make "lessflicker" toggable from the menu
cause kk didnt want that for whatever reason
2023-07-26 11:36:38 +02:00
alufolie91 dac7f4d24f Who plays kart in 4k
idk what it does exactly but since it says dont allocate it too high and really never saw anyone playing this game in 4k since even 1440p is rare
2023-07-26 10:58:19 +02:00
Alug 87ecd72ba2 Merge pull request #6 from Indev450/saturnmenu
Saturnmenu
2023-07-23 21:46:28 +02:00
indev 998c14e1c7 Forgot to remove one line when was fixing merge conflicts oops 2023-07-22 23:16:46 +03:00
indev 7d35a98573 Merge pull request #5 from Indev450/connectawaittime
Connectawaittime
2023-07-22 20:14:10 +00:00
indev 61000b10ce Merge branch 'saturnmenu' into connectawaittime 2023-07-22 20:13:39 +00:00
indev cd7c69b4e5 Add 'Infinite' as possible value for connectawaittime cvar so it is more clear that 0 means 'no timeout' 2023-07-22 23:04:54 +03:00
alufolie91 33e51451ae Add "Saturn Options" menu
also rearrange and move menu entries, also prep for credits if we decide to add em
2023-07-22 01:11:52 +02:00
alufolie91 a2f2112967 Add Connection Option menu
Menu for Changing queue time and downloadspeed
2023-07-22 00:31:46 +02:00
indev 8b047efca4 Make connection timeout configurable via cvar (in minutes, 0 for no time out) 2023-07-20 20:35:01 +03:00
indev 588a3ddacf Merge pull request #4 from Indev450/moretrace
Moretrace
2023-07-20 16:02:56 +00:00
indev b8a862e627 Merge pull request #3 from Indev450/rolluaremoval
Rolluaremoval
2023-07-20 05:52:10 +00:00
indev bdeb3c1105 Comment out function mobj_spritescale_setter completely 2023-07-20 08:45:35 +03:00
alufolie91 3c648e6839 forgor smh 2023-07-20 00:26:11 +02:00
alufolie91 146cb6b1c3 remove lua stuff from sprite rotation/scaling
shit can desynch people who are on another client, when this client is used to host a server
esp airbrakes cause it so ugh
2023-07-20 00:21:03 +02:00
indev 5b0cb04046 Fix possible segfault caused by undefined key order when iterating through table
(Sometimes key "flags" could go after key "func" which caused cvar to have CV_CALL flag but no func set)
Also fix CV_RegisterVar returning error handler function instead of cvar userdata for cvars with CV_CALL and without CV_NOINIT
2023-07-19 15:50:13 +03:00
alufolie91 e5656720c7 Attempt at adding more stacktraces to lua
shit broke idk
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1248/commits
2023-07-19 13:41:58 +02:00
alufolie91 7ed189dd93 FPS counter stuff, again
removed transparency for it and the ping display again, cause otherwise the game just does dumb things as always
also added: https://git.do.srb2.org/STJr/SRB2/-/commit/e3824b9f1b759c319df85d7c710bf76a70573c38?merge_request_iid=2047
2023-07-19 12:32:37 +02:00
indev 933532ab9c Update version string 2023-07-19 06:33:28 +00:00
indev 2b21b48005 Update README.md 2023-07-19 06:03:22 +00:00
indev 433cf9b35e Merge pull request #2 from Indev450/hudoffsets
Add cvars for tweaking positions of kart hud items
2023-07-19 05:54:44 +00:00
alufolie91 82a0decf06 Clamp light level for shaders
See https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1085
cause why not
2023-07-19 05:05:05 +02:00
alufolie91 9009b68906 eee smth smth revert a software mode sprite sorting thing
didnt see it could potentioally break stuff e
see :https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1353?commit_id=4d6b677765d48b84addbf107caa7bb5e19f4715f
2023-07-19 04:01:46 +02:00
alufolie91 f652582891 Adding "Hud Offset" Submenu in the Hud Menu
so you dont have to do all that via console uwu
2023-07-19 01:27:22 +02:00
indev a0bb448801 Add cvars for tweaking positions of kart hud items 2023-07-18 19:48:50 +03:00
Alug 6e1a57cb12 Merge pull request #1 from Indev450/luatrace
Luatrace uuuuuuuuuuuh
2023-07-18 18:14:02 +02:00
alufolie91 d386690254 Forgor to add stuff to LUAh_MusicChange oop 2023-07-18 17:46:36 +02:00
alufolie91 fa7ec34e70 Show the traceback when a Lua script error happens
See: https://git.do.srb2.org/STJr/SRB2/-/commit/1bacaedde23b2da9d579c4aad3017e1c3cd7c06e?merge_request_iid=974
2023-07-18 04:39:05 +02:00
alufolie91 34eb7f6d18 Make the Game compile for 64bit target on windows again 2023-07-18 00:56:19 +02:00
alufolie91 826147f94b Actually, revert the hud offsets back to vanilla
I mean kinda uncool since we had some lua rewrite for that, but they will get cvars later and now it just messes with some mods
2023-07-17 23:23:56 +02:00
alufolie91 590e5b58ea Reverted Minimap offset to vanilla
Minimap on wide maps was cutoff sometimes, this fixed it again
2023-07-17 23:17:44 +02:00
alufolie91 307e8f2209 Removing the depraction messages for "P_TeleportMove" and "P_AproxDistance"
kinda unneeded right now and just clog the console
2023-07-17 23:16:38 +02:00
alufolie91 87d562e83a Some memory allocations have been properly aligned
hopefully without crashes now :p
See: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2050
2023-07-17 23:14:54 +02:00
alufolie91 1c4515f3e3 ffloorclip fixes
See https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1284?commit_id=47b8c0648b2b87fdf7ec388e1f0c3b48239c8cff
2023-07-17 22:48:45 +02:00
alufolie91 27b4c53be4 Oopsie
Forgot to add a missing transparency flag to fps counter
2023-07-17 22:46:21 +02:00
alufolie91 4ea094e2b9 Reverted a change from galaxy branch, which sometimes didnt unmute music playback after regaining focus of the game
Reverted https://git.do.srb2.org/Galactice/Kart-Public/-/commit/8479a7189c6393c6f3e1e6c03066f98aac617e4b
2023-07-17 22:42:43 +02:00
indev 2f9fa5a9b7 Remove Haya's stuff from readme because my local repo was pulled from Haya's fork but most of stuff from it was overwritten anyway. (a bit messy, my bad haha) 2023-07-17 23:18:45 +03:00
indev 2d06d308cf Improve field lookup for player_t and mobj_t a bit more 2023-07-17 18:29:07 +03:00
indev 83cfaa6212 Better field lookup for player_t in lua 2023-07-16 19:06:34 +03:00
indev e804bd95ff Bring back error throw in cases where mobj is altered in hud or cmd hooks 2023-07-16 14:50:14 +03:00
indev a5ee34b397 Better field lookup for mobj_t 2023-07-16 14:40:09 +03:00
indev 045f3af141 Expose abs_index function from blua 2023-07-16 14:38:50 +03:00
indev 7ba890d8be Fix some of thinkframe stat pages being skipped. Also add total time for thinkframe stats 2023-07-16 14:38:15 +03:00
indev 4fc8341cb5 Fix sound setting not being applied after game restart 2023-07-16 14:37:03 +03:00
indev c99ef8b5b1 Draw console after everything else 2023-07-13 18:03:12 +03:00
indev 9a2da0ab28 Add cvar ps_thinkframe_page to switch perfstats' thinkframe pages if there are too many values 2023-07-13 17:38:39 +03:00
indev d9a556c2e1 v5.4 2023-07-13 16:51:27 +03:00
indev b17160aba0 v5.3 2023-07-11 08:48:45 +03:00
indev f7918b6f8e Fix scaling 2023-07-02 08:09:31 +03:00
indev 432335dc8b Oopsie 2023-07-01 21:40:03 +03:00
indev 51327a7adf v5 2023-07-01 21:39:28 +03:00
indev 1f7e8148a8 update manu 2023-06-28 23:57:50 +03:00
indev a591de1dfe Add cvar for sliptide rollangle change, fix segfault caused by missing check in CV_useCustomShaders_ONChange 2023-06-26 09:50:23 +03:00
indev 4d5a1cb09a sliptide sprite rotation 2023-06-26 08:57:24 +03:00
indev fe80787209 Didn't seem to fix sprite problem anyway 2023-06-26 08:56:40 +03:00
indev c14b09c01f More graphics and rollangle stuff 2023-06-26 08:42:54 +03:00
indev a40facd6f5 More alug's changes 2023-06-25 17:34:40 +03:00
indev b0ea8cfac9 Add addfilelocal command 2023-06-25 17:32:20 +03:00
indev a317a3be15 funny 2023-06-24 19:26:06 +03:00
hayayayay 4b8471c232 Fix compilation error on Linux and other systems that dont have a proper "stdbool.h"
Thanks Lonsfor for alerting me of this issue.... I should rework the localskin command soon....
2023-06-09 17:04:57 +08:00
hayayayay 7622b97776 Change the name dimbass 2023-06-07 17:17:53 +08:00
hayayayay ad61f0f719 Update version number 2023-05-18 14:42:11 +08:00
hayayayay f4c944b6ae Fix flickering + fix ante-station mirrors
whew. taken from the newer visportals branch over at vanilla srb2 https://git.do.srb2.org/Hannu_Hanhi/SRB2/-/tree/hwportals/
2023-05-18 14:37:40 +08:00
hayayayay 2314ae4f64 3.1 release 2023-05-15 13:14:18 +08:00
hayayayay 31ef067626 💀 2023-05-15 13:13:29 +08:00
hayayayay b2a8502162 Remove a line to increase performance
Don't think this is needed anyway lmao
2023-05-12 17:26:46 +08:00
hayayayay 9c9bb028fd Fix an issue with interp not fully seamlessly moving the camera 2023-05-12 11:23:48 +08:00
hayayayay f4f0c23d38 OpenGL visportals
From Hannu's `oglportalsalt` branch at birdhouse, ported to 1.6 https://git.do.srb2.org/bird/Kart-Public/-/commits/oglportalsalt
2023-05-11 16:48:10 +08:00
hayayayay e45216be0c empty commit 2 2023-05-09 19:47:19 +08:00
hayayayay f2958a5e77 empty commit 2023-05-09 19:29:43 +08:00
hayayayay 364f491b64 Merge remote-tracking branch 'Base-Galaxy/Galaxy-Redux' into Glalxy 2023-05-09 19:23:31 +08:00
Galactice ef8e6abebd Changing the versionstring back 2023-01-08 21:37:43 -05:00
Galactice 765820a79b Changing version string again 2023-01-08 20:55:03 -05:00
Galactice 37d1a03351 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into Galaxy-Redux 2023-01-08 20:44:15 -05:00
hayayayay c2ac8eb8b3 fix goofy mistake 2023-01-02 15:44:47 +08:00
hayayayay bbc067005c Increase freeslots to 2048 (Untested)
I only did this because of TetraKanyx#7259 at discord. She ACTUALLY ran out of freeslots for her own server while testing how many fucking maps can you fit before the server crashes.
I have not tested if this actually works, but we'll find out eventually :)
2022-12-26 15:32:26 +08:00
hayayayay b6199664c7 gamer 2022-12-26 11:23:15 +08:00
hayayayay e0f0552be2 Merge branch 'Galaxy-Redux' of https://git.do.srb2.org/Galactice/Kart-Public into Glalxy 2022-12-26 11:12:30 +08:00
Sal 20a5adde02 Merge branch 'sound-refactor-backport' into 'master'
Sound refactor backport

Closes #22

See merge request KartKrew/Kart-Public!325
2022-12-20 10:06:25 +00:00
Sal e8dee82341 Merge branch 'no-multi-fopen' into 'master'
Prevent multiple nodes fopen-ing the same file

See merge request KartKrew/Kart-Public!326
2022-12-20 10:06:14 +00:00
Sally Coolatta c332d48e9d Only reseek if we have to
Makes it act similarly to before if only 1 node needs the file.
2022-12-19 09:55:52 -05:00
Sally Coolatta cc54d98a39 New system to prevent multiple fopen
Instead of FILE pointer stored in the transfer, they go in their own array. The number of nodes accessing a file is kept track of, and it's only fully closed after everyone who needs it is done with it.

Means that will unfortunately do a lot more seeking, but multiple users can download the same file now without it being implementation specific.
2022-12-19 09:48:03 -05:00
Sally Coolatta 533dc7d668 Use strerror when file transfer can't be opened 2022-12-19 09:02:39 -05:00
toaster 73ef04b5e0 Merge branch 'bigger-antigrief' into 'master'
Increase range of anti-grief cvar

Closes #20

See merge request KartKrew/Kart-Public!327
2022-12-19 11:32:11 +00:00
Sally Coolatta d9e7272ff8 Increase range of anti-grief cvar 2022-12-19 06:15:14 -05:00
toaster fcddbdeaa1 Merge branch 'buildtitle-memory-leak' into 'master'
Consistently free G_BuildMapTitle

See merge request KartKrew/Kart-Public!323
2022-12-17 14:50:01 +00:00
Galactice af46e4f67b Merge remote-tracking branch 'KartKrew/master' into Galaxy-Redux 2022-12-17 09:36:10 -05:00
James R fe7e9ec266 Let S_StopSound, S_StopSoundByID, S_StopSoundByNum stop multiple sounds
Previously stopped only one, probably the first that
started playing.
2022-12-17 13:12:19 +00:00
toaster 91a424a034 Minor refactor: Handle *sep entirely within S_AdjustSoundParams, instead of having a component partly outside. 2022-12-17 13:05:34 +00:00
toaster 64189da28f Sound refactor backport step 2: flattened split-somethings branch 2022-12-17 13:05:14 +00:00
toaster 732861f0d4 Sound refactor backport step 1: flattened splitscreen-sound-fix branch 2022-12-17 12:58:28 +00:00
Sal 80abf38648 Merge branch 'axis-brake-broken' into 'master'
Fix gamepad axis brake behaviour

See merge request KartKrew/Kart-Public!324
2022-12-15 23:01:22 +00:00
toaster 99c1a51772 Fix gamepad axis brake behaviour
- It was actually ACCELERATION axis input that was predominantly broken!
    - It was inexplicably slightly under double what it should be (98 instead of the digital value of 50), which meant brake analog input struggled to dampen it.
    - Analog brake deceleration also gets a slight buff, from 24 to 25 (previously off from the digital value of 25 due to integer division rounding)
- Remove a pointless, always-true condition for brake handling.
    - Checked whether accel was held down OR whether `cmd->forwardmove` was less than or equal 0...
    - But further up the same function, `cmd` was invariably overwritten with a blank `I_BaseTiccmd`!
    - Therefore, `cmd->forwardmove` would always equal 0, and the `forwardmove` subtraction would always occur.
2022-12-15 21:21:43 +00:00
Galactice 23ea552a50 Changing the version string from #1.1 to v1.1 2022-12-15 15:08:30 -05:00
Galactice ba52836b38 Merge remote-tracking branch 'KartKrew/buildtitle-memory-leak' into Galactic 2022-12-15 15:01:38 -05:00
Galactice dbac87abba Merge remote-tracking branch 'KartKrew/master' into Galactic 2022-12-15 14:56:44 -05:00
toaster 455177a3e1 G_BuildMapTitle creates Zone memory that must be freed 2022-12-15 19:23:06 +00:00
hayayayay 95faa71a78 Fun! 2022-12-04 10:39:29 +08:00
Galactice d10ae6e4bc Merge remote-tracking branch 'Fab/protocols' into Galaxy-Redux 2022-11-20 20:32:16 -05:00
hayayayay 0de8fc3906 This always bugged me 2022-11-16 17:16:16 +08:00
hayayayay 03e07cf080 Just updating the thing for later. 2022-11-16 16:39:20 +08:00
JadenArc 839a0c10c2 #6 - Menu changes 2022-11-16 16:32:35 +08:00
JadenArc 7b5fac5d57 #5.2 - FPS and Intermission changes 2022-11-16 16:28:06 +08:00
JadenArc 5b2776c367 #5.1 - Miscellaneous HUD changes 2022-11-16 16:28:03 +08:00
JadenArc e6a019a741 #5 - Basic HUD changes 2022-11-16 16:25:03 +08:00
JadenArc ff71816c62 #4 - snowy_files.kart's existance 2022-11-16 16:22:50 +08:00
JadenArc 5f76fb3916 #3 - Console variables 2022-11-16 16:22:45 +08:00
JadenArc 6d7e86f5a1 #2 - Resolutions 2022-11-16 16:21:56 +08:00
JadenArc 05a698c8d2 #1 - Vanilla console behavior 2022-11-16 16:20:39 +08:00
Sal 5008558633 Merge branch 'unfuck-icon-mac' into 'master'
Use SDL version of executable icon at runtime on macOS

See merge request KartKrew/Kart-Public!321
2022-11-12 22:37:06 +00:00
Sal 7dcc7aaa2d Merge branch 'map-search-fix' into 'master'
Fix game trying to load nothing when music and sound files are not present.

See merge request KartKrew/Kart-Public!322
2022-11-12 22:36:17 +00:00
hayayayay b911a3eaf3 Bruh 2022-11-12 10:53:57 +08:00
Fafabis 76bd183012 Fix crash on dedicated servers 2022-11-11 21:43:32 -05:00
hayayayay 5238fe24cf Changes (again) 2022-11-12 10:37:54 +08:00
hayayayay 887ad69db1 Fix compiler error 2022-11-12 10:30:29 +08:00
haya_underscore 2f0f9f3b11 Fix errors 2022-11-12 10:24:32 +08:00
haya_underscore a6728c26f7 Chad menu changes
- Youll now get a preview of what skin is going to be used.
- Removed redundant code
2022-11-12 10:24:32 +08:00
haya_underscore b85a55137c Gamer 2022-11-12 10:24:27 +08:00
haya_underscore 1f9ec2fb3f remde 2022-11-12 10:23:51 +08:00
haya_underscore 217f15452c Argh! 2022-11-12 10:23:51 +08:00
haya_underscore 4a60babf75 localfile thing 2022-11-12 10:23:45 +08:00
haya_underscore 7d8a418a61 this was causing issues 2022-11-12 10:23:13 +08:00
haya_underscore 9e3919195d Changes 2022-11-12 10:23:13 +08:00
haya_underscore 932e9b92c3 Add a -force parameter to addskins, fix localskin not playing the right sounds on server skins, fix the scoreboard 2022-11-12 10:23:04 +08:00
haya_underscore 958fe796eb add localskinall command 2022-11-12 10:22:34 +08:00
haya_underscore a47d965b82 fix an issue with desyncs (somewhat)
dont you ever use mo.skin without it being just the player skin
2022-11-12 10:20:58 +08:00
haya_underscore 37d72b4680 HOLY SHIT 2022-11-12 10:20:52 +08:00
haya_underscore e4ba8b9a75 fix shit 2022-11-12 10:20:19 +08:00
haya_underscore e679dfe0aa bogus fix for localskins not properly saving when returning back into the titlescreen 2022-11-12 10:20:12 +08:00
hayayayay b6b3dcb3f0 I actually left this part out oops 2022-11-12 09:59:56 +08:00
hayayayay f071795894 Ghost and signpost support
We are not done yet
2022-11-12 09:58:45 +08:00
hayayayay 95ffcd0323 Fix because we are NOT making changes to the menu 2022-11-12 09:55:53 +08:00
James R 90bf36545d Show which skin is the real one 2022-11-12 09:54:43 +08:00
James R 4547347e21 Immersion 2022-11-12 09:54:43 +08:00
James R 28fa3039c1 More stufffff 2022-11-12 09:54:06 +08:00
James R a464df2165 I hate everything 2022-11-12 09:52:26 +08:00
hayayayay ba6ae7b351 My property now. 2022-11-12 09:42:57 +08:00
Galactice 5668533eb0 Setting the threshold to 0 to disable it 2022-11-11 10:58:07 -05:00
Callmore b0544e766e I can't spell 2022-11-08 11:11:09 -05:00
Callmore 9b4a72a912 Added "Grid" skin select menu 2022-11-08 11:10:25 -05:00
Callmore 24c74ccdd4 Allow to back out of selecting skin
from block with multiple skins
2022-11-08 11:08:53 -05:00
Callmore cf31891b97 Add better skin select menu to "Player Setup..." 2022-11-08 11:08:21 -05:00
Galactice a6357faaf0 Merge branch 'backup-gr_screentextures' of https://git.do.srb2.org/Lonsfor_/Kart-Public into Galaxy 2022-11-08 11:07:20 -05:00
Galactice 7190f1ccf5 Also this as well 2022-11-08 11:06:54 -05:00
Galactice dff65e0bdf Changing this 2022-11-08 11:05:46 -05:00
Galactice 84de4530e7 Merge branch 'pr-lessflicker' of https://git.do.srb2.org/Lonsfor_/Kart-Public into Galaxy 2022-11-08 11:05:36 -05:00
Galactice eaff01f9f6 Merge remote-tracking branch 'birdhouse/motion-sickness' into Galaxy-Redux 2022-11-08 10:54:14 -05:00
Galactice ce3afc5828 Pushing this 2022-11-08 10:50:45 -05:00
Galactice 97203f50ab Merge remote-tracking branch 'Lonsfor/pr-freeplay' into Galaxy-Redux 2022-11-08 10:49:28 -05:00
Galactice abfeffc7d6 Merge remote-tracking branch 'Lonsfor/pr-resume' into Galaxy-Redux 2022-11-08 10:48:33 -05:00
Galactice ddec711348 Push this in 2022-11-08 10:47:42 -05:00
James R 0884d0b546 Update bird menu
Also made some options dynamic.
2022-11-08 10:44:00 -05:00
James R 200aaabf48 cv_fading to disable music fading entirely 2022-11-08 10:43:36 -05:00
James R 459d73ad86 Make tilting work even on no physics slopes 2022-11-08 10:42:37 -05:00
James R 43678ddcfe Bring back cv_quaketilt, add cv_tiltsmoothing to adjust the smoothening 2022-11-08 10:42:24 -05:00
James R 8479a7189c Mute music instead of pausing if lose focus 2022-11-08 10:41:48 -05:00
James R fa9abcbb84 Lerp viewrollangle 2022-11-08 10:41:16 -05:00
James R b53f7fbd30 Rename to "Advanced Music Options" 2022-11-08 10:40:25 -05:00
James R ba56e4222b Bird menu!
There is a disclaimer on the first start which warns about motion sickness.
2022-11-08 10:40:03 -05:00
Callmore 7e7d45e209 No more fucking arbitrary numbers 2022-11-04 21:15:19 +00:00
James R 371c7c06aa Fix -Waddress compiler warning 2022-11-04 13:04:59 -07:00
Lach 481369cc6c Use SDL version of executable icon at runtime on macOS 2022-11-02 23:25:30 +11:00
toaster 024a140e8d Do not include spurious noticedownload aborting sendfile reports 2022-11-01 22:57:04 +00:00
SteelT 74421b7700 Set curl_failedwebdownload to true for corrupt or modified HTTP downloads.
So that it actually falls back to direct downloading
2022-11-01 18:52:49 -04:00
SteelT 17444e195d Merge branch 'internal16fixes' of https://git.do.srb2.org/KartKrew/Kart into internal16fixes 2022-11-01 18:16:43 -04:00
SteelT 3a720a61cd Add MD5 checking to HTTP downloading
In cases of where the file mismatches from what the server expects, it will fall back to direct downloading of the file.
2022-11-01 18:15:13 -04:00
toaster 234bdc90bf Legacy downloader adjustments
- Fixed off by one in Got_RequestFilePak that could cause correct, maximised-space-usage packets to be rejected
- More verbose printing for aborting send files
- More verbose printing for client request files (behind a define for troubleshooting)
2022-11-01 21:30:10 +00:00
toaster f30f1bf163 Do a little more short circuiting if dedicated idle time is occouring
Skips resync, clearticcmd, and sendtics, since all they're doing with no nodes in game is writing the same value to the same address again and again
2022-11-01 13:45:31 +00:00
toaster 0604073351 Update maps.kart hash again again 2022-11-01 13:41:19 +00:00
toaster 4bc482bdf5 Explicit pointer cast for R_InterpolatePrecipMobjState 2022-11-01 13:41:04 +00:00
Eidolon 76b719ae90 Use precip interp if gl sprite is for precip 2022-10-31 20:23:49 -05:00
toaster 8d2d926e70 Const qualifier warning 2022-10-31 23:24:23 +00:00
toaster d52c77dba4 Enable experimental dedicated idle system
There's enough confidence among krew that there's zero apparent downside to this, but made sure to do it as a seperate commit if we have to hit the emergency switch and revert
2022-10-31 23:22:15 +00:00
toaster 9974a58252 Catch the player in 4k if they try to use the SPB-eggbox combo trick
Same rules as thunder shield - the SPBis coming out again ASAP.
2022-10-31 23:18:06 +00:00
toaster 8d9f684708 Fix "NO CONTEST" support for exitlevel-replay hut interaction 2022-10-31 23:15:17 +00:00
toaster 2dca300891 Update maps.kart hash again 2022-10-31 21:23:16 +00:00
toaster cbe5479712 EXPERIMENTAL: Dedicated server idling system
- If no clients at server start or after 10 seconds of GS_LEVEL, and no Netxcmd waiting to be digested, halt all SV_MakeTic.
- Currently #define'd out, but if we don't get to test it before 1.6 release, I fully encourage community build developers to enable this codepath and trial it on their servers.
- It's absolutely netsafe to only have enabled on the host's end, the only risk is that a dedicated server might not re-awaken when presented with certain stimuli.
2022-10-31 20:55:52 +00:00
James R 2d8794a8b5 Use AsciiChar to get the input from windows console window 2022-10-31 19:59:58 +00:00
toaster a7ae0e8677 Fixes interpolated z for portals (x and y were fixed already) 2022-10-31 18:20:21 +00:00
toaster 3cce3ec2ce Use Partial Addfile for G_LoadDemoExtraFiles as well
Still cope compared to the MP addfile codepath, but not the n^2 time cope of before.
2022-10-31 18:06:34 +00:00
toaster b19004ae3b Enable extended legacy downloader
Tested with a full 255 WAD server, it's a LITTLE silly but I think it's inexplicably safe to ship!?
2022-10-31 17:51:25 +00:00
toaster a679e7a9e1 Legacy download code recieves more attention.
- Make all the I_Errors return false and print to the console instead.
- New prints for missing files if you can't fit it all into one packet.
- Make the startmessage warning less specific and direct you to the logfile, to accomodate all the different ways legacy downloads can fail.
2022-10-31 17:49:52 +00:00
toaster 5ab988dc3e Legacy downloader requests have recieved a little TLC.
- Catch buffer overrun opportunities and fail early.
- Add #define MORELEGACYDOWNLOADER for the equivalent of MOREFILENEEDED, but disabled for now because honestly we really shouldn't be encouraging people to use this thing by making it support 255 WADs at once, but also because that'd be MISERABLE to test
- Add a menu report for when legacy downloader attempts fail
2022-10-31 12:43:25 +00:00
toaster fbf696a38a Update maps.kart hash 2022-10-31 11:03:01 +00:00
toaster 163bf9e491 Resolve mixed declarations
It's the collective opinion of Kart Krew's coders that sticking to C90 spec isn't healthy... but while the compiler still warns for it in the v1 buildflags, avoid undesired reports.
2022-10-31 10:51:20 +00:00
Eidolon d814674d81 Use interp position in GL billboarding 2022-10-31 10:38:40 +00:00
toaster 8ae551e6bc Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into internal16fixes
# Conflicts:
#	src/p_tick.c
2022-10-31 10:35:31 +00:00
Eidolon 65737cd4bd Only call SetupFrame in T-1 hack with player->mo 2022-10-30 21:03:00 -05:00
toaster 461a80d357 Only do view interpolation hack if renderer exists 2022-10-30 21:01:54 -05:00
toaster 21bfb9753f Only read/write luavars from demos if Lua state has been initialised. 2022-10-30 13:29:27 +00:00
toaster a6c825dd16 More consistent netreplay wadfile list writing
Fixes crashes for newly-written demos that have files with absurdly long names attached
2022-10-30 13:13:42 +00:00
toaster e931f2bec2 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into internal16fixes
# Conflicts:
#	src/p_tick.c
2022-10-30 12:55:52 +00:00
Eidolon fcdb098b9c Ensure player mo exists in T-1 hack skybox update 2022-10-29 22:56:47 -05:00
AJ Martinez 144795c22c Don't antigrief players alone in local freeplay 2022-10-29 15:37:45 -07:00
toaster 17bde07bda Only do view interpolation hack if renderer exists 2022-10-29 13:06:25 +01:00
toaster de51d065b0 Fix an issue with reading invalid memory when loading a map inside a pk3 that has no REJECT table. 2022-10-29 12:51:00 +01:00
toaster 0df494d30d Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into internal16fixes 2022-10-29 12:48:12 +01:00
toaster ca69b5f2ca Merge branch 'replayhut-skin255-crash' into 'master'
Another spot that needs guarding

See merge request KartKrew/Kart-Public!320
2022-10-29 11:47:21 +00:00
Ashnal 8b0ed17690 Another spot that needs guarding 2022-10-28 17:15:50 -04:00
toaster 8d2d91a3bf Fix mixed declarations and code warning 2022-10-28 21:26:31 +01:00
toaster b84d4a6bd2 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into internal16fixes 2022-10-28 21:24:45 +01:00
Eidolon 6db1496aaa Disambiguate skyVisible from global variable 2022-10-28 15:19:20 -05:00
toaster cb575bcde9 Add additional external contributors. 2022-10-28 18:02:50 +01:00
toaster 4680094dd5 Update credits again 2022-10-28 15:50:50 +01:00
toaster 8a49fa5ec0 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into internal16fixes 2022-10-28 15:47:21 +01:00
toaster 1b884dd8f2 Merge branch 'replayhut-skin255-crash' into 'master'
Ensure skin index read from replay file is within numskins before drawing face

See merge request KartKrew/Kart-Public!319
2022-10-28 14:45:51 +00:00
Eidolon 4b61bcdb81 Correct local variable boolean type 2022-10-27 20:08:49 -05:00
Eidolon 661f06e1ef Correct local variable boolean type 2022-10-27 20:07:56 -05:00
Ashnal 19403d2889 Ensure skin index read from replay file is within numskins before drawing face 2022-10-27 20:28:14 -04:00
Eidolon 1b96c8b40f Net-save/load turnobjs field on rotating polyobjs
Fixes desyncs with rotating polyobjs
2022-10-27 18:13:25 -05:00
toaster 33989f56e5 Version is now 1.6
If you're looking to this commit to figure out what a hypothetical 1.7 should change, also increment MODVERSION - in this commit's case it was already incremented by another branch.
2022-10-27 15:32:43 +01:00
toaster 2bab452268 Add R_RelativeTeleportViewInterpolation
Adjusts pview_old for relative teleport to attempt a contigious motion
2022-10-27 13:38:13 +01:00
toaster 054bbd7745 Fix undesired interpolation for regular teleport 2022-10-27 13:36:14 +01:00
toaster b6eb21c5e2 Make all the join/leave sound effects have a singularity of true so that they don't stack super loud during major net interruption or multiple splitscreen player joins. 2022-10-27 12:38:53 +01:00
toaster 60b8916a96 Merge branch 'map-by-name' of https://git.do.srb2.org/KartKrew/Kart into internal16fixes 2022-10-27 12:16:11 +01:00
toaster 7e668f99b3 Fix spectators spawning at world origin on sectionrace maps. 2022-10-27 12:13:06 +01:00
toaster 63a5bed7d8 Adjust antigrief
Instead of not running for server or admin, run for ALL players, but only avoid *kicking* local or admin players.
Fixes a bug where having a non-interacting splitscreen player could take down your server.
2022-10-27 11:54:52 +01:00
toaster c2f9a40593 New asset hashes for gfx.kart and maps.kart 2022-10-26 21:09:44 +01:00
toaster 33c6dba5af Repair bad manual cherrypick of vsync repair 2022-10-26 20:53:16 +01:00
toaster d13c1f83e8 SDL: OpenGL instead of Direct3D11 for Software blitter
Repaired performance regression under certain play conditions
2022-10-26 20:47:56 +01:00
toaster 0a98f9c69a SDL: Support setting vsync at runtime
Allows vid_wait to work under software without having to switch to OpenGL and then back
2022-10-26 20:45:41 +01:00
toaster 427944f633 Remove advancedemo
Just a weird, meaningless footgun waiting in the wings for someone to catch themselves on. D_StartTitle works plenty fine here!
2022-10-26 20:40:19 +01:00
toaster ab68f0dadd Rewrite ping timeout
- ALWAYS kick someone who's about to stop the server because they're about to overrun TICQUEUE, even if they're in the joiner grace period
- Reduce the joiner grace period for normal ping limit to 10 seconds (from 30)
- Properly account for ignoring all local players when the host is splitscreen
2022-10-26 20:27:32 +01:00
toaster 33e35b7e13 Fix ping measurement off-by-one that slightly underestimates ping measurements 2022-10-26 13:50:35 +01:00
toaster 289de329eb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into kpubnext 2022-10-26 13:23:56 +01:00
Eidolon e7c16a13b7 Merge branch 'splitscreen-hudhook-fix' into 'next'
Clear and draw all game hud hook calls to 1 list

See merge request KartKrew/Kart-Public!318

(cherry picked from commit 7e17eb8591)

2cffc9b4 Clear and draw all game hud hook calls to 1 list
2022-10-25 23:04:58 -04:00
Eidolon 7e17eb8591 Merge branch 'splitscreen-hudhook-fix' into 'next'
Clear and draw all game hud hook calls to 1 list

See merge request KartKrew/Kart-Public!318
2022-10-26 03:04:51 +00:00
Eidolon 2cffc9b488 Clear and draw all game hud hook calls to 1 list
Fixes splitscreen issues with lua hud hooks
2022-10-25 20:36:27 -05:00
Eidolon 2473c7d7cc Merge branch 'mobj-jitter' into 'next'
Ensure view interpolates between T-1 to T

See merge request KartKrew/Kart-Public!317
2022-10-25 20:00:49 -05:00
Eidolon a99b2c9974 Merge branch 'mobj-jitter' into 'next'
Ensure view interpolates between T-1 to T

See merge request KartKrew/Kart-Public!317
2022-10-26 00:59:35 +00:00
Eidolon 806252320e Ensure view interpolates between T-1 to T 2022-10-25 19:32:28 -05:00
Sal a69b3b0260 Merge branch 'netunarchive-fixes' into 'master'
Fix use after free bug

See merge request KartKrew/Kart-Public!315
2022-10-19 06:19:28 +00:00
Sal 89d08372ce Merge branch 'win32-dpi-awareness' into 'next'
win32: Add dpi aware manifest config

See merge request KartKrew/Kart-Public!316
2022-10-19 06:18:39 +00:00
Eidolon 978f784ff7 win32: Add dpi aware manifest config 2022-10-18 17:53:29 -05:00
Lonsfor 56346718cf Merge remote-tracking branch 'bird/freeplay' into pr-freeplay 2022-10-10 03:35:43 -03:00
Lonsfor 8246138323 Merge remote-tracking branch 'bird/resume' into pr-resume 2022-10-10 03:23:53 -03:00
Galactice f4ecdaf0ab Merge remote-tracking branch 'birdhouse/map-by-name' into Custom 2022-10-10 00:08:40 -04:00
Galactice 07a62addb7 Merge remote-tracking branch 'Fabfabis/showtrackaddon' into Custom 2022-10-10 00:08:33 -04:00
Galactice 8535ed374b Merge remote-tracking branch 'birdhouse/gl-render-distance' into Custom 2022-10-10 00:08:11 -04:00
Galactice 858ebfb2d8 Merge remote-tracking branch 'birdhouse/dedicated-server-replays' into Custom 2022-10-10 00:08:01 -04:00
Galactice cb0aebea1a Merge remote-tracking branch 'birdhouse/turnsmoothing' into Custom 2022-10-10 00:07:50 -04:00
Galactice 7f452d623f Merge remote-tracking branch 'Tyron/somebodyclipthat' into Custom 2022-10-10 00:07:41 -04:00
Galactice d20352e1a0 Merge remote-tracking branch 'birdhouse/custom-resolutions' into Custom 2022-10-10 00:07:34 -04:00
Galactice b2b7502f02 Merge remote-tracking branch 'birdhouse/custom-opengl-resolutions' into Custom 2022-10-10 00:07:27 -04:00
Galactice 0b81ee34f0 Merge remote-tracking branch 'Lonsfor/backup-percent-speedomitor' into Custom 2022-10-10 00:07:13 -04:00
Ashnal 61683c96a3 Merge branch 'driftspark-pulse-on-charge' into backup-driftspark-pulse-on-charge 2022-10-03 15:50:06 -03:00
Ashnal fa890eb1a8 Merge branch 'percent-speedomitor-justspeedomitor' into backup-percent-speedomitor 2022-10-03 15:39:03 -03:00
Sal a12aaf40ce Merge branch 'reference-count-fixes' into 'master'
Fixes an issue where mobjs with shadows would never get freed,

See merge request KartKrew/Kart-Public!314
2022-10-03 18:08:06 +00:00
Ashnal bd4150b90e Fixes an issue where mobjs with shadows would never get freed,
due to their reference count getting reset after
having their shadows spawned, resulting in a reference count of -1
and the mobj never being freed, or a use-after-free during the shadow's thinker.
Also adds some P_SetTargets to P_BlockThingsIterator to fix an inconsistency I noticed while investigating this.
2022-10-03 02:07:36 -04:00
Ashnal 78ad817cf1 Forgot to remove my debug prints 2022-09-29 19:26:42 -04:00
Ashnal f8d71450e5 Unlink non-mobj and non-precip thinkers when loading and freeing
Move globalweather to before P_SpawnSpecials so that specials can properly change weather and have it communicated in savegames
2022-09-29 19:22:53 -04:00
Ashnal c24a0d0a47 Remove usage of currentthinker from direct removal
It's designed to be referenced from P_RunTHinkers, whjich we aren't doing
2022-09-29 15:43:50 -04:00
Alam Ed Arias 2db57c72e5 CircleCI: run the clean step to build the 32-bit LINUX depend.dep 2022-09-24 16:28:11 +00:00
Alam Ed Arias 984d44bb57 CircleCI: we need the depend.dep file for the cache 2022-09-24 16:13:27 +00:00
Alam Ed Arias 078e249d55 CircleCI: Disable NONET builds 2022-09-24 15:58:24 +00:00
Ashnal 3d311eeae3 Fix compiler warning 2022-09-10 13:30:24 -04:00
Ashnal 59fb3ed900 Attempt to fix use after free bug
with precipitation mobjs on netgame load
2022-09-10 13:29:18 -04:00
Sal c4ecddb9f3 Merge branch 'server-browser-improvements' into 'next'
Server browser technical and aesthetic improvements

See merge request KartKrew/Kart-Public!313
2022-09-09 19:14:58 +00:00
James R 435e65e63a Merge remote-tracking branch 'origin/master' into next 2022-09-07 02:49:15 -07:00
Sal a9acd6a8e9 Merge branch 'split-netfil-loading' into 'next'
Speed up file loading on server join by splitting P_AddWadFile into stages

See merge request KartKrew/Kart-Public!295
2022-09-05 15:04:49 +00:00
X.organic 6fb59f87b7 Speed up file loading on server join by splitting P_AddWadFile into stages 2022-09-05 15:04:49 +00:00
James R 07452bc8fb Server browser: always display the number of servers found so far 2022-09-04 22:45:39 -07:00
James R def84a2cc0 Slide server browser pages left and right 2022-09-04 22:28:59 -07:00
James R 41d82d9baf Merge "No servers found" with server browser status line 2022-09-04 22:26:23 -07:00
James R 00c9abd652 Clear the server list when entering or refreshing the server browser 2022-09-04 22:20:24 -07:00
James R ca71fb02f3 Merge blue "checking for updates" pop up with server browser status line 2022-09-04 22:16:05 -07:00
James R 53ee6524b4 Display the current status of server querying in the server browser
While trying to contact servers: display how many servers
are left. Once done: display the total number of servers
available in game.
2022-09-04 22:08:36 -07:00
James R ed9d520b4e Retry contacting servers in the server browser every second until nettimeout 2022-09-04 19:52:45 -07:00
Sal b2eff44dc4 Merge branch 'mobj-after-free' into 'master'
Fix use-after-frees around mobjs

See merge request KartKrew/Kart-Public!309
2022-09-03 02:58:47 +00:00
X.organic f009b3d8c9 Fix use-after-frees around mobjs 2022-09-03 02:58:47 +00:00
Sally Coolatta bf96c7ade8 Merge branch 'master' into next 2022-09-02 10:19:35 -04:00
Sally Coolatta e59521f14f Fix mixed declarations 2022-09-02 10:18:20 -04:00
Sal 9e4ce2a64b Merge branch 'st-asan-around-my-neck' into 'master'
Miscellaneous memory bug fixes to make AddressSanitizer happy

See merge request KartKrew/Kart-Public!310
2022-09-02 13:20:31 +00:00
X.organic 70128776ac Miscellaneous memory bug fixes to make AddressSanitizer happy 2022-09-02 13:20:31 +00:00
Sal 48ddb25fd6 Merge branch 'fix-dedi-node-takeover' into 'master'
Fix dedicated node takeover

See merge request KartKrew/Kart-Public!308
2022-08-30 05:42:05 +00:00
Ashnal 97f79a8866 Should fix the dedicated server player node takeover
that completely destroys servers
2022-08-29 16:58:33 -04:00
toaster e9fa66a3b3 Merge branch 'spec-hud-snap' into 'master'
Make spectator HUD snap to bottom left of viewport

See merge request KartKrew/Kart-Public!306
2022-08-28 14:30:51 +00:00
Sal 78cf02c221 Merge branch 'sdl-gamepads' into 'next'
Use SDL Game Controllers API

See merge request KartKrew/Kart-Public!298
2022-08-28 09:24:36 +00:00
Sal d9f4bd6111 Merge branch 'futurepk3' into 'next'
Backport SRB2 2.2's PK3 loader code fixes

See merge request KartKrew/Kart-Public!289
2022-08-28 09:23:16 +00:00
Sal 4555f3240e Merge branch 'clip-sprites-optimize' into 'master'
Drawseg clipping optimized, from prboom-plus

See merge request KartKrew/Kart-Public!304
2022-08-28 09:22:49 +00:00
toaster 233c5b1f7a Make spectator HUD snap to bottom left of viewport 2022-08-27 15:09:36 +01:00
toaster bbfaa0e99e Revert continuous hold attempt
- Does not function with controllers that don't produce continuous joystick events on hold, as testing unfortunately made clear.
- The entire thing would need to be rewritten to make up for that, and I don't have the time to invest that kind of energy into version 1.
- An unreliable feature is worse than no feature at all.
2022-08-27 11:10:28 +01:00
Sal 5a8784169b Merge branch 'gametype-always' into 'next'
Adjust voting rule changes again

See merge request KartKrew/Kart-Public!301
2022-08-26 22:45:44 +00:00
Sal df101848d1 Merge branch 'ping-catchup' into 'next'
Ping Catchup

See merge request KartKrew/Kart-Public!302
2022-08-26 22:44:47 +00:00
Sal 886bda775b Merge branch 'hole-punch-less-getaddrinfo' into 'next'
Call getaddrinfo less frequently when hole punching

See merge request KartKrew/Kart-Public!303
2022-08-26 22:44:25 +00:00
Sally Coolatta 2b75147eac Drawseg clipping optimized, from prboom-plus
Ported and flattened from Sal's work on the internal repository
2022-08-26 23:01:54 +01:00
toaster f7fc5c684e Positive sign only 2022-08-26 21:26:03 +01:00
toaster de97c41532 Revert "Remove game deadzone for Accel/Brake"
This reverts commit 44eeb3a0f3.

# Conflicts:
#	src/m_menu.c
2022-08-26 21:18:27 +01:00
toaster b10c21c504 Only use positive component of accel axis for menu KEY_ENTER behaviour 2022-08-26 21:00:39 +01:00
toaster 9e194dab2d Add cv_lookbackaxis (and p2-4 equivalents)
* Rename `Look Up/Down` to `Spec. Look Up/Down` to disambiguate from `Look Backward`
* Make it support multiplayer replay recording save request too
2022-08-26 20:50:57 +01:00
toaster 44eeb3a0f3 Remove game deadzone for Accel/Brake
- They're binary inputs as processed by the game.
- A mechanism for binary inputs with no deadzone is already used for item and drift.
- Generally bound to triggers, not the stick.
- SDL still has a minimum deadzone, so won't fire endlessly.
2022-08-26 20:50:57 +01:00
toaster 3ef3789f58 Gamepad improvements for menus
* For left stick up/down/left/right input, allow holding a direction down to move continuously in a direction at a rate of 7 steps per second per axis
* Now supports accel axis being used for the Enter key/"accept" in menus, to mirror how an accel BUTTON bind will be used as an Enter event.
2022-08-26 20:50:57 +01:00
toaster f167895865 Fix compilation warnings and non-codebase-standard types
Also, make the I_GetJoystickEvents functions match each other
2022-08-25 20:28:13 -05:00
Eidolon 08a218a3a1 Bump execversion to 10, remap xbox controls to SDL 2022-08-25 20:28:13 -05:00
Eidolon 5412be76e8 Use SDL Game Controllers API 2022-08-25 20:28:13 -05:00
James R 7b019571aa Merge remote-tracking branch 'origin/master' into next 2022-08-25 10:40:46 -07:00
toaster d86081cb8a If the client has caught up to the server -- say, during a wipe -- make GetLag return a ping of zero
Should fix the momentarily large ping bug.
2022-08-25 18:00:19 +01:00
toaster 1fb84fbfa9 Adjust voting rule changes again
* If `kartvoterulechanges` is set to `Always`, the third option is always the opposite gametype, even if Encore is unlocked - that will now be present on the second option instead.
    * This is both for consistancy with having Encore inaccessible on your gamedata, and a response to community feedback.
* The `kartencore` cvar being turned on will now be reflected in gametype rule changes from Battle to Race. This plugs one last hole in its area of effect for Race tracks.
2022-08-24 18:52:09 +01:00
toaster 4473b6852f Merge branch 'dont-advertise-offline' into 'master'
Don't advertise offline

See merge request KartKrew/Kart-Public!300
2022-08-24 15:54:04 +00:00
toaster 77164096dd Don't even attempt to advertise a non-netgame server.
This appears to be a long-time bug that exists upstream too, but nobody even knew about it before the MS rules alert made it clear this was actually happening!
2022-08-24 15:04:09 +01:00
Eidolon b81805b9c7 Merge branch 'first-person-interp' into 'master'
Don't use localaim/angle in skybox in demos

Closes #18

See merge request KartKrew/Kart-Public!299
2022-08-24 02:08:13 +00:00
Eidolon a728a4bb06 Don't use localaim/angle in skybox in demos 2022-08-23 20:11:24 -05:00
X.organic a4690a44fe Restore "SONIC ROBO BLAST 2" header in w_wad.c
I don't know either why it disappeared in the first place.
2022-08-23 18:33:44 +02:00
Eidolon 7369cd4c16 Merge branch 'cmake-exchndl' into 'master'
cmake: add exchndl link on mingw32

See merge request KartKrew/Kart-Public!297
2022-08-23 02:35:28 +00:00
Eidolon 95358ba4fe cmake: add exchndl link on mingw32 2022-08-22 20:59:56 -05:00
X.organic 002c75e9e2 Merge branch 'uint8-wads-and-skins' into futurepk3
Worth doing now that that's been merged into next. Also pulls in a
little bit of master.
2022-08-23 03:19:28 +02:00
Eidolon 377ed30207 Merge branch 'cmake-remove-win32' into 'master'
cmake: remove win32 subdirectory

See merge request KartKrew/Kart-Public!296
2022-08-23 00:49:45 +00:00
Eidolon 72120025e6 cmake: remove win32 subdirectory 2022-08-22 19:43:59 -05:00
Sal 153b5acc84 Merge branch 'x-y-deadzone' into 'master'
Make separate deadzones for x/y axis + menu options

See merge request KartKrew/Kart-Public!265
2022-08-22 23:47:49 +00:00
Sal 9160c6bef4 Merge branch 'uint8-wads-and-skins' into 'next'
Increase maximum WAD and skin counts

See merge request KartKrew/Kart-Public!291
2022-08-22 23:47:05 +00:00
Lonsfor 75efde143b Separate deadzones for menus 2022-08-22 15:52:22 -04:00
Lonsfor c9a6f9f9a3 Change minimum deadzone for menus from 3/4 to 1/2 2022-08-22 15:52:22 -04:00
Lonsfor 8724b01ae4 Set minimum deadzone for menus and prevent setting deadzone to 0 (c Ashnal) 2022-08-22 15:52:22 -04:00
Lonsfor 080a4f080a Menu options for deadzones 2022-08-22 15:52:22 -04:00
Lonsfor 0e1a91c655 Separate deadzones for players 2 3 and 4 2022-08-22 15:52:20 -04:00
Lonsfor 2dd21de302 Add separate x/y deadzones 2022-08-22 15:50:27 -04:00
X.organic f92c5b96ac Fix a performance regression in query functions
This commit brings back the old code for W_CheckNumForNamePwad, using memcmp
instead of strncmp, which is readily inlined by modern C compilers and has
more acceptable performance in P_AddWadFile. Also removes some redundant
strlens, saving the result of one call instead.

This commit increases this branch's distance from SRB2 2.2, per Ashnal
and SteelT's note that I shouldn't worry too much about it, especially
when there's performance on the line.
2022-08-22 13:25:24 +02:00
X.organic 3305303ea7 Merge branch 'master' (1.5) into futurepk3 2022-08-21 22:10:12 +02:00
James R 08f49671ef Send ASKINFO packet after hole punching
Time spent in I_NetRequestHolePunch no longer counts
toward ping measurement in the server list.
2022-08-21 04:15:59 -07:00
James R 1551e4572d Do not query DNS for holepunchserver more than once per tic 2022-08-21 03:45:55 -07:00
X.organic b4ebbbad89 Remove the last SINT8 handling skin indices
Thanks to Callmore's insistence on me sweeping through functions that
return -1 on error.
2022-08-21 11:50:02 +02:00
Eidolon 2f17fdca6c Merge branch 'match-refresh-vsync' into 'master'
Don't sleep w/ fpscap 0 and vsync enabled

See merge request KartKrew/Kart-Public!294
2022-08-20 21:23:50 +00:00
Eidolon f008e63037 Don't sleep w/ fpscap 0 and vsync enabled 2022-08-20 15:55:17 -05:00
X.organic 477c848615 Bring the maximum WAD file count up to 255
Per @TehRealSalt's recommendation.
2022-08-20 21:45:22 +02:00
Eidolon 6514d3cfc3 Merge branch 'interp-visportals' into 'master'
fix portal interp view positioning and camera reset

Closes #14 and #12

See merge request KartKrew/Kart-Public!293
2022-08-20 18:48:27 +00:00
Eidolon ca5884cf5e reset cam interpolation on P_ResetCamera 2022-08-20 13:42:34 -05:00
Eidolon a3bc32f7a0 fix portal interp view positioning 2022-08-20 13:00:37 -05:00
Sal a37ae53ff7 Merge branch 'cmake-15-fixes' into 'master'
Various fixes for 1.6

Closes #17, #15, and #11

See merge request KartKrew/Kart-Public!292
2022-08-20 17:26:02 +00:00
Eidolon 593cbbea65 Don't popup MS rules in dedicated mode 2022-08-20 12:20:09 -05:00
Eidolon af3df72c29 cmake: build sdl target with threads support 2022-08-20 12:13:48 -05:00
Eidolon b426602b24 cmake: remove patch.dta from assets script 2022-08-20 12:05:53 -05:00
X.organic d820b8e0c7 Increase maximum skin count to 255
This time without spare slots, because I don't see shenanigans like
WAD_MUSIC happening with skin indices. Verified to work by saving a
replay with 139 skins as the 133th skin and playing it back a few times.
Shouldn't cause issues with netcode either because there are no SINT8s
handling skin indices.
2022-08-20 14:08:14 +02:00
X.organic 09ae350603 Increase maximum WAD count to 250
Can be increased up to 255 safely, just not 256. 5 slots left for
shenanigans like Moe Mansion's WAD_MUSIC.
2022-08-20 14:05:32 +02:00
James R 993b3c96ac Update version to 1.5 2022-08-19 21:19:42 -07:00
James R 2edc840037 Draw PINGD before delay number 2022-08-19 21:13:05 -07:00
James R 54b5955a74 Ping counter: change patch name PINGF to PINGD
Update gfx.kart hash
2022-08-19 20:45:16 -07:00
James R be3dfa45d0 Rename rendezvousserver to holepunchserver 2022-08-19 20:19:45 -07:00
James R f2534f8cb5 Master server: use I_OutputMsg during startup
CONS_Printf calls CON_Drawer during startup, thread
collision stuff.
2022-08-19 20:05:05 -07:00
James R 2137a096e6 Reset remotenode when discarding STUN/hole punch packet
Fixes some wild behavior when a lot of hole punching
requests are coming in.
2022-08-19 19:55:08 -07:00
X.organic 8cd9b64716 Merge branch 'master' (1.4) into futurepk3
Now that 1.4 is out, maybe this will come in handy in 1.5, should 1.5 be
released. If not, I guess Ring Racers will make this branch redundant
once that comes out.
2022-08-20 03:10:32 +02:00
toaster c5e131460e Finalise credits for real. 2022-08-19 22:30:23 +01:00
James R c6e3f780e7 Revert "Merge branch 'consoleplayer-dedicated' into 'next'"
This reverts commit 5ec44ba3fa, reversing
changes made to 4c5d69b714.
2022-08-18 18:14:23 -07:00
toaster f2017fd31a Only display master server rules popup once per game boot.
Doesn't prevent it from happening later if the rules weren't successfully fetched, though.
2022-08-17 13:52:31 +01:00
X.organic b3dd979762 Finish SRB2 2.2 PK3 loading backport
Implements W_VerifyPK3, thus allowing music PK3s - even those created
with an archiver, thanks to the preceding commit - to be loaded as
"unimportant" files, like music WADs can be.
2022-08-16 21:54:04 +02:00
toaster 5812d7343d maps.kart hash finalised. 2022-08-16 20:39:48 +01:00
toaster 426b089d1d Fix VHS effect speeding up with interpolation. 2022-08-16 20:37:19 +01:00
toaster 2733571d27 Fix the interp-related Ancient Tomb FOF flickering.
Notably caused by a difference in behaviour between Software and GL that was already resynchronised in the 2.2 codebase.
2022-08-16 20:08:52 +01:00
X.organic 0a12b025ff Start of SRB2 2.2 PK3 loading backport
Backports the fixed ResGetLumpsZip code, registration of longname
fields and support for PK3s without trailing directory entries.
2022-08-16 20:36:51 +02:00
toaster 9e3fdfeeb7 Update maps.kart hash one more time... 2022-08-13 12:07:30 +01:00
toaster c09f5c0425 Fix a regression in non-ramp sector (no step down) functionality.
Seems to be a regression in internal too. Requires more analysis on behaviour in the 2.2 engine, but essential for maintaining compatibility in 2.1 (such as with Opulence wobbly carpet).
2022-08-12 22:13:45 +01:00
toaster cf882f4a30 Utilise execversion to one-time reset two cvars on upgrade to v1.4.
- `cv_masterserver` - Replaces a hack checking for the original SRB2 MS addres every time, and additionally catches those who tested an early version of the http MS.
- `cv_usegamma` - This was previously WAY too easy to accidentially change. This way, a user who has had this accidentially happen will automatically return to baseline.
2022-08-11 23:46:41 +01:00
toaster a60052b35d Fix changing gamespeed from the menu, for real
I originally wrote a ridiculous attempt at reimplementing the existing value rollaround. For one reason or another, that sidesteps net transmission. Let's just avoid all those hacks and limit our influence to changing the maximum allowed range.
2022-08-11 23:18:48 +01:00
toaster c657a47d56 Don't force a NEW CHALLENGER!! map reset if spectators enter during the introtime.
Doesn't affect the conditions that allow entry -- just avoids pointlessly resetting the map if it occurs during the period where literally nothing can happen.
2022-08-11 22:45:32 +01:00
toaster 66ac4bc309 Fix interp-related skybox freak for splitscreen p1. 2022-08-11 22:37:25 +01:00
toaster 8cbedf789a Copyright update. 2022-08-10 00:13:49 +01:00
toaster 2bc67a6151 Fix reversing/braking not being mapobjectscaled 2022-08-09 12:33:59 +01:00
toaster 0bcf934f03 One last touch to the credits. 2022-08-08 19:05:15 +01:00
toaster aeeabbf991 Update maps.kart hash one more time for the road. (tee hee, racing pun) 2022-08-08 16:59:35 +01:00
Hannu Hanhi 3a672a01e7 Use SSE3 in 32-bit x86 binaries 2022-08-07 07:38:42 -07:00
SteelT 93ec7bd9e5 Don't compile with dynamic base 2022-08-07 05:43:41 -07:00
toaster 8b202a4f00 Merge branch 'v14prep' into 'public_next'
v1.4 prep

See merge request KartKrew/Kart!631
2022-08-06 15:57:03 +00:00
toaster 0a95af8e05 Final credits update 2022-08-06 15:14:40 +01:00
toaster 0e5f223666 Supporting variable refresh rate for minor menu timers
Notably implemented with a hack, but these have already or will be rewritten for Ring Racers, and backporting isn't viable or desirable, so functional is better than the alternative.
2022-08-06 14:26:56 +01:00
toaster 5aa56e6029 Minor compiler warnings 2022-08-04 17:03:16 +01:00
toaster 284ae5fab8 Fix an interpolation issue with the Signpost
Because its z was being set but its old z wasn't being overwritten, at high enough refresh rates you can see it appear above its starting position for a single frame.

Done by modifying old_z instead of using P_SetOrigin for consistency of avoiding CheckPosition.
2022-08-04 15:57:44 +01:00
toaster 9e3b89c54f R_DrawVisSprite adjustments
* Backport the fix to an interp-based crash caused by using a combination of interpolated and uninterpolated scale in renderer calculations.
* Between this and the last commit, I attempted a refactor of this and associated functions in order to find the cause of the above crash. Committed are the changes which resulted in increased performance.
2022-08-04 15:34:59 +01:00
toaster a93f7ff7db New maps.kart hash for rearranged music lump names.
Revised the "last updated" instead of appending because we don't need to give internal-only changes too much spotlight.
2022-08-04 15:34:59 +01:00
toaster d939be8530 Merge branch 'v14-cmake-improvements' into 'v14prep'
(v1.4) cmake improvements

See merge request KartKrew/Kart!634
2022-08-04 14:34:39 +00:00
James R 14e502fd3f SDL hint render driver to direct3d11
Windows bug; RPT files were not being generated for
toaster on Windows 11. Eventually it was narrowed to down
to direct3d driver specifically.
2022-08-03 11:10:12 -07:00
James R 5565ed28ec Update libs/SDL2 to 2.0.22 2022-08-03 09:17:04 -07:00
Eidolon 2db6307f34 Merge branch 'v14-delete-system32' into 'v14prep'
(v1.4) Purge a bunch of legacy/unused stuff

See merge request KartKrew/Kart!633
2022-07-23 18:34:02 +00:00
Eidolon a1ec197b53 Remove FMOD files
Aren't used and definitely should not be in here anymore
2022-07-23 12:59:51 -05:00
Eidolon ebbe2ef817 Remove legacy SRB2Launcher 2022-07-23 12:59:51 -05:00
Eidolon fe4e9b31ce Remove old master server PHP scripts
Blast from the past, buuuut let's trim the fat here too.
2022-07-23 12:59:51 -05:00
Eidolon 260d69720d Remove unmaintained SOCEdit
Written in VB6. Superceded by better tools and also probably not even
buildable anymore.
2022-07-23 12:59:51 -05:00
Eidolon 600f7e2102 Remove old SDL 1.2 patches
SRB2 no longer works with 1.2 or Dreamcast so these are irrelevant
2022-07-23 12:59:51 -05:00
Eidolon 024f43a14d Remove lumpmod tool
Superceded by far superior tools
2022-07-23 12:59:50 -05:00
Eidolon c278800d66 Remove DJGPP GDB stub
Once more, SRB2 no longer works on DOS so this is irrelevant
2022-07-23 12:59:50 -05:00
Eidolon 4269f4eab6 Remove unused djgpp patch
SRB2 no longer works on DOS so this is irrelevant
2022-07-23 12:59:50 -05:00
Eidolon 120293a840 Remove legacy SRB2Updater tool
Also unsupported and nonfunctional
2022-07-23 12:59:50 -05:00
Eidolon 23833997ee Remove SRB2 Music Player
This thing is ancient history and also depends on FMOD.
2022-07-23 12:59:50 -05:00
Eidolon 5dac920ea4 Remove win32 backend-specific files 2022-07-23 12:59:50 -05:00
Eidolon 7de827deb4 Fix mac crashes + signal handling 2022-07-19 17:23:03 -05:00
Eidolon f945c369c7 cmake: readd discord rpc libraries to link 2022-07-19 17:23:03 -05:00
Eidolon e87650f653 cmake: Set plist properties for macOS bundle
yay icon
2022-07-19 17:23:03 -05:00
Eidolon 0f675e93b2 cmake: Fix rpath issues in macOS bundle fixup 2022-07-19 17:23:03 -05:00
Eidolon 0ea3387b80 cmake: Adjust linkage for macOS
This properly links dylibs set during build instead of expecting
the libraries to be in the system path.

# Conflicts:
#	src/sdl/CMakeLists.txt
2022-07-19 17:23:03 -05:00
toaster 8e398504f5 Avoid the every-time crash with interpolated firework trails.
Technically just removes one event that causes the crash instead of the actual crash, but I tried attacking it at the source and it's some nasty, nasty stuff...
2022-07-17 23:05:13 +01:00
toaster a091420764 Actually update CMakeLists.txt for real.
And add a little extra to the comment for anti-footgun insurance.
2022-07-17 22:03:57 +01:00
toaster 1c961e60f3 Primary 1.4 prep.
* New version number.
* New MODVERSION.
* New asset hashes.
* Disable patch.kart requirement.
* Remove the request to modify CMakeLists.txt, because that got revamped and grabs the version number from elsewhere now.
2022-07-17 21:15:27 +01:00
toaster b30e84b156 Prevent use after free of lump name in WAD compression-handling code.
Located by my new compiler! Also a nice, simple test commit for my new Git client...
2022-07-16 12:51:22 +01:00
toaster cd3774932e Interpolate the Phantom Ruby floating animation.
Also, I fell for the copypasted code bait CLASSIC, so now all instances of the Ruby are decoupled from FPS cap.
2022-07-10 21:54:10 +01:00
toaster 9aeacf8887 Make the Phantom Ruby icon float at the same speed regardless of FPS cap. 2022-07-10 20:20:39 +01:00
toaster 51998ed105 Fix Software disabling FPS cap instead of the OpenGL submenu. 2022-07-10 20:17:56 +01:00
toaster 05a79f6a8b Forgot to delete the duplicate registration for cv_kicktime in an earlier commit in this branch. 2022-07-10 19:59:50 +01:00
toaster cb5da4c3c3 Instead of reverting kartspeed on invalid set, prevent it from being set in the first place, just like Encore! Should resolve desync. 2022-07-10 19:59:29 +01:00
toaster 8c91b3650f Add MF_DONTENCOREMAP to each of the item monitors.
They were skipped because I didn't expect anyone to use them as they're simply leftover SRB2 assets, but Kart Airlines surprised me by using them as pushable track hazards.
2022-07-10 19:20:25 +01:00
toaster e7ee1126b3 Change where cv_kicktime is registered, so that it's valid at config load time. 2022-07-10 16:10:42 +01:00
toaster 266c463007 Add a sound inexplicably freeslotted in patch.kart. 2022-07-10 16:07:28 +01:00
toaster eea0df0ba2 Ping measured in frame delay instead of milliseconds
The part of HOSTMOD ministats that I wanted. Can go back to ms using the pingmeasurement cvar.

If Tyron wants to bring ministats fully in I think it'd be better to bring its ideas to replace the current HUD instead, ideally using the existing ping gfx, so they should bring it up with Oni

# Conflicts:
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/doomstat.h
#	src/hu_stuff.c
#	src/m_menu.c
2022-07-10 16:06:50 +01:00
toaster e1e48b71e2 Fix the Kart Krew intro so that it ends automatically again. 2022-07-09 23:08:52 +01:00
toaster 0845547f47 Only show the rules popup if rules have been recorded. 2022-07-09 21:12:13 +01:00
toaster 4f58842804 Merge branch 'next' into public_next
# Conflicts:
#	src/i_tcp.c
2022-07-09 20:31:49 +01:00
toaster 64474c35ae Merge branch 'http-ms-rules' into 'next'
Print rules in menu and in console

See merge request KartKrew/Kart-Public!286
2022-07-09 19:18:47 +00:00
Sal b1deb35564 Merge branch 'better-bans' into 'next'
Better bans

See merge request KartKrew/Kart-Public!285
2022-07-07 11:11:31 +00:00
toaster fbb613b2d6 Catch several ways ban.txt could be malformed by a well-meaning server host, and report it back via the log. 2022-07-04 14:00:12 +01:00
Sal cf4bb3bbe0 Merge branch 'musicchange-fix' into 'next'
Fix MusicChange lua hook returning some values incorrectly

See merge request KartKrew/Kart-Public!287
2022-07-04 09:17:53 +00:00
toaster 36e44f2f6f Free the banned struct on SOCK_ClearBans. 2022-07-03 22:01:51 +01:00
SteelT baf7620e61 Fix MusicChange lua hook returning some values incorrectly 2022-07-03 15:51:51 -04:00
James R a95907cb8c Print and display rules from the master server
Update HMS version to 2.2.

Fetch the rules when master server cvar set. Print rules
in console when server register. Display the rules in the
menu when entering the server hosting menu or when
changing the advertise cvar.
2022-07-02 22:49:25 -07:00
toaster 7c92a7efbb Complete BANFORMAT header implementation.
* Warn the user when an incompatible ban.txt is being loaded, and stop early.
* Don't inexplicably assign as a boolean, you bafooligan!
2022-06-15 22:34:05 +01:00
toaster 3ff5e3f8cd Fix an issue where if the last line of an M_StartMessage was the longest, the box width wouldn't account for it. 2022-06-15 17:00:09 +01:00
toaster 3498f1cff1 First commit with actual human testing involved.
* Fix some bugs.
    * Reset bannode information properly, fixing being unable to join your own server.
    * Write to the buffer before saving the kick/ban reason, rather than after.
* Improve the print output for the `showbanlist` command.
    * Includes username.
    * Includes remaining time as seen by a kicked joiner.
    * Hides expired bans.
* Improve the messages for ban/kick related refused joins.
    * Replace the Reason with the actual admin-provided reason for refused connection.
    * Replace the "Server refuses connection" header with "You have been [banned/temporarily kicked] from the server", the previous given Reason.
    * Fudge the time reported for temporary kicks so that a user is encouraged to return slightly after their tempkick ends, rather than before.
* Add an extra newline to the M_StartMessage for being kicked/banned with a reason provided.
2022-06-15 16:56:38 +01:00
toaster 40f7be7676 Static for compilation warning. 2022-06-15 13:36:32 +01:00
toaster 7bc59abc30 Create a single struct for bannednode and bannednodetimelft, and use the matching ban ID inside that struct.
While this commit does not increase the visibility of ban reasons, it makes this possible later.
2022-06-14 22:09:27 +01:00
toaster cd6b1b2cd9 Enforce MAX_REASONLENGTH when reading ban.txt. 2022-06-14 21:42:41 +01:00
toaster 8addea0d45 Core 1.4 specific changes.
* Ensure it can compile.
    * Removing vanilla 2.2 properties that slipped in to previous commits.
    * Rearranging i_tcp.c to avoid implicit declaration.
    * Complete rename of `IsNameGood` to `EnsurePlayerNameIsGood`.
* Add "BANFORMAT" header, for versioning support.
* Add conversion from 1.3-and-earlier format to new system.
* Don't ban the entire internet - convert zero-masks to the most specific ones.
2022-06-14 21:15:35 +01:00
toaster 55be74396f Ban improvements
- Save a note of the username, not just the reason.
- Allow setting a mask with the `banip` command.
- Make ban.txt's formatting a lot more sane. Username and reason are stored in quotes. The mask uses the same formatting as actual CDIR.
- Keep track of if we tried to load ban.txt. If it wasn't, then don't save over it with a blank file.
- Disallow quotes in player names, as it makes player name detection in console more annoying, and saving username in files scary.

# Conflicts:
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/i_tcp.c
2022-06-14 17:25:40 +01:00
toaster 8d05bf669b Kicks are now temp bans
Length is determined by the "kicktime" cvar, in minutes. By default, this is set to 10, but I'm willing to adjust this. Only applies to manual kicks (in the future, maybe also name filter kicks).

The timestamp for the unban time is even saved in ban.txt, so long-term temporary bans are completely possible. (I checked, you can attempt to ban someone for up to 1902 years if you really want to.)

# Conflicts:
#	src/d_clisrv.c
#	src/d_clisrv.h
#	src/i_tcp.c
2022-06-14 17:15:28 +01:00
toaster 24181ae738 - Attach ban reasons to banned_t
- Properly call D_SaveBan after remote bans. Bans are no longer saved in the ban command and instead wait for the actual kick to process, since before they were split between the two, which is what caused the discrepancy.

# Conflicts:
#	src/d_clisrv.c
#	src/i_tcp.c
2022-06-14 16:58:07 +01:00
toaster 2f0e1521d0 Combine banned & bannedmask into banned_t
Better code cleanliness, also makes it easier to add more data to bans later (such as a timestamp for temporary bans)

# Conflicts:
#	src/i_tcp.c
2022-06-14 16:48:29 +01:00
toaster 77e67d86bc Remove MAXBANS
Needs proper stress testing but seems to work.

# Conflicts:
#	src/i_tcp.c
2022-06-14 16:46:12 +01:00
toaster 8b7aab97c6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public.git into next 2022-06-14 16:38:37 +01:00
toaster 9d568673f1 Merge branch 'turn-dampen-cap' into 'next'
Cap on turn dampening

See merge request KartKrew/Kart-Public!284
2022-06-14 15:35:36 +00:00
toaster d49bd1474a Merge branch 'jug_nobumpcode' into 'next'
Fix bumpcode, fix magnet landing (better fix)

See merge request KartKrew/Kart-Public!281
2022-06-14 15:34:39 +00:00
Sally Coolatta c3ce70299f Store K_GetKartSpeed result 2022-06-02 22:10:05 -04:00
Sally Coolatta 451ad75610 Cap on turn dampening
Fixes high speed bugs without removing the ability to turn at those speeds. Similar fix to what is in Ring Racers.
2022-06-02 21:36:16 -04:00
Sal 71de39bcbc Merge branch 'gametype-preference' into 'next'
Server Gametype Preference

See merge request KartKrew/Kart-Public!278
2022-06-02 03:03:43 +00:00
Sal 44b4d36151 Merge branch 'chat-flood-fix' into 'master'
Fix chat flood crashes (from STJr/SRB2!1698)

See merge request KartKrew/Kart-Public!280
2022-06-02 03:01:35 +00:00
JugadorXEI 894c4cffc2 no more bumpcode, no more magnet landing (again) 2022-06-01 17:47:09 +02:00
toaster 8fa22d562f Merge branch 'hole-punch-backport' into 'public_next'
Hole punching backport

See merge request KartKrew/Kart!445
2022-05-31 15:48:00 +00:00
AJ Martinez a4a1f32b41 Fix chat flood crashes (from STJr/SRB2!1698) 2022-05-30 21:41:39 -05:00
Sally Coolatta fdefc15a4d Merge branch 'master' into next 2022-05-30 18:23:30 -04:00
Sally Coolatta 2861e7688a Use old behavior when dipping below 35 with interp 2022-05-30 18:22:46 -04:00
Sal a95a8d5c9f Merge branch 'prevent-permissions-footgun' into 'master'
Fail loudly when config isn't writable

See merge request KartKrew/Kart-Public!279
2022-05-30 22:16:06 +00:00
AJ Martinez 73aed4643b Use a temporary file instead of checking against config (from JugadorXEI) 2022-05-28 14:57:16 -05:00
AJ Martinez 7f46eb72bc Fail loudly when config isn't writable 2022-05-27 20:07:37 -05:00
toaster 77f2894bc3 Make a server report its preferred gametype on the MS listing, not its current one.
The intent is to stop servers from needing to dedicate their limited name/MOTD space to things like advertising `lessbattlevotes`, and to avoid "punishing" a server in visibility for allowing temporary gametype switches. However, this is possibly a controversial change, so I'm doing it in its own commit in case there's a clear consensus to revert.
2022-05-27 23:21:25 +01:00
toaster 7e7bd7dbb2 New kartgametypepreference cvar.
* A "canon" adaptation of the community-created server option `lessbattlevotes`.
* If set to "None", voting behaves as before.
* If set to "Race" or "Battle". that gametype is considered the preference.
    * The voting screen is always operated from the perspective of the preferred gametype.
    * If you're in an un-preferred gametype, the third vote option will always allow you to continue the gametype.
    * If the preferred gametype is Race and you've just exited a Battle map, Encore may now appear on the second vote option.
* A number of bugs with voting have been corrected.
    * If `kartencore` is on, the third vote option will now correctly have Encore applied.
    * If a custom EXE or malformed packet sends an Encore flag alongside a Battle gametype ID, actively strip it.
        * Just to note, clients do not enter Battle Encore with or without this change - this just prevents a promise the rest of the game couldn't fulfill.
2022-05-27 23:16:02 +01:00
toaster 7bf672a399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public.git into next 2022-05-27 17:51:11 +01:00
toaster 16b0bd736b Merge branch 'public_speclil' into 'public_next'
[1.4 ver.] Da anti-grief stuff

See merge request KartKrew/Kart!474
2022-05-27 16:40:09 +00:00
toaster 34fd13be14 Merge branch 'ms-address-warning' into 'master'
Add warning and reset flow for non-default masterserver address

See merge request KartKrew/Kart-Public!277
2022-05-27 16:35:12 +00:00
toaster 37986f9775 Merge branch 'port-vanilla-sight' into 'next'
backport P_CheckSight from vanilla

See merge request KartKrew/Kart-Public!273
2022-05-27 16:34:19 +00:00
toaster f46568868a Merge branch '2.2backport-ceilslope-light' into 'next'
2.2 Backports - add ceil slope double step-up/down and fix sprite/models all black in sector with light level of 256

See merge request KartKrew/Kart-Public!274
2022-05-27 16:32:05 +00:00
AJ Martinez 129fc2bbb1 Style cleanup 2022-05-25 18:22:43 -05:00
AJ Martinez 1441fda838 Clearly mark MS reminder + formatting touchup 2022-05-24 18:44:49 -05:00
AJ Martinez 8548d44109 Futureproofing mserv address conveyance 2022-05-24 18:25:18 -05:00
AJ Martinez 93647873de Add warning and reset flow for non-default masterserver address 2022-05-23 23:12:24 -05:00
Sal d0addde847 Merge branch 'uncapped-next' into 'next'
Uncapped

See merge request KartKrew/Kart-Public!276
2022-05-22 01:28:01 +00:00
Eidolon 8a4d865880 Update interpolation during objectplace 2022-05-21 14:40:29 -05:00
Eidolon 64088d8f07 Tweaks for kart v1 MR comments 2022-05-21 12:32:40 -05:00
Eidolon 2fe0555e3f Make character cursor framerate-independent 2022-05-19 21:07:25 -05:00
Sally Coolatta a4090db7b9 Use double instead of precise_t for FPS counter
Makes the displayed FPS more accurate to what it's actually displaying.

Also removed HUDTRANS from it -- stop it fading out during level transitions, it's annoying when I actually want to see the FPS during those bits.
2022-05-19 16:37:33 -04:00
Eidolon 507211b94e Remove hudlib getDeltaTime 2022-05-18 21:17:28 -05:00
Eidolon de0d5d09e0 Don't interpolate during net lag 2022-05-17 20:05:54 -05:00
Eidolon bf3748110c Copy tracer interp state for Jawz reticle 2022-05-06 10:11:08 -05:00
Eidolon e3f4479457 Fix typo in view reset 2022-05-05 19:58:12 -05:00
Eidolon 80a479f512 Reset view interp in preticker 2022-05-05 19:48:34 -05:00
Eidolon 0741b7ee8e Run UpdateMobjInterpolators in preticker 2022-05-05 19:24:21 -05:00
Eidolon 1a08cd2f49 Run UpdateLevelInterpolators in preticker
Fixes KartKrew/Kart-Public#10
2022-05-05 18:49:31 -05:00
Sally Coolatta cd6a68aea5 Revert to before screenUpdate boolean was added
Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.
2022-05-05 00:04:14 -04:00
Sally Coolatta f085fc5cbb Move screenshot code before timing 2022-05-04 20:17:35 -04:00
Sally Coolatta 8149a51192 Do not register servers twice
Advertise_OnChange is CV_NETVAR, so the server will get registered by CV_LoadNetVars when the server starts.

This race condition occasionally pops up in master, but got very consistent with uncapped.
2022-05-04 05:20:32 -04:00
Sally Coolatta 5a89c2738f Apply the same fix for instashield overlay 2022-05-03 19:43:31 -05:00
Sally Coolatta 35ddf39453 Fix jawz reticule in uncapped 2022-05-03 19:43:07 -05:00
SteelT c351129658 Fix sounds playing multiple times during intro if interpolation is on 2022-05-03 18:43:35 -05:00
Eidolon 40cd1c797c Restore missing chat msg timers 2022-05-03 18:41:50 -05:00
Sally Coolatta 84a59cd76c Interpolate song credits 2022-05-02 00:02:06 -04:00
Sally Coolatta d45390f617 Fix lookback interpolating 2022-05-01 23:25:11 -04:00
Sally Coolatta b5b2810838 Create scores drawlist 2022-05-01 23:11:14 -04:00
Sally Coolatta bf2b8490ea Partially port newer sky rendering
Not the cause of the black sky bug, but doing this helped me diagnose it & it's cleaner
2022-05-01 21:48:48 -04:00
Sally Coolatta c35985d595 Fix src_rect size not being init
Fixes Software being a blank screen
2022-05-01 21:07:00 -04:00
Sally Coolatta c96855f59c Use newer CVar setting code
Fixes weirdness with the named values in fpscap
2022-05-01 21:01:19 -04:00
Sally Coolatta 1ab5a46256 Fix old shadows interpolation 2022-05-01 20:40:51 -04:00
Sally Coolatta c72f959d5c Fix mixed declarations & code 2022-05-01 20:15:52 -04:00
Sally Coolatta 73a35d3280 Poor whitespace on libd_fadeScreen + const variable that needs changed 2022-05-01 20:15:05 -04:00
Sally Coolatta ea30cfd8f8 Fix refresh rate on mode change 2022-05-01 20:08:02 -04:00
Sally Coolatta 6a7b43aa2e Fix shadowed declaration 2022-05-01 20:05:35 -04:00
Sally Coolatta adcdb7f711 Remove unused variable
Makes me unable to compile with harsh compiler settings
2022-05-01 20:00:41 -04:00
Eidolon 8f354ad9c1 Implement Uncapped (squashed)
Co-Authored-By: Sally Coolatta <tehrealsalt@gmail.com>
Co-Authored-By: James R <justsomejames2@gmail.com>
Co-Authored-By: Monster Iestyn <iestynjealous@ntlworld.com>
Co-Authored-By: katsy <katmint@live.com>

Place Frame Interpolation in "Experimental" video options header

This seems like an appropriate way to describe the feature for now.

Add smooth level platter under interpolation, `renderdeltatics`

`renderdeltatics` can be used as a standard delta time in any place,
allowing for smooth menus. It will always be equal to `realtics`
when frame interpolation is turned off, producing consistent
framerate behavior everywhere it is used.

Add smooth rendering to save select screen

Add smooth rendering to Record/NiGHTS Attack, F_SkyScroll

Ensure viewsector is accurate to viewx/viewy

This fixes a potential crash in OpenGL when changing between levels.

Ensure + commands get executed before map start

Always have precise_t defined

Fix misc dropshadow issues

Reset view interpolation on level load

Remove unnecessary precipmobj thinker hack

Add reset interpolation state functions

Reset precip interpolation on snap to ceil

Reset mobj interp state on TeleportMove

Only swap view interp state if a tick is run

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames

Homogenize mobj interpolations

Add sector plane level interpolations

Add SectorScroll interpolator

Add SideScroll interpolator

Add Polyobj interpolator

Intialize interpolator list at a better time

Delete interpolators associated with thinkers

Interpolate mobj angles and player drawangle

Interpolate HWR_DrawModel

Add functions to handle interpolation

Much less code duplication

P_InitAngle, to fix angle interpolation on spawning objects

Fully fix drop shadows

It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.

Do not speed up underwater/heatwave effect in OpenGL

Closer OpenGL underwater/heatwave effect to Software

Interpolate from time of previous tic

Previously interpolated from last 35th of a second, which
may be offset from game time due to connection lag.

Consider this the proper fix to 54148a0dd0 too.

Calculate FPS stuff even if frame is skipped

I decided ultimately to actually keep the frame skip optimization disabled, because I think it is actually a little bit helpful that you can still get accurate rendering perfstats while paused, however if we decide otherwise then we can have this optimization back without making the game act like it's lagging.

Keep rect in memory

Feel better about this than creating one all da time

Lots of FPS stuff

- Disabled VSync, due to the numerous problems it has.
- Instead, added an FPS cap.
- Frame interpolation is now tied to fpscap != 35.
- By default, the FPS cap is set to the monitor's refresh rate.
- Rewrote the FPS counter.

(This also consolidates several more commits ahead of this
fixing various issues. -eid)

Misc changes after Kart cherry-picks

Fix renderdeltatics with new timing data

Update mobj oldstates before all thinkers

Allow FPS cap values

Adjust how FPS cap is checked to improve FPS stability

Fix precip crash from missing vars

Improve the framerate limiter's timing for extreme stable FPS

Handle the sleep at the end of D_SRB2Loop instead of the start

Simplifies logic in the other parts of the loop, and fixes problems with it frequently waiting too long.

Reset mobj interp state on add

Add mobj interpolator on load netgame

Move mobj interpolators to r_fps

Dynamic slope interpolators

I_GetFrameTime to try and improve frame pace

(It doesn't feel that much better though.)

Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code

Fix plane interpolation light level flickering

Fix flickering plane interpolation for OpenGL in the exact same way

Funny OpenGL renderer being at least 50% copy-pasted Software code :)

P_SetOrigin & P_MoveOrigin to replace P_TeleportMove

Convert P_TeleportMove use to origin funcs

Revert "P_InitAngle, to fix angle interpolation on spawning objects"

This reverts commit a80c98bd164a2748cbbfad9027b34601185d93f5.

Waypoint polyobjects interpolate z & children

Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)

Reset overlays interp states each TryRunTics

Interpolate model interpolation (lol)

Use interp tracer pos for GL linkdraw

Papersprite angle interpolation

Makes the ending signpost smooth

Move intermission emerald bounce to ticker

Bring back shadows on polyobjects

Also optimizes the method used so rings can show their shadows too. Using just the subsector is a tad bit imprecise admittedly but any more precise methods get really laggy.

Fix a bunch of ticking in hu_ drawing functions

Revert "Reset overlays interp states each TryRunTics"

This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.

Move intro ticking out of the drawer

Adjust 1up monitor icon z offsets

Fixes interpolation issues with 1up monitors.

Delta time choose player menu animations

Add drawerlib deltaTime function

Interpolate afterimages further back

Use old sleep in dedicated mode

Clamp cechotimer to 0

Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).

Revert "Remove unnecessary precipmobj thinker hack"

This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.

Fix frame pacing when game lags behind

The frame timestamp should've been made at the start of the frame, not the end.

Fix I_FrameCapSleep not respecting cpusleep

Jonathan Joestar bruh

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.

Make Lua TeleportMove call MoveOrigin

Reset Metal fume interp state on appear

Add interpdebug

Put interpdebug stuff in perfstats instead

Add timescale cvar

Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!

Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!

Force interpolation when timescale != 1.0

Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.

Fix cutscenes in interp

Fix boss1 laser in interp

Interpolate mobj scale

Precalculate refresh rate

Slower PCs can have issue querying mode over and over. This might kinda suck for windowed mode if you have different refresh rate displays but oh well

Fix interp scaling crashing software

Reset interp scale when Lua sets .scale

Disable angle interp on fresh mobjs

Fix interp scale crash for hires sprites

Interp shadow scales

Copy interp state in P_SpawnMobjFromMobj

Fix multiplayer character select

Don't interpolate mobj state if frac = 1.0

Fix Mario block item placement

Interpolate spritescale/offset x/y

Fix offset copies for SpawnMobjFromMobj

THANKS SAL

Add Lua HUD drawlists

Buffers draw calls between tics to ensure hooks
run at the originally intended rate.

Rename drawerlib deltaTime to getDeltaTime

Make renderisnewtic is false between tics

I know what I'm doing! I swear

Completely refactor timing system

Time is now tracked internally in the game using I_GetPreciseTime
and I_UpdateTime. I_Time now pulls from this internal timer. The
system code no longer needs to keep track of time itself.

This significantly improves frame and tic timing in interp mode,
resulting in a much smoother image with essentially no judder at
any framerate.

Ensure mobj interpolators reset on level load

Ensure view is not interpolated on first frame

Disable sprite offset interpolation (for now)

Refactor timing code even more

System layer is greatly simplified and framecap
logic has been moved internally. I_Sleep now
takes a sleep duration and I_SleepDuration
generically implements a precise sleep with spin
loop.
2022-05-01 17:35:30 -05:00
Sal da1dbac164 Merge branch 'jug-noforcedhell' into 'next'
Remove Map Hell Force if all players random

See merge request KartKrew/Kart-Public!275
2022-04-05 19:01:59 +00:00
JugadorXEI 2864547dc9 banishing hell map forcing 2022-03-30 15:25:35 +02:00
Sal 92c7a1dc80 Merge branch 'freeslot-increase' into 'next'
Freeslot increase

See merge request KartKrew/Kart-Public!268
2022-03-29 22:35:53 +00:00
Sal 750b8bfe20 Merge branch 'load-logging-improvements' into 'master'
Small logging improvements for addon loading

See merge request KartKrew/Kart-Public!272
2022-03-29 22:22:14 +00:00
Sal 7d5a499f38 Merge branch 'small-download-tweaks' into 'master'
Few small tweaks to the connection screen

See merge request KartKrew/Kart-Public!262
2022-03-29 22:19:16 +00:00
Sal 4cec473d6f Merge branch 'cvar-default-suggestions' into 'master'
A few cvar default suggestions

See merge request KartKrew/Kart-Public!263
2022-03-29 22:19:02 +00:00
Sal 7b113b5f39 Merge branch 'Rocket-sneaker-cleanup' into 'next'
Properly detach rocket sneakers when the player dies

See merge request KartKrew/Kart-Public!271
2022-03-29 22:18:30 +00:00
Sal 4d6c57551c Merge branch 'discod-join-minor-improvements' into 'master'
Discord joins now force menu close and title demo stop

See merge request KartKrew/Kart-Public!270
2022-03-29 22:17:55 +00:00
Sally Coolatta 6c8938af6b not on player join 2022-03-29 17:17:57 -04:00
Sally Coolatta a031998f5f Fix compile errors 2022-03-29 15:46:02 -04:00
Sally Coolatta fce57a1027 startedInFreePlay 2022-03-29 15:42:31 -04:00
U-DESKTOP-Q6QDT0F\PC abd7ecef72 from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/840?commit_id=0d92bf3dd09cd4712a63fc79cc7520ed18556bf6 2022-03-23 08:18:56 -03:00
U-DESKTOP-Q6QDT0F\PC 46b1effacd from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1192 2022-03-23 08:18:56 -03:00
minenice55 a88c115b84 port P_CheckSight from vanilla
mostly a copy/paste job, this fixes issues with certain sloped surfaces improperly obstructing sight (ported files from srb2 commit 4c9b83b6bdd8cd3e2626505940de75668e3db0c2)
2022-01-11 19:52:50 -05:00
toaster 71d49bcc3b With Sal's feedback, make nospectategrief get set 20 seconds into the map, not on lap 3 2021-12-15 23:21:43 +00:00
toaster d398698729 Per Sal's request (slightly modified):
* Do not allow any joining spectators if anybody got onto the last lap while not in FREE PLAY (this is the same condition as nospectategrief, for consistency).
* Reset nospectategrief to 0 if there is literally nobody playing, to prevent a fully locked-out server.
* This means it's not a problem to reset spectatorreentry even with the map command.
* Change the default for spectatorreentry to 30 seconds, from 60.
2021-12-15 17:28:31 +00:00
toaster 19ac63bd6c Fix for beocming a spectator while an SPB is on your trail having it continue to follow you around. Done here because it's related to spectators messing up other people's fun. 2021-12-08 20:57:52 +00:00
toaster bac683085c Disable the "%s became a spectator" message if you haven't actually entered the game, to prevent an avenue for spam. 2021-12-04 15:59:24 +00:00
toaster d557b7f962 Allow antigrief to be tested in dev builds (copy of internal commit) 2021-12-03 20:41:57 +00:00
toaster 375a635c8a Merge branch 'spectator-little-things' of https://git.do.srb2.org/KartKrew/Kart-Public.git into public_speclil 2021-12-02 18:07:50 +00:00
toaster 71f2d638e6 Merge branch 'next' of https://git.do.srb2.org/KartKrew/Kart-Public.git into public_next
# Conflicts:
#	src/f_finale.c
2021-12-02 17:42:50 +00:00
toaster 56df30a009 Merge branch 'credits-update-14' into 'public_next'
Credits changes for 1.4

See merge request KartKrew/Kart!469
2021-12-02 16:58:53 +00:00
James R 1cd08dc5f1 Add Ivo's name to the credits 2021-11-29 14:05:33 -08:00
James R 07d5cbcab0 Remove name at contributor's request 2021-11-29 13:53:45 -08:00
SteelT fd88c139a6 Merge branch 'master' into next 2021-11-21 16:01:29 -05:00
SteelT 651d04f91b Merge branch 'opulence' into 'public_next'
Add Opulence objects

See merge request KartKrew/Kart!442
2021-11-04 22:31:12 +00:00
Ashnal 55055b7536 Small logging improvements for addon loading
Adds back the "Loading file" message when a file is loaded
Adds individual file errors for things loaded with W_InitMultipleFiles (-file param)
Errors for a given file will now appear between "Loading file" and
the "Added file" or "not adding file" messages, making troubleshooting easier
2021-09-25 18:04:46 -04:00
Ashnal f4bf6edfe6 Properly detach rocket sneakers when the player dies
This includes both death pits and spectating
2021-09-12 23:06:18 -04:00
Sal 520b1f2a75 Merge branch 'linespecial-fixes-jug' into 'next'
Delayable linedefs crash fix

See merge request KartKrew/Kart-Public!269
2021-09-12 00:09:15 +00:00
Sal 8cd205cd28 Merge branch 'freeslot-errors' into 'master'
Error checking for running out of freeslots

See merge request KartKrew/Kart-Public!267
2021-09-12 00:09:01 +00:00
Ashnal a2900c8811 Discord joins now force menu close and title demo stop
This prevents wierdness from ahving the menu open on teh connection screen
It also prevents the connect command from erroring due to being in a demo
2021-09-10 20:25:13 -04:00
JugadorXEI ab2bbf3b08 validation against mo (guards against delays) 2021-09-07 22:09:03 +02:00
Ashnal d303f1b203 Increase Mobj Freeslot limit to 1024 from 512 2021-09-06 16:51:34 -04:00
Ashnal c8cec767d5 Upgrades P_PatchInfoTables to use 4 digit tempnames, suppoing up to 9999 freeslots 2021-09-06 16:41:50 -04:00
Ashnal 6e7bdc6031 Changed readfreeslots error checking to work like lib_freeslot
Uses loop variable to determine error condition
Also small change to lib_freeslot for SFX for consistent use of I_Error
2021-09-06 16:12:33 -04:00
Ashnal 4b750e0504 Adjust S_AddSoundFx to also use I_Error when exhausting Freeslots 2021-09-06 16:12:13 -04:00
Ashnal f5bcfc6379 Add I_Errors for when the game exhausts all freeslots of any type. 2021-09-06 16:11:57 -04:00
SteelT 82b1499eb0 Merge branch 'master' into next 2021-09-05 01:30:12 -04:00
Sal e66eaf001e Merge branch 'james-full-name' into 'master'
Add my full name in the credits

See merge request KartKrew/Kart-Public!264
2021-08-31 04:31:14 +00:00
James R 0fc6ae9873 Update rendezvous server to kartkrew.org 2021-08-30 20:02:54 -07:00
James R 0f122fd5dd Don't accept hole punch requests to local network 2021-08-30 19:00:28 -07:00
James R 64ff789f2f Add my full name 2021-08-30 18:45:56 -07:00
James R eab8f99eab Document the hole punching protocol 2021-08-30 18:31:17 -07:00
James R df59f3580d Don't do anything hole punching related if rendezvousserver is unset 2021-08-30 18:27:52 -07:00
James R 307cdf7039 Don't request hole punch to self, and don't register local server for hole punching 2021-08-30 16:52:15 -07:00
James R b5086b848b Ignore zero length packets 2021-08-30 16:52:14 -07:00
James R ba5b6aa7af Hole punching 2021-08-30 16:52:13 -07:00
lachablock 4ed6c3665a Add missing explicit break 2021-08-20 20:03:55 +10:00
Ashnal 452390872b Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into HEAD 2021-08-19 22:50:50 -04:00
Ashnal dc447c07e9 A few netgame default improvements
Increase timeouts by a few seconds, helps folks joining with slow disks
Beef up the vanilla downloader settings
2021-08-19 22:41:50 -04:00
Ashnal b0724506bb Set drift and item default axis binds to None 2021-08-19 22:22:23 -04:00
Ashnal a35d4ea5f4 Switched checking files mode to use a progress bar
Changed the confirmation prompt use MB if >=10MB
Changed the ovearall progress bar to use MB if >=10MB
2021-08-19 21:49:40 -04:00
Sal 52879a7632 Merge branch 'instashield-fix' into 'next'
Instashield crash fix

See merge request KartKrew/Kart-Public!260
2021-08-08 03:27:54 +00:00
JugadorXEI 1d62fb8eb3 Fix duplicated matchgenericflags (was causing crash) 2021-08-07 16:41:22 +02:00
JugadorXEI 31b3a9ac90 Merge branch 'next' of https://git.do.srb2.org/KartKrew/Kart-Public into next 2021-08-05 17:27:57 +02:00
Sal 17d45fc790 Merge branch 'mobjscale-itemthrow' into 'next'
Small mapobjectscale fixes

See merge request KartKrew/Kart-Public!259
2021-07-24 17:15:56 +00:00
lachablock 98142864d7 comment formatting 2021-07-24 19:16:28 +10:00
lachablock 62529f748a Add Opulence objects 2021-07-24 19:08:04 +10:00
SinnamonLat c839a7c5d8 Fix mixed declaration in K_KartDrift while i'm at it 2021-07-10 12:09:52 +02:00
SinnamonLat c149ee441a Fix item throws and startboost scale in mobjscaled maps 2021-07-10 12:08:54 +02:00
Sal a0f0b473ab Merge branch 'more-fixes-jug' into 'next'
Various gameplay & stability fixes

See merge request KartKrew/Kart-Public!256
2021-07-06 13:42:41 -04:00
Fafabis 5f446737e6 Add Menu Option 2021-07-06 09:18:47 -03:00
Fafabis c96d85156e add cvar 2021-07-05 21:03:29 -03:00
Fafabis a88f4aaf00 show the track addon 2021-07-05 20:56:41 -03:00
JugadorXEI 4fdbfb1dc2 Abstain from handling connections instead if the level is loading 2021-05-30 23:36:07 +02:00
JugadorXEI 63f87b4cec Use toaster's approach to fix 0th position 2021-05-30 18:45:38 +02:00
JugadorXEI 4d8d5d7fa9 More robust check against yellow springs on grown players. 2021-05-30 18:28:27 +02:00
JugadorXEI 2c1d5a72b6 We use FRACBITS out there 2021-05-28 16:43:09 +02:00
JugadorXEI 733cf20a10 Set GS_LEVEL after level load, set GS_WAITINGFORPLAYERS during level transition if GS_LEVEL is current GS 2021-05-28 16:32:21 +02:00
JugadorXEI dfc942a628 Removed superfluous logic that was causing midair drift charge to disappear 2021-05-20 20:21:08 +02:00
JugadorXEI df769a13e4 Fix grown players no spark/wrongdrift interaction with yellow spring panels 2021-05-20 19:39:32 +02:00
JugadorXEI bf911d02cb Thunder Shield now has COOLDOWNONSTART 2021-05-20 19:24:56 +02:00
Fafabis 37b742683f Add NoDisplay to .desktop file 2021-05-20 10:05:36 -03:00
Fafabis 6c1a5236de Force to execute kartexec.cfg 2021-05-20 10:03:38 -03:00
JugadorXEI e123f4bd53 Fix 0th position bug 2021-05-19 23:19:43 +02:00
Fafabis def20e607b Cleanup 2021-05-06 12:35:44 -03:00
Fafabis 2f457584d8 Properly update update-desktop-database 2021-05-06 11:50:55 -03:00
Fafabis 46c2964213 Remove unnecessary things 2021-05-06 10:53:59 -03:00
Fafabis 74938281ed Protocol user interface "refactor"
No longer ask to register protocols in startup, instead, automatically register protocols and give the user a option to disable it in the menu.
Detect if ".local/user/applications" exists and if mime database tools are present on unix platforms to create it.
2021-05-06 10:50:51 -03:00
Fafabis cbea79960b Normal mkdir perms 2021-05-05 23:52:04 -03:00
Fafabis 23632606b3 bruh 2021-05-05 23:43:30 -03:00
Fafabis 994dfa91f2 *ProtoParm -> *ProtoParam 2021-05-05 23:41:49 -03:00
JugadorXEI 5882338192 Fix rare sink crash, fix jawz particles hang, fix magnet landing 2021-05-06 03:10:01 +02:00
Fafabis bff1f57423 Fix compiler warning when compiling on windows 2021-05-04 17:24:25 -03:00
Fafabis 14c17c90cd Better method of getting exe paths in Linux and FreeBSD 2021-05-04 17:23:38 -03:00
Fafabis 381d48c6c9 No admin
Do not require administrator permissions on windows and automatically re-register if path has changed
2021-05-04 12:27:53 -03:00
Fafabis 3034d6c062 Merge remote-tracking branch 'chaotic/master' into protocols 2021-05-02 13:09:08 -03:00
Fafabis 76f11e69d6 Reverse 2021-05-02 13:08:46 -03:00
Fafabis 6c1a42f05f Adjust coding style and "optimize" M_GetProtoParm 2021-04-22 11:15:29 -03:00
Fafabis 139c548a7d Fixes 2021-04-21 18:20:43 -03:00
Fafabis 9657bb35c0 WIP?: Implement URL protocols. 2021-04-21 16:52:44 -03:00
Sal ff26ff9b61 Merge branch 'small-fixes-jug' into 'master'
Discord Invite Fixes + DUMPCONSISTENCY flag for makefile

See merge request KartKrew/Kart-Public!255
2021-04-20 15:12:48 -04:00
Sally Coolatta 83349b2473 Not while flashing 2021-04-13 02:06:57 -04:00
JugadorXEI ea56bd472c Simply return address, don't allow self_ip to be possibly written as something else 2021-04-13 06:56:14 +02:00
JugadorXEI d7e8642236 Discord Invite Fixes + DUMPCONSISTENCY flag for makefile 2021-04-13 00:33:06 +02:00
JugadorXEI eea337029a Merge remote-tracking branch 'upstream/next' into next
Keeping this up to date.
2021-04-08 00:16:30 +02:00
Sal 6e33b5281d Merge branch 'discord-invite-fix' into 'master'
DRPC: Wait for join secret to be ready

See merge request KartKrew/Kart-Public!248
2021-04-07 17:47:59 -04:00
Sal 977917e61d Merge branch 'no-gamma-shortcut-v1' into 'master'
Replace gamma shortcut with a fullscreen toggle

See merge request KartKrew/Kart-Public!254
2021-04-07 17:42:53 -04:00
Sal 4c1ae5d649 Merge branch 'mines-no-fullbright' into 'next'
Mines lost their fullbright between inception and v1 release

See merge request KartKrew/Kart-Public!253
2021-04-07 17:38:52 -04:00
Sally Coolatta 4f5d5500f2 Merge branch 'next' into spectator-little-things 2021-04-07 17:14:54 -04:00
Sally Coolatta a70faeccff Merge branch 'master' into next 2021-04-07 17:14:30 -04:00
Sally Coolatta 967a85db81 Merge branch 'master' into spectator-little-things 2021-04-07 17:14:09 -04:00
Sally Coolatta 163b215b0a Merge branch 'next' into spectator-little-things 2021-04-07 17:14:02 -04:00
Sal 24c234f968 Merge branch 'ensure-map-title-level-header' into 'next'
Allocate non-existent level header for G_BuildMapTitle

See merge request KartKrew/Kart-Public!252
2021-04-07 15:47:17 -04:00
Sally Coolatta 35b83ead37 Mines lost their fullbright between inception and v1 release
I got so mad about this I brought the fix to v1 also
2021-04-07 03:16:27 -04:00
Sal 967cff1281 Merge branch 'ogl-respawn-fix' into 'master'
Fix unnecessary texture reloads on respawn in opengl

See merge request KartKrew/Kart-Public!251
2021-03-21 04:02:37 -04:00
Sal 8e4171e2f9 Merge branch 'fix-ra-crash' into 'master'
Fix RA crash

See merge request KartKrew/Kart-Public!250
2021-03-21 04:02:28 -04:00
toasterbabe 3be489f6dd Fix crash on loading level without a header.
(cherry picked from commit 7556b407b247a9bfb9420781b8fa1ac4facce07d)
2021-03-20 20:58:03 -07:00
Sally Coolatta 6573904ec5 Fuck the gamma shortcut, replace it with a fullscreen toggle 2021-03-12 11:55:54 -05:00
Hannu Hanhi dbf744845d Fix unnecessary texture reloads on respawn in opengl by removing unneeded V_SetPalette calls 2021-03-12 18:52:58 +02:00
Ashnal f01697bfdb Prevent the connection from being canceled when in Record Attack
Fixes a crash that can happen when starting RA attempts if you press
keys/buttons that would cancel a netgame connection
2021-03-08 00:48:15 -05:00
Sally Coolatta ffec5f632b Merge branch 'master' into next 2021-02-27 00:38:43 -05:00
Sally Coolatta 3f150fbe05 If the join secret isn't ready right away, wait for the next update instead of trying to loop for it again immediately
I believe this may be the cause of the invite crash some people have noticed in master, but I'm not sure, needs tested.
2021-02-27 00:37:15 -05:00
Sal 0241b73dbe Merge branch 'large-address-aware' into 'master'
Add large address aware flag

See merge request KartKrew/Kart-Public!246
2021-01-26 18:13:37 -05:00
himie 1f5e9fd802 Add large address aware flag
This allows the final exe to use more than 2gb of RAM in a 64-bit system
which should get rid of most out of memory errors on 32-bit builds
2021-01-25 17:00:09 -06:00
Sal 235c6cbf49 Merge branch 'fix-pause-refocus-mute' into 'master'
Fix pausing then refocusing the window causing the music to stay muted

See merge request KartKrew/Kart-Public!244
2020-11-27 16:45:02 -05:00
Sal 3a95266e3d Merge branch 'microwavable-thinkframe' into 'next'
Add a Lua global to tell if you are in the preticker

See merge request KartKrew/Kart-Public!245
2020-11-27 16:44:47 -05:00
James R 1a3e883b4e Lua: "defrosting" global to tell how many tics are processing in the preticker 2020-11-24 19:32:01 -08:00
James R 6533a728db Always unmute music on refocus
If the game is paused, music will be resumed when unpause anyway.
2020-11-13 17:30:23 -08:00
Sal 5ec44ba3fa Merge branch 'consoleplayer-dedicated' into 'next'
Fix not being able to access consoleplayer as a dedicated server + other more consistent checks

See merge request KartKrew/Kart-Public!240
2020-11-10 14:50:22 -05:00
Sal 4c5d69b714 Merge branch 'no-aprox-dist' into 'next'
Use R_PointToDist2 over FixedHypot, and FixedHypot over P_AproxDistance

See merge request KartKrew/Kart-Public!243
2020-11-10 14:50:08 -05:00
Sally Coolatta c23364db12 Actually, lets just fix FixedHypot instead.
Now FixedHypot uses the code from R_PointToDist2, and R_PointToDist2 just calls FixedHypot.

Ultimately, this branch was intended to get rid of a redundant way to retrieve distance and replace it with the one that was actually good at its job. So consolidating FixedHypot and R_PointToDist2 together is just an extension of that.
2020-11-08 00:45:16 -05:00
Sally Coolatta 104208fc84 Use R_PointToDist2 instead
Apparently overflows less often
2020-11-07 23:56:46 -05:00
Sally Coolatta 3ad5c0af48 Merge branch 'master' into next 2020-11-07 22:21:53 -05:00
Sally Coolatta d6c497065e Use FixedHypot over P_AproxDistance
Not convinced that the small speed benefit from P_AproxDistance is worth the "aproximate"[sic] results it gives. Let's instead try a define to replace it with FixedHypot. In Lua, the function gives a deprecated warning.

Inspired by the hyperwall fix for vanilla, except for everything. From little testing, actively improves waypoint checks, bumping, speed checks, wall collisions, Jawz targetting, Lightning Shield attacks, so on.

The only way I see this as a potential downgrade is A_Look (and related functions) getting slower, which are barely used in Kart.
2020-11-07 19:47:50 -05:00
Sal 4c2b6de02c Merge branch 'lua-ports' into 'next'
Some Lua ports from 2.2

See merge request KartKrew/Kart-Public!241
2020-11-07 18:30:59 -05:00
Sal 6ed14a8dba Merge branch 'srb2-findplane-backport' into 'master'
R_FindPlane optimization

See merge request KartKrew/Kart-Public!242
2020-11-07 18:30:46 -05:00
Hannu Hanhi 8ee560f216 R_FindPlane optimization from SRB2 2020-11-07 20:32:44 +02:00
James R 130a1ccc98 :V 2020-11-05 22:18:41 -08:00
Zachary McAlpin a9e851bcf5 Execute LUAh_PlayerThink(player) at the end if the player has a valid mobj_t object 2020-11-05 21:26:24 -08:00
Zachary McAlpin 5921d17cc0 Added PlayerThink hook 2020-11-05 21:23:22 -08:00
James R a5db4ca572 PreThinkFrame and PostThinkFrame hooks
Changes from 58dd578b094639405d452593562e0f8cb2b482ce,
a36920808b74e068d582dda5a3b75bdf64246463,
41c902b819ac8fdef173c4ba76a8c50ad8107190,
60928db0e0b08fee7ceddd5515adf2246bb655c3.
2020-11-05 21:04:25 -08:00
James R 3e31bc9e45 Add CV_Set, CV_SetValue, CV_StealthSet, CV_StealthSetValue and CV_AddValue to Lua
CV_SetValue merged with CV_Set (same with CV_StealthSetValue and CV_StealthSet).
2020-11-05 20:23:43 -08:00
Louis-Antoine ab7ccbc5d5 Expose "server" and "dedicated" to Lua scripts
Careful! Both are local variables and are always false for clients,
and therefore should obviously not be used in anything gamelogic-related.
2020-11-05 20:19:58 -08:00
James R 9f54ad4ea3 Improve COM_AddCommand boolean deprecated warning 2020-11-05 20:16:28 -08:00
James R 933ee4e961 COM_LOCAL makes your commands NetXCmd free, FUCK NetXCmd 2020-11-05 20:16:28 -08:00
James R bb97e0805e Fuck magic numbers; COM_ flags for Lua commands! 2020-11-05 20:16:26 -08:00
James R 7890c9b83a Let access spectator mobj 2020-11-05 20:05:04 -08:00
James R 9e586c348c Allow accessing a player even if there is no mobj
The worst part is you could've just saved the player userdata and accessed it
later anyway while player.mo is nil.
2020-11-05 20:04:14 -08:00
James R 29d8e44055 Always allow access to the serverplayer 2020-11-05 20:00:21 -08:00
Sally Coolatta 1d8608c00d Merge branch 'master' into next 2020-11-05 16:15:42 -05:00
Sally Coolatta 8726bb70ac Minor whitespace :p 2020-11-05 16:15:09 -05:00
Sal 226518dc8f Merge branch 'spb-polyobject-fix' into 'next'
Fix polyobject and SPB 'lastlook' interaction crash

See merge request KartKrew/Kart-Public!239
2020-11-05 16:14:25 -05:00
Sally Coolatta 513652c9fa Actually, let's avoid a future bruh moment 2020-11-03 13:23:41 -05:00
Sally Coolatta 7333177677 Remove strike for finishing normally 2020-11-03 13:23:10 -05:00
Sal a5ff1bd99d Merge branch 'download-wrong-checksum' into 'master'
Download files if they are found with wrong checksum

See merge request KartKrew/Kart-Public!238
2020-11-03 13:05:26 -05:00
Sal 583eede2b8 Merge branch 'mute-music' into 'master'
Mute music instead of pausing if lose focus

See merge request KartKrew/Kart-Public!235
2020-11-03 13:05:06 -05:00
Sal a8b37c6ec3 Merge branch 'http-downloads-auth' into 'master'
Command for http downloads with basic auth

See merge request KartKrew/Kart-Public!233
2020-11-03 13:04:43 -05:00
Sal 73d582ba85 Merge branch 'instant-askjoin' into 'master'
Fix servers having a long delay before starting

See merge request KartKrew/Kart-Public!236
2020-11-03 13:04:10 -05:00
Sal 4f9fcb8e90 Merge branch 'stun' into 'master'
Implement STUN for fetching your public IP address for RPC

See merge request KartKrew/Kart-Public!237
2020-11-03 13:03:54 -05:00
JugadorXEI 2714940be9 Polyobject and SPB 'lastlook' interaction fix 2020-11-03 16:41:00 +01:00
AJ Martinez b850afaa12 Correctly pad time + slim down titlename format 2020-10-14 21:52:57 -05:00
AJ Martinez 4a51100811 Merge remote-tracking branch 'upstream/master' into somebodyclipthat 2020-10-14 21:11:07 -05:00
James R dc86206c23 Count any files not already loaded toward filestoload? 2020-10-07 16:09:21 -07:00
James R d96f93f8a9 Download files that were found with wrong checksum 2020-10-07 16:06:49 -07:00
James R 5dcf65df8a Fix NOMIXER 2020-10-06 16:59:02 -07:00
James R dc9466a7f4 Add STUN to CMakeLists.txt 2020-09-30 21:15:49 -07:00
James R 88c98970eb Reset asksent before CL_ASKJOIN
It gets pushed forward for ASKINFO.
2020-09-30 12:42:53 -07:00
James R 81a7103b73 Use rand_s for Windoze
unsigned int is always 4 bytes on windows btw, so this should align properly.
2020-09-30 12:22:09 -07:00
James R b8bfe9b83a Use STUN instead of curl to fetch the public IP address for Discord
RFC 5389 is a standard protocol that can be used for this instead of ip4.me.

I may have gone overboard on the CSPRNG... It was fun though.
2020-09-30 03:57:50 -07:00
James R 6fbd518b97 cv_fading to disable music fading entirely 2020-09-28 14:34:17 -07:00
James R 766c8b3f0c Make tilting work even on no physics slopes 2020-09-28 14:20:11 -07:00
James R ae77792df3 Bring back cv_quaketilt, add cv_tiltsmoothing to adjust the smoothening 2020-09-28 13:39:24 -07:00
James R a39762a8fd Mute music instead of pausing if lose focus 2020-09-28 11:58:24 -07:00
James R 5d12696a70 Fix opengl sky dome rotation
I was setting atransform by mistake, but I noticed I do a small refactor too.
2020-09-27 23:08:43 -07:00
James R b69162e92d Apply quake rolling to opengl too, cv_actionmovie depends on cv_tilting 2020-09-27 23:02:04 -07:00
Jaime Passos 9ccf2490fc Just in case?
(cherry picked from commit 40b862967d3a4aef3cca63a10f6399ce1c7af47c)
2020-09-27 22:57:13 -07:00
James d677981531 Option to hide/show viewpoint text
(cherry picked from commit a6fad8655e1ab345081ee6dd0f4c1c439491c079)
2020-09-27 17:56:34 -07:00
James R 1d11152fb4 C90 2020-09-27 17:56:29 -07:00
James R d5cb7312a0 Extern fovtan hack omegalul 2020-09-27 17:49:47 -07:00
James R 57f8acfd3c Compiler error :V
(cherry picked from commit e47fbe7dd9c460b0ca8d88334f6a22e329cd10b3)
2020-09-27 17:47:15 -07:00
Monster Iestyn 997966351e use ATTRINLINE rather than inline to match some of the other functions in this file, though I'm told modern compilers ignore inlining info as they actually decide themselves now
(though I could pretend we still support the older ones lol)

(cherry picked from commit befae492fe996ddedd4e9c6e0feaaa74a3b889bd)
2020-09-27 17:43:31 -07:00
Monster Iestyn aab1af5926 Turn the fixed-float convert macros into inline functions, like those in GZDoom. The old macros get to be just the same as calling these inline functions.
(cherry picked from commit 2e27b3ea87cdc870774a1cbe068494d9a1df233d)
2020-09-27 17:43:31 -07:00
James R 7877f8ae0e Fix some merge fuckups 2020-09-27 17:30:36 -07:00
James R 83ebf47588 Don't quake tilt if just going backward
THIS IS A HACK FOR WHEN ANGLE IS 90 DEGREES

(cherry picked from commit a6a7c8d661ee019d9dc2030ba3b76a4e7486cd09)
2020-09-27 17:21:40 -07:00
James R 554dfb6ce7 Big Large tilt while sliptiding
(cherry picked from commit e560ad4b78a74c2210a47c380ff1b45100a8e4a6)
2020-09-27 17:21:40 -07:00
James R 2c5e7e8f9a Require slope angle > 11.25 to tilt camera
(cherry picked from commit d4c2b81897752240cb0d0b63f4a3de4cd45edf90)
2020-09-27 17:21:40 -07:00
James R dcb6b475ea Quake tilt in correct direction
(cherry picked from commit 5f0cae44e20201cd32b895fe4dba2ce1a43b9137)
2020-09-27 17:21:40 -07:00
James R 5070123d11 Remove inverse slope option, merge quaketilt and slopeview into tilting cvar
(cherry picked from commit 3e9e51cf18f31d02c1e4330d9d49c16145da4da6)
2020-09-27 17:21:40 -07:00
James R 536589902d Reduce quake tilting
(cherry picked from commit 079fb7c7a4c4a9f9b9a3c2228551c56071e47414)
2020-09-27 17:21:40 -07:00
James R ab0d7f91a1 angle_t -> INT32
(cherry picked from commit a413e4f701577252f8bc5c401583e84711455ca5)
2020-09-27 17:21:40 -07:00
James R 99de2b6b66 Make fucking with the window optional 2020-09-27 17:21:40 -07:00
James R b65ecd6ecf bruhhhhh 2020-09-27 17:21:40 -07:00
James R a2913ffba6 Slower roll 2020-09-27 17:21:40 -07:00
James R 56b7a15403 You have entered the comedy area 2020-09-27 17:21:40 -07:00
James R e8e10497b8 Please turn it on 2020-09-27 17:21:40 -07:00
James R 319cef25da Make rolling quake optional 2020-09-27 17:21:40 -07:00
James R b1d2db56f8 Revise cvars, inverseslope is now the default 2020-09-27 17:21:40 -07:00
James R 39ecdd1591 Rumble rumble 2020-09-27 17:21:40 -07:00
James R 3b5057067c One last adjustment 2020-09-27 17:21:40 -07:00
James R e1a2c1464f QUAAAAAAAAKE 2020-09-27 17:21:40 -07:00
James R e11eb792ea GONNAHURL HARDCODE 2020-09-27 17:21:40 -07:00
James R cfa8485eee lmao 2.2 2020-09-27 17:21:39 -07:00
James R 421d1da205 Squashed commit of the following:
commit ec89015662e12dada02877feb9309b565a07b2a4
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 11:19:59 2020 -0600

    Fix loss of aimingtody precision at high FOV

commit f6efe19fca206f972ebe567051648b3b11f900c2
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 11:15:36 2020 -0600

    Use generally higher zooms and fix fuzzy edges

commit 5757f24342f9dfdebe7bedc226f237bd0aea5cca
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 10:53:45 2020 -0600

    Reduce the number of distinct roll angles

commit 8679606ebb56975a93b7140184b45170b82bc3fe
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 10:53:23 2020 -0600

    Remove a couple adds from each pixel of morph mapping

commit af4479924ad616ddf50daee4d1886a59f159607a
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 10:53:00 2020 -0600

    Fully clip drawing to roll-used screen bounds

commit 8868fc4d8abce1b6393303155e758921f7ef9e4f
Author: fickleheart <fickle@tinted.red>
Date:   Sat Jan 18 00:16:18 2020 -0600

    Fix lighting discrepancies between different FOVs

commit 1d221a453a183d3933b9176436e91efca9632011
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 23:21:11 2020 -0600

    Avoid rendering unused left/right edges of screen while rolling

commit 21ccefe4eb96e3b3f3216025f40d6271faaac206
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 22:03:16 2020 -0600

    Fix sky texture scaling wrong with fov changes

commit 7bd9344dd01cf541d86d3e7965e7037fb85ca494
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 21:55:16 2020 -0600

    I think this fixes the compile errors

commit 64c4a4c02c6a59264446e9a43593e7397b774baa
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 20:39:38 2020 -0600

    Fisheye lens experiments

commit 2b7d75126e8e8641a4b413c74b3c65da87e0d309
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 20:39:15 2020 -0600

    Add DBG_VIEWMORPH to view pre-transformed view

commit 84329fcd2677a42860f986e06b901434bc44966e
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 19:01:45 2020 -0600

    OGL can have little a viewroll

commit 7cf563eadd0c2a4e1977c7024ef40975159e5aff
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 18:32:13 2020 -0600

    Un/archive viewrollangle in netsaves

commit d63aa1031e4c26d0fe6f077e15764aa27c55005b
Merge: e23f632cd 9a1cb0e30
Author: fickleheart <fickle@tinted.red>
Date:   Fri Jan 17 18:27:15 2020 -0600

    Merge remote-tracking branch 'upstream/next' into viewroll

commit e23f632cdbc687039ec25297ae0105142135e1a1
Author: fickleheart <fickle@tinted.red>
Date:   Tue Jan 14 23:44:21 2020 -0600

    Clean up fisheye and fix crashes

commit cdbea0be26067a5774778ba51a18df7aa661ce80
Author: fickleheart <fickle@tinted.red>
Date:   Tue Jan 14 23:30:39 2020 -0600

    Revert "LMAO fisheye"

    This reverts commit cd957d84f7332fc71ebd1924aaa2b533684cc07d.

commit cd957d84f7332fc71ebd1924aaa2b533684cc07d
Author: fickleheart <fickle@tinted.red>
Date:   Tue Jan 14 23:30:19 2020 -0600

    LMAO fisheye

commit c25e9696760afa898f24acab9ff43378e4156499
Author: fickleheart <fickle@tinted.red>
Date:   Tue Jan 14 23:29:56 2020 -0600

    wip viewroll stuff
2020-09-27 17:21:21 -07:00
Monster Iestyn 8a5fd38bca clarify the situation a bit more in the comments
(cherry picked from commit 5c33ff04581abe44e1c8ad03e680ff918b9dc0d2)
2020-09-27 16:50:43 -07:00
Monster Iestyn 31237935da move -warp code to a later part of D_SRB2Main so G_LoadGameData isn't upset by G_SetGameModified
(cherry picked from commit 903cc311a711d80436215e7f7c897a447daf2539)
2020-09-27 16:50:43 -07:00
James R 93a76c10de Don't let us warp to a map that doesn't exist (really!)
Okay so 6464df9876e472d1210aabce4237d02af38377e1, I WAS mistaken! Except that's
not how you check for a map's existence, at least not how the old map command
did it.

(cherry picked from commit 566b4a1626399b1c1621bf8b4ab1f8426c789c36)
2020-09-27 16:50:43 -07:00
James R 9e33e16d26 If we move the -warp code down, map searching can be used
(cherry picked from commit 404f3c13e4ed1d9e1a375bba1c2ae59b4f694e0e)
2020-09-27 16:50:43 -07:00
James R 9885ab164a I'm still an idiot
(cherry picked from commit 0a014755b98fb909aed4a12feba00744bc2af225)
2020-09-27 16:50:42 -07:00
James R 9a2ff50f5a Who cares?
(cherry picked from commit 2ffff56b391235257c65eb23e539926c4da6ac62)
2020-09-27 16:50:42 -07:00
James R 52a863d1fd Split map code checking from Command_Map_f
(cherry picked from commit 19aafbfd0b9bde40809ca91195d4636899504708)
2020-09-27 16:50:42 -07:00
James R 1adae3deea Maybe I'm mistaken but this probably isn't needed
(cherry picked from commit 6464df9876e472d1210aabce4237d02af38377e1)
2020-09-27 16:50:17 -07:00
James R bd253c0e7e Use a third variable of XOR nonsense
(cherry picked from commit d5816d44f337c6eb82d937959f971fe45a5eec2a)
2020-09-27 16:50:17 -07:00
James R e5fa66a2a9 Warn if gametype number is out of range to map command
(cherry picked from commit 6ffb18c4b157f9efecec6a104ef930dd71f8b986)
2020-09-27 16:50:01 -07:00
James R 401f30f27d Check for out of range gametype on map change
(cherry picked from commit 9b96964cbbfc20565a8cfdb741f4927f36df7899)
2020-09-27 16:50:01 -07:00
James R 05246f36a6 Fix strcasestr SIGSEGV in the case of only upper case strchr returning NULL
(cherry picked from commit c5d73e37bbc0c9fa8fd1dd874ac782b655068576)
2020-09-27 16:50:01 -07:00
James R dc23895875 Add back the encore parameter 2020-09-27 16:50:01 -07:00
James R 19443fec4c Merge descrepancies 2020-09-27 16:50:01 -07:00
James R a5bf7719e7 Warn if the gametype is not valid at all!
(cherry picked from commit 7776c59cddaa4cc09dfdb2f15192a194fda36eb7)
2020-09-27 16:50:01 -07:00
James R 7c3aedc48e Optimizations from LJ and generic functions
(cherry picked from commit 359d8a2c254222d4e44934ec71d56b9511dd9379)
2020-09-27 16:50:01 -07:00
James R 9a054ab989 Warn if the first argument is an option
(cherry picked from commit c9aad2d1862e92fc78d8dfbd5d1f2c5969d90d84)
2020-09-27 16:50:01 -07:00
James R 93c351a38e Get map name from multiple arguments
(This means you don't need quoting.)

(cherry picked from commit 46fbed8b716f96a7e87ac4c68ca3ee98c8c6a25c)
2020-09-27 16:50:01 -07:00
James R fb858dd64b So you don't like macros?
(cherry picked from commit 5fd6561d464d53521343dd4abae6b08e42719885)
2020-09-27 16:50:01 -07:00
James R 3506ae6d1d :oh:
(cherry picked from commit fb9421893e555629f0fe42705f034e0b639c6905)
2020-09-27 16:50:01 -07:00
James R c7a31ea5de Oh right, the keywords...
(cherry picked from commit a922de8242143a55eb0c19cc5a65bb9126213f29)
2020-09-27 16:48:50 -07:00
James R a6c831b5a0 Merge remote-tracking branch 'origin/master' into freeplay 2020-09-27 16:22:03 -07:00
James R 8515bc410e C90 moment 2020-09-27 16:12:37 -07:00
James R 97a58f48be Don't reset special music in P_RestoreMusic
Because that resets Grow music when you stack Grow over Invincibility, and
Invincibility ends. (Also Megamix Themes.)

Thanks Snu, for calling P_RestoreMusic every tic!
2020-09-27 16:12:37 -07:00
James R 0528e4a686 Reset Invincibility (and Grow) music to the start if stacked
Toggleable via the resetspecialmusic cvar.
2020-09-27 16:12:37 -07:00
James R ea8123abb4 Optionally only resync Invincibility and Grow music 2020-09-27 16:12:37 -07:00
James R 8c0df23a91 Let invincibility and grow music fades work again 2020-09-27 16:12:37 -07:00
James R 48deaacf28 Revert "Menu option for music resync"
This reverts commit a210874ae421007d0bc97b827b4e52c9b076cd90.
2020-09-27 16:12:37 -07:00
James R 8d64faee87 Revert "More intuitive menu for music resync option"
This reverts commit ee78597a42b4e5edf5b22466682b9a00da6bcecf.
2020-09-27 16:12:37 -07:00
James R 119d60eb16 3 AM Moment: The death fades now only apply to local players 2020-09-27 16:12:37 -07:00
James R aec7682d92 Reset the music fade in cvar pointer too
This fixes a bug with death fades.
2020-09-27 16:12:37 -07:00
James R b428549994 Reset mapmusresume on level load etc.
This is probably important, right?
2020-09-27 16:12:37 -07:00
James R 651e287587 Death fades music
Cvars are respawnfademusicout and respawnfademusicback. Both measure
milliseconds.
2020-09-27 16:12:37 -07:00
James R b6b7ec92ed Restore level music to where it left off
Toggleable via the resume cvar.
2020-09-27 16:12:37 -07:00
James R 823ff04e2a Fade level music back in after Invincibility and Grow
Cvars are invincibilitymusicfade and growmusicfade. Both measure milliseconds.
2020-09-27 16:12:37 -07:00
James R 7f0fa6987a Only resync music if in a level 2020-09-27 16:12:37 -07:00
James R e27d54f0fa Don't resync if it's disabled 2020-09-27 16:12:37 -07:00
James R ff119f322a More intuitive menu for music resync option 2020-09-27 16:12:37 -07:00
James R b409100466 Limit music resync threshold to one second 2020-09-27 16:12:37 -07:00
James R 12c53012e4 Menu option for music resync 2020-09-27 16:12:37 -07:00
James R b1eb59dd43 Hey it's audio- ....resynching... 2020-09-27 16:12:36 -07:00
James R d630706377 Merge remote-tracking branch 'origin/master' into map-by-name 2020-09-27 16:10:44 -07:00
James R e2749f8fdc Include d_main.h 2020-09-25 11:25:15 -07:00
Sal 2d7590ed39 Merge branch 'luafiles-srb2home' into 'master'
Open lua files in srb2home

See merge request KartKrew/Kart-Public!234
2020-09-24 23:23:02 -04:00
James R b70d765144 Prepend srb2home to luafiles 2020-09-24 14:43:21 -07:00
Hannu Hanhi fdca019a74 Fix rain bug introduced by render distance 2020-09-21 23:17:22 +03:00
Sal 680b8e3477 Merge branch 'engine-sounds-fix' into 'master'
Fix engine sound volume

See merge request KartKrew/Kart-Public!231
2020-09-20 17:07:31 -04:00
Sally Coolatta 7b6d527bd4 Griefing timer
Spectates/kicks players who aren't making progress, does it even faster if they're going backwards.
2020-09-20 17:03:14 -04:00
Hannu Hanhi b5548b296b Add more render distance options and take it into account in sprite rendering 2020-09-20 22:23:55 +03:00
Hannu Hanhi 06e5d74c4f Render distance option for opengl mode 2020-09-20 21:20:01 +03:00
Sal 1906bf3817 Merge branch 'link-with-exchndl' into 'master'
Link with exchndl, instead of dynamically loading it.

See merge request KartKrew/Kart-Public!230
2020-09-19 15:42:00 -04:00
Sal 7c829dcb97 Merge branch 'silly-numbers' into 'master'
Kill some nonsense

See merge request KartKrew/Kart-Public!232
2020-09-19 15:41:51 -04:00
James R 0523114f56 Kill some nonsense 2020-09-18 13:11:49 -07:00
Sally Coolatta eb0a3c9da3 Make it a bit louder 2020-09-18 01:10:59 -04:00
Sally Coolatta e81a5ee0ca Spectator re-entry cooldown 2020-09-18 00:58:05 -04:00
Sally Coolatta 21422703f5 Fix engine sounds' dampening to a sane value, now that the bug preventing it from working properly was fixed.
You can hear engines in 16P again, but it's not as obnoxiously loud as it was before. Additionally, I commented this function better.
2020-09-17 18:58:44 -04:00
Steel Titanium 13a34e2545 Link with exchndl, instead of dynamically loading it.
It caused problems with crash reports not being made if the current working directory gets changed. Not even recommended anymore per the drmingw readme
https://github.com/jrfonseca/drmingw#exchndl
2020-09-17 15:59:02 -04:00
Sal ccf6584466 Merge branch 'disable-rpc-in-dedicated' into 'master'
Disable Discord Rich Presence on dedicated servers

See merge request KartKrew/Kart-Public!229
2020-09-16 01:43:40 -04:00
James R fbfc305e47 Disable DRPC if dedicated 2020-09-15 19:56:08 -07:00
Sal 85726d7a55 Merge branch 'advertisement-for-rpc' into 'master'
Move master server presence updates to Advertise_OnChange

See merge request KartKrew/Kart-Public!227
2020-09-15 16:22:32 -04:00
Sal c575bc0398 Merge branch 'more-helpful-lua-error' into 'master'
Make "divide by zero" or "modulo by zero" errors show the file and line of where it happened

See merge request KartKrew/Kart-Public!228
2020-09-15 16:22:13 -04:00
Steel Titanium 9b180acdd7 Make "divide by zero" or "modulo by zero" errors show the file and line of where it happened
Shouldn't break scripts as it stops execution as soon it happens, like it already does.
2020-09-14 23:01:47 -04:00
Hannu Hanhi 8c09300e4c Merge remote-tracking branch 'kartpublic/master' into dedicated-server-replays 2020-09-15 00:45:08 +03:00
Sally Coolatta 5181ddd67c Move master server presence updates to Advertise_OnChange
This will probably call DRPC_UpdatePresence slightly less?
2020-09-14 16:34:17 -04:00
Sal 18adf478ca Merge branch 'small-to-issmall' into 'master'
Rename the "small" variable to "isSmall"

See merge request KartKrew/Kart-Public!226
2020-09-14 13:07:17 -04:00
Sally Coolatta e8c91b6727 Rename the "small" variable to "isSmall"
Reported by MK, apparently "small" is considered a data type for some systems. After a little bit of research, apparently it can happen when including <windows.h>... whatever, just rename the variable :p
2020-09-14 12:47:55 -04:00
James R 6f8d246db8 Merge branch 'master' into next 2020-09-13 14:39:01 -07:00
James R 5755bab29a Makefile: add WINDOWSHELL=1 for the Windows detect
(cherry picked from commit 6f51c68c7248d616ad16f66b72cfcc36b7c952f5)
2020-09-13 14:25:08 -07:00
James R 1dca1a3f47 Makefile: automatically detect system to compile for, if no system was specified
This should work for mingw and linux so far.

(cherry picked from commit f92026f98b168f4556d50d3dde403ab6bfd97ff3)
2020-09-13 14:25:08 -07:00
James R 00ff94caa2 Makefile: Make WARNINGMODE the default, optionally disable with RELAXWARNINGS
(cherry picked from commit 9495e6354fed1028c6fc502cc9d946cfdd0b7896)
2020-09-13 14:25:07 -07:00
James R 8c7f9f85fe Is it GCC is it gcc, is it????
(cherry picked from commit ef2bff6383b16385f9874e1c9c6b66c9df794f5b)
2020-09-13 14:24:49 -07:00
James R 655c694bbc Update LATEST_GCC_VERSION too
(cherry picked from commit 4059c6a654a5785199cf0d6dd998bf113b57cd0f)
2020-09-13 14:22:46 -07:00
James R 6c7f95e749 Add missing GCC version flags to the Makefile
(cherry picked from commit 00943e9e82ff46a97a2bc1e3179ce47e53345cc3)
2020-09-13 14:22:45 -07:00
James R 61f35c91a7 It's not always GCC, but it probably is gcc (I hope)
(cherry picked from commit 4e1d54c3322c17276e532ab4d9e875a8c8ebc399)
2020-09-13 14:12:36 -07:00
James R 5ec649c852 Forgot a comma
(cherry picked from commit 193c45aa2f555b56f548f70e7fa0d74a1ce4e412)
2020-09-13 14:12:36 -07:00
James R 6de79f1377 Makefile: Move the PREFIX stuff up so version detection can take advantage of
(cherry picked from commit 489bb81d0065299ffea09b20cfa06dbbedcf247a)
2020-09-13 14:12:36 -07:00
James R deb7bf35b7 Detect the compiler version and set the correct GCC flag
If the version is not supported by the Makefile, the flag for the latest
version supported is set instead.

(cherry picked from commit bf90fbb91f28af30ff79523681e7f73e60121535)
2020-09-13 14:12:36 -07:00
James R c93d259b77 Make cv_advertise no by default, do not save 2020-09-12 18:54:44 -07:00
James R 0cc38dcbc8 Make cv_advertise NETVAR 2020-09-12 18:36:25 -07:00
James R 0f19b1357c Merge branch 'master-server-2' into 'next'
Master Server 2

See merge request KartKrew/Kart-Public!224
2020-09-12 20:25:42 -04:00
James R 8a687941fb Fix master server token 2020-09-12 10:32:14 -07:00
James R 6609b90457 Update update alert message 2020-09-11 20:12:31 -07:00
James R 9d62bb947f Set masterserver to ms.kartkrew.org 2020-09-11 17:39:01 -07:00
James R 4e24ad125c Strip trailing slashes from masterserver address 2020-09-11 17:33:46 -07:00
Sal b9310c0563 Merge branch 'battle-item-balance' into 'next'
Battle item balance

See merge request KartKrew/Kart-Public!222
2020-09-11 12:21:06 -04:00
Sal b4c3cd5e1b Merge branch 'stupid-sound-volume' into 'next'
Apply volume to sounds that have an origin

See merge request KartKrew/Kart-Public!223
2020-09-11 12:17:19 -04:00
Sal 460c627274 Merge branch 'name-change-spam' into 'next'
Don't let players change their name more than five times per minute

See merge request KartKrew/Kart-Public!221
2020-09-11 12:17:00 -04:00
Sally Coolatta 9ccaaafabd 6 -> 2, void the now unused parameter 2020-09-11 12:14:08 -04:00
James R 11ddcfa9a1 int -> INT32 2020-09-11 09:00:18 -07:00
Sal dc91934d0a Merge branch 'save-renderer' into 'next'
Save renderer to file

See merge request KartKrew/Kart-Public!220
2020-09-11 11:59:51 -04:00
James R c2ee6f3b95 901ea3c18 lies btw, you can set the server_contact cvar 4head 2020-09-11 07:10:21 -07:00
James R 5077b1ffef When changing masterserver_update_rate, only update if elapsed time within the new rate 2020-09-11 06:50:31 -07:00
James R 93d3808307 Register/unregister server by changing cv_advertise 2020-09-11 06:49:41 -07:00
James R 901ea3c18b Basically, update master server code to v2
Removes rooms, replaced with cv_advertise and "Advertise" on the host menu.

According to the new API, SRB2APPLICATION is sent instead of MODID. A contact
field was added, but there is no means of accessing it or setting it.

As a slight change, the server list will be populated even on an outdated
version of the game. (The new API was designed with this in mind.) The update
alert is still presented first of course.
2020-09-11 06:11:41 -07:00
James R 22177753d2 Apply volume to sounds with origin too
Previously sounds with an origin would always start at max volume. This is
because the distance calculation adjusts the volume, and that volume needs to
be updated every tic as distance changes. Storing the original volume works.
2020-09-08 22:40:42 -07:00
Sal 55dccfe801 Merge branch 'better-windows-path' into 'next'
SetCurrentDirectory to where the exe lives

See merge request KartKrew/Kart-Public!219
2020-09-02 23:16:13 -04:00
Sally Coolatta 2f2e2200f4 Redo Battle item balance
- Far more inclined to give you Orbinaut, Jawz, Invincibility, and Grow. Far less inclined to give you Bananas or Sneakers.
- Item odds no longer scale with bumper count differences.
2020-09-02 02:53:06 -04:00
James R 17f75903b0 Don't let players change their name more than five times per minute 2020-08-31 20:08:22 -07:00
James R 48b018b2b4 Oops :v 2020-08-31 19:34:43 -07:00
James R 83c2a7d178 Save chosen renderer to file, use on startup if no -software or -opengl parameter 2020-08-31 19:29:09 -07:00
James R 3e6b45abe9 Just SetCurrentDirectory to the exe's folder on windoze 2020-08-31 01:23:56 -07:00
Sally Coolatta 328d6d9a36 Increase cipher length 2020-08-31 00:25:28 -04:00
Sally Coolatta 1c47841487 Remove default dirs on Windows
Cause more issues than fixes. Still around for Linux.
2020-08-31 00:06:47 -04:00
Sally Coolatta da0d0e41df Expand IP_SIZE 2020-08-30 23:41:27 -04:00
Sally Coolatta 651d25a516 Move to D_RegisterServerCommands 2020-08-30 23:35:41 -04:00
Sally Coolatta 85884ad4e2 Bruh, lowercase 2020-08-30 23:31:54 -04:00
Sally Coolatta 6ca451da45 Wrong file 2020-08-30 23:26:00 -04:00
Sally Coolatta 7dea9d28b9 Dedicated servers can change discordinvites without needing RPC support 2020-08-30 23:20:06 -04:00
James R 6d2c7f4ae7 NO_DISCORDRPC to disable rich presence on Windows 2020-08-30 19:11:30 -07:00
James R 7ab1c4a2df Update versions to 1.3 2020-08-30 19:06:31 -07:00
James R 0371a113ef Update patch.kart asset hash 2020-08-30 19:02:31 -07:00
James R 5e9c197f8a Merge remote-tracking branch 'origin/master' into next 2020-08-30 19:01:04 -07:00
Sal 8acc2b6f3c Merge branch 'world-tour' into 'next'
Flush random map pool after all but 3 are played

See merge request KartKrew/Kart-Public!216
2020-08-30 21:49:20 -04:00
Sal b0f89a5dba Merge branch 'easy-colors' into 'master'
Caret color codes in server name

See merge request KartKrew/Kart-Public!218
2020-08-30 21:49:03 -04:00
Sal 1aca163d12 Merge branch 'discord-rpc-support' into 'next'
Discord Rich Presence

See merge request KartKrew/Kart-Public!207
2020-08-30 21:48:44 -04:00
Sally Coolatta 29f156aac2 Use ENTER and ESC
A and B are v2 terminology
2020-08-30 21:42:04 -04:00
James R bca656e4ac Merge branch 'master' into next 2020-08-29 18:22:19 -07:00
James R daf6e66268 Fix stupid NONET
(cherry picked from commit 679bfa21edec6b652def93082da5586e6c755678)
2020-08-29 18:19:39 -07:00
James R 95a026c98d C90?
(cherry picked from commit 1f38db46298181d117432e12e88b326a92b4b785)
2020-08-29 18:19:15 -07:00
James R 3f842937a8 Merge remote-tracking branch 'origin/master' into next 2020-08-29 11:26:52 -07:00
Sally Coolatta 82bfdf9ccc Add join/leave notification sounds 2020-08-27 20:10:25 -04:00
Sally Coolatta 17318ceec7 This should be set for server too!! 2020-08-27 19:36:37 -04:00
Sally Coolatta 51dce9707f Attach initial join discord info to servercfg, so that we don't have a pause from needing to also send XD_DISCORD
XD_DISCORD is now reserved for when the options are changed mid-game
2020-08-27 19:14:45 -04:00
Sally Coolatta c165b0761c Misc changes to how the program runs
- Call DRPC_Init at the end of D_SRB2Main instead of in the middle
- Call Discord_RunCallbacks in D_SRB2Loop instead of G_Ticker
- Fix errorcount nums in I_Error, an old leftover from when Discord_Shutdown was not handled by I_AddExitFunction
2020-08-27 18:50:36 -04:00
James R 54c3aed86c Convert caret color codes to SRB2 color codes 2020-08-27 15:44:06 -07:00
James R f802e9fbcb Convert from caret colors when sending SERVERINFO 2020-08-27 15:43:20 -07:00
Sal 734ce8dee5 Merge branch 'expose-demoplayback' into 'next'
Expose demo.playback to Lua

See merge request KartKrew/Kart-Public!217
2020-08-27 18:18:39 -04:00
Steel Titanium 35122d3a22 Expose demo.playback to Lua 2020-08-27 14:58:46 -04:00
TehRealSalt 86754cf820 Flush random map pool after all but 3 are played 2020-08-27 14:32:44 -04:00
Sal 5e7926d87f Merge branch 'check-defaultdir' into 'master'
Check ~/.srb2kart for srb2.srb

See merge request KartKrew/Kart-Public!215
2020-08-27 14:08:17 -04:00
James R 4c816f4059 Say DEFAULTDIR not .srb2kart 2020-08-26 23:37:52 -07:00
James R 6e3facf8f4 Check DEFAULTDIR for srb2.srb after cwd 2020-08-26 20:20:40 -07:00
Sally Coolatta cb5ab33a93 Merge branch 'next' into discord-rpc-support 2020-08-26 12:56:58 -04:00
Sally Coolatta ee1ea21336 Merge branch 'master' into next 2020-08-26 12:56:38 -04:00
Sal f87b883ba5 Merge branch 'various-compiling-fixes-2' into 'master'
Fix some compile flags

See merge request KartKrew/Kart-Public!213
2020-08-26 09:58:35 -04:00
Sal 7c69e49a05 Merge branch 'too-many-characters' into 'master'
Warn players when going over the skin limit

See merge request KartKrew/Kart-Public!214
2020-08-26 09:58:22 -04:00
ThatAwesomeGuy173 27b72ccbf5 Replace 'ignoring skin' debug print with a proper console warning 2020-08-25 23:13:58 -06:00
Sal 34b6998b2e Merge branch 'various-compiling-fixes' into 'next'
Various compiling fixes

See merge request KartKrew/Kart-Public!212
2020-08-25 18:36:51 -04:00
James R 04d774c765 Fix NOHW compiling 2020-08-24 18:06:00 -07:00
James R 3437b0690a Kill NOHS 2020-08-24 17:58:39 -07:00
James R 16fc87edcf Fix NOMIXER compiling 2020-08-24 17:55:42 -07:00
James R fbde926497 Fix NOPNG compiling 2020-08-24 17:52:55 -07:00
James R 0d57ba1d02 Fix NOGME compiling 2020-08-24 17:51:01 -07:00
Sal bea6b6a9d2 Merge branch 'fix-asktime-really' into 'next'
Avoid underflows on connection screen timer (fixes hosting servers)

See merge request KartKrew/Kart-Public!211
2020-08-24 16:09:33 -04:00
Steel Titanium c6164a1947 Initialize this variable 2020-08-24 01:25:34 -04:00
Steel Titanium 41c742a699 Hopefully the last time... 2020-08-24 01:18:38 -04:00
Steel Titanium 87d2ad0c23 Remind me why NONET exists? 2020-08-24 01:13:59 -04:00
Steel Titanium 04b7051141 This is just stupid 2020-08-24 01:06:10 -04:00
Steel Titanium 84bab3fc9f Turns out compiling with the internal version of curl was broken on CMake the entire time 🙃 2020-08-24 01:00:28 -04:00
Steel Titanium d4006d00c3 Screw you C90 2020-08-24 00:58:14 -04:00
Steel Titanium 509c57a8d6 Haha NONET... 2020-08-24 00:56:53 -04:00
Steel Titanium e58c9ac410 It's discord-rpc, not libgme 2020-08-23 17:45:31 -04:00
Steel Titanium d9cbb69327 Better CMake support
No idea if it compiles on Mac, it does on Linux though, at least for me.
2020-08-23 16:15:33 -04:00
Sally Coolatta 585cb1cfe3 Finish DEVELOP mode functionality 2020-08-23 07:15:33 -04:00
Sally Coolatta 720eced665 Attempt to improve discord-rpc checking in CMake
Haven't ever gotten CMake to compile SRB2, so I'm unable to really check if this works
2020-08-23 06:45:35 -04:00
Sally Coolatta ed58cb5468 Move the .dll's to libs\dll-binaries 2020-08-23 05:58:09 -04:00
Sally Coolatta 175fa43c90 Update win 32 bit libraries, implement win 64 bit libraries 2020-08-23 05:47:55 -04:00
Sally Coolatta e2f3e76db8 Merge branch 'next' into discord-rpc-support 2020-08-23 05:32:32 -04:00
Sal 88e7b6198d Merge branch 'lineriding-b-gone' into 'next'
Kill offroad line riding

See merge request KartKrew/Kart-Public!199
2020-08-23 05:09:55 -04:00
Sally Coolatta 7d380c326b Merge branch 'master' into next 2020-08-23 04:44:27 -04:00
Sally Coolatta 3ce6b8a54f Fix version string 2020-08-23 04:44:05 -04:00
Sal d0629a9c13 Merge branch 'fix-ogl-timedemo' into 'master'
Fix timedemo in OpenGL mode

See merge request KartKrew/Kart-Public!209
2020-08-23 04:38:57 -04:00
Sal 3f16ef2eaa Merge branch 'misc-optimizations' into 'master'
Remove ESLOPE POLYOBJECTS POLYOBJECTS_PLANES #ifdefs (backport srb2 2.2)

See merge request KartKrew/Kart-Public!204
2020-08-23 04:38:05 -04:00
James R 035fab5f6c Merge branch 'demoleak-fix' into 'master'
Fix replay recording memory leak

See merge request KartKrew/Kart-Public!208
2020-08-22 21:42:34 -04:00
James R 5daaef7e87 Avoid underflow hacks completely with asktime 2020-08-22 18:38:20 -07:00
James R 89ba08a376 Make join requests options on pause menu selectable even if you're already in the menu 2020-08-22 17:16:49 -07:00
James R 805fb01df9 Skip XD_DISCORD payload in non Discord builds 2020-08-22 16:26:15 -07:00
Hannu Hanhi 4210352be9 Fix timedemo in OpenGL mode 2020-08-23 00:10:50 +03:00
Hannu Hanhi 5c13727aac Fix replay recording memory leak 2020-08-22 22:04:45 +03:00
Sally Coolatta 084756ec72 Fix XOR not working 2020-08-22 09:46:25 -04:00
Sal cc3eb94b26 Merge branch 'dehacked-slipup' into 'next'
Correct misplaced MT_ARIDTOAD listing

See merge request KartKrew/Kart-Public!206
2020-08-22 08:16:41 -04:00
Sally Coolatta 5de27be169 Merge remote-tracking branch 'public/next' into discord-rpc-support 2020-08-22 07:28:21 -04:00
Sally Coolatta e5238d095f Remove timer variable
Doesn't feel necessary to me anymore, especially with how the menu works
2020-08-22 07:25:47 -04:00
Sally Coolatta f61e3a77bd Ask to join is a menu option, rather than trying to replace your menu temporarily. 2020-08-22 07:16:52 -04:00
lachwright 32f2ed4a53 Correct misplaced MT_ARIDTOAD listing 2020-08-22 17:35:31 +08:00
Sally Coolatta 6f9025a14d Merge branch 'discord-rpc-support' of https://git.magicalgirl.moe/KartKrew/Kart into discord-rpc-support 2020-08-22 05:03:43 -04:00
Sally Coolatta 3d5d5ad8b5 Always have XD_DISCORD defined, so that people compiling without Discord support can connect to servers that do. 2020-08-22 05:03:08 -04:00
lachwright e01c7aef32 Compile m_menu.c without HAVE_DISCORDRPC 2020-08-22 16:58:59 +08:00
Sally Coolatta 3c128660b4 Add envelope icon, add sounds 2020-08-22 04:54:08 -04:00
Sally Coolatta 98f586a2f9 Menu is pretty now 2020-08-22 03:52:07 -04:00
Sally Coolatta 571c670670 Add some options, maxplayer/allownewplayer dont need to be netvars anymore 2020-08-22 01:53:27 -04:00
Sally Coolatta 8ff62cdc7f Base xor off of inital seed 2020-08-22 00:11:33 -04:00
Sally Coolatta e0d0a3a74e Ignore any duplicate requests
You will still get a message for them, so if they're being annoying you will want to block them anyway, but at least it won't clog up the game.
2020-08-22 00:01:56 -04:00
Sally Coolatta 4d8c65bb73 Don't reset menu in drawing function 2020-08-21 04:17:36 -04:00
Sally Coolatta 983a978c12 Merge branch 'discord-rpc-support' of https://git.magicalgirl.moe/KartKrew/Kart into discord-rpc-support 2020-08-21 04:14:36 -04:00
Sally Coolatta 339be6f90e Invite menu started
Functions! Is not pretty yet!
2020-08-21 04:14:33 -04:00
James R 0b07d0ed6f curl_global_cleanup 2020-08-20 22:36:41 -07:00
Sally Coolatta 7b1e14d017 Don't show map image for title screen demos 2020-08-21 01:18:40 -04:00
Sally Coolatta 6a86d86828 XOR IP addresses before sending them to Discord
Not complex because we aren't sending anything that isn't easily accessible via the Master Server anyway, just means we aren't sending plain-text IPs to Discord. Might be improved by basing the XOR key on other values (base RNG, maybe version) so that it's not like *right* there
2020-08-21 01:16:11 -04:00
Sal 0ca9f8f07d Merge branch 'conenction-screen-improvements' into 'next'
Connection screen improvements

See merge request KartKrew/Kart-Public!187
2020-08-21 00:11:37 -04:00
Ashnal 9e1d7146ad Fixed retry timeout to no ttrigger when starting a local server 2020-08-20 23:38:04 -04:00
Ashnal 247239c2bc Add return false to the connect timeout 2020-08-20 23:09:12 -04:00
James R 5b0cb1afcb Merge remote-tracking branch 'origin/master' into next 2020-08-20 19:55:03 -07:00
FlykeSpice c09cb6d762 Remove POLYOBJECTS POLYOBJECTS_PLANES #ifdefs(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
FlykeSpice 00137ef4ea Remove ESLOPE #ifdef(backport from srb2 2.2) 2020-08-20 13:02:13 -04:00
Sal 79c299bf31 Merge branch 'port-port-port' into 'master'
2.2's random client port

See merge request KartKrew/Kart-Public!201
2020-08-20 12:19:52 -04:00
Sal 67b37e54b6 Merge branch 'snapback' into 'master'
Instantaneous lookback camera (v2 backport)

See merge request KartKrew/Kart-Public!203
2020-08-20 12:19:41 -04:00
Sal 4c363db516 Merge branch 'gme-fixes-cleanup' into 'master'
GME cleanup and fixes

See merge request KartKrew/Kart-Public!202
2020-08-20 02:07:19 -04:00
lachwright d0d6128053 Instantaneous lookback camera (v2 backport) 2020-08-20 13:41:03 +08:00
Ashnal aa2b25e667 Well actually, lets fix all comparisons of askset to use the same comparison
If we initialize to I_GetTime() - NEWTICRATE*3 it never underflows and everything is good
2020-08-20 00:54:18 -04:00
Ashnal 1e5f1418e1 Isolate G_BeginRecording in P_SetupLevel to only dedicated servers
Everything else goes back to doing it in Got_Mapcmd
2020-08-19 23:10:53 -04:00
Steel Titanium e3f07b33bb GME cleanup and fixes
Just some stuff backported from SRB2 2.2, well mostly

get_zlib_error function to reduce code duplication

Return false if it fails to load the VGZ lump

Reduce redundant calls to gme_set_equalizer

Fix sometimes loading a VGZ crashing the game
2020-08-19 22:39:12 -04:00
James R 94512c49e4 -clientport (it's back!) and -serverport, which is an alias to -port
If you ever need to, you can change the client port number.

(cherry picked from commit 843d9b9f0a345330d97c579e94f208eb2b65c156)
2020-08-19 18:16:54 -07:00
James R b77541b51d Use a pointer for port_name
Using strcpy is stupid because we don't know how long the argument would be.
There's no need for a buffer anyway.

(cherry picked from commit 4e321012894b2aa87e312597f19be26b30545a8b)
2020-08-19 18:16:53 -07:00
James R b1f5e66a23 Use a random port when connecting
(cherry picked from commit f584b61c93a97e1a9852f306acba673ced21e03a)
2020-08-19 18:16:53 -07:00
James R 65968f00d3 Fix tiny mistake with the last commit 2020-08-19 17:55:01 -07:00
James R 1cd7c3b747 Rearrange time comparsion on asksent to make it underflow friendly
This fixes '-connect'. NEWTICRATE*5 is subtracted from asksent after
CL_LOADFILES. If this happens too early, an underflow will occur.
2020-08-19 17:49:47 -07:00
Sal a335d6b583 Merge branch 'fix-nocurl' into 'master'
Fix NOCURL compiling

See merge request KartKrew/Kart-Public!197
2020-08-19 20:36:14 -04:00
Sal c6f85cde59 Merge branch 'httpsource-without-curl' into 'master'
Let servers send httpsource without curl

See merge request KartKrew/Kart-Public!196
2020-08-19 20:36:06 -04:00
Sal ed41d5df9e Merge branch 'kart-io' into 'next'
Lua Input/Output library

See merge request KartKrew/Kart-Public!200
2020-08-19 20:35:56 -04:00
Ashnal cadb4719cf Added m_menu_mutex to M_Drawer in connection screen 2020-08-19 19:52:24 -04:00
Ashnal 648a950ac8 Merge remote-tracking branch 'public/next' into conenction-screen-improvements 2020-08-19 19:08:33 -04:00
Ashnal 7c5740d98f COnfirm box now respects rebindable accelerate and brake on keyboards 2020-08-19 18:01:56 -04:00
Sal 8ee7443705 Merge branch 'kimmy-osx-fixes' into 'master'
[OSX] Fix "SIGILL: illegal instruction" on macOS Catalina

See merge request KartKrew/Kart-Public!194
2020-08-18 03:52:47 -04:00
James R 1bf0794d6a Copy the saved wad directory to srb2path 2020-08-17 21:27:59 -07:00
James R c0cac645f8 hate hate hate hate 2020-08-17 21:22:25 -07:00
Sally Coolatta 234983909a Don't show gametype when watching replays 2020-08-17 23:33:55 -04:00
James R 2a2d43a20b Save srb2path to %LOCALAPPDATA%\SRB2Kart\lastwaddir, and chdir here if srb2.srb cannot be found
Windows code goes brrr
2020-08-17 20:11:32 -07:00
Latapostrophe 392b24b769 Merge remote-tracking branch 'stjr/io' into kart-io 2020-08-17 20:22:02 +02:00
Sally Coolatta c76c1b8420 Show game speed and encore 2020-08-17 09:08:05 -04:00
Sally Coolatta 27654ffb6a Don't allow invites if allowjoin is off 2020-08-17 06:55:43 -04:00
Sally Coolatta d163f67700 Update presence when maxplayers is changed 2020-08-17 06:52:46 -04:00
Sally Coolatta 83192827dc Fix ZONE being all caps, standardize the function comments 2020-08-17 06:13:32 -04:00
Latapostrophe d56fdbb933 Kill line riding for offroad 2020-08-17 12:01:16 +02:00
Sally Coolatta da5bda72ee Add distinct images for map hell & normal custom maps 2020-08-17 04:42:22 -04:00
Sally Coolatta a04361a151 Check supported skins by name instead of number, so we can have bonuschars images 2020-08-17 04:42:05 -04:00
Ashnal eb81bea943 Move code down so declarations are above to appease C90 2020-08-17 04:03:02 -04:00
Ashnal 03150e5fe6 Move declaration to appease C90
also remove some extra tab characters
2020-08-17 03:56:13 -04:00
Ashnal afc6bdbc7e Fixes for file accounting
mainwads+1 to not use the first mainwad
2020-08-17 03:51:19 -04:00
Ashnal 9a9d81bbe0 New message boxes for downloads and full server waiting
Downloads must be confirmed before proceeding
Allows downloading mods for full servers
Client will wait for a slot to open on a full server to join
This has a 5 minute timeout
2020-08-17 03:47:23 -04:00
Sally Coolatta 9f4ad1303e Put the cvar in the menu 2020-08-17 02:31:30 -04:00
Sally Coolatta 886db8cde1 Guard discord.h, add cvar to disable rich presence 2020-08-17 02:25:05 -04:00
Sally Coolatta 41a401f703 Merge branch 'master' into next 2020-08-17 02:05:31 -04:00
Sally Coolatta 8d386fba66 Display time elasped/time limit 2020-08-17 02:05:16 -04:00
James R 7a05a8acf7 Do not do master server things when NOCURL 2020-08-16 21:42:58 -07:00
Sally Coolatta d709e9782d Use curl to retrieve your own IP address properly 2020-08-17 00:29:52 -04:00
James R 5dc3ca3934 Remove HAVE_CURL guards on sending httpsource 2020-08-16 20:39:46 -07:00
Sally Coolatta 47f95e22d5 Allow lowercase level name / zone title
Might have some other side-effects, we'll need to see
2020-08-16 22:13:21 -04:00
Sally Coolatta f5bd9d097f Merge remote-tracking branch 'public/master' into discord-rpc-support 2020-08-16 22:12:36 -04:00
Sally Coolatta 07c916f6d2 Little fixes 2020-08-16 21:31:03 -04:00
Sally Coolatta df0cc6a727 No previous prototype for K_DropKitchenSink 2020-08-16 21:18:33 -04:00
Sally Coolatta c8fa1dcfb5 Merge remote-tracking branch 'public/next' into discord-rpc-support 2020-08-16 20:57:31 -04:00
AJ Martinez 8758065856 C90 wizard shit 2020-08-16 10:23:59 -05:00
Kimberly Wilber 1bfcec9242 [OSX] Fix "SIGILL: illegal instruction" on macOS Catalina
on OSX, strncpy may copy to overlapping (protected) memory. this
sometimes happens when loading WAD files.

This patch eliminates these problems for me
2020-08-15 12:16:05 -04:00
Ashnal f800159bb8 Improve total downloads bar
Now has total file size AND number of files
2020-08-15 01:03:45 -04:00
James R a772096757 dumbass doesn't test changes before pushing directly to next
(cherry picked from commit be14b8a564a89a5afb84ac19f1586f3db7f68367)
2020-08-14 08:27:25 -07:00
AJ Martinez 42dacffb12 Add command to save replay midrace 2020-08-14 03:21:53 -05:00
Sal 06f36224ee Merge branch 'http-mserv' into 'master'
Make the HTTP Master Server official

See merge request KartKrew/Kart-Public!193
2020-08-10 16:49:47 -04:00
James R 1a1c215a91 Add http-mserv to fuck 2020-08-09 23:32:43 -07:00
Sal 9590a769ba Merge branch 'maxnetnodes-2-electric-boogaloo' into 'master'
Bump MAXNETNODES to 127

See merge request KartKrew/Kart-Public!192
2020-08-09 22:28:50 -04:00
James R 9d9f8fd8a3 Bump MAXNETNODES to 127 2020-08-09 18:26:34 -07:00
Ashnal cc78ef2c78 Now that the server doesn't erroneously send the last mainwad
As the first part of fileneeded, we must load file 0
2020-08-09 00:48:53 -04:00
Ashnal 4c5eb0d6bc Redo logic for lots of files vs not
Now new CL state for checking files so it can spread over tics
whether we ask for the extended list or not
2020-08-09 00:47:55 -04:00
Sal 97c4e7dfff Merge branch 'indirectitemcooldown' into 'next'
Fix Shrink, SPB and Hyudoro cooldowns never resetting?

See merge request KartKrew/Kart-Public!191
2020-08-06 12:19:27 -04:00
Sally Coolatta c63022350d Merge branch 'master' into next 2020-08-06 12:15:55 -04:00
AJ Martinez 3dada09aa5 Fix Hyudoro cooldown never resetting 2020-08-06 10:51:53 -05:00
AJ Martinez 2add55eb04 Fix indirect item cooldown never resetting 2020-08-06 10:34:16 -05:00
Sal b320256a47 Merge branch 'master' into 'master'
Clarify addon-related messages

See merge request KartKrew/Kart-Public!190
2020-08-05 06:48:44 -04:00
AJ Martinez 8284caf1bc Clarify addon-related messages 2020-08-05 00:40:56 -05:00
Sal 8791fd8835 Merge branch 'mine-punt-sync-fix' into 'next'
Fix desyncs caused by K_PuntMine

See merge request KartKrew/Kart-Public!189
2020-07-25 03:55:28 -04:00
Sal 341ce8f4a3 Merge branch 'rocket-sneaker-hnext-fix' into 'next'
Rocket sneaker and sink hnext fix

See merge request KartKrew/Kart-Public!188
2020-07-25 03:55:22 -04:00
Ashnal 6d0b1e93c6 Appease C91 2020-07-23 21:05:00 -04:00
Ashnal 733aefa64a Also lets do this for kitchen sinks
They also ignored in K_DropHnextList
2020-07-23 20:12:35 -04:00
Ashnal 8e46eabf8c Make sure G_BeginRecording gets called for time attack 2020-07-17 00:14:03 -04:00
Ashnal 6562c9b755 Moved K_DropRocketSneaker call into K_StripItems
This should catch when DropHnextList misses it
Should probably fix sinks too ...
2020-07-15 09:17:35 -04:00
Ashnal 3bccf01d4f Properly handle rocket sneakers when shrinking 2020-07-14 19:50:37 -04:00
Ashnal 943a898352 Some safeguards for K_DropRocketSneaker usage 2020-07-14 19:45:15 -04:00
Ashnal 0637ed89aa Fixing RocketSneakers
New function specifically for dropping rocketsneakers K_DropRocketSneaker
Used by Eggbox touchspecial to properly dispose of shoes and clean up hnext
Now also used by the shoe thinker to drop themselves
Fixes angle of spent shoe launch
2020-07-14 18:45:45 -04:00
Ashnal ddc0bc16ab Add clean up to K_PuntMine
This cleans up hnext when a mine shield is P_RemoveMobj'ed while being punted
Otherwise, hnext could point to a removed mobj and cause undefined behavior
This also fixes the bug where if you have multiple mines in your slot, drag one
and have it punted, all your unused mines would disappear.
This should/may fix the crashes/desyncs I've observed in gameplay when a held mine is punted.
2020-07-14 00:21:46 -04:00
Ashnal 159316b155 Remove now unused ret var 2020-07-04 22:25:02 -04:00
Ashnal 2c0671d8fd Let's just ALWAYS go into ask file list mode
Easier to maintain and understand a single code path
Rather than switching behavior based on amount of addons
2020-07-04 01:12:38 -04:00
Ashnal 7da3d70f6c Remove Checking Files spam 2020-07-02 21:48:45 -04:00
Ashnal b8fdd6b89c Fix file number accounting
Should ensure appropriate accounting and prevent loading of
server files if it would put us over MAX_WADFILES
2020-07-02 20:57:33 -04:00
Ashnal 774b917c0e Correct total files to load off by one 2020-07-02 17:47:10 -04:00
Ashnal 6fe8a6c96a Changed "this server has a lot of addons!" to
"Checking server addon list ..." to be more informative
2020-07-01 23:52:43 -04:00
Ashnal 03d479fdb6 Connection screen no longer freezes up while
searching for addons on disk
Game will run one tic after every file status is updated
2020-07-01 23:48:14 -04:00
Ashnal 8eb9a6946f Fix X/0 files display bug for legacy downloader
Also made "Waiting to Download" consistent with other states
2020-07-01 21:40:21 -04:00
Sal c3c466575c Merge branch 'fix-pk3-leak' into 'master'
Fix memory leak in W_ReadLumpHeaderPwad

See merge request KartKrew/Kart-Public!182
2020-07-01 18:36:48 -04:00
Sal 9f4b4d84a6 Merge branch 'http-useragent-fix' into 'master'
Fix user agent for HTTP downloads being set as SRB2Kart/v1.1.2

See merge request KartKrew/Kart-Public!185
2020-07-01 18:36:33 -04:00
Sal d2098c23fc Merge branch 'ogl-color-fix3' into 'master'
Ogl colormap fix third attempt

See merge request KartKrew/Kart-Public!184
2020-07-01 18:36:19 -04:00
Sal b6272fa299 Merge branch 'chatbug-fix' into 'master'
clientside ack fix

See merge request KartKrew/Kart-Public!186
2020-07-01 18:35:57 -04:00
Ashnal ad94b29558 Experiemntal clientside ack fix
Stops the client from using reliable packets before joining a server
Clients can time out during addon loading
sending reliable packets before then can cause out of order acks
This causes joinbug, chatbug, and chatspam, as well as
general server instability due to unnecesary packetspam
2020-06-27 23:43:15 -04:00
Ashnal f2593219a6 Adjust text position 2020-06-27 23:40:13 -04:00
Ashnal d96c938dbf Add progress bar for file loading 2020-06-27 23:26:38 -04:00
Ashnal 9d9105929b Adjustment to new progress text 2020-06-27 21:17:21 -04:00
Ashnal fc9f40a177 New "Overall Download Progress" bar
Shows progress of all file downloads pre-join
2020-06-27 21:17:04 -04:00
Ashnal 12d40a07cc Load one file per tic
Prevents game from locking up when loading large file lists
2020-06-27 20:58:33 -04:00
Steel Titanium 3af4aaff9c Fix user agent for HTTP downloads being set as SRB2Kart/v1.1.2 2020-06-23 18:39:02 -04:00
James R bae37aea2c ADD to the buffer size 2020-06-14 19:13:22 -07:00
Hannu Hanhi 44159de7f3 Colormap alpha handling was still wrong, hopefully it's correct now 2020-06-14 15:03:40 +03:00
Sal eea8c3776c Merge branch 'ogl-color-fix-fix' into 'master'
Fix bug in the OpenGL colormap bugfix

See merge request KartKrew/Kart-Public!183
2020-06-13 22:45:47 -04:00
Hannu Hanhi c382794109 Fix uninitialized alpha when reading colormaps 2020-06-13 23:34:13 +03:00
Hannu Hanhi 38c3d78d8a Cleaner version of the W_ReadLumpHeaderPwad memory leak fix 2020-06-13 21:37:33 +03:00
Hannu Hanhi e9847336d9 Fix indentation and compiler warnings 2020-06-13 17:48:58 +03:00
Hannu Hanhi 2f65955496 Add missing inflateEnd to fix memory leak in W_ReadLumpHeaderPwad 2020-06-13 17:07:05 +03:00
Sryder b96d315f25 Merge branch 'master' of git@git.magicalgirl.moe:KartKrew/Kart-Public.git into next 2020-06-13 14:15:58 +01:00
James R e7d949aeb2 masterserver_token is back 2020-06-12 23:47:08 -07:00
James R 9b3456a860 Merge remote-tracking branch 'origin/master' into http-mserv 2020-06-12 23:36:39 -07:00
Sal f7e74e8884 Merge branch 'ogl-encore-color-fix' into 'master'
Fix bug in OpenGL encore colormaps

See merge request KartKrew/Kart-Public!180
2020-06-12 22:39:18 -04:00
Ashnal d66b51bff6 Fix comment formatting 2020-06-02 22:28:18 -04:00
Ashnal 6c6fc4b69b Dedicated server replays
netdemo_record must be set to "Auto Save" to work
2020-06-02 22:22:07 -04:00
Hannu Hanhi d9e2336277 Guil's encore color bugfix with some additional cleanup 2020-06-01 21:14:17 +03:00
Sal 691a567f5d Merge branch 'fix-ogl-log-crash' into 'master'
Fix opengl crashing on startup due to lack of checks

See merge request KartKrew/Kart-Public!179
2020-05-28 09:47:16 -04:00
Steel Titanium 3f3cb2c976 Fix opengl crashing on startup due to lack of checks
Also fixes the log file not being written to the home directory.
2020-05-23 16:21:26 -04:00
Sryder b03f950c5a Merge branch 'master' into next 2020-05-20 16:50:56 +01:00
Sryder e229aabf22 Merge branch 'fix-clang-compile' into 'master'
Fix clang compiling

See merge request KartKrew/Kart-Public!176
2020-05-20 11:49:47 -04:00
Sryder 6b8ea22bdb Merge branch 'opengl-maybe-uninitialised' into 'master'
Some uninitialised variables that GCC 4.4 complains about

See merge request KartKrew/Kart-Public!177
2020-05-20 11:49:34 -04:00
Sryder 831ed3dedc Merge branch 'itemodds-fallthrough-fix' into 'next'
Mistaken fallthrough in item roulette.

See merge request KartKrew/Kart-Public!178
2020-05-20 11:49:22 -04:00
Sal 73b65b4725 Merge branch 'no-spb-forcing-in-2p' into 'next'
Don't force SPB in 1v1

See merge request KartKrew/Kart-Public!175
2020-05-20 10:11:19 -04:00
Sal 5f70d3e170 Merge branch 'visplane-fix' into 'master'
Fix visplane getting allocated twice

See merge request KartKrew/Kart-Public!172
2020-05-20 10:11:06 -04:00
Sryder 9e6980c8ae Fix a fallthrough issue that could cause thundershield to be rolled less often than intended. 2020-05-20 11:53:14 +01:00
Sryder 66930a0277 Initialise these to 0 just to stop GCC 4.4 from complaining.
This should be okay since 0 generally means "nothing" for these, and they should always be set before being used later on.
2020-05-20 11:47:22 +01:00
Sryder 290abe4fce D_ModifierKeyResponder is unused now so remove it. 2020-05-20 11:37:38 +01:00
Sally Coolatta a7c88d40db Merge branch 'master' into next 2020-05-19 20:40:12 -04:00
TehRealSalt 21e6190932 Don't force SPB in 1v1
(cherry picked from commit 22af2040a021cff243773a0f23371f20e69dfca5)
2020-05-19 20:12:53 -04:00
Sryder c70cf4806b Merge branch 'extra-travis-deploy' into 'master'
Fix Travis Deployment

See merge request KartKrew/Kart-Public!174
2020-05-19 20:10:42 -04:00
Sal e42ae1ed79 Merge branch 'freeplay-be-nice' into 'master'
Also apply HUD translucency to FREE PLAY

See merge request KartKrew/Kart-Public!161
2020-05-19 17:29:05 -04:00
Sal 1d5774fe2f Merge branch 'ghostly-luavars' into 'next'
Fix Luavars being saved into Record Attack ghosts/replays and potentially crashing

See merge request KartKrew/Kart-Public!168
2020-05-19 17:28:48 -04:00
Sal 71d2d357c1 Merge branch 'displayplayer-gonna-getcha' into 'next'
displayplayers.iterate crashes in replays, is that based?

See merge request KartKrew/Kart-Public!171
2020-05-19 17:28:14 -04:00
Sal bb7481a13e Merge branch 'mr-ogl-boostpad-fix' into 'master'
Fix wrong orientation in some boost pads in ogl

See merge request KartKrew/Kart-Public!173
2020-05-19 17:27:24 -04:00
Sryder bca1dd42a3 Use xenial to build all the versions newer than trusty
I'm not 100% sure why we can't use newer series to build the newer installers. But this seems to be what vanilla does
2020-05-19 20:45:49 +01:00
James R 2d4202ac09 Whoops I used the url to the file instead of the http_source 2020-05-16 21:03:37 -07:00
James R 05b65b6bc8 Merge remote-tracking branch 'origin/master' into http-downloads-auth 2020-05-16 20:48:13 -07:00
Sal cb9e6473a0 Merge branch 'use-extern-you-idiot' into 'master'
Fix GCC 10 linking errors

See merge request KartKrew/Kart-Public!170
2020-05-16 09:01:46 -04:00
Hannu Hanhi c3e1e1df26 Fix wrong orientation some boost pads in ogl 2020-05-16 13:47:21 +03:00
James R 64e27f3698 I forgot extern, now I am the clown 2020-05-15 19:04:03 -07:00
James R 7c072503be Some experimental commands to use auth when downloading from HTTP sources 2020-05-15 18:11:05 -07:00
filpAM 5acafa5a87 Fix visplane getting allocated twice 2020-05-16 00:20:52 +00:00
Sal f60d05764d Merge branch 'clearbans-please' into 'master'
Write empty file on clearbans

See merge request KartKrew/Kart-Public!156
2020-05-15 19:29:11 -04:00
Sal f0f4b7bc1e Merge branch 'nomixer-fix' into 'master'
Fix "NOMIXER" flag compiling

See merge request KartKrew/Kart-Public!159
2020-05-15 19:28:54 -04:00
Sal 43874c3a4d Merge branch 'now-we-spin-in-spinout-only' into 'master'
No more first person hyper spin

See merge request KartKrew/Kart-Public!160
2020-05-15 19:28:38 -04:00
Sal e4766bbaf1 Merge branch 'ferror-errno-yareyare' into 'master'
Fix false file error reporting

See merge request KartKrew/Kart-Public!162
2020-05-15 19:27:08 -04:00
Sal 11331b7bc5 Merge branch 'hud-is-fucked' into 'next'
HUD inconsistency in Record Attack

See merge request KartKrew/Kart-Public!164
2020-05-15 19:26:26 -04:00
Sal ffdb12ccb0 Merge branch 'fastline-identification' into 'next'
Add targets to MT_FASTLINEs that are spawned

See merge request KartKrew/Kart-Public!169
2020-05-15 19:24:35 -04:00
Sal c9c8e5f15f Merge branch 'player-dot-ping' into 'next'
player.ping for the ping in milliseconds of the player

See merge request KartKrew/Kart-Public!167
2020-05-15 19:24:21 -04:00
Sal f2a9981299 Merge branch 'alias-recursion-fix' into 'master'
Fix alias recursion never counting down

See merge request KartKrew/Kart-Public!166
2020-05-15 19:24:02 -04:00
Sryder e0aa6ef252 Use bionic to build focal version because it has GCC 4.8? 2020-05-16 00:02:33 +01:00
James R 7e0b605f34 Properly bound lua displayplayers and displayplayers.iterate to splitscreen
This is fixes crashes in replays because splitscreen displayplayers are
initialized to INT32_MAX there.
2020-05-15 14:21:25 -07:00
James R fcbe4e668f Set timeout on HMS connections 2020-05-15 13:20:40 -07:00
Ashnal 506d06b86e Fix MAXVID height and width 2020-05-15 16:19:00 -04:00
Hannu Hanhi 866fd73a4f Command line parameters -width and -height now accept custom resolutions 2020-05-15 14:22:11 -04:00
Ashnal f3c2e5d045 Fix screen texture size scaling 2020-05-15 14:22:03 -04:00
James R bd3ea52cba ok
(cherry picked from commit 0b9c20cc7086000548e02b39c1abf94ffb56feae)
2020-05-15 11:21:40 -07:00
Hannu Hanhi 5398c10be1 Command line parameters -width and -height now accept custom resolutions 2020-05-15 13:28:31 -04:00
James R 6bd6b3f38e Add missing extern to colortranslations 2020-05-15 10:00:05 -07:00
Monster Iestyn 697c7f859e added missing extern keyword for ms_RoomId in mserv.h (the definition is already in the .c file in this case)
(cherry picked from commit 064f4bcf349e9600552a0b99bd0fbfb3cbcf0958)
2020-05-15 09:58:49 -07:00
Monster Iestyn f89400c728 turn all non-extern variables in s_sound.h into externs (and put their real definitions in the .c file)
(cherry picked from commit dab212dc56936dd92a935d0c81003ff1d35ee2ee)
2020-05-15 09:58:28 -07:00
Monster Iestyn 05c8865528 make savegamename in doomdef.h an extern, put the actual definition in d_main.c
(cherry picked from commit 89cd756cd83e4a03a34d1f16da18142d8167d889)
2020-05-15 09:52:16 -07:00
James R e8a2397dea Rename hms123311.c to http-mserv.c
HMS lives on in our hearts!
2020-05-14 17:26:10 -07:00
James R a6ce21b450 Use Unlock_state here too 2020-05-14 17:23:06 -07:00
James R 85fef2655c Resize response body buffer as needed 2020-05-14 17:19:25 -07:00
fickleheart 3eb77ef2e0 Allow speeding up and disabling digital turn easing
If anyone complains about this being an unfair advantage, you can
literally get the same result in the base game by building a custom
controller that maps digital keypresses to an analog joystick. Ask
Tyrone about his hitbox. All this does is remove the hardware
differential between keyboard and controller.
2020-05-14 16:25:03 -04:00
Sryder dbcbbf1ae4 Remove now unsupported distros from deployer
Add new supported distros to deployer
2020-05-14 13:16:49 +01:00
Snu 6b5eebe54a Use P_SetTarget instead of fast->target 2020-05-14 04:17:24 +01:00
Snu 3997c05988 god damnit 2020-05-14 03:23:28 +01:00
Snu f24340f46a add targets to MT_FASTLINEs spawned to tell what they're spawned from 2020-05-14 03:13:00 +01:00
Latapostrophe d949a47a70 Don't save Luavars in record attack, especially not for ghosts 2020-05-14 01:41:06 +02:00
James R 615823f024 player.ping for the ping in milliseconds of the player 2020-05-13 16:17:40 -07:00
Latapostrophe d0b4f8765d Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2020-05-14 01:04:30 +02:00
Monster Iestyn db5cb986ee Detect infinite alias self-recursion mixed with other commands, such as in the case of alias a "echo test; a"; a.
(Unfortunately, this does not work if "wait" is used instead of "echo", but oh well)

(cherry picked from commit 797ca99f42)
2020-05-13 16:03:26 -07:00
James R 430fb27ec8 Bind HMS connection with -bindaddr 2020-05-13 15:29:17 -07:00
James R 9dc72f46a2 Identify this branch with VERSIONSTRING
This is temporary.
2020-05-12 19:27:54 -07:00
James R 2f63f97692 Reset the masterserver address if the old one was set by the config 2020-05-12 19:22:30 -07:00
James R 72852ab341 Clarify where debug prints go when using masterserver_debug 2020-05-12 19:22:15 -07:00
James R be3da445c3 Use IPv4 for master server connections
Your server's address is gathered from the request, so it needs to be IPv4!
2020-05-12 18:52:55 -07:00
James R bdcae79cd2 Use new two digit version number for HMS 2020-05-12 17:51:27 -07:00
James R 233e6627de Merge remote-tracking branch 'origin/master' into http-mserv 2020-05-12 17:50:32 -07:00
Wolfy f856f18233 Update patch.kart hash 2020-05-11 22:31:38 -05:00
wolfs 35aa2a58bf Merge branch 'appveyor-shit' into 'next'
Fuck you Appveyor / Thank you Appveyor

See merge request KartKrew/Kart-Public!165
2020-05-11 22:43:44 -04:00
James R 0b887e92ba Fucking shadowed declarations in hw_md2.c 2020-05-11 18:57:38 -07:00
James R cbf565c6d6 Disable 64-bit Appveyor builds 2020-05-11 18:55:20 -07:00
James R 25b47cf81f Name the archive like the EXE
(cherry picked from commit 4304fe91e65845e3887935de046876b6313af9c9)
2020-05-11 18:45:46 -07:00
James R 60c9b98e93 Windows is dumb so no colon
srb2win-jameds-appveyor-exename-b1d931d47.exe

(cherry picked from commit 70cf119a8402607116b2f8fbb79028a2de0e8d96)
2020-05-11 18:45:46 -07:00
James R dc6f270906 Check if this actually is a PR before using those variables
(cherry picked from commit e082553f6d3a90baf97e056ab6790ce136f502d0)
2020-05-11 18:45:45 -07:00
James R 85adab2306 I promise I know what I'm doing
(cherry picked from commit 6337932190d68d6f825f4f5dd47a6f3655c88f16)
2020-05-11 18:45:45 -07:00
James R de3a47b648 Use the pull request repo, branch and commit
srb2win-jameds:appveyor-exename-b1d931d47.exe
(cherry picked from commit ef2febe1e01bc7c93f30d2063bfd754b1a79dd3a)
2020-05-11 18:45:45 -07:00
James R 9261f593ec Well I'm an idiot
(cherry picked from commit b1d931d471bcf2ec9a40f6e7e52518807c5fd14b)
2020-05-11 18:45:45 -07:00
James R e9c34556a0 Put the abbreviated commit hash in the EXENAME for AppVeyor
srb2win-master-a6d49eaaa.exe

(cherry picked from commit d3315ae03c57296bfb5a7f9f5959492bdb7de24c)
2020-05-11 18:45:44 -07:00
James R aedf1bed23 Put branch name and commit hash in EXENAME for AppVeyor builds
srb2win-master-a6d49eaaa70be5f88c26623c7b4a2fa5a770341e.exe

(cherry picked from commit c3f42859882e6a1a789668d9b78d1310dd5e7312)
2020-05-11 18:45:44 -07:00
James R 68bbec8277 Use GCC 8.1 for x86_64
(cherry picked from commit 658b8dcfa95935bbaef92c15476ad57ecc96950f)
2020-05-11 18:45:43 -07:00
James R f2dc6ad4d1 Remove Direct Draw from AppVeyor config
(cherry picked from commit 945f50c2736ee64734dcc94f36ff7dff4085c8e2)
2020-05-11 18:45:42 -07:00
Alam Ed Arias 557fe2ec99 Appveyor: other way around, the Mingw32 is at 9.1
(cherry picked from commit 0c2b3002944b28cd823326fb5febc71fad120ca0)
2020-05-11 18:43:25 -07:00
Alam Ed Arias 1ee81fa9f8 Appveyor: the Mingw64 is 9.1, the Mingw32 is still 7.3
(cherry picked from commit 33c0b825a7cdfd6538f388748dba334191fbb9ee)
2020-05-11 18:43:25 -07:00
Alam Ed Arias ef022ef72c Makefile: GCC80 does not exist
(cherry picked from commit eacf89e309d555bda78ed69945a7d995e56a3292)
2020-05-11 18:43:25 -07:00
Alam Ed Arias 42f71c0278 Tested to be compile with Mingw64 9.1.0
(cherry picked from commit 5a79a446dfc3632de3e27567afd65d9782510739)
2020-05-11 18:43:24 -07:00
Alam Ed Arias ca12cc2518 Makefile: support GCC 9.1
(cherry picked from commit d5cc3ce48daf594fc64ecdbaeceb5c537cf5bf72)
2020-05-11 18:43:01 -07:00
Alam Ed Arias dbb176c61e Makefile: stop building with DWARF v2 debugging info
(cherry picked from commit 07f89fd6b5130b886ba20cf4e8a2f1022853fb14)
2020-05-11 18:43:01 -07:00
Wolfy ec60fb0aff HWR_CreateBlendedTexture optimizations
By Hannu_Hanhi
2020-05-11 17:47:24 -05:00
wolfs 869234d9f1 Merge branch 'default-manifest' into 'awful-mix'
Add a default manifest file.

See merge request SinnamonLat/Kart-Public!16
2020-05-10 02:08:19 -04:00
wolfs b9a3524cc7 Merge branch 'fallback-refusal' into 'awful-mix'
Display refusal message if there is no HTTP source and internal downloads are disabled

See merge request SinnamonLat/Kart-Public!17
2020-05-10 02:07:59 -04:00
Wolfy d24c4bab44 Update hash again 2020-05-09 10:52:23 -05:00
Wolfy a4502f6ffb Forgot to update date modified 2020-05-09 09:15:17 -05:00
ThatAwesomeGuy173 6519da0d9f Display refusal message if there is no HTTP source and internal downloads are disabled 2020-05-09 06:06:21 -06:00
Wolfy 09efbb3e8e Update patch.kart hash 2020-05-09 03:16:46 -05:00
Wolfy d80981ab22 Minor credits updates 2020-05-09 01:17:10 -05:00
Steel Titanium c54a311a30 Add a default manifest file.
The tldr is that it fixes opengl not working on systems with broken drivers, which is usually older intel GPUs
2020-05-08 22:59:19 -04:00
wolfs 29bc6489db Merge branch 'large-server-list' into 'awful-mix'
Increase MAXNETNODES so the server list can be larger

See merge request SinnamonLat/Kart-Public!15
2020-05-06 02:57:28 -04:00
Wolfy dad80d8db1 Fix the RA only linedef
I forgot some stuff.
2020-05-05 10:25:40 -05:00
Wolfy 1e81924f9a Don't use models for signposts
based james
2020-05-03 23:51:30 -05:00
Latapostrophe a3e74a1305 Add back viewpoint names & fix console inputs in replays 2020-04-30 15:50:30 +02:00
Wolfy af0a93ea53 Merge remote-tracking branch 'remotes/james/awful-mix-fucked' into awful-mix 2020-04-30 04:40:11 -05:00
Wolfy 885d949cf9 Shader batching additions 2020-04-29 00:03:02 -05:00
James R 0cdfaaa56c Merge remote-tracking branch 'lat/awful-mix' into awful-mix-fucked 2020-04-28 21:56:35 -07:00
James R e2733600cd Oops a debug condition snuck in there 2020-04-28 14:35:03 -07:00
Latapostrophe aad2401ba5 Cam lockon, allow viewpoint change during freecam 2020-04-28 23:24:48 +02:00
James R a1aa2a5e12 Fix switching the master server 2020-04-28 14:21:57 -07:00
James R e950efa5fc Put some mutex on CONS_Printf etc. hahaha 2020-04-28 13:08:43 -07:00
James R e20dccafd4 Fucking multithreading in the server registration
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2020-04-28 12:33:50 -07:00
Latapostrophe cf64a468f5 Add lua toggle for check hud 2020-04-28 17:24:33 +02:00
Latapostrophe e84cac7933 Merge branch 'awful-mix' of git.magicalgirl.moe:SinnamonLat/Kart-Public into awful-mix 2020-04-28 16:58:48 +02:00
James R 8f3820db66 Wait for threads before SDL_Quit (lol) 2020-04-27 18:03:10 -07:00
James R bdddeb9ecf Create cond if it doesn't exist when signaling 2020-04-27 18:01:27 -07:00
wolfs 99ac81bae5 Merge branch 'sal-lighting-port' into 'awful-mix'
'sal-lighting' code ports from v2

See merge request SinnamonLat/Kart-Public!14
2020-04-27 04:52:58 -04:00
James R 88bcac0168 Use malloc for hms 2020-04-26 21:56:59 -07:00
James R 1484f0484f Match MAXSERVERLIST to MAXNETNODES, increase MAXNETNODES
Each server in the server list requires a node. It's also MAXNETNODES-1 because
the first node is yourself.
2020-04-26 20:46:33 -07:00
Steel Titanium ba989dce10 Support for http downloads
(cherry picked from commit 6fcc06bf72)

(cherry picked just the libcurl stuff)
2020-04-26 20:01:15 -07:00
James R c96506dd3b Make mod update, room list and server list multithreaded
This took fucking ages and it still fails sometimes in edge cases, but I
don't give a FUCK right now.
2020-04-26 19:46:35 -07:00
James R 273b20d81d Download mismatched md5sum with http
This is from b25acfa7
2020-04-26 01:29:40 -07:00
James R 974f9e667b Fallback you doofus! 2020-04-26 01:28:01 -07:00
Wolfy fcea81e018 Revert basically every attempted join passwords fix 2020-04-26 01:20:46 -07:00
James R b3247b48a1 Merge remote-tracking branch 'lat/remove-passwords' into awful-mix-fucked 2020-04-26 01:16:27 -07:00
James R bb3dcf7d5f Revert "Reorder join process so password is authenticated before attempting to download"
This reverts commit b25acfa782.
2020-04-26 01:12:40 -07:00
James R 10582beb2a Revert "Don't send httpsource in SERVERINFO if join password is set"
This reverts commit abd15288b4.
2020-04-26 01:12:39 -07:00
James R ccb6da9ab7 Revert "Request a download after completing the join challenge"
This reverts commit d5ca4d3f42.
2020-04-26 01:11:25 -07:00
Sally Cochenour 792d1a5f35 Forgotten / TICRATE 2020-04-25 21:33:34 -04:00
Sally Cochenour b2aebb81ec 'sal-lighting' code ports from v2 2020-04-25 20:56:50 -04:00
Wolfy 82b5ce5495 Remove cv_grskydome
This is how GL should've been handling skies all along, no point having an option
2020-04-24 23:48:03 -05:00
Wolfy 0e78159ea1 Merge remote-tracking branch 'remotes/bird/isolatedbatching' into awful-mix
# Conflicts:
#	src/hardware/hw_main.c
#	src/hardware/r_opengl/r_opengl.c
2020-04-24 18:10:25 -05:00
Hannu Hanhi 957768efd1 Fix mistake in previous commit 2020-04-22 23:50:50 +03:00
Hannu Hanhi 4e8349fccc Fix lighting breaking if trying to use unavailable shaders 2020-04-22 23:50:14 +03:00
wolfs b0c3cffb6d Merge branch 'text-fixes-that-bother-me' into 'awful-mix'
Text fixes that bother me

See merge request SinnamonLat/Kart-Public!13
2020-04-22 03:28:41 -04:00
ThatAwesomeGuy173 c762472559 Use "addons" instead of "add-ons" for consistency 2020-04-22 01:24:59 -06:00
ThatAwesomeGuy173 3f587d3391 Merge branch 'awful-mix' of https://git.magicalgirl.moe/SinnamonLat/Kart-Public into text-fixes-that-bother-me 2020-04-22 01:01:08 -06:00
Wolfy eebd73d812 FUCKING- 2020-04-22 02:00:44 -05:00
ThatAwesomeGuy173 bdf67a369a Merge branch 'awful-mix' of https://git.magicalgirl.moe/SinnamonLat/Kart-Public into text-fixes-that-bother-me 2020-04-22 00:48:09 -06:00
Wolfy e08fcc14bd ASHNAL 2020-04-22 01:31:55 -05:00
ThatAwesomeGuy173 296dfe8ffc Do the same for other messages too 2020-04-22 00:03:45 -06:00
ThatAwesomeGuy173 4ddebca778 Capitalize "record attack" as "Record Attack" and spell "addons" as "add-ons" in the replay hut 2020-04-22 00:01:03 -06:00
Wolfy c52ce92016 Shut the compiler up 2020-04-21 19:25:18 -05:00
Ashnal e33e15d87f Fix dedicated servers not waiting for client wipes.
Now they run wipe logic to wait the same amount of
time that clients do, without actually rendering anything.
Previously, the server would start the new map immediately,
and clients would frameskip up to the server when they were done wiping.
2020-04-21 19:16:31 -05:00
Hannu Hanhi ce1d017a73 Sky dome from SRB2 2020-04-22 00:18:58 +03:00
Hannu Hanhi e45295f1ea Don't crash if shaders are unavailable 2020-04-21 23:45:48 +03:00
Hannu Hanhi 812cceb53f Remove sometimes harmful NetUpdate call from HWR_RenderFrame 2020-04-21 23:32:31 +03:00
Hannu Hanhi 2fdb7627b7 Fix wrong behaviour and lack of animation in ogl sky background 2020-04-21 23:24:32 +03:00
Hannu Hanhi 4309908999 Fix race results screen showing wrong image on maps with skyboxes 2020-04-21 23:23:03 +03:00
Hannu Hanhi 43be277ac7 Newer color tinting shaders ported from SRB2 shader branch 2020-04-21 23:15:44 +03:00
Hannu Hanhi 6cc1c5dd36 Make OpenGL texture filter config save 2020-04-21 22:38:46 +03:00
Hannu Hanhi b5fb88922a Faster sprite sorting algorithm 2020-04-21 22:08:52 +03:00
wolfs 96d1946c8d Merge branch 'packetversion-112' into 'awful-mix'
1.2 end game: PACKETVERSION support

See merge request SinnamonLat/Kart-Public!12
2020-04-20 23:55:39 -04:00
James R 820d4a5f8b SRB2APPLICATION: this is jart! 2020-04-20 20:22:17 -07:00
James R bb6bdac111 Make the PACKETVERSION rule easier
(cherry picked from commit 4214397679c70a7910c82126783b434f0d10343e)
2020-04-20 20:22:04 -07:00
James R f13f0e3e11 Remove adminplayer from SERVERINFO (PACKETVERSION 2)
(cherry picked from commit 339ceafdf03a54cb562d70079f15587acd639619)
2020-04-20 20:22:01 -07:00
James R 4ed99c60bb More fine tuned versioning
You get a PACKETVERSION, for when some packets change format.

You get SRB2APPLICATION, for when you have big fucking mod.

(cherry picked from commit 6bd383621eee92b215f86c9c4b483934d7e60daa)
2020-04-20 19:59:42 -07:00
wolfs f9dad05242 Merge branch 'fixsignalhandler-resurrection' into 'awful-mix'
2.2 signal handler

See merge request SinnamonLat/Kart-Public!11
2020-04-20 22:42:59 -04:00
Hannu Hanhi 628bd27b88 Fixed and faster transparency sorting for OGL. For easy comparison, check Ethereal Crystal in Abstraction Pack 2020-04-19 18:42:03 +03:00
Hannu Hanhi ff98d3b28a Fix skywalls in ogl. Similar to c3f6f263 in master. 2020-04-19 18:19:16 +03:00
wolfs 0150200949 Merge branch 'more-descriptive-error' into 'awful-mix'
Show more descriptive error on failed downloads

See merge request SinnamonLat/Kart-Public!10
2020-04-19 00:27:56 -04:00
Wolfy be2cb38a3d Make the deployer use the new version format 2020-04-18 23:18:39 -05:00
colette 38cd01b1d3 FOV fixes
# Conflicts:
#	src/r_main.c
2020-04-18 23:13:54 -05:00
Steel Titanium 437863717a Show more descriptive error on failed downloads 2020-04-19 00:13:30 -04:00
wolfs bf1060f7ac Merge branch 'remove-download-file' into 'awful-mix'
Remove the correct file when http download fails

See merge request SinnamonLat/Kart-Public!9
2020-04-18 23:35:21 -04:00
wolfs 783a1c78bd Merge branch 'awful-mix-httpfixes' into 'awful-mix'
Fix super lol compile errors

See merge request SinnamonLat/Kart-Public!7
2020-04-18 23:34:41 -04:00
wolfs 80c6f5e6be Merge branch 'awful-mix' into 'awful-mix'
Require join password authentication to download, also hide http source behind PT_DOWNLOADFILESOKAY

See merge request SinnamonLat/Kart-Public!6
2020-04-18 23:33:41 -04:00
James R b341b87a92 Fuck acks!!!! 2020-04-18 18:47:57 -07:00
James R b30426bccd Don't strip directory before removing failed http download 2020-04-18 18:47:20 -07:00
James R d5ca4d3f42 Request a download after completing the join challenge 2020-04-18 18:45:50 -07:00
James R c472a9f50d Multithreading in my SRB2??? 2020-04-17 20:05:29 -07:00
James R 7b714a225b WHY THE FUCK DID I DO THIS 2020-04-15 22:04:55 -07:00
James R 60bc61ef70 Oops 2020-04-14 19:41:32 -07:00
James R 30b5ec14fd Handle NULL hms buffer 2020-04-14 16:55:14 -07:00
James R 7488991ecd Compiler errors: won't stop, can't stop 2020-04-13 23:31:26 -07:00
James R a0de059235 masterserver_update_rate cvar determines wait between updates in minutes
The new default is 15 minutes as well. And if you think that's too long, I have
confirmed that the Master Server delists inactive servers after a whopping 40
minutes, at least.
2020-04-13 23:10:06 -07:00
James R ee6de3800e Don't try to update right after registering 2020-04-13 22:54:58 -07:00
James R 2c5566b013 Add a hack so the 'All' room isn't display for hosting 2020-04-13 22:31:11 -07:00
James R 1201e89132 Kill the old mserv, long live HMS! 2020-04-13 22:23:01 -07:00
James R 7255d360e1 Clean up header text 2020-04-13 21:20:29 -07:00
Steel Titanium be94fa3200 Fix compile errors 2020-04-13 23:07:38 -04:00
James R 312fb87937 b25acfa7 also fixed the http downloader not considering checksum mismatched files 2020-04-13 17:48:10 -07:00
James R 8c9e5fc644 Whoops I fucked that up 2020-04-13 17:45:02 -07:00
James R abd15288b4 Don't send httpsource in SERVERINFO if join password is set 2020-04-13 17:40:48 -07:00
James R b25acfa782 Reorder join process so password is authenticated before attempting to download 2020-04-13 17:30:42 -07:00
Sally Cochenour 1fac0505a4 No more modulo bullshit in VERSION
VERSION is the first number, SUBVERSION is the second number, and the third number burns in hell; we really don't need that precision

# Conflicts:
#	src/doomdef.h
2020-04-12 23:32:15 -05:00
Wolfy 0a50317e49 oops 2020-04-12 22:47:22 -05:00
James R 032adadd86 HTTP update alert 2020-04-12 20:37:46 -07:00
Wolfy c68e1c53f3 Fix off by one error in http downloader 2020-04-12 21:14:33 -05:00
Wolfy bceeaf78bc Prep stuff
pending asset hash changes
2020-04-12 20:48:11 -05:00
wolfs dcfaba2cc6 Merge branch 'http-downloads' into 'awful-mix'
Support for http downloads

See merge request SinnamonLat/Kart-Public!1
2020-04-12 21:38:33 -04:00
James R 48b2112af7 Fix some goofs 2020-04-12 18:33:53 -07:00
James R 03caf27d92 Bruh 2020-04-12 18:27:01 -07:00
James R 269746fe01 Clean up a bunch of stuff and follow the Master Server API more closely 2020-04-12 18:25:59 -07:00
James R 3f4224ed37 Windows certs do work, thanks Steel! 2020-04-12 17:51:30 -07:00
James R 969fe0b28e Handle more errors 2020-04-12 17:51:05 -07:00
James R ef71bef6f3 Kill masterserver_token 2020-04-12 17:15:39 -07:00
Steel Titanium 9293c6cb32 Fix cmake using wrong libs if internal libs is turned on
Use '\0' instead, just in case
2020-04-12 17:56:12 -04:00
Steel Titanium 2dd7854a9b Remove some of these superfluous ifdef checks.
Allows compatibility with non-curl enabled builds.
2020-04-12 15:07:39 -04:00
Wolfy 9c727992a4 Fix self-comparison in hw_main.c 2020-04-12 06:47:12 -05:00
Hannu Hanhi f3bdcb4ec3 Backport from SRB2: Replace NextTexAvail with glGenTextures 2020-04-12 06:39:00 -05:00
wolfs ee0bba26f4 Merge branch 'kill-these-please-12' into 'awful-mix'
Compiler errors, again, again

See merge request SinnamonLat/Kart-Public!5
2020-04-12 07:00:05 -04:00
James R 60a38cbec3 Even the warning can die, give the programmer some credit
(cherry picked from commit 6d67b7c3269d2530cfcd7a93cfde401e09d04138)
2020-04-11 22:10:05 -07:00
James R 6d3f5ef163 Also allocate mipmap for MD2
(cherry picked from commit 99cd5161becec131099c64dddd2be6beafb538cc)
2020-04-11 22:10:05 -07:00
James R 4ad360155f Fix nonpacked to packed cast for OpenGL
(cherry picked from commit d2a7a87c7f39bd423fde7f8b4228082d12839583)
2020-04-11 22:10:05 -07:00
James R 437f7aa16d Fix misaligned pointers
(cherry picked from commit ceb8d298c2ae9a6000fa4d22e381085c6bf77cd6)
2020-04-11 22:03:29 -07:00
Wolfy da2a640c6c Merge remote-tracking branch 'remotes/bird/isolatedbatching' into awful-mix
# Conflicts:
#	src/hardware/hw_cache.c
#	src/hardware/hw_draw.c
#	src/hardware/hw_glob.h
#	src/hardware/hw_main.c
#	src/r_bsp.h
#	src/r_data.c
2020-04-11 23:47:25 -05:00
Hannu Hanhi 8001bb4154 Batching! 2020-04-12 03:09:07 +03:00
Hannu Hanhi 1efa95bb33 Don't destroy my config file 2020-04-12 02:18:12 +03:00
Hannu Hanhi 3a654bb7d9 Fix comment 2020-04-11 13:27:18 -05:00
Hannu Hanhi 7bac42f9b2 Don't repeatedly look for texture files that don't exist. This fixes performance issues with models. 2020-04-11 13:27:17 -05:00
wolfs 516a4994f5 Merge branch 'fix-chat-draw-leak' into 'awful-mix'
Chat drawing memory leak fix from SRB2 repo

See merge request SinnamonLat/Kart-Public!4
2020-04-10 09:28:08 -04:00
Hannu Hanhi b9e008c8bf Chat drawing memory leak fix from SRB2 repo 2020-04-08 17:33:23 -04:00
wolfs 54472b5c22 Merge branch 'awful-mix' into 'awful-mix'
Fix lol xd compiler errors

See merge request SinnamonLat/Kart-Public!2
2020-04-08 17:04:06 -04:00
James R 4b68b41a31 Fix lol xd compiler errors 2020-04-07 17:06:20 -07:00
Steel Titanium 061e483df1 Fix error with travis 2020-04-07 19:48:39 -04:00
Steel Titanium f28c53ea82 Fix this mistake 2020-04-07 19:27:20 -04:00
Steel Titanium f4002f076e Fix even more build errors 2020-04-07 19:14:27 -04:00
Steel Titanium cb9004e4cf Fix some build errors 2020-04-07 19:07:39 -04:00
Steel Titanium 6fcc06bf72 Support for http downloads 2020-04-07 18:22:29 -04:00
Wolfy 8a1f40b90f Add PT_CLIENTCMD back to allowed packet types
Fixes unexpected CLIENTCMD prints
2020-04-07 07:09:51 -05:00
Wolfy bbce134afa Merge branch 'awful-mix' of https://git.magicalgirl.moe/SinnamonLat/Kart-Public into awful-mix 2020-04-07 06:41:54 -05:00
Wolfy 95e7e59179 Remove stupid dumbfuck #ifdefs
WHY THE FUCK DID THESE BREAK IT AAAAAAAAAAAAAAAAAAA
2020-04-07 05:24:38 -05:00
Wolfy d4c69f137a Fix unterminated #ifdef 2020-04-07 04:25:11 -05:00
Wolfy bcfffefe43 Merge remote-tracking branch 'remotes/digiku/public-musicplus-lua' into awful-mix
Reimplements removed MusicPlus functions.

# Conflicts:
#	src/lua_baselib.c
#	src/lua_hook.h
#	src/lua_hooklib.c
#	src/lua_script.h
2020-04-07 03:41:26 -05:00
Wolfy 59df0c1187 Revert the removal of S_MusicExists 2020-04-07 02:56:45 -05:00
Wolfy 2406302911 Potentially fix join passwords 2020-04-05 18:57:47 -05:00
Wolfy 49a1037f6b Revert "PT_CLIENTCMD test"
This reverts commit 78bc80fd49.
2020-04-05 17:18:22 -05:00
Wolfy 78bc80fd49 PT_CLIENTCMD test 2020-04-05 17:01:40 -05:00
Wolfy 40f7d1b721 Merge branch 'awful-mix' of https://git.magicalgirl.moe/SinnamonLat/Kart-Public into awful-mix 2020-04-05 16:12:04 -05:00
Wolfy cedc79fd4b Fix packet type desync 2020-04-05 16:11:30 -05:00
Wolfy 5edfa412cd Record attack only linedef exec 2020-04-05 22:37:42 +02:00
Latapostrophe 18afcda41d Merge branch 'v1-backwards-thrown-spikeballs' into awful-mix 2020-04-05 22:31:07 +02:00
Latapostrophe ee91c4e445 Merge branch 'fix-double-bombs' into awful-mix 2020-04-05 22:30:43 +02:00
Wolfy 4d477d1aed Reimplement the MusicChange hook
why the fuck was this removed
2020-04-05 12:09:44 -05:00
Wolfy 49842c37cd Record attack only linedef exec 2020-04-05 14:12:12 +02:00
Latapostrophe 12bca93591 Merge branch 'v1-backwards-thrown-spikeballs' into awful-mix 2020-04-05 14:10:00 +02:00
Sally Cochenour 88a6b6b2f4 Slow down backwards spikeballs (again) 2020-04-05 14:09:04 +02:00
Wolfy 9395a0f5fc Record attack only linedef exec 2020-04-05 07:03:49 -05:00
Latapostrophe b483e42d94 Merge branch 'v1-ignore-posthumous-ackret' into awful-mix 2020-04-05 11:23:49 +02:00
Latapostrophe 86986adf6e Merge branch 'ignore-posthumous-ackret' of git.magicalgirl.moe:KartKrew/Kart-Public into v1-ignore-posthumous-ackret 2020-04-05 11:23:29 +02:00
Latapostrophe 732eb4cafa Merge branch 'fix-double-bombs' into awful-mix 2020-03-22 13:09:06 +01:00
Latapostrophe 549eabe9e4 I'm dumb, don't check for flashtics here... 2020-03-22 13:08:46 +01:00
James R f0cc851b29 This will be the Master Server in 2020 2020-03-20 20:37:26 -07:00
Latapostrophe 4f24f1ae5b Merge branch 'spb-blockmap-fix' of git.magicalgirl.moe:KartKrew/Kart-Public into awful-mix 2020-03-13 22:38:20 +01:00
Latapostrophe 67eeb819cb Merge branch 'fix-double-bombs' into awful-mix 2020-03-13 13:52:37 +01:00
Latapostrophe 245ac55654 This flag shouldn't have been applied there 2020-03-13 13:50:22 +01:00
Latapostrophe 9040373140 Merge branch 'awful-mix' of git.magicalgirl.moe:SinnamonLat/Kart-Public into awful-mix 2020-03-12 16:04:49 +01:00
Latapostrophe 44f45d6d28 Fix Lua crashes when loading without addons 2020-03-12 16:03:12 +01:00
Latapostrophe cbc7fe7b67 Fix Demo lua archive crash for real this time 2020-03-12 15:31:58 +01:00
Latapostrophe 20f4dc12b3 What the fuck how did this get here 2020-03-11 15:03:12 -04:00
Latapostrophe b905f20cd4 Fix tiny conflict because I forgot to merge 2020-03-11 19:55:56 +01:00
Latapostrophe 0ee6426830 Remove debug prints 2020-03-11 19:53:52 +01:00
Latapostrophe dabed0cd50 Attempt to fix replay loading crash 2020-03-11 19:33:22 +01:00
Latapostrophe a3389b43a0 Merge branch 'too-many-files' into awful-mix 2020-03-11 12:34:54 +01:00
Latapostrophe 513c3d1c3f don't set MAX_WADFILES to 256, worst mistake of my life 2020-03-11 12:34:35 +01:00
Latapostrophe 43e5718851 Merge branch 'push-more-lua' into awful-mix 2020-03-11 07:37:47 +01:00
Latapostrophe 37c733b8c2 More explicit var names for countdown and countdown2 2020-03-11 07:37:33 +01:00
Latapostrophe ee2fdeaf21 Merge branch 'too-many-files' into awful-mix 2020-03-11 07:21:41 +01:00
Latapostrophe 168b8ac052 Bump MAX_WADFILES to 256 2020-03-11 07:20:11 +01:00
Latapostrophe 6da057167d Merge branch 'antifreeze' of https://gitlab.com/fickleheart/srb2kart-mods into awful-mix 2020-03-10 21:46:12 +01:00
Latapostrophe 99905a443e Merge branch 'damned-springpads' into v1.2-frankeinstein 2020-03-10 20:39:35 +01:00
Latapostrophe b85a588e01 Merge branch 'push-more-lua' into v1.2-frankeinstein 2020-03-10 20:35:29 +01:00
Latapostrophe 7cd3221be8 Merge branch 'fix-orbit-shield' into v1.2-frankeinstein 2020-03-10 20:35:19 +01:00
Latapostrophe d993bce8b6 Merge branch 'fix-double-bombs' into v1.2-frankeinstein 2020-03-10 20:34:47 +01:00
Latapostrophe 1a0d148a7c Merge branch 'no-cheese' into v1.2-frankeinstein 2020-03-10 20:34:38 +01:00
Latapostrophe d43ed7f74c Merge branch 'gl-qol' into v1.2-frankeinstein 2020-03-10 20:34:20 +01:00
Latapostrophe 3b2907865f Merge branch 'stack-draw-flags' into v1.2-frankeinstein 2020-03-10 20:27:52 +01:00
Latapostrophe 81ad772a8b Merge branch 'record-attack-changes' into v1.2-frankeinstein 2020-03-10 20:27:00 +01:00
Latapostrophe 5202a4f0fd VoteThinker Hook for Lua 2020-03-10 18:58:44 +01:00
Latapostrophe 63eadaf83c Expose CV_FindVar to Lua 2020-03-10 18:12:20 +01:00
Latapostrophe 2e5608d33b Push race countdowns and functions to set them 2020-03-10 12:57:30 +01:00
Latapostrophe 8c00331c2b Push consoleplayer and displayplayers to Lua 2020-03-10 11:53:28 +01:00
Latapostrophe 428dc42e2d Remove debug print 2020-03-10 10:21:47 +01:00
fickleheart 11cba9bd6a I'M GONNA PISS MYSELF OF LAUGHER anyway fixed syncbombs 2020-03-07 12:40:45 -06:00
fickleheart b8e4af3f8d SUPER EXPERIMENTAL FREEZE-B-GONE 2020-03-05 22:19:39 -06:00
Latapostrophe bb1c320236 Merge branch 'fickle-replay-v1' into replay-freecam-rewind 2020-03-05 21:08:20 +01:00
TehRealSalt 190b0d4660 Replay playback changes:
- Store level state periodically
- Load the closest usable level state when done rewinding for
  quicker resumes
- Make playback menu fade out after 5 seconds of no activity
  (but not while paused)
- Remove wrapping from replay hut (original wrapping was broken
  at some point before 1.1 and it's not necessary anyway)
- Allow holding enter on frame advance for noisy slow-mo

from fickleheart
2020-03-05 21:04:56 +01:00
James R 3f9f07af84 Use https because my web server redirects 2020-03-01 12:31:49 -08:00
James R 56fac10b14 strtok can return NULL 2020-03-01 12:15:48 -08:00
James R 9d42a5ad5e This time I fucked up 2020-03-01 11:59:54 -08:00
James R aca2e97c84 Windows gaysed: the sequel 2020-03-01 11:54:21 -08:00
James R ceb332e580 Windows is weird 2020-03-01 11:46:02 -08:00
James R 32a34cc1b2 masterserver_debug to set CURLOPT_VERBOSE 2020-03-01 11:39:27 -08:00
James R 1959a9b107 Don't show "All" room when hosting 2020-03-01 11:19:59 -08:00
James R 8756ef15a2 I don't even know my own website 2020-03-01 11:17:56 -08:00
James R 47a5f9ef94 lol 2020-03-01 10:59:25 -08:00
James R e2507f390f The big bad HTTP master server
Cvars:

http_masterserver is the url to the master server's API.
masterserver_token may be an authentication token.
2020-03-01 02:36:56 -08:00
Latapostrophe ba8dff544a How can you look at yourself in the mirror? 2020-01-29 22:33:00 +01:00
James R 2a016332c4 Handle log file in parent properly 2019-12-16 19:28:42 -08:00
James R f460e83846 Add this back for Windoodoo because I'm an idiot 2019-12-16 19:27:55 -08:00
James R d0c41a8d55 Rename signal caught message to be more obvious 2019-12-16 19:27:55 -08:00
James R a0d6dc30cb Fix signal handler setup error reporting 2019-12-16 19:27:55 -08:00
James R b83f41e089 Rename I_StartupKeyboard to I_RegisterSignals and call it in a sane place 2019-12-16 19:27:54 -08:00
James R a64dbe1016 Kill child when wait fails, so I_Error exits both 2019-12-16 19:27:54 -08:00
James R c9830e5ab1 Fix idiot mistake 2019-12-16 19:27:54 -08:00
James R 9efe4d8445 Move everything to i_system.c
This also simplifies things; SDL isn't initialized in the parent process.
2019-12-16 19:27:53 -08:00
James R 2b837726eb nix: Fork before game code and wait to catch signals and coredumps
Ditched signal_handler to avoid worrying about async-signal-safe functions.
D_QuitNetGame is not called, so players whose programs are interrupted by a
signal will time out from the server. Because the game runs in a child process,
the window can close before the "Signal Caught" text box appears.

"(core dumped)" is also included in the message if core dumping could be
determined.
2019-12-16 19:27:35 -08:00
fickleheart 92d320be72 Fix dereferencing uninitialized pointer 2019-12-01 16:16:27 -06:00
fickleheart 35a8944f88 Remove (redundant?) skywalls that seemed to drop performance 2019-12-01 15:39:30 -06:00
fickleheart e8d2ca1f63 Fix kart HUD fadein 2019-12-01 12:38:05 -06:00
fickleheart 6131b80f03 I don't like your sprite clipping fix, so here's mine 2019-12-01 12:34:25 -06:00
fickleheart 9ecc48d0e4 Merge remote-tracking branch '[remote name redacted]/jimita-shaders'
# Conflicts:
#	src/hardware/hw_main.c
2019-12-01 11:58:24 -06:00
Latapostrophe 272f3fbb53 fix conflict 2019-11-12 00:41:26 +01:00
Latapostrophe aab87012df dontencoreremap flag + colormaps 2019-11-12 00:40:25 +01:00
Latapostrophe abcb1e9981 Merge branch 'gl-encore' into gl-qol 2019-11-12 00:23:56 +01:00
Jaime Passos 994f9492e8 Recreate the CLUT when the palette changes 2019-11-12 00:23:38 +01:00
Jaime Passos f22e767380 fix conflict 2019-11-12 00:23:26 +01:00
Latapostrophe 3bd62175f6 fix encore for ogl 2019-11-12 00:21:37 +01:00
Latapostrophe 0c3b5d603b Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-11-11 22:15:30 +01:00
Latapostrophe ff7a706976 fix orbiting items not protecting you against your own items 2019-11-11 00:24:06 +01:00
James R 44e59e2688 Don't hide HUD with hu_showscores in single player/Record Attack
This also makes Lua game HUD consistent with the Kart HUD.
2019-10-19 14:11:24 -07:00
James R fdb54d8e80 Apply BMBOUNDFIX to A_MineExplode 2019-10-15 23:29:02 -07:00
James R af94c51a6f Use Yes/No instead of On/Off for showfreeplay 2019-10-12 15:41:46 -07:00
James R ee44fea0bc showfreeplay toggles FREE PLAY 2019-10-12 00:29:22 -07:00
James R 6dc44c50ff Support -encore parameter in new map command 2019-10-10 11:43:21 -07:00
James R de5a7d88d4 Merge remote-tracking branch 'origin/master' into map-by-name 2019-10-10 11:38:48 -07:00
James R e189833697 Fix minor unnecessary call 2019-10-10 11:07:34 -07:00
James R 1d6020883c Forgot includes 2019-10-07 18:10:33 -07:00
James R abaefa05b1 ferror does not return errno, are you stupid?
Use M_FileError to return the proper error description, or "end-of-file".
2019-10-07 17:55:31 -07:00
James R 5e9082fb77 Also apply HUD translucency to FREE PLAY 2019-09-19 20:29:51 -07:00
Latapostrophe 90a272489e it's cam, not thiscam 2019-09-18 14:04:23 +02:00
Latapostrophe 9a1bfb3a92 camera checks to avoid crashes 2019-09-17 00:04:32 +02:00
James R 3801f93181 Let first person camera work in demos 2019-09-15 00:32:01 -07:00
Latapostrophe ef279ac5fe i am a retard 2019-09-13 23:42:51 +02:00
filpAM fe4cbd7ba1 Fix "NOMIXER" flag compiling 2019-09-13 13:20:44 -04:00
Latapostrophe ca2f6685e4 forgot to reset variables on demo stop 2019-09-11 21:30:11 +02:00
Latapostrophe cea0ffab60 forgot to add back 'void' after undoing experiments 2019-09-10 13:52:32 +02:00
Latapostrophe 2205246f0c get replays to save player lua vars 2019-09-10 11:59:17 +02:00
Latapostrophe bee60709ec I'm an idiot and forgot to let you download files 2019-09-09 22:26:09 +02:00
Latapostrophe 18c8f47f9a fix rewind, fix sound local sound playing in freecam 2019-09-09 22:15:50 +02:00
Latapostrophe e3393d6323 let mfe_drawonlyfor flags stack 2019-09-09 20:20:40 +02:00
Latapostrophe 45b62aa8a4 replay freecam + enhancements 2019-09-05 23:24:23 +02:00
Latapostrophe eb8cef41e4 shorten RA intro & allow to restart with pause 2019-09-01 23:04:07 +02:00
James R 3838700f2c Save bans when cleared too
(Why doesn't it work for I_Quit?)
2019-08-22 15:18:14 -07:00
Latapostrophe 9cdd8d85c8 Fix bombs exploding twice in the same frame 2019-08-12 00:14:01 +02:00
Latapostrophe 61d7fc8b48 remove join passwords 2019-08-04 11:26:26 +02:00
Sryder eb8cb12b8f Merge branch 'master' of git@git.magicalgirl.moe:KartKrew/Kart-Public.git into next 2019-07-17 21:29:35 +01:00
Latapostrophe f15adb64cb fix thrust on spring pads for shrink and the likes 2019-07-13 14:07:57 +02:00
Sryder 3cd5b3a33e Merge branch 'fix-port-connect' into 'master'
Don't use client port as default peer port

See merge request KartKrew/Kart-Public!152
2019-07-05 11:54:28 -04:00
Sryder 64ddbdc78b Merge branch 'fix-ms-version' into 'next'
Fix "Competition" as the gametype displayed by the Master Server

See merge request KartKrew/Kart-Public!151
2019-07-05 11:50:42 -04:00
Sryder cab34bee6f Merge branch 'add-floats-command' into 'master'
Fix the Add command when floats

See merge request KartKrew/Kart-Public!153
2019-07-05 11:49:46 -04:00
James R 14be24dfb6 Support adding to CV_FLOAT cvars with the Add command 2019-07-04 17:48:17 -07:00
James R 0a2eac682b Don't use client port as default peer port 2019-07-04 16:38:00 -07:00
Sryder e276faf819 Merge branch 'opengl_match_software_wallclip' into 'master'
OpenGL: Try and Match Software Wallclipping Better

See merge request KartKrew/Kart-Public!150
2019-07-02 14:08:10 -04:00
Latapostrophe 496f6bcd79 Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-07-02 18:24:14 +02:00
Sryder 815f237b22 Merge branch 'revert-mserv' into 'master'
Revert mserv

See merge request KartKrew/Kart-Public!144
2019-06-30 15:56:17 -04:00
James R 141ffd5c94 Send the old GT_MATCH only for specific versions
These version numbers were gathered from the Master Server's PHP code.
2019-06-30 10:47:08 -07:00
Sryder 56ad1340a2 Merge branch 'replay-code-sucks' into 'master'
Fix SIGSEGV when saving replays and invalid extrainfo offset

See merge request KartKrew/Kart-Public!149
2019-06-30 05:51:21 -04:00
Sryder bcae3898dd Merge branch 'lemme-outa-room-menu' into 'master'
Don't get stuck in room menu in a modified game

See merge request KartKrew/Kart-Public!145
2019-06-27 14:16:37 -04:00
Sryder c3f6f263d4 Update Skywall handling
I've tried to make this so it almost never under-compensates, and over-compensates very little where possible.
I don't think it's 1:1 to software's current behaviour, and probably never will be due to software being very strange.
2019-06-26 23:17:45 +01:00
James R 59bbab1fff Someone doesn't know how pointers or WRITE macros work...
Fixes SIGSEGV when saving a replay.
2019-06-25 00:44:12 -07:00
Sryder 414eee58ba checkforemptylines can be static 2019-06-24 20:50:37 +01:00
Sryder d67ea859e3 Match CheckClip to software's clipping check in R_AddLine
Has the added benefit of fixing noclip camera for opengl
Unfortunately SkyWalls are kinda broken with this. I'll be looking into them shortly.
2019-06-24 20:21:30 +01:00
Latapostrophe e219645577 handle clipping like literally every hw renderer ever 2019-06-24 12:51:18 +02:00
Latapostrophe 998ee7b6b2 fix splitscreen, fix thok barriers, better fog settings 2019-06-24 10:39:16 +02:00
Latapostrophe 1556e1d027 Remove cyan pixels for now 2019-06-23 18:35:57 +02:00
Sryder 777695aa88 Merge branch 'replay-typo' into 'master'
Spell it "forward"

See merge request KartKrew/Kart-Public!147
2019-06-23 12:34:07 -04:00
Latapostrophe 1b60524e42 Fix framedrops with 'dual-thok-barriers' 2019-06-23 14:08:17 +02:00
James R 5f4f10fdbe Spell it "forward" 2019-06-22 21:40:20 -07:00
Sryder 18e2e4ec8f Merge branch 'fileneededconfig-fix' into 'master'
Fix fileneeded overflow

See merge request KartKrew/Kart-Public!146
2019-06-21 13:13:14 -04:00
James R bbee4a2554 Cover edge case of WRITESTRINGN 2019-06-20 15:29:55 -07:00
James R d5e1c1af42 Add a comment by Sryder's request 2019-06-20 15:24:50 -07:00
James R 7f99ebc692 Also count terminating byte in fileneeded filename 2019-06-20 15:16:23 -07:00
James R ec369e8d21 Don't get stuck in room menu in a modified game 2019-06-19 14:32:11 -07:00
Sryder db24665856 Merge branch 'print-correct-view' into 'master'
Print the correct player for the view command

See merge request KartKrew/Kart-Public!141
2019-06-19 16:58:11 -04:00
Sryder 257ad438ef Merge branch 'nomoreendlessclouds' into 'master'
Stop OpenGL having infinite precipitation draw distance

See merge request KartKrew/Kart-Public!143
2019-06-19 16:56:26 -04:00
Sryder 1b46553d43 Integer comparison warning 2019-06-19 21:54:11 +01:00
Sryder 11c94d3312 Stop OpenGL having infinite precipitation draw distance 2019-06-19 20:05:20 +01:00
Sryder 987b20e5b6 Merge branch 'playerinfo_mscompat' into 'master'
Fix compatibility with the MS (Specifically Doomseeker)

See merge request KartKrew/Kart-Public!142
2019-06-19 14:57:41 -04:00
Sryder 935fec1e15 Fix compatibility with the MS (Specifically Doomseeker)
Send back 32 players worth of playerinfo regardless of MAXPLAYERS. Fill the extra with unconnected nodes.
2019-06-17 21:04:48 +01:00
Latapostrophe b9b76e739c change default fog settings, put sprite billboarding in menus and attempt to make colormaps look nicer still 2019-06-17 21:27:31 +02:00
Latapostrophe b58478a685 Merge branch 'jimita-shaders' of git.magicalgirl.moe:Jimita/Kart-Public into jimita-shaders 2019-06-14 12:19:17 +02:00
Latapostrophe a49c4349a4 Don't remap boosters and springpads in encore + no horizon line in GL 2019-06-14 12:18:44 +02:00
Jaime Passos 0b3a02bfcc Update r_opengl.c 2019-06-13 21:27:19 -03:00
Jaime Passos 5e14fd4ae4 software is better 2019-06-13 21:10:01 -03:00
Latapostrophe bf13726c1e encore colormaps, fixups + flat align 2019-06-13 10:14:07 +02:00
Jaime Passos a0ff5c6b25 Update hw_main.c 2019-06-12 23:31:55 -03:00
Jaime Passos df789e1d67 Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is
typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.
2019-06-12 23:01:18 -03:00
Latapostrophe 53df420546 Fix stuff and reimplement the kart features that went poof 2019-06-12 21:36:47 +02:00
Latapostrophe ff04e0c103 chaos conflict 2019-06-11 17:02:47 +02:00
James R 91c707d6fd Index displayplayers correctly 2019-06-10 14:24:11 -07:00
Jaime Passos e251f9c230 Update r_opengl.c 2019-06-10 16:53:03 -03:00
Jaime Passos de5e44cfbc Merge remote-tracking branch 'upstream/master' into gl_shaders 2019-06-10 16:21:46 -03:00
James R 3ffc520a2c Merge remote-tracking branch 'james/ms-connectionfail-fix' into HEAD 2019-06-09 14:22:32 -07:00
James R 8589a1ec07 Revert "Unfuck MS connecting and error reporting"
This reverts commit 4d739fe7a5.
2019-06-09 14:21:04 -07:00
James R 0561a5374c Revert "Check error on select"
This reverts commit aa4ce2b2d1.
2019-06-09 14:20:33 -07:00
James R 33b7459c1b Revert "Force of habit"
This reverts commit fc8ebe83fc.
2019-06-09 14:20:32 -07:00
Steel Titanium bfa7325295 Merge branch '2.1.24-prep' into 'next'
Update version to 2.1.24

See merge request STJr/SRB2!495
2019-06-08 17:08:34 -04:00
Monster Iestyn f5d883bd12 Merge branch 'next' into 2.1.24-prep
# Conflicts:
#	debian-template/control
#	debian/changelog
2019-06-07 23:18:31 +01:00
Alam Ed Arias ea08ba3fba Merge branch 'master' into next 2019-06-07 18:07:32 -04:00
Alam Ed Arias 83b8a98df4 Merge branch 'gme-msvc' into 'master'
Add GME to MSVC 10 solution

See merge request STJr/SRB2!448
2019-06-07 18:06:51 -04:00
Steel Titanium c0c1e5416f Merge branch 'next' into 2.1.24-prep 2019-06-07 18:02:09 -04:00
Alam Ed Arias 3edf73f181 Merge branch 'travis-deployer' into 'master'
Deploy OS X and Debian packages from Travis-CI

See merge request STJr/SRB2!449
2019-06-07 17:57:29 -04:00
Steel Titanium 3c08ee1313 Merge branch 'master' into travis-deployer
# Conflicts:
#	.travis.yml
2019-06-07 16:56:19 -04:00
Steel Titanium e1d025cd2b Merge branch 'jimita-flashpals-on-screenshots' into 'next'
Flashpals on screenshots

See merge request STJr/SRB2!492
2019-06-07 16:37:59 -04:00
Steel Titanium eb99ad0437 Merge branch 'more-limits' into 2.1.24-prep 2019-06-07 11:28:43 -04:00
Monster Iestyn 6f6d912fa6 Update version to 2.1.24 2019-06-07 15:48:33 +01:00
Steel Titanium d4dac52766 Upped freeslots limit 2019-06-03 15:23:48 -04:00
Steel Titanium dc273d3f23 Merge branch 'next' into jimita-flashpals-on-screenshots 2019-05-25 19:37:17 -04:00
Jaime Passos d3dfd77ae7 Hardware mode y-shearing matches software mode mouselook 2019-05-17 17:49:04 -03:00
Jaime Passos 315f941573 dude how do I co-author in Git? 2019-05-17 13:18:33 -03:00
Monster Iestyn 600a373739 Merge branch 'master' into next 2019-05-13 16:07:30 +01:00
Monster Iestyn 2a9019c15e Merge branch 'archiveworld-sigsegv-fix' into 'next'
Fix SIGSEGV from sending lindefs/sidedefs in savegame due to duplicated lines.

See merge request STJr/SRB2!490
2019-05-13 07:02:48 -04:00
Alam Ed Arias addf2bb3c4 Fix NONET build 2019-05-13 01:51:36 -04:00
Steel Titanium 8a14427420 Merge branch 'perpetual-modifier-updates' into 'master'
Set modifiers in a non-reactive manner

See merge request STJr/SRB2!456
2019-05-13 00:36:06 -04:00
Steel Titanium 06961a8f5e Merge branch 'no-frameskip' into 'next'
Don't skip frames when connecting or paused

See merge request STJr/SRB2!489
2019-05-13 00:35:11 -04:00
Steel Titanium cad65ad5e9 Properly fix crash due to duplicated lines. 2019-05-13 00:23:43 -04:00
Steel Titanium 4e0cc2505a Revert "Check that lumps are okay"
This reverts commit 7ac0a8b4d2.
2019-05-13 00:20:39 -04:00
James R 7ac0a8b4d2 Check that lumps are okay 2019-05-08 20:30:19 -04:00
Monster Iestyn f0e16cad32 Merge branch 'master' into next 2019-05-08 16:31:05 +01:00
Monster Iestyn 8ea9d0e95c Merge branch 'alias_recursion_hotfix_2' into 'master'
Alias recursion hotfix 2

See merge request STJr/SRB2!482
2019-05-08 11:25:15 -04:00
wolfy852 8f05d75926 Don't skip frames when connecting or paused 2019-05-08 09:39:45 -05:00
Jaime Passos 0bc8d2a49d 01052019 2019-05-01 19:37:42 -03:00
Jaime Passos 2ff4a3ca75 Match Kart-Public's next since it got merged anyway
and fix something else
2019-04-30 20:59:32 -03:00
James R e79ec14dc3 Fix compiler warnings 2019-04-21 23:19:20 -07:00
James R b4e900be1f Use a superior strcasestr 2019-04-21 23:18:40 -07:00
James R 51cb3c9008 Merge remote-tracking branch 'origin/master' into map-by-name 2019-04-21 23:13:58 -07:00
Latapostrophe 3b3a63cd90 Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-04-21 15:57:03 +02:00
Latapostrophe c772b05f8c Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart 2019-04-20 10:44:17 +02:00
Jaime Passos 6b6485159f Add "Software Perspective" toggle on the "GPU Options" menu 2019-04-14 19:44:56 -03:00
Jaime Passos d1b1edcf39 More Softwarification 2019-04-14 19:08:59 -03:00
Monster Iestyn 797ca99f42 Detect infinite alias self-recursion mixed with other commands, such as in the case of alias a "echo test; a"; a.
(Unfortunately, this does not work if "wait" is used instead of "echo", but oh well)
2019-04-14 16:39:14 +01:00
Jaime Passos a8165a2ce9 fix skyboxes AGAIN 2019-04-13 18:47:09 -03:00
Jaime Passos 5689fca892 fix includes 2019-04-13 18:14:55 -03:00
Jaime Passos f5516a121c cleanup? 2019-04-12 16:35:28 -03:00
Jaime Passos 98f4e98b85 Remove dup_ variables 2019-04-07 14:27:52 -03:00
Jaime Passos 23a8fea598 fix fog 2019-04-07 01:25:55 -03:00
Jaime Passos 4ea1dd3525 The player should be able to toggle shaders 2019-04-07 00:09:53 -03:00
Jaime Passos fa7f627c88 stuff 2019-04-06 23:33:34 -03:00
fickleheart b434eabf56 Alternate variant of ugly probably-bad hack 2019-03-30 23:15:11 -05:00
fickleheart 0911ec79d1 Try to fix hangs caused by PT_CLIENTJOIN with a non-zero ack 2019-03-30 22:48:55 -05:00
fickleheart 9bc3acd17a Fix compile issues 2019-03-26 08:26:41 -05:00
fickleheart 7090cf16b4 Unclose a node if it sends PT_CLIENTJOIN..? fuck it, why not 2019-03-26 01:36:12 -05:00
fickleheart ca2979c1af Free nodes properly in cleanupnodes
Hopefully the other changes herein have rendered
cleanupnodes obsolete, but I'm not too sure of
that.....
2019-03-26 01:10:00 -05:00
fickleheart 6cf7cc0276 Is this useful in any way? 2019-03-26 00:09:23 -05:00
fickleheart 204a6d5c20 Let's try some sanity checks on the resync code... 2019-03-25 23:58:44 -05:00
fickleheart 29f460a21f pbbbbt fix compile error 2019-03-25 22:52:42 -05:00
fickleheart 0485b4cf5c Make sure clients never have local_resynchinprogress on when joining a game... 2019-03-25 22:49:37 -05:00
fickleheart 3455791054 More attempts that may fix things?
I'm uncommenting a bunch of LJ code that was never
committed uncommented, so I might be breaking something
horribly here....
2019-03-25 22:44:34 -05:00
fickleheart a35e9d5abd Don't force-close connection when getting a join request!
We need to send the ackret, first of all!
2019-03-25 22:23:35 -05:00
fickleheart 8c56f1aa0b Wacky attempt at not reopening nodes for D/Ced ackreting clients 2019-03-25 22:22:25 -05:00
Jaime Passos e1f1e63cc9 fix postprocessor 2019-03-21 18:33:03 -03:00
Jaime Passos 76967e46bb destroy hw_glide.h because no modern GPU supports such API 2019-03-21 18:23:40 -03:00
Jaime Passos 9451b10ac5 add SHADERS comment support 2019-03-19 18:52:41 -03:00
Jaime Passos dd4e5ea373 fix shader loading on startup 2019-03-19 18:41:12 -03:00
Jaime Passos da001a5b54 PK3 support 2019-03-19 18:25:55 -03:00
Jaime Passos f714cba310 Improve custom shader support 2019-03-19 17:37:04 -03:00
Jaime Passos 848ae84188 Merge branch 'master' of https://github.com/STJr/SRB2 into gl_shaders 2019-03-19 15:33:16 -03:00
Jaime Passos 9ffb093f44 change (void*) to (char*) 2019-03-19 14:41:48 -03:00
Jaime Passos ae3ad1ea56 wups 2019-03-19 13:32:44 -03:00
Jaime Passos 75919422c6 custom shader support 2019-03-18 23:03:29 -03:00
Jaime Passos 1de35b9076 fix buildbot 2019-03-18 20:04:28 -03:00
Jaime Passos 5c399b0944 add vertex shaders 2019-03-18 19:17:47 -03:00
Jaime Passos f210053735 md3-vanilla 2019-03-18 18:34:20 -03:00
Jaime Passos 9879734d52 I don't care about DirectDraw
Neither SDL 1.2
2019-03-18 15:54:29 -03:00
Jaime Passos 1cfdd07ee0 gl4 2019-03-17 22:27:50 -03:00
Jimita 6e4b42fc97 Merge branch 'next' into flashpals-on-screenshots 2019-03-15 16:38:33 -03:00
James R 7e389f4062 Extend map name text matching code into a function 2019-02-23 21:27:09 -08:00
James R 3cdfb6327a Add support for custom keywords
For now, 32 characters separated by spaces.

Also fixed a SIGSEGV from an empty level title.
2019-02-22 22:25:05 -08:00
James R 0a9ba013fe Overhaul the map command
Added support for map names, matched by substring and keywords too!
Added support for two digit MAP codes without the MAP part.
Added support for decimal map number. (But who cares.)

Gave a better description of command.
Supported abbreviated optional parameters.

And now REALLY detects incorrect parameters.
2019-02-22 20:18:33 -08:00
james c95928b46f I shouldn't be surprised 2019-02-15 17:30:27 -08:00
James R 55430e3068 Open a new connection before we check socket errors
And somehow this applies if you use `addfile` after having added the server.
Some claim that there are other cases too.
2019-02-09 07:50:26 +00:00
james 356249dade Set modifiers in a non-reactive manner 2019-01-17 16:47:01 -08:00
Jimita 424b2b1aaf Merge branch 'next' into flashpals-on-screenshots 2019-01-16 05:59:05 -02:00
mazmazz 2592f42a17 Remove unnecessary version info call 2019-01-05 19:56:27 -05:00
mazmazz 20879f1f40 Remove zlib from release brew packages
(it was never in the original travis script)
2019-01-05 19:49:25 -05:00
mazmazz 17cde328c1 Use standard OSX brew bottles to speed up test buildbots 2019-01-05 19:43:37 -05:00
mazmazz 9ef7d2e6ba OS X set CFLAGS+="-march=core2" for compatible binaries with old Macs 2019-01-05 19:34:39 -05:00
mazmazz 0834dbc194 * Add homebrew tap mazmazz/srb2
* Use sdl2_mixer from mazmazz/srb2 due to removed options from homebrew-core
* Use `brew install --build-bottle` to build compatible libraries for old Macs
2019-01-05 19:20:58 -05:00
mazmazz 97f8448b72 Don't terminate in after_success because it halts the log abruptly 2019-01-05 10:17:33 -05:00
mazmazz abaa8730a5 Revised comments 2019-01-05 09:54:45 -05:00
mazmazz 578a4fe80d Merge remote-tracking branch 'public-gl/master' into travis-deployer 2019-01-05 09:08:34 -05:00
Marco Z 882355d24b Specify HAVE_LIBGME, paths, and depends only for Win32/x64 MSVC 2019-01-04 21:18:55 -05:00
Marco Z 09ed8bd046 Add LibGME to DD vc10 project 2019-01-04 20:43:45 -05:00
Marco Z 88c4a54cea Add GME to VC10 SRB2SDL project 2019-01-04 20:43:42 -05:00
mazmazz ac7b29eb2d Add __DPL_ACTIVE condition to optional asset download 2019-01-02 20:48:46 -05:00
mazmazz 9b3174c4f4 Correct asset directory for travis 2019-01-02 18:38:02 -05:00
mazmazz 831752dc0a Merge branch 'public-musicplus-core' into public-musicplus-lua 2019-01-02 04:25:30 -05:00
Jimita the Cat c3d69a8a04 Merge branch 'flashpals-on-screenshots' of https://github.com/monster-psychic-cat/SRB2 into flashpals-on-screenshots 2019-01-02 01:02:14 -03:00
Jimita the Cat 892e650712 dumb 2019-01-02 01:01:57 -03:00
Jimita 8fdff96733 Merge branch 'next' into flashpals-on-screenshots 2019-01-02 01:55:59 -02:00
Jimita the Cat e765b9400c Add support for flashpals in screenshots 2019-01-02 00:41:52 -03:00
mazmazz 4d4b048ead Don't download individual asset files; support only archives 2018-12-31 19:11:01 -05:00
mazmazz 78fa72514f Implement deployer scripts for Travis -- OSX and Linux package building 2018-12-30 15:22:50 -05:00
TehRealSalt f9c8a1286d House keeping
- Remove the potentially GPL-infringing discord_pass.h file.
- Let DISCORD_APPID be a public #define.
- Use server_context as party ID.
- Add more states ("Watching Demo", "Menu").
- Only show map images on supported maps. Falls back to an image of a dice.
- Displays "???" as the map name for Hell maps.
- Voting displays an image of the BG planet, depending on the gamemode.
- Added a fallback title screen large image.
- Added a fallback character image.
- General code cleanup & safety checks.
- Give CV_NETVAR to cv_maxplayers (I should come up with a better way of sending this information without overwriting user settings, but this'll do for now)
2018-10-30 05:44:29 -04:00
TehRealSalt ff8c70f9fe Missed these from an old experiment 2018-10-22 14:57:02 -04:00
TehRealSalt 4e549532ee Half-done Discord Rich Presence support
It's soooo close to being awesome, but so far away. Making game invitations as the host meant that it would redirect to "connect self" for other people, because we can't get the IP address from the host.

If anyone has a solution, you've got my gratitude; this was going so smoothly until it hit that brick wall.
2018-10-22 00:34:45 -04:00
mazmazz 2c1b91a196 Merge branch 'public-musicplus-core' into public-musicplus-lua 2018-09-19 19:56:47 -04:00
mazmazz e1a4bf4dd7 MP Lua: FadeMusic signed/unsigned comparison fix (buildbots) 2018-09-19 19:55:22 -04:00
mazmazz 37f27888c8 MP Lua: MusicExists Mixed D+C fix (buildbots) 2018-09-19 19:29:38 -04:00
mazmazz 950e2ddd1a Merge branch 'public-musicplus-core' into public-musicplus-lua 2018-09-19 19:19:30 -04:00
mazmazz 321cd5758a Merge branch 'public-musicplus-core' into public-musicplus-lua 2018-09-19 18:56:17 -04:00
mazmazz 555f4329a5 Merge branch 'public-musicplus-core' into public-musicplus-lua 2018-09-18 12:56:16 -04:00
mazmazz 88d37fd76e musicplus-lua 2.2 -> 2.1 backport 2018-09-18 11:52:29 -04:00
Alam Ed Arias 3f4e0286eb Merge branch 'master' into io 2016-03-07 16:23:08 -05:00
Alam Ed Arias bdad2ccc12 Merge branch 'next' into io 2016-02-26 01:57:28 -05:00
wolfy852 db7da456d2 Remove block on % in filename strings
According to Alam, supporting this shouldn't cause any issues.
2016-01-29 01:38:41 -06:00
Monster Iestyn 2eedecb93a Get rid of unneeded tab spaces
Least I can do to make up for breaking io.open in the first place :E
2016-01-26 12:07:28 +00:00
Nipples the Enchilada 9c299e5ad4 Fix and clean up io_open after MI broke it horribly
strcpy(NULL, filename); congrats
2016-01-25 22:13:24 -06:00
Monster Iestyn 14dcd2404b Fixed compiler warnings to the best of my ability
Hopefully this all still works properly, try not to kill me if it doesn't =V
2016-01-25 22:12:54 -06:00
Monster Iestyn 63a3e03bb0 Fixed math for calculating current texture in texture animations 2016-01-25 22:12:53 -06:00
Monster Iestyn f65c5c016a Fix shadowing in mapheaderinfo_get 2016-01-25 22:12:52 -06:00
Alam Ed Arias c7e540a870 whitespace cleanup 2016-01-25 22:12:51 -06:00
Inuyasha c30188f9fd interscreen is a lump name and thus needs lstring
... not just lstring though, but the behavior with i that is used elsewhere.
2016-01-25 22:12:50 -06:00
Inuyasha f559b50995 fix bad lstring usage in map header lua
This is not how you use pushlstring! This is actually sending uninitialized memory to Lua, which is making scripts have inconsistent results (duh?)

c/o JTE: "Tell Red they're a doofus."
2016-01-25 22:12:50 -06:00
Monster Iestyn f2f8906a19 Use modulo, not bitwise AND. My fault once again, whoops.
The point here is ColorOpposite(MAXSKINCOLORS) would have given an actual result of its own since MAXSKINCOLORS & MAXSKINCOLORS is still MAXSKINCOLORS. This shouldn't happen though, as both Color_Opposite[MAXSKINCOLORS*2] and Color_Opposite[MAXSKINCOLOR*2+1] aren't defined.
2016-01-25 22:12:49 -06:00
Inuyasha 0f2a092741 objectplace stability fix
Objectplace reallocates the mapthings list to add one more mapthing. By itself there's no problem with this.
But, mobj->spawnpoint is a pointer to the mapthing's location in the mapthings list.
So by reallocating the mapthings list, all references to mobj->spawnpoints point to freed memory.

... Oops.

Now when objectplace reallocates the mapthings list it actually corrects the locations of all mobj's spawnpoints to point to the new list.

Hooray, you can use NiGHTS objectplace again if you really want to.
2016-01-25 22:12:48 -06:00
Nipples the Enchilada 2639bf4c0b Add liolib.c to CMakeLists 2016-01-23 23:29:27 -06:00
wolfy852 591b803566 Limit file write size to 1MB
If the total file size is above 1MB after writing, discard all changes.
2016-01-22 21:45:48 -06:00
wolfy852 e274946528 Call I_mkdir on subdirectories [NEEDS CLEANUP]
I got lazy and used a weird inefficient method, but I don't know how to clean this mess up :c At least it works.
2016-01-22 00:46:32 -06:00
wolfy852 5579fb5240 Limit file creation/manipulation to luafiles subfolder
Also block % in filename strings
2016-01-20 22:35:53 -06:00
wolfy852 de03db99e7 Block possible methods of accessing folders outside of SRB2 2016-01-20 21:31:00 -06:00
wolfy852 569f7d15d1 Efficiency improvement in whitelist check
Thanks Inu!
2016-01-20 16:59:55 -06:00
wolfy852 a68e92690f Implement file type whitelist, completely remove popen and pclose
This is probably super inefficient. Someone please teach me how2C.
2016-01-20 02:26:15 -06:00
wolfy852 c9fe83b95d Block the use of ../ and ..\\
...and remove io.popen(), cause that shit is DANGEROUS.
2016-01-17 01:37:19 -06:00
wolfy852 eb7c36d72c Reimplement I/O library
Note: I/O library is fully functioning in this state, but lacks security restrictions. We'll get to those later ;)
2016-01-16 19:31:36 -06:00
979 changed files with 145942 additions and 140236 deletions

No files matched your search

+14 -7
View File
@@ -25,6 +25,13 @@ jobs:
- run:
name: Add i386 arch
command: dpkg --add-architecture i386
- run:
name: Add STJr PPA
command: |
apt-get -qq update
apt-get -qq -y install dirmngr
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6
echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" >> /etc/apt/sources.list
- run:
name: Update APT listing
command: apt-get -qq update
@@ -36,18 +43,18 @@ 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 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:
- /var/cache/apt/archives
- checkout
- run:
name: Compile without network support and BLUA
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
- run:
name: wipe build
command: make -C src LINUX=1 cleandep
#- run:
# name: Compile without network support and BLUA
# command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
#- run:
# name: wipe build
# command: make -C src LINUX=1 cleandep
- run:
name: rebuild depend
command: make -C src LINUX=1 clean
+5
View File
@@ -21,3 +21,8 @@ Win32_LIB_ASM_Release
/.vs
/debian
/assets/debian
compile.sh
*.gz
.vscode/
out
build
+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
+68 -49
View File
@@ -23,6 +23,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.4
compiler: gcc-4.4
@@ -37,6 +38,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.6
compiler: gcc-4.6
@@ -51,6 +53,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.7
compiler: gcc-4.7
@@ -72,6 +75,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
@@ -88,6 +92,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-7
compiler: gcc-7
@@ -104,6 +109,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-8
compiler: gcc-8
@@ -124,6 +130,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.5
compiler: clang-3.5
@@ -140,6 +147,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.6
compiler: clang-3.6
@@ -156,6 +164,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.7
compiler: clang-3.7
@@ -172,6 +181,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.8
compiler: clang-3.8
@@ -188,6 +198,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.9
compiler: clang-3.9
@@ -294,6 +305,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
@@ -435,6 +447,31 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=focal
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=focal
- PACKAGE_SUBVERSION=~20.04focal
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
@@ -458,6 +495,31 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=xenial
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=xenial
- PACKAGE_SUBVERSION=~16.04xenial
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
@@ -481,6 +543,7 @@ matrix:
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
@@ -490,57 +553,11 @@ matrix:
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=disco
- _DPL_JOB_NAME=eoan
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=disco
- PACKAGE_SUBVERSION=~19.04disco
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=cosmic
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=cosmic
- PACKAGE_SUBVERSION=~18.10cosmic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=xenial
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=xenial
- PACKAGE_SUBVERSION=~16.04xenial
- PACKAGE_DISTRO=eoan
- PACKAGE_SUBVERSION=~19.10eoan
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
allow_failures:
- compiler: clang-3.5
@@ -567,6 +584,7 @@ addons:
- libgl1-mesa-dev
- libgme-dev
- zlib1g-dev
- libcurl4-openssl-dev
- p7zip-full
homebrew:
taps:
@@ -576,6 +594,7 @@ addons:
- game-music-emu
- p7zip
- cmake
- curl
update: true
+1 -1
View File
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project(SRB2
VERSION 1.1.0
VERSION 1.6
LANGUAGES C)
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
+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
```
+67 -2
View File
@@ -1,13 +1,78 @@
# SRB2Kart
# SRB2Kart: Saturn
[SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
## Saturn Features (Take a look at the "Saturn Options" menu c;)
- 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 instead of GME
- Fixes looping and sounds better
- Allows filter configuration
- The minimal brightness with Shaders can be configured, now you can seeeee in dark areas (0-255 , uses Sector brightness values)
- 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)
- `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
- 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.
- 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
- 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)
## 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
- 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)
- 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
- 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
## MISC
- Bird's Camara Tilting feature is no longer turned on by default
- Bird's warning on the title screen has been removed
## Bugs
- On maps which change the song multiple times on map start (exp: Wandering Falls) may show multiple music credits appearing
- A2C antialiasing makes transparent surfaces even more transparent
- You tell us! c:
## 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)
## 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
+133 -145
View File
@@ -1,145 +1,133 @@
version: 1.1.0.{branch}-{build}
os: MinGW
environment:
CC: ccache
CCACHE_CC: i686-w64-mingw32-gcc
CCACHE_CC_64: x86_64-w64-mingw32-gcc
WINDRES: windres
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
MINGW_SDK: c:\msys64\mingw32
# 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-7.3.0-posix-seh-rt_v5-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
CCACHE_URL: http://alam.srb2.org/ccache.exe
CCACHE_COMPRESS: true
CCACHE_DIR: C:\Users\appveyor\.ccache
# Disable UPX by default. The user can override this in their Appveyor project settings
NOUPX: 1
##############################
# DEPLOYER VARIABLES
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
# DPL_TAG_ENABLED=1 will also build installers for release tags. DPL_ENABLED=1 must also be set.
# Set these in the Appveyor project settings
##############################
DPL_ENABLED: 0
DPL_TAG_ENABLED: 0
DPL_INSTALLER_NAME: srb2kart-v110
# Asset handling is barebones vs. Travis Deployer. We operate on 7z only.
# Include the README files and the OpenGL batch in the main and patch archives.
# The x86/x64 archives contain the DLL binaries.
ASSET_ARCHIVE_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z
ASSET_ARCHIVE_PATCH_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-patch-assets.7z
ASSET_ARCHIVE_X86_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x86-assets.7z
ASSET_ARCHIVE_X64_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x64-assets.7z
ASSET_ARCHIVE_OPTIONAL_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z
# This is overridden to 1 for release tag builds
ASSET_FILES_OPTIONAL_GET: 0
# For patches, also include the X86/X64 DLLs.
PACKAGE_PATCH_DLL_GET: 0
# Delete all asset downloads so they can be redownloaded
ASSET_CLEAN: 0
cache:
- nasm-2.12.01.zip
- upx391w.zip
- ccache.exe
- C:\Users\appveyor\.ccache
- C:\Users\appveyor\srb2_cache
install:
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
- if [%CONFIGURATION%] == [DD64] ( set "X86_64=1" )
- if [%CONFIGURATION%] == [DD64] ( set "CONFIGURATION=DD" )
- 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
- if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%"
- ccache -M 99M
- xcopy /Y /V /I ccache.exe "%MINGW_SDK%\bin"
configuration:
- SDL
- SDL64
#- DD
#- DD64
matrix:
allow_failures:
- configuration: DD
- configuration: DD64
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
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 GCC72=1 NOOBJDUMP=1 %NOUPX%"
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1" ) else ( set "MINGW_FLAGS=MINGW=1" )
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
build_script:
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
after_build:
- if [%X86_64%] == [1] (
set "BUILD_PATH=bin\Mingw64\Release"
) else (
set "BUILD_PATH=bin\Mingw\Release"
)
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
- ccache -s
- cmd: git rev-parse --short %APPVEYOR_REPO_COMMIT%>%TMP%/gitshort.txt
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
- set BUILD_ARCHIVE=%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%.7z
- set BUILDSARCHIVE=%APPVEYOR_REPO_BRANCH%-%CONFIGURATION%.7z
- cmd: 7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
- appveyor PushArtifact %BUILD_ARCHIVE%
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
- appveyor PushArtifact %BUILDSARCHIVE%
##############################
# DEPLOYER SCRIPT
##############################
- if [%DPL_ENABLED%] == [1] ( call "deployer\appveyor\deployer.bat" )
test: off
#deploy:
# - provider: FTP
# protocol: ftps
# host:
# secure: NsLJEPIBvmwCOj8Tg8RoRQ==
# username:
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
# password:
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
# folder: appveyor
# application:
# active_mode: false
# on:
# branch: master
# appveyor_repo_tag: true
on_finish:
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
version: 1.3.{branch}-{build}
os: MinGW
environment:
CC: ccache
CCACHE_CC: i686-w64-mingw32-gcc
CCACHE_CC_64: x86_64-w64-mingw32-gcc
WINDRES: windres
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
MINGW_SDK: c:\msys64\mingw32
# 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
UPX_ZIP: upx391w
UPX_URL: http://upx.sourceforge.net/download/upx391w.zip
CCACHE_EXE: ccache.exe
CCACHE_URL: http://alam.srb2.org/ccache.exe
CCACHE_COMPRESS: true
CCACHE_DIR: C:\Users\appveyor\.ccache
# Disable UPX by default. The user can override this in their Appveyor project settings
NOUPX: 1
##############################
# DEPLOYER VARIABLES
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
# DPL_TAG_ENABLED=1 will also build installers for release tags. DPL_ENABLED=1 must also be set.
# Set these in the Appveyor project settings
##############################
DPL_ENABLED: 0
DPL_TAG_ENABLED: 0
DPL_INSTALLER_NAME: srb2kart-v13
# Asset handling is barebones vs. Travis Deployer. We operate on 7z only.
# Include the README files and the OpenGL batch in the main and patch archives.
# The x86/x64 archives contain the DLL binaries.
ASSET_ARCHIVE_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z
ASSET_ARCHIVE_PATCH_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-patch-assets.7z
ASSET_ARCHIVE_X86_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x86-assets.7z
ASSET_ARCHIVE_X64_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x64-assets.7z
ASSET_ARCHIVE_OPTIONAL_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z
# This is overridden to 1 for release tag builds
ASSET_FILES_OPTIONAL_GET: 0
# For patches, also include the X86/X64 DLLs.
PACKAGE_PATCH_DLL_GET: 0
# Delete all asset downloads so they can be redownloaded
ASSET_CLEAN: 0
cache:
- upx391w.zip
- ccache.exe
- C:\Users\appveyor\.ccache
- C:\Users\appveyor\srb2_cache
install:
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
- 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
- if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%"
- ccache -M 99M
- xcopy /Y /V /I ccache.exe "%MINGW_SDK%\bin"
configuration:
- SDL
#- SDL64
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 [%NOUPX%] == [1] ( upx -V )
- ccache -V
- ccache -s
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
# for pull requests, take the owner's name only, if this isn't the same repo of course
- set "REPO=%APPVEYOR_REPO_BRANCH%"
- if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
build_script:
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
after_build:
- if [%X86_64%] == [1] (
set "BUILD_PATH=bin\Mingw64\Release"
) else (
set "BUILD_PATH=bin\Mingw\Release"
)
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
- ccache -s
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
- cmd: 7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
- appveyor PushArtifact %BUILD_ARCHIVE%
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
- appveyor PushArtifact %BUILDSARCHIVE%
##############################
# DEPLOYER SCRIPT
##############################
- if [%DPL_ENABLED%] == [1] ( call "deployer\appveyor\deployer.bat" )
test: off
#deploy:
# - provider: FTP
# protocol: ftps
# host:
# secure: NsLJEPIBvmwCOj8Tg8RoRQ==
# username:
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
# password:
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
# folder: appveyor
# application:
# active_mode: false
# on:
# branch: master
# appveyor_repo_tag: true
on_finish:
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+1
View File
@@ -10,3 +10,4 @@
!LICENSE-3RD-PARTY.txt
!CMakeLists.txt
!debian-template/*
installer
-1
View File
@@ -14,7 +14,6 @@ set(SRB2_ASSET_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/installer"
set(SRB2_ASSET_HASHED
"srb2.srb;\
patch.kart;\
gfx.kart;\
textures.kart;\
chars.kart;\
-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
+4 -3
View File
@@ -1,3 +1,4 @@
/srb2sdl.exe
/srb2win.exe
/r_opengl.dll
*.exe
*.mo
r_opengl.dll
*.bat
-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
View File
@@ -0,0 +1,23 @@
include(LibFindMacros)
libfind_pkg_check_modules(DISCORDRPC_PKGCONF DISCORDRPC)
find_path(DISCORDRPC_INCLUDE_DIR
NAMES discord_rpc.h
PATHS
${DISCORDRPC_PKGCONF_INCLUDE_DIRS}
"/usr/include"
"/usr/local/include"
)
find_library(DISCORDRPC_LIBRARY
NAMES discord-rpc
PATHS
${DISCORDRPC_PKGCONF_LIBRARY_DIRS}
"/usr/lib"
"/usr/local/lib"
)
set(DISCORDRPC_PROCESS_INCLUDES DISCORDRPC_INCLUDE_DIR)
set(DISCORDRPC_PROCESS_LIBS DISCORDRPC_LIBRARY)
libfind_process(DISCORDRPC)
+23
View File
@@ -0,0 +1,23 @@
include(LibFindMacros)
libfind_pkg_check_modules(OPENMPT_PKGCONF OPENMPT)
find_path(OPENMPT_INCLUDE_DIR
NAMES libopenmpt.h
PATHS
${OPENMPT_PKGCONF_INCLUDE_DIRS}
"/usr/include/libopenmpt"
"/usr/local/include/libopenmpt"
)
find_library(OPENMPT_LIBRARY
NAMES openmpt
PATHS
${OPENMPT_PKGCONF_LIBRARY_DIRS}
"/usr/lib"
"/usr/local/lib"
)
set(OPENMPT_PROCESS_INCLUDES OPENMPT_INCLUDE_DIR)
set(OPENMPT_PROCESS_LIBS OPENMPT_LIBRARY)
libfind_process(OPENMPT)
+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
+2
View File
@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 7.0.50~),
libpng-dev | libpng16-dev | libpng12-dev (>= 1.2.7),
zlib1g-dev,
libgme-dev,
libcurl4-openssl-dev,
libglu1-dev | libglu-dev,
libosmesa6-dev | libgl-dev,
nasm [i386]
@@ -24,6 +25,7 @@ Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
libsdl2-mixer-2.0-0,
zlib1g,
libgme0,
libcurl4,
libpng | libpng16-16 | libpng12-0
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
+34
View File
@@ -0,0 +1,34 @@
Bird's Hole Punching Protocol
Hole punch - a mechanism to bypass a firewall
Server - a third party which is not behind a firewall
Client - anything contacting the server
Magic - the four bytes 00 52 EB 11
Address - an IPv4 address
0 1 2 3 4 5 6 7 8 9
+-------+-------+----+
| Magic |Address|Port|
+-------+-------+----+
Relay Packet
A client that expects to be the target of a hole punch
must contact the server frequently, to keep a UDP
"connection" open, so that the server may relay hole
punching requests to them.
A client makes a hole punching request to another client
by sending a Relay Packet to the server. The server then
sends another Relay Packet to the client described by the
first packet. The second packet is filled with the source
address and port of the first packet.
Once a client receives a Relay Packet, this protocol's
purpose is fulfilled and the client is aware that another
client requests a hole punch.
vim: noai
+6 -17
View File
@@ -1,12 +1,13 @@
# SRB2Kart - Which DLLs do I need to bundle?
Updated 12/4/2018 (v2.1.21)
Updated 8/23/2020 (v1.3)
Here are the required DLLs, per build. For each architecture, copy all the binaries from these folders:
* libs\dll-binaries\[i686/x86_64]
* libs\SDL2\[i686/x86_64]...\bin
* libs\SDL2_mixer\[i686/x86_64]...\bin
* libs\libopenmpt\[x86/x86_64]...\bin\mingw
and don't forget to build r_opengl.dll for srb2dd.
@@ -14,30 +15,18 @@ and don't forget to build r_opengl.dll for srb2dd.
* libs\dll-binaries\i686\exchndl.dll
* libs\dll-binaries\i686\libgme.dll
* libs\dll-binaries\i686\discord-rpc.dll
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
* libs\SDL2\i686-w64-mingw32\bin\SDL2.dll
* libs\SDL2_mixer\i686-w64-mingw32\bin\*.dll (get everything)
* libs\libopenmpt\x86\bin\mingw\libopenmpt.dll
## 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)
## srb2kartdd, 32-bit
* libs\dll-binaries\i686\exchndl.dll
* libs\dll-binaries\i686\fmodex.dll
* libs\dll-binaries\i686\libgme.dll
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
* r_opengl.dll (build this from make)
## srb2kartdd, 64-bit
* libs\dll-binaries\x86_64\exchndl.dll
* libs\dll-binaries\x86_64\fmodex.dll
* libs\dll-binaries\x86_64\libgme.dll
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
* r_opengl.dll (build this from make)
* libs\libopenmpt\x86_64\bin\mingw\libopenmpt.dll
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\fmodex\inc;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)libs\fmodex\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x64'">
<Link>
<AdditionalDependencies>fmodexL64_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'">
<Link>
<AdditionalDependencies>fmodexL_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
+4 -4
View File
@@ -1,7 +1,7 @@
Bugs are now managed in the SDL bug tracker, here:
Bugs are now managed in the SDL issue tracker, here:
https://bugzilla.libsdl.org/
https://github.com/libsdl-org/SDL/issues
You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.
@@ -11,6 +11,6 @@ You may also find help at the SDL forums/mailing list:
https://discourse.libsdl.org/
Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
bugs discussed on the mailing list may be forgotten or missed.
Bug reports are welcome here, but we really appreciate if you use the issue
tracker, as bugs discussed on the mailing list may be forgotten or missed.
+1 -1
View File
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
+311
View File
@@ -1,6 +1,317 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.22:
---------------------------------------------------------------------------
General:
* Added SDL_RenderGetWindow() to get the window associated with a renderer
* Added floating point rectangle functions:
* SDL_PointInFRect()
* SDL_FRectEmpty()
* SDL_FRectEquals()
* SDL_FRectEqualsEpsilon()
* SDL_HasIntersectionF()
* SDL_IntersectFRect()
* SDL_UnionFRect()
* SDL_EncloseFPoints()
* SDL_IntersectFRectAndLine()
* Added SDL_IsTextInputShown() which returns whether the IME window is currently shown
* Added SDL_ClearComposition() to dismiss the composition window without disabling IME input
* Added SDL_TEXTEDITING_EXT event for handling long composition text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable it
* Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control whether the mouse should be constrained to the whole window or the center of the window when relative mode is enabled
* The mouse is now automatically captured when mouse buttons are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows you to control this behavior
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let SDL know that a foreign window will be used with OpenGL
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let SDL know that a foreign window will be used with Vulkan
* Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify whether an SDL_QUIT event will be delivered when the last application window is closed
* Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
Windows:
* Added support for SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM to the D3D9 renderer
Linux:
* Compiling with Wayland support requires libwayland-client version 1.18.0 or later
* Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows
* Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to allow using libdecor with compositors that support xdg-decoration
Android:
* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity
---------------------------------------------------------------------------
2.0.20:
---------------------------------------------------------------------------
General:
* SDL_RenderGeometryRaw() takes a pointer to SDL_Color, not int. You can cast color data in SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 on little endian systems) for this parameter.
* Improved accuracy of horizontal and vertical line drawing when using OpenGL or OpenGLES
* Added the hint SDL_HINT_RENDER_LINE_METHOD to control the method of line drawing used, to select speed, correctness, and compatibility.
Windows:
* Fixed size of custom cursors
Linux:
* Fixed hotplug controller detection, broken in 2.0.18
---------------------------------------------------------------------------
2.0.18:
---------------------------------------------------------------------------
General:
* The SDL wiki documentation and development headers are automatically kept in sync
* Each function has information about in which version of SDL it was introduced
* SDL-specific CMake options are now prefixed with 'SDL_'. Be sure to update your CMake build scripts accordingly!
* Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information
* Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
* Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture
* Added SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates
* Added SDL_RenderSetVSync() to change whether a renderer present is synchronized with vblank at runtime
* Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels
* Added a window event SDL_WINDOWEVENT_DISPLAY_CHANGED which is sent when a window changes what display it's centered on
* Added SDL_GetWindowICCProfile() to query a window's ICC profile, and a window event SDL_WINDOWEVENT_ICCPROF_CHANGED that is sent when it changes
* Added the hint SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY to allow EGL windows to be transparent instead of opaque
* SDL_WaitEvent() has been redesigned to use less CPU in most cases
* Added SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to confine the mouse cursor to an area of a window
* You can now read precise mouse wheel motion using 'preciseX' and 'preciseY' event fields
* Added SDL_GameControllerHasRumble() and SDL_GameControllerHasRumbleTriggers() to query whether a game controller supports rumble
* Added SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to query whether a joystick supports rumble
* SDL's hidapi implementation is now available as a public API in SDL_hidapi.h
Windows:
* Improved relative mouse motion over Windows Remote Desktop
* Added the hint SDL_HINT_IME_SHOW_UI to show native UI components instead of hiding them (defaults off)
Windows/UWP:
* WGI is used instead of XInput for better controller support in UWP apps
Linux:
* Added the hint SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME to set the activity that's displayed by the system when the screensaver is disabled
* Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices
* Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices that will be opened in addition to the normal joystick detection
* Added SDL_LinuxSetThreadPriorityAndPolicy() for more control over a thread priority on Linux
Android:
* Added support for audio output and capture using AAudio on Android 8.1 and newer
* Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
Apple Arcade:
* Added SDL_GameControllerGetAppleSFSymbolsNameForButton() and SDL_GameControllerGetAppleSFSymbolsNameForAxis() to support Apple Arcade titles
iOS:
* Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.
* Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
---------------------------------------------------------------------------
2.0.16:
---------------------------------------------------------------------------
General:
* Added SDL_FlashWindow() to get a user's attention
* Added SDL_GetAudioDeviceSpec() to get the preferred audio format of a device
* Added SDL_SetWindowAlwaysOnTop() to dynamically change the SDL_WINDOW_ALWAYS_ON_TOP flag for a window
* Added SDL_SetWindowKeyboardGrab() to support grabbing the keyboard independently of the mouse
* Added SDL_SoftStretchLinear() to do bilinear scaling between 32-bit software surfaces
* Added SDL_UpdateNVTexture() to update streaming NV12/21 textures
* Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow sending custom trigger effects to the DualSense controller
* Added SDL_GameControllerGetSensorDataRate() to get the sensor data rate for PlayStation and Nintendo Switch controllers
* Added support for the Amazon Luna game controller
* Added rumble support for the Google Stadia controller using the HIDAPI driver
* Added SDL_GameControllerType constants for the Amazon Luna and Google Stadia controllers
* Added analog rumble for Nintendo Switch Pro controllers using the HIDAPI driver
* Reduced CPU usage when using SDL_WaitEvent() and SDL_WaitEventTimeout()
Windows:
* Added SDL_SetWindowsMessageHook() to set a function that is called for all Windows messages
* Added SDL_RenderGetD3D11Device() to get the D3D11 device used by the SDL renderer
Linux:
* Greatly improved Wayland support
* Added support for audio output and capture using Pipewire
* Added the hint SDL_HINT_AUDIO_INCLUDE_MONITORS to control whether PulseAudio recording should include monitor devices
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panels
Android:
* Added SDL_AndroidShowToast() to show a lightweight notification
iOS:
* Added support for mouse relative mode on iOS 14.1 and newer
* Added support for the Xbox Series X controller
tvOS:
* Added support for the Xbox Series X controller
---------------------------------------------------------------------------
2.0.14:
---------------------------------------------------------------------------
General:
* Added support for PS5 DualSense and Xbox Series X controllers to the HIDAPI controller driver
* Added game controller button constants for paddles and new buttons
* Added game controller functions to get additional information:
* SDL_GameControllerGetSerial()
* SDL_GameControllerHasAxis()
* SDL_GameControllerHasButton()
* SDL_GameControllerGetNumTouchpads()
* SDL_GameControllerGetNumTouchpadFingers()
* SDL_GameControllerGetTouchpadFinger()
* SDL_GameControllerHasSensor()
* SDL_GameControllerSetSensorEnabled()
* SDL_GameControllerIsSensorEnabled()
* SDL_GameControllerGetSensorData()
* SDL_GameControllerRumbleTriggers()
* SDL_GameControllerHasLED()
* SDL_GameControllerSetLED()
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_PS5 to control whether the HIDAPI driver for PS5 controllers should be used.
* Added joystick functions to get additional information:
* SDL_JoystickGetSerial()
* SDL_JoystickRumbleTriggers()
* SDL_JoystickHasLED()
* SDL_JoystickSetLED()
* Added an API to allow the application to create virtual joysticks:
* SDL_JoystickAttachVirtual()
* SDL_JoystickDetachVirtual()
* SDL_JoystickIsVirtual()
* SDL_JoystickSetVirtualAxis()
* SDL_JoystickSetVirtualButton()
* SDL_JoystickSetVirtualHat()
* Added SDL_LockSensors() and SDL_UnlockSensors() to guarantee exclusive access to the sensor list
* Added SDL_HAPTIC_STEERING_AXIS to play an effect on the steering wheel
* Added the hint SDL_HINT_MOUSE_RELATIVE_SCALING to control whether relative motion is scaled by the screen DPI or renderer logical size
* The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is now false for better compatibility with modern window managers
* Added SDL_GetPreferredLocales() to get the application's current locale setting
* Added the hint SDL_HINT_PREFERRED_LOCALES to override your application's default locale setting
* Added SDL_OpenURL() to open a URL in the system's default browser
* Added SDL_HasSurfaceRLE() to tell whether a surface is currently using RLE encoding
* Added SDL_SIMDRealloc() to reallocate memory obtained from SDL_SIMDAlloc()
* Added SDL_GetErrorMsg() to get the last error in a thread-safe way
* Added SDL_crc32(), SDL_wcscasecmp(), SDL_wcsncasecmp(), SDL_trunc(), SDL_truncf()
* Added clearer names for RGB pixel formats, e.g. SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_XBGR8888, etc.
Windows:
* Added the RAWINPUT controller driver to support more than 4 Xbox controllers simultaneously
* Added the hint SDL_HINT_JOYSTICK_RAWINPUT to control whether the RAWINPUT driver should be used
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT to control whether XInput and WGI should be used to for complete controller functionality with the RAWINPUT driver.
macOS:
* Added the SDL_WINDOW_METAL flag to specify that a window should be created with a Metal view
* Added SDL_Metal_GetLayer() to get the CAMetalLayer backing a Metal view
* Added SDL_Metal_GetDrawableSize() to get the size of a window's drawable, in pixels
Linux:
* Added the hint SDL_HINT_AUDIO_DEVICE_APP_NAME to specify the name that shows up in PulseAudio for your application
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_NAME to specify the name that shows up in PulseAudio associated with your audio stream
* Added the hint SDL_HINT_LINUX_JOYSTICK_DEADZONES to control whether HID defined dead zones should be respected on Linux
* Added the hint SDL_HINT_THREAD_PRIORITY_POLICY to specify the thread scheduler policy
* Added the hint SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow time critical threads to use a realtime scheduling policy
Android:
* Added SDL_AndroidRequestPermission() to request a specific system permission
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO to control whether audio will pause when the application goes intot he background
OS/2:
* Added support for OS/2, see docs/README-os2.md for details
Emscripten (running in a web browser):
* Added the hint SDL_HINT_EMSCRIPTEN_ASYNCIFY to control whether SDL should call emscripten_sleep internally
---------------------------------------------------------------------------
2.0.12:
---------------------------------------------------------------------------
General:
* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture
* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation
* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0.
* Added the window underneath the finger to the SDL_TouchFingerEvent
* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection
* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index
* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device
* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used.
* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
* Added support for many game controllers, including:
* 8BitDo FC30 Pro
* 8BitDo M30 GamePad
* BDA PS4 Fightpad
* HORI Fighting Commander
* Hyperkin Duke
* Hyperkin X91
* MOGA XP5-A Plus
* NACON GC-400ES
* NVIDIA Controller v01.04
* PDP Versus Fighting Pad
* Razer Raion Fightpad for PS4
* Razer Serval
* Stadia Controller
* SteelSeries Stratus Duo
* Victrix Pro Fight Stick for PS4
* Xbox One Elite Series 2
* Fixed blocking game controller rumble calls when using the HIDAPI driver
* Added SDL_zeroa() macro to zero an array of elements
* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features
Windows:
* Fixed crash when using the release SDL DLL with applications built with gcc
* Fixed performance regression in event handling introduced in 2.0.10
* Added support for SDL_SetThreadPriority() for UWP applications
Linux:
* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows
* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default
iOS / tvOS / macOS:
* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.
iOS/ tvOS:
* Added support for Bluetooth Steam Controllers as game controllers
tvOS:
* Fixed support for surround sound on Apple TV
Android:
* Added SDL_GetAndroidSDKVersion() to return the API level of the current device
* Added support for audio capture using OpenSL-ES
* Added support for Bluetooth Steam Controllers as game controllers
* Fixed rare crashes when the app goes into the background or terminates
---------------------------------------------------------------------------
2.0.10:
---------------------------------------------------------------------------
General:
* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward
* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
* The SDL rendering API now uses batched rendering by default, for improved performance
* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering
* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer.
* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes
* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings
* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events
* Improved handling of malformed WAVE and BMP files, fixing potential security exploits
Linux:
* Removed the Mir video driver in favor of Wayland
iOS / tvOS:
* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13
* Added support for text input using Bluetooth keyboards
Android:
* Added low latency audio using OpenSL ES
* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)
SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0.
SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1.
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.
---------------------------------------------------------------------------
2.0.9:
---------------------------------------------------------------------------
+96 -38
View File
@@ -10,8 +10,7 @@ If you are using the older ant build process, it is no longer officially
supported, but you can use the "android-project-ant" directory as a template.
================================================================================
Requirements
Requirements
================================================================================
Android SDK (version 26 or later)
@@ -20,11 +19,10 @@ https://developer.android.com/sdk/index.html
Android NDK r15c or later
https://developer.android.com/tools/sdk/ndk/index.html
Minimum API level supported by SDL: 14 (Android 4.0.1)
Minimum API level supported by SDL: 16 (Android 4.1)
================================================================================
How the port works
How the port works
================================================================================
- Android applications are Java-based, optionally with parts written in C
@@ -42,8 +40,7 @@ dispatches to native functions implemented in the SDL library:
src/core/android/SDL_android.c
================================================================================
Building an app
Building an app
================================================================================
For simple projects you can use the script located at build-scripts/androidbuild.sh
@@ -82,6 +79,23 @@ For more complex projects, follow these instructions:
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
If you already have a project that uses CMake, the instructions change somewhat:
1. Do points 1 and 2 from the instruction above.
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
add_executable() for the target containing your "main" function.
If you wish to use Android Studio, you can skip the last step.
4. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any
connected Android device
Here's an explanation of the files in the Android project, so you can customize them:
android-project/app
@@ -90,10 +104,12 @@ Here's an explanation of the files in the Android project, so you can customize
jni/ - directory holding native code
jni/Application.mk - Application JNI settings, including target platform and STL library
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
jni/CMakeLists.txt - Top-level CMake project that adds SDL as a subproject
jni/SDL/ - (symlink to) directory holding the SDL library files
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
jni/src/ - directory holding your C/C++ source
jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
jni/src/CMakeLists.txt - CMake file that you may customize to include your source code and any library references
src/main/assets/ - directory holding asset files for your application
src/main/res/ - directory holding resources for your application
src/main/res/mipmap-* - directories holding icons for different phone hardware
@@ -101,8 +117,7 @@ Here's an explanation of the files in the Android project, so you can customize
src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.
================================================================================
Customizing your application name
Customizing your application name
================================================================================
To customize your application name, edit AndroidManifest.xml and replace
@@ -132,8 +147,7 @@ Then replace "SDLActivity" in AndroidManifest.xml with the name of your
class, .e.g. "MyGame"
================================================================================
Customizing your application icon
Customizing your application icon
================================================================================
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
@@ -141,8 +155,7 @@ the drawable directories under the res directory. There are several directories
for different screen sizes.
================================================================================
Loading assets
Loading assets
================================================================================
Any files you put in the "app/src/main/assets" directory of your project
@@ -170,11 +183,10 @@ disable this behaviour, see for example:
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
================================================================================
Pause / Resume behaviour
Pause / Resume behaviour
================================================================================
If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default),
If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),
the event loop will block itself when the app is paused (ie, when the user
returns to the main Android dashboard). Blocking is better in terms of battery
use, and it allows your app to spring back to life instantaneously after resume
@@ -186,13 +198,40 @@ app can continue to operate as it was.
However, there's a chance (on older hardware, or on systems under heavy load),
where the GL context can not be restored. In that case you have to listen for
a specific message, (which is not yet implemented!) and restore your textures
manually or quit the app (which is actually the kind of behaviour you'll see
under iOS, if the OS can not restore your GL context it will just kill your app)
a specific message (SDL_RENDER_DEVICE_RESET) and restore your textures
manually or quit the app.
You should not use the SDL renderer API while the app going in background:
- SDL_APP_WILLENTERBACKGROUND:
after you read this message, GL context gets backed-up and you should not
use the SDL renderer API.
When this event is received, you have to set the render target to NULL, if you're using it.
(eg call SDL_SetRenderTarget(renderer, NULL))
- SDL_APP_DIDENTERFOREGROUND:
GL context is restored, and the SDL renderer API is available (unless you
receive SDL_RENDER_DEVICE_RESET).
Mouse / Touch events
================================================================================
Threads and the Java VM
In some case, SDL generates synthetic mouse (resp. touch) events for touch
(resp. mouse) devices.
To enable/disable this behavior, see SDL_hints.h:
- SDL_HINT_TOUCH_MOUSE_EVENTS
- SDL_HINT_MOUSE_TOUCH_EVENTS
Misc
================================================================================
For some device, it appears to works better setting explicitly GL attributes
before creating a window:
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
Threads and the Java VM
================================================================================
For a quick tour on how Linux native threads interoperate with the Java VM, take
@@ -207,8 +246,17 @@ your thread automatically anyway (when you make an SDL call), but it'll never
detach it.
================================================================================
Using STL
If you ever want to use JNI in a native thread (created by "SDL_CreateThread()"),
it won't be able to find your java class and method because of the java class loader
which is different for native threads, than for java threads (eg your "main()").
the work-around is to find class/method, in you "main()" thread, and to use them
in your native thread.
see:
https://developer.android.com/training/articles/perf-jni#faq:-why-didnt-findclass-find-my-class
Using STL
================================================================================
You can use STL in your project by creating an Application.mk file in the jni
@@ -220,8 +268,7 @@ For more information go here:
https://developer.android.com/ndk/guides/cpp-support
================================================================================
Using the emulator
Using the emulator
================================================================================
There are some good tips and tricks for getting the most out of the
@@ -233,8 +280,7 @@ Notice that this software emulator is incredibly slow and needs a lot of disk sp
Using a real device works better.
================================================================================
Troubleshooting
Troubleshooting
================================================================================
You can see if adb can see any devices with the following command:
@@ -313,8 +359,7 @@ If you need to build without optimization turned on, you can create a file calle
APP_OPTIM := debug
================================================================================
Memory debugging
Memory debugging
================================================================================
The best (and slowest) way to debug memory issues on Android is valgrind.
@@ -365,8 +410,7 @@ When you're done instrumenting with valgrind, you can disable the wrapper:
adb shell setprop wrap.org.libsdl.app ""
================================================================================
Graphics debugging
Graphics debugging
================================================================================
If you are developing on a compatible Tegra-based tablet, NVidia provides
@@ -379,18 +423,16 @@ The Tegra Graphics Debugger is available from NVidia here:
https://developer.nvidia.com/tegra-graphics-debugger
================================================================================
Why is API level 14 the minimum required?
Why is API level 16 the minimum required?
================================================================================
The latest NDK toolchain doesn't support targeting earlier than API level 14.
The latest NDK toolchain doesn't support targeting earlier than API level 16.
As of this writing, according to https://developer.android.com/about/dashboards/index.html
about 99% of the Android devices accessing Google Play support API level 14 or
higher (October 2017).
about 99% of the Android devices accessing Google Play support API level 16 or
higher (January 2018).
================================================================================
A note regarding the use of the "dirty rectangles" rendering technique
A note regarding the use of the "dirty rectangles" rendering technique
================================================================================
If your app uses a variation of the "dirty rectangles" rendering technique,
@@ -408,8 +450,24 @@ screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
Ending your application
================================================================================
Known issues
Two legitimate ways:
- return from your main() function. Java side will automatically terminate the
Activity by calling Activity.finish().
- Android OS can decide to terminate your application by calling onDestroy()
(see Activity life cycle). Your application will receive a SDL_QUIT event you
can handle to save things and quit.
Don't call exit() as it stops the activity badly.
NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
SDLK_AC_BACK, for any purpose.
Known issues
================================================================================
- The number of buttons reported for each joystick is hardcoded to be 36, which
+53 -1
View File
@@ -15,7 +15,7 @@ platforms:
* Linux
* VS.NET 2010
* MinGW and Msys
* OS X with support for XCode
* macOS, iOS, and tvOS, with support for XCode
================================================================================
@@ -30,3 +30,55 @@ Assuming the source for SDL is located at ~/sdl
cmake ../sdl
This will build the static and dynamic versions of SDL in the ~/build directory.
================================================================================
Usage, iOS/tvOS
================================================================================
CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
using Xcode or Make, possibly among other build-systems.
When using a recent version of CMake (3.14+), it should be possible to:
- build SDL for iOS, both static and dynamic
- build SDL test apps (as iOS/tvOS .app bundles)
- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
To use, set the following CMake variables when running CMake's configuration stage:
- `CMAKE_SYSTEM_NAME=<OS>` (either `iOS` or `tvOS`)
- `CMAKE_OSX_SYSROOT=<SDK>` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
`appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
### Examples (for iOS/tvOS):
- for iOS-Simulator, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for iOS-Device, using the latest, installed SDK, 64-bit only
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"`
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
`cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Simulator, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Device, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
+29 -13
View File
@@ -15,29 +15,34 @@ What you need:
* Kernel-Framebuffer support: required: vesafb, radeonfb ....
* Mesa 7.0.x - optional for OpenGL
/etc/directfbrc
This file should contain the following lines to make
The `/etc/directfbrc` file should contain the following lines to make
your joystick work and avoid crashes:
------------------------
```
disable-module=joystick
disable-module=cle266
disable-module=cyber5k
no-linux-input-grab
------------------------
```
To disable to use x11 backend when DISPLAY variable is found use
```
export SDL_DIRECTFB_X11_CHECK=0
```
To disable the use of linux input devices, i.e. multimice/multikeyboard support,
use
```
export SDL_DIRECTFB_LINUX_INPUT=0
```
To use hardware accelerated YUV-overlays for YUV-textures, use:
```
export SDL_DIRECTFB_YUV_DIRECT=1
```
This is disabled by default. It will only support one
YUV texture, namely the first. Every other YUV texture will be
@@ -45,7 +50,9 @@ rendered in software.
In addition, you may use (directfb-1.2.x)
```
export SDL_DIRECTFB_YUV_UNDERLAY=1
```
to make the YUV texture an underlay. This will make the cursor to
be shown.
@@ -54,14 +61,18 @@ Simple Window Manager
=====================
The driver has support for a very, very basic window manager you may
want to use when running with "wm=default". Use
want to use when running with `wm=default`. Use
```
export SDL_DIRECTFB_WM=1
```
to enable basic window borders. In order to have the window title rendered,
you need to have the following font installed:
```
/usr/share/fonts/truetype/freefont/FreeSans.ttf
```
OpenGL Support
==============
@@ -71,21 +82,25 @@ works at least on all directfb supported platforms.
As of this writing 20100802 you need to pull Mesa from git and do the following:
------------------------
```
git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
------------------------
```
Edit configs/linux-directfb so that the Directories-section looks like
------------------------
Edit `configs/linux-directfb` so that the Directories-section looks like this:
```
# Directories
SRC_DIRS = mesa glu
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS =
------------------------
```
Then do the following:
```
make linux-directfb
make
@@ -95,13 +110,14 @@ sudo make install INSTALL_DIR=/usr/local/dfb_GL
cd src/mesa/drivers/directfb
make
sudo make install INSTALL_DIR=/usr/local/dfb_GL
------------------------
```
To run the SDL - testprograms:
```
export SDL_VIDEODRIVER=directfb
export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
./testgl
```
+25 -17
View File
@@ -1,7 +1,6 @@
Dynamic API
================================================================================
Originally posted by Ryan at:
https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U
# Dynamic API
Originally posted on Ryan's Google+ account.
Background:
@@ -35,10 +34,12 @@ So here's what we did:
SDL now has, internally, a table of function pointers. So, this is what SDL_Init
now looks like:
UInt32 SDL_Init(Uint32 flags)
{
return jump_table.SDL_Init(flags);
}
```c
UInt32 SDL_Init(Uint32 flags)
{
return jump_table.SDL_Init(flags);
}
```
Except that is all done with a bunch of macro magic so we don't have to maintain
every one of these.
@@ -47,22 +48,26 @@ What is jump_table.SDL_init()? Eventually, that's a function pointer of the real
SDL_Init() that you've been calling all this time. But at startup, it looks more
like this:
Uint32 SDL_Init_DEFAULT(Uint32 flags)
{
SDL_InitDynamicAPI();
return jump_table.SDL_Init(flags);
}
```c
Uint32 SDL_Init_DEFAULT(Uint32 flags)
{
SDL_InitDynamicAPI();
return jump_table.SDL_Init(flags);
}
```
SDL_InitDynamicAPI() fills in jump_table with all the actual SDL function
pointers, which means that this _DEFAULT function never gets called again.
pointers, which means that this `_DEFAULT` function never gets called again.
First call to any SDL function sets the whole thing up.
So you might be asking, what was the value in that? Isn't this what the operating
system's dynamic loader was supposed to do for us? Yes, but now we've got this
level of indirection, we can do things like this:
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
./MyGameThatIsStaticallyLinkedToSDL2
```bash
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
./MyGameThatIsStaticallyLinkedToSDL2
```
And now, this game that is statically linked to SDL, can still be overridden
with a newer, or better, SDL. The statically linked one will only be used as
@@ -94,7 +99,9 @@ SDL's function pointers (which might be statically linked into a program, or in
a shared library of its own). If so, it loads that library and looks for and
calls a single function:
SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
```c
SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);
```
That function takes a version number (more on that in a moment), the address of
the jump table, and the size, in bytes, of the table.
@@ -116,6 +123,7 @@ Steam Client, this isn't a bad option.
Finally, I'm sure some people are reading this and thinking,
"I don't want that overhead in my project!"
To which I would point out that the extra function call through the jump table
probably wouldn't even show up in a profile, but lucky you: this can all be
disabled. You can build SDL without this if you absolutely must, but we would
+19
View File
@@ -0,0 +1,19 @@
git
=========
The latest development version of SDL is available via git.
Git allows you to get up-to-the-minute fixes and enhancements;
as a developer works on a source tree, you can use "git" to mirror that
source tree instead of waiting for an official release. Please look
at the Git website ( https://git-scm.com/ ) for more
information on using git, where you can also download software for
macOS, Windows, and Unix systems.
git clone https://github.com/libsdl-org/SDL
If you are building SDL via configure, you will need to run autogen.sh
before running configure.
There is a web interface to the Git repository at:
http://github.com/libsdl-org/SDL/
+2 -20
View File
@@ -1,22 +1,4 @@
Mercurial
=========
We are no longer hosted in Mercurial. Please see README-git.md for details.
The latest development version of SDL is available via Mercurial.
Mercurial allows you to get up-to-the-minute fixes and enhancements;
as a developer works on a source tree, you can use "hg" to mirror that
source tree instead of waiting for an official release. Please look
at the Mercurial website ( https://www.mercurial-scm.org/ ) for more
information on using hg, where you can also download software for
Mac OS X, Windows, and Unix systems.
hg clone http://hg.libsdl.org/SDL
If you are building SDL via configure, you will need to run autogen.sh
before running configure.
There is a web interface to the subversion repository at:
http://hg.libsdl.org/SDL/
There is an RSS feed available at that URL, for those that want to
track commits in real time.
Thanks!
+41 -50
View File
@@ -1,7 +1,6 @@
iOS
======
==============================================================================
Building the Simple DirectMedia Layer for iOS 5.1+
==============================================================================
@@ -9,57 +8,29 @@ Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK.
Instructions:
1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode.
2. Select your desired target, and hit build.
There are three build targets:
- libSDL.a:
Build SDL as a statically linked library
- testsdl:
Build a test program (there are known test failures which are fine)
- Template:
Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.
1. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
2. Select your desired target, and hit build.
==============================================================================
Build SDL for iOS from the command line
==============================================================================
1. cd (PATH WHERE THE SDL CODE IS)/build-scripts
2. ./iosbuild.sh
If everything goes fine, you should see a build/ios directory, inside there's
two directories "lib" and "include".
"include" contains a copy of the SDL headers that you'll need for your project,
make sure to configure XCode to look for headers there.
"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both
to your XCode project. These libraries contain three architectures in them,
armv6 for legacy devices, armv7, and i386 (for the simulator).
By default, iosbuild.sh will autodetect the SDK version you have installed using
xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour
by setting the MIN_OS_VERSION variable, ie:
MIN_OS_VERSION=4.2 ./iosbuild.sh
==============================================================================
Using the Simple DirectMedia Layer for iOS
==============================================================================
FIXME: This needs to be updated for the latest methods
1. Run Xcode and create a new project using the iOS Game template, selecting the Objective C language and Metal game technology.
2. In the main view, delete all files except for Assets and LaunchScreen
3. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
4. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
5. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
7. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
8. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
9. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
10. Add any assets that your application needs.
11. Enjoy!
Here is the easiest method:
1. Build the SDL library (libSDL2.a) and the iPhone SDL Application template.
2. Install the iPhone SDL Application template by copying it to one of Xcode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/" and placing it there.
3. Start a new project using the template. The project should be immediately ready for use with SDL.
Here is a more manual method:
1. Create a new iOS view based application.
2. Build the SDL static library (libSDL2.a) for iOS and include them in your project. Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator.
3. Include the SDL header files in your project.
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically.
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code.
TODO: Add information regarding App Store requirements such as icons, etc.
==============================================================================
Notes -- Retina / High-DPI and window sizes
==============================================================================
@@ -88,7 +59,7 @@ orthographic projection matrix using the size in screen coordinates
(SDL_GetWindowSize()) can be used in order to display content at the same scale
no matter whether a Retina device is used or not.
==============================================================================
Notes -- Application events
==============================================================================
@@ -151,7 +122,6 @@ e.g.
}
==============================================================================
Notes -- Accelerometer as Joystick
==============================================================================
@@ -159,7 +129,7 @@ SDL for iPhone supports polling the built in accelerometer as a joystick device.
The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.
==============================================================================
Notes -- OpenGL ES
==============================================================================
@@ -179,7 +149,7 @@ OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided i
The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
==============================================================================
Notes -- Keyboard
==============================================================================
@@ -195,7 +165,12 @@ SDL_bool SDL_IsTextInputActive()
-- returns whether or not text events are enabled (and the onscreen keyboard is visible)
Notes -- Mouse
==============================================================================
iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist
Notes -- Reading and Writing files
==============================================================================
@@ -215,7 +190,7 @@ When your SDL based iPhone application starts up, it sets the working directory
More information on this subject is available here:
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
==============================================================================
Notes -- iPhone SDL limitations
==============================================================================
@@ -228,7 +203,23 @@ Textures:
Loading Shared Objects:
This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h.
Notes -- CoreBluetooth.framework
==============================================================================
SDL_JOYSTICK_HIDAPI is disabled by default. It can give you access to a lot
more game controller devices, but it requires permission from the user before
your app will be able to talk to the Bluetooth hardware. "Made For iOS"
branded controllers do not need this as we don't have to speak to them
directly with raw bluetooth, so many apps can live without this.
You'll need to link with CoreBluetooth.framework and add something like this
to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
Game Center
==============================================================================
@@ -266,7 +257,7 @@ e.g.
return 0;
}
==============================================================================
Deploying to older versions of iOS
==============================================================================
+27
View File
@@ -0,0 +1,27 @@
KMSDRM on *BSD
==================================================
KMSDRM is supported on FreeBSD and OpenBSD. DragonFlyBSD works but requires being a root user. NetBSD isn't supported yet because the application will crash when creating the KMSDRM screen.
WSCONS support has been brought back, but only as an input backend. It will not be brought back as a video backend to ease maintenance.
OpenBSD note: Note that the video backend assumes that the user has read/write permissions to the /dev/drm* devices.
SDL2 WSCONS input backend features
===================================================
1. It is keymap-aware; it will work properly with different keymaps.
2. It has mouse support.
3. Accent input is supported.
4. Compose keys are supported.
5. AltGr and Meta Shift keys work as intended.
Partially working or no input on OpenBSD/NetBSD.
==================================================
The WSCONS input backend needs read/write access to the /dev/wskbd* devices, without which it will not work properly. /dev/wsmouse must also be read/write accessible, otherwise mouse input will not work.
Partially working or no input on FreeBSD.
==================================================
The evdev devices are only accessible to the root user by default. Edit devfs rules to allow access to such devices. The /dev/kbd* devices are also only accessible to the root user by default. Edit devfs rules to allow access to such devices.
+26 -20
View File
@@ -9,28 +9,35 @@ at runtime, and you won't get a missing library error, at least with the
default configuration parameters.
================================================================================
Build Dependencies
================================================================================
Ubuntu 13.04, all available features enabled:
--------------------------------------------------------------------------------
sudo apt-get install build-essential mercurial make cmake autoconf automake \
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev
Ubuntu 20.04, all available features enabled:
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
to that command line for Wayland support.
sudo apt-get install build-essential git make cmake autoconf automake \
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
libxkbcommon-dev libdrm-dev libgbm-dev
Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command
line for Mir support.
Fedora 35, all available features enabled:
sudo yum install gcc git-core make cmake autoconf automake libtool \
alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
libsamplerate-devel
NOTES:
- This includes all the audio targets except arts, because Ubuntu pulled the
artsc0-dev package, but in theory SDL still supports it.
- This includes all the audio targets except arts and esd, because Ubuntu
(and/or Debian) pulled their packages, but in theory SDL still supports them.
The sndio audio target is also unavailable on Fedora.
- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
for higher-quality audio resampling. SDL will work without it if the library
is missing, so it's safe to build in support even if the end user doesn't
@@ -40,9 +47,8 @@ NOTES:
configure script to include DirectFB support. Send patches. :)
================================================================================
Joystick does not work
================================================================================
--------------------------------------------------------------------------------
If you compiled or are using a version of SDL with udev support (and you should!)
there's a few issues that may cause SDL to fail to detect your joystick. To
@@ -72,8 +78,8 @@ you need to set up an udev rule to force this variable.
A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks
like:
SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
You can set up similar rules for your device by changing the values listed in
idProduct and idVendor. To obtain these values, try:
+286
View File
@@ -0,0 +1,286 @@
# Mac OS X (aka macOS).
These instructions are for people using Apple's Mac OS X (pronounced
"ten"), which in newer versions is just referred to as "macOS".
From the developer's point of view, macOS is a sort of hybrid Mac and
Unix system, and you have the option of using either traditional
command line tools or Apple's IDE Xcode.
# Command Line Build
To build SDL using the command line, use the standard configure and make
process:
```bash
mkdir build
cd build
../configure
make
sudo make install
```
CMake is also known to work, although it continues to be a work in progress:
```bash
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
```
You can also build SDL as a Universal library (a single binary for both
64-bit Intel and ARM architectures), by using the build-scripts/clang-fat.sh
script.
```bash
mkdir build
cd build
CC=$PWD/../build-scripts/clang-fat.sh ../configure
make
sudo make install
```
This script builds SDL with 10.6 ABI compatibility on 64-bit Intel and 11.0
ABI compatibility on ARM64 architectures. For best compatibility you
should compile your application the same way.
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK
(even if you target back to 10.6 systems). PowerPC support for Mac OS X has
been officially dropped as of SDL 2.0.2. 32-bit Intel, using an older Xcode
release, is still supported at the time of this writing, but current Xcode
releases no longer support it, and eventually neither will SDL.
To use the library once it's built, you essential have two possibilities:
use the traditional autoconf/automake/make method, or use Xcode.
# Caveats for using SDL with Mac OS X
If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),
SDL will not register its own. This means that SDL will not terminate using
SDL_Quit if it receives a termination request, it will terminate like a
normal app, and it will not send a SDL_DROPFILE when you request to open a
file with the app. To solve these issues, put the following code in your
NSApplicationDelegate implementation:
```objc
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_QUIT;
SDL_PushEvent(&event);
}
return NSTerminateCancel;
}
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
{
if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_DROPFILE;
event.drop.file = SDL_strdup([filename UTF8String]);
return (SDL_PushEvent(&event) > 0);
}
return NO;
}
```
# Using the Simple DirectMedia Layer with a traditional Makefile
An existing autoconf/automake build system for your SDL app has good chances
to work almost unchanged on macOS. However, to produce a "real" Mac binary
that you can distribute to users, you need to put the generated binary into a
so called "bundle", which is basically a fancy folder with a name like
"MyCoolGame.app".
To get this build automatically, add something like the following rule to
your Makefile.am:
```make
bundle_contents = APP_NAME.app/Contents
APP_NAME_bundle: EXE_NAME
mkdir -p $(bundle_contents)/MacOS
mkdir -p $(bundle_contents)/Resources
echo "APPL????" > $(bundle_contents)/PkgInfo
$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
```
You should replace `EXE_NAME` with the name of the executable. `APP_NAME` is
what will be visible to the user in the Finder. Usually it will be the same
as `EXE_NAME` but capitalized. E.g. if `EXE_NAME` is "testgame" then `APP_NAME`
usually is "TestGame". You might also want to use `@PACKAGE@` to use the
package name as specified in your configure.ac file.
If your project builds more than one application, you will have to do a bit
more. For each of your target applications, you need a separate rule.
If you want the created bundles to be installed, you may want to add this
rule to your Makefile.am:
```make
install-exec-hook: APP_NAME_bundle
rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
mkdir -p $(DESTDIR)$(prefix)/Applications/
cp -r $< /$(DESTDIR)$(prefix)Applications/
```
This rule takes the Bundle created by the rule from step 3 and installs them
into "$(DESTDIR)$(prefix)/Applications/".
Again, if you want to install multiple applications, you will have to augment
the make rule accordingly.
But beware! That is only part of the story! With the above, you end up with
a barebones .app bundle, which is double-clickable from the Finder. But
there are some more things you should do before shipping your product...
1. The bundle right now probably is dynamically linked against SDL. That
means that when you copy it to another computer, *it will not run*,
unless you also install SDL on that other computer. A good solution
for this dilemma is to static link against SDL. On OS X, you can
achieve that by linking against the libraries listed by
```bash
sdl-config --static-libs
```
instead of those listed by
```bash
sdl-config --libs
```
Depending on how exactly SDL is integrated into your build systems, the
way to achieve that varies, so I won't describe it here in detail
2. Add an 'Info.plist' to your application. That is a special XML file which
contains some meta-information about your application (like some copyright
information, the version of your app, the name of an optional icon file,
and other things). Part of that information is displayed by the Finder
when you click on the .app, or if you look at the "Get Info" window.
More information about Info.plist files can be found on Apple's homepage.
As a final remark, let me add that I use some of the techniques (and some
variations of them) in [Exult](https://github.com/exult/exult) and
[ScummVM](https://github.com/scummvm/scummvm); both are available in source on
the net, so feel free to take a peek at them for inspiration!
# Using the Simple DirectMedia Layer with Xcode
These instructions are for using Apple's Xcode IDE to build SDL applications.
## First steps
The first thing to do is to unpack the Xcode.tar.gz archive in the
top level SDL directory (where the Xcode.tar.gz archive resides).
Because Stuffit Expander will unpack the archive into a subdirectory,
you should unpack the archive manually from the command line:
```bash
cd [path_to_SDL_source]
tar zxf Xcode.tar.gz
```
This will create a new folder called Xcode, which you can browse
normally from the Finder.
## Building the Framework
The SDL Library is packaged as a framework bundle, an organized
relocatable folder hierarchy of executable code, interface headers,
and additional resources. For practical purposes, you can think of a
framework as a more user and system-friendly shared library, whose library
file behaves more or less like a standard UNIX shared library.
To build the framework, simply open the framework project and build it.
By default, the framework bundle "SDL.framework" is installed in
/Library/Frameworks. Therefore, the testers and project stationary expect
it to be located there. However, it will function the same in any of the
following locations:
* ~/Library/Frameworks
* /Local/Library/Frameworks
* /System/Library/Frameworks
## Build Options
There are two "Build Styles" (See the "Targets" tab) for SDL.
"Deployment" should be used if you aren't tweaking the SDL library.
"Development" should be used to debug SDL apps or the library itself.
## Building the Testers
Open the SDLTest project and build away!
## Using the Project Stationary
Copy the stationary to the indicated folders to access it from
the "New Project" and "Add target" menus. What could be easier?
## Setting up a new project by hand
Some of you won't want to use the Stationary so I'll give some tips:
(this is accurate as of Xcode 12.5.)
* Click "File" -> "New" -> "Project...
* Choose "macOS" and then "App" from the "Application" section.
* Fill out the options in the next window. User interface is "XIB" and
Language is "Objective-C".
* Remove "main.m" from your project
* Remove "MainMenu.xib" from your project
* Remove "AppDelegates.*" from your project
* Add "\$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
* Add "\$(HOME)/Library/Frameworks" to the frameworks search path
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
* Add your files
* Clean and build
## Building from command line
Use `xcode-build` in the same directory as your .pbxproj file
## Running your app
You can send command line args to your app by either invoking it from
the command line (in *.app/Contents/MacOS) or by entering them in the
Executables" panel of the target settings.
# Implementation Notes
Some things that may be of interest about how it all works...
## Working directory
In SDL 1.2, the working directory of your SDL app is by default set to its
parent, but this is no longer the case in SDL 2.0. SDL2 does change the
working directory, which means it'll be whatever the command line prompt
that launched the program was using, or if launched by double-clicking in
the finger, it will be "/", the _root of the filesystem_. Plan accordingly!
You can use SDL_GetBasePath() to find where the program is running from and
chdir() there directly.
## You have a Cocoa App!
Your SDL app is essentially a Cocoa application. When your app
starts up and the libraries finish loading, a Cocoa procedure is called,
which sets up the working directory and calls your main() method.
You are free to modify your Cocoa app with generally no consequence
to SDL. You cannot, however, easily change the SDL window itself.
Functionality may be added in the future to help this.
# Bug reports
Bugs are tracked at [the GitHub issue tracker](https://github.com/libsdl-org/SDL/issues/).
Please feel free to report bugs there!
+92
View File
@@ -0,0 +1,92 @@
Simple DirectMedia Layer 2 for OS/2 & eComStation
================================================================================
SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
OpenGL and audio capture not supported by this port.
Additional optional environment variables:
SDL_AUDIO_SHARE
Values: 0 or 1, default is 0
Initializes the device as shareable or exclusively acquired.
SDL_VIDEODRIVER
Values: DIVE or VMAN, default is DIVE
Use video subsystem: Direct interface video extensions (DIVE) or
Video Manager (VMAN).
You may significantly increase video output speed with OS4 kernel and patched
files vman.dll and dive.dll or with latest versions of ACPI support and video
driver Panorama.
Latest versions of OS/4 kernel:
http://gus.biysk.ru/os4/
(Info: https://www.os2world.com/wiki/index.php/Phoenix_OS/4)
Patched files vman.dll and dive.dll:
http://gus.biysk.ru/os4/test/pached_dll/PATCHED_DLL.RAR
Compiling:
----------
Open Watcom 1.9 or newer is tested. For the new Open Watcom V2 fork, see:
https://github.com/open-watcom/ and https://open-watcom.github.io
WATCOM environment variable must to be set to the Open Watcom install
directory. To compile, run: wmake -f Makefile.os2
Installing:
-----------
- eComStation:
If you have previously installed SDL2, make a Backup copy of SDL2.dll
located in D:\ecs\dll (where D: is disk on which installed eComStation).
Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll
- OS/2:
Copy SDL2.dll to any directory on your LIBPATH. If you have a previous
version installed, close all SDL2 applications before replacing the old
copy. Also make sure that any other older versions of DLLs are removed
from your system.
Joysticks in SDL2:
------------------
The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version.
Here is the original documentation from SDL-1.2:
The Joystick detection only works for standard joysticks (2 buttons, 2 axes
and the like). Therefore, if you use a non-standard joystick, you should
specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
file or CONFIG.SYS, so SDL applications can provide full capability to your
device. The syntax is:
SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
the line should be:
SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
If you want to add spaces in your joystick name, just surround it with
quotes or double-quotes:
SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
or
SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
Note however that Balls and Hats are not supported under OS/2, and the
value will be ignored... but it is wise to define these correctly because
in the future those can be supported.
Also the number of buttons is limited to 2 when using two joysticks,
4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
and 8 when using a joystick with 2 axes. Notice however these are limitations
of the Joystick Port hardware, not OS/2.
+1 -1
View File
@@ -13,7 +13,7 @@ There are two basic ways of building SDL at the moment:
1. The "UNIX" way: ./configure; make; make install
If you have a GNUish system, then you might try this. Edit configure.in,
If you have a GNUish system, then you might try this. Edit configure.ac,
take a look at the large section labelled:
"Set up the configuration based on the host platform!"
+26 -9
View File
@@ -1,19 +1,36 @@
PSP
======
SDL port for the Sony PSP contributed by
Captian Lex
SDL2 port for the Sony PSP contributed by:
- Captian Lex
- Francisco Javier Trujillo Mata
- Wouter Wijsman
Credit to
Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP
Geecko for his PSP GU lib "Glib2d"
Building
--------
To build for the PSP, make sure psp-config is in the path and run:
make -f Makefile.psp
## Building
To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
cmake --build build
cmake --install build
```
## Getting PSP Dev
[Installing PSP Dev](https://github.com/pspdev/pspdev)
To Do
------
PSP Screen Keyboard
## Running on PPSSPP Emulator
[PPSSPP](https://github.com/hrydgard/ppsspp)
[Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions)
## Compiling a HelloWorld
[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
## To Do
- PSP Screen Keyboard
- Dialogs
+23 -31
View File
@@ -1,13 +1,12 @@
Raspberry Pi
================================================================================
============
Requirements:
Raspbian (other Linux distros may work as well).
================================================================================
Features
================================================================================
Features
--------
* Works without X11
* Hardware accelerated OpenGL ES 2.x
@@ -16,9 +15,8 @@ Raspbian (other Linux distros may work as well).
* Hotplugging of input devices via UDEV
================================================================================
Raspbian Build Dependencies
================================================================================
Raspbian Build Dependencies
---------------------------
sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev
@@ -28,18 +26,17 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
================================================================================
NEON
================================================================================
NEON
----
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
that SDL will select some otherwise-disabled highly-optimized code. The
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
definitely does.
================================================================================
Cross compiling from x86 Linux
================================================================================
Cross compiling from x86 Linux
------------------------------
To cross compile SDL for Raspbian from your desktop machine, you'll need a
Raspbian system root and the cross compilation tools. We'll assume these tools
@@ -92,9 +89,8 @@ To be able to deploy this to /usr/local in the Raspbian system you need to fix u
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
================================================================================
Apps don't work or poor video/audio performance
================================================================================
Apps don't work or poor video/audio performance
-----------------------------------------------
If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to
update the RPi's firmware. Note that doing so will fix these problems, but it
@@ -108,17 +104,15 @@ See here how to configure this setting: http://elinux.org/RPiconfig
Using a fixed gpu_mem=128 is the best option (specially if you updated the
firmware, using CMA probably won't work, at least it's the current case).
================================================================================
No input
================================================================================
No input
--------
Make sure you belong to the "input" group.
sudo usermod -aG input `whoami`
================================================================================
No HDMI Audio
================================================================================
No HDMI Audio
-------------
If you notice that ALSA works but there's no audio over HDMI, try adding:
@@ -128,9 +122,8 @@ to your config.txt file and reboot.
Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
================================================================================
Text Input API support
================================================================================
Text Input API support
----------------------
The Text Input API is supported, with translation of scan codes done via the
kernel symbol tables. For this to work, SDL needs access to a valid console.
@@ -160,9 +153,9 @@ this determining the CAPS LOCK behavior:
sudo dpkg-reconfigure locales
================================================================================
OpenGL problems
================================================================================
OpenGL problems
---------------
If you have desktop OpenGL headers installed at build time in your RPi or cross
compilation environment, support for it will be built in. However, the chipset
@@ -177,9 +170,8 @@ environment variable:
export SDL_RENDER_DRIVER=opengles2
================================================================================
Notes
================================================================================
Notes
-----
* When launching apps remotely (via SSH), SDL can prevent local keystrokes from
leaking into the console only if it has root privileges. Launching apps locally
+41
View File
@@ -0,0 +1,41 @@
RISC OS
=======
Requirements:
* RISC OS 3.5 or later.
* [SharedUnixLibrary](http://www.riscos.info/packages/LibraryDetails.html#SharedUnixLibraryarm).
* [DigitalRenderer](http://www.riscos.info/packages/LibraryDetails.html#DRendererarm), for audio support.
* [Iconv](http://www.netsurf-browser.org/projects/iconv/), for `SDL_iconv` and related functions.
Compiling:
----------
Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
The following commands can be used to build SDL2 for RISC OS using autoconf:
./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics
make
make install
The following commands can be used to build SDL2 for RISC OS using CMake:
cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF
cmake --build build-riscos
cmake --build build-riscos --target install
Current level of implementation
-------------------------------
The video driver currently provides full screen video support with keyboard and mouse input. Windowed mode is not yet supported, but is planned in the future. Only software rendering is supported.
The filesystem APIs return either Unix-style paths or RISC OS-style paths based on the value of the `__riscosify_control` symbol, as is standard for UnixLib functions.
The audio, loadso, thread and timer APIs are currently provided by UnixLib.
GCC atomics are currently broken on some platforms, meaning it's currently necessary to compile with `--disable-gcc-atomics` using autotools or `-DSDL_GCC_ATOMICS=OFF` using CMake.
The joystick, locale and power APIs are not yet implemented.
+114
View File
@@ -0,0 +1,114 @@
Using SDL with Microsoft Visual C++
===================================
### by Lion Kimbro with additions by James Turk
You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
yourself.
### Building SDL
0. To build SDL, your machine must, at a minimum, have the DirectX9.0c SDK installed. It may or may not be retrievable from
the [Microsoft](https://www.microsoft.com) website, so you might need to locate it [online](https://duckduckgo.com/?q=directx9.0c+sdk+download&t=h_&ia=web).
_Editor's note: I've been able to successfully build SDL using Visual Studio 2019 **without** the DX9.0c SDK_
1. Open the Visual Studio solution file at `./VisualC/SDL.sln`.
2. Your IDE will likely prompt you to upgrade this solution file to whatever later version of the IDE you're using. In the `Retarget Projects` dialog,
all of the affected project files should be checked allowing you to use the latest `Windows SDK Version` you have installed, along with
the `Platform Toolset`.
If you choose *NOT* to upgrade to use the latest `Windows SDK Version` or `Platform Toolset`, then you'll need the `Visual Studio 2010 Platform Toolset`.
3. Build the `.dll` and `.lib` files by right clicking on each project in turn (Projects are listed in the _Workspace_
panel in the _FileView_ tab), and selecting `Build`.
You may get a few warnings, but you should not get any errors.
Later, we will refer to the following `.lib` and `.dll` files that have just been generated:
- `./VisualC/Win32/Debug/SDL2.dll` or `./VisualC/Win32/Release/SDL2.dll`
- `./VisualC/Win32/Debug/SDL2.lib` or `./VisualC/Win32/Release/SDL2.lib`
- `./VisualC/Win32/Debug/SDL2main.lib` or `./VisualC/Win32/Release/SDL2main.lib`
_Note for the `x64` versions, just replace `Win32` in the path with `x64`_
### Creating a Project with SDL
- Create a project as a `Win32 Application`.
- Create a C++ file for your project.
- Set the C runtime to `Multi-threaded DLL` in the menu:
`Project|Settings|C/C++ tab|Code Generation|Runtime Library `.
- Add the SDL `include` directory to your list of includes in the menu:
`Project|Settings|C/C++ tab|Preprocessor|Additional include directories `
*VC7 Specific: Instead of doing this, I find it easier to add the
include and library directories to the list that VC7 keeps. Do this by
selecting Tools|Options|Projects|VC++ Directories and under the "Show
Directories For:" dropbox select "Include Files", and click the "New
Directory Icon" and add the [SDLROOT]\\include directory (e.g. If you
installed to c:\\SDL\\ add c:\\SDL\\include). Proceed to change the
dropbox selection to "Library Files" and add [SDLROOT]\\lib.*
The "include directory" I am referring to is the `./include` folder.
Now we're going to use the files that we had created earlier in the *Build SDL* step.
Copy the following file into your Project directory:
- `SDL2.dll`
Add the following files to your project (It is not necessary to copy them to your project directory):
- `SDL2.lib`
- `SDL2main.lib`
To add them to your project, right click on your project, and select
`Add files to project`.
**Instead of adding the files to your project, it is more desirable to add them to the linker options: Project|Properties|Linker|Command Line
and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration
(e.g. Release,Debug).**
### Hello SDL2
Here's a sample SDL snippet to verify everything is setup in your IDE:
```
#include "SDL.h"
int main( int argc, char* argv[] )
{
const int WIDTH = 640;
const int HEIGHT = 480;
SDL_Window* window = NULL;
SDL_Renderer* renderer = NULL;
SDL_Init(SDL_INIT_VIDEO);
window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
```
### That's it!
I hope that this document has helped you get through the most difficult part of using the SDL: installing it.
Suggestions for improvements should be posted to the [Github Issues](https://github.com/libsdl-org/SDL/issues).
### Credits
Thanks to [Paulus Esterhazy](mailto:pesterhazy@gmx.net), for the work on VC++ port.
This document was originally called "VisualC.txt", and was written by [Sam Lantinga](mailto:slouken@libsdl.org).
Later, it was converted to HTML and expanded into the document that you see today by [Lion Kimbro](mailto:snowlion@sprynet.com).
Minor Fixes and Visual C++ 7 Information (In Green) was added by [James Turk](mailto:james@conceptofzero.net)
+33
View File
@@ -0,0 +1,33 @@
PS Vita
=======
SDL port for the Sony Playstation Vita and Sony Playstation TV
Credit to
* xerpi, cpasjuste and rsn8887 for initial (vita2d) port
* vitasdk/dolcesdk devs
* CBPS discord (Namely Graphene and SonicMastr)
Building
--------
To build for the PSVita, make sure you have vitasdk and cmake installed and run:
```
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build
```
Notes
-----
* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
These renderers support 720p and 1080i resolutions. These can be specified with:
`SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
* Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK.
They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);`
anytime before video subsystem initialization.
* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
* By default SDL emits mouse events for touch events on every touchscreen.
Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.
Individual touchscreens can be disabled with:
`SDL_setenv("VITA_DISABLE_TOUCH_FRONT", "1", 1);` and `SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);`
* Support for L2/R2/R3/R3 buttons, haptic feedback and gamepad led only available on PSTV, or when using external ds4 gamepad on vita.
+47 -34
View File
@@ -1,45 +1,58 @@
Windows
================================================================================
# Windows
================================================================================
OpenGL ES 2.x support
================================================================================
## LLVM and Intel C++ compiler support
SDL has support for OpenGL ES 2.x under Windows via two alternative
implementations.
The most straightforward method consists in running your app in a system with
a graphic card paired with a relatively recent (as of November of 2013) driver
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
compiler, but you'll have to manually add the "-msse3" command line option
to at least the SDL_audiocvt.c source file, and possibly others. This may
not be necessary if you build SDL with CMake instead of the included Visual
Studio solution.
Details are here: https://github.com/libsdl-org/SDL/issues/5186
## OpenGL ES 2.x support
SDL has support for OpenGL ES 2.x under Windows via two alternative
implementations.
The most straightforward method consists in running your app in a system with
a graphic card paired with a relatively recent (as of November of 2013) driver
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
to ship said extension on Windows currently include nVidia and Intel.
The other method involves using the ANGLE library (https://code.google.com/p/angleproject/)
If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile
extension is found, SDL will try to load the libEGL.dll library provided by
ANGLE.
The other method involves using the
[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
context is requested and no WGL_EXT_create_context_es2_profile extension is
found, SDL will try to load the libEGL.dll library provided by ANGLE.
To obtain the ANGLE binaries, you can either compile from source from
https://chromium.googlesource.com/angle/angle or copy the relevant binaries from
a recent Chrome/Chromium install for Windows. The files you need are:
* libEGL.dll
* libGLESv2.dll
* d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)
or...
* d3dcompiler_43.dll (supports Windows XP or later)
https://chromium.googlesource.com/angle/angle or copy the relevant binaries
from a recent Chrome/Chromium install for Windows. The files you need are:
- libEGL.dll
- libGLESv2.dll
- d3dcompiler_46.dll (supports Windows Vista or later, better shader
compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
If you compile ANGLE from source, you can configure it so it does not need the
d3dcompiler_* DLL at all (for details on this, see their documentation).
d3dcompiler_* DLL at all (for details on this, see their documentation).
However, by default SDL will try to preload the d3dcompiler_46.dll to
comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to
support Windows XP) or to skip this step at all, you can use the
SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).
comply with ANGLE's requirements. If you wish SDL to preload
d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
details).
Known Bugs:
* SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
that there's a bug in the library which prevents the window contents from
refreshing if this is set to anything other than the default value.
Vulkan Surface Support
==============
Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application.
- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
that there's a bug in the library which prevents the window contents from
refreshing if this is set to anything other than the default value.
## Vulkan Surface Support
Support for creating Vulkan surfaces is configured on by default. To disable
it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
use Vulkan graphics in your application.
+34 -28
View File
@@ -296,7 +296,7 @@ A few files should be included directly in your app's MSVC project, specifically
included, mouse-position reporting may fail if and when the cursor is
hidden, due to possible bugs/design-oddities in Windows itself.*
To include these files:
To include these files for C/C++ projects:
1. right-click on your project (again, in Visual C++'s Solution Explorer),
navigate to "Add", then choose "Existing Item...".
@@ -313,11 +313,14 @@ To include these files:
7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)".
8. click the OK button. This will close the dialog.
**NOTE: C++/CX compilation is currently required in at least one file of your
app's project. This is to make sure that Visual C++'s linker builds a 'Windows
Metadata' file (.winmd) for your app. Not doing so can lead to build errors.**
For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
main function, and generate SDL2-WinRTResources.res manually by using `rc` via
the Developer Command Prompt and including it as a <Win32Resource> within the
first <PropertyGroup> block in your Visual Studio project file.
### 6. Add app code and assets ###
@@ -349,38 +352,41 @@ source file, such as, "main.cpp".
your project, and open the file in Visual C++'s text editor.
7. Copy and paste the following code into the new file, then save it.
#include <SDL.h>
```c
#include <SDL.h>
int main(int argc, char **argv)
{
SDL_DisplayMode mode;
SDL_Window * window = NULL;
SDL_Renderer * renderer = NULL;
SDL_Event evt;
int main(int argc, char **argv)
{
SDL_DisplayMode mode;
SDL_Window * window = NULL;
SDL_Renderer * renderer = NULL;
SDL_Event evt;
SDL_bool keep_going = SDL_TRUE;
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
return 1;
} else if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {
return 1;
} else if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {
return 1;
}
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
return 1;
while (keep_going) {
while (SDL_PollEvent(&evt)) {
if ((evt.type == SDL_KEYDOWN) && (evt.key.keysym.sym == SDLK_ESCAPE)) {
keep_going = SDL_FALSE;
}
}
if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {
return 1;
}
if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {
return 1;
}
while (1) {
while (SDL_PollEvent(&evt)) {
}
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
SDL_Quit();
return 0;
}
```
#### 6.B. Adding code and assets ####
+9 -7
View File
@@ -14,14 +14,14 @@ hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
SDL officially supports Windows, macOS, Linux, iOS, and Android.
Support for other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings
available for several other languages, including C# and Python.
This library is distributed under the zlib license, which can be found
in the file "COPYING.txt".
in the file "LICENSE.txt".
The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
@@ -35,10 +35,11 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [DynAPI](README-dynapi.md)
- [Emscripten](README-emscripten.md)
- [Gesture](README-gesture.md)
- [Mercurial](README-hg.md)
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)
- [OS X](README-macosx.md)
- [macOS](README-macos.md)
- [OS/2](README-os2.md)
- [Native Client](README-nacl.md)
- [Pandora](README-pandora.md)
- [Supported Platforms](README-platforms.md)
@@ -49,15 +50,16 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [WinCE](README-wince.md)
- [Windows](README-windows.md)
- [WinRT](README-winrt.md)
- [PSVita](README-vita.md)
If you need help with the library, or just want to discuss SDL related
issues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php)
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
which can be used as a web forum or a mailing list, at your preference.
If you want to report bugs or contribute patches, please submit them to
[bugzilla](https://bugzilla.libsdl.org/)
[our bug tracker](https://github.com/libsdl-org/SDL/issues)
Enjoy!
Sam Lantinga <mailto:slouken@libsdl.org>
Binary file not shown.
+2 -2
View File
@@ -39,7 +39,7 @@ while test $# -gt 0; do
echo $exec_prefix
;;
--version)
echo 2.0.9
echo 2.0.22
;;
--cflags)
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
@@ -49,7 +49,7 @@ while test $# -gt 0; do
;;
--static-libs)
# --libs|--static-libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid
;;
*)
echo "${usage}" 1>&2
+111 -14
View File
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -42,11 +42,13 @@
#include "SDL_filesystem.h"
#include "SDL_gamecontroller.h"
#include "SDL_haptic.h"
#include "SDL_hidapi.h"
#include "SDL_hints.h"
#include "SDL_joystick.h"
#include "SDL_loadso.h"
#include "SDL_log.h"
#include "SDL_messagebox.h"
#include "SDL_metal.h"
#include "SDL_mutex.h"
#include "SDL_power.h"
#include "SDL_render.h"
@@ -58,6 +60,8 @@
#include "SDL_timer.h"
#include "SDL_version.h"
#include "SDL_video.h"
#include "SDL_locale.h"
#include "SDL_misc.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -90,37 +94,130 @@ extern "C" {
/* @} */
/**
* This function initializes the subsystems specified by \c flags
* Initialize the SDL library.
*
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
* two may be used interchangeably. Though for readability of your code
* SDL_InitSubSystem() might be preferred.
*
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
* subsystems are initialized by default. Message boxes
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
* video subsystem, in hopes of being useful in showing an error dialog when
* SDL_Init fails. You must specifically initialize other subsystems if you
* use them in your application.
*
* Logging (such as SDL_Log) works without initialization, too.
*
* `flags` may be any of the following OR'd together:
*
* - `SDL_INIT_TIMER`: timer subsystem
* - `SDL_INIT_AUDIO`: audio subsystem
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
* subsystem
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
* events subsystem
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
* initializes the joystick subsystem
* - `SDL_INIT_EVENTS`: events subsystem
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
*
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
* this call will increase the ref-count and return.
*
* \param flags subsystem initialization flags
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_InitSubSystem
* \sa SDL_Quit
* \sa SDL_SetMainReady
* \sa SDL_WasInit
*/
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
/**
* This function initializes specific SDL subsystems
* Compatibility function to initialize the SDL library.
*
* Subsystem initialization is ref-counted, you must call
* SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
* shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
* If a subsystem is already loaded then this call will
* increase the ref-count and return.
* In SDL2, this function and SDL_Init() are interchangeable.
*
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Init
* \sa SDL_Quit
* \sa SDL_QuitSubSystem
*/
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
/**
* This function cleans up specific SDL subsystems
* Shut down specific SDL subsystems.
*
* If you start a subsystem using a call to that subsystem's init function
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
* generally, you should not be using those functions directly anyhow; use
* SDL_Init() instead.
*
* You still need to call SDL_Quit() even if you close all open subsystems
* with SDL_QuitSubSystem().
*
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_InitSubSystem
* \sa SDL_Quit
*/
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
/**
* This function returns a mask of the specified subsystems which have
* previously been initialized.
* Get a mask of the specified subsystems which are currently initialized.
*
* If \c flags is 0, it returns a mask of all initialized subsystems.
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
* returns the initialization status of the specified subsystems.
*
* The return value does not include SDL_INIT_NOPARACHUTE.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Init
* \sa SDL_InitSubSystem
*/
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
/**
* This function cleans up all initialized subsystems. You should
* call it upon all exit conditions.
* Clean up all initialized subsystems.
*
* You should call this function even if you have already shutdown each
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
* function even in the case of errors in initialization.
*
* If you start a subsystem using a call to that subsystem's init function
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
* it down before calling SDL_Quit(). But generally, you should not be using
* those functions directly anyhow; use SDL_Init() instead.
*
* You can use this function with atexit() to ensure that it is run when your
* application is shutdown, but it is not wise to do this from a library or
* other dynamically loaded code.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Init
* \sa SDL_QuitSubSystem
*/
extern DECLSPEC void SDLCALL SDL_Quit(void);
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -53,6 +53,10 @@ assert can have unique static variables associated with it.
#define SDL_TriggerBreakpoint() __debugbreak()
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
#elif defined(__APPLE__) && defined(__arm__)
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
#elif defined(__386__) && defined(__WATCOMC__)
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
@@ -185,92 +189,121 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
/**
* A callback that fires when an SDL assertion fails.
*
* \param data a pointer to the SDL_AssertData structure corresponding to the
* current assertion
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
* \returns an SDL_AssertState value indicating how to handle the failure.
*/
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
const SDL_AssertData* data, void* userdata);
/**
* \brief Set an application-defined assertion handler.
* Set an application-defined assertion handler.
*
* This allows an app to show its own assertion UI and/or force the
* response to an assertion failure. If the app doesn't provide this, SDL
* will try to do the right thing, popping up a system-specific GUI dialog,
* and probably minimizing any fullscreen windows.
* This function allows an application to show its own assertion UI and/or
* force the response to an assertion failure. If the application doesn't
* provide this, SDL will try to do the right thing, popping up a
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
*
* This callback may fire from any thread, but it runs wrapped in a mutex, so
* it will only fire from one thread at a time.
* This callback may fire from any thread, but it runs wrapped in a mutex, so
* it will only fire from one thread at a time.
*
* Setting the callback to NULL restores SDL's original internal handler.
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
*
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
* \param handler the SDL_AssertionHandler function to call when an assertion
* fails or NULL for the default handler
* \param userdata a pointer that is passed to `handler`
*
* Return SDL_AssertState value of how to handle the assertion failure.
* \since This function is available since SDL 2.0.0.
*
* \param handler Callback function, called when an assertion fails.
* \param userdata A pointer passed to the callback as-is.
* \sa SDL_GetAssertionHandler
*/
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
SDL_AssertionHandler handler,
void *userdata);
/**
* \brief Get the default assertion handler.
* Get the default assertion handler.
*
* This returns the function pointer that is called by default when an
* assertion is triggered. This is an internal function provided by SDL,
* that is used for assertions when SDL_SetAssertionHandler() hasn't been
* used to provide a different function.
* This returns the function pointer that is called by default when an
* assertion is triggered. This is an internal function provided by SDL, that
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
* provide a different function.
*
* \return The default SDL_AssertionHandler that is called when an assert triggers.
* \returns the default SDL_AssertionHandler that is called when an assert
* triggers.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_GetAssertionHandler
*/
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
/**
* \brief Get the current assertion handler.
* Get the current assertion handler.
*
* This returns the function pointer that is called when an assertion is
* triggered. This is either the value last passed to
* SDL_SetAssertionHandler(), or if no application-specified function is
* set, is equivalent to calling SDL_GetDefaultAssertionHandler().
* This returns the function pointer that is called when an assertion is
* triggered. This is either the value last passed to
* SDL_SetAssertionHandler(), or if no application-specified function is set,
* is equivalent to calling SDL_GetDefaultAssertionHandler().
*
* \param puserdata Pointer to a void*, which will store the "userdata"
* pointer that was passed to SDL_SetAssertionHandler().
* This value will always be NULL for the default handler.
* If you don't care about this data, it is safe to pass
* a NULL pointer to this function to ignore it.
* \return The SDL_AssertionHandler that is called when an assert triggers.
* The parameter `puserdata` is a pointer to a void*, which will store the
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
* will always be NULL for the default handler. If you don't care about this
* data, it is safe to pass a NULL pointer to this function to ignore it.
*
* \param puserdata pointer which is filled with the "userdata" pointer that
* was passed to SDL_SetAssertionHandler()
* \returns the SDL_AssertionHandler that is called when an assert triggers.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_SetAssertionHandler
*/
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
/**
* \brief Get a list of all assertion failures.
* Get a list of all assertion failures.
*
* Get all assertions triggered since last call to SDL_ResetAssertionReport(),
* or the start of the program.
* This function gets all assertions triggered since the last call to
* SDL_ResetAssertionReport(), or the start of the program.
*
* The proper way to examine this data looks something like this:
* The proper way to examine this data looks something like this:
*
* <code>
* const SDL_AssertData *item = SDL_GetAssertionReport();
* while (item) {
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
* item->condition, item->function, item->filename,
* item->linenum, item->trigger_count,
* item->always_ignore ? "yes" : "no");
* item = item->next;
* }
* </code>
* ```c
* const SDL_AssertData *item = SDL_GetAssertionReport();
* while (item) {
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
* item->condition, item->function, item->filename,
* item->linenum, item->trigger_count,
* item->always_ignore ? "yes" : "no");
* item = item->next;
* }
* ```
*
* \return List of all assertions.
* \sa SDL_ResetAssertionReport
* \returns a list of all failed assertions or NULL if the list is empty. This
* memory should not be modified or freed by the application.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ResetAssertionReport
*/
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
/**
* \brief Reset the list of all assertion failures.
* Clear the list of all assertion failures.
*
* Reset list of all assertions triggered.
* This function will clear the list of all assertions triggered up to that
* point. Immediately following this call, SDL_GetAssertionReport will return
* no items. In addition, any previously-triggered assertions will be reset to
* a trigger_count of zero, and their always_ignore state will be false.
*
* \sa SDL_GetAssertionReport
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetAssertionReport
*/
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -89,25 +89,51 @@ extern "C" {
typedef int SDL_SpinLock;
/**
* \brief Try to lock a spin lock by setting it to a non-zero value.
* Try to lock a spin lock by setting it to a non-zero value.
*
* \param lock Points to the lock.
* ***Please note that spinlocks are dangerous if you don't know what you're
* doing. Please be careful using any sort of spinlock!***
*
* \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.
* \param lock a pointer to a lock variable
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
* held.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AtomicLock
* \sa SDL_AtomicUnlock
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
/**
* \brief Lock a spin lock by setting it to a non-zero value.
* Lock a spin lock by setting it to a non-zero value.
*
* \param lock Points to the lock.
* ***Please note that spinlocks are dangerous if you don't know what you're
* doing. Please be careful using any sort of spinlock!***
*
* \param lock a pointer to a lock variable
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AtomicTryLock
* \sa SDL_AtomicUnlock
*/
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
/**
* \brief Unlock a spin lock by setting it to 0. Always returns immediately
* Unlock a spin lock by setting it to 0.
*
* \param lock Points to the lock.
* Always returns immediately.
*
* ***Please note that spinlocks are dangerous if you don't know what you're
* doing. Please be careful using any sort of spinlock!***
*
* \param lock a pointer to a lock variable
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AtomicLock
* \sa SDL_AtomicTryLock
*/
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
@@ -126,7 +152,7 @@ void _ReadWriteBarrier(void);
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
#elif defined(__WATCOMC__)
extern _inline void SDL_CompilerBarrier (void);
extern __inline void SDL_CompilerBarrier(void);
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
#else
#define SDL_CompilerBarrier() \
@@ -137,20 +163,22 @@ extern _inline void SDL_CompilerBarrier (void);
* Memory barriers are designed to prevent reads and writes from being
* reordered by the compiler and being seen out of order on multi-core CPUs.
*
* A typical pattern would be for thread A to write some data and a flag,
* and for thread B to read the flag and get the data. In this case you
* would insert a release barrier between writing the data and the flag,
* A typical pattern would be for thread A to write some data and a flag, and
* for thread B to read the flag and get the data. In this case you would
* insert a release barrier between writing the data and the flag,
* guaranteeing that the data write completes no later than the flag is
* written, and you would insert an acquire barrier between reading the
* flag and reading the data, to ensure that all the reads associated
* with the flag have completed.
* written, and you would insert an acquire barrier between reading the flag
* and reading the data, to ensure that all the reads associated with the flag
* have completed.
*
* In this pattern you should always see a release barrier paired with
* an acquire barrier and you should gate the data reads/writes with a
* single flag variable.
* In this pattern you should always see a release barrier paired with an
* acquire barrier and you should gate the data reads/writes with a single
* flag variable.
*
* For more information on these semantics, take a look at the blog post:
* http://preshing.com/20120913/acquire-and-release-semantics
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
@@ -162,12 +190,29 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__)
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
/* Information from:
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
The Linux kernel provides a helper function which provides the right code for a memory barrier,
hard-coded at address 0xffff0fa0
*/
typedef void (*SDL_KernelMemoryBarrierFunc)();
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#elif 0 /* defined(__QNXNTO__) */
#include <sys/cpuinline.h>
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
#else
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */
#define SDL_MEMORY_BARRIER_USES_FUNCTION
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
#else
@@ -177,6 +222,7 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#else
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
#endif /* __LINUX__ || __ANDROID__ */
#endif /* __GNUC__ && __arm__ */
#else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
@@ -198,32 +244,73 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
typedef struct { int value; } SDL_atomic_t;
/**
* \brief Set an atomic variable to a new value if it is currently an old value.
* Set an atomic variable to a new value if it is currently an old value.
*
* \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \note If you don't know what this function is for, you shouldn't use it!
*/
* \param a a pointer to an SDL_atomic_t variable to be modified
* \param oldval the old value
* \param newval the new value
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicGet
* \sa SDL_AtomicSet
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
/**
* \brief Set an atomic variable to a value.
* Set an atomic variable to a value.
*
* \return The previous value of the atomic variable.
* This function also acts as a full memory barrier.
*
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to an SDL_atomic_t variable to be modified
* \param v the desired value
* \returns the previous value of the atomic variable.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_AtomicGet
*/
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
/**
* \brief Get the value of an atomic variable
* Get the value of an atomic variable.
*
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to an SDL_atomic_t variable
* \returns the current value of an atomic variable.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_AtomicSet
*/
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
/**
* \brief Add to an atomic variable.
* Add to an atomic variable.
*
* \return The previous value of the atomic variable.
* This function also acts as a full memory barrier.
*
* \note This same style can be used for any number operation
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to an SDL_atomic_t variable to be modified
* \param v the desired value to add
* \returns the previous value of the atomic variable.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_AtomicDecRef
* \sa SDL_AtomicIncRef
*/
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
@@ -245,23 +332,54 @@ extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
#endif
/**
* \brief Set a pointer to a new value if it is currently an old value.
* Set a pointer to a new value if it is currently an old value.
*
* \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \note If you don't know what this function is for, you shouldn't use it!
*/
* \param a a pointer to a pointer
* \param oldval the old pointer value
* \param newval the new pointer value
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AtomicCAS
* \sa SDL_AtomicGetPtr
* \sa SDL_AtomicSetPtr
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
/**
* \brief Set a pointer to a value atomically.
* Set a pointer to a value atomically.
*
* \return The previous value of the pointer.
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to a pointer
* \param v the desired pointer value
* \returns the previous value of the pointer.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicGetPtr
*/
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
/**
* \brief Get the value of a pointer atomically.
* Get the value of a pointer atomically.
*
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to a pointer
* \returns the current value of a pointer.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_AtomicCASPtr
* \sa SDL_AtomicSetPtr
*/
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -45,13 +45,12 @@ extern "C" {
* with 0. This operation can also be stated as "count leading zeroes" and
* "log base 2".
*
* \return Index of the most significant bit, or -1 if the value is 0.
* \return the index of the most significant bit, or -1 if the value is 0.
*/
#if defined(__WATCOMC__) && defined(__386__)
extern _inline int _SDL_clz_watcom (Uint32);
#pragma aux _SDL_clz_watcom = \
extern __inline int _SDL_bsr_watcom(Uint32);
#pragma aux _SDL_bsr_watcom = \
"bsr eax, eax" \
"xor eax, 31" \
parm [eax] nomemory \
value [eax] \
modify exact [eax] nomemory;
@@ -72,7 +71,13 @@ SDL_MostSignificantBitIndex32(Uint32 x)
if (x == 0) {
return -1;
}
return 31 - _SDL_clz_watcom(x);
return _SDL_bsr_watcom(x);
#elif defined(_MSC_VER)
unsigned long index;
if (_BitScanReverse(&index, x)) {
return index;
}
return -1;
#else
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
* <seander@cs.stanford.edu>, released in the public domain.
@@ -101,6 +106,15 @@ SDL_MostSignificantBitIndex32(Uint32 x)
#endif
}
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
if (x && !(x & (x - 1))) {
return SDL_TRUE;
}
return SDL_FALSE;
}
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -50,6 +50,9 @@ typedef enum
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
dstRGB = srcRGB * dstRGB
dstA = dstA */
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@@ -64,9 +67,8 @@ typedef enum
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
} SDL_BlendOperation;
/**
@@ -84,23 +86,99 @@ typedef enum
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
} SDL_BlendFactor;
/**
* \brief Create a custom blend mode, which may or may not be supported by a given renderer
* Compose a custom blend mode for renderers.
*
* \param srcColorFactor
* \param dstColorFactor
* \param colorOperation
* \param srcAlphaFactor
* \param dstAlphaFactor
* \param alphaOperation
* The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
* the SDL_BlendMode returned by this function if the renderer supports it.
*
* The result of the blend mode operation will be:
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
* and
* dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
* A blend mode controls how the pixels from a drawing operation (source) get
* combined with the pixels from the render target (destination). First, the
* components of the source and destination pixels get multiplied with their
* blend factors. Then, the blend operation takes the two products and
* calculates the result that will get stored in the render target.
*
* Expressed in pseudocode, it would look like this:
*
* ```c
* dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
* dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
* ```
*
* Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
* dst)` can return one of the following:
*
* - `src + dst`
* - `src - dst`
* - `dst - src`
* - `min(src, dst)`
* - `max(src, dst)`
*
* The red, green, and blue components are always multiplied with the first,
* second, and third components of the SDL_BlendFactor, respectively. The
* fourth component is not used.
*
* The alpha component is always multiplied with the fourth component of the
* SDL_BlendFactor. The other components are not used in the alpha
* calculation.
*
* Support for these blend modes varies for each renderer. To check if a
* specific SDL_BlendMode is supported, create a renderer and pass it to
* either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
* return with an error if the blend mode is not supported.
*
* This list describes the support of custom blend modes for each renderer in
* SDL 2.0.6. All renderers support the four blend modes listed in the
* SDL_BlendMode enumeration.
*
* - **direct3d**: Supports all operations with all factors. However, some
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
* `SDL_BLENDOPERATION_MAXIMUM`.
* - **direct3d11**: Same as Direct3D 9.
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
* 2.0.6.
* - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
* factors. Color and alpha factors need to be the same. OpenGL ES 1
* implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
* and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
* operations being different from each other. May support color and alpha
* factors being different from each other.
* - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
* `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
* operations with all factors.
* - **psp**: No custom blend mode support.
* - **software**: No custom blend mode support.
*
* Some renderers do not provide an alpha component for the default render
* target. The `SDL_BLENDFACTOR_DST_ALPHA` and
* `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
* case.
*
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
* blue components of the source pixels
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
* blue components of the destination pixels
* \param colorOperation the SDL_BlendOperation used to combine the red,
* green, and blue components of the source and
* destination pixels
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
* the source pixels
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
* the destination pixels
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
* component of the source and destination pixels
* \returns an SDL_BlendMode that represents the chosen factors and
* operations.
*
* \since This function is available since SDL 2.0.6.
*
* \sa SDL_SetRenderDrawBlendMode
* \sa SDL_GetRenderDrawBlendMode
* \sa SDL_SetTextureBlendMode
* \sa SDL_GetTextureBlendMode
*/
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
SDL_BlendFactor dstColorFactor,
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,23 +39,46 @@ extern "C" {
/* Function prototypes */
/**
* \brief Put UTF-8 text into the clipboard
* Put UTF-8 text into the clipboard.
*
* \sa SDL_GetClipboardText()
* \param text the text to store in the clipboard
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetClipboardText
* \sa SDL_HasClipboardText
*/
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
/**
* \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
*
* \sa SDL_SetClipboardText()
* This functions returns empty string if there was not enough memory left for
* a copy of the clipboard's content.
*
* \returns the clipboard text on success or an empty string on failure; call
* SDL_GetError() for more information. Caller must call SDL_free()
* on the returned pointer when done with it (even if there was an
* error).
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasClipboardText
* \sa SDL_SetClipboardText
*/
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
/**
* \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
* Query whether the clipboard exists and contains a non-empty text string.
*
* \sa SDL_GetClipboardText()
* \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetClipboardText
* \sa SDL_SetClipboardText
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,10 +25,23 @@
#include "SDL_platform.h"
/* winsdkver.h defines _WIN32_MAXVER for SDK version detection. It is present since at least the Windows 7 SDK,
* but out of caution we'll only use it if the compiler supports __has_include() to confirm its presence.
* If your compiler doesn't support __has_include() but you have winsdkver.h, define HAVE_WINSDKVER_H. */
#if !defined(HAVE_WINSDKVER_H) && defined(__has_include)
#if __has_include(<winsdkver.h>)
#define HAVE_WINSDKVER_H 1
#endif
#endif
#ifdef HAVE_WINSDKVER_H
#include <winsdkver.h>
#endif
/* This is a set of defines to configure the SDL features */
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
#define HAVE_STDINT_H 1
#elif defined(_MSC_VER)
typedef signed __int8 int8_t;
@@ -77,14 +90,33 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
#ifdef __clang__
# define HAVE_GCC_ATOMICS 1
#endif
#define HAVE_DDRAW_H 1
#define HAVE_DINPUT_H 1
#define HAVE_DSOUND_H 1
#define HAVE_DXGI_H 1
#define HAVE_XINPUT_H 1
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
#define HAVE_WINDOWS_GAMING_INPUT_H 1
#endif
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
#define HAVE_D3D11_H 1
#define HAVE_ROAPI_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_SENSORSAPI_H 1
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
#define HAVE_IMMINTRIN_H 1
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
# if __has_include(<immintrin.h>)
# define HAVE_IMMINTRIN_H 1
# endif
#endif
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC
@@ -118,6 +150,7 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
/* These functions have security warnings, so we won't use them */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */
@@ -130,6 +163,9 @@ typedef unsigned int uintptr_t;
#define HAVE_STRNCMP 1
#define HAVE__STRICMP 1
#define HAVE__STRNICMP 1
#define HAVE__WCSICMP 1
#define HAVE__WCSNICMP 1
#define HAVE__WCSDUP 1
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
@@ -139,7 +175,7 @@ typedef unsigned int uintptr_t;
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEILF 1
#define HAVE__COPYSIGN 1
#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
@@ -166,9 +202,16 @@ typedef unsigned int uintptr_t;
/* These functions were added with the VC++ 2013 C runtime library */
#if _MSC_VER >= 1800
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_VSSCANF 1
#define HAVE_LROUND 1
#define HAVE_LROUNDF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1
#define HAVE_SCALBN 1
#define HAVE_SCALBNF 1
#define HAVE_SCALBNF 1
#define HAVE_TRUNC 1
#define HAVE_TRUNCF 1
#endif
/* This function is available with at least the VC++ 2008 C runtime library */
#if _MSC_VER >= 1400
@@ -192,18 +235,26 @@ typedef unsigned int uintptr_t;
/* Enable various input drivers */
#define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_XINPUT 1
#define SDL_JOYSTICK_HIDAPI 1
#ifndef __WINRT__
#define SDL_JOYSTICK_RAWINPUT 1
#endif
#define SDL_JOYSTICK_VIRTUAL 1
#ifdef HAVE_WINDOWS_GAMING_INPUT_H
#define SDL_JOYSTICK_WGI 1
#endif
#define SDL_JOYSTICK_XINPUT 1
#define SDL_HAPTIC_DINPUT 1
#define SDL_HAPTIC_XINPUT 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable the sensor driver */
#define SDL_SENSOR_WINDOWS 1
/* Enable various shared object loading systems */
#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
#define SDL_THREAD_WINDOWS 1
/* Enable various timer systems */
@@ -216,8 +267,8 @@ typedef unsigned int uintptr_t;
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1
#endif
#ifndef SDL_VIDEO_RENDER_D3D11
#define SDL_VIDEO_RENDER_D3D11 0
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
#define SDL_VIDEO_RENDER_D3D11 1
#endif
/* Enable OpenGL support */
@@ -255,3 +306,5 @@ typedef unsigned int uintptr_t;
#endif
#endif /* SDL_config_windows_h_ */
/* vi: set ts=4 sw=4 expandtab: */
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,32 +34,67 @@
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
#ifdef __clang__
/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */
#undef __MMX__
#undef __SSE__
#undef __SSE2__
#else
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
#ifndef __PRFCHWINTRIN_H
#define __PRFCHWINTRIN_H
static __inline__ void __attribute__((__always_inline__, __nodebug__))
_m_prefetch(void *__P)
{
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
}
#endif /* __PRFCHWINTRIN_H */
#endif /* __clang__ */
#include <intrin.h>
#ifndef _WIN64
#ifndef __MMX__
#define __MMX__
#endif
#ifndef __3dNOW__
#define __3dNOW__
#endif
#endif
#ifndef __SSE__
#define __SSE__
#endif
#ifndef __SSE2__
#define __SSE2__
#endif /* __clang__ */
#endif
#ifndef __SSE3__
#define __SSE3__
#endif
#elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h>
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
# include <arm_neon.h>
#endif
#else
#ifdef __ALTIVEC__
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
#endif
#if !defined(SDL_DISABLE_ARM_NEON_H)
# if defined(__ARM_NEON)
# include <arm_neon.h>
# elif defined(__WINDOWS__) || defined(__WINRT__)
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
# if defined(_M_ARM)
# include <armintr.h>
# include <arm_neon.h>
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
# endif
# if defined (_M_ARM64)
# include <arm64intr.h>
# include <arm64_neon.h>
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
# endif
# endif
#endif
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <arm_neon.h>
#endif
#endif /* compiler version */
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
#endif
@@ -79,7 +114,6 @@
#include <pmmintrin.h>
#endif
#endif /* HAVE_IMMINTRIN_H */
#endif /* compiler version */
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -95,88 +129,425 @@ extern "C" {
#define SDL_CACHELINE_SIZE 128
/**
* This function returns the number of CPU cores available.
* Get the number of CPU cores available.
*
* \returns the total number of logical CPU cores. On CPUs that include
* technologies such as hyperthreading, the number of logical cores
* may be more than the number of physical cores.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
/**
* This function returns the L1 cache line size of the CPU
* Determine the L1 cache line size of the CPU.
*
* This is useful for determining multi-threaded structure padding
* or SIMD prefetch sizes.
* This is useful for determining multi-threaded structure padding or SIMD
* prefetch sizes.
*
* \returns the L1 cache line size of the CPU, in bytes.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
/**
* This function returns true if the CPU has the RDTSC instruction.
* Determine whether the CPU has the RDTSC instruction.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
/**
* This function returns true if the CPU has AltiVec features.
* Determine whether the CPU has AltiVec features.
*
* This always returns false on CPUs that aren't using PowerPC instruction
* sets.
*
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
/**
* This function returns true if the CPU has MMX features.
* Determine whether the CPU has MMX features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
/**
* This function returns true if the CPU has 3DNow! features.
* Determine whether the CPU has 3DNow! features.
*
* This always returns false on CPUs that aren't using AMD instruction sets.
*
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
/**
* This function returns true if the CPU has SSE features.
* Determine whether the CPU has SSE features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
/**
* This function returns true if the CPU has SSE2 features.
* Determine whether the CPU has SSE2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
/**
* This function returns true if the CPU has SSE3 features.
* Determine whether the CPU has SSE3 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
/**
* This function returns true if the CPU has SSE4.1 features.
* Determine whether the CPU has SSE4.1 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
/**
* This function returns true if the CPU has SSE4.2 features.
* Determine whether the CPU has SSE4.2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
/**
* This function returns true if the CPU has AVX features.
* Determine whether the CPU has AVX features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX2
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
/**
* This function returns true if the CPU has AVX2 features.
* Determine whether the CPU has AVX2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.4.
*
* \sa SDL_Has3DNow
* \sa SDL_HasAltiVec
* \sa SDL_HasAVX
* \sa SDL_HasMMX
* \sa SDL_HasRDTSC
* \sa SDL_HasSSE
* \sa SDL_HasSSE2
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
/**
* This function returns true if the CPU has AVX-512F (foundation) features.
* Determine whether the CPU has AVX-512F (foundation) features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.9.
*
* \sa SDL_HasAVX
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
/**
* This function returns true if the CPU has NEON (ARM SIMD) features.
* Determine whether the CPU has ARM SIMD (ARMv6) features.
*
* This is different from ARM NEON, which is a different instruction set.
*
* This always returns false on CPUs that aren't using ARM instruction sets.
*
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.12.
*
* \sa SDL_HasNEON
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
/**
* Determine whether the CPU has NEON (ARM SIMD) features.
*
* This always returns false on CPUs that aren't using ARM instruction sets.
*
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
/**
* This function returns the amount of RAM configured in the system, in MB.
* Get the amount of RAM configured in the system.
*
* \returns the amount of RAM configured in the system in MB.
*
* \since This function is available since SDL 2.0.1.
*/
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
/**
* Report the alignment this system needs for SIMD allocations.
*
* This will return the minimum number of bytes to which a pointer must be
* aligned to be compatible with SIMD instructions on the current machine. For
* example, if the machine supports SSE only, it will return 16, but if it
* supports AVX-512F, it'll return 64 (etc). This only reports values for
* instruction sets SDL knows about, so if your SDL build doesn't have
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
* Plan accordingly.
*
* \returns the alignment in bytes needed for available, known SIMD
* instructions.
*
* \since This function is available since SDL 2.0.10.
*/
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
/**
* Allocate memory in a SIMD-friendly way.
*
* This will allocate a block of memory that is suitable for use with SIMD
* instructions. Specifically, it will be properly aligned and padded for the
* system's supported vector instructions.
*
* The memory returned will be padded such that it is safe to read or write an
* incomplete vector at the end of the memory block. This can be useful so you
* don't have to drop back to a scalar fallback at the end of your SIMD
* processing loop to deal with the final elements without overflowing the
* allocated buffer.
*
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
* delete[], etc.
*
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
* 64. To be clear: if you can't decide to use an instruction set with an
* SDL_Has*() function, don't use that instruction set with memory allocated
* through here.
*
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
* out of memory, but you are not allowed to dereference it (because you only
* own zero bytes of that buffer).
*
* \param len The length, in bytes, of the block to allocate. The actual
* allocated block might be larger due to padding, etc.
* \returns a pointer to the newly-allocated block, NULL if out of memory.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_SIMDAlignment
* \sa SDL_SIMDRealloc
* \sa SDL_SIMDFree
*/
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
/**
* Reallocate memory obtained from SDL_SIMDAlloc
*
* It is not valid to use this function on a pointer from anything but
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
* SDL_malloc, memalign, new[], etc.
*
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
* accepts NULL, at which point this function is the same as
* calling SDL_SIMDAlloc with a NULL pointer.
* \param len The length, in bytes, of the block to allocated. The actual
* allocated block might be larger due to padding, etc. Passing 0
* will return a non-NULL pointer, assuming the system isn't out of
* memory.
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
*
* \since This function is available since SDL 2.0.14.
*
* \sa SDL_SIMDAlignment
* \sa SDL_SIMDAlloc
* \sa SDL_SIMDFree
*/
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
/**
* Deallocate memory obtained from SDL_SIMDAlloc
*
* It is not valid to use this function on a pointer from anything but
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
* malloc, realloc, SDL_malloc, memalign, new[], etc.
*
* However, SDL_SIMDFree(NULL) is a legal no-op.
*
* The memory pointed to by `ptr` is no longer valid for access upon return,
* and may be returned to the system or reused by a future allocation. The
* pointer passed to this function is no longer safe to dereference once this
* function returns, and should be discarded.
*
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
* deallocate. NULL is a legal no-op.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_SIMDAlloc
* \sa SDL_SIMDRealloc
*/
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -30,6 +30,23 @@
#include "SDL_stdinc.h"
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
#ifdef __clang__
#ifndef __PRFCHWINTRIN_H
#define __PRFCHWINTRIN_H
static __inline__ void __attribute__((__always_inline__, __nodebug__))
_m_prefetch(void *__P)
{
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
}
#endif /* __PRFCHWINTRIN_H */
#endif /* __clang__ */
#include <intrin.h>
#endif
/**
* \name The two types of endianness
*/
@@ -42,10 +59,25 @@
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#else /* __linux__ */
#elif defined(__OpenBSD__)
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/endian.h>
#define SDL_BYTEORDER BYTE_ORDER
/* predefs from newer gcc and clang versions: */
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#error Unsupported endianness
#endif /**/
#else
#if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MISPEB__)) || \
(defined(__MIPS__) && defined(__MIPSEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
defined(__sparc__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
@@ -65,22 +97,45 @@ extern "C" {
/**
* \file SDL_endian.h
*/
#if defined(__GNUC__) && defined(__i386__) && \
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
/* various modern compilers may have builtin swap */
#if defined(__GNUC__) || defined(__clang__)
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
/* this one is broken */
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
#else
# define HAS_BUILTIN_BSWAP16 0
# define HAS_BUILTIN_BSWAP32 0
# define HAS_BUILTIN_BSWAP64 0
# define HAS_BROKEN_BSWAP 0
#endif
#if HAS_BUILTIN_BSWAP16
#define SDL_Swap16(x) __builtin_bswap16(x)
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
#pragma intrinsic(_byteswap_ushort)
#define SDL_Swap16(x) _byteswap_ushort(x)
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
SDL_FORCE_INLINE Uint16
SDL_Swap16(Uint16 x)
{
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
return x;
}
#elif defined(__GNUC__) && defined(__x86_64__)
#elif defined(__x86_64__)
SDL_FORCE_INLINE Uint16
SDL_Swap16(Uint16 x)
{
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
#elif (defined(__powerpc__) || defined(__ppc__))
SDL_FORCE_INLINE Uint16
SDL_Swap16(Uint16 x)
{
@@ -89,7 +144,7 @@ SDL_Swap16(Uint16 x)
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
return (Uint16)result;
}
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
#elif (defined(__m68k__) && !defined(__mcoldfire__))
SDL_FORCE_INLINE Uint16
SDL_Swap16(Uint16 x)
{
@@ -97,7 +152,7 @@ SDL_Swap16(Uint16 x)
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
extern _inline Uint16 SDL_Swap16(Uint16);
extern __inline Uint16 SDL_Swap16(Uint16);
#pragma aux SDL_Swap16 = \
"xchg al, ah" \
parm [ax] \
@@ -110,32 +165,37 @@ SDL_Swap16(Uint16 x)
}
#endif
#if defined(__GNUC__) && defined(__i386__)
#if HAS_BUILTIN_BSWAP32
#define SDL_Swap32(x) __builtin_bswap32(x)
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
#pragma intrinsic(_byteswap_ulong)
#define SDL_Swap32(x) _byteswap_ulong(x)
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
{
__asm__("bswap %0": "=r"(x):"0"(x));
return x;
}
#elif defined(__GNUC__) && defined(__x86_64__)
#elif defined(__x86_64__)
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
{
__asm__("bswapl %0": "=r"(x):"0"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
#elif (defined(__powerpc__) || defined(__ppc__))
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
{
Uint32 result;
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
__asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
__asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
return result;
}
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
#elif (defined(__m68k__) && !defined(__mcoldfire__))
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
{
@@ -143,20 +203,11 @@ SDL_Swap32(Uint32 x)
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
extern _inline Uint32 SDL_Swap32(Uint32);
#ifndef __SW_3 /* 486+ */
extern __inline Uint32 SDL_Swap32(Uint32);
#pragma aux SDL_Swap32 = \
"bswap eax" \
parm [eax] \
modify [eax];
#else /* 386-only */
#pragma aux SDL_Swap32 = \
"xchg al, ah" \
"ror eax, 16" \
"xchg al, ah" \
parm [eax] \
modify [eax];
#endif
#else
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
@@ -166,31 +217,42 @@ SDL_Swap32(Uint32 x)
}
#endif
#if defined(__GNUC__) && defined(__i386__)
#if HAS_BUILTIN_BSWAP64
#define SDL_Swap64(x) __builtin_bswap64(x)
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
#pragma intrinsic(_byteswap_uint64)
#define SDL_Swap64(x) _byteswap_uint64(x)
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
SDL_FORCE_INLINE Uint64
SDL_Swap64(Uint64 x)
{
union
{
struct
{
union {
struct {
Uint32 a, b;
} s;
Uint64 u;
} v;
v.u = x;
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
"1"(v.s.
b));
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
: "=r"(v.s.a), "=r"(v.s.b)
: "0" (v.s.a), "1"(v.s.b));
return v.u;
}
#elif defined(__GNUC__) && defined(__x86_64__)
#elif defined(__x86_64__)
SDL_FORCE_INLINE Uint64
SDL_Swap64(Uint64 x)
{
__asm__("bswapq %0": "=r"(x):"0"(x));
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
extern __inline Uint64 SDL_Swap64(Uint64);
#pragma aux SDL_Swap64 = \
"bswap eax" \
"bswap edx" \
"xchg eax,edx" \
parm [eax edx] \
modify [eax edx];
#else
SDL_FORCE_INLINE Uint64
SDL_Swap64(Uint64 x)
@@ -212,8 +274,7 @@ SDL_Swap64(Uint64 x)
SDL_FORCE_INLINE float
SDL_SwapFloat(float x)
{
union
{
union {
float f;
Uint32 ui32;
} swapper;
@@ -222,6 +283,11 @@ SDL_SwapFloat(float x)
return swapper.f;
}
/* remove extra macros */
#undef HAS_BROKEN_BSWAP
#undef HAS_BUILTIN_BSWAP16
#undef HAS_BUILTIN_BSWAP32
#undef HAS_BUILTIN_BSWAP64
/**
* \name Swap to native
@@ -229,22 +295,22 @@ SDL_SwapFloat(float x)
*/
/* @{ */
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define SDL_SwapLE16(X) (X)
#define SDL_SwapLE32(X) (X)
#define SDL_SwapLE64(X) (X)
#define SDL_SwapLE16(X) (X)
#define SDL_SwapLE32(X) (X)
#define SDL_SwapLE64(X) (X)
#define SDL_SwapFloatLE(X) (X)
#define SDL_SwapBE16(X) SDL_Swap16(X)
#define SDL_SwapBE32(X) SDL_Swap32(X)
#define SDL_SwapBE64(X) SDL_Swap64(X)
#define SDL_SwapBE16(X) SDL_Swap16(X)
#define SDL_SwapBE32(X) SDL_Swap32(X)
#define SDL_SwapBE64(X) SDL_Swap64(X)
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
#else
#define SDL_SwapLE16(X) SDL_Swap16(X)
#define SDL_SwapLE32(X) SDL_Swap32(X)
#define SDL_SwapLE64(X) SDL_Swap64(X)
#define SDL_SwapLE16(X) SDL_Swap16(X)
#define SDL_SwapLE32(X) SDL_Swap32(X)
#define SDL_SwapLE64(X) SDL_Swap64(X)
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
#define SDL_SwapBE16(X) (X)
#define SDL_SwapBE32(X) (X)
#define SDL_SwapBE64(X) (X)
#define SDL_SwapBE16(X) (X)
#define SDL_SwapBE32(X) (X)
#define SDL_SwapBE64(X) (X)
#define SDL_SwapFloatBE(X) (X)
#endif
/* @} *//* Swap to native */
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,9 +37,96 @@ extern "C" {
#endif
/* Public functions */
/* SDL_SetError() unconditionally returns -1. */
/**
* Set the SDL error message for the current thread.
*
* Calling this function will replace any previous error message that was set.
*
* This function always returns -1, since SDL frequently uses -1 to signify an
* failing result, leading to this idiom:
*
* ```c
* if (error_code) {
* return SDL_SetError("This operation has failed: %d", error_code);
* }
* ```
*
* \param fmt a printf()-style message format string
* \param ... additional parameters matching % tokens in the `fmt` string, if
* any
* \returns always -1.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ClearError
* \sa SDL_GetError
*/
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
/**
* Retrieve a message about the last error that occurred on the current
* thread.
*
* It is possible for multiple errors to occur before calling SDL_GetError().
* Only the last error is returned.
*
* The message is only applicable when an SDL function has signaled an error.
* You must check the return values of SDL function calls to determine when to
* appropriately call SDL_GetError(). You should *not* use the results of
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
* an error string even when reporting success.
*
* SDL will *not* clear the error string for successful API calls. You *must*
* check return values for failure cases before you can assume the error
* string applies.
*
* Error strings are set per-thread, so an error set in a different thread
* will not interfere with the current thread's operation.
*
* The returned string is internally allocated and must not be freed by the
* application.
*
* \returns a message with information about the specific error that occurred,
* or an empty string if there hasn't been an error message set since
* the last call to SDL_ClearError(). The message is only applicable
* when an SDL function has signaled an error. You must check the
* return values of SDL function calls to determine when to
* appropriately call SDL_GetError().
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ClearError
* \sa SDL_SetError
*/
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
/**
* Get the last error message that was set for the current thread.
*
* This allows the caller to copy the error string into a provided buffer, but
* otherwise operates exactly the same as SDL_GetError().
*
* \param errstr A buffer to fill with the last error message that was set for
* the current thread
* \param maxlen The size of the buffer pointed to by the errstr parameter
* \returns the pointer passed in as the `errstr` parameter.
*
* \since This function is available since SDL 2.0.14.
*
* \sa SDL_GetError
*/
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
/**
* Clear any previous error message for this thread.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetError
* \sa SDL_SetError
*/
extern DECLSPEC void SDLCALL SDL_ClearError(void);
/**
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -50,7 +50,7 @@ extern "C" {
#define SDL_PRESSED 1
/**
* \brief The types of events that can be delivered.
* The types of events that can be delivered.
*/
typedef enum
{
@@ -85,6 +85,8 @@ typedef enum
Called on Android in onResume()
*/
SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
/* Display events */
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
@@ -100,6 +102,7 @@ typedef enum
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
input language or keyboard layout change.
*/
SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
/* Mouse events */
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
@@ -123,6 +126,10 @@ typedef enum
SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
/* Touch events */
SDL_FINGERDOWN = 0x700,
@@ -154,6 +161,9 @@ typedef enum
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
/* Internal events */
SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
* and should be allocated with SDL_RegisterEvents()
*/
@@ -234,6 +244,19 @@ typedef struct SDL_TextEditingEvent
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingEvent;
/**
* \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
* truncated if stored in the text buffer SDL_TextEditingEvent
*/
typedef struct SDL_TextEditingExtEvent
{
Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
Sint32 start; /**< The start cursor of selected editing text */
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingExtEvent;
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
/**
@@ -292,6 +315,8 @@ typedef struct SDL_MouseWheelEvent
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
} SDL_MouseWheelEvent;
/**
@@ -413,6 +438,33 @@ typedef struct SDL_ControllerDeviceEvent
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
} SDL_ControllerDeviceEvent;
/**
* \brief Game controller touchpad event structure (event.ctouchpad.*)
*/
typedef struct SDL_ControllerTouchpadEvent
{
Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 touchpad; /**< The index of the touchpad */
Sint32 finger; /**< The index of the finger on the touchpad */
float x; /**< Normalized in the range 0...1 with 0 being on the left */
float y; /**< Normalized in the range 0...1 with 0 being at the top */
float pressure; /**< Normalized in the range 0...1 */
} SDL_ControllerTouchpadEvent;
/**
* \brief Game controller sensor event structure (event.csensor.*)
*/
typedef struct SDL_ControllerSensorEvent
{
Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
} SDL_ControllerSensorEvent;
/**
* \brief Audio device event structure (event.adevice.*)
*/
@@ -442,6 +494,7 @@ typedef struct SDL_TouchFingerEvent
float dx; /**< Normalized in the range -1...1 */
float dy; /**< Normalized in the range -1...1 */
float pressure; /**< Normalized in the range 0...1 */
Uint32 windowID; /**< The window underneath the finger, if any */
} SDL_TouchFingerEvent;
@@ -556,53 +609,80 @@ typedef struct SDL_SysWMEvent
*/
typedef union SDL_Event
{
Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Window event data */
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */
SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
SDL_DropEvent drop; /**< Drag and drop event data */
Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Display event data */
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */
SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
SDL_DropEvent drop; /**< Drag and drop event data */
/* This is necessary for ABI compatibility between Visual C++ and GCC
Visual C++ will respect the push pack pragma and use 52 bytes for
this structure, and GCC will use the alignment of the largest datatype
within the union, which is 8 bytes.
/* This is necessary for ABI compatibility between Visual C++ and GCC.
Visual C++ will respect the push pack pragma and use 52 bytes (size of
SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
architectures) for this union, and GCC will use the alignment of the
largest datatype within the union, which is 8 bytes on 64-bit
architectures.
So... we'll add padding to force the size to be 56 bytes for both.
On architectures where pointers are 16 bytes, this needs rounding up to
the next multiple of 16, 64, and on architectures where pointers are
even larger the size of SDL_UserEvent will dominate as being 3 pointers.
*/
Uint8 padding[56];
Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
} SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
/* Function prototypes */
/**
* Pumps the event loop, gathering events from the input devices.
* Pump the event loop, gathering events from the input devices.
*
* This function updates the event queue and internal input device state.
* This function updates the event queue and internal input device state.
*
* This should only be run in the thread that sets the video mode.
* **WARNING**: This should only be run in the thread that initialized the
* video subsystem, and for extra safety, you should consider only doing those
* things on the main thread in any case.
*
* SDL_PumpEvents() gathers all the pending input information from devices and
* places it in the event queue. Without calls to SDL_PumpEvents() no events
* would ever be placed on the queue. Often the need for calls to
* SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
* SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
* polling or waiting for events (e.g. you are filtering them), then you must
* call SDL_PumpEvents() to force an event queue update.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_WaitEvent
*/
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
@@ -615,22 +695,42 @@ typedef enum
} SDL_eventaction;
/**
* Checks the event queue for messages and optionally returns them.
* Check the event queue for messages and optionally return them.
*
* If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
* the back of the event queue.
* `action` may be any of the following:
*
* If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
* of the event queue, within the specified minimum and maximum type,
* will be returned and will not be removed from the queue.
* - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
* event queue.
* - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
* within the specified minimum and maximum type, will be returned to the
* caller and will _not_ be removed from the queue.
* - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
* within the specified minimum and maximum type, will be returned to the
* caller and will be removed from the queue.
*
* If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
* of the event queue, within the specified minimum and maximum type,
* will be returned and will be removed from the queue.
* You may have to call SDL_PumpEvents() before calling this function.
* Otherwise, the events may not be ready to be filtered when you call
* SDL_PeepEvents().
*
* \return The number of events actually stored, or -1 if there was an error.
* This function is thread-safe.
*
* This function is thread-safe.
* \param events destination buffer for the retrieved events
* \param numevents if action is SDL_ADDEVENT, the number of events to add
* back to the event queue; if action is SDL_PEEKEVENT or
* SDL_GETEVENT, the maximum number of events to retrieve
* \param action action to take; see [[#action|Remarks]] for details
* \param minType minimum value of the event type to be considered;
* SDL_FIRSTEVENT is a safe choice
* \param maxType maximum value of the event type to be considered;
* SDL_LASTEVENT is a safe choice
* \returns the number of events actually stored or a negative error code on
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_PushEvent
*/
extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
SDL_eventaction action,
@@ -638,113 +738,354 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
/* @} */
/**
* Checks to see if certain event types are in the event queue.
* Check for the existence of a certain event type in the event queue.
*
* If you need to check for a range of event types, use SDL_HasEvents()
* instead.
*
* \param type the type of event to be queried; see SDL_EventType for details
* \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
* events matching `type` are not present.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasEvents
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
/**
* Check for the existence of certain event types in the event queue.
*
* If you need to check for a single event type, use SDL_HasEvent() instead.
*
* \param minType the low end of event type to be queried, inclusive; see
* SDL_EventType for details
* \param maxType the high end of event type to be queried, inclusive; see
* SDL_EventType for details
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
* present, or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasEvents
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
/**
* This function clears events from the event queue
* This function only affects currently queued events. If you want to make
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
* Clear events of a specific type from the event queue.
*
* This will unconditionally remove any events from the queue that match
* `type`. If you need to remove a range of event types, use SDL_FlushEvents()
* instead.
*
* It's also normal to just ignore events you don't care about in your event
* loop without calling this function.
*
* This function only affects currently queued events. If you want to make
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
*
* \param type the type of event to be cleared; see SDL_EventType for details
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_FlushEvents
*/
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
/**
* Clear events of a range of types from the event queue.
*
* This will unconditionally remove any events from the queue that are in the
* range of `minType` to `maxType`, inclusive. If you need to remove a single
* event type, use SDL_FlushEvent() instead.
*
* It's also normal to just ignore events you don't care about in your event
* loop without calling this function.
*
* This function only affects currently queued events. If you want to make
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
*
* \param minType the low end of event type to be cleared, inclusive; see
* SDL_EventType for details
* \param maxType the high end of event type to be cleared, inclusive; see
* SDL_EventType for details
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_FlushEvent
*/
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
/**
* \brief Polls for currently pending events.
* Poll for currently pending events.
*
* \return 1 if there are any pending events, or 0 if there are none available.
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
* this event, immediately stored in the SDL Event structure -- not an event
* to follow.
*
* \param event If not NULL, the next event is removed from the queue and
* stored in that area.
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
* but will not remove it from the queue.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that set the video mode.
*
* SDL_PollEvent() is the favored way of receiving system events since it can
* be done from the main loop and does not suspend the main loop while waiting
* on an event to be posted.
*
* The common practice is to fully process the event queue once every frame,
* usually as a first step before updating the game's state:
*
* ```c
* while (game_is_still_running) {
* SDL_Event event;
* while (SDL_PollEvent(&event)) { // poll until all events are handled!
* // decide what to do with this event.
* }
*
* // update game state, draw the current frame
* }
* ```
*
* \param event the SDL_Event structure to be filled with the next event from
* the queue, or NULL
* \returns 1 if there is a pending event or 0 if there are none available.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventFilter
* \sa SDL_PeepEvents
* \sa SDL_PushEvent
* \sa SDL_SetEventFilter
* \sa SDL_WaitEvent
* \sa SDL_WaitEventTimeout
*/
extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
/**
* \brief Waits indefinitely for the next available event.
* Wait indefinitely for the next available event.
*
* \return 1, or 0 if there was an error while waiting for events.
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`.
*
* \param event If not NULL, the next event is removed from the queue and
* stored in that area.
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that initialized the video subsystem.
*
* \param event the SDL_Event structure to be filled in with the next event
* from the queue, or NULL
* \returns 1 on success or 0 if there was an error while waiting for events;
* call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_WaitEventTimeout
*/
extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
/**
* \brief Waits until the specified timeout (in milliseconds) for the next
* available event.
* Wait until the specified timeout (in milliseconds) for the next available
* event.
*
* \return 1, or 0 if there was an error while waiting for events.
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`.
*
* \param event If not NULL, the next event is removed from the queue and
* stored in that area.
* \param timeout The timeout (in milliseconds) to wait for next event.
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that initialized the video subsystem.
*
* \param event the SDL_Event structure to be filled in with the next event
* from the queue, or NULL
* \param timeout the maximum number of milliseconds to wait for the next
* available event
* \returns 1 on success or 0 if there was an error while waiting for events;
* call SDL_GetError() for more information. This also returns 0 if
* the timeout elapsed without an event arriving.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_WaitEvent
*/
extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
int timeout);
/**
* \brief Add an event to the event queue.
* Add an event to the event queue.
*
* \return 1 on success, 0 if the event was filtered, or -1 if the event queue
* was full or there was some other error.
* The event queue can actually be used as a two way communication channel.
* Not only can events be read from the queue, but the user can also push
* their own events onto it. `event` is a pointer to the event structure you
* wish to push onto the queue. The event is copied into the queue, and the
* caller may dispose of the memory pointed to after SDL_PushEvent() returns.
*
* Note: Pushing device input events onto the queue doesn't modify the state
* of the device within SDL.
*
* This function is thread-safe, and can be called from other threads safely.
*
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
* the event filter but events added with SDL_PeepEvents() do not.
*
* For pushing application-specific events, please use SDL_RegisterEvents() to
* get an event type that does not conflict with other code that also wants
* its own custom event types.
*
* \param event the SDL_Event to be added to the queue
* \returns 1 on success, 0 if the event was filtered, or a negative error
* code on failure; call SDL_GetError() for more information. A
* common reason for error is the event queue being full.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PeepEvents
* \sa SDL_PollEvent
* \sa SDL_RegisterEvents
*/
extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
/**
* A function pointer used for callbacks that watch the event queue.
*
* \param userdata what was passed as `userdata` to SDL_SetEventFilter()
* or SDL_AddEventWatch, etc
* \param event the event that triggered the callback
* \returns 1 to permit event to be added to the queue, and 0 to disallow
* it. When used with SDL_AddEventWatch, the return value is ignored.
*
* \sa SDL_SetEventFilter
* \sa SDL_AddEventWatch
*/
typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
/**
* Sets up a filter to process all events before they change internal state and
* are posted to the internal event queue.
* Set up a filter to process all events before they change internal state and
* are posted to the internal event queue.
*
* The filter is prototyped as:
* \code
* int SDL_EventFilter(void *userdata, SDL_Event * event);
* \endcode
* If the filter function returns 1 when called, then the event will be added
* to the internal queue. If it returns 0, then the event will be dropped from
* the queue, but the internal state will still be updated. This allows
* selective filtering of dynamically arriving events.
*
* If the filter returns 1, then the event will be added to the internal queue.
* If it returns 0, then the event will be dropped from the queue, but the
* internal state will still be updated. This allows selective filtering of
* dynamically arriving events.
* **WARNING**: Be very careful of what you do in the event filter function,
* as it may run in a different thread!
*
* \warning Be very careful of what you do in the event filter function, as
* it may run in a different thread!
* On platforms that support it, if the quit event is generated by an
* interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
* application at the next event poll.
*
* There is one caveat when dealing with the ::SDL_QuitEvent event type. The
* event filter is only called when the window manager desires to close the
* application window. If the event filter returns 1, then the window will
* be closed, otherwise the window will remain open if possible.
* There is one caveat when dealing with the ::SDL_QuitEvent event type. The
* event filter is only called when the window manager desires to close the
* application window. If the event filter returns 1, then the window will be
* closed, otherwise the window will remain open if possible.
*
* If the quit event is generated by an interrupt signal, it will bypass the
* internal queue and be delivered to the application at the next event poll.
* Note: Disabled events never make it to the event filter function; see
* SDL_EventState().
*
* Note: If you just want to inspect events without filtering, you should use
* SDL_AddEventWatch() instead.
*
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
* the event filter, but events pushed onto the queue with SDL_PeepEvents() do
* not.
*
* \param filter An SDL_EventFilter function to call when an event happens
* \param userdata a pointer that is passed to `filter`
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AddEventWatch
* \sa SDL_EventState
* \sa SDL_GetEventFilter
* \sa SDL_PeepEvents
* \sa SDL_PushEvent
*/
extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
void *userdata);
/**
* Return the current event filter - can be used to "chain" filters.
* If there is no event filter set, this function returns SDL_FALSE.
* Query the current event filter.
*
* This function can be used to "chain" filters, by saving the existing filter
* before replacing it with a function that will call that saved filter.
*
* \param filter the current callback function will be stored here
* \param userdata the pointer that is passed to the current event filter will
* be stored here
* \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetEventFilter
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
void **userdata);
/**
* Add a function which is called when an event is added to the queue.
* Add a callback to be triggered when an event is added to the event queue.
*
* `filter` will be called when an event happens, and its return value is
* ignored.
*
* **WARNING**: Be very careful of what you do in the event filter function,
* as it may run in a different thread!
*
* If the quit event is generated by a signal (e.g. SIGINT), it will bypass
* the internal queue and be delivered to the watch callback immediately, and
* arrive at the next event poll.
*
* Note: the callback is called for events posted by the user through
* SDL_PushEvent(), but not for disabled events, nor for events by a filter
* callback set with SDL_SetEventFilter(), nor for events posted by the user
* through SDL_PeepEvents().
*
* \param filter an SDL_EventFilter function to call when an event happens.
* \param userdata a pointer that is passed to `filter`
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_DelEventWatch
* \sa SDL_SetEventFilter
*/
extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
void *userdata);
/**
* Remove an event watch function added with SDL_AddEventWatch()
* Remove an event watch callback added with SDL_AddEventWatch().
*
* This function takes the same input as SDL_AddEventWatch() to identify and
* delete the corresponding callback.
*
* \param filter the function originally passed to SDL_AddEventWatch()
* \param userdata the pointer originally passed to SDL_AddEventWatch()
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AddEventWatch
*/
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
void *userdata);
/**
* Run the filter function on the current event queue, removing any
* events for which the filter returns 0.
* Run a specific filter function on the current event queue, removing any
* events for which the filter returns 0.
*
* See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
* this function does not change the filter permanently, it only uses the
* supplied filter until this function returns.
*
* \param filter the SDL_EventFilter function to call when an event happens
* \param userdata a pointer that is passed to `filter`
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventFilter
* \sa SDL_SetEventFilter
*/
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
void *userdata);
@@ -756,24 +1097,45 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
#define SDL_ENABLE 1
/**
* This function allows you to set the state of processing certain events.
* - If \c state is set to ::SDL_IGNORE, that event will be automatically
* dropped from the event queue and will not be filtered.
* - If \c state is set to ::SDL_ENABLE, that event will be processed
* normally.
* - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
* current processing state of the specified event.
* Set the state of processing events by type.
*
* `state` may be any of the following:
*
* - `SDL_QUERY`: returns the current processing state of the specified event
* - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
* from the event queue and will not be filtered
* - `SDL_ENABLE`: the event will be processed normally
*
* \param type the type of event; see SDL_EventType for details
* \param state how to process the event
* \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
* of the event before this function makes any changes to it.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventState
*/
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
/* @} */
#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
/**
* This function allocates a set of user-defined events, and returns
* the beginning event number for that set of events.
* Allocate a set of user-defined events, and return the beginning event
* number for that set of events.
*
* If there aren't enough user-defined events left, this function
* returns (Uint32)-1
* Calling this function with `numevents` <= 0 is an error and will return
* (Uint32)-1.
*
* Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
* 0xFFFFFFFF), but is clearer to write.
*
* \param numevents the number of events to be allocated
* \returns the beginning event number, or (Uint32)-1 if there are not enough
* user-defined events left.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PushEvent
*/
extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,88 +38,97 @@ extern "C" {
#endif
/**
* \brief Get the path where the application resides.
* Get the directory where the application was run from.
*
* Get the "base path". This is the directory where the application was run
* from, which is probably the installation directory, and may or may not
* be the process's current working directory.
* This is not necessarily a fast call, so you should call this once near
* startup and save the string if you need it.
*
* This returns an absolute path in UTF-8 encoding, and is guaranteed to
* end with a path separator ('\\' on Windows, '/' most other places).
* **Mac OS X and iOS Specific Functionality**: If the application is in a
* ".app" bundle, this function returns the Resource directory (e.g.
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
* a property to the Info.plist file. Adding a string key with the name
* SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
* behaviour.
*
* The pointer returned by this function is owned by you. Please call
* SDL_free() on the pointer when you are done with it, or it will be a
* memory leak. This is not necessarily a fast call, though, so you should
* call this once near startup and save the string if you need it.
* Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
* application in /Applications/SDLApp/MyApp.app):
*
* Some platforms can't determine the application's path, and on other
* platforms, this might be meaningless. In such cases, this function will
* return NULL.
* - `resource`: bundle resource directory (the default). For example:
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
* - `bundle`: the Bundle directory. For example:
* `/Applications/SDLApp/MyApp.app/`
* - `parent`: the containing directory of the bundle. For example:
* `/Applications/SDLApp/`
*
* \return String of base dir in UTF-8 encoding, or NULL on error.
* The returned path is guaranteed to end with a path separator ('\' on
* Windows, '/' on most other platforms).
*
* The pointer returned is owned by the caller. Please call SDL_free() on the
* pointer when done with it.
*
* \returns an absolute path in UTF-8 encoding to the application data
* directory. NULL will be returned on error or when the platform
* doesn't implement this functionality, call SDL_GetError() for more
* information.
*
* \since This function is available since SDL 2.0.1.
*
* \sa SDL_GetPrefPath
*/
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
/**
* \brief Get the user-and-app-specific path where files can be written.
* Get the user-and-app-specific path where files can be written.
*
* Get the "pref dir". This is meant to be where users can write personal
* files (preferences and save games, etc) that are specific to your
* application. This directory is unique per user, per application.
* files (preferences and save games, etc) that are specific to your
* application. This directory is unique per user, per application.
*
* This function will decide the appropriate location in the native filesystem,
* create the directory if necessary, and return a string of the absolute
* path to the directory in UTF-8 encoding.
* This function will decide the appropriate location in the native
* filesystem, create the directory if necessary, and return a string of the
* absolute path to the directory in UTF-8 encoding.
*
* On Windows, the string might look like:
* "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\"
*
* On Linux, the string might look like:
* "/home/bob/.local/share/My Program Name/"
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
*
* On Linux, the string might look like"
*
* `/home/bob/.local/share/My Program Name/`
*
* On Mac OS X, the string might look like:
* "/Users/bob/Library/Application Support/My Program Name/"
*
* (etc.)
* `/Users/bob/Library/Application Support/My Program Name/`
*
* You specify the name of your organization (if it's not a real organization,
* your name or an Internet domain you own might do) and the name of your
* application. These should be untranslated proper names.
* You should assume the path returned by this function is the only safe place
* to write files (and that SDL_GetBasePath(), while it might be writable, or
* even the parent of the returned path, isn't where you should be writing
* things).
*
* Both the org and app strings may become part of a directory name, so
* please follow these rules:
* Both the org and app strings may become part of a directory name, so please
* follow these rules:
*
* - Try to use the same org string (including case-sensitivity) for
* all your applications that use this function.
* - Always use a unique app string for each one, and make sure it never
* changes for an app once you've decided on it.
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
* - ...only use letters, numbers, and spaces. Avoid punctuation like
* "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
* - Try to use the same org string (_including case-sensitivity_) for all
* your applications that use this function.
* - Always use a unique app string for each one, and make sure it never
* changes for an app once you've decided on it.
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
*
* This returns an absolute path in UTF-8 encoding, and is guaranteed to
* end with a path separator ('\\' on Windows, '/' most other places).
* The returned path is guaranteed to end with a path separator ('\' on
* Windows, '/' on most other platforms).
*
* The pointer returned by this function is owned by you. Please call
* SDL_free() on the pointer when you are done with it, or it will be a
* memory leak. This is not necessarily a fast call, though, so you should
* call this once near startup and save the string if you need it.
* The pointer returned is owned by the caller. Please call SDL_free() on the
* pointer when done with it.
*
* You should assume the path returned by this function is the only safe
* place to write files (and that SDL_GetBasePath(), while it might be
* writable, or even the parent of the returned path, aren't where you
* should be writing things).
* \param org the name of your organization
* \param app the name of your application
* \returns a UTF-8 string of the user directory in platform-dependent
* notation. NULL if there's a problem (creating directory failed,
* etc.).
*
* Some platforms can't determine the pref path, and on other
* platforms, this might be meaningless. In such cases, this function will
* return NULL.
*
* \param org The name of your organization.
* \param app The name of your application.
* \return UTF-8 string of user dir in platform-dependent notation. NULL
* if there's a problem (creating directory failed, etc).
* \since This function is available since SDL 2.0.1.
*
* \sa SDL_GetBasePath
*/
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -31,6 +31,7 @@
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_rwops.h"
#include "SDL_sensor.h"
#include "SDL_joystick.h"
#include "begin_code.h"
@@ -57,6 +58,19 @@ extern "C" {
struct _SDL_GameController;
typedef struct _SDL_GameController SDL_GameController;
typedef enum
{
SDL_CONTROLLER_TYPE_UNKNOWN = 0,
SDL_CONTROLLER_TYPE_XBOX360,
SDL_CONTROLLER_TYPE_XBOXONE,
SDL_CONTROLLER_TYPE_PS3,
SDL_CONTROLLER_TYPE_PS4,
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
SDL_CONTROLLER_TYPE_VIRTUAL,
SDL_CONTROLLER_TYPE_PS5,
SDL_CONTROLLER_TYPE_AMAZON_LUNA,
SDL_CONTROLLER_TYPE_GOOGLE_STADIA
} SDL_GameControllerType;
typedef enum
{
@@ -87,6 +101,8 @@ typedef struct SDL_GameControllerButtonBind
/**
* To count the number of game controllers in the system for the following:
*
* ```c
* int nJoysticks = SDL_NumJoysticks();
* int nGameControllers = 0;
* for (int i = 0; i < nJoysticks; i++) {
@@ -94,6 +110,7 @@ typedef struct SDL_GameControllerButtonBind
* nGameControllers++;
* }
* }
* ```
*
* Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
@@ -107,17 +124,39 @@ typedef struct SDL_GameControllerButtonBind
* Buttons can be used as a controller axis and vice versa.
*
* This string shows an example of a valid mapping for a controller
* "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
*
* ```c
* "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
* ```
*/
/**
* Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
* A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
* Load a set of Game Controller mappings from a seekable SDL data stream.
*
* If \c freerw is non-zero, the stream will be closed after being read.
*
* \return number of mappings added, -1 on error
* You can call this function several times, if needed, to load different
* database files.
*
* If a new mapping is loaded for an already known controller GUID, the later
* version will overwrite the one currently loaded.
*
* Mappings not belonging to the current platform or with no platform field
* specified will be ignored (i.e. mappings for Linux will be ignored in
* Windows, etc).
*
* This function will load the text database entirely in memory before
* processing it, so take this into consideration if you are in a memory
* constrained environment.
*
* \param rw the data stream for the mappings to be added
* \param freerw non-zero to close the stream after being read
* \returns the number of mappings added or -1 on error; call SDL_GetError()
* for more information.
*
* \since This function is available since SDL 2.0.2.
*
* \sa SDL_GameControllerAddMapping
* \sa SDL_GameControllerAddMappingsFromFile
* \sa SDL_GameControllerMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
@@ -129,133 +168,372 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
/**
* Add or update an existing mapping configuration
* Add support for controllers that SDL is unaware of or to cause an existing
* controller to have a different binding.
*
* \return 1 if mapping is added, 0 if updated, -1 on error
* The mapping string has the format "GUID,name,mapping", where GUID is the
* string value from SDL_JoystickGetGUIDString(), name is the human readable
* string for the device and mappings are controller mappings to joystick
* ones. Under Windows there is a reserved GUID of "xinput" that covers all
* XInput devices. The mapping format for joystick is: {| |bX |a joystick
* button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
* |} Buttons can be used as a controller axes and vice versa.
*
* This string shows an example of a valid mapping for a controller:
*
* ```c
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
* ```
*
* \param mappingString the mapping string
* \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
* -1 on error; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerMapping
* \sa SDL_GameControllerMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
/**
* Get the number of mappings installed
* Get the number of mappings installed.
*
* \return the number of mappings
* \returns the number of mappings.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
/**
* Get the mapping at a particular index.
* Get the mapping at a particular index.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
* the index is out of range.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
/**
* Get a mapping string for a GUID
* Get the game controller mapping string for a given GUID.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
* The returned string must be freed with SDL_free().
*
* \param guid a structure containing the GUID for which a mapping is desired
* \returns a mapping string or NULL on error; call SDL_GetError() for more
* information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_JoystickGetDeviceGUID
* \sa SDL_JoystickGetGUID
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
/**
* Get a mapping string for an open GameController
* Get the current mapping of a Game Controller.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
* The returned string must be freed with SDL_free().
*
* Details about mappings are discussed with SDL_GameControllerAddMapping().
*
* \param gamecontroller the game controller you want to get the current
* mapping for
* \returns a string that has the controller's mapping or NULL if no mapping
* is available; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerAddMapping
* \sa SDL_GameControllerMappingForGUID
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
/**
* Is the joystick on this index supported by the game controller interface?
* Check if the given joystick is supported by the game controller interface.
*
* `joystick_index` is the same as the `device_index` passed to
* SDL_JoystickOpen().
*
* \param joystick_index the device_index of a device, up to
* SDL_NumJoysticks()
* \returns SDL_TRUE if the given joystick is supported by the game controller
* interface, SDL_FALSE if it isn't or it's an invalid index.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerNameForIndex
* \sa SDL_GameControllerOpen
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
/**
* Get the implementation dependent name of a game controller.
* This can be called before any controllers are opened.
* If no name can be found, this function returns NULL.
* Get the implementation dependent name for the game controller.
*
* This function can be called before any controllers are opened.
*
* `joystick_index` is the same as the `device_index` passed to
* SDL_JoystickOpen().
*
* \param joystick_index the device_index of a device, from zero to
* SDL_NumJoysticks()-1
* \returns the implementation-dependent name for the game controller, or NULL
* if there is no name or the index is invalid.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerName
* \sa SDL_GameControllerOpen
* \sa SDL_IsGameController
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
* This can be called before any controllers are opened.
* Get the type of a game controller.
*
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
* This can be called before any controllers are opened.
*
* \param joystick_index the device_index of a device, from zero to
* SDL_NumJoysticks()-1
* \returns the controller type.
*
* \since This function is available since SDL 2.0.12.
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
/**
* Get the mapping of a game controller.
*
* This can be called before any controllers are opened.
*
* \param joystick_index the device_index of a device, from zero to
* SDL_NumJoysticks()-1
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
* no mapping is available.
*
* \since This function is available since SDL 2.0.9.
*/
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
/**
* Open a game controller for use.
* The index passed as an argument refers to the N'th game controller on the system.
* This index is not the value which will identify this controller in future
* controller events. The joystick's instance id (::SDL_JoystickID) will be
* used there instead.
* Open a game controller for use.
*
* \return A controller identifier, or NULL if an error occurred.
* `joystick_index` is the same as the `device_index` passed to
* SDL_JoystickOpen().
*
* The index passed as an argument refers to the N'th game controller on the
* system. This index is not the value which will identify this controller in
* future controller events. The joystick's instance id (SDL_JoystickID) will
* be used there instead.
*
* \param joystick_index the device_index of a device, up to
* SDL_NumJoysticks()
* \returns a gamecontroller identifier or NULL if an error occurred; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerClose
* \sa SDL_GameControllerNameForIndex
* \sa SDL_IsGameController
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
/**
* Return the SDL_GameController associated with an instance id.
* Get the SDL_GameController associated with an instance id.
*
* \param joyid the instance id to get the SDL_GameController for
* \returns an SDL_GameController on success or NULL on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.4.
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
/**
* Return the name for this currently opened controller
* Get the SDL_GameController associated with a player index.
*
* Please note that the player index is _not_ the device index, nor is it the
* instance id!
*
* \param player_index the player index, which is not the device index or the
* instance id!
* \returns the SDL_GameController associated with a player index.
*
* \since This function is available since SDL 2.0.12.
*
* \sa SDL_GameControllerGetPlayerIndex
* \sa SDL_GameControllerSetPlayerIndex
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
/**
* Get the implementation-dependent name for an opened game controller.
*
* This is the same name as returned by SDL_GameControllerNameForIndex(), but
* it takes a controller identifier instead of the (unstable) device index.
*
* \param gamecontroller a game controller identifier previously returned by
* SDL_GameControllerOpen()
* \returns the implementation dependent name for the game controller, or NULL
* if there is no name or the identifier passed is invalid.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerNameForIndex
* \sa SDL_GameControllerOpen
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller, or -1 if it's not available
* Get the type of this currently opened controller
*
* For XInput controllers this returns the XInput user index.
* This is the same name as returned by SDL_GameControllerTypeForIndex(), but
* it takes a controller identifier instead of the (unstable) device index.
*
* \param gamecontroller the game controller object to query.
* \returns the controller type.
*
* \since This function is available since SDL 2.0.12.
*/
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
/**
* Get the player index of an opened game controller.
*
* For XInput controllers this returns the XInput user index.
*
* \param gamecontroller the game controller object to query.
* \returns the player index for controller, or -1 if it's not available.
*
* \since This function is available since SDL 2.0.9.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/**
* Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0.
* Set the player index of an opened game controller.
*
* \param gamecontroller the game controller object to adjust.
* \param player_index Player index to assign to this controller.
*
* \since This function is available since SDL 2.0.12.
*/
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
/**
* Get the USB product ID of an opened controller, if available.
* If the product ID isn't available this function returns 0.
* Get the USB vendor ID of an opened controller, if available.
*
* If the vendor ID isn't available this function returns 0.
*
* \param gamecontroller the game controller object to query.
* \return the USB vendor ID, or zero if unavailable.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
/**
* Get the product version of an opened controller, if available.
* If the product version isn't available this function returns 0.
* Get the USB product ID of an opened controller, if available.
*
* If the product ID isn't available this function returns 0.
*
* \param gamecontroller the game controller object to query.
* \return the USB product ID, or zero if unavailable.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
/**
* Returns SDL_TRUE if the controller has been opened and currently connected,
* or SDL_FALSE if it has not.
* Get the product version of an opened controller, if available.
*
* If the product version isn't available this function returns 0.
*
* \param gamecontroller the game controller object to query.
* \return the USB product version, or zero if unavailable.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
/**
* Get the serial number of an opened controller, if available.
*
* Returns the serial number of the controller, or NULL if it is not
* available.
*
* \param gamecontroller the game controller object to query.
* \return the serial number, or NULL if unavailable.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
/**
* Check if a controller has been opened and is currently connected.
*
* \param gamecontroller a game controller identifier previously returned by
* SDL_GameControllerOpen()
* \returns SDL_TRUE if the controller has been opened and is currently
* connected, or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerClose
* \sa SDL_GameControllerOpen
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
/**
* Get the underlying joystick object used by a controller
* Get the Joystick ID from a Game Controller.
*
* This function will give you a SDL_Joystick object, which allows you to use
* the SDL_Joystick functions with a SDL_GameController object. This would be
* useful for getting a joystick's position at any given time, even if it
* hasn't moved (moving it would produce an event, which would have the axis'
* value).
*
* The pointer returned is owned by the SDL_GameController. You should not
* call SDL_JoystickClose() on it, for example, since doing so will likely
* cause SDL to crash.
*
* \param gamecontroller the game controller object that you want to get a
* joystick from
* \returns a SDL_Joystick object; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
/**
* Enable/disable controller event polling.
* Query or change current state of Game Controller events.
*
* If controller events are disabled, you must call SDL_GameControllerUpdate()
* yourself and check the state of the controller when you want controller
* information.
* If controller events are disabled, you must call SDL_GameControllerUpdate()
* yourself and check the state of the controller when you want controller
* information.
*
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
* Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
* and 1 will have any effect. Other numbers will just be returned.
*
* \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
* \returns the same value passed to the function, with exception to -1
* (SDL_QUERY), which will return the current state.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_JoystickEventState
*/
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
/**
* Update the current state of the open game controllers.
* Manually pump game controller updates if not using the loop.
*
* This is called automatically by the event loop if any game controller
* events are enabled.
* This function is called automatically by the event loop if events are
* enabled. Under such circumstances, it will not be necessary to call this
* function.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
@@ -282,33 +560,94 @@ typedef enum
} SDL_GameControllerAxis;
/**
* turn this string into a axis mapping
* Convert a string into SDL_GameControllerAxis enum.
*
* This function is called internally to translate SDL_GameController mapping
* strings for the underlying joystick device into the consistent
* SDL_GameController mapping. You do not normally need to call this function
* unless you are parsing SDL_GameController mappings in your own code.
*
* Note specially that "righttrigger" and "lefttrigger" map to
* `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
* respectively.
*
* \param str string representing a SDL_GameController axis
* \returns the SDL_GameControllerAxis enum corresponding to the input string,
* or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetStringForAxis
*/
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
/**
* turn this axis enum into a string mapping
* Convert from an SDL_GameControllerAxis enum to a string.
*
* The caller should not SDL_free() the returned string.
*
* \param axis an enum value for a given SDL_GameControllerAxis
* \returns a string for the given axis, or NULL if an invalid axis is
* specified. The string returned is of the format used by
* SDL_GameController mapping strings.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetAxisFromString
*/
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
/**
* Get the SDL joystick layer binding for this controller button mapping
* Get the SDL joystick layer binding for a controller axis mapping.
*
* \param gamecontroller a game controller
* \param axis an axis enum value (one of the SDL_GameControllerAxis values)
* \returns a SDL_GameControllerButtonBind describing the bind. On failure
* (like the given Controller axis doesn't exist on the device), its
* `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetBindForButton
*/
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
SDL_GameControllerAxis axis);
/**
* Get the current state of an axis control on a game controller.
* Query whether a game controller has a given axis.
*
* The state is a value ranging from -32768 to 32767 (except for the triggers,
* which range from 0 to 32767).
* This merely reports whether the controller's mapping defined this axis, as
* that is all the information SDL has about the physical device.
*
* The axis indices start at index 0.
* \param gamecontroller a game controller
* \param axis an axis enum value (an SDL_GameControllerAxis value)
* \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC SDL_bool SDLCALL
SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
/**
* Get the current state of an axis control on a game controller.
*
* The axis indices start at index 0.
*
* The state is a value ranging from -32768 to 32767. Triggers, however, range
* from 0 to 32767 (they never return a negative value).
*
* \param gamecontroller a game controller
* \param axis an axis index (one of the SDL_GameControllerAxis values)
* \returns axis state (including 0) on success or 0 (also) on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetButton
*/
extern DECLSPEC Sint16 SDLCALL
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller,
SDL_GameControllerAxis axis);
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
/**
* The list of buttons available from a controller
@@ -331,53 +670,326 @@ typedef enum
SDL_CONTROLLER_BUTTON_DPAD_DOWN,
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
SDL_CONTROLLER_BUTTON_MAX
} SDL_GameControllerButton;
/**
* turn this string into a button mapping
* Convert a string into an SDL_GameControllerButton enum.
*
* This function is called internally to translate SDL_GameController mapping
* strings for the underlying joystick device into the consistent
* SDL_GameController mapping. You do not normally need to call this function
* unless you are parsing SDL_GameController mappings in your own code.
*
* \param str string representing a SDL_GameController axis
* \returns the SDL_GameControllerButton enum corresponding to the input
* string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
/**
* turn this button enum into a string mapping
* Convert from an SDL_GameControllerButton enum to a string.
*
* The caller should not SDL_free() the returned string.
*
* \param button an enum value for a given SDL_GameControllerButton
* \returns a string for the given button, or NULL if an invalid axis is
* specified. The string returned is of the format used by
* SDL_GameController mapping strings.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetButtonFromString
*/
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
/**
* Get the SDL joystick layer binding for this controller button mapping
* Get the SDL joystick layer binding for a controller button mapping.
*
* \param gamecontroller a game controller
* \param button an button enum value (an SDL_GameControllerButton value)
* \returns a SDL_GameControllerButtonBind describing the bind. On failure
* (like the given Controller button doesn't exist on the device),
* its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetBindForAxis
*/
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button);
/**
* Query whether a game controller has a given button.
*
* This merely reports whether the controller's mapping defined this button,
* as that is all the information SDL has about the physical device.
*
* \param gamecontroller a game controller
* \param button a button enum value (an SDL_GameControllerButton value)
* \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button);
/**
* Get the current state of a button on a game controller.
* Get the current state of a button on a game controller.
*
* The button indices start at index 0.
* \param gamecontroller a game controller
* \param button a button index (one of the SDL_GameControllerButton values)
* \returns 1 for pressed state or 0 for not pressed state or error; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerGetAxis
*/
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button);
/**
* Trigger a rumble effect
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
* Get the number of touchpads on a game controller.
*
* \param gamecontroller The controller to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
/**
* Get the number of supported simultaneous fingers on a touchpad on a game
* controller.
*
* \return 0, or -1 if rumble isn't supported on this joystick
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
/**
* Get the current state of a finger on a touchpad on a game controller.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
/**
* Return whether a game controller has a particular sensor.
*
* \param gamecontroller The controller to query
* \param type The type of sensor to query
* \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
/**
* Set whether data reporting for a game controller sensor is enabled.
*
* \param gamecontroller The controller to update
* \param type The type of sensor to enable/disable
* \param enabled Whether data reporting should be enabled
* \returns 0 or -1 if an error occurred.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
/**
* Query whether sensor data reporting is enabled for a game controller.
*
* \param gamecontroller The controller to query
* \param type The type of sensor to query
* \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
/**
* Get the data rate (number of events per second) of a game controller
* sensor.
*
* \param gamecontroller The controller to query
* \param type The type of sensor to query
* \return the data rate, or 0.0f if the data rate is not available.
*
* \since This function is available since SDL 2.0.16.
*/
extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
/**
* Get the current state of a game controller sensor.
*
* The number of values and interpretation of the data is sensor dependent.
* See SDL_sensor.h for the details for each type of sensor.
*
* \param gamecontroller The controller to query
* \param type The type of sensor to query
* \param data A pointer filled with the current sensor state
* \param num_values The number of values to write to data
* \return 0 or -1 if an error occurred.
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
/**
* Start a rumble effect on a game controller.
*
* Each call to this function cancels any previous rumble effect, and calling
* it with 0 intensity stops any rumbling.
*
* \param gamecontroller The controller to vibrate
* \param low_frequency_rumble The intensity of the low frequency (left)
* rumble motor, from 0 to 0xFFFF
* \param high_frequency_rumble The intensity of the high frequency (right)
* rumble motor, from 0 to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
* \returns 0, or -1 if rumble isn't supported on this controller
*
* \since This function is available since SDL 2.0.9.
*
* \sa SDL_GameControllerHasRumble
*/
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
/**
* Close a controller previously opened with SDL_GameControllerOpen().
* Start a rumble effect in the game controller's triggers.
*
* Each call to this function cancels any previous trigger rumble effect, and
* calling it with 0 intensity stops any rumbling.
*
* Note that this is rumbling of the _triggers_ and not the game controller as
* a whole. This is currently only supported on Xbox One controllers. If you
* want the (more common) whole-controller rumble, use
* SDL_GameControllerRumble() instead.
*
* \param gamecontroller The controller to vibrate
* \param left_rumble The intensity of the left trigger rumble motor, from 0
* to 0xFFFF
* \param right_rumble The intensity of the right trigger rumble motor, from 0
* to 0xFFFF
* \param duration_ms The duration of the rumble effect, in milliseconds
* \returns 0, or -1 if trigger rumble isn't supported on this controller
*
* \since This function is available since SDL 2.0.14.
*
* \sa SDL_GameControllerHasRumbleTriggers
*/
extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
/**
* Query whether a game controller has an LED.
*
* \param gamecontroller The controller to query
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
* modifiable LED
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
/**
* Query whether a game controller has rumble support.
*
* \param gamecontroller The controller to query
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
* support
*
* \since This function is available since SDL 2.0.18.
*
* \sa SDL_GameControllerRumble
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
/**
* Query whether a game controller has rumble support on triggers.
*
* \param gamecontroller The controller to query
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
* rumble support
*
* \since This function is available since SDL 2.0.18.
*
* \sa SDL_GameControllerRumbleTriggers
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
/**
* Update a game controller's LED color.
*
* \param gamecontroller The controller to update
* \param red The intensity of the red LED
* \param green The intensity of the green LED
* \param blue The intensity of the blue LED
* \returns 0, or -1 if this controller does not have a modifiable LED
*
* \since This function is available since SDL 2.0.14.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
/**
* Send a controller specific effect packet
*
* \param gamecontroller The controller to affect
* \param data The data to send to the controller
* \param size The size of the data to send to the controller
* \returns 0, or -1 if this controller or driver doesn't support effect
* packets
*
* \since This function is available since SDL 2.0.16.
*/
extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
/**
* Close a game controller previously opened with SDL_GameControllerOpen().
*
* \param gamecontroller a game controller identifier previously returned by
* SDL_GameControllerOpen()
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GameControllerOpen
*/
extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
/**
* Return the sfSymbolsName for a given button on a game controller on Apple
* platforms.
*
* \param gamecontroller the controller to query
* \param button a button on the game controller
* \returns the sfSymbolsName or NULL if the name can't be found
*
* \since This function is available since SDL 2.0.18.
*
* \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
*/
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
/**
* Return the sfSymbolsName for a given axis on a game controller on Apple
* platforms.
*
* \param gamecontroller the controller to query
* \param axis an axis on the game controller
* \returns the sfSymbolsName or NULL if the name can't be found
*
* \since This function is available since SDL 2.0.18.
*
* \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
*/
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
Loaded 100 of 979 files, more files were not shown because too many files have changed in this diff. Show more