Compare commits

..
Author SHA1 Message Date
Alug f58772a570 z_zone: add asserts if zone memory functions are called from non main thread
also taken from srb2classic thanks!
2026-02-02 18:14:38 +01:00
Alug f7c065b22e refactor i_thread stuff
based on https://codeberg.org/srb2classic/srb2classic/commit/3670a7c1c193185cf4921de8955c96e63fbecc62
and other things from srb2classic
this also now allows to check if a thread failed to spawn and reduces duped stuff and such
2026-02-02 18:14:35 +01:00
Alug 55c8546d68 do not use Zone Memory for masterserver rules
this gets called from within non main threads!
zone memory is not thread safe!
2026-02-02 17:27:23 +01:00
Alug 1762f18116 delet all the Z_Free checks
Z_Free already checks its input internally!
2026-02-02 16:12:38 +01:00
Alug e4dbf1ce11 plug a potential memory leak in M_SaveConfig 2026-02-02 16:11:57 +01:00
Alug 10b9d96259 hw_clip: replace "RoundToInt" with lrint
prefer to use standard lib functions if possible
lrint does the same thing (well ofc as long as no one touches the rounding direction löl) and is even quite a lot faster (though this is negligible in this case)
2026-02-02 16:11:54 +01:00
indev b23154fd93 Prevent replays menu scoll bar from disappearing 2026-02-02 02:28:33 +03:00
Alug b0ee972178 r_plane: fix visplane hashing overflowing
shift into "int" to prevent super large values during multiply
2026-02-01 20:52:48 +01:00
Alug 544e1d3b21 "fix" overflow in R_InitViewMapping with high resolutions 2026-02-01 17:07:18 +01:00
Alug 0ca6947f99 fix a few type issues 2026-02-01 16:27:25 +01:00
indev 3122c08039 Add focus options for gamepad led and rumble 2026-02-01 02:49:03 +03:00
indev 7a279a6fd9 Prefix autoaccel cvars with 'kart' to avoid conflict with hostmod 2026-01-28 19:19:02 +03:00
Alug c4581bd9a6 Only save and keep track of controller ids on SDL versions 2.32.4 and up
Older versions break and have unstable ids on Windows, cant check for linux but ill just add a version check at this point
This was part of updating sdl with v9, which got reverted due to other issues but this was not reverted oopsie
2026-01-24 18:20:54 +01:00
Alug bb47b976a7 software: fix drawseg xrange item coord type being too small
both sprite and drawseg coords are int32
might fix some clipping issues
2026-01-23 18:33:11 +01:00
Alug 6c419ff22e fix few more implicit double/float conversions 2026-01-23 18:33:08 +01:00
Alug 522904527f add missing HAVE_CURL 2026-01-23 10:08:35 +01:00
Alug 30539371c2 more cmake stuffs
-add LTO option, enabled by default
-set optimization level to O3 and O0 for debug builds
-add ASAN and UBSAN options
-always compile with gnu debug symbols
2026-01-22 14:46:12 +01:00
Alug e2ecc315b4 cmake: attempt to fix dedicated build uhh building 2026-01-22 14:44:47 +01:00
Alug eb2f186205 Merge pull request #221 from P-AS/morecmakefixes
CMake fixes cherry-picked from srb2-legacy
2026-01-22 14:43:38 +01:00
Alug bbf06b3376 add "vid.udup" same as vid.dup but not scaled with "highreshudscale" 2026-01-22 14:26:24 +01:00
Alug a1f70b0b31 opengl: attempt to scale vhs effect "fuzzyness"
this makes it appear more or less the same in all resolutions, similar to software, while also improving performance quite a bit on higher resolutions
2026-01-22 14:26:23 +01:00
Alug 2e0f5c02a4 opengl: make vhs effect bars be affected by "fuzzines"
makes stuff slightly slower, but matches the software effect
2026-01-22 14:25:57 +01:00
Alug 0f7001ef5c opengl: tiny optimiazation for vhs effect
dont call rand within the loop, use xorshift instead
while not massive, we dont need to call rand thousands of times, the xorshift is visually indistinguishable
this is still rather slow due to the crapton of draw calls and should best be replaced by a shader or something
2026-01-22 14:25:54 +01:00
PAS 4600da5782 restore SRB2_SDL2_EXE_NAME 2026-01-21 15:54:32 -05:00
indev a3557fadef P_PlayRinglossSound from lua might desynch so print warning about that 2026-01-21 23:38:41 +03:00
Alug d9a67faf47 fix windoze compile 2026-01-21 21:11:52 +01:00
PAS 96eaf8850e Add path suffix for libgme cmake module 2026-01-21 15:01:51 -05:00
PAS e7efd46419 Fix FindGME pkg-config command, update LibFindMacros.cmake 2026-01-21 15:01:33 -05:00
PAS 346b1456cd CMake: Fix FindOPENMPT 2026-01-21 14:59:01 -05:00
PAS 9f5a5a735b Allow changing Cpak generator (from upstream) 2026-01-21 14:58:32 -05:00
PAS 8e4b304bed CMake: don't configure before CPACK_PACKAGE_DESCRIPTION_SUMMARY is set 2026-01-21 14:51:17 -05:00
Alug 607fbc54fc Merge pull request #220 from Indev450/fixcmake2
Fixup CMake, but simpler
2026-01-21 20:45:24 +01:00
Alug 276cf0a8cb fix string.c include
whoops, not sure why that was even done like that
string.c will include strcasestr.c and SRB2_HAVE_STRLCPY will ensure eitherways we dont use the included strlcpy stuff
2026-01-21 20:04:19 +01:00
Alug 59c9af97c2 joy_open: make debug prints actually print the player number 2026-01-21 19:54:03 +01:00
Alug 4e75d99026 simplify LUA_Alloc
Z_Realloc already handles everything internally, no need to manually free anything
2026-01-21 19:49:55 +01:00
Alug 8e91c16e97 cmake: enable gnu extensions
we rely on some of them like the cleanup macro
dont want those breaking or smth
2026-01-21 19:34:44 +01:00
Alug 186421fe85 cmake: link with peethread 2026-01-21 19:23:36 +01:00
Alug af952870c3 fix fbo oopsie 2026-01-21 19:22:40 +01:00
Alug 4eeb0b4b20 update readme to reflect this 2026-01-21 19:16:05 +01:00
Alug cb2c65e9d9 more cmake fixups
- skip asset install for linux
- pass fwrapv flag
- fix asset hash stuff
- pass rdynamic flag
- add saturn specific stuff, saturnpak, saturnjoin, libbacktrace and fix screen fbo stuff
2026-01-21 19:09:50 +01:00
cobalt2727 f7bbde3982 fix ARM builds being completely broken
If merged, this is the quickest approach to resolve https://github.com/STJr/SRB2/issues/513

...alternatively, we could just remove the option altogether but I don't have the time right now to test whether it's needed or not

To the best of my knowledge, this covers all possible amd64 `CMAKE_SYSTEM_PROCESSOR` values based on what I'm seeing at https://stackoverflow.com/questions/70475665/what-are-the-possible-values-of-cmake-system-processor
2026-01-21 18:24:53 +01:00
Alug c9fc3b4820 fixup cmake for macos
mostly based on the patch from https://github.com/Bijman/srb2bld
with some changes from https://github.com/Indev450/SRB2Kart-Saturn/pull/216
but doesent completely replace the build system with what blan has
compiles fine on nix, but needs testing on mac
2026-01-21 18:23:21 +01:00
Alug f5195dd137 Merge branch 'crashissuereports' into Saturn-Next 2026-01-20 17:32:30 +01:00
Alug 5289f13891 Show report issue button also on I_Error
also make wrapper functions for everything, to reduce code dupe
2026-01-20 17:32:22 +01:00
Alug 073b35690b dont attempt to show sdl message box on non dedicated builds running as dedicated 2026-01-20 17:32:19 +01:00
Alug 43d3ac102d HWR_RenderPlane: cleanup code that does nothing 2026-01-20 15:42:37 +01:00
Alug aa96f9ceb3 V_DrawVhsEffect: fix scaling with highreshudscale, fix downwards bar going out of screen bounds
this shouldnt account for highreshudscale at all
on very high resolutions the bars are still only half size, but atleast they dont become minuscule or just dont draw at all
also ensures both bars are clamped, on some resolutions sometimes they just go out of visible screen range
2026-01-20 14:57:18 +01:00
Alug 104b8260fb add reducevfx to accesability menu
If there are things that should be handled by that toggle def feel free to suggest them!
2026-01-19 14:35:10 +01:00
Alug edebc728ef remove unused stuff from joyinfo 2026-01-18 19:00:05 +01:00
Alug 08e7ce3b5b m_menu: clean up the skin display stuff a little 2026-01-16 13:27:20 +01:00
Alug 29f187b751 fix some windoze specific "-Wzero-as-null-pointer-constant" warnings 2026-01-16 12:53:34 +01:00
indev ac3a1ad5eb Add gcc 13.3 into list of supported versions 2026-01-16 12:02:21 +03:00
indev 1b8d7b1541 I_Error when dedi tries to go to main error
This will not fix the issue entirely but will at least prevent server
getting stuck and backtrace will show where did it try to go into menu from
2026-01-16 11:11:36 +03:00
Alug b812d61da2 Merge branch 'crashissuereports' into Saturn-Next 2026-01-14 12:58:44 +01:00
indev 6fd64383d3 This isn't ceepeepee rn :SmolBuncle: 2026-01-12 22:33:30 +03:00
Alug e984e7a6c8 Merge branch 'menumodels' into Saturn-Next 2026-01-12 19:13:21 +01:00
Alug 96f90ff9c4 push back models even further
bigger models still had parts being culled, hope this is generous enough idk
2026-01-12 19:13:17 +01:00
Alug 51aec0e012 Merge branch 'menumodels' into Saturn-Next 2026-01-12 18:40:38 +01:00
Alug faadd3e89f support the uhhh localskin setup with 3d models 2026-01-12 18:40:00 +01:00
Alug 0c091256f4 tiny cleanup + warning fix 2026-01-12 18:30:11 +01:00
indev 7a0fb01626 Make glOrtho remap coordinates to vid.width and vid.height, this makes calculating coordinates in HWR_Draw2DModel easier 2026-01-12 18:30:08 +01:00
Alug c01818e2e3 simplify skinnum bounds check
lul
2026-01-12 18:30:06 +01:00
Alug e17a8a505c fix the culling issues
i hope this is right.......
2026-01-12 18:30:03 +01:00
indev ab654deba7 Make HWR_Draw2DModel not depend on resolution, make 3d skin select use skinselectspin cvar 2026-01-12 18:29:58 +01:00
Alug b145d7fd0e WIP: show 3d models in player setup
this is incredibly ugly and hacked together
theres some weird culling issues and shit doesent really "scale" with different resolutions which needs to be fixed
but it kinda works
2026-01-12 18:29:55 +01:00
Alug 264c9e38ad d_netfil: dont use zone memory in CURLGetFile 2026-01-11 19:46:46 +01:00
indev e88773da4e How did i miss the = 2026-01-11 13:08:23 +03:00
indev 310f67a06c Fix smol mistake in strcasestr 2026-01-11 03:49:07 +03:00
indev 0914d5b8e2 -Wzero-as-null-pointer-constant is valid for c only since GCC 15.2 (from what i see) 2026-01-11 00:49:48 +03:00
Alug 291a4dbb25 disable midnight channel border flicker with "reducevfx" 2026-01-09 13:01:30 +01:00
Alug 8fe3d13935 fix InitColorLUT 2026-01-09 11:08:22 +01:00
Alug bdc326b14e leveltime be tic_t
:chaosleep:
2026-01-08 00:43:43 +01:00
Alug d938e38ad3 Acessability: add basic "reducevfx" toggle to disable/reduce certain effects
toggles certain effects, which may be troublesome to some players

-disabled hyudoro flashing, instead makes player translucent
- Makes rainbow colour effects, such as invul, change colours very slowly
- Disables underwater and heatwave screen effects
- Disables palette flashing
- Disables vhs effect

not the most pretty implementation, but im lazy and this works

feel free to suggest more things
2026-01-08 00:40:24 +01:00
Alug 3d4772455b K_SpawnSparkleTrail: check for blend effect apply outside the loop
tiny optimization
2026-01-08 00:40:24 +01:00
Alug e1f0089627 enable "Wzero-as-null-pointer-constant", fix cases of it
prevent ambiguity
shoutout blankart for making me aware this exists
2026-01-08 00:40:24 +01:00
Alug edbebbf082 fix wrong type for K_DriftSparkColor
all the colour stuff is still a bit of a mess, but generally its handled as an uint8
2026-01-02 18:34:13 +01:00
Alug 242dee499d initialize more globals that have been missed 2026-01-02 18:34:10 +01:00
Alug a2de1e24c5 d_cliserv: fix casts from nan to int type
in few cases the files totalsize might be 0, which results in a nan, casting that to int type is undefined behavior
2025-12-28 17:46:44 +01:00
Alug c0cce90e60 properly handle getcwd error in IdentifyVersion
if getcwd fails, the buffer contents will be undefined
so we shall just overwrite it again with "."
2025-12-27 15:34:26 +01:00
Alug 67e74b5874 fix w_wad oopsie 2025-12-27 15:13:20 +01:00
Alug 9639ace28a fix dedicated server build warnings 2025-12-27 15:07:13 +01:00
Alug a2616778cc fix another -Wnull-dereference warning 2025-12-27 15:06:50 +01:00
Alug 495c34dd40 fix gcc version detection fallback stuff
latest_gcc_version should always just be X.x not X.x.x
this broke some warning flags for me
2025-12-27 13:02:30 +01:00
Alug f38ca9aa28 Signal Handler: Add button to report issues to github
mostly based on what srb2 does with some stuff from srb2-legacy
the button will attempt to open the issue page on the saturn git when a crash occurs
2025-12-27 12:41:41 +01:00
Alug b0bf588c27 fix some null pointer dereferences
and enable -Wnull-dereference by default
2025-12-27 10:52:21 +01:00
Alug 35e4f35f6e fix some shadowed variables, enable -Wshadow by default 2025-12-27 10:32:16 +01:00
LJ Sonic 7866b769cc Do not archive table values for nil keys 2025-12-27 00:00:39 +01:00
Alug 1af1e42dab FBO: remove nvidia xwayland hack
this has been a non issue since a while now, so can remove this (we shouldnt work around driver bugs anyways)
2025-12-26 23:20:42 +01:00
Alug 40bd3e5e19 simplify opengl vsync set 2025-12-26 23:20:39 +01:00
Alug 25dd3b4976 Revert "Fix static memory being re-tagged as purgable"
This reverts commit c544cf9a7c.
2025-12-26 21:44:58 +01:00
Alug 0fe3086a5a Fixup the doomednum lookup
properly match the old linear lookup by returning the FIRST match for doomednum
also shrinks the array, doomednum max is 4095, no need for such massive array, also fixed a off by
should fix some join desynchs and desynchs on certain maps
2025-12-26 18:58:41 +01:00
Alug c9afd4a2cd G_GetDemoDate: make safer and use static memory
bunch of smaller issues before, no real checks for strltol and potential free on a null pointer lul
also skips replays with shorter than 10 char names and handles errors better
2025-12-24 00:06:17 +01:00
indev 7518a6f181 Revert "Sort directories too in replay list"
This reverts commit 7c848f4be5.
2025-12-24 01:36:02 +03:00
indev 2bf4c44259 Revert "Actually add filepath to directories to sort them"
This reverts commit 1c95e5f40e.
2025-12-24 01:36:00 +03:00
indev 1c95e5f40e Actually add filepath to directories to sort them 2025-12-24 01:23:20 +03:00
indev 7c848f4be5 Sort directories too in replay list 2025-12-24 00:54:39 +03:00
Alug a4af254643 Revert "dont call I_Quit from within "quit_handler", let it signal main loop to quit"
This reverts commit a2feaa7fde.
2025-12-22 20:16:04 +01:00
Alug 860dc37fe4 Optimize: move a few strlen calls out of loops
when applicable and the input does not get modified within the loop
needs some testing incase i oversaw something
2025-12-18 19:13:47 +01:00
Alug 8b3d55fbc8 HWR_ProcessSeg: port softwares code to skip rendering inner sides that are "joined" to other fofs
This seems to improve performance on maps with moderate to lots of fofs quite a bit.
On maps with only a few fofs, this makes no difference or has very very little regression
Need to test and check if there are any visual errors, but so far everything seems good
2025-12-18 19:11:37 +01:00
Alug 0540b5656a OpenGL: keep around our drawnodes memory
no need to constantly reallocate new memory
we dont have renderer switch, and the next level will render drawnodes anyways
those wont grow super big also, so theres no big worry about wasting tons of memory
yes i like ceepeepee vectors, how can you tell
2025-12-18 19:11:26 +01:00
Alug 6c98440f27 Remove pure attribute from fasticmp
While i assume this to be fine currently, i quite frankly dont trust the srb2 codebase enough aswell as preventing any future issues if there should ever be need to switch locales, since toupper WILL change behaviour in such cases which does not qualify as pure
2025-12-16 17:52:13 +01:00
indev 3828a9f8e0 Add flipcammode toggle for using local flipcam settings instead of player flags 2025-12-11 22:58:45 +03:00
Alug 2c7c9ec32a fastcmp.h: mark fastcmp functions as pure
this might let the compiler optimize aways subsequent calls in some cases
strcmp etc from glibc also does it
prayin nothin changes the locale at runtime lmao
2025-12-11 20:28:31 +01:00
indev 1ccd3e37bc Init playerinfo[i].node to 255 so if playerinfo packet gets lost, server join screen doesn't display empty player names 2025-12-11 21:37:31 +03:00
Alug 6ad344f65d findfile: let files added with "-file" look in addon/downloads folders first
due to https://github.com/Indev450/SRB2Kart-Saturn/commit/956fc099adcd7f33993c43c8ee3aea64df3fe9b4
IWADS shouldnt use findfile anymore
If there should be such case we can always expose the startupiwad count to check if were currently searching for iwads iirc
2025-12-11 18:19:21 +01:00
indev 1c289d73ca Oopsie 2025-12-11 17:54:03 +03:00
indev 44ba69cf53 Move lite steer and turn smoothing cvars into individual player controls menu 2025-12-11 17:35:35 +03:00
indev 4cea0c1414 Add autoaccel into accessibility menu 2025-12-11 16:43:59 +03:00
Alug 4ee468f5c6 Accessability: Add "Auto Acceleration" feature
ported from hostmod
2025-12-11 14:27:09 +01:00
Alug 9a58eb3010 G_BuildLocalTiccmd: remove "moveinput" variable
checking both cmd->buttons aswell as cmd->driftturn already handles those cases
2025-12-11 14:27:06 +01:00
Alug 59ff5e61bf Revert "Fix use-after-free when mobj is removed while still playing sounds"
This reverts commit 3bdc745bd1.
2025-12-10 19:13:07 +01:00
Alug 821c061f82 Optimize: Use doomednum lookup also when (re)spawning mapthings
not just for loading savegame thinkers
Actually even provides slight runtime performance improvement, but mostly makes levelload faster
2025-12-10 18:22:34 +01:00
Gustaf Alhäll eb4d9bbdd5 Fix decompression warning when starting a server 2025-12-09 17:57:02 +01:00
Alug c19c80d797 command.c: fix "alias" command crashing when no aliases were registered
if we dont have aliases list how do we check the next alias in the list aswell?
2025-12-07 21:08:38 +01:00
Alug a2feaa7fde dont call I_Quit from within "quit_handler", let it signal main loop to quit
fixes an issue for me which led to having the game threads getting stuck when sending an interrupt signal to the game due to some thread issues with the sdl subsystems

shoutout to dsda doom for this
2025-12-07 20:27:57 +01:00
Alug 3cb4e86b48 i_system: "fix" recursive i_quit
well this still aint working all to great, but atleast this allows me to quit the game if it gets stuck without having to always send a kill signal to it

copy pasted from what the dedicated build does
2025-12-07 20:24:18 +01:00
Alug ed758fc921 g_demo: check for maplump existance directly
cant really rely on mapheaderinfo to tell us if some map exists or not
2025-12-07 20:23:57 +01:00
Alug a191c8b71e g_demo: screw you LF2_EXISTSHACK 2025-12-07 19:04:21 +01:00
Gustaf Alhäll 3f2e0bd349 Fix memory leak in AATree string trees 2025-12-06 19:40:54 +01:00
Gustaf Alhäll 3bdc745bd1 Fix use-after-free when mobj is removed while still playing sounds 2025-12-06 19:40:49 +01:00
Alug f578781418 put "string.c" earliest in sourcefile
otherwise Windows is unable to find nongnu_strcasestr
2025-12-06 15:45:45 +01:00
indev 0bb63ee0af Use size_t there 2025-12-06 17:34:05 +03:00
Alug 2ae9563ab3 Menu: fix camera options from within accessability options returning to the main menu
really wonky setup, but some other menus do similar things...
2025-12-05 19:13:01 +01:00
indev 6b429e4388 Add locatelump command 2025-12-05 20:35:48 +03:00
Alug 0321b0d94a m_menu: do some cleanup - replay drawers 2025-12-05 17:29:49 +01:00
Alug ac57b7fd2d Menu: show stats for current skin in Time Attack menu
+ some cleanup
2025-12-05 17:29:46 +01:00
Alug 7013e63142 Menus: dont advertise encore toggle if its not unlocked yet!
this wont do anything anyways besides telling you you havent unlocked it yet
so can just hide it
2025-12-05 17:29:43 +01:00
Alug 4e1ef7c0cd Revert "remove the wonky double tap input for controllers"
This reverts commit 9e2fd091a8.

causes some wonky issues still, will need to look into it more, but for now revert
2025-12-05 15:11:51 +01:00
Alug 892f2253ea p_spec: remove hardcoded animdefs table
srb2.srb includes an ANIMDEFS file which WILL override this anyways and includes any of these.
so no need to complicate the code with this
2025-12-05 14:58:19 +01:00
Alug bebe62346f fix Flat loading code passing non null terminated strings to W_CheckNumForName 2025-12-05 14:58:15 +01:00
indev 834a94e429 Ok i guess we still need old_z2 :ChonkBunckle: 2025-12-05 03:10:41 +03:00
indev fcf833ff48 Move ghost mobj old_x2 hack into P_SpawnGhostMobj to cover all cases where it would matter
ty lug <3
2025-12-05 03:10:41 +03:00
indev f2a27539d3 Experimental: remove mobj->old_x2, old_y2, etc fields 2025-12-05 03:10:41 +03:00
Alug 05d26654df p_user: do some tiny cleanups 2025-12-05 01:07:18 +01:00
Alug cee6a27340 mark debugfile with UNLIKELY
this is for debug, and esp network debug which barely anyone ever needs, so can tell compiler better branch hint
2025-12-05 01:07:14 +01:00
Alug 66e35a9d67 k_kart: slightly cleanup driftrelease code 2025-12-05 00:29:31 +01:00
indev ad096ccd42 Update LUASTUFF.md 2025-12-04 19:21:30 +03:00
Alug 7a9e81828a forgot to remove this oops 2025-12-04 15:41:20 +01:00
Alug 71e7dacb56 r_opengl: dont set directional light model shader uniforms if we dont use them 2025-12-04 01:26:43 +01:00
Alug f9c0ee865f make those ternaries a little prettier lul 2025-12-04 01:23:42 +01:00
Alug 154eaaf027 hw_main: cleanup and simplify HWR_RenderPolyObjectPlane 2025-12-04 01:23:39 +01:00
Alug 66f5f9b2a2 hw_main: handle implicit float conversion cases explicitly 2025-12-04 01:23:36 +01:00
Alug b27275b887 hw_batching: fix typo in non shader polygon comparitor
checked poly1 against poly1 sky
2025-12-03 18:15:30 +01:00
indev c81c2c1d8d Add option to show current song credits in pause menu 2025-12-03 15:47:38 +03:00
indev ccfab57a8c Add 'time per frame' argument for hud.setVoteBackground 2025-12-02 23:59:02 +03:00
Alug 56d1343f1b dont call CON_Drawer during frameskip, just call CON_MoveConsole instead
fixes the issue at hand, without making the console flicker in gifs
sigh....
2025-12-02 20:49:56 +01:00
indev b273bc3ca8 Hide localskins menus immediately when option is changed
@Alug :blobhug:
2025-12-02 22:12:49 +03:00
Alug d4f58a885b add toggle to let console prints show in main menus
if you want this for some reason
2025-12-02 20:07:56 +01:00
Alug 04458f18f8 m_menu: fix splitscreen players being unable to change the names from player setup
smol oversight :blobcatpats:
2025-12-02 19:43:05 +01:00
indev 64152eea0d Fix few possible multithreading bugs related to ReplayNamesLoadThread 2025-12-02 20:59:27 +03:00
indev 0e0a690e3c Print a warning when luaL_resourcetryagain force triggers garbage collector 2025-12-02 20:39:38 +03:00
Alug f283d3ca43 suppress wrong "-Warray-bounds" warning in G_DeviceLEDTick
newer gcc does this for whatever reason, its fine
splitscreen will never call this out of its bounds
2025-12-02 18:40:30 +01:00
Alug 982fff959f blua: attempt emergency garbo collection on file io operations if they fail
ports of
https://github.com/lua/lua/commit/e885dee5ab4dbee2457ee2023340e848fdabdef9

and

https://github.com/lua/lua/commit/3d838f635cc81ec3332f9a904992db1c6d8a46ad

prevents massive memory leaks and other issues due to faulty lua scripts
2025-12-02 18:31:32 +01:00
Alug b0e968e3c3 raise version number to 9.2 2025-12-02 15:54:53 +01:00
Alug e5bbb14ce0 replayhut: fix race condition in M_ResetDemoList freeing the demolist vars
in rare cases this could free the data the thread is currently using
so we gotta wait for it to finish first
2025-12-02 14:59:12 +01:00
Alug 327cca2e8e change freecam condition for awayview
shouldnt change the behavior much as we wont see anything without a camera, but this is explicit about what exactly is wanted (i.e. thiscam may be null, we only check due to null deref, we only care about if freecam is active)
2025-12-02 12:48:47 +01:00
Alug e02e9a12d7 ticcmd: replace magic numbers with constants
names lifted from RR
2025-12-02 12:48:43 +01:00
Alug 9e2fd091a8 remove the wonky double tap input for controllers
finally figured out what occasionally messed up my bound controls lol
why in the world is this even a thing for controllers??
2025-12-02 00:58:18 +01:00
Alug 0a04fca634 remove mlooky, rename mousesens to mousexsens, make mouse y sensitivity not be affected by x sensitivity
mlooky basically just took the place of mousey, which did nothing before, but is a better name
2025-12-02 00:55:59 +01:00
Alug 8a3f793324 g_input: init some globals that were missed 2025-12-02 00:43:27 +01:00
Alug e91892849c dont let splitplayers 3 and 4 input gamecontrols in the menu
oversight lul
2025-12-02 00:43:22 +01:00
Alug 6b4e3c9d13 update saturn credits
phew so every line now has two names
otherwise we cannot fit everything and anyone into this anymore
this even allowed to put back the tooltip at the bottom
i still want to redo the credits completely at some point with some cool stuff though
2025-12-01 23:41:27 +01:00
indev 5f55b81fbf Fix M_ClearMenus being called too early in map command func 2025-12-02 00:51:40 +03:00
Alug ca68bab002 fix more cases of dangerous PU_PATCH_LOWPRIORITY 2025-12-01 22:31:20 +01:00
Alug 339eb1879e fix the credits freeing our HUD item patches
goddamit i hate PU_PATCH_LOWPRIORITY
2025-12-01 22:24:42 +01:00
indev 1adb49c65c Fix emotes being slightly offset in chat log 2025-12-02 00:02:55 +03:00
Alug 1d33a05a85 Fix some Serverbrowser issues
- Fix serverlist results not being properly reset, which lead to reopening/refreshing the serverlist to show the old state, selecting one of those "old" servers then lead to just connecting to nothing
- Fix the resfresh button making servers disappear if hit too often too fast (from srb2)

https://codeberg.org/srb2classic/srb2classic/commit/3acc312923da0fe5e07c0517d9bff9e8b657b1eb
2025-12-01 21:57:57 +01:00
Alug cfcd20d44a G_AdjustViewEx and macro for G_AdjustView
neppy likes it more which is fair so we do this too
2025-12-01 21:08:30 +01:00
Alug 204607e272 replays: always check if map is loaded not just in old 1.0 replays
cause like, otherwise it will just I_Error which is worse lol
like this we just get thrown back to titlescreen
2025-12-01 21:03:57 +01:00
Alug b89a8ca6f9 replays: properly throw player back to titlescreen from replay error
fixes the game becoming stuck in limbo state if replay fails to start
2025-12-01 21:03:57 +01:00
indev d4aa352d59 Don't try to open replay if no replays are found 2025-12-01 22:49:36 +03:00
Alug c489841732 Fix record attack ghosts sometimes crashing
due to ghosts occasionally ending to early and game interpreting them as still valid uhhhhh
lets pray this wont explode or cause any weird issues......

credits to RR

REVERT THIS ONCE I GO AND FIXUP THE REPLAY MESS
2025-12-01 20:19:11 +01:00
Alug a6a97b4c4f add gdb_history to gitignore 2025-12-01 20:19:03 +01:00
indev fba070f82e Expose cameras to lua outside of hud hooks 2025-12-01 21:08:24 +03:00
Alug 10c117f95f dont reset freecam if the player you are "supposed to be watching" specs in replays
this aint pretty, but im too lazy to make it pretty sincerly
2025-12-01 18:23:51 +01:00
Alug bceda5beb4 dont force awayview when in freecam 2025-12-01 18:23:48 +01:00
Alug c50c936b1f remove hwr_shutdown call
honestly this didnt help with the issue i had, game should already release all the memory on quit anyways.
this just makes it take longer to quit
2025-11-30 20:28:46 +01:00
Alug 22a6be76b5 OpenGL: fix frustum culling not accounting for spritescales
also rename "this_scale" to "thing_scale" to be more descriptive

Fixes the comically large tree disappearing when it shouldnt on "Ethereal Crystal"
2025-11-30 14:47:02 +01:00
Alug d3d25df3c5 hw_main: cleanup HWR_RenderX stuff a bit 2025-11-30 14:46:30 +01:00
Alug 2a3f9e9ee6 hw_cache:rename some stuff
more in line with the rest of the code
2025-11-30 14:45:37 +01:00
Alug 31f01fd5da Revert "Provide our own SDL2 dll files"
This reverts commit 91530c61ad.

i hate windows, i hate sdl breaking with every single update
2025-11-30 14:37:00 +01:00
indev bb9a4a0da0 Add listemotes command, also fix few emote warnings not printing newlines 2025-11-30 00:36:36 +03:00
Alug 3bac722562 m_menu: cleanup gamepad menu stuff a little 2025-11-29 19:13:12 +01:00
Alug 3769ab74ac m_menu: move onchages back to m_menu, get rid of nextmap onchange hack 2025-11-29 19:07:01 +01:00
Alug c3d6cdd272 ensure modelMatrix is initialized 2025-11-29 14:26:08 +01:00
Alug 093602fd6b comment out unused dynslope member from levelinterpolator_t struct
this wont ever work with our thinkerless dynslopes
2025-11-29 14:26:05 +01:00
James R a80d119c58 Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
2025-11-28 18:23:25 +01:00
Alug 1cdc92a62b HWR_Precache: lookup for flats that already have been precached
yes i used c++ unordered_set here, yes i suck with linked lists, lol
maybe speeds this process up a little
2025-11-28 18:07:21 +01:00
Alug 6b8de308b7 HWR_Precache: check against gl_numtextures not numtextures
in practice those should mostly be the same but the variable is for gl so
2025-11-28 16:53:12 +01:00
Alug 310e64d8be OpenGL: add a little more checks during texture free
prob not necessary but feels better
2025-11-28 16:53:10 +01:00
Alug d2d3afc7f4 software: clip sprites that are out of view
similar to what the frustum cull does in opengl, clips sprites that are out of view in vertical direction
2025-11-27 22:53:12 +01:00
Alug c26d2faee9 OpenGL: fixup spherefrustum culling and use it for sprites
clips sprites that are out of our view, especially with precip this may lead to significant speedup in certain cases
huge thanks to indev for helping with this <3
huge thanks to dsda-doom for the maths needed!
2025-11-27 22:53:12 +01:00
Alug 1c82c338a5 sprite gzt is float in opengl render........ 2025-11-27 18:57:21 +01:00
Alug c81cd48552 R_ProjectSprite: move fakeflat clipping before light maths
so if applicable we have slightly less work
2025-11-27 17:43:40 +01:00
Alug 306f7d455e tiny optimizations k_kart 2025-11-27 17:43:36 +01:00
indev dc40befa88 Use I_GetTime for animated emotes, so anim argument in M_DrawEmote is not needed 2025-11-27 18:49:43 +03:00
Alug 2222272d6f remove more unused/uneeded things
- delet hw_dll
- remove sector_t ceilspeed and floorspeed
- remove a bunch of stuff from viewvars_s
2025-11-27 16:49:50 +01:00
Alug 1849d5aade R_ProjectSprite: make sprite clipping work with sloped fake floors/ceilings
from eternity engine
2025-11-27 16:49:47 +01:00
Alug 3878c2f72a DoAddLine: add fast check for lines with same front and back sectors without middle tex
taken from dsda-doom
2025-11-27 16:49:44 +01:00
Alug 7cf3bceaff HWR_Subsector: avoid calling HWR_AddSprites on already processed sectors 2025-11-27 16:49:41 +01:00
Alug 1e394b0530 pass frontsector ceiling z to R_Prep3DFloors
in both cases "R_Subsector" already got the frontsectors ceiling z, so no need to get it again within R_Prep3DFloors
should save some P_GetSectorCeilingZAt per frame
2025-11-27 16:49:38 +01:00
Alug b09660204a r_bsp: move polyobj renderside check into R_AddPolyObjects
uneeded within R_AddLine as outside R_AddPolyObjects this will never be called if currecnt seg is a polyseg
2025-11-27 16:49:35 +01:00
indev 7b4592377e Make emote search case insensetive (emotes themself still are case sensetive) 2025-11-27 18:40:52 +03:00
indev 45ba69a45a Discordify emotes a bit more :chonkbunckle:
- When autocompleting emote with enter, don't send it immediately
- Don't autocomplete after typing 1 character after : (allows text emotes like ":c")
2025-11-26 22:56:04 +03:00
indev 4d9c345202 Add support for emotes in console chat mode (and support for emotes in console in general) 2025-11-26 22:45:03 +03:00
Alug 0437952027 mark checkcoord as const 2025-11-26 10:09:55 +01:00
Alug d188839d0b move R_QuickCamDist to r_main
also mark it with PUREFUNC and R_QuickDist with FUNCMATH, so compiler may optimze it more agressively
2025-11-26 10:09:52 +01:00
Alug 86ac11f877 replace localangle assignments with P_ForceLocalAngle
just a little neater, there also was a function to force the player angle, but this most likely wouldve changed behavior
2025-11-25 22:53:30 +01:00
Alug 0f59e0e270 some mobj interp fixes
copy pasted from RR thx
2025-11-25 22:53:27 +01:00
Alug cd32270ec0 . W
:mompie:
2025-11-25 20:25:29 +01:00
Alug f2a7f9ccaa fix compile with HAVE_DISCORDRPC 2025-11-25 20:21:23 +01:00
Alug 2c2ffe36d7 init a few more globals that were missed
i love globals that are in the middle of files.....
2025-11-25 20:15:27 +01:00
Alug 951b880acb d_netcmd: use cleanup macro for map and localskin command
did Command_Map_f really leak memory all the time? lul
2025-11-25 19:19:19 +01:00
Alug ecfa973e6b move M_ResetDemoList hack to G_InitNew 2025-11-25 19:19:17 +01:00
Alug 749b87b4ca bring back addon name scroll that was lost
oopsie
2025-11-25 17:46:58 +01:00
Alug 7f671e4e30 clean and fixup addon menu
Hopefully should finally fix addons not showing as loaded sometimes and other issues with warning windows being unclosable, etc

lets pray this doesent cause any issues....

add a tickroutine for menus aswell, which will be called in M_Ticker

courtesy of Ring Racers
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/bc9f9d740a0262c249917a37e250ef0209185b12
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/8312f12d6cae934ae8de7e46da231c311f4b4fde
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/6e671d4894e56cd3af09d6e9af2635f030817361
2025-11-25 17:42:01 +01:00
indev ee0e4836f5 Fix race condition in server list search 2025-11-25 19:06:02 +03:00
Alug a01cd628ab do some more cleanup when shutting down graphics system
make sure we free all our opengl allocated stuff by calling HWR_Shutdown
make sure we also destroy our sdl texture, renderer and window if the exist
2025-11-25 16:38:19 +01:00
Alug 4a4e668d21 delet more unused/empty sdl stuff
I_WaitVBL, I_BeginRead and I_EndReada
2025-11-25 16:38:16 +01:00
Alug 03c579769c delet some duped declarations 2025-11-25 13:15:53 +01:00
Alug 2e88b6a1dd fix portal contents being culled erroneously also in software
also dont rember commenting those out in gl lul
2025-11-25 02:18:23 +01:00
Alug 5265b147f5 HWR_BlendMidtextureSurface: add extra guard to check linedef alpha 2025-11-24 22:42:53 +01:00
Alug b4a37a2fa4 fix performance regression in certain cases due to changed polygon order
wonky, needs testing as this may slow down other parts
2025-11-24 22:42:50 +01:00
Alug 93eb2b336d Dedicated: dont create or destroy ANY lua hud drawlist
not needed at all in dedi
2025-11-24 21:32:26 +01:00
Alug 30acdca9d3 cache SRB2BACK patch on startup
this is used in a bunch of places while being pretty small, so just cache it on start
2025-11-24 21:26:07 +01:00
Alug 677b34c174 dont free PU_PATCH_LOWPRIORITY patches in render_none
also dont cache them either!
simply not needed at all
so save us a little work
2025-11-24 21:16:17 +01:00
Alug b3be7bcedc Player Infoscreen: if availible, display player names in their skincolor
we hijack the playerinfo data field for this, and pray to the kart gods this is unused on the ms
2025-11-24 18:20:00 +01:00
Alug 19c10be76b R_QuickCamDist & R_QuickDist: turn into function and make it fixed point
since we mostly use it in fixed point maths, this just makes alot more sense
moving it into inline functions ensures that in C code this wont evaluate its arguments multiple times
2025-11-24 17:44:20 +01:00
Alug 60222f2f00 R_AllocateTextures: remove "reallocuser"
this just does... what Z_Realloc does anyways...
Z_Realloc already zeroes out the new memory it allocates
2025-11-24 17:44:16 +01:00
Alug 34edd0a2e3 some misc cleanups
also account for a few more double evluations from min/max macros
and save a few angle to fixed conversions in spb handling
2025-11-24 17:44:13 +01:00
Alug 46b485df14 Server Infoscreen: Show server kart speed instead of "Cheats"
effectively almost all servers will get flagges as having cheats enabled, so instead show the game speed
2025-11-24 16:57:50 +01:00
Alug 8d3632caca ensure all our savebuffers are initialized
just some safety
2025-11-24 03:16:50 +01:00
Alug b5ae9ba733 remove erronous P_RunDynamicSlopes call in P_PreTicker
we dont run preticker when we netjoin so.....
2025-11-24 01:03:44 +01:00
Alug 2a823ecd60 move K_KartPlayerHUDUpdate to k_hud
how tf did i miss that lul
2025-11-24 00:35:25 +01:00
Alug 940327210f p_setup: move interpolator reset into P_FreeLevelState 2025-11-24 00:35:23 +01:00
Alug 20a08df1e1 K_PlayerEffectsShouldBlend: also apply when player has invulnerability 2025-11-24 00:30:28 +01:00
Alug 4cf27d40e9 apply additive blending to ghosts aswell when using "playerblendeffects"
same conditions as the others
either be in sneakerboost, or go fast enough
2025-11-24 00:28:31 +01:00
Alug d18c9a257a remove erronous ";" 2025-11-24 00:15:59 +01:00
Alug 65dc5bb1fd dont free our titlescreen patches
ever...
Fixes a crash when you take ages on server join and timeout due to it.
2025-11-23 22:31:29 +01:00
Alug e18be33c91 F_IntroDrawer: remove "highres" variable
this was ALWAYS true anyways
2025-11-23 22:02:01 +01:00
Alug 9ad6751719 make Controller Rumble strength user changable
range from 0.25 to 4
to account for all types of controllers and such
base 1 was set around what felt good on my dualsense, not entirely sure if this is the best baseline to go with
otherwise it could still be adjusted
2025-11-23 18:49:40 +01:00
Alug 86ab994408 G_DeviceRumbleTick: get rid of magic numbers
use named constants instead
2025-11-23 18:01:30 +01:00
Alug 21f0d603c3 move gamepad led and rumble tickers into g_input
not entirely sure why i placed them in d_main and p_tick respectively
but they should be here
thx neppy for making me question this lul
2025-11-23 17:59:51 +01:00
Alug 971513e7d3 HWR_BlendMidtextureSurface: fix major performance regression
big oopsie from my side
this caused textures that werent translucent to be marked with translucent in a bunch of cases, which led to them being rendered in a slower path
2025-11-23 15:47:03 +01:00
indev 03929e551f emotes: change autocompletion behavior to work like console 2025-11-23 01:31:38 +03:00
Alug db5ae247b6 LoadMobjThinker: revert faulty local player check 2025-11-22 21:54:54 +01:00
Alug d46beab34e fix signed integer overflow in polygon hash calculation
also gives a speedup on some maps lul
2025-11-22 21:47:45 +01:00
Alug 9a794232d7 HWR_ProcessSeg: fix cliphigh overflow 2025-11-21 19:51:00 +01:00
Alug db635e5c5b K_GetScreenCoords: fix signed overflow
why even cast that to signed......
2025-11-21 19:41:46 +01:00
indev 8a105a9679 If there is only 1 emote suggestion and user presses enter, autocomplete emote 2025-11-21 20:39:33 +03:00
indev 46b968a351 Fix autocomplete messing up emote in few cases 2025-11-21 20:34:34 +03:00
indev a9836307b2 Allow suggesting emotes if currently typed part matches inside emote, not only at beginning 2025-11-21 20:16:19 +03:00
Alug b6515bb0ae fix Wimplicit-const-int-float-conversion warning 2025-11-21 15:16:39 +01:00
Alug b8257e9037 fix memoryleak when searching for iwads
I_LocateWad returns mallocd memory that needs to be freed
and our home search does not need a tmp ptr
just do as we did before and sprintf it into returnwadpath
also check home directory before the hardcoded lists like before (might speed up startup a little on nix)
also cleanup iwad search in dedi builds and apply everything there aswell
2025-11-21 14:47:13 +01:00
Alug 416a2565f9 hw_batching: use polygon hash signbit to detect skywalls/horizonlines
in comparepolygons
gives a nice little performance bump of around 10-15fps in heavy cases
2025-11-20 17:52:14 +01:00
Alug fa75ad4cdd r_opengl: smol micro optimizations
not much, mostly just avoiding redoing things
2025-11-20 17:52:10 +01:00
Alug cedddaadfc r_opengl: delet byte2float lookup
just do direct division
no performance difference at all, but gets rid of that huge ass table
2025-11-20 17:52:07 +01:00
Alug 43ec517cdd small fixes for gamepad indicator led stuff
- skincolors are uint8 type not uint16
- ensure desired colour is within skincolor range
- rename G_GetSkinColor to G_GetSkinColorForGamepad
- replace pointless array with single variable for current color in D_DeviceLEDTick
- remove pointless call to G_GetSkinColorForGamepad when hotplugging gamepads (G_SetPlayerGamepadIndicatorColor will call it itself when 0/skincolor_none is passed)
2025-11-19 23:38:29 +01:00
Alug 495ad5ce06 move this back oop 2025-11-19 22:44:38 +01:00
indev 31ce643311 Check if mobj was actually spawned before setting islocal 2025-11-19 22:07:55 +03:00
Alug b5c1f21ac1 mark all batching variables with static
they are only used within this file, no need to advertise them as global
2025-11-19 18:13:32 +01:00
Alug 86c1b2cbef simplify the vector buffer stuff
honestly doesent make that much sense in most cases to grow capacity * 2 (slightly misunderstood some stuff on implementation)
and in other cases dont need to manually check for resize
2025-11-19 18:12:20 +01:00
Alug ad828b8f4b reduce scope of some fps counter vars 2025-11-19 00:26:07 +01:00
Alug 5dda681c8a clean up some more render float maths
- dont use M_PIl in double or float maths
- dont use M_PI in float maths (use M_PIf)
- use tanf instead of tan
2025-11-19 00:26:03 +01:00
Alug 92df8ffe01 remove thread.h include, use "thread_local" for everything
we enforce c++ 17, thread_local is a c++11 extension, so this should work everywhere
2025-11-18 22:38:37 +01:00
Alug 2ee8dc09d1 fix opengl portals (and its contents) being culled in some cases they shouldnt be
we do culling per our viewmatrix since a while, which wasnt properly set up for portals beforehand and used whatever was last which was then incorrectly applied to portal culling :chaobaba:
2025-11-18 22:38:32 +01:00
Alug b8f9392efd delet I_UpdateNoBlit
this didnt do anything anymore
2025-11-18 22:38:30 +01:00
Alug 99f1166eb1 p_mobj: check for common mobjs first
players first, then kart items, shadows and then some srb2 things that are commonly used
makes more sense to check for all of those first everywhere, so we may skip a crapton of pointless checks in many cases
2025-11-18 16:23:27 +01:00
indev 7ab8bf1bbf Emotes: only print 'too many frames' warning if we actually get non-empty frame 2025-11-18 12:20:33 +03:00
Alug a994d7c050 G_DoPlayDemo: fix maybe unitialized warning
in this case this wouldve been fine, tho variables using the cleanup macro should always be initzialized for safety
2025-11-17 21:59:21 +01:00
Alug e46d548080 testing test 2025-11-17 20:23:58 +01:00
Alug 3a7108ecfa Merge branch 'Saturn' into Saturn-Next 2025-11-17 20:23:23 +01:00
Alug bcf876a4c4 Merge branch 'Saturn-Next' into Saturn 2025-11-17 17:52:31 +01:00
Alug 8ab15b73a9 raise version to 9.1 2025-11-17 17:05:19 +01:00
Alug 301d73a30e Merge pull request #213 from Indev450/revertsdl
Revert SDL2 to 2.28.5 and revert SDL_Mixer to 2.0.4
2025-11-17 17:26:20 +01:00
Alug 2ef4e7fcba Merge branch 'Saturn-Next' into revertsdl 2025-11-17 16:00:16 +01:00
Alug 7eb118920f SOCK_Get: recvfrom returning 0 still means its not a valid packet
0 lenght packets means, nothing
0 is still failure, just graceful, ignore that shit, those are not "valid" packets
2025-11-17 15:57:06 +01:00
Alug 2f0588355e remove old xcode stuff
apparently this does not work at all, and instead cmake can be used on macos
2025-11-17 04:56:58 +01:00
Alug 3e6830fc70 remove sdlsound, provide dummy sound instead
sdl sound was completely broken, so just provide a blank dummy interface instead, when compiling without sdl or mixer
2025-11-17 04:56:55 +01:00
Alug 2faf859e32 add mapicon packets to packettypename
so they properly show in the net debugfile
2025-11-17 04:56:15 +01:00
indev 8c31fd8a34 Allow searching for files inside luafiles 2025-11-17 03:15:23 +03:00
indev 4dd6d52550 Revert "Only skip exclude_paths if we're looking for addons (allows commands like exec find configs in luafiles)"
This reverts commit 8524465767.
Right, -file exists
2025-11-17 03:14:20 +03:00
indev 8524465767 Only skip exclude_paths if we're looking for addons (allows commands like exec find configs in luafiles) 2025-11-17 03:12:00 +03:00
Alug 91530c61ad Provide our own SDL2 dll files
this is plain 2.28.5 like before, but with a fix for the right ALT-GR key backported, so non US layouts can work properly
2025-11-16 22:22:14 +01:00
Alug 89f450db27 Revert "Simplify intermission timer code"
This reverts commit ed16c4fd9f.
2025-11-16 21:56:15 +01:00
Alug 3e212ebaad Revert "Simplify intermission timer code"
This reverts commit ed16c4fd9f.
2025-11-16 21:47:21 +01:00
Alug 14af9eb82a Revert "Merge pull request #204 from Indev450/updatesdl2again"
This reverts commit 38bfb58f78, reversing
changes made to 1fa50e12a8.
2025-11-16 21:20:31 +01:00
Alug ed5dbf74f4 Revert "Merge pull request #206 from Indev450/updatemixer"
This reverts commit ca3f40ddf1, reversing
changes made to 38bfb58f78.
2025-11-16 21:20:26 +01:00
Alug 2bf0a24ab6 Revert "comment out directsound thing"
This reverts commit 37cd720dd6.
2025-11-16 21:20:14 +01:00
Alug 88a9d6c29e Fix dedicated server build
forgor about I_HandleControllerHatRepeat
fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/212
2025-11-16 20:50:15 +01:00
Alug 335b7ba737 Fix dedicated server build
forgor about I_HandleControllerHatRepeat
fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/212
2025-11-16 20:50:09 +01:00
Alug 37cd720dd6 comment out directsound thing
somehow this still applied on 32 bit build
2025-11-16 19:58:17 +01:00
Alug a085abe538 remove "stun.c" from sourcefile
fixes linking on windoze
will need to handle this in cmake seperately!
2025-11-16 19:58:15 +01:00
Alug 57dc099641 Update README 2025-11-16 19:51:44 +01:00
Alug 84a3503262 comment out directsound thing
somehow this still applied on 32 bit build
2025-11-16 16:54:11 +01:00
Alug 5117bf1f85 remove "stun.c" from sourcefile
fixes linking on windoze
will need to handle this in cmake seperately!
2025-11-16 16:31:23 +01:00
Alug d4a29f2a44 this aint testing anymore :3 2025-11-16 17:18:23 +01:00
Alug 6129e7c864 Merge branch 'Saturn-Next' into Saturn 2025-11-16 17:02:58 +01:00
Alug 51371dce80 delet cv_birdmusic toggle
stuff was from ages ago, we can just check for the feature toggles instead
2025-11-16 15:27:59 +01:00
Alug 4814088265 mixer_sound/s_sound: remove all the pointless "else"
+ some tiny optimizations here and there
2025-11-16 15:27:56 +01:00
Alug 2344c391d2 Renderer: port some texture skewing fixes from SRB2
- ffloors on the frontsector in opengl now support texture skewing like software
- alot of cleanups, simplifycation and optimizations
2025-11-16 15:27:36 +01:00
Alug 105267612b git pls 2025-11-14 15:30:14 +01:00
Alug 69ef78b2e8 Merge branch 'fakeseed' into Saturn-Next 2025-11-14 15:29:38 +01:00
Alug f4349988c4 smol timing related changes
avoid mixing integer maths AFTER casting to float types, even though its all double this may lead to wonky precision issues
I_GetPrecisePrecision now also doesent always call SDL_GetPerformanceFrequency everytime, since its return value will never change since its solely dependant on the platform
and also removing some dead code
2025-11-14 15:12:54 +01:00
Alug 1b42131c6f remove md5 from sourcefile list
we handle it seperately both in make and cmake, having it here just breaks compile
2025-11-14 14:51:04 +01:00
indev c8db86379d Merge pull request #210 from Indev450/lua-check-local-addon
Automatically check if lua-spawned mobj comes from "addfilelocal addon" hook
2025-11-14 16:50:04 +03:00
Alug 40d2bf816c Merge pull request #207 from Indev450/controllerfixes
Some Controller fixes
2025-11-14 14:47:27 +01:00
Alug ca3f40ddf1 Merge pull request #206 from Indev450/updatemixer
Update sdl2_mixer to 2.8.1 for Windows
2025-11-14 14:47:16 +01:00
Alug 38bfb58f78 Merge pull request #204 from Indev450/updatesdl2again
Update SDL2 to 2.32.10 on Windows builds
2025-11-14 14:46:33 +01:00
Alug 1fa50e12a8 hw_main: some smoller optimizations
- use sqrtf for fade/tint alpha for shaderless light calc
- save recalcing the cosine/sine from angle on angled flats 3 times in HWR_RenderPlane
- precalc float "int32 min/max "
2025-11-14 13:31:57 +01:00
Alug f73e616b97 fail loudly if sdl window/renderer/gl context creation fails
this will crash eitherways, so much rather get atleast a somewhat more informative error
2025-11-14 12:35:45 +01:00
Alug fe0ade1d9c fix some shadowed variables 2025-11-14 06:00:52 +01:00
Alug 1fb60e8230 fix sourcefile for src dir 2025-11-13 19:54:09 +01:00
Alug efe7009650 PT_ReceivedGamestate: add missing SATURNPAK ifdef 2025-11-13 19:31:33 +01:00
Alug 19a4e379d7 HWR_DoWipe: always draw a black screen if it returns early
otherwise this just flashes like crazy should there ever be any issue here
2025-11-13 17:38:45 +01:00
Alug 4e8865d495 cleanup some wonky float/double maths 2025-11-13 17:38:43 +01:00
Alug dfca24b370 HWR_SkyDomeVertex: tiny optimization
save a tiny bit of float division, use float sin and cos functions, handle implicit float conversions
2025-11-13 16:45:57 +01:00
Alug a4c2fd2414 Merge branch 'Saturn-Next' into updatesdl2again 2025-11-12 19:22:07 +01:00
Alug aa985823ba speed up GL_SetPalette "take 2"
ensuring bytecolor is packed nd mypalettedata is initialized this seems to now work properly on windows
2025-11-12 19:20:43 +01:00
Alug b779c9e63d ensure byteColor_t is packed
make sure it is always sized 4 bytes and not padded at all since that is assumed to be the size
2025-11-12 19:04:39 +01:00
Alug c58e54544d initialize all remaining globals
well atleast all i can find lel
2025-11-12 16:49:44 +01:00
Alug c080fc8732 GL_UpdateTexture: fix small oversight
from when i refactored it
GL_TEXFMT_AP_88 needs to increment the image data ptr even if chromakeyed
2025-11-11 22:39:31 +01:00
Alug 24163a7c92 Merge branch 'Saturn-Next' into controllerfixes 2025-11-11 14:53:40 +01:00
Alug d934197246 git merge pls 2025-11-11 14:49:11 +01:00
Alug 76747b4677 git merge pls 2025-11-11 14:48:59 +01:00
Alug 5268fc2d19 Merge branch 'Saturn-Next' into fakeseed 2025-11-11 14:42:41 +01:00
Alug bcd54110d5 only call netkeepalive between calls during gl precache
this caused some crashes in blankart, hopefully this is fine though
2025-11-11 14:19:11 +01:00
Alug 83d538b16a gl_viewludsin/viewludcos is only needed for sprite billboarding
which is not needed with shearing
2025-11-11 14:19:08 +01:00
Alug 2a6a7e1d2b smol optimization R_NoEncore
reuse secspecial for invertencore check
2025-11-11 14:19:06 +01:00
Alug c977c4fc45 initialize most of our global variables
just to be safe, not really trusting the game at this point, maybe this helps with some obscure bugs or smth lel
2025-11-11 14:19:02 +01:00
Alug 87e0b55f01 fix windowmoved never resetting 2025-11-09 19:13:49 +01:00
Alug 54f5b5ebfb enable software cyan pixel "cutting" for flats by default 2025-11-08 12:30:58 +01:00
Alug b421893646 call NetKeepAlive during ogl precache
should prevent timeouts on slower systems (*cough* *cough* windoze *cough*) hopefully
thx neppy for the idea!
2025-11-07 21:28:45 +01:00
Alug 237aeb7834 use early returns for "I_Finish" stuff
i like that more, less checks for stuff
2025-11-07 21:28:42 +01:00
Alug 7dbd95d556 Merge pull request #208 from Indev450/deletglseg
Remove OpenGL adjusted "segs"
2025-11-06 21:03:38 +01:00
Alug 1e4ba39691 Merge pull request #209 from Indev450/gammastuff
Port RR´s gamma correction + split gamma and brightness
2025-11-06 21:02:37 +01:00
Alug a7805ae3f0 Merge branch 'Saturn-Next' into gammastuff 2025-11-06 21:01:49 +01:00
Alug 325338bfbf sound precache: add option to keep sounds cached but not precache them
ugh i suck so much at explaining
this is the default now pretty much
2025-11-06 20:41:07 +01:00
Alug 01a54e4d0b delete remaining M_Memcpy that were missed
those werent there in lugstuff branch oops lel
2025-11-06 19:15:59 +01:00
Alug e2df018e38 simplify srb2::floattofixed
my tired ass didnt think about just reusing shit kek
ty indev <3
2025-11-06 19:01:25 +01:00
indev 33b62cba33 Push empty string instead of null if len == 0 in lua_pushlstring 2025-11-06 20:44:29 +03:00
Alug 29b4f78b64 lib_concat: fix zero lenght string case
continue the loop, not return, it might just be an empty line, so returning might break some luas
0 lenght would make realloc allocate nothing at all, so just skip it
2025-11-06 18:44:36 +01:00
Alug bce18e3d61 delet M_Memcpy
was just a wrapper for memcpy eitherway
so should make no difference other than avoid any confusion
figured i could just use "sed" command lel
2025-11-06 17:37:19 +01:00
Alug e9c2b982c6 smol cleanup JoyAxis stuff & g_game 2025-11-06 17:37:15 +01:00
Alug 67e1793f49 software renderer: handle some float type related issues with slope drawers
there were a bunch of cases where inf and nan float results were casted and used with integer things, which is undefined in c

yes i did use ceepeepee for that crap, cause this wouldve been really annoying without templating
if someone really wants that crap to use outside ceepeepee, feel free to make a bunch of wrappers cause im too lazy for that stuff
2025-11-05 23:41:56 +01:00
Alug 80613a8a49 R_AllocClippingTables & R_AllocTextureColumnTables: fix nullptr arithmetic 2025-11-05 23:04:21 +01:00
Alug b017a72026 R_DrawPlanes: dont increment garbage ptr
does not need to be there at all eitherways
2025-11-05 23:04:18 +01:00
Alug a7c5254a32 set "-Wno-cast-qual" for clang
see comment
2025-11-05 23:04:15 +01:00
Alug 9dd1a47969 fix SINT8 write macro, fix big endian READUINT32 macro 2025-11-05 23:04:13 +01:00
Alug bbbd42e653 use "offsetof" for skydome vbo offsets
silences UBSAN complaining about accessing struct members through null ptr
2025-11-05 23:04:10 +01:00
Alug 2b7f2da5ee Mipmaps: fix translucent textures turning black
i.e. since we allow texture filtering on translucent textures now, the min filter may specifcy one of the mipmap filters, this means we NEED to call GL_GENERATE_MIPMAP and set the LODs for them, otherwise no texture will be generated
alternatively we could do a bunch of special cases for the mipmap filters, but this is simpler
2025-11-02 14:36:08 +01:00
Blue Staggo 23ba827726 Give midtextures filtering without ugly borders + Clean up padding code
Couldn't do proper translucent blending on midtextures because of wrapping.
2025-11-02 14:36:04 +01:00
Blue Staggo 326a28ec36 Oops, forgot to disable padding for nearest texture mode 2025-11-02 14:36:00 +01:00
Blue Staggo 19d6a1600e Optimise padding algorithm 2025-11-02 14:35:56 +01:00
Alug 3095303a4b Revert "simplify vhs effect interpolation"
This reverts commit e26fb91350.
2025-11-02 14:35:28 +01:00
Alug 2a1807422c Merge branch 'fastcmpstuff' into Saturn-Next 2025-11-01 23:45:22 +01:00
Alug 4676885521 fixup: replace stricmp with fasticmp
actually replace everything correctly
my dumbass forgor about the fast both strcmp and stricmp matter in sort stuff so we cannot use the fastcmp stuff there, which means we should not redifine stricmp as fasticmp in case something relies on that behaviour ugh
2025-11-01 23:45:06 +01:00
Alug 30cea37248 use npow2 screen textures if GL_ARB_texture_non_power_of_two is supported
apparently some gl drivers may use a slower path for streamed textures that only get partly updated, this tricks them into thinking this did a "full update" and resulting in using a faster renderpath
2025-11-01 23:42:35 +01:00
Alug 080d3c6b18 Merge branch 'luacvarfixes' into Saturn-Next 2025-11-01 23:38:39 +01:00
Alug df10855483 fix oopsie that broke name change 2025-11-01 23:15:38 +01:00
Alug dc6bf05f35 experiment: replace every strcasecmp with fasticmp
same as before, tho this is not twice as fast but atleast 1/3 faster
2025-11-01 23:15:26 +01:00
Alug 871545024d experiment: replace every strcmp with fastcmp
did some profiling and in basically every single test fastcmp was twice as fast as strcmp
maybe this speeds up some things
2025-11-01 23:15:21 +01:00
Alug aeb172f2ab do some smol cleanup r_skins
mostly style fixes, some minor caching for some things
2025-11-01 22:35:34 +01:00
James R ec757ceb2c Pass const pointer to all netxcmd handlers
Ensure buffer data is read-only and not modified by
handler
2025-11-01 21:21:06 +01:00
Alug e00783da82 fix stuff from merge conflict 2025-11-01 21:21:03 +01:00
toaster 52a9486974 Remove heinous pointer-sent-over-the-network hack remnants
This used to be used for `P_RelinkPointers()`, but was superseded by the far saner mobjnum. HOWEVER, its lingering effect was to leave `mobj->info` in an invalid state until a later `P_FinishMobjs()` was called. This is memory unsafety :D

After removing the last remnants of this ancient hack, it is now once again possible to connect to a server without crashing immediately. However, I did get a crash after a few seconds, so there is definitely still *something* nasty going on under the hood.
2025-11-01 21:20:58 +01:00
Alug 26b26b8f25 consolelib: fix some early returns not properly cleaning lua stack 2025-11-01 21:20:53 +01:00
James R 81f7335b05 Got_Luacmd: always read netxcmd data, even if command is not executed 2025-11-01 21:20:48 +01:00
Eidolon f603106ac8 Check Lua stack before pushing cons args
Prevents a Lua stack overrun when executing absurd console commands for
local-only lua commands.
2025-11-01 21:20:43 +01:00
James R 5675eefeb2 Got_Luacmd: ensure lua stack is large enough for command arguments 2025-11-01 21:20:39 +01:00
Monster Iestyn 1d0fb17da4 Fixes for lib_cvRegisterVar (the Lua version of CV_RegisterVar):
* Make sure the consvar's properties are all initialised to zeros as defaults
* Error if the consvar is not given a name
* Error if the consvar has CV_CALL but no call function
* Error if the consvar has CV_NOINIT but not CV_CALL
2025-11-01 21:20:31 +01:00
James R f53d37052a Replace LUA_PushLightUserdata with LUA_PushUserdata
See c92378fa and a7e20f70. I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.

I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2025-11-01 21:20:22 +01:00
Alug cae5e73d7d LUA_RawPushUserdata
"Same as LUA_PushUserdata but don't set a metatable yet."
from RR
2025-11-01 21:20:17 +01:00
Alug 4fccb48d2a fix wonky variable names 2025-11-01 20:58:04 +01:00
Alug 3e0150d4f3 remove auto/postload check variables
we can just check our counts since D_FindAddonsToAutoload will never be called again
2025-11-01 20:53:31 +01:00
Alug 7c1f17bb8d pass our file counts to W_InitMultipleFiles
smol opzimiation, skips some ptr deref
2025-11-01 20:49:03 +01:00
Alug c8ae4a89d9 throw motion blur effect stuff behind an ifdef
so we can get rid of the unused array
prob could just remove it at this point, but maybe ill fix it someday for the funnis
2025-11-01 20:08:36 +01:00
Alug 42b1f849c0 cleanup and optimize startup wad handling 2025-11-01 20:08:33 +01:00
Alug c0f24ebbbc postautoloaded can be static
not used outside of d_main
2025-11-01 20:08:30 +01:00
Alug de73c53665 optimize addon autoload handling 2025-11-01 20:08:25 +01:00
Alug 908e073628 removed unused autoload variables
M_ConnectMenuModChecks been checking an uninitialized bool the whole time Zzz...
2025-11-01 18:29:10 +01:00
Gustaf Alhäll eaee95a026 Add -workdir 2025-11-01 18:15:20 +01:00
Alug 456a380e3a HWR_PrecacheLevel: disable sprite precaching
in some cases this may lead to crashes, its mostly useless in gl eitherway due to how colourmapped sprites work
2025-11-01 16:32:27 +01:00
Alug c428472c6f dont precache anything ever in HWR_PrecacheLevel if disabled
before some cvar callbacks called this unconditionally
2025-11-01 16:32:19 +01:00
Alug feff5a7c17 make a toggle for using angleturn in replays
while this is more accurate to how the player experienced stuff in the actual game, this also can be somewhat jittery and stuttery depending on the net conditions the replay was recorded in, so make this toggable if someone wants it
2025-11-01 16:32:16 +01:00
Alug ae306351ba add cv_precachetextures to advanced video options 2025-11-01 16:32:13 +01:00
Alug 03de30df3e SV_StopServer: reset textcmdbuf
fixes an issue where in some rare cases, the game may get stuck in a weird limbo state due to the text command buffer being full and never be cleared, so net commands can never be executed
2025-11-01 03:01:40 +01:00
toaster e45c72f525 SV_StopServer: Use G_SetGamestate instead of a direct write
An apparent oversight identified while working on the previous commit.
2025-11-01 03:01:17 +01:00
Alug 36c43d89e6 GL encore: use struct for encore texture handling
struct with two sets of maptextures, one for normal another for encore textures
functionally identical, hopefully also performancewise
more explicit than doing this with just one set and indexing stuff :bloblcatpats:
2025-10-31 15:10:39 +01:00
Alug f34a47c50d HWR_PrecacheLevelFlats: only run flat encore case when having an "encoremap"
not when its just encore mode
might save some time on some maps, as we dont need to check for remapping
2025-10-31 15:10:32 +01:00
Alug 24895874ed UDP_Bind: check socket send buffer size aswell
if to small than adjust, like receive buffer
2025-10-30 18:04:04 +01:00
Gustaf Alhäll 129f88b6a7 Fix buffer underflow when querying invalid nodes 2025-10-30 18:03:47 +01:00
Alug cb5c4e482e SOCK_GetAddr: freeaddrinfo does not need to be called on getaddrinfo failure 2025-10-30 18:03:43 +01:00
Alug db2062ed1d some i_tcp fixes
- SOCK_Get return true when receiving good packet from a lan player
- SOCK_GetAddr fix handling of ipv6 addresses, so ipv6 servers can be found in the serverlist

taken from srb2/classic
2025-10-30 18:03:38 +01:00
Alug 45ee50b47d remove reduntant stuff from D_ClearState and G_StopDemo
we only need R_ExecuteSetViewSize from splitscreen_onchange, the rest doesent do anything due to SV_StopServer call earlier setting cl_mode to CL_ABORTED
SV_StopServer also calls Y_EndIntermission and Y_EndVote if necessary
2025-10-28 01:21:38 +01:00
Alug 694a8eeb69 P_TryMove: save one R_PointInSubsector call per player
by reusing the special sector calculated earlier, this didnt change for when its checked another time
also one fixedmul in P_SceneryTryMove in some cases
2025-10-28 00:50:02 +01:00
Alug 908bba2c8a rename subsector variable in P_TryCameraMove to be more descriptive 2025-10-28 00:49:58 +01:00
Alug 7325c8dbfd Merge branch 'Saturn-Next' into fakeseed 2025-10-28 00:02:35 +01:00
Alug 88363cf45d add NOHOLEPUNCH flag to disable holepunch entirely 2025-10-27 22:58:42 +01:00
Alug e5c18ae1f1 update ms listing if fakeseed was changed 2025-10-27 22:47:18 +01:00
Alug 4bb5b8fa04 add "Fake Seed" system
allow sending a fake player to the ms and serverbrowser when your dedicated server is empty
effectively functioning as a "seed" player without manual intervention and occupieng a server slot
2025-10-27 22:24:21 +01:00
Alug 509e7140e3 use strlcpy for filling playerinfo names
MAXPLAYERNAME+1 so it copies 21 and null terminates the last
2025-10-27 21:21:39 +01:00
Alug 056f919bbe DrawTiltedSpan: more micro optimize
- do pointerdiff outside the loops, no need to do them 16 times per span
- cache tiltilighting and planezlight, mark as const and restrict
2025-10-27 00:56:21 +01:00
Alug 548cad76b2 drawspan: some type fixes, mark const and reordering 2025-10-26 14:05:12 +01:00
Alug 95d8864faa fix software hiding the wrong thing in video options 2025-10-26 02:19:35 +01:00
Alug e26fb91350 simplify vhs effect interpolation 2025-10-25 22:32:58 +02:00
Alug da67f6feb8 rename most "gamma" vars to "brightness"
lots of confusion
but it does more brightness adjustment than gamma adjustments, yes this does some gamma correction but not user changable global gamma adjustments like globalgamma
uhhh
2025-10-25 22:21:37 +02:00
Alug 8cc73bc482 Port RR´s gamma correction + split gamma and brightness
port of https://gitlab.com/kart-krew-dev/ring-racers/-/commit/e27506c660933e19dbcfe9ec776caf7819952e30
not cherry picked since it differs too much it would be hellish to untangle (sry!)
Gamma is split from brightness since both do somewhat different things in the context here
2025-10-25 22:21:19 +02:00
Alug 28685ea658 fix some tooltips issues, wording and inconsistencies
fbo also now supports from gl 2.1
2025-10-25 20:39:01 +02:00
Alug a69df8807d fix some messed up whitespaces lel 2025-10-24 21:57:57 +02:00
Alug d4a130f1dc remove those memsets
not needed anymore now
2025-10-24 18:40:29 +02:00
Alug 8ccf4eb9ba this can be alot smoler 2025-10-24 18:40:25 +02:00
Alug cdb7b6fede initialize input events to something 2025-10-24 18:40:21 +02:00
Alug fcae072625 refactor controller dpad menu repeat handling
dont hack around manually checking for state checks
just use sdl provided stuff and poll if a dpad button currently is being held
2025-10-24 18:40:18 +02:00
Alug 26fc417555 forgor about localskin menu
Zzz....
2025-10-24 16:09:53 +02:00
Alug bb3dd435f0 oop didnt mean to move this 2025-10-24 15:49:40 +02:00
indev 16a531272f Skip repeating backslashes in HU_DoCEcho when printing to console 2025-10-24 16:36:50 +03:00
Alug ba5b79e48a dont double print kitchen sink message to log
we already handle this in HU_DoCEcho
2025-10-24 15:37:11 +02:00
Alug 59470ddbd4 fix oob access in D_SetupVote
check if luamaps was set before
2025-10-24 15:37:08 +02:00
Alug 82c4191516 Revert "SDLSetMode: render immediately after resolution change to avoid 1-frame of texture presented at wrong size"
This reverts commit 0e2ffdeb1d.
2025-10-24 04:09:43 +02:00
Alug 8a305d3c79 move those to D_ClearState 2025-10-24 03:47:59 +02:00
Alug 7c507c7b3b do some cleanup g_demo
:shook:
use the CLEANUP macro everywhere
init some things that may not be initialized
and make this more readable
lets hope didnt break anything Zzz...
TODO: if there are still issues with demo records and stuff crashing might consider porting some of the fixes from RR
2025-10-24 03:44:56 +02:00
Alug ca27dad6c1 use D_ClearState in G_StopDemo
actually fixes issues with crashes AND palette reset
also resets a bunch of more stuff which def is good
2025-10-24 03:44:53 +02:00
Alug 383d55cac6 smol cleanup V_DrawVhsEffect
dont need to assign all the software stuff in gl mode
2025-10-24 03:37:45 +02:00
James R. 0e2ffdeb1d SDLSetMode: render immediately after resolution change to avoid 1-frame of texture presented at wrong size 2025-10-24 01:55:20 +02:00
Alug b84d101337 initialize sdl window,renderer and texture to something 2025-10-24 01:55:17 +02:00
indev eb04271c83 Actually try to do this with hooks 2025-10-23 22:52:03 +03:00
Alug 852aa74d62 random style fixes and stuff 2025-10-23 21:01:20 +02:00
Alug aa06459c09 set special case for console key when using native keyboard input
ALWAYS make sure that remains in the same physical place
otherwise things might get very annoying
it already does so with my german layout
2025-10-23 21:01:20 +02:00
indev 54e7ad571e Check if mobj is spawned from local addon in most of lua_baselib functions related to mobjs 2025-10-23 22:00:46 +03:00
Alug 1d3dae01e9 set SDL_HINT_AUTO_UPDATE_SENSORS hint to 0
we dont need any of that so disable it
2025-10-23 20:58:01 +02:00
Alug 736a626ccf init joyinfo in I_InitJoystick 2025-10-23 20:57:58 +02:00
Alug a4cc8b0585 keep track of joystick instance index
means we dont constantly need to refetch it
needs testing on windoze
2025-10-23 20:57:55 +02:00
Alug 333c94be52 clean up controller dpad input handling
just treat them as "normal" buttons instead of manually polling for them
alot cleaner and gets rid of yet another polling loop
also clean up some other stuff
needs to be tested with multiple controllers in splitscreen but cba to do that atm
2025-10-23 20:57:52 +02:00
Alug 92ec4e65c1 update sdl2_mixer to 2.8.1
since we use wasapi now we can finally update this to 2.8.1 hopefully without any regressions now
2025-10-23 20:57:24 +02:00
Alug a3e97b90f6 dont force directsound for sdl versions from 2.26.5 on windows
directsound is deprecated since 13 years!
superseeded by wasapi
2.26.5 sdl brought some major improvements to resampling which fixes the issues this aimed to work around, but instead this workaround caused a plethora of issues, like breaking loops in some cases or the votescreen music
2025-10-23 20:57:21 +02:00
Alug c07502bf5a use strl instead of strn stuff to copy cecho text
ALOT safer than whatever this did before
2025-10-23 20:51:24 +02:00
Alug f751161693 fix CECHO text being overwritten with nothing
strlcat not strlcpy
2025-10-23 20:37:57 +02:00
toaster ed16c4fd9f Simplify intermission timer code
- We had two ways of ending the intermission, but only one would actually be used, and it resulted in code duplication.
- Combine the two ways.
- Disable the reached-but-didn't-do-anything-before-now code path for setting endtic.
2025-10-22 23:08:43 +02:00
Alug 41407538d4 cleanup + optimizations mixer_sound
thx indev for the better ms rounding code <3
2025-10-22 22:53:14 +02:00
Alug 5f394cd938 handle more memory allocation failure cases
reported with -Wformat-overflow
2025-10-22 16:02:35 +02:00
Alug e5bae89d0f fix namescrollbuf and mapmusic.name copies
ensure those are properly null terminated
as reported by ubsan
2025-10-22 15:34:43 +02:00
Alug f749800276 fix playersetup skin speen reading out of bounds
reported by ubsan
2025-10-22 15:34:40 +02:00
Alug 5289027272 uninline ctf resynch stuff
this wont ever be used and just makes lto and others complain occasionally (maybe frenmod uses ctf? forgor)
2025-10-22 15:34:38 +02:00
Alug 77f4d4ef3b fix replays occasionally crashing when stopping
due to R_ReInitColormaps our extra_colormaps pointer may be freed
so ensure it only gets called after gamestate has been set to GS_NULL so we dont risk doing this mid renderframe
fixes crashes in software and palette render mode
2025-10-22 13:48:56 +02:00
AJ Martinez a94740f5e9 Fix unsteady camera movement in demos 2025-10-22 13:44:32 +02:00
toaster ab27090ecf Don't send a netxcmd when using addfile outside of netgame
Was supposed to be happening already, but `multiplayer` is a useless variable...
2025-10-22 11:32:49 +02:00
Alug 93d0106c28 remove erronous ";" 2025-10-22 11:32:46 +02:00
Alug 27433f6fb5 call R_SetupFreelook in R_ExecuteSetViewSize
to instantly update our now stale yslope pointer!
fixes random crashes when switching numbers of splitviews in replays
2025-10-21 19:26:31 +02:00
Alug f8e5049d76 fix R_MakeSpans accessing "spanstart" out of bounds when in splitscreen
it gets allocated for viewheight not vid.height!
2025-10-21 19:26:27 +02:00
Alug 2009cdeaeb init few more things 2025-10-21 18:36:05 +02:00
Alug 0f43f19b71 remove unused maskdraw_t struct 2025-10-21 18:01:03 +02:00
Alug 1ac7852bd2 initialize a bunch of stuff that gets passed to realloc 2025-10-21 17:52:21 +02:00
indev f5e7b65ae0 Fix replay names not displaying if you have more than INT16_MAX replays 2025-10-21 17:11:45 +03:00
Alug 4c5d34e82c Revert "Fix ghost hitlist causing zone errors (closes #118)"
This reverts commit ab13b28106.
2025-10-21 16:09:02 +02:00
Alug 0dad927c05 fix 4th player background not drawin in gl in 3 player splitscreen 2025-10-21 15:42:33 +02:00
Alug f231417465 fix splitscreen view in gl 2025-10-21 15:27:05 +02:00
Alug 51b8dc9101 m_menu: add textinput special case for playername string
itself it already checks to not write out of bounds, this is mostly just to fix visual issues
kind hacky, but works for now
2025-10-21 14:45:10 +02:00
Alug 71e9c4f5af use "viewssnum" for shadowdir stuff 2025-10-21 14:34:33 +02:00
Alug 1acae3e4af use malloc for spawnstate mapdata copies
they might be somewhat large and get completely overwritten eitherway so save us the 0 init
2025-10-21 14:34:30 +02:00
Alug 4c04d09d18 rename 2025-10-21 14:34:28 +02:00
indev b99cd88947 Fix possible buffer overflow in M_TextInputSetString when string length is greatter than buffer length 2025-10-21 01:46:39 +03:00
Alug 4a786449c4 fix NIGHTS hoop hoopcenter
fixes visual issues when going through them
2025-10-20 19:48:28 +02:00
Alug aef6dcdbc9 handle ceepeepee 2025-10-20 19:25:41 +02:00
Alug 0e9ec096c2 slightly clean up makefile
- pass "-g" on mingw builds generally after everything (needs testing)
-use "libs" instead of "LDFLAGS" (identical purpose)
- pass "mno-ms-bitfields" on gcc, shouldnt be really needed but just in case
2025-10-20 17:02:36 +01:00
Alug 50ce3c4431 R_FlushQuad: dont use 64bit/8byte copy on 32bit targets
on 32bit targets this will just compile into two 32bit copies which gcc cant optimize as well as it can with the byte copy (it seems to love to do some AVX stuff atleast in my tests)
so this is only useful for 64bit capable platforms (compiler does not seem to do 64bit copys for the byte copy case, so this ends up being faster)
2025-10-20 16:32:48 +02:00
Alug c6c1dbd066 R_FlushQuad: also check "source" for alignment 2025-10-20 16:17:01 +02:00
Alug ece8d9e80c R_FlushQuad: fix column flush on odd width resolutions 2025-10-20 00:56:30 +02:00
Alug fdcbd276e9 remove unessecaary template branch in R_DrawColumnPixel 2025-10-19 23:07:21 +02:00
Alug 6d77672ee3 no need to pass anything to R_InitViewBuffer 2025-10-19 22:19:20 +02:00
Alug 28aec6cad5 add USEUBSAN compiler flag
to compile with ubsan duh
2025-10-19 21:59:39 +02:00
Alug 1f028f523e R_FlushQuad: fix unaligned memory access 2025-10-19 21:59:35 +02:00
Alug 349bf06e4b macrofy column function definitions 2025-10-19 21:59:32 +02:00
Alug e044db73f5 those should be initialised to something 2025-10-19 21:59:29 +02:00
Alug 7555d689db clear our column buffer after allocation 2025-10-19 21:59:27 +02:00
Alug a6438da531 use spawn sector and line tags for P_ReloadSaveLevelData
should speed up resynch a little, now that we properly save them
2025-10-18 23:11:00 +02:00
Alug 8c6893cff6 init taglists in P_LoadMapData
no reason to init them in P_SpawnSpecials
fixes join crashes on some maps
2025-10-18 23:04:25 +02:00
Alug af03b51191 add guard to vid.screens free
not super necessary but better safe than sorry
2025-10-18 21:34:23 +02:00
Alug 178d8b7b53 fix demo_slug compiler warning
Zzz....
2025-10-18 16:15:19 +02:00
NepDisk de99a3036d Update Discord RPC
Based on some of the changes from RR.
Accounts for the fact discord does not have tags anymore and makes skin code easier to manage
2025-10-18 16:15:17 +02:00
NepDisk 5c613f6c8f Use a constant for file path stuff 2025-10-18 16:15:14 +02:00
James R 59628377fa Resize menudemo_t filepath to fix -Wformat-truncation 2025-10-18 16:15:11 +02:00
Alug 278f3c3ef6 turnsmoothing splitscreen player support
i hate our menus Zzz....
2025-10-17 09:24:33 +02:00
Alug 3ba1596976 change wheel input "sensitivity"
200 maps perfectly to our turn values
so the wheel now actually better reflects the inputs and does not turn fully super early uhh
2025-10-16 23:15:42 +02:00
Alug 02f6fa0665 HACK: call texture precache when toggling a setting that flushes opengl textures
workaround for batching sort issues
should be good eitherway to reduce stutters after toggling them
2025-10-16 22:21:37 +02:00
Alug f4aec1d591 port "Lite Steer" from RR
took me a while to realize RR makes everything go though "analogue" input handlers
2025-10-16 21:53:40 +02:00
Alug 5c2a87dea6 fix off by one when playing with controller sticks
also simplify driftturn handling
2025-10-16 21:53:37 +02:00
Alug 6f17ed0883 Merge branch 'Saturn-Next' into updatesdl2again 2025-10-16 15:07:54 +01:00
Alug d5aa9ae0f1 fix 32bit windoze compile
again......
2025-10-16 15:07:35 +01:00
indev 6096822cbb Use str.resize(size) instead of str = str.substr(0, size) (ty lug <3) 2025-10-16 15:16:23 +03:00
Alug 0030367649 fix UB in R_PointOnSide
by not shifting a 32bit int by 31 bits
this is more in line with the original function eitherways
2025-10-16 14:08:30 +02:00
Alug 66f67c91e8 G_SaveDemo: fix oob reads/writes for replay names
demo.titlename has a size of 65! not 128!
also handles memory failure and checks bounds for the remaining lenght in the demo slug
2025-10-16 14:01:02 +02:00
Alug c73c1af2d5 let replays with empty name save
this does not crash for us
2025-10-16 14:00:57 +02:00
toaster 638e95325a G_SaveDemo: Resolve memory errors that could result in crashes
- Empty `demo.titlename` case
    - Don't try to save demo of name `.lmp`
    - Doesn't fall back to anything, because emptying out the name field can be reasonably treated as not wanting to save
- `demo.titlename` consists only of invalid characters
    - Don't try to save demo of name `-.lmp`
    - Falls back to the default demo title, because the user clearly wanted to save and just happened to provide invalid text
2025-10-16 14:00:55 +02:00
Alug 66ce745e91 add allocation failure case in R_DrawMasked 2025-10-16 14:00:51 +02:00
Alug 2b39d137b4 guard against null string in stringwidth functions
hud drawlists may actually pass null to them
2025-10-16 14:00:48 +02:00
Alug 1ed616dcef pass rover directly to check_fof_offscreen 2025-10-16 14:00:45 +02:00
indev 24ef2819b0 Merge pull request #205 from Indev450/dsdacol
Software Renderer: Implement Column buffering system
2025-10-15 21:52:45 +03:00
Alug a9732e9564 Merge branch 'Saturn-Next' into dsdacol 2025-10-15 20:51:47 +02:00
Alug c262d3f532 prevent potential 0 division in CV_AddValue
as repoted by clang-tidy
2025-10-15 20:41:57 +02:00
Alug ae456fee31 force inline savegame archive stuff 2025-10-15 17:05:05 +02:00
LJ Sonic 68f69049d4 Fix incorrect error message during Lua archiving 2025-10-15 17:05:02 +02:00
LJ Sonic e180918e48 Do not archive nil table keys 2025-10-15 17:04:59 +02:00
Alam Ed Arias 951c090b35 set CURLOPT_MAXREDIRS to 30 2025-10-15 17:04:55 +02:00
Gustaf Alhäll a87e07155a Remove WINSOCK1 support
WINSOCK2 has been supported since Windows XP and is required for IPv6,
so I don't see a reason to support it anymore.
2025-10-15 17:04:52 +02:00
Alug da16ce3a23 mark flush error functions with noreturn
silences clang
2025-10-15 06:28:54 +02:00
Alug 64bdae5e5d delet dead code ogl models 2025-10-15 06:16:46 +02:00
Alug 4f91a0b234 remove dead renderer code
remove
- broken viewborder code (if we really want it back for some reason, we should rather port RR´s fixed version of it)
- remove console clipping code for software (this was broken eiherway)
- remove hud message clearing stuff
- remove renderscreen and linesize variables (they just pointed to vid.screen and vid.widht)
2025-10-15 06:16:46 +02:00
Alug bb0a59540f use stdlibs abs for CompareDrawNodePlanes
we dont need our own abs for this
2025-10-15 06:16:46 +02:00
Alug dd9d6de0d6 delet gl_viewwidth, gl_viewheight, gl_baseviewwindowx, gl_baseviewwindowy gl_basewindowcenterx, gl_basewindowcentery
they were effectively unused
2025-10-15 06:16:46 +02:00
Alug 3de4c7cbad Merge branch 'Saturn-Next' into dsdacol 2025-10-14 23:14:24 +02:00
Alug 0eeacaf51e remove dead renderer code
remove
- broken viewborder code (if we really want it back for some reason, we should rather port RR´s fixed version of it)
- remove console clipping code for software (this was broken eiherway)
- remove hud message clearing stuff
- remove renderscreen and linesize variables (they just pointed to vid.screen and vid.widht)
2025-10-14 23:14:07 +02:00
Alug a4684b3004 use stdlibs abs for CompareDrawNodePlanes
we dont need our own abs for this
2025-10-14 23:13:52 +02:00
Alug 9c014eb2ea delet gl_viewwidth, gl_viewheight, gl_baseviewwindowx, gl_baseviewwindowy gl_basewindowcenterx, gl_basewindowcentery
they were effectively unused
the last two werent ever even initialized to anything, using HWR_DrawViewBorder wouldve crashed
2025-10-14 23:13:49 +02:00
Alug 37579187cc remove dead renderer code
remove
- broken viewborder code (if we really want it back for some reason, we should rather port RR´s fixed version of it)
- remove console clipping code for software (this was broken eiherway)
- remove hud message clearing stuff
- remove renderscreen and linesize variables (they just pointed to vid.screen and vid.widht)
2025-10-14 23:13:39 +02:00
Alug af8ce028ba use stdlibs abs for CompareDrawNodePlanes
we dont need our own abs for this
2025-10-14 23:12:50 +02:00
Alug 9310a68cff delet gl_viewwidth, gl_viewheight, gl_baseviewwindowx, gl_baseviewwindowy gl_basewindowcenterx, gl_basewindowcentery
they were effectively unused
the last two werent ever even initialized to anything, using HWR_DrawViewBorder wouldve crashed
2025-10-14 23:12:47 +02:00
Hanicef 89b8121282 Fix vertical aim being off when using lack of perspective 2025-10-14 22:28:18 +02:00
Alug b2260bbebb move R_SetColumnContext call
we set this later to flush eitherway for non skybox draw
2025-10-13 21:27:43 +02:00
Alug 6a9aea4dd1 use std::vector for our image buffers
this is just to have it cleaner and less code bloat
the resizing loop will almost never trigger, 1meg is enough to even rotate gigantamax eevee without needing to grow
2025-10-13 19:20:40 +02:00
Eidolon 6f4dfb35fa Calculate staging buffer maximum size in Picture_Convert 2025-10-13 19:20:37 +02:00
Alug 459b2e62ce oops missed this case 2025-10-12 23:12:26 +02:00
Alug 5765f3df5a this does not need marked as restrict 2025-10-12 22:30:25 +02:00
Alug 8488da4b1a smol style adjustment span stuff 2025-10-12 22:11:39 +02:00
Alug c82495f48b tiny optimization span drawers
if we dont "ripple" our spans, we dont need to increment an additional pointer for them
2025-10-12 22:11:36 +02:00
Alug f55b8793ec Merge branch 'Saturn-Next' into dsdacol 2025-10-12 22:11:23 +02:00
Alug b0b048c703 move "newview sky" check before skyplane loop
saves us some pointless work going through all planes if we dont need to draw the sky
2025-10-10 23:37:20 +02:00
Alug b7f1a0b631 speed up masked sprites a bit
thx eternity engine!
2025-10-10 22:33:04 +02:00
Alug 02d6fccfa9 Merge remote-tracking branch 'origin/Saturn-Next' into updatesdl2again 2025-10-10 16:40:05 +01:00
Alug 513613d83b dont update hud during skipped frames
this was to fix issues with some lua huds looking really bad during frameskip
but this causes issues with the hud flashing during gif recording
2025-10-09 19:13:09 +02:00
Alug f2afc5135c fix buffer overflows in dedi build too 2025-10-09 18:17:09 +02:00
K J 3783e30a8a fix: multiple additional buffer overruns
found by Zwip-Zwap_Zapony
2025-10-09 18:11:59 +02:00
Alug ff80a34627 unnest fsp counter and ping display stuff 2025-10-09 18:01:27 +02:00
Alug 38c96d5ec2 Merge branch 'Saturn-Next' into dsdacol 2025-10-08 21:38:26 +02:00
Alug 2ec467f062 check with "__SIZEOF_POINTER__" 2025-10-08 21:38:20 +02:00
Alug b3106d55d1 inline R_ThingLightLevel
just points to thing->lightlevel field eitherway
2025-10-08 21:38:17 +02:00
Alug 90c3d02dbf ensure columnbuffer gets flushed during portal traversal
in worst case this does nothing btw
2025-10-08 20:46:37 +02:00
Alug 48dc5461cd cleanup column flusher stuff
- properly make use of templates!, reduce code dupe
- inline the "DrawPixel" stuff
- use local "const" pointers everywhere
2025-10-08 16:50:17 +02:00
Alug 0843a586f8 fuckit, lets buffer 8 columns instead of 4
improves performance across the board on my ryzen 5600 cpu
between 10 -15fps + in best case and around 5fps+ in worst case
will need to check how this affects older cpus and 32bit builds since we do 64bit copies now
(if needed can always add 32bit specific code)
effectively, we also reduce the amount of flushing needed in many cases, writing more things at once during flushes
2025-10-08 16:47:54 +02:00
Alug 8c8f96cf49 force flush our column buffer directly after bsp traversal (again)
TODO: actually check what portals do
2025-10-08 16:47:54 +02:00
Alug 55afe9be7e update copyright header for draw flush stuff 2025-10-08 16:47:54 +02:00
Alug fe54f2fba2 add Column drawer context switching
reasoning explained in screen.c
effectively, there are cases where drawing our columns directly to the screen is the better choice
2025-10-08 16:47:54 +02:00
Alug b12989f51c lessen our manual column buffer resetting
not really needed
2025-10-08 16:47:54 +02:00
Alug 57990100c5 speed up masked sprites a bit
thx eternity engine!
2025-10-08 16:47:54 +02:00
Alug 32504b9e8e speed up Opague quad flush
from eternity engine
2025-10-08 16:47:54 +02:00
Alug ba3404d823 cleanup + type fixes 2025-10-08 16:47:54 +02:00
Alug c9f50ca0c8 sizeof(UINT8) is 1 lel 2025-10-08 16:47:54 +02:00
Alug b6943ce92e can check on compile if sizeof int == 4
can prob remove it alltogether we dont support 16 bit cpus kek
2025-10-08 16:47:54 +02:00
Alug 41b78feef5 remove R_GetColumnTranslucent 2025-10-08 16:47:54 +02:00
Alug c9b6276a02 merge sky column drawer back
lets hope this is safe lulul
2025-10-08 16:47:54 +02:00
Alug 39a5165d91 reset our column buffer directly after bsp traversal
we do not need to wait for sky draw since the sky gets instantly drawn
2025-10-08 16:47:54 +02:00
Alug e5a03dc3bb fix translucency being only half as translucent
oops lmao didnt notice in all of this doom uses the inverse of our blendlevels kek
2025-10-08 16:47:54 +02:00
Alug 4deebf8912 translucency is handled on the flush side! 2025-10-08 16:47:54 +02:00
Alug fa8901f6b0 fix ColumnFlushType enum 2025-10-08 16:47:54 +02:00
Alug 23512f0a6c align our tempbuf 2025-10-08 16:47:54 +02:00
Alug b44548b7ac dedupe those a bit 2025-10-08 16:47:54 +02:00
Alug 955812bd8d template the flush functions 2025-10-08 16:47:54 +02:00
indev e4ac394d29 Fix DC_COLORMAP and DC_TRANSMAP column drawers always using DC_COLORMAP|DC_TRANSMAP func 2025-10-08 16:47:54 +02:00
Alug 2b6185d7d6 reenable colormapped / translucent columns 2025-10-08 16:47:54 +02:00
Alug 2753052ee7 fix FlushColumns being called without being initialized
aack
2025-10-08 16:47:54 +02:00
Alug 3c9292c137 reorder column flush functions
also add some comments that used to be in drawcolumn X)
2025-10-08 16:47:54 +02:00
Alug e68136de3e remove tempbuf resolution limit
by allocating it dynamically per our actual screen resolution
2025-10-08 16:47:54 +02:00
Alug e852c23441 move the temp columndata into a struct
TODO:dynamic allocate our temporary screen buffer
2025-10-08 16:47:54 +02:00
Alug 031e8ee477 WIP: column buffering/flushing system
it "works" so far no performance improvement
everything but fully opague columns dont work for now until fixed
really messy and needs to be templated when working

from prboom & eternity engine
2025-10-08 16:47:54 +02:00
indev d7422b8ec9 Don't I_Error in W_InitFileError, that causes dedicated servers to bootloop 2025-10-06 17:44:47 +03:00
James R 0bbd8246cc Read only header bytes when creating textures list
R_LoadTextures was reading in the entirety of every
texture lump, now it only reads the 8 byte PNG header.
This saved more than 1 second for me (1.68 s -> 0.24 s).

PNG still need to be read in entirely to check their
dimensions; I didn't bother looking into optimizing it
since we don't have many PNG textures right now.
2025-10-05 20:59:40 +02:00
Alug 9e8ddd5f9e add a print to Joinable_OnChange
also change the other cvar messages to CONS_NOTICE
2025-10-05 20:39:09 +02:00
indev 3964d4e188 Always initialize all column offsets inside multi-patch textures 2025-10-05 21:12:46 +03:00
Alug 005af4362e remove unused W_LumpLenghtPwad call from R_GenerateTexture 2025-10-05 20:11:05 +02:00
Alug f817676033 fix uninitialized "i" counter in R_StoreWallRange 2025-10-05 20:10:49 +02:00
Alug 79140b3bdc fix oopsie in R_GenerateTexture 2025-10-05 20:10:46 +02:00
Alug 48722ef591 fix oob access in CV_AddValue and M_CanShowLevelInList
lets hope this doesent break anything Zzz....
2025-10-05 20:10:42 +02:00
Alug 6be5478fa8 dont free levelstate in D_ClearState
Titledemos be damned!
2025-10-05 20:10:36 +02:00
James R 953d9d15d6 Clear g_dc each frame
I was running into a memcpy of overlapping memory regions
in R_RenderMaskedSegRange.

- This is because of the reallocation of lightlists, which
  uses Z_Frame_Alloc.
- The memory pool that Z_Frame_Alloc draws from is cleared
  each frame.
- g_dc was not cleared though, so when the lightlists were
  reallocated, it'd try to copy from invalidated pointers.
- Access to invalid pointers within the memory pool does
  not cause a segfault directly (because the memory pool
  is allocated once). However, a memcpy involving such an
  invalid pointer leads to overlap, which may cause memory
  corruption.
2025-10-05 20:10:33 +02:00
Alug 0c56755e09 fix R_MarkSegBounds 2025-10-05 20:10:30 +02:00
Lactozilla c166075754 Don't generate textures in R_GetColumn 2025-10-05 20:10:27 +02:00
Alug 90ff1c4fc0 small fixups for r_segs 2025-10-05 20:10:23 +02:00
Alug 1d0fedddfd add bounds check to R_GetLinedefTransTable 2025-10-05 20:10:20 +02:00
Alug f5b60c3f36 port "Use separate table for maskedtexturecol"
from: https://git.do.srb2.org/STJr/SRB2/-/commit/97311dc5b00ab232a6e898c085c20d2f6bdbfa3b

~~cherry-picking this would be horrendous sry~~
2025-10-05 20:10:16 +02:00
Alug 78ad3e9710 some fixes for texture generation
- Fix negative y offsets for both normal and y-flipped patches
- simplify column wrapping/nonpow2 handling
- Single-patch textures: print an error if patch header is missing, cease memory errors

sadly does not fix our invalid columns we get occasionally
2025-10-05 20:10:13 +02:00
Alug b03d5c53ed simplify titledlighting stuff for span drawers
- use a std::vector for the tiltlightbufffer, only for easier checking if it needs to be resized from resolution change
- move stuff into its own function
- simplify R_CalcTiltedLighting
no functional change, no performance improvement, just looks neater
2025-10-04 22:05:07 +02:00
indev c5dce0e785 oops 2025-10-04 17:25:39 +03:00
indev f85c7ef961 Copyleft :3 2025-10-04 17:25:03 +03:00
Alug 0ceaca4b2f Merge branch 'Saturn-Next' into updatesdl2again 2025-10-03 22:43:29 +01:00
Alug 4d211f8f82 Merge branch 'updatelibbacktrace' into Saturn-Next 2025-10-03 22:42:28 +01:00
Alug 8d3435291b fix windows compile 2025-10-03 22:41:02 +01:00
Alug 8f007155cd update libbacktrace (win x64) 2025-10-03 21:36:49 +01:00
Alug af9fa77501 update SDL2 to 2.32.10
Fixes keyboard input issues for certain languages when using the "native" keyboard input setting
probably fixes some other issues aswell
needs regression testing
2025-10-03 21:29:26 +01:00
Alug 58a38ac6c4 add "SATURN_TESTING" define
currently to hide the commit string from titlescreen on release builds
could be used for other crap
wish could use comptime to autogenerate this, but it runs after compile & linking
2025-10-03 16:40:31 +02:00
Alug 1e1dbfc450 oops all include guards 2025-10-03 16:39:51 +02:00
Alug 2eac9fc295 tiny cleanup p_map
also save a little division and abs
2025-10-03 16:39:48 +02:00
Alug 21920112ee a thousand curses upon you polyobjects! 2025-10-02 18:37:18 +02:00
Alug 9b7bf5e7d8 Merge remote-tracking branch 'origin/Saturn-Next' into deletglseg 2025-10-02 18:00:59 +02:00
indev 4416be2ddc Merge pull request #203 from Indev450/curl-cli-args
CURL cli args
2025-10-02 19:00:29 +03:00
Alug 524168b20b experiment: remove opengl adjusted segs
in theory this should improve levelload times and reduce memory usage?
gotta see if it really does, visually so far there seems to be no difference at all
2025-10-02 17:57:52 +02:00
indev 10b52c11ac Add -curl-proxy and -curl-header CLI arguments
-curl-proxy will set proxy used by curl for masterserver requests and
http downloads

-curl-header can receive multiple arguments (like -file), and can either
edit, replace or remove headers from http requests
(srb2kart -curl-header "New-Header: Some Value" "Accept: */*" "User-Agent:"
In this example, New-Header will be added, Accept header will be edited
and User-Agent header will be removed)
2025-10-02 18:57:33 +03:00
Alug db732bd1bd fix non polyvertex path for horizonlines
this was a typo all along, i somehow assumed its just like that, but its not kek
2025-10-02 17:34:51 +02:00
Alug 146d4da72c use floats for calculating ticratescaled
this does not need to be double lel
actually improves performance in some cases
2025-10-02 17:34:51 +02:00
indev 20c570c97c Fix sector sound origin not working (mobj_t wasn't consistent with degenmobj_t) 2025-10-02 16:48:58 +03:00
Alug e550edb93e smol micro optimizations hw_main
- dont check for polyflags (rendersides) inside HWR_Addline, move to HWR_AddPolyObjectSegs
- save some sector checks by assigning pointer HWR_RenderPlane
- check for numpolys instead of numPolyObjects in HWR_Subsector (will only be "true" if theres polyobjs in currently traversed subsector instead of when polyobjs are generally on the map)
2025-10-02 15:10:46 +02:00
Alug fac4d3c2c0 add toggle for frameskip
just in case someone wants to toggle that off for some reason
2025-10-01 14:20:37 +02:00
Alug 7d2bcbd1ee cleanup some stuff w_wad & filesrch
mostly delet some "dead" code
use pathisdirectory for filebrowser to declutter code
properly declare FUNCNORETURN and ATTRNORETURN for some quit functions
2025-10-01 14:20:34 +02:00
Alug f3bbb5af56 ensure ALL savebuffers use Zone memory
fixes a crash when sending an uncompressed save to clients
2025-09-30 22:07:34 +02:00
Alug 8e8ef04860 delet BUGTRAP
psure this never worked anyways
2025-09-30 19:40:24 +02:00
Alug 98b105c02a delet CLIENT_LOADINGSCREEN 2025-09-30 19:35:29 +02:00
Alug ccdb73f861 delet VANILLAJOINNEXTROUND 2025-09-30 19:35:26 +02:00
Alug 9cb150b8eb delet NONET 2025-09-30 19:35:23 +02:00
Alug e6af82f450 delet JOININGAME 2025-09-30 19:35:21 +02:00
Alug 7400eeac2a fix dedicated build compile 2025-09-30 17:27:42 +02:00
Alug 2656a87e46 Signal handler improvements
- Move the backtrace and signal stuff into one "block" in both i_system files
- print the current platform into the crashlog
- dedupe code a little
- make crash messages slightly more understandable
- handle more signals (if they exist)

mostly taken from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2732
2025-09-30 17:27:33 +02:00
Alug 202e24c69c fix precip not propely accounting for moving fofs (again)
was fixed a while ago, then i broke it again due to performance concerns
now we only update this twice a seconds, and its only for the currently rendered precipmobjs
lets see how it performs
2025-09-29 20:14:36 +02:00
Alug c7d78fe948 only recalc precipfloor twice a second 2025-09-29 20:13:48 +02:00
Alug f381239825 smol changes R_ProjectSprite
- remove oldthing (idk what that was even for)
- properly account for localskins
- save a few FixedMuls during clipping
2025-09-29 13:43:33 +02:00
Alug 394beb7533 rename this 2025-09-29 13:43:30 +02:00
Alug 2ea1ac9331 qs22j: handle cases with (0 or 1) elements to sort
avoid undefined behaviour and return early
if we only have 1 element we can skip all the crap since we dont need to sort anyways
2025-09-28 22:51:35 +02:00
Alug 34f8181e56 dont draw the leveltitle card for each splitscreen player
they just overlap since they draw in the very same place
2025-09-28 21:40:07 +02:00
GenericHeroGuy ab13b28106 Fix ghost hitlist causing zone errors (closes #118)
Beware the wrath of PU_LEVEL
2025-09-28 16:36:55 +02:00
Alug 7e5019bd36 handle D_AutoloadFile better
only malloc stuff if we need it mallocd
2025-09-28 16:29:04 +02:00
Alug 423ca0eca0 redo native keyboard handling
instead of like, constantly checking stuff each frame
Now we check whenever we change the menu entry or open/close the chat or console instead and set sdl textinput mode directly and accordingly no more weird hacking around
this is similar to how srb2classic handles it, just a bit simplified (i dont wanna touch anything menu related if it can be avoided lmao)
this hopefully should resolve any weird remaining issues (lets hope i didnt miss some wonky edge case ugghhh)
TODO: update sdl2 lib on windows to fix issues on sdl side with certain layouts
2025-09-28 16:15:16 +02:00
Alug 939354f483 port over most fixes from srb2classics clang-tidy pr
mostly taken from https://codeberg.org/srb2classic/srb2classic/pulls/156
manually done to ensure we only port things that are guaranteed to not cause any potential desynchs
we should probably run this ourselves sometimes aswell
2025-09-28 16:14:56 +02:00
Alug 418ee2ce5f remove localfile from wadfile struct
this was a leftover from localskins
we check for the "important" flag instead
2025-09-28 09:09:53 +02:00
Alug 934184a006 revert localfile check hack in CL_CheckFiles
this was added ages ago and broke server joining with actual modifieng addons that were not added locally
W_InitFile should already handle this and mark local addons not as important, which would skip those checks eitherway
atleast thats what im hoping
2025-09-28 09:09:50 +02:00
Alug e94ef8d9c3 handle W_VerifyNMUSlumps error in W_InitFile 2025-09-28 09:09:48 +02:00
Alug ba985248ea fix crash when theres no minimap patch
fall back to the "inaccurate" calc from before, so automap may still work
2025-09-27 20:30:34 +02:00
Alug 65bd06aae5 fix some potential leaks 2025-09-27 18:16:23 +02:00
Alug 2434acf825 change comment for PU_PATCH_ROTATED 2025-09-27 16:35:19 +02:00
Alug b85a718500 merge vid dupx and dupy
they always contained the same value, so just remove it
2025-09-27 16:32:40 +02:00
Alug a0e023527c move the "video" stuff in i_video
so its mostly together in the file
2025-09-27 16:32:16 +02:00
Alug a6dce95eca delet vid.buffer
unused memory allocation
2025-09-27 16:30:33 +02:00
Alug f05ac73df6 cache this stuff
slight sprites optimization
2025-09-27 16:30:30 +02:00
Alug c90fe4627b handle rotated patch img buffer allocations better
just always initally allocate it with 1mb size, this is enough for just about everything including gigantamax eevee
if thats not enough, just double our capacity until it fits what we need
this way we save effectively reallocating 99% of the time
this prob can be used for out imgbuf in r_patch, but that needs it allocation size be handled a little differently
2025-09-27 01:44:52 +02:00
Alug 0efedae2c3 remove vid.rowbytes
it was just vid.width lel
2025-09-27 00:30:33 +02:00
Alug a6d6c03a58 fix compiler warning 2025-09-27 00:30:22 +02:00
GenericHeroGuy 2d5664b54a Fix VID_BlitLinearScreen's SSE version ignoring width (closes #128) 2025-09-27 00:30:19 +02:00
Alug a25b3f6e59 oops lmfao this got lost by accident
fixes models kek
2025-09-26 21:41:04 +02:00
Alug 9edcbe22f4 delet apng support
this never really worked so get rid of it
2025-09-26 20:13:51 +02:00
Alug 8f4385c39b fix windoze compile 2025-09-26 17:46:59 +01:00
Alug e383b0885d use uintptr_t to fix compiler warning (srb2classic change) 2025-09-26 15:53:29 +02:00
Alug adcd62ed59 merge GL_ReadScreenTexture and GL_ReadScreenFinalTexture 2025-09-26 15:53:26 +02:00
Gustaf Alhäll 7cdf69c6a1 Fix compiler warning 2025-09-26 15:53:23 +02:00
GenericHeroGuy ee12d25a8f Fix GIF recording at 1x resolution, and stop recording on resolution change
Simplifies the framebuffer management and eliminates the memcpy per frame
2025-09-26 15:53:20 +02:00
GenericHeroGuy 881c9f8e43 Remove GetTexImage stuff 2025-09-26 15:53:17 +02:00
GenericHeroGuy b1ac9f94cd (WIP) Rewrite screen capture code for GIFs
Downscaling is now performed during screen capture instead of GIF writing
This may or may not make GIF recording faster?
Maybe it would be faster if I knew how OpenGL worked...
Regardless, the m*th in the GIF code is gone, fixing the high/odd res issues

Also includes a little deduped hardware code, and GL 4.3 debugging code
2025-09-26 15:53:13 +02:00
Alug 9ab4d01b8c Update README.md
mention dlls just in case
2025-09-25 23:02:26 +02:00
Alug 7378ca8479 Update README.md 2025-09-25 22:39:36 +02:00
Alug a87a7ccbda delet circleci too
non functional psure
2025-09-25 22:00:03 +02:00
Alug 4a5449905b cleanup broken/old stuff
TODO: fix cmake
2025-09-25 21:35:22 +02:00
Alam Ed Arias 3c8bdd7862 SDL2: use SDL_GetSystemRAM() to get total RAM 2025-09-25 16:09:41 +02:00
Alug 9b26f1fdcb make the game fail loud if some critical gl function cant be loaded
also add safety to the portal stencil stuff, if that fails.
everything gl2.0 and newer is not critical and will just prevent some effects from working so that does not need to error loudly
TODO: perhaps actually port renderer switching so this instead will fallback to software if smth fails this late during gl initalization
2025-09-25 16:09:41 +02:00
Alug 76560f4179 enable fbo prints for ogllog file 2025-09-25 16:06:42 +02:00
Alug f48fdda3f3 fixup STATIC_OPENGL
probably should handle the fbo stuff a bit differently
not sure tho in which context STATIC_OPENGL may be ever used though
2025-09-25 16:06:39 +02:00
Alug 2c73593fcd ensure "rawconv" is nulled before reuse
otherwise there might be some leftovers from earlier calls
2025-09-25 03:44:24 +02:00
Alam Ed Arias 4613ec48b3 curl: add code to check the output of curl_multi_*() 2025-09-25 03:14:39 +02:00
Alam Ed Arias 3269b62225 curl: add code to check the output of curl_easy_*() 2025-09-25 03:14:36 +02:00
Alug 7e8f6d759c add missing dummy makefile
dont think this compiles though
2025-09-25 00:29:32 +01:00
Alug 75cfd382f6 fix compile without HAVE_THREADS
we dont have gammacorrectedpalette
2025-09-25 00:29:05 +01:00
Alug e524d3edab remove erronous win_main.h include
this doesent exist since ages anymore lel
2025-09-25 00:25:25 +01:00
Alug 8c9fb9f146 kill off MSVC support completely
delet michealsoft
psure this was broken since quite a long time, now since we use quite a bunch of GNU extensions (and actually rely on the cleanup attribute), supporting this in any way is just too much, so remove everything to declutter the codebase
2025-09-24 21:23:58 +02:00
Alug ff2fc6170d avoid constant reallocations for patch rotation
instead keep our buffers, resize em on need
improves perf a bit
maybe will be changed to free on levelload not sure, depends on how much memory this will allocate
2025-09-24 15:39:21 +01:00
Alug f27cb0ba8f allocate imgbuf for "to patch" conversions only if needed
should save around 64 megs on dedis
2025-09-24 15:39:21 +01:00
Alug 58705fb184 cleanup w_wad again
- add pfree for CLEANUP macro
- use CLEANUP everywhere applicable
- delet duped code
- make directory signatures static and const at file scope
2025-09-24 17:22:09 +02:00
Alug 487b71f82c ensure Addfile filehandle will always be properly closed
TODO: probs could reuse this function in more places where filehandles are used
2025-09-24 00:00:54 +02:00
GenericHeroGuy 2b1b4544f9 Introducing: __attribute__((__cleanup__))
I don't wanna hear about MSVC... or C++...
This fixes NUMEROUS memory leaks introduced by G_ReadDemoHeader,
which I was utterly oblivious to up until an hour ago
2025-09-23 23:57:54 +02:00
Alug af1507b530 fix md5checks breaking for pk3s 2025-09-23 20:23:00 +02:00
Alug a193604d0f revert minimap bounds calculation back to vanilla karts (fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/201) 2025-09-23 20:22:58 +02:00
Alug e359c8dcd0 port blankarts GLDEBUGMESSAGE stuff
credits GenericHeroGuy
switched to use CON_LogMessage for now, since console print functions may die during startup
2025-09-23 00:13:03 +02:00
Alug f0d2685a60 keep some stuff for screentextures
prevent reinit, stack allocations and such
most of these never change and are readonly
this might slightly speedup rendering, though prob negligble
2025-09-22 23:59:55 +02:00
Alug f3de6c15eb force disable fbo if it fails to create 2025-09-22 23:47:44 +02:00
Alug 53cea0a835 move fbo stuff to a better place in r_opengl 2025-09-22 23:44:44 +02:00
Alug 4b4d038ac8 cleanup fbo stuff a bit 2025-09-22 23:38:11 +02:00
Alug 9ba305eb77 add backwards compat support for ogl 2.1 fbo extensions
this should allow older gpus to use the feature aswell, not super clean but seems to work
TODO: refactor this whole crap, switch to seperate read and draw to use blitting and make this multisampling compatible so we can get rid of the messy "downsample" code and have this active by default
2025-09-22 23:37:30 +02:00
Alug fcadd03607 add back toggle for mouse cursor visability behaviour 2025-09-20 18:51:55 +02:00
Alug e1ad48ec16 always interpolate weather when using interpolation
same here, a fix, not a feature
2025-09-20 18:08:12 +02:00
Alug fbb77e8428 always account for mobjscale in precip
this is a fix not some feature honestly
2025-09-20 18:08:09 +02:00
Alug 72c05fae77 add gba RR check for software cyan cut 2025-09-20 17:57:47 +02:00
Alug 8867dc959e dedupe and cleanup nights hoops spawn
most of the actual spawn is split into P_SpawnNiGHTSHoop, which takes arguments to determine if to spawn just a hoop or its collision detectors
(if you wonder why this takes a mobj pointer to pointer is due to collision detector need the former hoops last mobj to link into)
- also actually fixes midgame join crash (hoop hnext was directly nulled instead of using p_settarget)
- added some extra safety checks
- reduced the amounts of r_pointinsubsector calls for things that used to go through this function
2025-09-20 16:36:19 +02:00
Alug e9fc57b97d move saltyhop stuff into seperate struct
no functional change, just as little cleaner lookin
+ reduce size by using stdbools boolean
2025-09-20 16:34:35 +02:00
Alug 7c490de93e delet metal sonic replay code
massively cluttered the demo code
hope this aint used for some super obscure thing
guess we´ll see
2025-09-20 16:34:17 +02:00
Alug 3c85295622 fix most implicit float > double conversions 2025-09-19 13:48:51 +02:00
Alug bdeb7e5e9d fix potential leak in protocol registering 2025-09-19 13:48:47 +02:00
Alug 2e766a7e16 fix potential NULL deref of string in lua chatprint lib functions 2025-09-19 13:48:44 +02:00
Alug 9bab3d5795 fix some potential leaks in M_DrawSplitText 2025-09-19 13:48:40 +02:00
Alug 1015800483 delet some double defined things 2025-09-19 13:48:38 +02:00
indev c4149e26e8 Oops there's 1 more 2025-09-19 02:10:44 +03:00
indev 602e4df5b9 Fix smol oversight :3 2025-09-19 02:06:05 +03:00
Alug 9be5780597 rename "ffloor" global to "visffloor"
prevent name conflicts with a bunch of local variables named "ffloor"
2025-09-18 21:08:41 +02:00
Alug 363f4c56f4 dedupe map replacement checks
the actual checks are in P_CheckMapReplacements
2025-09-18 18:20:26 +02:00
Alug 9ca21f1fb4 simplify startup map checks a little 2025-09-18 16:41:07 +02:00
Alug 826183ce2a skip checking for replaced maps on start if no extra wads are loaded
~~technically this also should be done for autoload~~
2025-09-18 16:41:03 +02:00
Alug ec41a7152c remove erronous errors
W_InitFileError from within W_InitMultipleFiles will handle this
2025-09-18 16:41:01 +02:00
Alug 4e394951bc allow freecam to work with first person 2025-09-18 12:16:27 +02:00
Alug 837f74f28a simplify startedInFreePlay check 2025-09-18 10:51:33 +02:00
Alug fb02389922 use P_SetupCamera for P_MoveCameraToSpawn
also modify P_SetupCamera to always just move the camera to the playerstarts
2025-09-18 10:51:33 +02:00
Alug f12f5b8bd1 delet P_Initsecnode
empty function now
2025-09-18 10:51:33 +02:00
Alug 20a3f4b6f3 only check cyan floor hack on flats that contain cyan
there was the remap loop that would already check this for us, so we can save a few calls to W_CheckNameForNum and memcmp
2025-09-18 10:51:33 +02:00
Alug f1ca991041 make static, cleanup and delet dead code hw_cache 2025-09-18 10:51:33 +02:00
Alug 83df870bb5 change version string 2025-09-17 23:44:02 +02:00
Alug 8e56998c9a Merge pull request #200 from Indev450/Saturn-Testing
merge testing into next branch
2025-09-17 22:42:47 +01:00
Alug 43e5f694bc Merge pull request #181 from chromaticpipe/dynamicdelay
GIF dynamic delay
2025-09-17 22:42:20 +01:00
Alug 9197a50c5b Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 23:41:41 +02:00
Alug 40fb4da2e8 Merge pull request #198 from Indev450/servericonpack
port Map icon packet from srb2classic
2025-09-17 22:40:57 +01:00
Alug f458fdbebe Merge pull request #195 from Indev450/texhash
Do not reload every texture when adding a wad
2025-09-17 22:40:53 +01:00
Alug 069f8bc009 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 23:37:42 +02:00
Alug a9f579d949 move replay replayhut list free and reset into M_ResetDemoList
use it to free demolists from within levelload when you switched maps out of a replay
2025-09-17 23:32:34 +02:00
Alug 7b0b2d8cd7 Merge pull request #197 from Indev450/fastfilesearch
Speedup Filesearch
2025-09-17 20:08:25 +01:00
James R 4dce42e458 R_GenerateBlendTables: allocate copy of palette for use in thread
The palette can be freed while this thread is still
running, which means the thread would end up reading from
freed memory.
2025-09-17 21:06:21 +02:00
James R f819471c06 Send R_GenerateBlendTables number crunch to parallel thread 2025-09-17 21:06:18 +02:00
Alug 45393cbb78 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 21:06:13 +02:00
indev bf6727b43a Simplify G_ D/S cpyTiccmd, since n is always a multiple of sizeof(ticcmd_t) 2025-09-17 21:38:55 +03:00
Alug 87134a42b4 fix signal handler stuff for worker threads
g_in_exiting_signal_handler needs to be set BEFORE it actually exits lol
2025-09-17 20:35:32 +02:00
Alug d27a849d79 decouple precipmobj_t from mobj_t
vissprite_t now keeps pointer to precipmobj directly instead of just a simple boolean check
this has multiple benefits
the mobj_t struct now can be reorderer and modified as pleased without having to worry about precipmobj struct layouts since all precipmobj -> mobj casts are eliminated
this allows to remove a massive amount of fields from precipmobj struct which never were used massively reducing the footprint of a precipmobj thing
kinda wish there was a neat way to template function headers to take different types for the same arguments in C to reduce code duplication, but this glady is atleast a rather small case
2025-09-17 17:42:16 +02:00
Alug 2aaa52c639 remove precip blendmode visability check
this WILL never trigger since we neither can access precipmobjs nor do their translucency values ever change
so save us a little bit of work
2025-09-17 17:41:31 +02:00
Alug 5348739a2c fix precip translucency in software renderer
precipmobjs always spawned with AST_COPY blendmode which failed the check, but they are supposed to be translucent when rain
restore the correct behaviour
2025-09-17 04:25:08 +02:00
Alug b21396bd34 ensure deterministic order for P_Random stuff passed as arguments
the evaluation order of arguments passed to functions is undefined in C/C++, so its up to the compiler in which order to evaluate these
P_Random functions modify the randomseed each time theyre called, which can lead to different outcomes (thus desynchs) on different platforms, compilers, compiler versions etc.
so match up with the most common which is last to first (seemingly the order gcc on nix and windows handle it)
2025-09-17 03:28:02 +02:00
Alug 19c97d3137 explicitly cast those 2025-09-17 02:48:44 +02:00
James R 421dca5615 Inflate only size out bytes
Saves time uncompressing an entire lump when only part of
it is needed.
2025-09-17 02:48:41 +02:00
Alug d5b64a4df3 move G_CopyTiccmd & G_MoveTiccmd back to g_game
accidentally misplaced those during g_demo split
2025-09-17 01:31:18 +02:00
Alug 098d1afb50 add P_FreeLevelState + extra stuff for D_ClearState
this just takes out the cleanup code from P_SetupLevel so it can be called from within D_ClearState and all the mapdata will be freed when going back to the main menu
Not super crazy and really necessary in kart, but why not tbh
this is mostly based on what RR does
2025-09-17 01:31:15 +02:00
Alug 9d122aa686 change type and name of var here 2025-09-16 14:47:32 +02:00
Gustaf Alhäll e465e83cb3 Remove maxsend limits 2025-09-16 14:47:29 +02:00
Alug 619a8e2f42 cleanup some unused stuff 2025-09-16 14:47:26 +02:00
Alug b3c0c6f2b4 preconvert our polyvertex coords to fixed point
yes this is unironically faster, by atleast 5-10fps in the wandering falls test case
2025-09-16 02:45:46 +02:00
Alug f0a1cd01c3 remove floatlenght from seg_t
this will get converted to fixedpoint anyways and is only used in ONE place to determine texture x offsets in gl
yes this does get readjusted in adjustsegs if our glsegs differ, but this should be so marginal so save us the work at mapload
i dare anyone to even see a difference if any
2025-09-16 02:45:41 +02:00
Alug 144740a270 declare pv1 and pv2 properly as polyvertex_t
this most likely was done due to issues with header includes
this saves an crapton of pointless casts and type conversions
2025-09-16 02:44:46 +02:00
Alug 0b478b7a91 get rid of "spawn_" sector_t fields
we now make copies of lines, sectors and vertices on mapload that have the spawn state, so those fields are redundant now
also fix copy paste that made ceiling flat angle check if its differs from the floor flat angle on netsave
saves a whopping 32bytes per sector_t entry!
2025-09-15 21:07:45 +02:00
Alug d23451b6e7 revert demo ghosttic hitlist resynch double free hack
now that we dont reload the map anymore during gamestate reload
2025-09-15 17:27:10 +02:00
Alug 20897deeee Merge branch 'servericonpack' into Saturn-Testing 2025-09-15 17:27:06 +02:00
Alug 677e381a2c dont send server icon if current map is supposed to be hidden
in line with kart not sending maptitle to ms in the same case
2025-09-15 16:16:43 +02:00
Alug 4b06a3eabf Merge branch 'fastfilesearch' into Saturn-Testing 2025-09-15 15:08:40 +02:00
Alug 36c1369041 fix filesearch oopsie
lulul
2025-09-15 15:08:22 +02:00
Alug d4b179d59e fix functionnames in polyobject interp warnings for netunarchival 2025-09-15 14:50:52 +02:00
Alug 81fbd75646 add sector checks to netsave plane interpolators
seems like this may be null in a few cases
2025-09-15 14:50:49 +02:00
Alug c7e37eac05 remove inline from SaveFireflickerThinker
doubt theres a single map in kart that uses those and even if it wont be so much that it needs to be inlined
2025-09-15 14:39:57 +02:00
Alug dd6403691f fix dedi build compile 2025-09-15 14:35:53 +02:00
Gustaf Alhäll e42b179fad Rearrange mobj_t fields to reduce holes 2025-09-15 14:07:31 +02:00
Gustaf Alhäll ebb0ebcab0 Reduce size of memblock_t structure 2025-09-15 14:07:28 +02:00
Gustaf Alhäll 347a5ed40a Do not store all states for recursion inside P_SetMobjState 2025-09-15 14:07:25 +02:00
Gustaf Alhäll dee91ed1ef Kill RESETDATA 2025-09-15 14:07:21 +02:00
Alug a80f702bb8 Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-15 14:07:15 +02:00
Gustaf Alhäll 7d91d06ce0 Fix crash on OS X on resolutions that are not multiples of 32 2025-09-15 13:14:28 +02:00
Alug ab1f04ac31 handle native keyboard in a better way
not particulary great, but i dont feel like working this out much atm
2025-09-14 23:32:25 +02:00
Alug 0696ac7340 we dont support gamecube wii or playstation lel 2025-09-14 23:20:46 +02:00
Alug 137a917f58 delet mousegrabok 2025-09-14 23:20:43 +02:00
Alug 00cfdfef27 add P_GetLocalPlayerNumForNum and P_IsLocalPlayerNum and cleanup a bunch of splitscreen checks
- P_GetLocalPlayerNumForNum returns the playernumber for a given index
- P_IsLocalPlayerNum returns if a playernum is local to the maschine
- replaced most if else chains from checking splitscreen things with loops using P_GetLocalPlayerNumForNum and P_GetLocalPlayerForNum
2025-09-14 21:30:56 +02:00
Alug c1d5d153aa Merge branch 'fastfilesearch' into Saturn-Testing 2025-09-14 20:48:33 +02:00
Alug 1fb3b2110c bit of cleanup w_wad 2025-09-14 20:48:24 +02:00
Alug ef9472097d clean up faster filesearch
-use parts of RR´s implementation to get rid of the windows specific code and generally simplify this
- also use SRB2´s  symlink detection as its simpler and saves one lstat call per searched file
2025-09-14 20:47:57 +02:00
Alug ed75d89baf bit of random cleanup + cache strlen in some places 2025-09-14 18:23:24 +02:00
Alug fed4c934ad Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-14 18:20:23 +02:00
Alug 63ea13ab3c Merge pull request #196 from Indev450/updatemd5
Update md5 lib
2025-09-13 13:57:05 +01:00
Alug 2c802799e8 Merge pull request #194 from Indev450/winzlib-ng
Replace zlib with zlib-ng on Windows
2025-09-13 13:56:57 +01:00
Alug fe30cbb4aa big cleanup levelloading code
- made levelfadecol a local variable
- renamed all the "Raw" functions
- moved axis mapthing spawn into the mapthing spawn function
- moved mapthing load to mapdata load, saves opening the THING virtual lump twice
- split out linedef init out of the loop it now gets done within linedef load code saving the hassle of iterating through all the lines twice
- removed a bunch of dead code and useless variables
- moved virtual resource free to after the mapdata has been loaded completely
- sidedef loop now increments pointer instead of reassinging it each iteration
- lastloadedmaplumpnum now gets checked for LUMPERROR instead of INT16_MAX since W_CheckNumForName returns LUMPERROR if lump was not found
2025-09-13 14:36:57 +02:00
Alug ca1d3e337a reset our gamepad colour in some cases
to account for mappalettes properly
2025-09-12 22:30:47 +02:00
indev 28f1ee6335 Attempt to fix some lua userdata being corrupted when allocated via PoolAllocator 2025-09-12 23:18:39 +03:00
Alug 91f377b382 remove remaining field initalizing thats being taken care of by calloc 2025-09-12 21:19:53 +02:00
Alug 6d6fa156f3 skip manually initializing some fields P_SetupLines
redundant due to earlier calloc
2025-09-12 18:29:07 +02:00
Alug 5383fee6af speedup P_LoadRawSectors a bit
the sector array already will be calloc´d, so we dont need to set all of this to 0
also use a premade initalizer for some things
2025-09-12 18:24:21 +02:00
Alug a2c7b68a60 cache player pointer for P_LevelInitStuff 2025-09-12 18:09:47 +02:00
Alug 7be0b38f47 fix taglist stuff on gamestate resend
got kinda lost here lulul
fixed diamond square elevator
2025-09-12 18:06:26 +02:00
Alug 4e05679b10 cache our player and sector pointers for net un/archiving 2025-09-12 17:19:36 +02:00
Alug 36d3c76a52 actually use our spawnside pointer 2025-09-12 17:08:28 +02:00
Alug eee263c2c2 skip checking for "srb2.wad" and "patch.dta"
during server addon checking
both have never existed in kart and are from super old srb2 versions
so save us some string comparisons
2025-09-12 16:25:37 +02:00
Alug c1cdb83e8d use hash to determine if polygon state has changed
we do not use it in the polygon comparitors as it apparently may lay them out in a really unperformant way
2025-09-12 16:25:34 +02:00
Alug 451ab81f0b combine this block 2025-09-12 16:22:06 +02:00
Alug d803c1b9cd smol change i forgor for testing branch 2025-09-12 16:00:56 +02:00
Alug 72b26c19ce Reload from spawnsectors/spawnlines/spawnsides (adjusted for kart)
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/4f77c9f228274afb9f0b5bf9b30e0eb22f9b385f
2025-09-12 16:00:12 +02:00
Alug f35d827bd4 copy initial map state on mapload for Netarchiving + cleanup
like this we dont have to reopen the mapdata 3 times each time we prepare a netsave
also allows us to directly compare sector and line properties
this should save a bit of time when someone joins or resynchs with gamestate system
this is based on some UDMF work from srb2
2025-09-12 16:00:08 +02:00
Sally Coolatta 358eeaa981 Don't reload level on gamestate resend
The level will only reload during a gamestate reload if the map is horribly mismatched somehow. Minor differences in level state are already handled by other parts of the reload, so doing this on *every* reload wastes lots of time.
2025-09-12 16:00:05 +02:00
Eidolon 55e88cf740 Put seclist nodes in LevelPool memory
Replaces the old freelist solution with the LevelPool, which
dramatically reduces the number of allocations needed for mobj and
precip sector assignment. In measurement, this cuts down the time taken
for spawning precipitation by 50%.
2025-09-12 16:00:02 +02:00
Eidolon be4125e4ca Add level pool allocator and use it for mobj, precip, thinkers
This should substantially reduce the number of malloc/free calls made to
create and destroy mobjs, especially during level load and net
save/load.

memory_resource standard header is not available on the OSX deployment
target we are using, so I had to write my own fixed size pool allocator.
2025-09-12 15:59:59 +02:00
Eidolon 920b00348e Make the mouse cursor sane 2025-09-12 15:59:56 +02:00
Alug 80aeae1692 implement "startup" stuff for W_InitFileError
so it can I_Error if a wad file fails to load on startup
2025-09-12 15:59:52 +02:00
toaster 0e52845f50 W_VerifyNMUSlumps: Rewind back to beginning of file handle for WAD 2025-09-12 15:59:47 +02:00
toaster ca5dd9e78f W_VerifyNMUSlumps: Clean up
- Bake W_VerifyFile in, since it was a stub never called anywhere else
- Make it operate off file handles, since the following locations quickly filesearch'd more than once in quick succession.
    - W_InitFile
    - Command_Addfile
- Remove spurious call from W_InitMultipleFiles for `-file` startup param
2025-09-12 15:59:44 +02:00
toaster 956fc099ad findfile aggressive optimisation: If srb2home and srb2path are the current working directory, don't search in them
srb2path will report "." while this optimisation is in play, but this can be disabled if necessary by modifying the small #if (1) in IdentifyVersion
2025-09-12 15:59:41 +02:00
Sally Coolatta 1da376e777 Create doomednum lookup for loading mobjthinkers
Cuts off 10% of the time it takes to load mobj thinkers.
2025-09-12 15:59:37 +02:00
Alug b0b4259af6 fix "missing initializer for member" warning 2025-09-12 15:59:34 +02:00
Alug 26343b4449 remove duped functions in r_fps
those didnt do anything different tbh
2025-09-12 15:59:31 +02:00
Alug a46926f5cc Set SDL_HINT_APP_NAME SDL hint 2025-09-12 15:59:28 +02:00
Eidolon 49518059d1 Use std::vector for r_fps storage
This isn't an optimization for the mobj pointer list, but it is an
optimization for level interpolators, which previously made N
allocations for N non-mobj thinkers. Now those allocations are amortized
according to std::vector's storage.

This could still be further cleaned up to be more C++-ey.
2025-09-12 15:59:24 +02:00
Alug e6ce425bbd ceepeepeefy r_fps 2025-09-12 15:59:21 +02:00
Alug 19b9ec0521 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-10 13:23:22 +01:00
Alug c98861be6e fix tracker module playback going nuts when changing audio buffer size
forgor CV_CALL :chaosleep:
2025-09-10 13:08:26 +02:00
Alug 29db810c54 delet remaining "highcolor" stuff 2025-09-09 18:17:04 +02:00
indev 14bf24ed27 Revert stopping music in D_StartTitle and G_EndGame 2025-09-09 18:08:58 +03:00
Alug ff5bb34204 parentheses hell 2025-09-08 19:33:55 +02:00
Alug 77a00b08a5 optimize gl vhseffect slightly
we dont need to remake our screen texture 3 times
also avoid combining float with interger maths esp in the loop
2025-09-08 19:29:01 +02:00
Alug 27caf1bc70 Merge branch 'servericonpack' into Saturn-Testing 2025-09-08 18:09:09 +02:00
Gustaf Alhäll 01b24e5417 Fix use-after-free when listing servers 2025-09-08 18:08:45 +02:00
Gustaf Alhäll 7a320c9c54 Refactor aatree_t to accept strings 2025-09-05 20:05:10 +02:00
Alug 3a65b687a8 some more micro optimizations p_mobj
dont revaluate P_GetSlopeZAt multiple times due to min/max
save a few abs calls by putting em in constants
remove pointless fixedmuls
2025-09-05 20:05:05 +02:00
Alug 0919ad015c Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-05 20:05:01 +02:00
indev 437f900c25 Clear dangling pointers in VoteScreen struct after mapload 2025-09-05 18:21:01 +03:00
indev cd7ce5698c Update vote background if hud.setVoteBackground was called on vote screen 2025-09-05 17:34:30 +03:00
indev 86eda4f358 Revert "wonky: cache and reuse our testpoint subsector for sloped mobj z checks"
This reverts commit 6f93299aaf.
2025-09-03 18:51:35 +03:00
indev d791d2ce55 Revert "make sure subsec gets initalised to smth"
This reverts commit 32d8120516.
2025-09-03 18:51:32 +03:00
Alug 1883a4884a (hopefully) fix replayhut calling waitingplayers drawer
due to server list setting netgame to true and never resetting it
also cleanup some mess here
lets hope this doesent break anything
2025-09-03 14:10:26 +02:00
Alug 403c34fe5c Merge branch 'servericonpack' into Saturn-Testing 2025-09-03 12:34:06 +02:00
Alug f86a99cd1b Merge branch 'Saturn-Next' into servericonpack 2025-09-03 12:33:56 +02:00
Alug 85cac497ea fixup building map title string for serverinfo
fixes numerous issues, like zonetitle not appearing on bots and serverinfo screen
and generally making this more sane by appending stuff if needed
also fixes "Zone" not displaying in serverinfo screen
2025-09-03 12:33:49 +02:00
Alug 92d6c2b7b0 make patch/pixel conversion account for padding data/no data
just set everything to transparent pixel 247 (0xf7)
so we neither write nor read garbage data and just can cut it out as transparent during pixel to patch conversion
2025-09-03 12:32:32 +02:00
Alug 46be62b256 Merge branch 'servericonpack' into Saturn-Testing 2025-09-02 23:04:03 +02:00
Alug f67f8e7dbf cache patch width
just to avoid some cache misses in a somewhat tight lööp
2025-09-02 22:20:37 +02:00
Alug 191fd4b68a Merge branch 'servericonpack' into Saturn-Testing 2025-09-02 22:03:59 +02:00
Alug c504c0f8f0 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-02 22:03:55 +02:00
indev 6adf39b460 Don't check for opengl in NOHW/DEDICATED builds 2025-09-02 23:01:07 +03:00
Alug e160427108 add smol comment 2025-09-02 21:38:10 +02:00
Alug 275d28c9c6 implement map icon request counter/limit
tries 5 times then gives up
this is just since vanilla clients do not send anything back to us so this would endlessly retry which is pointless
can be adjusted if needed
2025-09-02 21:27:32 +02:00
Alug 2a848e32e4 port map icon packet for serverinfo screen
based on https://codeberg.org/srb2classic/srb2classic/pulls/134

with adjustments
many thanks for the help @indev450 ! <3
2025-09-02 21:27:28 +02:00
Alug 039daa0145 inline P_PointOn stuff + fix declarations 2025-09-02 14:56:41 +02:00
Alug a425935bc4 Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-02 14:56:36 +02:00
indev 6af09bd215 Add offset for small nametags in opengl without shearing enabled 2025-09-01 19:56:42 +03:00
Gustaf Alhäll 015d9208e3 Refactor software blitting logic 2025-09-01 18:24:53 +02:00
Alug f247796ffc small cleanup PT_ServerTics 2025-09-01 11:03:31 +02:00
Alug 29c72be994 Revert "Always accept tics received from the server"
This reverts commit 29006e9926.

Causes random desynchs
2025-09-01 10:58:28 +02:00
Alug 8d70016edc use a macro for mobjtimefrac
just looks a little tidier
2025-08-31 13:36:08 +02:00
Alug 6919b9fd91 skip distance checks if we dont use interpolation
will also indirectly skip calling R_GetTimeFrac
2025-08-31 13:36:05 +02:00
Alug c5d58f5de2 this went missing during merge 2025-08-31 13:36:02 +02:00
GenericHeroGuy 4855d29d31 Fix interpolation going missing for freecam 2025-08-31 13:35:57 +02:00
GenericHeroGuy 2d22c2b265 Rework rendertimefrac and gate it behind a function
Fixes intermission background shifting when toggling fullscreen (yup)
and fixes audio caption text losing interp when paused
2025-08-31 13:35:54 +02:00
Alug acf121cac6 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-31 13:35:51 +02:00
Alug 94d01d1ee9 check clientcfg packet length to skip potential garbage data
dont think this ever broke, but better safe than sorry
2025-08-30 14:43:04 +02:00
Alug e3c9ae6de5 replace strlcat and strlcpy with OpenBSD versions in "string.h"
those started throwing warnings on Windows, so just use the BSD ones, since those also match with what we got on nix
2025-08-28 15:51:57 +01:00
Alug dff8f549da precalculate linedef angles
so we dont have to recalc it runtime
the map is static and linedefs shouldnt be able to be moved so this should be fine
2025-08-28 16:25:59 +02:00
Alug b93a5c5305 replace those with P_GetLocalPlayerForNum 2025-08-28 16:25:35 +02:00
Alug 0c75d8aca3 P_CheckCameraPosition can be static 2025-08-28 16:25:18 +02:00
Alug 71c28ad00b Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-28 16:25:14 +02:00
indev 7e5acd72c1 Make replay search textbox fit on all resolutions 2025-08-28 15:37:03 +03:00
Gustaf Alhäll 29006e9926 Always accept tics received from the server 2025-08-28 10:10:29 +02:00
indev 10d4365376 Pass rgba or fadergba pointer into P_LoadSideColormapGL directly 2025-08-27 23:17:18 +03:00
Alug 611edea6e0 make paletterender lightlevel shifting less ambigous
that macro was from the older approach, but is uneeded now
this better shows whats going on here
2025-08-27 10:11:30 +02:00
Alug fcbf45521a smol optimizations by avoiding multiple reevaluations
due to clamping macros, those may get reevaluated multiple times
nothing crazy
2025-08-27 10:07:34 +02:00
Alug 32d8120516 make sure subsec gets initalised to smth 2025-08-27 09:01:35 +02:00
Alug fdba6a253a dont recheck paletterendering state multiple times during opengl lighting calc 2025-08-26 19:33:31 +02:00
indev 18bdbfdb07 Revert using quick dist functions in lua hud, since some lua scripts need it to be precise (lua driftgauge for example) 2025-08-26 20:17:40 +03:00
Alug 6f93299aaf wonky: cache and reuse our testpoint subsector for sloped mobj z checks
its suprisingly common for the test coords to not change between calling those functions, so we can potentially save us alot of R_PointInSubsector calls
Need to check for branch prediction slowdowns, but from some quick timedemoing, this speeds up things a bunch
2025-08-26 18:05:33 +02:00
Alug c47814c29a dont revaluate HighestOnLine twice for slope mobj z checks 2025-08-26 17:49:40 +02:00
Alug 0dd49869f5 Merge branch 'fastfilesearch' into Saturn-Testing 2025-08-26 12:05:23 +02:00
Alug 74c9c09fcd remove skipexclude variable
with the folderchange check this becomes erronous
2025-08-26 12:04:14 +02:00
Alug 6f891dd235 use GetFileAttributes for pathisdirectory on Windows
should slightly speedup gamestartup with autoloaded files
2025-08-26 10:39:02 +02:00
Alug 6e123b0732 fix filesearch portability 2025-08-26 10:38:58 +02:00
Alug 2c51c9f5f8 use GetFileAttributes for pathisdirectory on Windows
should slightly speedup gamestartup with autoloaded files
2025-08-26 08:36:00 +01:00
Alug 8a781b4fa2 fix filesearch portability 2025-08-26 08:34:57 +01:00
Alug e3a79ab099 fix windows compile 2025-08-26 08:24:51 +01:00
Alug 05364cc4dc fix "invert encore special"
R_NoEncore always checked for the wrong special "240"
we keep that behavior for compat, incase someone else figured it and used that
2025-08-26 09:44:00 +02:00
Alug 3c5d997eff simplyfied P_PointOn checks from prboom
should be functionally identical
2025-08-26 09:43:11 +02:00
Alug 696a9ea464 smol cleanup r_data 2025-08-26 09:43:05 +02:00
Alug c2d97397e8 test: use faster distance and sight functions for hud hooks 2025-08-26 09:42:58 +02:00
Alug 4f534c5ce3 remove d_main include from filesrch 2025-08-25 16:12:57 +02:00
Alug 15288ced57 this ceepeepee 2025-08-25 16:10:49 +02:00
Alug 30eca524d9 remove d_main include from filesrch 2025-08-25 16:10:46 +02:00
Alug 168a2c9684 just drop the connection instead of I_error if connection gets lost
partial port from srb2classic
2025-08-25 15:40:50 +02:00
Alug 0e05dca3d5 try to fix nodes being occupied if connection didnt recieve any acks
partial port from srb2classic
2025-08-25 15:40:50 +02:00
Alug 717f5e3c13 Merge branch 'fastfilesearch' into Saturn-Testing 2025-08-25 13:10:03 +02:00
Alug 2cad7f7210 dont recheck if we should skip the folder if folder did not change
saves a whole lotta string comparisons and speeds this up even further
2025-08-25 12:56:09 +02:00
Alug 34783cfe94 dont evaluate strtol multiple times 2025-08-25 03:39:37 +02:00
Alug 12149a4773 target x86-64-v2 instead of nocona for 64bit windows
slightly newer target, should still be compatible enough with anything from 2009 and onwards
may help with compiler optimizations
needs some testing
32bit builds remain unchanged as they are intended purely for compatibility
2025-08-24 23:02:13 +02:00
Alug 7d81990699 always set this to 0
dont need to check this beforehand
2025-08-24 23:02:09 +02:00
Alug 531de8bd1e make lua string to number conversion consistent between platforms
effectively clamps it to 32bit range
maybe fixes some issues between windows and other builds
2025-08-24 23:02:06 +02:00
Alug 232e6a4b5b use hash checks for W_CheckNumForName 2025-08-24 23:02:03 +02:00
Alug 65d3684d0b Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-24 23:01:53 +02:00
Alug 6017543666 dont try to make glpatch from nothing 2025-08-24 23:01:48 +02:00
Alug 7c7f924ef1 actually dont add any level interpolators on render_none 2025-08-21 18:33:11 +02:00
Alug ba40d45321 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-21 18:33:08 +02:00
indev 3af0009453 Fix off-by-one in M_FindFirstMap 2025-08-20 16:18:33 +03:00
Alug 7ac01390d0 dont add mobj and level interpolators on render_none
i dont think we need to interpolate anything on dedicated
this should improve performance a bit on maps with many mobjs/moving level stuff
2025-08-19 11:49:59 +02:00
Alug 6dee986a28 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-19 11:49:56 +02:00
Alug 145eecf8a4 move sprite reset stuff into R_ResetMobjInterpolationState
this also gets called at the start of the tic
and sets a bunch of rendering crap eitherways
so we can save another thinker loop and a bunch of checks with this
bit of perf gain, 3-4fps on that awful hadal trench timedemo
2025-08-19 11:49:29 +02:00
Alug 080719c251 move all of this stuff into the switch above it lel 2025-08-18 17:56:38 +02:00
Alug d58719d09b cleanup and splitup P_LoadSideColormaps 2025-08-18 17:56:35 +02:00
Alug 05d1eab441 remove bottommap,midmap and topmap stuff
was non functional anyways so get rid of it
2025-08-18 17:56:31 +02:00
Alug caffda3221 dont need to do this without viewmorph stuff 2025-08-18 17:56:08 +02:00
Alug 650a50278a move camera slidemove stuff behind ifndef NOCLIPCAM
dont think this is needed at all with camera noclip
2025-08-18 17:56:05 +02:00
Alug 1ef0909204 dont need to completely clamp those
we already check for the top coords right before
2025-08-18 17:55:55 +02:00
Alug 42878841e6 Fix FOF intersections in multitagging for the renderer.
backport from srb2
2025-08-18 17:55:52 +02:00
Monster Iestyn 34e4cf123d Fix FOF slopes briefly glitching on level load in software mode, by ensuring the FOFs' target sectors have hasslope set on creation 2025-08-18 17:55:48 +02:00
Alug 7ffb3ebdfe Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-18 17:55:45 +02:00
Alug 684a43a95c fix software extra 3d floors
lmao was a copy paste oopsie from ages ago
shoutout to phoenix´s new map making me find this
2025-08-18 16:49:36 +02:00
Alug 4fcb41f659 mark stuff for blitting loop as const and with register
gives another 5-7fps or so for me
2025-08-17 18:19:20 +02:00
Alug 2d1c876e0d Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-16 22:21:13 +02:00
Alug 8d1ef1721f port srb2classic´s sdl blitting stuff for software
all credits to hanicef
mostly from https://codeberg.org/srb2classic/srb2classic/commit/a1fa0b89dbf75ef8be17c9ca5c728cc9c1848582
and
https://codeberg.org/srb2classic/srb2classic/commit/a1cf54e66ad1cb66af99056bc940fc68dce24224

boosts my fps around 20-25 fps
2025-08-16 22:20:58 +02:00
Alug 02ffceb300 fix rotating polyobject interpolation 2025-08-16 22:20:55 +02:00
Alug 44fe156751 update comment for lightcontrast 2025-08-16 22:20:52 +02:00
Alug aca48d69cd style fixes 2025-08-16 22:20:48 +02:00
Alug 294ce055cd mark this with restrict 2025-08-16 22:20:33 +02:00
Alug 4117eb5b40 fix Paranoia compile 2025-08-16 22:20:30 +02:00
Alug a9068ee162 mark this with "noreturn"
clang kept yelling for some reason
2025-08-16 22:20:27 +02:00
indev 9549a204a5 Add tooltip for centered chat text 2025-08-15 22:57:09 +03:00
indev c276736002 Add option to center text in chat (chatcentertext) 2025-08-15 21:51:58 +03:00
Hanicef cfd960124e Do not access memory on misaligned addresses 2025-08-15 10:11:07 +02:00
Alug 77cd898bd2 TEST: compile with fwrapv
fixes clang desynchs with prng
maybe other stuff/platforms aswell
2025-08-15 10:02:59 +02:00
Alug e7c40dd914 fix -Wunused-value warnings
we dont do anything with this, so just skip both
2025-08-15 10:02:56 +02:00
Alug bcb1a1d5eb port RR´s c++ compatible byteptr macros
means we can also get rid of the mumble hack
2025-08-15 10:02:52 +02:00
Alug bf53db8d68 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-15 10:02:48 +02:00
Alug b5dfe74cfe add USECLANG compile flag to force building with clang 2025-08-15 08:01:58 +02:00
Alug 6c891f1146 supress align and unkown pragma warnings in clang 2025-08-15 08:01:56 +02:00
Alug 7d06f59da5 append those to LDFLAGS instead of libs
so they may be passed to other things
2025-08-15 08:01:47 +02:00
Alug 9dee0f0ea8 fix restrict being in wrong place in declaration R_DrawColumnPixel 2025-08-15 08:01:37 +02:00
Alug 9338b5b10f dont need to realloc this
didnt see when i added realloc everywhere this doesent need to keep old data
2025-08-14 16:19:17 +02:00
Gustaf Alhäll b7ecffedcd Fix pixel shift caused by negative pixel positioning in software 2025-08-13 22:44:25 +02:00
Alug 71ab8c0b7d workaround for lua menu conrols for spectators
TODO: refactor all of this into one cmdbuilder and get rid of the codedupe in p_user for cameracmd
2025-08-13 22:40:50 +02:00
Alug 8901c62201 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-13 22:40:46 +02:00
Alug 7deeb4486f port RR camera slope pitch stuff + make it toggable
"cam_pitch" this makes the camera pitch on upwards and downwards slopes a bit
2025-08-13 18:01:00 +02:00
Alug a559e36306 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-12 20:29:18 +02:00
Alug 602bd1a010 fix directional light stuff 2025-08-12 20:29:13 +02:00
Alug f57b8092fc dont need to reinit those gl vars 2025-08-12 20:29:10 +02:00
Alug 5777c638f1 hack for vanilla gba rr cyan floor in gl 2025-08-12 20:28:54 +02:00
Alug 60307da80e move dedi idle stuff into function + port smol cleanup from srb2 2025-08-12 20:28:51 +02:00
Gustaf Alhäll d6e97c328a Simplify NetXCmd client distribution 2025-08-12 20:28:48 +02:00
Alug e4f35e827d free minimap patch on mapload 2025-08-11 13:48:02 +02:00
Alug e7cab1a376 check if minimaphead exists
hopefully fixes a random crash there
2025-08-11 13:47:59 +02:00
Alug 6eb1114d17 reduce scope of some more netstuff 2025-08-11 13:47:54 +02:00
Alug e6a0b4f58b fix oopsie copy paste 2025-08-10 18:34:43 +02:00
Alug c8d9ff6575 use GetFileAttributes also for preparefilemenu
untested as of now
2025-08-10 18:34:40 +02:00
Alug 0d9d176415 use GetFileAttributes instead of stat for filesearch on windows
this is slightly faster and the recommended way of doing this
apparently stat on windows has to emulate some POSIX stuff for that which may slow it down
2025-08-10 18:34:35 +02:00
Alug e1413764f6 speedup addon search
by adding a blacklist of folders
logs, luafiles, replay etc shouldnt ever contain addons so those can be skipped entirely
this massively speeds up searching for addons on windows
also will make findfile try to search in the designated addon folders first so it doesent look in the home or kart folders before it
this is probably not the best way to do things
but idk what im even doing, im not a coder just some chao who likes to sleep all day
2025-08-10 18:34:11 +02:00
Alug ca04e084a2 link stdc++. pthread and gcclib statically on windows
fixes the game throwing super cryptic errors when you dont have the right dlls
2025-08-09 23:32:03 +01:00
Alug 56d03042ec link stdc++. pthread and gcclib statically on windows
fixes the game throwing super cryptic errors when you dont have the right dlls
2025-08-09 23:31:55 +01:00
Alug 0c8df833e9 test: use SDL_GetDesktopDisplayMode instead of SDL_GetCurrentDisplayMode
this seems to fix some smol freezes for some
need to test this a bit
2025-08-09 22:32:24 +01:00
Alug f275eb5f9a test: disable sdl textinput when not using native keyboard layout
this may fix issues on newer sdl2/-compat versions with dead keys on non us layouts
2025-08-09 22:32:20 +01:00
Alug 88081068e9 fix oopsie copy paste 2025-08-09 22:32:13 +01:00
Alug 9893584b4f use GetFileAttributes also for preparefilemenu
untested as of now
2025-08-09 22:28:45 +01:00
Alug 0b4fad3cca use GetFileAttributes instead of stat for filesearch on windows
this is slightly faster and the recommended way of doing this
apparently stat on windows has to emulate some POSIX stuff for that which may slow it down
2025-08-09 21:26:15 +02:00
Alug bbb4749815 speedup addon search
by adding a blacklist of folders
logs, luafiles, replay etc shouldnt ever contain addons so those can be skipped entirely
this massively speeds up searching for addons on windows
also will make findfile try to search in the designated addon folders first so it doesent look in the home or kart folders before it
this is probably not the best way to do things
but idk what im even doing, im not a coder just some chao who likes to sleep all day
2025-08-09 17:21:21 +02:00
Alug 4fc780298f remove I_BaseTiccmd
just complicates things, can just memset our ticcmnds instead
psure this was used ages ago for smth but its not needed here at all
2025-08-09 17:21:18 +02:00
Alug f24f3b5b23 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-09 17:21:15 +02:00
Alug ff6279a406 add P_GetLocalPlayerForNum
just to get rid of ternaries lel
2025-08-09 17:21:08 +02:00
Alug c36f64e97b use memcmp for legacy sky check
just gotta know if first three letters match it
2025-08-09 17:21:05 +02:00
Alug 2c4bee6e6a Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-09 00:50:50 +01:00
Alug 7b776f01bd change flow of K_drawKartStats a bit
nothing notable, just the non splitscreen path will return early now
2025-08-08 22:43:43 +02:00
Alug 43b7492300 disable pointless "Couldn't read mobj_t" warnings in replays
mobjs just cannot be unarchived in replays ever
so this will always spam those for something that WILL never work in kart
maybe if i decide to fix this for 32p or smth those become useful again
2025-08-08 22:29:29 +02:00
indev 1fe79fe236 Add -strict, -strict-soc and -strict-lua cli params
Both trigger I_Error if a warning occurs during addon load in a SOC or lua
script
2025-08-08 18:59:07 +03:00
Alug 222b63d2c3 move the windoze thing to windoze makefile 2025-08-08 17:53:25 +02:00
indev a7c41b458a Use NOLIBGME instead of NOGME 2025-08-08 18:33:24 +03:00
indev 3901c7c7da Revert "Fix makefiles checking for NOLIBGME instead of NOGME"
This reverts commit 932a08b2da.
2025-08-08 18:31:45 +03:00
indev 932a08b2da Fix makefiles checking for NOLIBGME instead of NOGME 2025-08-08 18:29:05 +03:00
indev 4c97a4f9e0 Fix potential buffer overflow in DEH_LoadDehackedFile 2025-08-08 17:53:46 +03:00
indev a1d16b4613 Update dedicated/i_sound.c I_StartSound and I_UpdateSoundParams 2025-08-08 17:43:40 +03:00
Alug 16e1e00c67 "reenable" midi support
well it was never really disabled, but like this we can atleast change its volume lel
menu entry is still disabled, i dont think theres a single map with midi music, so this would just clutter the menu
2025-08-08 00:55:06 +02:00
Alug b76fc9699a fixup midi menu stuff
i love M_DrawSkyRoom
2025-08-08 00:55:03 +02:00
indev cb3638e3ab Add SetupVote hook 2025-08-07 23:48:11 +03:00
Alug e85d91e682 save a few checks for st debug drawer
if we dont use it
2025-08-07 22:27:28 +02:00
Alug 2653b59af4 dont double free our vote patches
those may point to the same thing so uhhhh
PU_PATCH_LOWPRIORITY will ensure the memory will be freed on mapload
2025-08-07 22:26:27 +02:00
Alug caff071a1b fix spacing in Z_CheckHeap errors 2025-08-07 22:10:03 +02:00
JugadorXEI 86ccf40884 Fix displayplayers.iterate hang when multiple viewports view the same player 2025-08-07 20:51:31 +02:00
Alug 85dba64b84 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-07 20:51:28 +02:00
Alug 40165fd6db make leveltitlecard be affected by colour hud 2025-08-07 19:42:39 +02:00
Alug c701e1fe7e make inputdisplay colour match the rest of colourhud better 2025-08-07 19:38:03 +02:00
Alug 525e19566e smol refactor hwr precache
not faster or anything
real time consuming thing is he actual calls to getetxture and getflat
2025-08-07 19:38:00 +02:00
Alug 27e734bde0 make music toggle/volume handling less of a mess
based on work in srb2 from sphere
this gets rid of all the duplicated midi stuff
since we dont really have a whole midi soundtrack like srb2, S_GetMusicLumpNum will always prefer non midi music
2025-08-06 19:49:35 +02:00
Alug fa10eb5801 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-06 18:09:24 +01:00
Alug 2e44a50f7f Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-06 00:13:39 +02:00
Alug bd53786887 fix LoadElevatorThinker interp oopsie 2025-08-06 00:12:34 +02:00
Alug ad1b1eabe4 fix levelstuff not being interpolated on netgame join or resynch
i love polyobjects
2025-08-06 00:10:47 +02:00
Alug 2de9a2be68 fix a desynch due to wrong assumption 2025-08-05 18:33:02 +02:00
Alug e120907e0f make driftgauge stuff a bit more readable 2025-08-03 20:12:13 +02:00
Alug b0c217201e move flat cyan check into a function
and also limit it to software renderer only
we dont need this anywhere else, so can save a bit of work
2025-08-03 15:59:57 +02:00
Alug dac7026739 use R_GetFlat here
does the exact same thing
2025-08-03 15:59:23 +02:00
Alug 91a4646f19 dont PU_CACHE our planeflats 2025-08-03 15:51:52 +02:00
Alug 8963e17b83 check if __THROW is defined
Windows does not have it at all, so we gotta check this otherwise compile may fail
2025-08-03 14:40:09 +01:00
Alug 8ba52e2530 check if __THROW is defined
Windows does not have it at all, so we gotta check this otherwise compile may fail
2025-08-03 14:40:01 +01:00
Alug bf2184582a delet those 2025-08-03 16:30:56 +02:00
Alug 501a770fee Merge branch 'optional-freeslot-test' into Saturn-Testing 2025-08-03 16:30:25 +02:00
Alug 327f7085f6 idk whats up here with the win libs 2025-08-03 16:30:17 +02:00
Alug 8aef549cfc restore optional freeslot stuff 2025-08-03 16:24:35 +02:00
Alug 8dd268b83e fix conflicts 2025-08-03 16:23:00 +02:00
Alug 5fddc3156b Merge branch 'Saturn-Next' into optional-freeslot-test 2025-08-03 16:22:30 +02:00
Alug d6976ca64f inline most of lua lib stuff
a bit faster
2025-08-03 16:15:15 +02:00
Alug 809219d5e8 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-03 16:08:20 +02:00
Alug 278dd12ced Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-03 15:51:58 +02:00
Alug f3cfa969c9 TEST:raise size of sectors considered too smol for precip
theres been a bunch of very smoll sectors that still get precip spawned (see howling bogs, outside of the actual map)
this i just an abitrary value, so gotta see how thi s goes
2025-08-03 15:39:01 +02:00
Alug 7b64b22012 some tiny optimizations 2025-08-03 15:38:58 +02:00
Alug 267ccae3a9 Add driftpulse controller rumble
inspired by radioracers, this does a "weak" rumble pulse the moment the sparks pulse (this is slightly after reaching the new driftlevel)
may want a toggle for this
2025-08-03 15:38:55 +02:00
Alug 5f77dbb946 cleanup the wadpath mess 2025-08-03 15:38:51 +02:00
Alug 1a46d7d16c HACK reset demo.inreplayhut on levelload when not in replay playback
this is really hacky, but M_QuitReplayHut will be skipped if we change maps, connect to a server or basically anything in that manner from within a replay that we started from the replayhut
which can lead to crashes or the replayhut to become nonfunctional
note, like this demolist is not freed, but that shouldnt matter much since it will be freed anyways the moment you open the replayhut again
2025-08-03 15:27:55 +02:00
Alug c8a2278cb7 Testing again 2025-08-03 15:25:13 +02:00
Alug 75b269d4bb Merge branch 'updatemd5' into Saturn-Testing 2025-08-03 15:24:39 +02:00
Alug 35e499027d Merge branch 'texhash' into Saturn-Testing 2025-08-03 15:24:34 +02:00
Alug 356b2f279c Merge remote-tracking branch 'origin/winzlib-ng' into Saturn-Testing 2025-08-03 15:24:30 +02:00
Alug eba5965220 move rainbow color calc into K_Rainbowcolor 2025-08-03 14:42:49 +02:00
Alug feda0bae80 update md5 lib
no real changes, mostly just cleanup and some memory alignment fixes
2025-08-03 00:38:52 +02:00
Alug 44ecb677ad fix merge conflicts texturehashing 2025-08-03 00:37:28 +02:00
Alug 3e99f4d142 Do not reload every texture when adding a wad (squashed)
port of https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725#c829d21709a4f5cd81d140271e883bc40dd00b1b
2025-08-03 00:35:46 +02:00
Alug 2891983cde replace zlib with zlib-ng on windows 2025-08-03 00:32:40 +02:00
Alug 612f910b9c Merge remote-tracking branch 'origin/Saturn-Next' into winzlib-ng 2025-08-03 00:29:50 +02:00
Alug a9d0e2154b clamp software lightlevels before shifting it
was a little oopsie porting this over
,after shifting we only get 32 lightlevels
decided to clamp this in range aswell, just incase
2025-08-02 19:13:23 +02:00
Alug 16a0953d1d fix the "is valid for C/ObjC but not for C++" warnings
fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/192
2025-08-02 01:54:57 +02:00
Alug 737ae08355 dont need to reinit those ever 2025-08-02 01:01:06 +02:00
Alug 6d83a7e187 remove usefulness and volume from sfxinfo_struct struct
those are unused anyways, hope this doesent break shit lol
2025-08-02 01:00:58 +02:00
Alug 56df9b6af3 who tf needs 999999999 sound channels
:chaobaba:
even 255 are kinda overkill lol
2025-08-02 01:00:51 +02:00
Alug 7f2435d821 add an Accessibility options menu
still a work in progress, feel free to suggest more things to add!
2025-08-01 22:26:00 +02:00
Alug b180f29fd9 readd secbright to menu
into advanced video options menu
2025-08-01 21:27:38 +02:00
Alug 32c85f96a4 remove secbright from menu
need to slot it somewhere else but little too lazy atm
2025-08-01 21:27:35 +02:00
chromaticpipe ec83c60320 Configurable sector brightness in software 2025-08-01 21:27:32 +02:00
chromaticpipe fb4a912dba Clamp the lightlevel at the start of HWR_Lighting()
Allows secbright to work without shaders
2025-08-01 21:27:29 +02:00
James R 123b2aa60b lua_hooklib.c: refactor HUD hook call 2025-08-01 21:04:30 +02:00
Logan Aerl Arias bd82a8db29 Update lauxlib.h
lauxlib.h: mark luaL_error as a REPORT function
2025-08-01 21:04:27 +02:00
Alug 6f71fc17c2 mark this as unlikely
those will never run ever after displaying once
2025-08-01 21:04:24 +02:00
Alug d8c3e9f41c fix windows being unable to link with LTO and openmpt
idk why this works but it does, mirrors how it was before the new makefiles
2025-08-01 17:55:02 +01:00
Alug e10345b4de pass "-g" again for lto and asan on windows
for some weird reason it will omit all debug symbols otherwise, which we need for crashlogs and stuff
2025-08-01 17:31:12 +01:00
Alug 2ab66b113c we dont need cv_samplerate with sdl mixer 2025-08-01 04:51:00 +02:00
Alug f64263cf6f remove some unused stuff s_sound 2025-08-01 04:50:57 +02:00
Alug 55c72f32da rename buffersize to audiobuffersize
buffersize was not a good name lel
2025-08-01 04:50:54 +02:00
Alug 53bc12baad init "lenght" in S_AddSoundFx
seems like this never init this lel
2025-08-01 03:58:41 +02:00
Alug b391e763bc fix gme 2025-08-01 03:56:47 +02:00
Alug 2bae0bdb0f indent deez 2025-07-31 23:34:29 +02:00
Alug d42df54901 fix borderless sometimes not toggling on windows
idk why windoze is like this, but gotta call this after SDL_SetWindowFullscreen here
2025-07-31 23:34:28 +02:00
Alug e6256d448f TEST: banish LUA_Step
checking stuff there never seemed to be any garbage left here
so we can just skip this
2025-07-31 21:23:33 +02:00
Alug ad1a980eb1 memset listener outside the loop S_StartSoundAtVolume
same effect, but we dont need to call it multiple times and can be sure this is never unitialized
2025-07-31 19:55:29 +02:00
Alug 1b50858fa6 add a configurable same sound limit
inspired by dsda-doom
in alot of cases the game may play a crapton of the same sound at once, becoming unbearably loud
2025-07-31 19:42:56 +02:00
Alug 3276bbb7b6 restore mumble postional sounds for displayplayers
we essentially always passed 0 before lol
2025-07-31 19:42:53 +02:00
Alug dc00fa3429 fix passing garbage to mumble outside of levels
this just deadass passed the unitialized listener array into mumble
2025-07-31 19:42:37 +02:00
indev dc9276b73c Make 'visit mb.srb2.org/addons' text fit on default resolution ('& make' bit refers more to wiki than mb anyway) 2025-07-31 13:33:48 +03:00
Alug 271d70d6f3 inline HWR_GetTexturePalette
makes ui draw slightly faster from quick test
should be in hw_glob, but cant include hw_main there Zzz...
2025-07-30 15:29:56 +02:00
Alug e52a6c430b smol changes k_hud
nothing crazy mostly just smol reordering
2025-07-30 14:55:44 +02:00
Alug d77d25acf8 use hypotf for P_SegLengthFloat
well its hypot but for floats lel
2025-07-29 19:21:34 +02:00
Alug 9898809f0a remove erronous HWR_FreeExtraSubsectors call
this will be called from within HWR_CreatePlanePolygons anyways
2025-07-29 18:48:02 +02:00
Alug 48768aa13c fix the rare infinite loop hang in ogl (sunset hill map)
use new doom-legacies PointInSeg and add a selfref check to CutOutSubsecPoly
(somewhat related, but it appears this whole file is able to mess with the actual sector planes outside of rendering, this is not really good since it may actually lead to some super hard to debug desynchs)
2025-07-29 18:40:40 +02:00
Alug b1c01a763f cleanup hw_bsp a little
mostly just get rid of debug bloat that isnt even used
adding some branching hints for the I_errors (never seen any one of them happen tbh lel)
and remove some redundant checks
2025-07-29 18:40:02 +02:00
Alug d9bcd6007c move horizonline check to hw_bsp
to where maps also get checked for portals
should speed up levelload slightly
2025-07-29 15:37:14 +02:00
Alug d1b478b3b1 oop 2025-07-29 02:36:45 +02:00
Alug 14b421f533 camera noclip sec special is effectively unused in kart
its not even in the kart zb config
so mark it with unlikely
2025-07-29 02:35:58 +02:00
Alug 7310a8e4df add slope check here
not necessary but may skip more uneeded checks and stuff
2025-07-29 01:23:01 +02:00
Alug c1c3a7dc78 remove unecessary casts for colormap 2025-07-29 00:48:26 +02:00
chromaticpipe ff10b77414 Fix OpenGL flash palettes ignoring saturation 2025-07-29 00:31:10 +02:00
chromaticpipe 4667c332b4 Fix brightness issues with blend textures in Pallette Rendering 2025-07-29 00:31:07 +02:00
Alug 4a9f6b6a22 we dont need to clamp sprite lightlevels everywhere in ogl
theyre an int32 due to the directional light system stuff and get clamped in HWR_Lighting as a result
2025-07-29 00:31:04 +02:00
indev f1d78243d0 Move setting c++ standard bit below 2025-07-27 19:45:10 +03:00
Alug 6e41c8a2a0 readd std=c++17 to cxxflags 2025-07-27 18:42:16 +02:00
Alug 9c5955feb0 Store last ticcmd in a buffer rather than in netcmd
port of https://codeberg.org/srb2classic/srb2classic/commit/fe663f799e733e9a59a95dfd561e506571838554

testing this, since the faketic calc seems a bit "off" to me
2025-07-27 18:29:55 +02:00
Alug 0764b180f7 fixup! next branch
- remove a bunch of clutter
- Fix AATtree stuff by properly balancing it
- replace getcolumn calc with modulo calc
- use strlcpy for some things
- cache wadfile start and endfolders
2025-07-27 18:28:19 +02:00
Alug b883e4e4fe Merge branch 'Saturn-Testing' into Saturn-Next 2025-07-27 18:21:07 +02:00
Alug f78688b684 Merge pull request #189 from Indev450/mmenucleanup
Cleanup m_menu a bit
2025-07-27 17:18:07 +01:00
Alug 097cd5e2ca Merge remote-tracking branch 'origin/Saturn-Next' into mmenucleanup 2025-07-27 18:17:49 +02:00
Alug cd4836ae99 Merge pull request #187 from Indev450/emotes
Add emotes support
2025-07-27 17:16:23 +01:00
Alug f0acf179c2 Merge pull request #185 from Indev450/fixupnet
Cleanup netcode a bit
2025-07-27 17:16:16 +01:00
Alug 836ad12c40 Merge pull request #180 from Indev450/fixgnu23
Make codebase C23 compliant
2025-07-27 17:16:02 +01:00
Alug a147fa3100 Merge pull request #179 from Indev450/unnestmothink
Unnest mobj thinker stuff + cleanup p_mobj
2025-07-27 17:15:55 +01:00
Alug 4f0cf44e78 Merge branch 'unnestmothink' into fixgnu23 2025-07-27 18:15:31 +02:00
Alug 2417647110 Merge branch 'Saturn-Next' into fixgnu23 2025-07-27 18:15:04 +02:00
Alug 982cd7bde2 add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-27 18:14:27 +02:00
Alug d6bd289fcf Merge branch 'Saturn-Next' into unnestmothink 2025-07-27 18:14:17 +02:00
Alug a68a05a838 fix conflict 2025-07-27 15:18:46 +02:00
Alug 95504547df add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-27 15:17:51 +02:00
Alug ceb2a70664 reduce netbuffer scope even further 2025-07-27 15:17:17 +02:00
Alug 8593a1975c Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-27 15:17:09 +02:00
Alug 2049353647 move this out of maptitle condition
it does not rely on it and may even fail
idk why i threw it in there
2025-07-27 15:11:07 +02:00
Alug ba44e61733 Merge branch 'Saturn' into Saturn-Next 2025-07-27 15:09:58 +02:00
chromaticpipe 845652cbfe Make it a part of fullscreen cvar 2025-07-27 15:02:24 +02:00
chromaticpipe ceafa06efc Borderless window toggle 2025-07-27 15:01:47 +02:00
Alug e6f487474b register chasecam with the other cam vars
why dupe a loop
2025-07-27 14:53:31 +02:00
Alug d8461bb44f dont apply player camfade when exiting or in freecam mode
also renames it and moves the check outside
2025-07-27 14:53:07 +02:00
Alug e25d366728 add toggable player close to camera fade
similar to some other kartracers
only takes other players into account
2025-07-27 14:51:10 +02:00
Alug 2abf0b98ac dont do this in dedi
dont need to, its pointless and prob causes more issues than anything
2025-07-27 14:32:38 +02:00
Alug 0f087d13bb dont do this in dedi
dont need to, its pointless and prob causes more issues than anything
2025-07-27 14:18:41 +02:00
indev 2e914c61d1 Init displayplayers to {0} 2025-07-27 14:33:01 +03:00
indev 3f599d5a28 Fix smol typo :3 2025-07-27 14:03:35 +03:00
indev 6ef1f73d4d Init displayplayers to {0} 2025-07-27 13:54:27 +03:00
Alug 38b84baf9d Merge pull request #193 from chromaticpipe/borderlesswindowtoggle
Borderless window toggle
2025-07-26 21:42:50 +01:00
chromaticpipe fae50c0e19 Make it a part of fullscreen cvar 2025-07-26 15:18:03 -05:00
Alug 50f7e2084c seenames stuff is always unlikely 2025-07-26 21:29:25 +02:00
Alug 67cc5402cf move assignments after early returns ST_drawLevelTitle 2025-07-26 21:29:21 +02:00
Alug 2259d4f309 get rid of code dupe for fpscapping stuff 2025-07-26 21:29:16 +02:00
Alug f8d903e7d2 simplify this 2025-07-26 21:29:13 +02:00
Alug 805cde8ae8 D_CleanFile can be static 2025-07-26 21:29:09 +02:00
Alug b23906e327 update link in addon menu to "mb.srb2.org/addons"
:chonkbuncle:
2025-07-26 21:29:04 +02:00
Gustaf Alhäll 2052afdb66 Fix custom addon directory being ignored when downloading addons 2025-07-26 21:29:01 +02:00
chromaticpipe d9c7a40d4a Borderless window toggle 2025-07-26 11:58:55 -05:00
Alug 48d9b2bc98 reduce netbuffer scope even further 2025-07-26 16:19:13 +02:00
Alug 939bf588b3 Merge branch 'Saturn-Next' into fixupnet 2025-07-26 16:19:09 +02:00
Alug cb2e017bcf seenames stuff is always unlikely 2025-07-26 16:18:59 +02:00
Alug d91fbf5d36 move assignments after early returns ST_drawLevelTitle 2025-07-26 16:18:56 +02:00
Alug 9859e43be7 get rid of some redundancy R_Frame stuff
R_SetupCommonFrame already checks the actual sector for us, so we dont need to do this before
2025-07-26 16:18:52 +02:00
Alug 306fec6f9e get rid of code dupe for fpscapping stuff 2025-07-26 16:18:25 +02:00
Alug 3e8b3e868b simplify this 2025-07-26 16:18:22 +02:00
Alug 9261d9c5b2 D_CleanFile can be static 2025-07-26 16:18:20 +02:00
Alug f97941f86e update link in addon menu to "mb.srb2.org/addons"
:chonkbuncle:
2025-07-24 23:47:41 +02:00
Gustaf Alhäll a4810bd6c8 Fix custom addon directory being ignored when downloading addons 2025-07-24 23:45:55 +02:00
Alug 93cbba218a add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-24 22:33:53 +02:00
Alug e749346f0c fix console taking minutes to open during frameskipping
prob not the best way to handle this, but its the simplest
the console should always be openable without issues unless during wipes, since in some cases you end up having to kill the game to do anything
2025-07-24 20:47:31 +02:00
Alug a658883664 fix console taking minutes to open during frameskipping
prob not the best way to handle this, but its the simplest
the console should always be openable without issues unless during wipes, since in some cases you end up having to kill the game to do anything
2025-07-24 20:47:21 +02:00
indev d94c10014f Move server search below refresh option 2025-07-24 21:20:19 +03:00
Alug 45629386bb update credits
this is super full and we need to think about something better for this X)
2025-07-24 19:03:06 +02:00
Alug ffec9d64d5 delet windoze users (winuser.h)
apparently this makes cross compile commit sudoku, need to test this on actual windoze and see if this breaks anything since idk how this file even works
thx nep for the tip!
2025-07-24 15:22:44 +01:00
Alug 3e9f17af86 raise version number to 8.3
so i dont forger before release lul
2025-07-24 17:18:57 +02:00
Alug 03ff2fc007 enable ZDEBUG by default
this is just quite useful honestly
2025-07-24 17:03:23 +02:00
Alug 4492c00840 move prints to ZDEBUG2
as it seems to be for this purpose
2025-07-24 17:03:18 +02:00
Alug e15319ac9b move this stuff behind ZDEBUG 2025-07-24 17:03:10 +02:00
Alug fa012aefe1 let Z_CheckHeap print file and line of where it occured
like its supposed to lel
2025-07-24 17:03:06 +02:00
Alug e681d2d24d remove itemamount check here
replicate vanilla
even if this becomes negative
this does not seem to crash, so id rather do whatever vanilla does
2025-07-24 16:41:28 +02:00
Alug 76e54762d8 add toggle for quake screenshake effects
TODO: make an accessability option menu for certain effects
2025-07-24 16:39:06 +02:00
GenericHeroGuy 3b7d517be2 bruh
Let's try that again, this time putting the camera in a local...
2025-07-24 16:38:55 +02:00
Alug f4da64e3fa remove prob pointless check
viewplayer will be the currently viewed displayplayer lel
2025-07-24 16:38:44 +02:00
GenericHeroGuy 384acf8e31 Fix fake floors in Donut Plains disappearing when chasecam is off
Also remove the useless R_PointInSubsector calls
2025-07-24 16:37:18 +02:00
indev a423451383 SF_HIRES is already handled via spritexscale and spriteyscale 2025-07-24 16:37:08 +02:00
indev 66cfceedaf If gamestate resend took too long, abort resynching 2025-07-24 16:36:26 +02:00
Alug fe9107fa9d fix the fov adjust check
lmao oops
2025-07-24 16:33:29 +02:00
chromaticpipe e4f2db54e7 Fix level interpolators jittering during objectplac 2025-07-24 16:33:01 +02:00
chromaticpipe 2f5fe01ae0 Truncate trailing zeroes in float CVars 2025-07-24 16:32:04 +02:00
chromaticpipe 1bb7bd0abc Fix help command for CV_FLOAT CVars 2025-07-24 16:31:57 +02:00
indev a84ec88bc3 dedi's do run got_mapcmd :p 2025-07-24 16:29:09 +02:00
Alug 4a2e78081a shut up curl im already long 2025-07-24 16:27:56 +02:00
Alug d09d2cb445 use memcmp during startup map check
prob not faster just looks a bit better tbh
2025-07-24 16:27:30 +02:00
Alug 1faa585e83 fix memoryleak in pk3 verify functions 2025-07-24 16:27:16 +02:00
Alug 7479c82691 some crap from ceepeepeecheck 2025-07-24 16:27:04 +02:00
Alug cfab2236da fix awayview join crash
player->awayviewmobj may not exist yet in some cases
2025-07-24 16:26:48 +02:00
Alug d2ee344b22 Fix underflow in consistancy checking code
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/9f5686ef48956cd64ef92f737e59cbbaa27d8cf9
2025-07-24 16:25:57 +02:00
Alug b22737223e didnt mean to change this lel 2025-07-24 16:25:06 +02:00
Alug 578158c060 move HWR_GetTexturePalette calls
to after early returns/where they are used
2025-07-24 16:24:48 +02:00
Alug 8eda0f78f7 call HWR_LoadMapTextures in paletterender toggle callback
from srb2 pr
2025-07-24 16:24:45 +02:00
Alug 2c2c82dc1a add mo checks to automap stuff 2025-07-24 16:24:22 +02:00
Alug d8c9522ec9 add a bunch of checks for if G_BuildMapTitle returns NULL 2025-07-24 16:24:14 +02:00
Alug 492aef2165 no need for an else here 2025-07-24 16:23:50 +02:00
Alug fc0409e967 readd cubeapply check here 2025-07-24 16:23:32 +02:00
Alug 8a89b57e48 this memset is incorrect and does nothing 2025-07-24 16:22:45 +02:00
Alug 0f6b9ba181 remove this
prob wrong assumption, our netcode sucks massive ass
2025-07-24 16:22:23 +02:00
Alug 8f1b4004c9 fix compiler warning bout playeringame 2025-07-24 16:21:45 +02:00
Alug bee5250940 readd flexible array for softwarepatch columnofs
how did this ever work lel
2025-07-24 16:20:48 +02:00
Alug c61a2e6ba2 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/191
was an oversight when i cleaned up the gamepad stuff a bit
2025-07-24 16:16:04 +02:00
Alug d293bb9672 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/190
doing it like this, so potentially wonky socked maps dont show up if its disabled
2025-07-24 16:15:57 +02:00
Alug 9fb3f4c9a3 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/191
was an oversight when i cleaned up the gamepad stuff a bit
2025-07-24 15:38:05 +02:00
Alug 9a60441e54 few more things for hw renderer
just moving aaround some things and declaring more stuff as const
2025-07-23 17:07:38 +02:00
Alug a61b028e97 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-22 17:35:21 +02:00
Alug 29cf728fac enable ZDEBUG by default
this is just quite useful honestly
2025-07-22 17:33:23 +02:00
Alug 3c78c5c57d ok git very cool 2025-07-22 17:33:11 +02:00
Alug 7f3f332821 Remove aligned allocation functions 2025-07-22 17:33:07 +02:00
Alug 38576082fb move prints to ZDEBUG2
as it seems to be for this purpose
2025-07-22 17:31:44 +02:00
Alug 4a4b5661f2 move this stuff behind ZDEBUG 2025-07-22 17:31:22 +02:00
Alug 1e879dc432 let Z_CheckHeap print file and line of where it occured
like its supposed to lel
2025-07-22 14:18:00 +02:00
Alug e29bdd09c5 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-21 19:45:01 +02:00
Alug f3c8ff19b9 remove redundant R_SetColumnFunc call
this would only be needed if we had brightmap support, but like this it just sets the column function to what it already is
2025-07-21 19:11:01 +02:00
Alug fdd19632bf Use R_RenderSegLoop if the back sector has any 3D floor planes
fixes issues in northern district zone
2025-07-21 19:10:58 +02:00
Alug 74b082760d abuse c++ templates for Hwr_AddSprites
test this, but we can avoid a bunch of branching and functions calls like this when drawdist is inifite
2025-07-21 11:56:00 +02:00
Alug 4460fa608b merge fix 2025-07-21 11:55:39 +02:00
Alug 949192c570 branch hints for nights and 2d stuff
gotta keep em for compat reasons Zzz..
2025-07-21 11:49:49 +02:00
Alug 4fa0ca2304 move a bunch of stuff after early returns
+ add some branching instrincts to stuff

maybe saves a bit of time if we dont need the thing
2025-07-21 11:49:44 +02:00
Alug d9d2f043fa use branch instrincts for P_MobjThinker
based on observations from kart stuff
2025-07-21 11:49:00 +02:00
Alug 1ea51f29c5 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-21 11:48:35 +02:00
Alug b0653416f6 Merge branch 'Saturn-Next' into fixupnet 2025-07-20 17:03:30 +02:00
Alug efc4a513ce Merge branch 'Saturn-Next' into fixgnu23 2025-07-20 17:02:31 +02:00
Alug b13793b2a4 Merge branch 'Saturn-Next' into unnestmothink 2025-07-20 17:00:53 +02:00
Alug e102d218ff add toggle for quake screenshake effects
TODO: make an accessability option menu for certain effects
2025-07-19 22:54:37 +02:00
Alug 20cdec33fb fix https://github.com/Indev450/SRB2Kart-Saturn/issues/190
doing it like this, so potentially wonky socked maps dont show up if its disabled
2025-07-19 22:42:37 +02:00
indev 12d4a6d291 Also add scoll into level select for displaying map source filename 2025-07-18 23:19:19 +03:00
Alug d2b1ff595d remove itemamount check here
replicate vanilla
even if this becomes negative
this does not seem to crash, so id rather do whatever vanilla does
2025-07-18 17:57:45 +02:00
indev 03d79fba16 Add filename scrolling for addons menu 2025-07-18 14:48:45 +03:00
indev 989c29f7a0 Move scrollMusicName into m_misc as M_ScrollString 2025-07-18 14:21:05 +03:00
Alug 8a79c0a4e0 simplify free block in P_RemoveMobj
should be functionally the same
2025-07-18 11:01:58 +02:00
Alug 307c333c50 use branch instrincts for P_MobjThinker
based on observations from kart stuff
2025-07-18 11:01:28 +02:00
Alug 3ce8b9f09c oop move this back
this is some global, dont wanna mess things up
2025-07-18 10:57:15 +02:00
Alug 4dbe637510 remove pointless var P_TryCameraMove 2025-07-17 00:28:22 +02:00
Alug c0e97e7f43 store sector directly P_CheckPosition
hopefully this makes pointer access faster here
2025-07-17 00:28:19 +02:00
Alug 37fc64e97d optimization K_KartUpdatePosition
this checked the distance to every single waypoint on the map always and unconditionally, but we dont need the distance unconditionally so only check if we need to
+5fps in techbatics hadal classic timedemo
2025-07-17 00:06:59 +02:00
Alug ca93f08230 use branch instricts for blua
mostly just for error handling
similar to upstream lua and bluajit
hope this speeds this up a little
2025-07-16 23:01:16 +02:00
Alug 3581ce811c cache those things 2025-07-16 23:01:12 +02:00
Alug b4570cbdaa Merge branch 'mmenucleanup' into Saturn-Testing 2025-07-16 20:42:45 +02:00
Alug f2dc344bf8 copy paste oopsie 2025-07-15 19:55:13 +02:00
Alug c0654448f0 oop this was unsigned 2025-07-15 19:18:52 +02:00
Alug 2bf3912633 unmangle localskin menu mess a bit 2025-07-15 19:17:06 +02:00
Alug 4d71fb8409 few more things i missed 2025-07-15 18:59:28 +02:00
Alug 8543a099f4 split m_menu definitions to m_menudefs
idk if this is a good idea lel
2025-07-15 18:59:25 +02:00
Alug 9c6ec02b18 do some cleanup m_menu
gets rid of a bunch of duplicated splitscreen shit
unused srb2 stuff
commented out stuff aswell
we dont need any of this
this is def still far from tidy and itll never be like this
2025-07-15 18:59:22 +02:00
Alug bb9118ee32 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-15 18:57:23 +02:00
Alug 0411c40fae discord rpc my butt 2025-07-15 17:04:32 +02:00
Alug 68cb96ab97 💀 fix menu screentex toggle lel
thx neppy!
2025-07-15 15:30:34 +02:00
Alug 0159b8d0a3 use the tooltips array in the menu_t struct for tooltips
so this was always there lel
gets rid of massively duplicated tooltip calls and is generally cleaner
2025-07-15 15:03:00 +02:00
Alug aea3b49a51 💀 fix menu screentex toggle lel
thx neppy!
2025-07-15 14:00:57 +02:00
GenericHeroGuy 1a6f775cc3 bruh
Let's try that again, this time putting the camera in a local...
2025-07-15 14:00:53 +02:00
Alug ddd192fad0 declare all the kart "time" stuff as const
as far as i can see those never get overwritten and cant be overwritten
2025-07-15 14:00:49 +02:00
Alug 2e4fb32dac dont apply player camfade when exiting or in freecam mode
also renames it and moves the check outside
2025-07-15 14:00:46 +02:00
Alug 7d6e210625 use c++ template for HWR_DrawSprites
works just as well without code dupe
2025-07-13 23:11:52 +02:00
Alug 3ca42ce42f register chasecam with the other cam vars
why dupe a loop
2025-07-13 21:52:26 +02:00
Alug e4e40cf049 remove prob pointless check
viewplayer will be the currently viewed displayplayer lel
2025-07-13 21:52:23 +02:00
Alug d4f912e3b0 add toggable player close to camera fade
similar to some other kartracers
only takes other players into account
2025-07-13 21:52:20 +02:00
Alug eec4443c95 smol stuff i missed i_video 2025-07-13 16:31:59 +02:00
Alug b938c75892 clean up i_video.c a little
what a mess
this is still far from tidy
2025-07-13 16:17:32 +02:00
Alug 455cb9ca24 delet windoze users
apparently this makes cross compile commit sudoku, need to test this on actual windoze and see if this breaks anything since idk how this file even works
thx nep for the tip!
2025-07-12 14:56:34 +02:00
Alug 24e7f5f864 readd R_PointInSubsectorFast
use it for camera, viewpoint, some precip and sound stuff and (visual) banana slope calc
after profiling it a bit, this may be 2-4x faster in a bunch cases
2025-07-12 13:39:57 +02:00
Alug 298fa36c5d uninline R_IsPointInSubsector
this gets used like once or twice, we dont need that inlined
2025-07-12 13:35:12 +02:00
indev d31e9c5b55 Strip colors from server name when searching through server list 2025-07-11 23:15:19 +03:00
Alug 30f53f398f move CopyCaretColors to m_misc 2025-07-11 21:56:10 +02:00
indev eee217deec Add server search 2025-07-11 22:43:36 +03:00
Alug 1847aac223 fix windoze for the 50 trillionth time
when do we finally remove windows support?
those two things do absolutely fucking nothing but shit dies without em for whatever reason
2025-07-08 17:06:06 +01:00
Alug 487ef6f1b9 fix windoze for the 50 trillionth time
when do we finally remove windows support?
those two things do absolutely fucking nothing but shit dies without em for whatever reason
2025-07-08 17:05:44 +01:00
Alug 14be968089 fix for non pow2 width textures in software from doom-legacy 2025-07-08 16:52:56 +01:00
Alug 9f678263d0 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-07-08 16:52:32 +01:00
Alug a554b886c6 fix peeindex overflow
lelelele thx indev <3
2025-07-08 14:23:34 +02:00
Alug f2d68b075c texturewidthmask can be static 2025-07-08 13:48:18 +02:00
Alug dc24de3501 fix color translated spans lmao
oopsie
well atleast we got some extra safety with the spandata source lel
2025-07-08 13:48:14 +02:00
Alug d2c73f072e reuse "i" 2025-07-08 12:02:10 +02:00
GenericHeroGuy 96bc7f7aa6 Fix fake floors in Donut Plains disappearing when chasecam is off
Also remove the useless R_PointInSubsector calls
2025-07-08 12:01:49 +02:00
Alug bd48b24000 some micro optimize 2025-07-08 12:01:46 +02:00
indev a26867bbdb Add separate option to toggle parallel rendering in R_DrawMaskedList 2025-07-08 00:36:25 +03:00
indev 8d570b7ba3 Revert "Disable multithreading in R_DrawMaskedList"
This reverts commit 5a44afcd9f.
2025-07-08 00:10:08 +03:00
Alug 96f5a8adb3 fix for non pow2 width textures in software from doom-legacy 2025-07-07 21:47:48 +02:00
indev 3b34f0a972 Sort replays in replay hut 2025-07-06 15:48:18 +03:00
Alug fe5a0b7c64 GL_ 2025-07-05 15:51:30 +02:00
BlueStaggo 2aa5324225 Manual mipmapping + Texture padding 2025-07-05 15:51:27 +02:00
Alug 22f50402fe remove this 2025-07-05 15:51:15 +02:00
Gustaf Alhäll 4e2f1bcf2b Fix invalid formats being passed to interal texture formats
The effects that this had on the engine is unknown, but the reference
pages makes in very clear that the old behavior is wrong.
2025-07-05 15:50:48 +02:00
indev ca34b0c8d6 Add /mute chat command 2025-07-05 00:27:17 +03:00
indev 0df5ef996c (kinda) unify LookupPlayer and nametonum, rename first into D_LookupPlayer 2025-07-04 23:15:31 +03:00
Alug 4c0ea2695e remove smoothpos cvar and add it as setting for "postitionanimation" cvar 2025-07-04 12:32:49 +02:00
Alug 48556ca428 oop lmao 2025-07-04 12:23:34 +02:00
Alug cb0667921e oop lmao 2025-07-04 12:07:56 +02:00
Alug 52ab27a825 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-04 11:23:26 +02:00
NepDisk 5db50bbaff Port HEPII(I) position number scaling 2025-07-04 11:19:48 +02:00
Alug 416da7cdc8 use memset for S_ClearQueue
just simpler
2025-07-04 11:19:45 +02:00
Alug f47057e800 update credits
this is super full and we need to think about something better for this X)
2025-07-03 10:17:12 +02:00
Alug 090559a766 move this out of maptitle condition
it does not rely on it and may even fail
idk why i threw it in there
2025-07-03 00:34:19 +02:00
Alug 1a6a3de443 double fpscounter samples
slightly more readable
2025-07-03 00:32:15 +02:00
Alug 38b89093fa Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-07-01 19:22:07 +02:00
Alug 224ce007e1 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-01 19:21:58 +02:00
indev 2800685cfc Merge branch 'Saturn-Next' into emotes 2025-07-01 20:15:44 +03:00
Alug 0241d7fe00 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-01 15:27:39 +02:00
indev 5d8bb3223f No need for this now 2025-07-01 15:25:48 +03:00
indev 5e1f943a38 Merge branch 'Saturn-Next' into emotes 2025-07-01 15:24:42 +03:00
indev fca7b4a837 Use std::min 2025-07-01 15:15:36 +03:00
Alug 02ce2ff5ec Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-07-01 10:31:58 +02:00
indev d2bab80b29 Add emote suggestions and autocompletion 2025-06-30 16:43:14 +03:00
Alug 667a8bb166 "restrict" macro for c++
since it does not have it, use __restrict instead
2025-06-30 12:18:32 +02:00
Alug 76a18d001f friendship with constexpr started 2025-06-30 12:11:45 +02:00
Alug 78ab90c1a6 "restrict" macro for c++
since it does not have it, use __restrict instead
2025-06-30 12:54:15 +03:00
Alug 45b9aeb85a slightly cleanup addline stuff
no clue why i just didnt do this before lel
2025-06-30 08:17:41 +02:00
Alug d580306b8a fix hw_main compiler warning 2025-06-30 08:17:38 +02:00
indev 102e944fd5 Preview emotes in chat input 2025-06-30 00:28:14 +03:00
Alug 3748896ebc thanks michaelsoft very cool 2025-06-29 10:20:33 +01:00
Alug 79988dea3d this makes no sense lol 2025-06-29 10:13:00 +01:00
Alug 4409a5848f Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-29 12:08:06 +02:00
Alug 07c13636fc ceepeepeefy hw_main, abuse templates for portal stuff
no idea if this is faster at all lmao
2025-06-29 11:49:36 +02:00
Alug 51cc706b1e Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-06-29 11:48:33 +02:00
Alug 54bd31c80a Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-29 11:48:18 +02:00
Alug 61534d7356 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-29 11:48:12 +02:00
indev 9bd4a933cf Check if text is inside chat log box for emotes 2025-06-29 00:30:24 +03:00
indev e233635783 huh? 2025-06-29 00:05:25 +03:00
indev da24ba20c7 Fix emotes having not enough 'background' rendered :chonkbunckle: 2025-06-28 22:39:44 +03:00
indev 74bdabc636 Load emotes from base wads too at boot (so it loads ones from -file wads) 2025-06-28 22:31:33 +03:00
indev 4b129314d3 Right that got removed in the end :chonkbunckle: 2025-06-28 21:04:09 +03:00
indev 3a55972997 Initial emote support 2025-06-28 21:03:15 +03:00
Alug 6e04e4171e fix the goddamn boolean 2025-06-28 19:21:45 +03:00
Alug cccfaaabfd proper init enterprecise 2025-06-19 17:48:12 +02:00
Alug eadbe9c2e5 delet this 2025-06-19 17:47:57 +02:00
Alug 9bbabcee06 delet this 2025-06-19 17:47:42 +02:00
Alug 7ca6fa6772 turn translation colormaps stuff into an enum 2025-06-19 17:44:04 +02:00
Alug 6317e9c510 cleanup colormap translation stuff
needs testing
2025-06-19 17:43:56 +02:00
Alug 0a80985771 check if player is local here 2025-06-19 17:41:49 +02:00
Alug 548d52cc60 simplify R_SetupAimingFrame 2025-06-19 17:41:42 +02:00
Alug 11c6c69a00 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-19 17:41:33 +02:00
Alug 08025d2da3 ok git very cool 2025-06-19 17:41:12 +02:00
Gustaf Alhäll 4169e7bd71 Remove aligned allocation functions 2025-06-19 17:41:09 +02:00
Gustaf Alhäll bfb7a6b08d Fix potential NULL deference if memory runs out during cURL request 2025-06-19 17:41:06 +02:00
Alug 58abb0d4c3 Merge remote-tracking branch 'origin/softwarecrap' into Saturn-Testing 2025-06-19 17:40:42 +02:00
Alug 9658279cb1 Merge branch 'fixupnet' into Saturn-Testing 2025-06-19 17:40:34 +02:00
Alug 83bb908ff0 Merge remote-tracking branch 'origin/Saturn-Next' into unnestmothink 2025-06-19 15:56:32 +02:00
Alug 515c18c855 Merge remote-tracking branch 'origin/Saturn-Next' into fixgnu23 2025-06-19 15:55:58 +02:00
Alug d1a6394e52 Merge remote-tracking branch 'origin/Saturn-Next' into fixupnet 2025-06-19 15:55:22 +02:00
Alug 6f4e387061 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-12 21:47:29 +02:00
Alug 33ef566fd2 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-06-12 21:47:26 +02:00
Alug eeecd954e2 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-12 17:19:38 +02:00
Alug ccb804a4ed Merge branch 'fixupnet' into Saturn-Testing 2025-06-12 17:18:09 +02:00
Alug a21029ee9e Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-12 17:17:54 +02:00
Alug ccc90842a7 move CopyCaretColors to m_misc 2025-06-12 17:10:08 +02:00
Alug dc069d7bb5 unnest HandlePacketFromPlayer
+ some cleanup
2025-06-12 00:53:47 +02:00
Alug f4a827dfc2 fix conflicts 2025-06-12 00:02:55 +02:00
Alug 4f3232b6cc Merge branch 'Saturn-Next' into fixupnet 2025-06-12 00:02:05 +02:00
Alug 7393eb728c Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-07 11:56:17 +02:00
Alug 1e715f8cd7 Merge branch 'newmakefiles' into Saturn-Testing 2025-06-07 11:56:13 +02:00
chromaticpipe d6b838f7cb GIF Dynamic Delay 2025-06-02 15:57:43 -05:00
Alug 7aadc77a69 Merge remote-tracking branch 'origin/luamusicdef' into Saturn-Testing 2025-05-31 19:39:39 +02:00
Alug 27e1406e6d Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-31 17:44:33 +02:00
Alug 796204d376 use memcmp during startup map check
prob not faster just looks a bit better tbh
2025-05-31 17:20:46 +02:00
Alug acabd1a03e Merge branch 'votebgstuff' into Saturn-Testing 2025-05-31 17:13:58 +02:00
Alug c08aae2622 Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-31 17:13:00 +02:00
Alug 3eba512ad4 Merge branch 'newmakefiles' into Saturn-Testing 2025-05-29 19:35:34 +02:00
Alug c99115d552 thanks windoze very cool part 2 2025-05-29 17:27:38 +01:00
Alug bf6c682cc1 thanks windoze very cool 2025-05-29 17:16:51 +01:00
Alug dc2f0b5707 Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-29 18:23:08 +02:00
Alug 58de672915 add comment 2025-05-29 15:31:32 +02:00
Alug 9488d98cfd Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-29 12:43:04 +01:00
Alug 906b8165d3 dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 12:41:56 +01:00
Alug 16b5037486 dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 12:41:45 +01:00
Alug 74c8325987 Merge branch 'updatewinlibs' into Saturn-Testing 2025-05-28 22:16:37 +02:00
Alug 5d4bb0f5ce Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-28 22:14:17 +02:00
Alug e63777c7d6 remove this
prob wrong assumption, our netcode sucks massive ass
2025-05-28 21:42:29 +02:00
Alug a34ca05bff this is testing lel 2025-05-28 20:45:26 +02:00
Alug bcec8b98f7 make the game c23 compatible properly
+ some cleanup and removal of some redundant checks
2025-05-28 18:25:07 +02:00
Alug af9ffc1f6f forgor the hw state lel 2025-05-28 16:37:37 +01:00
Alug 18816453f4 add wireframe mode for ogl 2025-05-28 18:31:21 +02:00
Alug 1eb8a75058 fix compiler warning bout playeringame 2025-05-28 18:30:26 +02:00
Alug 5abf42fe75 remove crappy memcpy redifine from md5 2025-05-28 18:29:18 +02:00
Alug 1306a233b8 Further improve sleep accuracy on UNIX systems
but not for dedis
https://git.srb2.org/STJr/SRB2/-/merge_requests/2583
2025-05-28 18:28:22 +02:00
Alug 46f8c6b7a5 remove forcing c17 from makefile 2025-05-28 18:26:47 +02:00
Alug face5cf447 Merge branch 'fixgnu23' into Saturn-Testing 2025-05-28 18:26:24 +02:00
Alug 603267b753 fix W_CheckNumForFolderStartPK3 2025-05-28 17:47:29 +02:00
Gustaf Alhäll 7cf3113d67 Fix long names using the wrong hash field 2025-05-28 17:47:25 +02:00
Alug 397fa962b1 Optimize lump searching
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/dc608f084c76cf72de9fc3f3f347752f04acae42
2025-05-28 17:47:22 +02:00
Alug d2637ab71f Merge branch 'newmakefiles' into Saturn-Testing 2025-05-28 17:47:01 +02:00
Alug a6e020adeb Merge branch 'texloadstuff' into Saturn-Testing 2025-05-28 17:46:43 +02:00
Alug d50dcac0c0 Merge branch 'unnestmothink' into Saturn-Testing 2025-05-28 17:46:40 +02:00
Alug dd6bc23a8e Merge branch 'updatewinlibs' into Saturn-Testing 2025-05-28 17:46:35 +02:00
Alug 3685502edf Revert "delet tic resending stuff"
This reverts commit 17bc8a4a36.
2025-05-26 18:10:03 +02:00
Alug f87bcef079 try fixing some crash with bogus netxcmds 2025-05-23 16:55:47 +02:00
Alug c3458afe2b unglobalise holepunchpacket aswell 2025-05-23 16:53:42 +02:00
Alug 17bc8a4a36 delet tic resending stuff 2025-05-23 16:51:26 +02:00
Alug b04f017ab6 change ticqueue system to be more like srb 2.2
mostly just renaming lel
2025-05-23 16:51:10 +02:00
Alug 083ddb6396 Refactor netbuffer out of global namespace
https://git.do.srb2.org/Hanicef/SRB2Classic/-/commit/079fd2cef97a9cf22fb5d2b66a9b500914efbc72

+ move some things into functions
2025-05-23 16:48:34 +02:00
Alug c3129742c3 simplify cmpack 2025-05-23 16:44:52 +02:00
Alug 877bd640f3 fix destinationnode check in Processackpak 2025-05-23 16:43:52 +02:00
Alug 3233df9c6c do not resolve ipv4 in curl when using ipv6 2025-05-23 16:43:24 +02:00
Alug 9ad5f5189c split portnum retrieval into own function 2025-05-23 16:43:02 +02:00
Alug c7718dea79 fixup! i_tcp
technically make ipv6 work,, but its disabled by default
2025-05-23 16:40:38 +02:00
Alug fa3dcdb24f massive cleanup p_mobj 2025-05-23 16:31:17 +02:00
Alug 311258dda0 more unnesting for mobj think stuff 2025-05-23 16:24:50 +02:00
Alug a0f8816de7 readd itembox fuse think that was lost somehow lmao 2025-05-23 16:22:03 +02:00
Alug c546b6225c move this since it does check for fuse 2025-05-23 16:21:48 +02:00
Alug f6c6621af8 unnest and cleanup P_MobjThinker
everything was moved into seperate functions lel
2025-05-23 16:21:27 +02:00
Alug 5a0fb59b26 Do not reload every texture when adding a wad (squashed)
port of https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725#c829d21709a4f5cd81d140271e883bc40dd00b1b
2025-05-23 16:16:10 +02:00
indev 14400097dd Only do lookup for mobjtype and states for drift stars and water trails at map load 2024-07-29 01:04:46 +03:00
indev c44c0e10c1 Lets not compile lua code multiple time each frame x) 2024-07-27 03:28:13 +03:00
indev bbf49db184 Oops 2024-07-25 21:24:29 +03:00
indev 15787a97bb Make water trail not use hardcode freeslots too 2024-07-25 21:17:48 +03:00
indev b76ce23ed2 Make drift stars not use hardcode freeslots 2024-07-25 19:02:39 +03:00
Alug d6c5066bfd let autoload run later to mitigate server join issues
itll now run at a similar place to postautoload
this may hopefully prevent some issuess with freeslotting lua
however sadly this makes menu replacements not work at startup anymore
2024-07-25 16:42:33 +02:00
Alug 60783d7109 fix fail condition 2024-07-23 22:02:54 +02:00
Alug db525f15da make backup of kartconfig before writing to it 2024-07-23 21:48:38 +02:00
Alug f33daf6bee toggle palrendering and fbo off if screen textures are disabled 2024-07-23 20:31:34 +02:00
Alug d13928b394 add cam check here 2024-07-23 20:06:01 +02:00
Alug 5613a0d173 reset tilt when respawning 2024-07-23 20:02:20 +02:00
Alug aa38586f82 simplify this 2024-07-23 19:01:44 +02:00
Alug d2b1ceb641 forgor this 2024-07-23 18:56:51 +02:00
Alug 9dd7e9a25f fix up bird screen tilting
removes old lerp variables that did nothing
properly interpolated viewroll
made it proper adjust to mobjscale
doesent roll view when spectating
general cleanup
2024-07-23 18:54:27 +02:00
Alug 1648273ddd allowjoin now sets saturnjoin to its value use CV_StealthSet to prevent
its only for scripts pretty much so no need to toggle it seperately
2024-07-23 17:45:00 +02:00
Alug 3f90e4f12a add "allowsaturnjoin" cvar to let toggle allowjoin for saturn clients seperately 2024-07-23 17:07:59 +02:00
Alug 2b9d565f0c e 2024-07-23 00:59:15 +02:00
Alug 70af63cc94 add to menu 2024-07-23 00:55:48 +02:00
Alug 64b92881f9 changuer how this works
counter decrements - 1 double the cooldown time
2024-07-22 23:36:13 +02:00
Alug be5ea069ad add gamestateresendattempts
so you can specify how often the game tries to resend gamestate to player in given time
so they dont get stuck in a synch loop
this is gamestateresendattempts value in the time of resynchcooldown *2
2024-07-22 23:09:04 +02:00
Alug 71e9357114 add check here too 2024-07-22 22:20:42 +02:00
Alug e28f86ac32 add "gamestatecooldown" cvar
to be able to change the cooldown between gamestate resends
2024-07-22 22:20:38 +02:00
Alug f97fe4bd65 Test: Restore save_p after P_LoadLevel
P_LoadLevel calls some functions that save gamedata and
unset save_p.

this is kinda hacky but i perhaps will port the redone save buffer sometime
2024-07-22 19:51:56 +02:00
Alug 3d0ac03f06 optimize MT_TUBEWAYPOINT
Store waypoints at map load instead of iterating through the thinker list to find them

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/938
2024-07-22 19:51:44 +02:00
Alug 094132b7d3 Make polyobjects agree with sector lighting/colormap like a FOF. 2024-07-22 19:03:14 +02:00
Alug 51b9c9ae5a prevent potential level load crash 2024-07-22 18:13:06 +02:00
Alug d31941ef13 don't check flippedness in HWR_RotateSpritePolyToAim if the mobj is actually a precipmobj! 2024-07-22 18:08:26 +02:00
Alug 48db826142 2 2024-07-22 12:58:28 +02:00
Alug 32b62d19ff add missing copyright stuff to k_director 2024-07-22 12:57:29 +02:00
Alug e4f2961129 lagless cam test 2024-07-21 23:28:29 +02:00
Alug eba09dfad2 Revert "Free mipmaps before freeing tags"
This reverts commit 2437c5a19a.
2024-07-21 23:25:32 +02:00
Alug d9b72fcae6 whitespace hell 2024-07-21 22:51:36 +02:00
Alug 6f17e7f735 revert this
doesent do anything but complicate stuff lol
2024-07-21 22:46:01 +02:00
Alug 047b82acc0 remove hw_light 2024-07-21 22:38:51 +02:00
Alug 5347039d75 cleanup hw_main 2024-07-21 22:23:21 +02:00
Alug edc8095577 cleanup r_things a little 2024-07-21 22:21:01 +02:00
Alug 06f69723c2 fix this oops 2024-07-21 20:22:10 +02:00
Alug 8218fd4f57 stop yelling clang 2024-07-21 20:07:39 +02:00
Alug 6ee22edac5 smol cleanup
also check for splitscreen and if not dont run a for loop lul
2024-07-21 20:07:23 +02:00
Alug 37215ef1f4 clean director up a little
toggling director now resets cooldown so it switches players immediately
also consolidated condition to be active
and ensure DirectorFollowAttack doesent always run when it doesent need to be
2024-07-21 19:35:17 +02:00
Alug a2eb2222b9 more reference fixes 2024-07-21 17:38:06 +02:00
Alug d63b4d9463 Revert "attempt at mitigating palette bug in ogl"
This reverts commit 3bd85c20bc.
2024-07-21 16:21:56 +02:00
Alug 3bd85c20bc attempt at mitigating palette bug in ogl 2024-07-21 16:10:23 +02:00
indev f70063c7d8 Add director hud indicator 2024-07-21 17:03:27 +03:00
Alug a2f7dd7408 fix cmake 2024-07-21 15:45:53 +02:00
indev 147014d43a Add bind for director toggle 2024-07-21 16:11:33 +03:00
Alug 9460d1e9a1 oops 2024-07-21 15:11:28 +02:00
Alug b3a9a6b59a add stuff for directordebugger i forgor 2024-07-21 15:11:01 +02:00
Alug 69f7d669c8 only update director if consoleplayers specs or in demo playback
dont need to update this ever if we dont even use it lol
2024-07-21 14:42:48 +02:00
Alug 74a68b1462 fix crash if everyone spectates 2024-07-21 14:42:17 +02:00
Alug 006ea90493 port director from RR 2024-07-21 14:20:54 +02:00
Alug aede063266 Merge remote-tracking branch 'origin/absolutehell' into lugstuff 2024-07-20 19:47:37 +02:00
Alug 5aaeff4c5d improve virtual resource management 2024-07-19 22:44:12 +02:00
Alug 5f80d6c18d fix hoop midjoin crash in the dumbest way possible
cant figure out why it crashes so thisll do lol
2024-07-19 22:42:50 +02:00
Alug 7c59c9e6ec fix ScreenCoords on 2 plyr splitscreen and shearing
+ remove non 16:10 hack since that issue was fixed elsewhere
2024-07-19 19:25:05 +02:00
Alug aae83b3235 disable hudoffsets in splitscreen 2024-07-19 18:52:53 +02:00
indev 520165128a Add option to play power items sfx for growmusic and supermusic 2024-07-19 18:17:23 +02:00
Alug 556ced63cf whoopss remove test stuff 2024-07-19 14:39:23 +02:00
Alug 063bf830ff make a packet to tell if a joined client is on saturn
initial stuff
works and seems to be vanilla compatible
needs its own function and other things to be useful
2024-07-19 14:38:38 +02:00
Alug 7fd3bd412c reenable gme music position setting 2024-07-19 12:13:20 +02:00
Alug 47b9508af2 lul 2024-07-19 01:22:36 +02:00
Alug 417c44aad0 lül 2024-07-19 01:20:18 +02:00
Alug 1fefa0a99a remove spriteclipshader crap 2024-07-18 15:23:27 +02:00
Alug 06db4d2b62 add audio buffer size into sound menu 2024-07-18 14:43:05 +02:00
Alug bf7fc12a8d revert this in teleport 2024-07-17 22:19:03 +02:00
Alug 395daf57fa Revert "clean up mapload code a little more"
This reverts commit 79a5d174a5.
2024-07-17 12:26:38 +02:00
indev 97219b7a84 Attempt to fix possible use-after-free for awayviewmobj 2024-07-17 11:56:22 +02:00
Alug 0d5d677eff Skip over empty entries when populating vres, saving memory 2024-07-17 11:56:19 +02:00
Alug 3bd6c99a3b vres_GetMap: Count resources in folders up until next 0-length lump
justs in case the order of stuff may be weird
fixes keepmapmusic crash on some maps
2024-07-17 11:56:17 +02:00
Alug 1d2d8d58db clean up mapload code a little more 2024-07-17 11:56:14 +02:00
indev 9909b002fe Fix linedef 415 executing random text if script lump doesn't have null terminator 2024-07-16 15:46:37 +02:00
Alug ccda1ef104 did not mean to add this lol 2024-07-16 10:43:47 +02:00
Alug 52a882bda2 remove this check 2024-07-15 21:58:07 +02:00
Alug 177c60e857 fix more warnings 2024-07-15 21:43:48 +02:00
Alug 0566b96738 fix some warnings in clang 2024-07-15 21:43:46 +02:00
Alug f72c179f56 fix A_ action protottypes 2024-07-15 21:43:44 +02:00
Alug 0da963c794 Revert "fix some clang warnings"
This reverts commit fea89de037.
2024-07-15 21:43:40 +02:00
Alug 7d885f7100 dont access delayremoved thinkers
uhhh
2024-07-15 14:34:33 +02:00
Alug c1c2f794e3 more mobj reference fixes + cleanup 2024-07-15 13:58:08 +02:00
Alug 8bb1c7a032 Revert "run this in actual fullscreen"
This reverts commit 4a2d6b2241.
2024-07-14 18:03:21 +02:00
Alug 804123afc1 ndef 2024-07-14 17:32:33 +02:00
Alug 8e4f278ce4 this does nothing lol 2024-07-14 17:15:31 +02:00
Alug 3193241b11 shut up 32bit gcc 2024-07-14 16:59:54 +02:00
indev edb44fa6a2 Refactor music name scrolling in music test 2024-07-14 16:59:46 +02:00
Alug 66e9ac3657 Free mipmaps before freeing tags
ŝhould hopefully fix some random Z_free crashes
2024-07-14 16:44:09 +02:00
Alug 87e0796bf4 inline M_Memcpy 2024-07-13 15:55:30 +02:00
Alug 6bc6db3665 also use IFCHANGED macro for levelinterpolators
just looks a bit neater
2024-07-13 15:12:43 +02:00
Alug 2a4aa51373 Revert "smol optimization to HWR_Addline"
This reverts commit e6359663b1.
2024-07-13 14:55:28 +02:00
Alug e15b052570 Revert "shut up gcc"
This reverts commit 17a5c6ed06.
2024-07-13 14:55:26 +02:00
Alug 629e249a12 Revert "dont do this with portals"
This reverts commit f949fa54af.
2024-07-13 14:55:21 +02:00
Alug 86a260bb89 fix NOHW compile 2024-07-13 14:54:55 +02:00
Alug 6ab2de2787 shut up windoze 2024-07-11 10:36:27 +02:00
Alug 8effdc1615 Clean up graphic menus
- Renamed Experimental Options to Advanced Options
- Fixed the tooltips not displaying
- Made it look good again
2024-07-10 19:26:40 +02:00
Alug 561fc2d01a only interpolate pitch and roll when using 3d models
sprites dont need this for now
2024-07-10 18:43:20 +02:00
Alug 3fd9cf573b dont think precip mobj angle ever changes 2024-07-10 18:42:42 +02:00
Alug d7c0bed4eb remove those 2 from experimental video menu
no reason to ever toggle them off
2024-07-10 18:35:04 +02:00
Alug afd1f595e1 remove cv_grfofcut
same story
2024-07-10 18:34:45 +02:00
Alug f47a43df2f remove cv_slopepegfix
same as the other ones
2024-07-10 18:34:13 +02:00
Alug 4385327101 remove cv_fofzfightfix
more bloat
2024-07-10 18:33:25 +02:00
Alug 4e73c05ef9 remove R_Pointtoangle toggle
its bloat, the difference is negigble at best
2024-07-10 18:32:57 +02:00
Alug c01ef035a5 remove cv_mobjssector
idk why it even checks for pointinsubsector
2024-07-10 18:31:46 +02:00
Alug b59c080943 fix IFCHANGED macro 2024-07-10 18:31:39 +02:00
Alug 814c65b290 dont do this with portals 2024-07-10 09:21:58 +02:00
Alug 9f1c1c3f18 dont need to check this in precip 2024-07-10 08:49:19 +02:00
Alug e0df7dfba5 shut up gcc 2024-07-10 07:12:58 +02:00
Alug 220db7212f inline some crap 2024-07-10 07:11:38 +02:00
Alug d59f45a26a smol optimization to HWR_Addline 2024-07-10 06:55:47 +02:00
Alug f88d92ecee change when dynamic slopes run depending on if you joined midgame 2024-07-10 06:21:48 +02:00
Alug c28188b6d8 smol cleanup 2024-07-10 05:50:01 +02:00
Alug 80419748db forgor this 2024-07-10 05:45:06 +02:00
Alug 874e6cd5af fix conflict 2024-07-10 05:26:27 +02:00
Alug cd500fc344 clean up P_SetupLevel a little more 2024-07-10 05:25:31 +02:00
Alug ae7afc5749 Map data lump interface
cleans up code alot and stuff

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/535
2024-07-10 05:25:22 +02:00
indev b0fa94c781 Call ServerJoin hook when consoleplayer becomes available, since it is needed for configs (which what this hook is created for) 2024-07-10 05:23:53 +02:00
indev 9bf717fae9 Add info about ServerJoin into LUASTUFF.md (so i don't forget to do it later) 2024-07-10 05:23:47 +02:00
indev 859c1020e6 Add ServerJoin lua hook, which gets called when client joins a server (listen server hosts joining their server also count) 2024-07-10 05:23:22 +02:00
Alug 9108d64820 mitigate dynamic slope desynchs
Perform dynamic slope thinking before other thinkers.
2024-07-10 05:22:38 +02:00
Alug e9d3c1a421 Fix mobj reference management of player->mo
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/d0719ef5ba86a1da32fed171d74eb76c7254f4f6
2024-07-10 05:21:45 +02:00
Alug f36e069f40 unhack this again 2024-07-09 09:06:11 +02:00
Alug 1f5c7b1d12 more changes to dither
use interger for distance scales
start z factor earlier
rename halfResolution to endResolution
2024-07-09 08:39:38 +02:00
Alug 94ecb9e634 ass 2024-07-08 20:49:05 +02:00
Alug b9db67bc08 more tweaks 2024-07-08 20:42:38 +02:00
Alug c152799295 oops that actually didnt fade out at all lol 2024-07-08 20:42:35 +02:00
Alug f91165857d scale and fade out dither pattern
makes the image a bit cleaner and easier to look at in palrender
2024-07-08 20:42:29 +02:00
Alug 29b93f02f1 crap 2024-07-08 20:42:02 +02:00
Alug f9a6452528 simplify this a little 2024-07-08 20:41:27 +02:00
Alug e7e51957e9 oops this should be min 2024-07-08 20:41:17 +02:00
Alug f8903e7ce7 clean up some net stuff 2024-07-08 20:41:10 +02:00
Alug d3548a4dfb Always use system-specific path seperator
https://git.srb2.org/KartKrew/RingRacers/-/commit/0f16c61d04f42b463db5c8987571fc986ae6ce9f
2024-07-08 20:40:51 +02:00
Alug eca72c6dc6 dont think kart even supports trivial maps
so no need to constantly check for this
2024-07-08 20:40:43 +02:00
NepDisk 6e378f4de6 Leave me alonmg kate 2024-07-03 13:04:45 +02:00
Alug 94ac52d792 Clamp lindex during vissprite light calculation
Mitigates against negative or very large xscale values causing lindex
to evaluate < 0, preventing a potential colormap indexing-related crash.
2024-07-03 13:04:11 +02:00
NepDisk 1f276a7eb6 Fix automap multiplayer crash
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2488
2024-07-03 13:03:12 +02:00
Alug a28a590078 prevent potential crash when trying to kill bananachain 2024-07-03 13:02:53 +02:00
Alug 91d052d25e shut up gcc 2024-07-03 13:02:32 +02:00
Alug 2f6ded132d Zzz... 2024-07-03 13:02:29 +02:00
Alug 51cdc1ce90 forgor 2024-07-03 13:02:26 +02:00
Alug 494fe0b1e7 revert software screen shit 2024-07-03 13:02:20 +02:00
Alug eac5310f5e some crap from asan 2024-07-03 13:02:16 +02:00
Alug 7f4a2f9943 fix some clang warnings 2024-07-03 13:02:11 +02:00
Alug 28a31301d4 forgor this crap 2024-07-03 13:01:49 +02:00
Alug 1c5e575718 remove all the ogl fix toggless 2024-07-03 13:01:44 +02:00
Alug 4a2d6b2241 run this in actual fullscreen
somehow makes xwayland happy
2024-07-03 13:01:11 +02:00
Alug 001baec444 scale dithering a little diff for a little smoother "fade" in pal render 2024-07-03 13:01:06 +02:00
Alug 1b35d4f03b stuff 2024-07-03 13:00:57 +02:00
Alug 75fc8cb766 change dither matrix to 4x4
a little grittier also smol cleanup
2024-07-03 13:00:43 +02:00
indev 28bef8c54f Use a fake 2d array in dither shader so it compiles with older glsl versions (1.20 at least) 2024-07-03 13:00:36 +02:00
indev 787973a3d5 If shader compilation failed, print info log 2024-07-03 13:00:31 +02:00
Alug f0e3ca7c1f add gr_lightdithering to shader
mhhm dithering
2024-07-03 13:00:26 +02:00
Alug 1b837a81ef improve teleport interpolation stuff 2024-07-03 13:00:07 +02:00
Alug b74dd85ef2 small optimization to batching 2024-07-03 13:00:01 +02:00
Alug fc9cc62b12 remove this crap
this doesent work on nix anyways
2024-07-03 12:59:54 +02:00
Alug e665edb652 no need for this 2024-07-03 12:59:30 +02:00
Alug e81cde8753 smoller opitmizations 2024-07-03 12:58:40 +02:00
Alug 4e995436c5 optimize ogl polyobjs slightly 2024-07-03 12:58:13 +02:00
Alug c57154a8e5 prevent crash in hw bsp 2024-07-03 12:58:07 +02:00
Alug 31fbba057a remove this again 2024-07-03 12:57:44 +02:00
Alug 46fa6e7ba4 change the shader z shit again 2024-07-03 12:57:17 +02:00
NepDisk bbb0379813 Allow Users to Connect to Servers While In-Game
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2401/
2024-07-03 12:57:09 +02:00
NepDisk 156b63440e Linux customshader compilation fix
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2418/
2024-07-03 12:56:41 +02:00
Alug 20e062b031 move HWR_LoadLevel to hw_main 2024-07-03 12:56:22 +02:00
Alug c98ebc9f35 Try fix glib preallocating too much space for sound freeslots
idk why git keeps removing credits
but thx indev <3
2024-07-03 12:55:57 +02:00
Alug c6001c7bf6 this should be called on mapload 2024-07-03 12:55:42 +02:00
Alug 2d0945264f oops 2 2024-06-20 21:16:47 +02:00
Alug 3d0981cf7b oops 2024-06-20 21:13:50 +02:00
Alug cce581fa51 these appear to be unused so comment them out
dont need 6 arrays being allocated with MAXSKINS for nothing lul
2024-06-20 16:22:13 +02:00
Alug 2446b804c7 forgor this 2024-06-20 03:00:48 +02:00
Alug 20cdb1c5ec limit localskins to 32
hope this doesent just die lol
2024-06-20 02:42:49 +02:00
Alug 212b184320 Do not access memory on misaligned addresses
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2438
2024-06-17 17:11:20 +02:00
Alug 37e98f342c Revert "fix some interpolation issues"
This reverts commit ccb1aecd01d376b0c0d73bbe4c898e89e35e25d0.
2024-06-17 12:51:42 +02:00
Alug 578f5b85dd Revert "more interp fixes"
This reverts commit 3a1a58bcfc.
2024-06-17 12:51:29 +02:00
Alug 99b1e3f969 Revert "attempt at speeding up sdl_render stuff"
This reverts commit f91d3ccf24.
2024-06-17 12:51:20 +02:00
Alug 8c9ef0e8f3 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-06-16 22:41:45 +02:00
Alug f91d3ccf24 attempt at speeding up sdl_render stuff 2024-06-16 22:41:32 +02:00
Alug 691063983e Revert "Test: kill unused skin sounds freeslotting"
This reverts commit b9b97d0a56.
2024-06-16 21:05:40 +02:00
Alug b912047f68 35/2 != 17 = 17.5 ? 2024-06-16 16:17:24 +02:00
Alug f2ddbf1e68 a 2024-06-15 21:16:25 +02:00
Alug 5cd36e55ab Maybe hopefully fix ogl masterserver crash thing
port from durr
2024-06-14 04:01:30 +02:00
Alug 1cb590ebb8 this does not exist 2024-06-14 03:00:40 +02:00
Alug 280e937844 add missing HAVE_THREADS 2024-06-13 14:47:20 +02:00
Alug 5afb55547d opengles 2 seems to be fastest for me lul 2024-06-12 22:31:47 +02:00
Alug e3c91629db use sdl ogl render instead of software for software mode on nix
oops
2024-06-12 22:31:29 +02:00
Alug 1b0496b1e7 fix some clang warnings 2024-06-12 21:56:27 +02:00
Alug b7369b40cb fix oopsie on titled software wöter 2024-06-12 21:49:20 +02:00
Alug 6567313de6 add back le returns 2024-06-12 20:51:34 +02:00
Alug 5ecf3cc36c lower min audio buffersize to 256 2024-06-12 12:59:23 +02:00
Alug 71e3d89181 move that again 2024-06-11 19:47:51 +02:00
Alug a284ece8e4 e 2024-06-11 12:59:00 +02:00
Alug e73e75e740 dumbass hack 2024-06-11 12:58:25 +02:00
Alug 9bfd61fabc shut up compiler 2024-06-11 12:58:17 +02:00
Alug a2aeaa51e8 change this to int64 cause it fixes the intermission thing on high res
idk why that fixes it tbh but it does
2024-06-11 10:02:23 +02:00
Alug b558c3db98 more interp fixes 2024-06-11 01:35:22 +02:00
Alug 0f70bcbf28 basic frame skipping system 2024-06-11 01:16:35 +02:00
Alug f7c4600007 remove windows timing crap again
it actually made stuff a little wonky so revert that
2024-06-11 01:15:32 +02:00
Alug 8910f073e5 fix encore flipcam with ogl shearing 2024-06-09 22:02:46 +02:00
Alug ea18be1866 more lööp stuff 2024-06-09 18:49:41 +02:00
Alug 0bd687eb15 reset those here ig 2024-06-09 18:49:33 +02:00
Alug 25b74bf3dd e 2024-06-09 18:14:22 +02:00
Alug e4f9ca3f3c add mobj check here 2024-06-09 18:13:17 +02:00
Alug 38a3f403bd add check earlier in p_killmobj 2024-06-09 18:03:58 +02:00
Alug 51dd2030a0 maybe fix the sock_send crash on windoze
often happens with unstable net
2024-06-08 19:24:16 +02:00
Alug 7e31067e6a fix redifinition warning 2024-06-06 18:57:04 +02:00
Alug 9bf06ff30b disable upx on nix by default 2024-06-06 18:53:40 +02:00
Alug 85aa726bb7 fix masterserver ifdef 2024-06-06 18:47:06 +02:00
Alug 3a67ff3afa fix HAVE_CURL 2024-06-06 18:42:32 +02:00
Alug 0a022a4348 Revert "instant update after screen mode change"
This reverts commit 02bd819f7e.
2024-06-05 14:42:30 +02:00
Alug ad24beea5b more minor loop stuff 2024-06-05 14:42:23 +02:00
Alug 9026ae7a16 minor sprite opitmizations 2024-06-05 02:27:18 +02:00
Alug 2fee9b861f high dpi test 2024-06-05 01:40:57 +02:00
Alug b7e2bcf02e lol 2024-06-05 01:40:39 +02:00
Alug d548848b18 Reapply "use shader to prevent sprite floor clipping"
This reverts commit 5ec1ca46e5.
2024-06-05 01:28:09 +02:00
Alug 4c628ea74f Revert "zzz..."
This reverts commit e19db23bb5.
2024-06-05 01:28:06 +02:00
Alug d3ef97f637 test remove all the networking crap from rendering code 2024-06-04 17:11:30 +02:00
Alug 02bd819f7e instant update after screen mode change 2024-06-04 17:11:12 +02:00
Alug ea3b4ddeb0 smol optimization to skin loading 2024-06-04 17:10:24 +02:00
Alug ab3ea7475f think this should be casted to angle_t 2024-06-04 17:08:09 +02:00
Alug b9b97d0a56 Test: kill unused skin sounds freeslotting 2024-06-03 18:47:59 +02:00
Alug e19db23bb5 zzz... 2024-06-03 17:15:16 +02:00
Alug 5ec1ca46e5 Revert "use shader to prevent sprite floor clipping"
This reverts commit ee2ec01eb9.
2024-06-03 17:11:58 +02:00
Alug c2c918fdda Revert "fix le dispoffset"
This reverts commit f977af6a80.
2024-06-03 17:11:55 +02:00
Alug 4627989401 Make sfxinfo_t and state_t use field tables too 2024-06-03 17:02:27 +02:00
indev 9552e09471 Lua_optoption shouldn't change stack state at the end of call now 2024-06-03 17:02:14 +02:00
indev c8fb25066b Fix compilation for some gcc versions 2024-06-03 17:02:10 +02:00
Alug b1cb6d42f4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-06-03 17:01:22 +02:00
Alug caf7e4a1cf stuffs 2024-06-01 17:03:27 +02:00
Alug 6a5c0223c4 forgor to remove that 2024-06-01 16:31:49 +02:00
Alug 9ff2d66079 fix papersprites in software (hopefully)
lul
2024-06-01 16:29:20 +02:00
Alug 2db2b9309d flexible array stuff for columnofs
hopefully this fixes some crashes or smth
2024-05-31 23:04:26 +02:00
Alug 7a38c15d59 cleanup some super old stuff that did nothing
lul
2024-05-31 22:43:49 +02:00
Alug cb7375f873 theres no value 3 oops
i shouldnt do stuff after waking up at 4 in the morning lol
2024-05-30 19:59:01 +02:00
Alug 41e52f9e88 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-30 19:10:03 +02:00
Alug ce7e30a752 smth smth encore magic numbers idk 2024-05-28 22:38:20 +02:00
Alug 3214811fcb casting stuff 2024-05-28 22:22:58 +02:00
Alug edda2a5399 that should be there lul 2024-05-28 22:22:48 +02:00
Alug 926bc8e72c split sprite draw loops
so crap doesent constantly check for papersprites on all sprites
2024-05-28 20:55:03 +02:00
Alug eadffb6be3 make r_fps if else hell a bit more bearable to look at
lol lmao
2024-05-28 20:28:27 +02:00
Alug cf04e8c23c scale precip size with mobjscale 2024-05-28 20:07:12 +02:00
Alug ec5840f840 scale sprite draw distance with mapobjscale 2024-05-28 20:02:54 +02:00
Alug 7dc4a7177d shut up gcc 2024-05-28 01:07:13 +02:00
Alug 3d91de8178 when not using screentextures draw kart bg on intermission screen 2024-05-28 00:52:40 +02:00
Alug 6ea1abfedc draw a black screen instead of "nothing" during wipes on disabled screentextures
should resolve the intense flashing that can occur
2024-05-28 00:52:09 +02:00
Alug 5251482dd7 Optimize field lookups in Lua metatables
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2024#cd5b5ee262bf5129c4d400ad60d006e1fa917c1f
2024-05-27 18:14:59 +02:00
Alug dd73787c8b Revert "optimize precip thinker"
This reverts commit bc382366a1.
2024-05-25 19:54:20 +02:00
Alug 340450a67e Revert "lol"
This reverts commit 0d40989f4c.
2024-05-25 19:54:13 +02:00
Alug 0d40989f4c lol 2024-05-25 19:00:07 +02:00
Alug c640096d9c Merge remote-tracking branch 'ghghghghghg/lua-hudinterpolate-redux' into lugstuff 2024-05-25 17:23:49 +02:00
indev 76081869e3 Store hooks in a table with integer keys instead of registry with string keys 2024-05-25 15:45:20 +02:00
Alug 9156c1b850 use ternary 2024-05-25 15:44:33 +02:00
Alug d78718d8f4 make only player dust be sparkle otherwise normal driftdust 2024-05-25 15:40:22 +02:00
Alug eef1e986a6 add proper check to sparkle lol 2024-05-25 15:28:41 +02:00
Alug 8fa99c34be Revert "ok kill this again ig"
This reverts commit 98c27fe8ef.
2024-05-25 15:07:07 +02:00
Alug a35fbdd1b5 move some cvars to be registerrerd latur in ogl 2024-05-25 14:50:24 +02:00
Alug 0efef78684 Turn of FBO downsampling when you turn off screen textures
fbo downsampling needs those and if theyre disabled youre essentially seeing nothing at all lol
2024-05-25 14:43:52 +02:00
Alug 62ce17cb4c super smol optimization to R_DrawRepeatMaskedColumn
only maths once not twice lul
2024-05-25 14:37:30 +02:00
Alug 6112be232a revert solidcol stuffs i did ages ago apparently lol 2024-05-25 12:57:41 +02:00
Alug c1a9c58eb5 Cull BSP behind a raised floor or lowered ceiling that covers the entire screen
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/7b8a564f69688515319ccd425f2b88ffe8b7b120
2024-05-25 02:02:06 +02:00
Alug 0393588fe8 Only call the Lua API for overridden actions 2024-05-25 01:35:44 +02:00
Alug b7ff0325ea optimize sight checks 2024-05-25 00:08:14 +02:00
Alug c4d39eae25 declare outside of lööp also add const in r_ 2024-05-25 00:01:58 +02:00
Alug 0e88981425 Cache water trail mobjs from qtpie dev
cant really cherry pick so uuuh
2024-05-23 22:23:39 +02:00
Alug ed7fcae33b Merge remote-tracking branch 'ghghghghghg/lua-hudinterpolate-redux' into lugstuff 2024-05-23 20:29:22 +02:00
Alug 8b967fb3b7 change wöter visual thing 2024-05-23 20:16:37 +02:00
Alug 4d68a5dc2b change names to be less basic 2024-05-23 19:25:04 +02:00
Alug ecd6ef40ef allow gamepad dpad to hold scroll shit in menu aaa
absolute arsepain cant wait to see this breaking kek
2024-05-23 19:11:11 +02:00
Alug 0c9dc33ff0 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-21 21:15:21 +02:00
Alug 98c27fe8ef ok kill this again ig 2024-05-20 22:46:29 +02:00
Alug 3d490f52b2 a 2024-05-20 22:18:17 +02:00
Alug c78c17d953 funny driftsparkle 2024-05-20 22:18:15 +02:00
Alug ee5d667a24 changes to woter thing 2024-05-20 19:23:46 +02:00
Alug b9653b4ff8 unhack the animated votescreen a little
also make it pause when the game is paused like it was intended originally
2024-05-20 17:18:06 +02:00
Alug 78bcfa8cfa conflict moment 2024-05-20 13:40:47 +02:00
Alug 1f1130efda Merge remote-tracking branch 'origin/Saturn' into lugstuff 2024-05-20 13:39:00 +02:00
Alug 3d7b05d633 forgor this crap 2024-05-15 16:54:41 +02:00
Alug 343bbd8a1a support gcc14 ig 2024-05-13 20:48:32 +02:00
Alug f702df48f5 kept forger to declare this 2024-05-13 20:48:21 +02:00
Alug bc382366a1 optimize precip thinker 2024-05-06 01:18:57 +02:00
Alug c158144b7b Revert "refactor weather stuff"
This reverts commit dc95b2e8d7.
2024-05-06 00:33:38 +02:00
Alug d4337fbc56 Revert "optimize-precip-thinker"
This reverts commit e822d8e7d1.
2024-05-06 00:33:36 +02:00
Alug e822d8e7d1 optimize-precip-thinker 2024-05-06 00:32:57 +02:00
Alug dc95b2e8d7 refactor weather stuff
not netsafe
2024-05-06 00:05:16 +02:00
Alug d226ad38ff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-05 22:02:07 +02:00
Alug 2a160c5247 goddamn synched sound effect aaa 2024-05-05 13:00:14 +02:00
Alug 641a9dc4e2 Revert "follower crap cause i want smol spb"
This reverts commit 1b963c9439.
2024-05-04 01:58:58 +01:00
Alug 7e71af8d25 durr water stuff uhhhhhhh
hope this wont break lmao
2024-04-29 10:12:33 +02:00
Alug 8e33d2e1b2 simplify SOFTLIGHT alot
also should make sure it gets applied everywhere lul
2024-04-29 09:12:44 +02:00
Alug 61118b348c Merge remote-tracking branch 'ghg/lua-hudinterpolate-redux' into lugstuff 2024-04-25 18:41:10 +02:00
Alug 84faff82a2 fix rare precip crash 2024-04-25 17:08:02 +02:00
Alug d6cf7cc06f funny wöter from durr 2024-04-25 16:12:53 +02:00
Alug 0688b94729 update libbacktrace windows lib 2024-04-24 21:26:50 +02:00
Alug 695f53194d inline those 2024-04-24 10:59:09 +02:00
Alug 1b963c9439 follower crap cause i want smol spb
will softcode crap sometime idk
2024-04-23 12:47:18 +02:00
Alug b50d6dd389 Merge remote-tracking branch 'origin/it-cv-bigfloat' into lugstuff 2024-04-22 05:26:51 +02:00
Alug 2afad9490e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-22 05:26:36 +02:00
Alug 812a275add fix some visual issues with fofs 2024-04-22 05:24:49 +02:00
Alug 90ccf7699b a 2024-04-20 22:52:22 +02:00
Alug 31ed12d88a some stuff from ceepeepeecheck 2024-04-20 22:36:23 +02:00
Alug 5a4e44d064 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-20 12:34:03 +02:00
Alug 515c67fa3a disable palette rendering if screentextures aint enabled 2024-04-19 06:21:58 +02:00
Alug 81d60165a3 z 2024-04-19 05:08:47 +02:00
Alug cc0fac3546 more things
-Fix a division by zero in BCZ2 Metal Sonic's routine
-Fix a bug where adding the same mod multiple times counted towards the mod limit
and other thigns
2024-04-19 04:49:12 +02:00
Alug d71ad13fcf some smol fixes 2024-04-19 04:22:29 +02:00
Alug 0d13811305 Make FixedRem less laggy by just using the modulo operator. 2024-04-19 03:52:21 +02:00
Alug b69cc4e34a Revert "port thinkerlists + cache and reuse mobjs for the 420th time"
This reverts commit bd8a392882.
2024-04-19 03:38:59 +02:00
Alug caf8f383ad Revert "change a few things"
This reverts commit c5c61f7692.
2024-04-19 03:38:55 +02:00
Alug 7db160a8e2 Revert "i dont understand this crap so ill revert it"
This reverts commit 7e895f82b2.
2024-04-19 03:38:52 +02:00
Alug 202a3d1fb1 Revert "some cleanup"
This reverts commit 332135fc6f.
2024-04-19 03:38:49 +02:00
Alug 332135fc6f some cleanup 2024-04-18 23:10:35 +02:00
Alug 7e895f82b2 i dont understand this crap so ill revert it 2024-04-18 14:14:51 +02:00
Alug c5c61f7692 change a few things 2024-04-18 13:40:27 +02:00
Alug bd8a392882 port thinkerlists + cache and reuse mobjs for the 420th time
i am in pain
2024-04-18 12:07:57 +02:00
Alug 36183e6dc8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-17 05:34:51 +02:00
Alug 5ae4af54da smth smth paranthesis 2024-04-12 21:55:45 +02:00
Alug 620bdd1419 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-04-12 20:41:16 +02:00
Alug c18eacbb81 fix software crash
Zzz...
2024-04-12 20:41:10 +02:00
Alug bb8acc5f51 fkldjnasofjosdfoisfj 2024-04-11 19:48:42 +02:00
Alug d41f4810d7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-11 18:39:58 +02:00
indev 387c4edb3b Fix potential negative array index in V_ThinStringWidth 2024-04-11 18:00:01 +02:00
Alug c3fd7c1a7a grrrr 2024-04-10 18:21:11 +02:00
Alug 94f1ec18de Revert "fix ifdefs"
This reverts commit 5e8e2f4b3a.
2024-04-10 18:19:24 +02:00
Alug e00f8f6cee Revert "Zzz..."
This reverts commit 79b0a9c833.
2024-04-10 18:19:21 +02:00
Alug 79b0a9c833 Zzz... 2024-04-10 18:15:42 +02:00
Alug 5e8e2f4b3a fix ifdefs 2024-04-10 17:59:41 +02:00
Alug f0158dd915 move this to first init too 2024-04-10 17:58:06 +02:00
Alug 10cf251b46 that wasnt the onchange im sleepy 2024-04-10 17:40:35 +02:00
Alug 72231e5658 forgor to remove those Zzz... 2024-04-10 17:32:06 +02:00
Alug c510ff3b1c should throw that into onchange oops 2024-04-10 17:29:08 +02:00
Alug 936e138fee throw stuff into own function, also check on game start 2024-04-10 17:24:03 +02:00
Alug 8325696b55 put those in 1st init 2024-04-10 07:05:38 +02:00
Alug d63f517ae5 simplify this crap 2024-04-10 07:02:03 +02:00
Alug e74df8db90 raise max fpscap 2024-04-10 06:47:45 +02:00
Alug 1a0bf67452 Merge remote-tracking branch 'origin/fborender' into lugstuff 2024-04-09 17:38:44 +02:00
Alug f0df9b399b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-05 17:40:19 +02:00
Alug f9345308ff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-05 01:45:11 +02:00
Alug 6ed7c75448 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-04 03:57:32 +02:00
Alug cb71167fb7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 16:40:37 +02:00
Alug d4292987cc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 16:14:35 +02:00
Alug 5da24a18dc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 15:54:06 +02:00
Alug 1cf7b3e697 tf 2024-04-02 03:51:36 +02:00
Alug 3f3672497b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 03:49:01 +02:00
Alug 7714304c7a Merge remote-tracking branch 'origin/Saturn' into lugstuff 2024-04-01 19:15:13 +02:00
Alug ff640639b2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-01 03:52:55 +02:00
Alug 0965603c8f Merge remote-tracking branch 'origin/interpjitter' into lugstuff 2024-04-01 03:52:52 +02:00
Alug b8412cec96 Fix minor off-by-one error in faketic calculation 2024-03-31 23:22:26 +02:00
Alug 86b7e192b2 fix this for splitscreen and move to own function 2024-03-30 03:34:38 +01:00
Alug 32b9e6094b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-28 15:07:00 +01:00
Alug 3ff7f3158b why tf is that here 2024-03-28 14:58:44 +01:00
Alug bd83ba8ca9 when the GLENCORE 2024-03-28 13:21:58 +01:00
Alug 785881c90e fixeur compile for qt 2024-03-28 12:23:07 +01:00
Alug 567ccf8a59 use this instead 2024-03-28 08:13:16 +01:00
Alug 11423a6d78 fix highresscale issue on startup in the worst way ever cause CV_NOINIT doesent work for whatever reason 2024-03-28 00:15:44 +01:00
Alug ab6b716e78 Read only header bytes when creating textures list 2024-03-27 21:31:45 +01:00
Alug 7b1be2e34f Ehh this thing is enough tbh 2024-03-27 20:32:14 +01:00
Alug 19d0d247b4 right v6 lul 2024-03-27 18:26:20 +01:00
Alug 1074a9e1d2 Prevent dropped ticcmds due to interp timing jutter
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2046
2024-03-27 18:17:27 +01:00
Alug 0648f384bb kill some stuff that did nothing 2024-03-27 18:13:39 +01:00
Alug 58d72204cc offline play menu pauses game so gib cool vhs effect 2024-03-27 15:51:47 +01:00
Alug 067b4c260f handle async vsync fail better
a
2024-03-27 14:44:02 +01:00
Alug 9e7e4d5fe7 testing smth
yes -1 is valid for this sometimes
2024-03-27 12:11:45 +01:00
Alug 7d9609be76 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-27 04:35:47 +01:00
Alug 7e510f8bc5 Merge remote-tracking branch 'origin/texload' into lugstuff 2024-03-26 20:42:39 +01:00
Alug a16e009370 make custom buttons bindable to joyaxis
triggers and such
2024-03-25 21:13:47 +01:00
Alug a021c497b6 forgor to remove this 2024-03-25 17:22:21 +01:00
Alug e77159cb58 remove this too 2024-03-24 20:18:31 +01:00
Alug 36ac353f1f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 20:16:27 +01:00
Alug 58122bf023 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 18:30:21 +01:00
Alug c5da23bb02 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 16:56:14 +01:00
indev fd45391616 Fix drift sound keep playing when player go off ground 2024-03-24 15:12:02 +01:00
Alug 11dd80e4e7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 15:11:53 +01:00
Alug 298f8ef842 Fix crash when passing a long string to v.drawString
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2403
2024-03-24 15:10:14 +01:00
Alug 4c45b9fb85 dfsafsdf 2024-03-23 19:13:14 +01:00
Alug 599cea3238 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-23 19:08:59 +01:00
Alug 0c5685e9eb dont need this anymore now 2024-03-23 18:07:58 +01:00
Alug 760b82fd63 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-23 18:07:08 +01:00
Alug 340034adf7 this can be just M_PI 2024-03-21 12:52:40 +01:00
Alug d978bfd0db Revert "Add common I_GetSysName function"
This reverts commit f3eedc03e6.
2024-03-21 12:40:44 +01:00
Alug de9f9722ac reapply hacky scaling thing 2024-03-21 12:38:50 +01:00
Alug 4dd9dc03fe ok git 2024-03-21 12:37:58 +01:00
Alug 47fc4aa39a Merge remote-tracking branch 'ghg/hud-uncap' into lugstuff 2024-03-21 12:36:29 +01:00
Alug 84ad608d70 Revert "software sdl windows scaling quality setting"
This reverts commit 7ee6de6b6a.
2024-03-21 12:35:00 +01:00
Alug d4dd0c9992 conflict fix 2024-03-21 12:33:43 +01:00
Alug ac93d027af Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-21 12:31:01 +01:00
Alug 190a95584c SFC32 for M_random funcs
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1780
2024-03-19 11:15:23 +01:00
Alug 9ad368e420 e 2024-03-17 23:32:09 +01:00
Alug a524215479 add the note so i dont forger if i wanna update this again 2024-03-17 22:43:05 +01:00
Alug 6104c36455 properly link libopenmpt
one dll instead of 4
2024-03-17 22:37:18 +01:00
Alug a04287c9f6 cute icon 2024-03-17 19:29:40 +01:00
indev 99876e3f73 Fix 'cast to non-matching type' warning 2024-03-17 14:57:02 +01:00
indev f16f498f27 Add include guard for qs22j.h 2024-03-17 14:56:37 +01:00
indev 4f9b5923bd Add snap to top flag for pause gfx 2024-03-15 12:54:06 +01:00
Alug 84476cd51f this didnt work 2024-03-15 11:32:33 +01:00
Alug bf9a6bde82 test this 2024-03-15 11:32:24 +01:00
Alug a6f8f57725 testing smth 2024-03-14 07:44:07 +01:00
Alug 02f4c334f0 mhhm ternaries 2024-03-13 22:06:45 +01:00
Alug 9884b294c6 i want to see more precip thx 2024-03-13 21:55:23 +01:00
Alug 49f22b5790 revert some stuff that broke some stuff 2024-03-13 19:25:14 +01:00
Alug 841270e824 fix ogl precip interpolation 2024-03-13 17:56:08 +01:00
Alug 630ce57303 this looks better lul 2024-03-13 13:18:30 +01:00
Alug 94aed4d1d1 clean up 2024-03-13 10:16:07 +01:00
Alug cdc0ec96a9 forgor menu stuff 2024-03-13 10:07:51 +01:00
Alug 751188bcd8 remove xs_CRoundToInt
while ye, less exact stuff doesent matter too much in the context of doom, it matters more in kart, due to polygon rendering and seg processing being extremely heavy and also generally more complex maps
2024-03-13 10:06:56 +01:00
Alug c0c44d46bc Ensure opaque midtextures always use PF_Masked 2024-03-13 08:48:04 +01:00
Alug 19d8749abf Revert "inline some things"
This reverts commit 0b47c310eccf55871a5bd466f44afa3215cc1322.
2024-03-13 08:35:47 +01:00
Alug c6f9fb2ac2 Revert "optimize "p_pointon" functions"
This reverts commit b9b963f999b902ab7f0f6fae4ec61264e713e15e.
2024-03-13 08:35:44 +01:00
Alug b1cfdfbc14 Revert "optimize fixedhypot"
This reverts commit ae68bd577558f45b81741396a899b7c311f753fc.
2024-03-13 08:35:41 +01:00
Alug 360df11aa6 Revert "LUT for bmapwidth imul instructions."
This reverts commit e45a7f911f0d156b7cc38675bec1a14a2080c367.
2024-03-13 08:35:30 +01:00
Alug d88cc3251f Revert "fix some oopsies"
This reverts commit 578770818ed96e366bbe9ed5ede720de07c0000a.
2024-03-13 08:35:27 +01:00
Alug cd7079da92 Revert "Zzz...."
This reverts commit e05197af882049e555c4116d1e6b4fd5ec4e879d.
2024-03-13 08:35:24 +01:00
Alug 77a0e8213b Revert "Zzz... 2"
This reverts commit bdd32702f9dc3ccbefb6444f1b76329b8ddbc9d7.
2024-03-13 08:35:20 +01:00
Alug 5efa778509 Revert "adjust the pointon funcs again"
This reverts commit b5861b2beeb04b6de1fcbd2088069374658f31ee.
2024-03-13 08:35:12 +01:00
Alug 02e6463fae Revert "P_PointOnDivlineSide stuff"
This reverts commit 1fa738d46448bd716547aa1812e38ec0de2221d1.
2024-03-13 08:35:09 +01:00
Alug b411787fe7 Revert "forgor"
This reverts commit 28950e6a15a3350da9a7441d81e3e043985a6c8d.
2024-03-13 08:34:59 +01:00
Alug 8fd91194a7 hm 2024-03-13 07:36:52 +01:00
Alug 4f85e1d603 revert that part 2024-03-13 07:34:12 +01:00
Alug fae0aeb442 Revert "Revert "forgor""
This reverts commit a1afcbc855.
2024-03-13 07:31:56 +01:00
Alug ec77824a96 Revert "Revert "dont inline those""
This reverts commit ae829375a0.
2024-03-13 07:31:53 +01:00
Alug 4127936eef optimize HWR_AddLine and HWR_ProcessSeg 2024-03-13 07:28:16 +01:00
Alug ae829375a0 Revert "dont inline those"
This reverts commit 2e34de8a125644dd7a0689af28b2076cf4c92e21.
2024-03-13 06:51:26 +01:00
Alug a1afcbc855 Revert "forgor"
This reverts commit e1e3aa899d.
2024-03-13 06:51:21 +01:00
Alug e1e3aa899d forgor 2024-03-13 06:07:59 +01:00
Alug 2644a3bf6e dont inline those 2024-03-13 06:03:19 +01:00
Alug 6b4e81e1ec P_PointOnDivlineSide stuff 2024-03-13 06:00:37 +01:00
Alug c705a0f35a adjust the pointon funcs again 2024-03-13 04:51:48 +01:00
indev b1b3102b31 If game crashes in level, add it to crash report 2024-03-12 18:51:00 +01:00
Alug 2d823d34f9 Fix buffer overrun in I_ClipboardPaste
https://git.do.srb2.org/STJr/SRB2/-/commit/9772bbeda172bc60482f137fc465e12070c76f22
2024-03-12 18:50:55 +01:00
Alug 1bb9fb2c67 cant override crap, thx msys 2024-03-12 18:27:55 +01:00
Alug b90e3ce9da i will add those in compiler flag instead 2024-03-12 18:19:12 +01:00
Alug e04a074a79 Revert "condensetics"
This reverts commit 87001f7e78.
2024-03-12 16:30:00 +01:00
Alug f98c3311af Zzz... 2 2024-03-12 16:21:42 +01:00
Alug 1a8c44af27 Zzz.... 2024-03-12 16:20:32 +01:00
Alug a57089c1a9 fix some oopsies 2024-03-12 16:16:40 +01:00
Alug 87001f7e78 condensetics 2024-03-12 16:06:12 +01:00
Alug 1fbb05c938 LUT for bmapwidth imul instructions. 2024-03-12 15:28:12 +01:00
Alug 3eef9d3b62 inline blockthing iterator aswell 2024-03-12 14:27:15 +01:00
Alug af2adf0134 remove some suff 2024-03-12 14:02:46 +01:00
Alug bbdfee8d33 optimize fixedhypot 2024-03-12 12:58:17 +01:00
Alug 2c4da83502 optimize "p_pointon" functions 2024-03-12 10:47:27 +01:00
Alug 75f2868971 inline some things 2024-03-12 02:13:35 +01:00
Alug 87d9ecc3c8 midi music bros 2024-03-11 23:52:26 +01:00
indev b637943bd9 Add snap to bottom flags for race countdown and level title too 2024-03-11 22:30:45 +01:00
Alug 0514475155 uuuuh 2024-03-11 22:30:37 +01:00
Alug 8cfb39e035 sort grid when opening skin menu instead of everytime a skin is added 2024-03-11 21:01:43 +01:00
Alug a9a7cb7be0 i 2024-03-11 12:58:22 +01:00
Alug f8649a24aa those can all be static 2024-03-11 11:54:32 +01:00
Alug ee5a860e07 more opitmizations stuff 2024-03-11 11:47:05 +01:00
Alug e6f03c1136 can do that directly 2024-03-11 11:22:08 +01:00
Alug 780162f516 optimize hwr_renderbpsnode
actually just make it behave like the software version lol
2024-03-11 11:00:14 +01:00
Alug a6d32d834b make 64 default again 2024-03-11 04:27:52 +01:00
Alug cef3c7f032 remove pseudoangle as its slower 2024-03-11 04:25:41 +01:00
Alug 07f8a532f9 attempt at unfucking renderview 2024-03-11 03:40:13 +01:00
Alug 352adf526a give this a better name lol 2024-03-11 02:22:40 +01:00
Alug df48f9caf9 actually move stuff back to hw_clip lmao 2024-03-11 02:15:34 +01:00
Alug f611053d4f replace server list sorting with qs22j 2024-03-10 20:28:27 +01:00
indev 39011cd93b Snap viewpoint text to bottom 2024-03-10 19:54:20 +01:00
Alug 562cb8cebd clean up stuff a little 2024-03-10 18:50:38 +01:00
Alug 89ae721421 i am in pain 2024-03-10 17:59:24 +01:00
Alug f65f4b32e2 Revert "remove pseudoangle"
This reverts commit c5d6ac63c5.
2024-03-10 15:19:36 +01:00
Alug 303fca6bcc smol adjustment 2024-03-10 04:39:55 +01:00
Alug 4aba159ee8 clean up this mess 2024-03-10 04:25:59 +01:00
Alug 5838e60bf6 fix overflow stuffs 2024-03-10 03:43:21 +01:00
Alug 527e436d57 Revert "stuffs"
This reverts commit 60ede73ff8.
2024-03-09 14:06:18 +01:00
Alug 60ede73ff8 stuffs 2024-03-09 13:43:06 +01:00
Alug 298d5e95fc unfuck thinker crap 2024-03-09 13:34:34 +01:00
Alug e9a68f0b7d forgor 2024-03-09 12:02:20 +01:00
Alug d613cf4d4c sUgGeSt PaReNtHeSeS ArOuNd '&&' 2024-03-09 12:01:18 +01:00
Alug 3487fae95d simplify this crap 2024-03-09 10:51:32 +01:00
Alug 9ee47a071b oops 2024-03-09 10:22:20 +01:00
Alug 3579fc3dea remove this 2024-03-09 10:11:06 +01:00
Alug 921bff19f1 add toggle for old fps counter behaviour
idk people hate the new one so brap
2024-03-09 07:58:14 +01:00
Alug d07420eaeb fix compile for everyone but me lmao 2024-03-09 07:40:38 +01:00
Alug 8028db77d8 implicit declaration of deez nuts 2024-03-09 07:12:56 +01:00
Alug e49a059783 fix dumbass compiler warnings + reformat it a bit 2024-03-09 07:12:18 +01:00
Alug 482b6e6844 use it for other stuff 2024-03-09 07:02:16 +01:00
Alug aa70635919 dont think this should write to relplays 2024-03-09 02:00:40 +01:00
Alug c331b0fa89 e 2024-03-09 01:59:27 +01:00
Alug fe55744de2 a 2024-03-09 00:57:40 +01:00
Alug 15e9d85a14 Revert "Revert "avx destruction idk""
This reverts commit f547020fc5.
2024-03-09 00:54:33 +01:00
Alug 51043b61a1 Revert "cache and reuse mobjs again"
This reverts commit 04455c9625.
2024-03-08 23:43:52 +01:00
Alug 6620d5fb26 faster qsort for rendering 2024-03-08 15:03:58 +01:00
Alug f547020fc5 Revert "avx destruction idk"
This reverts commit 4fdb2174f0.
2024-03-08 11:14:42 +01:00
Alug 89ea473c3b fix shit on party cruiser
well fixing the cullplane broke party cruiser, so im just gonna give it the same parameters as the software version i guess idk
2024-03-08 01:19:25 +01:00
Alug b60d9d0be7 readd this cause i dumb 2024-03-08 01:19:15 +01:00
Alug 4fdb2174f0 avx destruction idk 2024-03-08 00:15:43 +01:00
Alug 06a48584d6 expose this cause i want to use it in local scripts 2024-03-08 00:09:08 +01:00
Alug e9f9c1009d more mobj stuffs 2024-03-07 00:35:26 +01:00
Alug b66ceda525 Revert "attempt at exclusive fullscreen mode"
This reverts commit 19f1d8b847.
2024-03-06 09:27:09 +01:00
Alug 7c9c28f026 Revert "use desktop resolution for stuff"
This reverts commit a54384a579.
2024-03-06 09:27:06 +01:00
Alug 72f0552ef1 Revert "reset windowsize on normal fullscreen mode"
This reverts commit 85c7216eaa.
2024-03-06 09:26:59 +01:00
Alug 877a1f15a9 Revert "multidisplay stuff + only activate framebuffer for downsampling"
This reverts commit 5f58e7b343.
2024-03-06 09:26:46 +01:00
Alug efa2a68805 Revert "Zzz... moment"
This reverts commit 8cec2dab82.
2024-03-06 09:26:43 +01:00
Alug 023209bb76 Revert "only do things here when theres more than one display"
This reverts commit 9eb68bf052.
2024-03-06 09:26:38 +01:00
Alug da5dcde6ee Revert "wait uhhhh"
This reverts commit 875adb17b1.
2024-03-06 09:26:33 +01:00
Alug e92c5e1bf9 Revert "ugh this still takes the wrong display blergh"
This reverts commit 298b4d23e8.
2024-03-06 09:26:30 +01:00
Alug 2b7c4ae76c Revert "ill just uhhhhh use main display stuff for now idk"
This reverts commit a2d0ea9d11.
2024-03-06 09:26:24 +01:00
Alug ea26db2cbd Revert "change things a bit"
This reverts commit 9c42b77879.
2024-03-06 09:26:21 +01:00
Alug b9e3747f99 Revert "forgor"
This reverts commit 4d608b7f37.
2024-03-06 09:26:19 +01:00
Alug 4d608b7f37 forgor 2024-03-06 09:20:21 +01:00
Alug 9c42b77879 change things a bit 2024-03-06 09:19:17 +01:00
Alug a2d0ea9d11 ill just uhhhhh use main display stuff for now idk 2024-03-06 08:07:40 +01:00
Alug 298b4d23e8 ugh this still takes the wrong display blergh 2024-03-06 07:59:31 +01:00
Alug 875adb17b1 wait uhhhh 2024-03-06 07:42:46 +01:00
Alug 9eb68bf052 only do things here when theres more than one display 2024-03-06 07:39:36 +01:00
Alug 8cec2dab82 Zzz... moment 2024-03-06 07:36:28 +01:00
Alug 5f58e7b343 multidisplay stuff + only activate framebuffer for downsampling
idk i hope this shit works lmao
also moved some things in OglSdlSurface so it doesent intialize certain things everytime we change framebuffer shit
2024-03-06 07:26:53 +01:00
Alug 28bb88e9b4 Dynamically allocate space for a state's action field
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1478
2024-03-06 04:39:29 +01:00
Alug 04455c9625 cache and reuse mobjs again
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2200
2024-03-06 04:14:21 +01:00
Alug 9853150e57 Merge remote-tracking branch 'origin/maybemobjcrashfixes' into lugstuff 2024-03-06 00:26:24 +01:00
Alug 85c7216eaa reset windowsize on normal fullscreen mode 2024-03-05 02:15:06 +01:00
Alug a54384a579 use desktop resolution for stuff 2024-03-05 02:02:02 +01:00
Alug 19f1d8b847 attempt at exclusive fullscreen mode 2024-03-05 01:44:10 +01:00
indev 8270b64624 Make custom cvar menu bit wider 2024-03-04 23:52:45 +01:00
indev 81e3810c32 Don't add string cvars (a bit hacky solution) 2024-03-04 21:08:05 +01:00
Alug c266151071 change some numbers uuuuuh 2024-03-04 20:17:18 +01:00
Alug 27d55260e8 remove minmax sliders 2024-03-04 19:45:49 +01:00
Alug 233583657e oops 2024-03-04 19:04:51 +01:00
Alug 7bb1eed249 dont do stuff for anything thats not in normal us ascii or smth 2024-03-04 18:34:09 +01:00
Alug aa85fc3787 dont use it for control setup 2024-03-04 18:13:18 +01:00
Alug c9a88617b1 only use this for text inputs not gameplay 2024-03-04 17:46:45 +01:00
Alug 2f899fdfcc make it even simpler 2024-03-04 05:24:41 +01:00
Alug cdd2b6560e i will just use my compilers memcpy thx 2024-03-04 05:19:54 +01:00
Alug 60f29edbca turn it off completely when your gpu cant use it 2024-03-04 02:51:12 +01:00
Alug 60cffe1ed1 unhack framebuffer functions a little 2024-03-04 02:47:42 +01:00
Alug e77e7d1643 o 2024-03-04 01:13:23 +01:00
Alug 5dc22f502e dont need this 2024-03-04 00:45:14 +01:00
Alug 7a309c1175 when the ;; 2024-03-04 00:13:21 +01:00
Alug 9ce5baad9e fix ogl freelook breaking with shearing enabled
also removed uneeded stuff
2024-03-03 08:40:24 +01:00
Alug a4aa9a76f2 should only do that when rendering stuff 2024-03-03 07:57:46 +01:00
Alug befa25de5c add missing interpolators in mapload 2024-03-03 07:50:02 +01:00
Alug 83175d5c09 bruh
im going insane
2024-03-03 06:45:37 +01:00
Alug d8df8e8778 Revert "Revert "we have functions for that dont check for slopes everywhere""
This reverts commit 09957d0279.
2024-03-03 05:51:35 +01:00
Alug 09957d0279 Revert "we have functions for that dont check for slopes everywhere"
This reverts commit 46da9bf98b.
2024-03-03 05:34:01 +01:00
Alug 9e44985f56 Do not reload every texture when adding a wad
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725?commit_id=37add34b9c729b21e624e22d64159073c9258e25
2024-03-03 05:18:37 +01:00
Alug b657a84699 Split R_LoadTextures 2024-03-03 04:53:15 +01:00
Alug 5ec7835556 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-03-03 04:34:59 +01:00
Alug 03a864156d fix conflict 2024-03-03 04:34:53 +01:00
Alug c823bf3320 Revert "multithread exec command and some filesearch/add stuff"
This reverts commit 0d7025f714cbef34ca6e92e683561df411fa149a.
2024-03-03 04:32:13 +01:00
Alug 4f4d2f1f4c clean up r_segs 2024-03-03 03:13:46 +01:00
Alug 1bb389052d fix this 2024-03-02 23:36:48 +01:00
Alug 31fdc5bbc1 dont need to check if we dont use it 2024-03-02 22:56:26 +01:00
Alug db3833430d we have functions for that dont check for slopes everywhere
the functions already do it for us anyways
2024-03-02 22:33:34 +01:00
Alug 6d2212d259 move sprite mobj checks first 2024-03-02 21:56:39 +01:00
Alug 912c0e7fc4 check for those i guess 2024-03-02 18:36:34 +01:00
Alug 43d232819a forgor screenspace clipping 2024-03-02 18:25:13 +01:00
Alug 302eaf60b5 GetScreenCoord lua parity 2024-03-02 17:36:59 +01:00
Alug 84535faa90 remove more unused stuff 2024-03-02 15:57:25 +01:00
Alug 8c55d3c705 bruh 2024-03-02 13:23:50 +01:00
Alug ec11b9268f did not mean to commit this lul 2024-03-02 03:33:26 +01:00
Alug a45af4a80c i 2024-03-02 03:18:27 +01:00
Alug df627b6830 a 2024-03-02 03:11:06 +01:00
Alug dfbeaf30ad m 2024-03-02 03:10:47 +01:00
Alug a03f74b125 add this 2024-03-02 03:05:36 +01:00
Alug 1a01f1299c fix compiler complains
those were for coronas code which we dont even have
2024-03-02 02:43:53 +01:00
Alug 91f0cdbaca unhack palrendering screentex stuff 2024-03-02 02:15:28 +01:00
Alug e50bd4125d e 2024-03-02 02:07:54 +01:00
Alug ded2c8a7c8 a 2024-03-02 02:03:22 +01:00
Alug 88ce9fc0a6 more stuffs 2024-03-02 02:02:03 +01:00
Alug 3c713248b3 more shader stuff 2024-03-02 01:53:11 +01:00
Alug 75f3edcd92 shader stuffs 2024-03-02 01:50:35 +01:00
Alug 081a7779a6 make netvars red 2024-03-02 01:32:12 +01:00
Alug 6e995207a6 smh 2024-03-02 01:15:03 +01:00
Alug 3492b77aa0 we dont have IT_CV_FLOATSLIDER so dont even need to check for float 2024-03-02 01:14:36 +01:00
Alug e864901035 Options Menu for custom console variables
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2380#9cc73f4b99ff925448389969b0ade6ba3947fc31
2024-03-02 01:09:10 +01:00
Alug 7ee6de6b6a software sdl windows scaling quality setting 2024-03-01 23:12:23 +01:00
Alug 553b8ccf6b Revert "i am in pain"
This reverts commit e0e75eac33.
2024-03-01 15:26:57 +01:00
Alug bceef0b861 Fix nametag offsets with reverse gravity and flipcam 2024-03-01 15:24:04 +01:00
Alug 53cce6c6bb this does not exist 2024-03-01 02:31:55 +01:00
Alug b95047d09f fix vertical flip driftgauge
and make non flipcam behave like the sg lua version
2024-03-01 01:53:17 +01:00
Alug c6cb4375f5 fix shearing offset with flipcam in K_GetScreenCoords 2024-03-01 01:03:03 +01:00
Alug a07e2b8eda only check for stplayer flipcam
until i figure out a better way to check all of this crap
2024-02-29 23:08:24 +01:00
Alug 98e7002167 z 2024-02-29 16:22:07 +01:00
Alug 3428dde3c6 test 2024-02-29 05:37:21 +01:00
Alug 13d48f982b just make it like this 2024-02-29 00:27:37 +01:00
Alug b2e4dc27e4 give me a little more info on vanilla scoreboard but a bit ugly lul 2024-02-29 00:22:50 +01:00
Alug deddeab049 stimky ugly 2024-02-28 22:31:06 +01:00
Alug c3a6410822 Revert "dont need SEENAMES"
This reverts commit 01172bca77.
2024-02-28 22:06:02 +01:00
Alug c5915091aa kill have_blua 2024-02-28 21:53:59 +01:00
Alug 4401f0659e kill delfile 2024-02-28 18:58:04 +01:00
Alug a0c72d32e8 kill weighted recycling 2024-02-28 18:38:54 +01:00
Alug 1493045ec4 this doesent even exist anymore lmao 2024-02-28 18:33:12 +01:00
Alug 210efb2be7 kill eslope_typeshim 2024-02-28 18:26:54 +01:00
Alug a02fc1de63 kill GL_SHADERS 2024-02-28 18:19:11 +01:00
Alug 7755bfc861 Zzz... 2024-02-28 18:05:24 +01:00
Alug 01172bca77 dont need SEENAMES
esp when we get nametags its obsolete
2024-02-28 17:58:06 +01:00
Alug 143cbc8587 kill polyobjects ifdef 2024-02-28 17:55:47 +01:00
Alug b65f655a8a update libcurl to 7.69.0 2024-02-28 15:23:54 +01:00
Alug ed04c86369 u 2024-02-28 04:53:42 +01:00
Alug c0eaa17eb3 e 2024-02-28 04:51:13 +01:00
Alug 6383a55038 kill hw_trick 2024-02-28 04:47:55 +01:00
Alug 574df60d58 kill eslope 2024-02-28 04:40:03 +01:00
Alug 61ee575cd3 forgor this 2024-02-28 04:11:39 +01:00
Alug bdd963081e OpenGL: Fix linedef type 10 not culling FOFs 2024-02-28 03:50:43 +01:00
Alug 6b908d7a14 missed those 2024-02-27 22:16:52 +01:00
Alug 7d0d70c094 oopsie 2024-02-27 22:11:32 +01:00
Alug e75c5a9248 delete half of srb2 2024-02-27 21:49:31 +01:00
Alug b8ed5f4f1a dont need this anymore 2024-02-27 21:36:57 +01:00
GenericHeroGuy 660d7060e4 Don't return aggregates 2024-02-27 20:24:46 +01:00
Alug 79c5f57714 Merge remote-tracking branch 'origin/joinrefusemessage' into lugstuff 2024-02-27 20:03:47 +01:00
Alug 606d8fbe55 optimize gif palette creation 2024-02-27 20:01:56 +01:00
Alug edfa116a40 a 2024-02-27 18:38:28 +01:00
Alug 55ca0c712f add dynamic gif delay
fixes issues with low framerates, uncapped and stutters
2024-02-27 17:41:40 +01:00
Alug 16bef488ee no idea how that ever got there 2024-02-27 15:52:50 +01:00
Alug 82d784d9f8 Toggle for R_Pointtoangle Ex or 64
Ex may perform better on 32bit clients and some cpus so lets just make it toggable
2024-02-27 15:52:34 +01:00
indev 103fb2dfc1 Don't return NULL when creating MT_NULL mobj, since it is needed in some parts of game 2024-02-27 13:29:20 +01:00
Alug bba3e1810b add this 2024-02-27 05:14:05 +01:00
Alug af5333f63e fix P_PlayerInPain 2024-02-27 05:07:44 +01:00
Alug ea77a5fb53 Fix con_hudlines being off by one, Fix con_hudtime overflow 2024-02-27 05:07:11 +01:00
Alug a4aef0894b fix compile for qt 2024-02-26 23:48:47 +01:00
Alug bab7972518 Put HTTP downloading on a background thread
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2322
2024-02-26 23:37:54 +01:00
Alug 88853a7aee make the menus a little prettier 2024-02-26 22:01:11 +01:00
Alug d3339df853 toggle for showing nametags during spectating 2024-02-26 22:00:53 +01:00
Alug 385614b448 add toggle for showing nametags after you finished a race
off by default to match sg nametags
2024-02-26 21:19:59 +01:00
Alug c47ba80f5d death 2024-02-26 20:58:58 +01:00
Alug 6de0700f49 use V_LocalTransFlag for driftgauge 2024-02-26 20:58:50 +01:00
Alug d9fe52b1a1 use V_LocalTransFlag for nametags 2024-02-26 20:58:39 +01:00
Alug ccfc476ec0 replace SCR_FPSflags with V_LocalTransFlag
so we can actually display hud transparency stuff before the hud appears, since that doesent work with V_HUDTRANS
2024-02-26 20:58:18 +01:00
Alug f518b3c48b e 2024-02-26 20:04:12 +01:00
Alug 81d52db722 Revert "connect loadingscreen should clear menus"
This reverts commit 6b41cf676c.
2024-02-25 23:42:30 +01:00
Alug df9973da99 fix tagsdisplayed counter 2024-02-25 21:32:25 +01:00
Alug ca4c779c66 dont quit addon downloading with the mousewheel lmao 2024-02-25 19:47:52 +01:00
Alug 7897352175 connect loadingscreen should clear menus 2024-02-25 19:42:21 +01:00
Alug e0e75eac33 i am in pain 2024-02-25 19:06:32 +01:00
Alug 31d83dd26e disable driftgauge by default 2024-02-25 18:35:00 +01:00
Alug 698a0b811f disable nametag by default 2024-02-25 18:34:46 +01:00
Alug f69609b403 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-02-25 18:21:12 +01:00
Alug 56259e3476 lua hud disable option for driftgauge 2024-02-25 18:21:03 +01:00
Alug f3dfa53f31 lua hud disable option for nametags 2024-02-25 18:21:03 +01:00
Alug e10d60c08e hud disable option for driftgauge 2024-02-25 18:20:32 +01:00
Alug ad4037351f hud disable option for nametags 2024-02-25 18:20:19 +01:00
NepDisk f9e1da8c9f Add coloring to large numbers 2024-02-25 17:34:12 +01:00
NepDisk 2f05137af7 Fix fillbar 2024-02-25 17:34:08 +01:00
Alug c305e31c2e fix first person splitscreen driftgauge stuff a 2024-02-25 12:21:57 +01:00
Alug a55fabe4f9 k... 2024-02-25 12:12:18 +01:00
Alug c58848b298 add splitscreen to screencoords and fix splitscreen for driftgauge 2024-02-25 12:10:23 +01:00
Alug ede644d3c4 use SleepEX on windows and set the min sleep duration to 16ms 2024-02-25 04:08:25 +01:00
Alug 4ff98e62a9 actually disable it for splitscreen for now
its botched and needs fixing
2024-02-24 20:32:15 +01:00
Alug e87fd2fff6 dont draw driftgauge when not using chasecam 2024-02-24 20:14:52 +01:00
indev 33e8b10579 Don't need for long there, fixed_t is big enough 2024-02-24 20:05:12 +01:00
Alug d11780f62d add -1 check for driftgauge too 2024-02-24 20:05:07 +01:00
Alug 7706aa0bf0 fix conflict 2024-02-24 16:56:28 +01:00
Alug cf96e10552 Revert "Refactor Batching code"
This reverts commit 8d737c96c9.
2024-02-24 16:49:04 +01:00
Alug 1d01e1e6cd Revert "Optimize polygon sorting on batch renderer"
This reverts commit 1687fb9120.
2024-02-24 16:48:14 +01:00
Alug a5c4759662 disable driftgauge in record attack
it actually gives you an advantage over using other clients
record attack should be fair and even
2024-02-24 15:58:47 +01:00
Alug e7ff1d693b fix K_GetScreenCoords y clipping 2024-02-24 15:38:32 +01:00
Alug 9b4354a057 rename all of those to not conflict with mods 2024-02-24 14:46:13 +01:00
Alug 51a46ba92c this aswell 2024-02-23 01:35:49 +01:00
Alug 31c4e0d59f forgor those aswell 2024-02-23 01:27:52 +01:00
Alug 6b246548c3 raise compile time significantly 2024-02-22 23:58:28 +01:00
Alug 57dda3843a use the current not old state
also add dont interp precip angle if it doesent change
2024-02-22 23:45:56 +01:00
Alug b04ac14751 remove redundant check 2024-02-22 23:45:53 +01:00
Alug 5ad8497db2 those too 2024-02-22 22:53:10 +01:00
Alug 672f07a5ee forgor those 2024-02-22 22:46:58 +01:00
Alug aceffafc4e fix ternary hell for palette rendering lightlevels 2024-02-22 21:42:28 +01:00
Alug 891b3183ed dont interpolate unchanging things + remove unused dynslope interp code 2024-02-22 19:55:45 +01:00
Alug 26dd066280 fix conflicts 2024-02-22 01:43:54 +01:00
Alug 157ebdb5fe Merge remote-tracking branch 'ghg/lua-hudstuff' into lugstuff 2024-02-22 01:39:34 +01:00
Alug 1a18839f82 remove R_PointToAngleEx
R_PointToAngle64 does its job better anyways
2024-02-20 21:10:04 +01:00
Alug e7f8e7628f I HATE MENUS I HATE MENUS 2024-02-20 18:42:37 +01:00
Alug 07190571a1 lol 2024-02-20 18:40:01 +01:00
Alug f04d922fca fix warning 2024-02-20 18:17:25 +01:00
Alug 7fa382d4e9 rename driftgauge cvar and fix nametag rendering bug 2024-02-20 18:12:17 +01:00
Alug 97766710c0 e 2024-02-20 17:37:29 +01:00
Alug 994ee060a7 a 2024-02-20 17:36:05 +01:00
NepDisk 589c27fdcf Driftgauge flipcam 2024-02-20 17:35:01 +01:00
NepDisk 37a018fda4 Give these tooltips 2024-02-20 17:34:58 +01:00
NepDisk f49381d1c5 Forgot this lol 2024-02-20 17:34:54 +01:00
Alug 573095bbad Driftgauge 2024-02-20 17:34:49 +01:00
Alug 0fdcc8e288 some fixes 2024-02-20 17:33:24 +01:00
Alug 03d7e26c3d oop 2024-02-20 13:18:23 +01:00
Alug 3a5cd835ad Fix tint equation shader 2024-02-20 13:17:46 +01:00
Alug 47a8f081e9 set currenttex to null if it gets an invalid texture id 2024-02-20 13:17:35 +01:00
Alug ad8d691c11 kill this 2024-02-20 13:16:50 +01:00
NepDisk 8186696e62 Nametag sightofline fix 2024-02-19 20:35:38 +01:00
Alug 183ec22923 Revert "Revert "Linked list for textures""
This reverts commit fe0dabb177.
2024-02-19 20:26:59 +01:00
Alug 5376995350 add max cap to nametagmaxplayers 2024-02-19 19:02:54 +01:00
Alug acb6e30fad dont apply this for players 2024-02-19 18:20:11 +01:00
Alug fe0dabb177 Revert "Linked list for textures"
This reverts commit 7eec58a834.
2024-02-19 12:15:12 +01:00
NepDisk 194ae46ce8 Remove unused functions that were originally added for nametags 2024-02-19 11:14:49 +01:00
NepDisk 2e9f1bfe90 Fix nametag weight offset for small and minimal 2024-02-19 11:14:46 +01:00
Alug a82adc4948 Fix nametag limit 2024-02-19 11:14:41 +01:00
Alug 6440c70a38 Zzz... 2024-02-19 01:57:42 +01:00
Alug 748eb07c9a forgor 2024-02-19 01:57:04 +01:00
Alug 5be2f591d2 ok so this needs to be done for the scaling stuff cool 2024-02-19 01:49:20 +01:00
Alug f2e4950e89 die 2024-02-19 01:26:01 +01:00
Alug 7444c5b826 remove hpmod stuffs since its not netsafe 2024-02-19 01:02:39 +01:00
Alug 5f6cca68cc Nametags Rewrites 2
contains netunsafe stuff but easy to remove
2024-02-19 00:44:07 +01:00
Alug 3d33e5351b bruh 2024-02-19 00:13:42 +01:00
Alug c6e245450d those are not server commands
idk why i threw them there in the first place but those are not needed at all (or even usefull for that matter) for dedicated servers
also moves some stuff to its group
2024-02-19 00:12:11 +01:00
Alug 36854a16b7 Revert "Clean up cvar stuff a little"
This reverts commit 6fe87ab05a.
2024-02-19 00:04:25 +01:00
Alug b4ee8229ee Revert "more stuff"
This reverts commit 150c695979.
2024-02-19 00:03:27 +01:00
Alug cf0a3841e8 Revert "those need to be here for some reason"
This reverts commit 2efaebcf89.
2024-02-19 00:03:16 +01:00
Alug 3ebd2257f8 ok i dont want to the new gamma system
it looks off honestly
2024-02-18 23:47:42 +01:00
Alug 844d1967cc i wanna try the new gamma stuff 2024-02-18 22:29:24 +01:00
Alug dac37f8938 revert those 2024-02-18 22:29:12 +01:00
Alug dd74bc7c2b fuckit make the scale even smoler 2024-02-18 22:29:05 +01:00
Alug 7eec58a834 Linked list for textures 2024-02-18 22:28:52 +01:00
Alug da81998c71 fix up colour cube/saturation/gamma
cleans up things, and fixes it not being applied to 3D models and colourmapped sectors when not in palette rendering mode
also adds a new way of handling gamma which can be used if wanted
2024-02-18 20:43:40 +01:00
Alug d1552e7b71 clean up patch drawers a little
esp for software
2024-02-18 19:45:17 +01:00
Alug c64e10083b Optimize R_StoreWallRange
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2336?commit_id=a04bef7d39f71cfda1fe85b2ca3a820f95612b06
2024-02-17 22:52:12 +01:00
Alug 43e2be58da Revert "add an error message here"
This reverts commit 44b8a8a0d8.
2024-02-17 17:31:14 +01:00
Alug 63b60d2546 those too 2024-02-17 16:11:32 +01:00
Alug 91ddc709eb forgor 2024-02-17 16:09:39 +01:00
Alug 1bcb67ffb9 remove bloat from windows libs + move dlls into dlls folder
+ remove msvc project files since they dont work anyways
2024-02-17 15:59:16 +01:00
Alug 976177c244 Revert "Revert "fix the dumbass compiler warning""
This reverts commit 69d47a5e53.
2024-02-17 11:13:07 +01:00
Alug a37c81a142 Revert "Revert "fix some issues with framebuffer""
This reverts commit 6457847633.
2024-02-17 11:13:04 +01:00
Alug 58de3a35a0 Revert "Revert "Implement framebuffer and renderbuffer objects""
This reverts commit b0f5f4338f.
2024-02-17 11:13:00 +01:00
Alug 44b8a8a0d8 add an error message here
dunno if we can prevent it from crashing, but atleast its a little more informative
2024-02-17 10:42:16 +01:00
Alug b0f5f4338f Revert "Implement framebuffer and renderbuffer objects"
This reverts commit d6d70e1525.
2024-02-17 09:57:38 +01:00
Alug 6457847633 Revert "fix some issues with framebuffer"
This reverts commit fcc810f703.
2024-02-17 09:57:25 +01:00
Alug 69d47a5e53 Revert "fix the dumbass compiler warning"
This reverts commit d0b7f6203c.
2024-02-17 09:57:12 +01:00
NepDisk 02177a7794 Nametags Rewrites 2024-02-17 09:11:27 +01:00
Alug 65c15126f1 larger console buffer for high res 2024-02-17 09:10:24 +01:00
Alug 76c78b8e63 remove all this crap 2024-02-16 15:30:18 +01:00
Alug f63342ff0f lol 2024-02-16 13:35:30 +01:00
Alug e3410cf34c move this 2024-02-16 13:35:25 +01:00
Alug 7a129047e7 i will play this in 8k yes 2024-02-16 09:36:51 +01:00
Alug 343716b7da make this save 2024-02-15 20:22:05 +01:00
Alug 1687fb9120 Optimize polygon sorting on batch renderer 2024-02-14 21:39:31 +01:00
Alug 3e89057c23 Fix dangling pointer in mapthing after removing mobj 2024-02-14 21:39:20 +01:00
Alug 774587efa6 fix inline warnings 2024-02-14 19:43:44 +01:00
Alug 2dc8bf321e do this again 2024-02-14 19:27:25 +01:00
Alug 992813d770 Revert "remove mobj realscales"
This reverts commit 9f45dabd9c.
2024-02-14 19:27:21 +01:00
Alug 46882dee93 Revert "move this, remove interp things, and add some comments"
This reverts commit 47c90f63a8.
2024-02-14 19:27:18 +01:00
Alug 8bbb7b540f Revert "forgor"
This reverts commit e4ec7484aa.
2024-02-14 19:27:14 +01:00
Alug f5f1ab036d Fix segfault when removing mobjs while iterating thinglist 2024-02-14 15:31:06 +01:00
Alug f15d556c05 fix segfaults when damaging mobj with no painstate and when removing source from ShouldDamage 2024-02-14 15:27:15 +01:00
Alug 570a664db8 Use po2 patches to fix mipmaps 2024-02-14 12:50:40 +01:00
Alug 52f69324d9 better savegame errors 2024-02-14 12:19:38 +01:00
Alug ea6016b1ba forgor 2024-02-14 12:00:25 +01:00
Alug 30fcffd63c move this, remove interp things, and add some comments 2024-02-14 11:44:14 +01:00
Alug 50446bbde4 remove mobj realscales
idk those just seem absolutely useless its literally just an alias for mobj scale
2024-02-14 11:42:51 +01:00
Alug b307033aab a? 2024-02-14 05:58:04 +01:00
Alug 3e5985833c Snap to software lightlevel values when using Paletter renderer
bye bye smooth fades, here i come 32 light levels
2024-02-13 16:35:10 +01:00
Alug 8421f02aab e 2024-02-13 12:44:34 +01:00
Alug b6daafec17 Realloc software lookups for current screen res instead of MAXVID define
so the thing just allocs what it needs, so it can perform as good as it can on any resolution
2024-02-13 12:44:05 +01:00
Alug fc058b669e better comment 2024-02-13 11:16:00 +01:00
Alug 99214b98b9 set this to 1440p
also made a new define for use in the png limits so that can stay at 4k. but having both maxvids allocate things for 4k is not a good thing for software renderer, not that anyone would ever want to run it at 4k anyways
2024-02-13 11:15:14 +01:00
Alug ab35a44ed9 more revert 2024-02-13 10:57:36 +01:00
Alug 125b82a5bb forgor 2024-02-13 10:53:38 +01:00
Alug f294ea157f more things 2024-02-13 10:50:11 +01:00
Alug 486ae052ef this stuff too 2024-02-13 10:42:03 +01:00
Alug 53b5442dad bruh 2024-02-13 10:40:42 +01:00
Alug 507c5f75bd revert a few things 2024-02-13 10:39:27 +01:00
Alug 0fb72c579e forgor 2024-02-13 06:16:38 +01:00
Alug c5d6ac63c5 remove pseudoangle 2024-02-13 06:12:32 +01:00
Alug a934c76263 revert this 2024-02-12 14:38:47 +01:00
Alug 0098c3bbc0 update SDL2 to v2.30.0 2024-02-12 14:29:49 +01:00
Alug f3eedc03e6 Add common I_GetSysName function
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2308
2024-02-12 14:23:09 +01:00
Alug 17c71a2528 Change from double to INT64 2024-02-12 14:19:25 +01:00
Alug d2ecbd7c6e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-02-12 14:14:49 +01:00
Alug 2ce7dc0c37 update zlib to v1.3.1
update zlib to v1.3.1
2024-02-11 16:43:19 +01:00
Alug b648424c18 add stuff to menu 2024-02-11 15:21:20 +01:00
Alug 301754c857 forgor 2024-02-11 15:10:16 +01:00
Alug c9a3c4c9b8 only interpolate those if we use the stuff that uses them 2024-02-11 15:05:58 +01:00
Alug ce0c8b363a only interpolate pitch, roll, slopepitch and sloperoll when using sprite rotation 2024-02-11 14:51:44 +01:00
Alug 9d6c38004c toggable mobj subsector interpolation
honestly couldnt spot any difference at all
but R_PointinSubsector is quite expensive so making a toggle seems cool
2024-02-11 14:51:14 +01:00
Alug 19a58cc8c6 mobj interp optimization 2024-02-11 14:19:08 +01:00
Alug d855c39da2 a 2024-02-11 13:45:48 +01:00
Alug 03f4bfecc1 Dont need this
I_GetPrecise Precision already gets the high res windows time anyways
2024-02-11 13:42:12 +01:00
Alug c8d9e4c7b3 add thiis 2024-02-11 09:22:59 +01:00
Alug cb2b8f2e7c add it here too 2024-02-11 06:38:45 +01:00
Alug 0272dd4c24 oops 2024-02-11 06:29:28 +01:00
Alug 3b327937c2 use Windows High Precision Timer on Windows builds
lul may help with frametime and other stuff
2024-02-11 06:16:45 +01:00
Alug f8f2f17184 Merge remote-tracking branch 'origin/cvarcleanup' into lugstuff 2024-02-09 15:18:17 +01:00
Alug 2efaebcf89 those need to be here for some reason
game complains
2024-02-09 15:12:41 +01:00
Alug 150c695979 more stuff 2024-02-09 15:05:23 +01:00
Alug 6fe87ab05a Clean up cvar stuff a little 2024-02-09 14:42:55 +01:00
Alug f6613a5555 proper check for colourized speedometer patches 2024-02-09 12:35:48 +01:00
Alug 947d5c2739 add achiiro speedometer stuffs 2024-02-09 12:07:34 +01:00
Alug 1544706ff4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-02-09 10:20:21 +01:00
Alug e121d1a8a1 proper POST request to curl 2024-02-09 10:19:35 +01:00
Alug badbdbf03f Clipping and portal stuff
idk this actually does not break ante station for some reason
2024-02-09 10:19:18 +01:00
Alug 3b5495b53a brap 2024-02-07 11:52:04 +01:00
Alug 545027ae64 use this stuff 2024-02-07 11:40:05 +01:00
Alug 91896433f8 fix menu updating + add default to switch 2024-02-07 11:01:53 +01:00
Alug a60074fc8a fix menu stuff 2024-02-07 10:49:04 +01:00
Alug eb82aa14bb option for small nametags 2024-02-07 10:35:16 +01:00
Alug cb4b640730 why add the same thing twice? 2024-02-07 09:42:16 +01:00
Alug 266d9a3c71 also turn this off 2024-02-07 09:37:01 +01:00
Alug 7a5a704a15 forgor to comment this out 2024-02-07 09:36:37 +01:00
Alug 29ed8de935 Nametags from Chaoskart
https://gitlab.com/Fafabis/kart-chaotic/-/commit/8b4a12e144fbff587ee70c30e7f461900d839650#025e5c90ea9aeb6187b4fe002e0fbb277ef4b33d_7024_7035
2024-02-07 09:35:14 +01:00
Alug 3418cab5de switchable native keyboard input
taken from chaoskart this is completely non invasive
2024-02-07 09:20:36 +01:00
Alug e2ce015d49 fix for opengl sprite shadow colour 2024-02-07 09:15:17 +01:00
indev 0d0ab3f414 If have libbacktrace, write crash reports from I_Error 2024-02-04 19:08:33 +01:00
Alug 22b5bcc7e1 split cache functions
seems to fix a few stutters
2024-02-04 09:21:45 +01:00
indev 34d5d73d7e Fix battle playing wrong ending music sometimes 2024-02-04 08:31:10 +01:00
Alug 7ae4441731 Add cvar gr_maxinterpdist, which allows to control max distance on which mobjs will be interpolated 2024-02-04 08:26:54 +01:00
Alug d0b7f6203c fix the dumbass compiler warning 2024-02-04 07:56:55 +01:00
Alug 3757f3ae57 smol cleanup 2024-02-04 07:46:25 +01:00
Alug 8f9366da5a Zzz... 2024-02-04 07:12:26 +01:00
Alug b8e55f87a9 little portal cleanup 2024-02-04 06:48:58 +01:00
Alug b469f70e02 experimental fast sprite sorting 2024-02-04 06:28:07 +01:00
Alug 6df69b24db Revert "DSDADoom shenanigans"
This reverts commit c7931ca69c.
2024-02-02 16:49:08 +01:00
Alug 0133a5eb23 Revert "do this"
This reverts commit 7f93bc305d.
2024-02-02 16:48:26 +01:00
Alug 86712c2c48 fix compiler warning 2024-02-02 02:59:08 +01:00
Alug 5195caa3c6 Remove Build2DMipmaps and GLU library stuff
gluBuild2DMipmaps is just broken anyways
and it was the only thing used from the GLU library aswell so can remove things in favor of better solutions
having a pc with opengl 1.4 should be a given by now
2024-02-01 22:26:06 +01:00
Alug 684ad38d4b add an I_Error for when opengl is started on unsupported hardware or driver 2024-02-01 19:57:23 +01:00
Alug c6d292a3d7 e 2024-02-01 04:47:55 +01:00
Alug 246414a735 move that where it belongs 2024-02-01 04:42:28 +01:00
Alug 429bcffaf8 dont need to extra check for this actually 2024-02-01 03:48:17 +01:00
Alug d92e7b138c fix sprite roll angles in software for sprites with one rotation frame
ofc only when the rotation stuff is set to rotate everything not just the player
also changes that the shadows only rotate on that setting unless someone wants it and wants really dumb checks for it
2024-02-01 03:46:15 +01:00
Alug cd51ad2a25 remove non working fisheye lens code
remnants of birdhouse, this was never finished nor does it work
2024-02-01 03:26:33 +01:00
Alug 8732825404 fix software shadow rotation in the worst way possible kek 2024-02-01 03:25:58 +01:00
Alug fc37cdcc95 use it for camang 2024-02-01 02:39:27 +01:00
Alug 2435ec9515 Revert "batch this stuff too for portals"
This reverts commit 2df4738af2.
2024-02-01 02:11:21 +01:00
Alug 623fab8ea8 Revert "clean this up a little"
This reverts commit 99c9d921e3ab3ee3fde3dcf141e20323e064902a.
2024-02-01 02:03:23 +01:00
Alug e063345c4b Revert "oops"
This reverts commit 59b6987bf2e9f00bfdf50b268f0ec61e735dfe0e.
2024-02-01 02:03:10 +01:00
Alug 27533a1dcd Revert "replace check"
This reverts commit 36eaaee202c4d1f7e86dd2b24dcfe5573ac2f280.
2024-02-01 02:03:00 +01:00
Alug d232e0e2c6 oops 2024-02-01 01:55:04 +01:00
Alug 0475489e24 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-31 16:58:09 +01:00
Alug 34b35db27f Interpolate polyobjects properly for the software renderer
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2284/
2024-01-31 03:28:00 +01:00
Alug b47bc12e48 change x scale a little 2024-01-30 21:43:44 +01:00
Alug 4d102dcf68 similar scale to old speedo 2024-01-29 23:08:19 +01:00
Alug a8c9663200 ok i can just do it like this lol
now its good finally
2024-01-29 22:23:04 +01:00
Alug 57660cc5af fix 1 pixel gap
i hate maths
2024-01-29 22:13:54 +01:00
Alug c459e918af prep some speedometer stuff 2024-01-29 22:01:16 +01:00
Alug 962abba1b2 Buffer API is OpenGL 1.5, so can be used in STATIC_OPENGL
https://git.do.srb2.org/STJr/SRB2/-/commit/623629b04ab72071e6ea4f0c4a3245e6cde72e2c
2024-01-29 18:19:01 +01:00
Alug 5297d18f92 ugh whyyyy 2024-01-29 18:08:18 +01:00
Alug 7853e48a6f update libopenmpt libs 2024-01-29 18:07:35 +01:00
Alug 303d87f69d update libgme 2024-01-29 15:59:48 +01:00
Alug 9dcdc9500d Revert "bruh wtf"
This reverts commit 493091cd66.
2024-01-29 14:43:12 +01:00
Alug 7723bafff6 replace check 2024-01-29 04:38:26 +01:00
Alug d74a89c6c1 oops 2024-01-29 04:11:21 +01:00
Alug cce443be0b clean this up a little 2024-01-29 04:08:14 +01:00
Alug 81fa3d27bf uuuuuuuhhh 2024-01-29 03:56:43 +01:00
Alug 493091cd66 bruh wtf 2024-01-28 22:07:49 +01:00
Alug c75f5ee961 use this for portal clipping too 2024-01-28 19:33:45 +01:00
Alug 083e0ca2e0 dont need this anymore 2024-01-28 19:19:16 +01:00
Alug 79bd89016c dont need it as an extra file 2024-01-28 19:16:04 +01:00
Alug eca7e38763 Zzz... 2024-01-28 19:15:14 +01:00
Alug b5cbfb970f forgor 2024-01-28 18:58:52 +01:00
Alug 74e1cafd9d this too 2024-01-28 18:57:19 +01:00
Alug ee7381b67d revert this 2024-01-28 18:56:10 +01:00
Alug 7f93bc305d do this 2024-01-26 02:44:37 +01:00
Alug c7931ca69c DSDADoom shenanigans
R_PointToPseudoAngle seems rather promising
2024-01-26 02:28:07 +01:00
Alug 90f06a3289 a little better solution still bad lmao 2024-01-26 00:04:42 +01:00
Alug 0e344a7e02 screw it ill just do this 2024-01-25 23:40:37 +01:00
Alug 3f91a4e908 i want a small hud 2024-01-25 23:04:21 +01:00
Alug fb443c58ab add "Reset All" button to hud offset menu 2024-01-25 23:02:01 +01:00
Alug b233514b58 more offset 2024-01-25 16:48:16 +01:00
Alug 11615171d1 Revert "Optimize polygon sorting on batch renderer"
This reverts commit ad86e7f34a.
2024-01-25 14:57:49 +01:00
Alug 2df4738af2 batch this stuff too for portals 2024-01-25 04:06:54 +01:00
Alug 9e62f5bd52 make the ripple thing toggable for now 2024-01-25 03:46:26 +01:00
Alug 80349ae8ee a 2024-01-25 03:24:32 +01:00
Alug 06d51f2648 only apply fog if it is water only
ugh
2024-01-25 02:59:30 +01:00
Alug fcc810f703 fix some issues with framebuffer 2024-01-25 00:35:31 +01:00
Alug d6d70e1525 Implement framebuffer and renderbuffer objects
wew https://git.do.srb2.org/Lactozilla/SRB2/-/commit/211c3720de8dda8e2a896b6887eb4bbbd991ebbf
2024-01-24 22:35:30 +01:00
Alug e5f79e061c rotating shadows
uuuuhhh
2024-01-24 18:13:50 +01:00
Alug ad3c0a1ffd attempt at fixing some issues
it fixed some things but broke the underwater ripple if the water is on a fof
2024-01-24 17:09:15 +01:00
Alug 2ef935198a more pronounced ripple
eeeh kinda close ig
2024-01-24 03:41:02 +01:00
Alug dc3b9c648a make this a little neater 2024-01-24 03:09:09 +01:00
Alug 2d610d40b6 add better check for colormap stuff
so it only gets applied where it should (i hope)
works on tiled byway tho
2024-01-24 03:00:31 +01:00
Alug d2c686f48b attempt at making ogl water ripple better
well all it does is ripple the floor below the water fof lmao no idea how i would implement this for the walls too
2024-01-24 02:43:27 +01:00
Alug 5cafec3262 uuuh oops dont do it for non transparent fofs 2024-01-24 00:26:36 +01:00
Alug 580c42d167 more offset ugh 2024-01-23 21:33:15 +01:00
Alug dcfec35e57 remove this since its not needed anymore 2024-01-23 21:24:18 +01:00
Alug 701bac6e11 alr add more offset
kinda dumb way but itll do for now until i figure out smth better
2024-01-23 21:21:03 +01:00
Alug 0c46d593d8 attempt at making colormapped translucent fofs more accurate 2024-01-23 18:55:19 +01:00
Alug b867de0667 Zzz... 2024-01-23 15:50:51 +01:00
Alug e207b75c7a Revert "add pMasterPalette"
This reverts commit dfb05b9d39.
2024-01-23 15:49:00 +01:00
Alug fc3df5bfe4 Revert "attempt at unmangling lighttables and colormaps"
This reverts commit 19702daecd.
2024-01-23 06:41:25 +01:00
Alug dfb05b9d39 add pMasterPalette 2024-01-23 05:33:04 +01:00
Alug 19702daecd attempt at unmangling lighttables and colormaps
ugh i hope this doesent break
2024-01-22 23:28:34 +01:00
Alug dde4b4df3b merge conflict moment 2024-01-22 21:32:38 +01:00
Alug c070930a8c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-22 21:31:04 +01:00
Alug d36b5f7c59 add hw_shaders to cmakelist 2024-01-22 18:41:00 +01:00
Alug 0e517907ce change this 2024-01-22 18:32:13 +01:00
Alug 739e9716ab add toggle for custom shaders
it seems better like this, atleast thats how hannu set it up
2024-01-22 18:25:51 +01:00
Alug 0e5972d895 shaderstate should be set here 2024-01-22 18:15:53 +01:00
Alug 71975658ca split hw_shader files 2024-01-22 18:14:14 +01:00
Alug 6572e29a64 OpenGL shader code rearrangement and shader pre-preprocessor
https://git.do.srb2.org/STJr/SRB2/-/commit/de37df1be04e9d1dfb11083a9585eb6ac1761633?merge_request_iid=1516
wew
2024-01-22 16:57:47 +01:00
indev 41b21c2a0c Fix sound, music, and midi music toggles 2024-01-22 13:48:13 +01:00
Alug 2b19d2e6de Revert "revert this"
This reverts commit 5bce9d5abf.
2024-01-22 13:48:10 +01:00
Alug f99aa3459c e 2024-01-22 13:48:00 +01:00
Alug 5bce9d5abf revert this
this caused sound and music to alyways toggle themselves on after a restart + other issues
2024-01-22 02:55:40 +01:00
Alug abe102649e forgor 2024-01-22 02:52:33 +01:00
Alug 424fcdc63a change some memfree names 2024-01-22 02:46:59 +01:00
Alug a3fd451c74 3D model texture Z_tag 2024-01-22 02:43:55 +01:00
Alug 731fd113d2 more cleanup 2024-01-22 02:34:07 +01:00
Alug c9ca1bda5c Texture buffer for non RGBA to RGBA conversion 2024-01-22 02:09:55 +01:00
Alug 58ea822050 Remove 3Dfx and glide things
gr_rounddown toggle did nothing instead the game always resized textures, now it wont, seems like this makes stutters on mapload less
2024-01-22 01:03:48 +01:00
Alug 671484d6f9 fix merge conflict 2024-01-21 16:41:38 +01:00
Alug e6e74194bc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-21 16:40:12 +01:00
Alug 04432c8368 simplify this uuh 2024-01-21 15:43:46 +01:00
Alug 6782876c0c i hate this so i just make it a boolean
confused the heck outta me so just do it like this lmao
2024-01-21 15:31:07 +01:00
Alug 4b09e92d7c grr 2024-01-20 17:24:11 +01:00
Alug 3266f64fb9 oops 2024-01-20 17:03:05 +01:00
Alug 2a9886e698 cleanup s_sound a little + fix onchanges 2024-01-20 17:01:48 +01:00
Alug 1319e3a811 make NO_MIDI=0 compile 2024-01-20 16:52:46 +01:00
Alug 6cbb40f874 make some things static + remove cdmusic leftovers 2024-01-20 15:43:42 +01:00
Alug 07fd6a3ad4 make sound precaching useful at all
so it also precaches addon sounds and all
thx indev for help <3
2024-01-20 15:39:25 +01:00
Alug 8891869013 fix issues with sound precaching
adds a check if sounds have been previously loaded already

also makes it useful at all by not freeing soundsfx data on each mapload when its enabled

also adds an onchange so toggling it either caches all sounds again or frees them
2024-01-20 13:58:11 +01:00
Alug 04fc735e12 Merge remote-tracking branch 'origin/morenewpalshader' into lugstuff 2024-01-19 19:37:07 +01:00
Alug 7b9860f1be Merge remote-tracking branch 'origin/morenewpalshader' into lugstuff 2024-01-19 19:25:24 +01:00
Alug 38f26a2bd8 simplify setpalette 2024-01-19 18:07:32 +01:00
Alug a9750f8cff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-19 12:29:20 +01:00
Alug ad86e7f34a Optimize polygon sorting on batch renderer
again
2024-01-19 02:14:20 +01:00
Alug 496435ef3b dont check for precip in sprite sorting + smol cleanup 2024-01-19 02:14:04 +01:00
Alug 5275b31e7e smol stuffs 2024-01-19 00:39:07 +01:00
Alug e341991703 Add toggle for horizonlines 2024-01-18 20:53:59 +01:00
Alug fb65496507 use fudges from newer paletter shader 2024-01-18 16:49:10 +01:00
Alug abe52ba440 make thundershield follow player offset
this allows the to stay on the player when saltyhopping etc.
2024-01-18 15:21:20 +01:00
Alug ee5d097201 Prevent FOF alpha from wrapping around in OpenGL 2024-01-18 15:07:29 +01:00
Alug 0ea182d04f change this 2024-01-18 14:12:27 +01:00
Alug 8d737c96c9 Refactor Batching code
from Hannu Hanhi
https://git.do.srb2.org/STJr/SRB2/-/commit/707687beea50a2bfcc14638e923ac516195351b1?merge_request_iid=1774
2024-01-17 18:30:53 +01:00
Alug 5c93b90c2e Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-17 18:16:06 +01:00
Alug 41bee850da Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-17 14:59:21 +01:00
Alug 416c2a9e9d Merge remote-tracking branch 'origin/planestuff2' into lugstuff 2024-01-17 12:42:59 +01:00
Alug 8fa9fccc79 Revert "use malloc here"
This reverts commit 75d1076bbe.
2024-01-17 12:42:56 +01:00
Alug c5a4071a06 Revert "Move water ripple spanfunc out of r_plane + tilted water support"
This reverts commit 139d937c86.
2024-01-17 12:42:48 +01:00
Alug 930e48ad39 Revert "Plane optimization and cleanup"
This reverts commit db61bfb568.
2024-01-17 12:42:39 +01:00
Alug 868678f321 Revert "Revert "Revert "Fix vibing slope planes"""
This reverts commit 8530b6512c.
2024-01-17 12:42:34 +01:00
Alug 8530b6512c Revert "Revert "Fix vibing slope planes""
This reverts commit 2a5f487e5f.
2024-01-17 12:32:50 +01:00
Alug 2a5f487e5f Revert "Fix vibing slope planes"
This reverts commit 82562bc20d.
2024-01-17 12:31:28 +01:00
Alug 141f6c51dc Revert "optimize plane stuff even more"
This reverts commit 120def9676.
2024-01-17 12:31:24 +01:00
Alug 1fc9492b30 Revert "Use floating point trig in R_SetSlopePlane"
This reverts commit 3555783284.
2024-01-17 12:31:13 +01:00
Alug 65782d3d75 Revert "more changes"
This reverts commit cb6d657c03.
2024-01-17 12:31:08 +01:00
Alug b5cb6dfb9d Revert "forgoer"
This reverts commit f476befc4b.
2024-01-17 12:31:03 +01:00
Alug 6667e4b8bc Revert "forgor R_GetSlopeZAt"
This reverts commit 4a94939d4f.
2024-01-17 12:30:58 +01:00
Alug 5e2492a930 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-17 12:19:30 +01:00
Alug 4f07372e0f (hopefully) fix overflow in R_DrawRepeatMaskedColumn
well this fixes the game hanging in software renderer on Marsh´s Marble Zone
2024-01-17 12:11:32 +01:00
Alug 80a1a97083 Revert "Revert "Revert "Localskins on replays"""
This reverts commit 12059955e5.
2024-01-16 16:44:41 +01:00
Alug 204476c55d Revert "Hopefully fix the localskin replay issues 🙏"
This reverts commit 8fab258778.
2024-01-16 16:44:38 +01:00
hayaunderscore 8fab258778 Hopefully fix the localskin replay issues 🙏 2024-01-16 16:35:39 +01:00
Alug 12059955e5 Revert "Revert "Localskins on replays""
This reverts commit d3e5dfc346.
2024-01-16 16:35:33 +01:00
Alug 3ca1f957ba fix ogl shearing with flipcam 2024-01-16 16:22:30 +01:00
Alug b11362aec1 remove the extra screentex and apply palshader directly to finaltex
theres basically barely any difference, even in the fades theres very little, and it just cost so freaking much performance

however, ill keep the revamped screentex setup as this it allows us to keep the better fadescreen background for menus
2024-01-15 20:12:35 +01:00
Alug 75630df10e readd oldpal
for performance reasons its better
2024-01-15 19:36:37 +01:00
Alug 4d93abb7ac do this a little better 2024-01-15 17:44:07 +01:00
Alug 731943f980 ensure consistent shader state 2024-01-15 16:50:20 +01:00
Alug 265dc1f296 Light table support for HWR_FadeScreenMenuBack 2024-01-15 16:29:01 +01:00
Alug c449ffcc98 remove gr_oldpal for now 2024-01-15 16:23:19 +01:00
Alug 34500d32d0 paletterenderer screentex stuff again
this didnt really work like it shouldve
so ill keep it here for now
2024-01-15 16:17:17 +01:00
Alug d3e5dfc346 Revert "Localskins on replays"
This reverts commit e1f821e121.
2024-01-15 15:51:28 +01:00
Alug 8ed11107eb remove Shader_Load as Shader_SetUniforms literally did the same thing 2024-01-15 15:10:02 +01:00
Alug 2f51108783 fix lighttable batching for new batching and palshader code 2024-01-15 15:09:36 +01:00
Alug 2667a66419 Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-15 14:27:10 +01:00
Alug 0fd073f2f0 Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-15 14:18:10 +01:00
Alug 840cf4e00a Revert "Revert "Optimize HWR_RenderBatches polygon sorting""
This reverts commit a36e633555.
2024-01-15 14:15:26 +01:00
Alug d5d99f94b7 cap flashpals again
well it often resulted in flashpals that just made stuff so badly visable lmao
2024-01-15 11:38:09 +01:00
Alug dea19e4416 forgor R_GetSlopeZAt 2024-01-15 11:20:54 +01:00
Alug f7612d7398 forgoer 2024-01-15 11:17:19 +01:00
Alug e39182607e more changes 2024-01-15 11:16:16 +01:00
Alug 79f1febbce Use floating point trig in R_SetSlopePlane 2024-01-15 11:10:12 +01:00
Alug 120def9676 optimize plane stuff even more 2024-01-15 11:09:07 +01:00
Alug 82562bc20d Fix vibing slope planes 2024-01-15 10:44:43 +01:00
Alug 1c51361120 Plane optimization and cleanup
sned help

https://git.do.srb2.org/STJr/SRB2/-/commit/c07c80fd9e626f15b4d84d1766f8963e089d295a
2024-01-15 10:40:51 +01:00
Alug c07e79deb7 Move water ripple spanfunc out of r_plane + tilted water support
idk man
2024-01-15 10:18:13 +01:00
Alug 81cb1111b4 use malloc here 2024-01-15 09:36:35 +01:00
Alug 369307181e this can be static 2024-01-15 08:35:45 +01:00
Alug 7881e04e6b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-15 08:26:13 +01:00
Alug 66a72eb1be Copy Interpolation to Shields and Overlays, Splitscreen Overlays
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1992
2024-01-15 08:25:54 +01:00
Alug ad77f11859 Optimize polygon sorting on batch renderer
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253

again lul
2024-01-15 00:31:29 +01:00
Alug 96d177876f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 23:50:14 +01:00
Alug dc7392f86b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:57:24 +01:00
Alug 6f6252b6f8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:50:11 +01:00
Alug 20b32df2c6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:13:42 +01:00
Alug d413d02bf7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 21:38:49 +01:00
Alug 426c0366cc Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-13 16:12:04 +01:00
Alug d3d3655580 Merge remote-tracking branch 'origin/crash-log-mention' into lugstuff 2024-01-13 12:05:55 +01:00
Alug d4a011ee6d Merge remote-tracking branch 'origin/addfilelocal-load-animdefs' into lugstuff 2024-01-12 13:37:17 +01:00
Alug b08118734e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-12 13:37:14 +01:00
indev 41ee6de784 Make non-important files still load textures and animdefs 2024-01-12 15:35:24 +03:00
hayaunderscore 139d2e6be8 Localskins on replays 2024-01-12 12:26:21 +01:00
Alug a866461b0a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-11 18:46:14 +01:00
Alug 6f61331d46 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 18:46:12 +01:00
Alug 7731ca9fb2 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 09:53:47 +01:00
Alug 3de0c4f5d8 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 01:10:04 +01:00
Alug 2e602f8861 Revert "Revert "just show text instead of miscoloured boxes""
This reverts commit 7072a50060.
2024-01-11 00:50:36 +01:00
Alug 1a7d92a082 Revert "Revert "fix some things""
This reverts commit a65e586de5.
2024-01-11 00:50:26 +01:00
Alug 5aa2a0c821 Revert "Revert "Merge remote-tracking branch 'origin/gammastuff' into lugstuff""
This reverts commit a9d7ca3332.
2024-01-11 00:50:17 +01:00
Alug 4f2328b8dc Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 00:47:24 +01:00
Alug e929e524a3 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 14:18:45 +01:00
Alug e6b9f18d3d Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 14:14:53 +01:00
Alug 7f197ef84e Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 13:52:26 +01:00
Alug a9d7ca3332 Revert "Merge remote-tracking branch 'origin/gammastuff' into lugstuff"
This reverts commit 9aca8438a2, reversing
changes made to c2d37dfb61.
2024-01-10 13:51:51 +01:00
Alug a65e586de5 Revert "fix some things"
This reverts commit 69ffee271d.
2024-01-10 13:51:46 +01:00
Alug 7072a50060 Revert "just show text instead of miscoloured boxes"
This reverts commit fc1a367c2e.
2024-01-10 13:51:43 +01:00
Alug fc1a367c2e just show text instead of miscoloured boxes 2024-01-09 14:27:05 +01:00
Alug 3b376d85d4 fix some things 2024-01-09 14:19:36 +01:00
Alug 9aca8438a2 Merge remote-tracking branch 'origin/gammastuff' into lugstuff 2024-01-09 14:09:56 +01:00
Alug c2d37dfb61 use og values for pal 2024-01-09 13:38:24 +01:00
Alug 3c3bd0f0ea stuff 2024-01-09 13:25:59 +01:00
Alug 958db336b7 change this 2024-01-09 13:23:54 +01:00
Alug 342d570b3b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 09:07:24 +01:00
Alug 67457c25df Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 08:54:08 +01:00
Alug a98d46f8a8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 08:51:05 +01:00
Alug b2fca84b15 Zzz... 2024-01-07 08:25:49 +01:00
Alug 2e31169738 use fudge defines + remove wall and floor shader
both are now consilidated ( i have no idea how to spell that) into doom_colormap shader
2024-01-06 08:11:57 +01:00
Alug 4cda2c8093 use srb2´s sky shader
also its finally a defined shader now + move default fragment shader to the top
2024-01-06 08:07:11 +01:00
Alug 73b4e8a988 change this 2024-01-06 04:57:18 +01:00
Alug 82dbfb4379 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-06 01:15:05 +01:00
Alug 0e2ff2390a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-05 21:56:11 +01:00
Alug 220d5db739 optimize camera mobj z stuff lol
idk wanna see if this does anything
2024-01-05 06:40:16 +01:00
Alug 212d475f50 fix menu fade screen background using wrong things in palshader 2024-01-05 01:23:05 +01:00
Alug b7fbd0433f little changes to palshader
use gl_texture 2 in postprocess like srb2s palshader does it
also disable depthtest for screentextures in palshader mode
2024-01-05 00:53:19 +01:00
Alug d28dd96aa0 revert this 2024-01-05 00:22:13 +01:00
Alug 0e46f91c51 change order of those 2024-01-05 00:21:51 +01:00
Alug d6dabacb05 wöter... 2024-01-04 23:31:55 +01:00
Alug 4363473955 hehe funky colours 2024-01-04 23:11:46 +01:00
Alug 7e5fd4e290 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 20:02:35 +01:00
Alug c30a0cd4f1 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 20:00:34 +01:00
Alug 98d56a38f5 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 19:45:14 +01:00
Alug f26e95e7c9 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 18:24:19 +01:00
Alug f39e1a9b70 wöter 2 2024-01-03 02:24:15 +01:00
Alug 1d5b531ba3 Revert "uuuh refactor batching a little + port Optimize polygon sorting"
This reverts commit d757e82e3f.
2024-01-02 22:21:25 +01:00
Alug a90bd08405 Revert " Avoid batching skybox and horizon lines"
This reverts commit b5fbaaa2b9ae91877c7c6ad3602956d677fa6e0c.
2024-01-02 22:21:21 +01:00
Alug 1cbb726cab Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-01-02 22:13:17 +01:00
Alug ce61d00dcf fix inline warnings 2024-01-02 22:13:13 +01:00
indev 2d92b798c6 Fix warnings related to boolean glib getters/setters 2024-01-03 00:10:28 +03:00
Alug cc62164a7c Revert "Revert "Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff""
This reverts commit 142540e263.
2024-01-02 21:08:03 +01:00
Alug af510bce93 inline deez nuts 2024-01-02 21:07:02 +01:00
Alug 4ba60bedcd AAAAAaaa 2024-01-02 20:36:32 +01:00
Alug 583bf26129 wöter 2024-01-02 20:36:14 +01:00
Alug d8c3623141 Avoid batching skybox and horizon lines 2024-01-02 20:35:26 +01:00
Alug 2cd0875da6 lol 2024-01-02 06:19:31 +01:00
Alug 73d0848f7e (hopefully) fix horizonlines 2024-01-02 03:49:32 +01:00
Alug d757e82e3f uuuh refactor batching a little + port Optimize polygon sorting
uhhh https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253
2024-01-02 01:02:42 +01:00
Alug 007238e7dd Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-02 00:09:27 +01:00
Alug 944e019020 let indev compile this branch uwu 2024-01-01 21:28:03 +01:00
Alug 634f8897b4 Revert "uuuh refactor batching a little + port Optimize polygon sorting"
This reverts commit 7651d31c50.
2024-01-01 21:19:14 +01:00
Alug 7651d31c50 uuuh refactor batching a little + port Optimize polygon sorting
uhhh https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253
2024-01-01 20:44:19 +01:00
Alug 1702873ab1 Revert "attempt at making water shader ripple more accurate to software"
This reverts commit 8ab37040db.
2024-01-01 18:55:41 +01:00
Alug 44e7d5249c dont pack my memories 2024-01-01 18:30:06 +01:00
Alug 8ab37040db attempt at making water shader ripple more accurate to software 2024-01-01 18:29:04 +01:00
Alug ac203b0ccb Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-01 17:08:31 +01:00
Alug 557546c9c3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-01 17:08:18 +01:00
Alug 52a94dbe78 try and make p-speedometer a little less painful to look at 2023-12-31 03:39:24 +01:00
Alug f4ffc19981 lil k_kart cleanup
uh
2023-12-31 03:12:35 +01:00
Alug ac3c117b03 uh 2023-12-31 00:12:11 +01:00
Alug 1ac008ab02 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2023-12-31 00:07:39 +01:00
Alug 58ac86e3bf noone cares about c90 mixed declarations lmao 2023-12-30 21:51:23 +01:00
Alug 1daf06858b Revert "(maybe?) fix net issues on server join"
This reverts commit af40bdb11b.
2023-12-30 21:41:33 +01:00
Alug a4e8ce7f01 Fix most of compilation warnings 2023-12-30 15:55:07 +01:00
Alug ed6e16cdce uuh 2023-12-30 01:20:09 +01:00
Alug 57bb92a36c this didnt work out lmao 2023-12-30 00:55:24 +01:00
Alug 142540e263 Revert "Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff"
This reverts commit 5dab606980, reversing
changes made to 661dfde6af.
2023-12-29 23:24:08 +01:00
Alug 5a17430747 Revert "Merge remote-tracking branch 'origin/moreopengl' into lugstuff"
This reverts commit a6015e4647, reversing
changes made to fcbe95447a.
2023-12-29 22:49:51 +01:00
Alug 23c84a9e96 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-29 22:49:27 +01:00
Alug 6bb9dcc216 revert that part it stuttered race conditions or somethjing lmao 2023-12-29 15:36:12 +01:00
Alug 1901e4dbdc fuckit idk lmoa 2023-12-29 14:23:29 +01:00
Alug 1657f769da Revert "dont need that"
This reverts commit f274ed3fd8.
2023-12-29 13:11:43 +01:00
Alug c82eb489fe give me all that shit yes 2023-12-29 01:47:27 +01:00
Alug 9f05befd70 i have no idea what im doing lmao 2023-12-29 01:36:33 +01:00
Alug f274ed3fd8 dont need that 2023-12-29 01:35:50 +01:00
Alug f6e027abcb Merge remote-tracking branch 'origin/gl-noencore-effect-fix' into lugstuff 2023-12-27 15:30:13 +01:00
Alug a92114a854 Merge remote-tracking branch 'origin/gl-noencore-effect-fix' into lugstuff 2023-12-27 15:04:36 +01:00
Alug ffb84705d3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-27 14:40:50 +01:00
Alug 2f8366b6f9 -flto breaks crashlogs it seems lol 2023-12-24 20:28:57 +01:00
Alug a6f062c126 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-24 19:41:15 +01:00
Alug 41c24f3bc9 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-24 19:13:15 +01:00
Alug af40bdb11b (maybe?) fix net issues on server join
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2238?commit_id=d79d22de63c5b84e3e0f4d737af81f74321dd80d

needs alot of testing
2023-12-24 00:15:47 +01:00
Alug 00a69e6aed Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-23 17:24:07 +01:00
Alug 04b2d784ce Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-22 20:28:28 +01:00
Alug a5de51b039 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-21 13:54:33 +01:00
Alug 4a80e9f20f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 23:06:24 +01:00
Alug 8676769a8f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 17:53:09 +01:00
Alug 2f8c7a81ca Revert "Merge remote-tracking branch 'origin/thinkercache' into lugstuff"
This reverts commit 760fe392a8, reversing
changes made to 5dab606980.
2023-12-20 08:35:16 +01:00
Alug ac11af6048 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 06:09:25 +01:00
Alug 7c558802a4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 05:16:05 +01:00
Alug 5a516aa1ad dont need that 2023-12-19 21:52:21 +01:00
Alug 4d1b6ed974 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-19 20:20:57 +01:00
Alug e8e6bb0499 Revert "test stuff"
This reverts commit 085efaa605.
2023-12-19 19:41:55 +01:00
Alug 58f94666d1 timeout sticker uses wrong patch 2023-12-19 18:58:10 +01:00
Alug 085efaa605 test stuff
very crude, console scream at me if those are botched
most likely not the issue but whatever
2023-12-19 18:57:47 +01:00
Alug 6028e392f0 dont prep shaders if theyre uneeded 2023-12-19 17:34:15 +01:00
Alug fa67dd74a0 huehue 2023-12-19 16:28:51 +01:00
Alug cb734b50c3 bru 2023-12-19 16:24:33 +01:00
Alug 087e58b88b bugger off discord rpc 2023-12-19 16:21:35 +01:00
Alug 78b9d67aaa im not on pentium 4 2023-12-19 16:17:15 +01:00
Alug a6015e4647 Merge remote-tracking branch 'origin/moreopengl' into lugstuff 2023-12-19 16:14:18 +01:00
Alug fcbe95447a Merge remote-tracking branch 'origin/multithreadshit' into lugstuff 2023-12-19 16:13:44 +01:00
Alug 760fe392a8 Merge remote-tracking branch 'origin/thinkercache' into lugstuff 2023-12-19 16:11:54 +01:00
Alug 5dab606980 Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff 2023-12-19 16:11:36 +01:00
indev c265575dfd Fix config 2023-11-16 22:14:18 +03:00
alufolie91 4a1f526ac6 multithread exec command and some filesearch/add stuff
hey it actually improves some things alot
esp the loading addons stage when joining a server
2023-11-16 19:14:48 +01:00
Alug 497b633661 Revert "why did i remove this back then??"
This reverts commit 91ed5c4871.
2023-11-15 09:59:24 +01:00
alufolie91 c7f54a98e0 Merge remote-tracking branch 'origin/Saturn-Next' into moreopengl 2023-11-14 21:16:47 +01:00
alufolie91 7da8c20409 remove that stuff 2023-11-14 21:16:04 +01:00
Alug 116328c7bf attempt at linked list for textures
also changes to caching handling a bit
seems to have helped with stuck colors a bit
2023-11-08 02:50:17 +01:00
Alug bd68fef4a2 Zzzzz... 2023-11-08 00:38:48 +01:00
alufolie91 7759d56ad3 Fix uninitialized reads in PreparePolygon
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1392
2023-11-08 00:17:42 +01:00
Alug 9c7020a369 GRRRRRR not GLLLLLLLL 2023-11-07 18:23:31 +01:00
alufolie91 f8c1903316 change how mipmap caching works
also a bit of texture conversion
idk
2023-11-07 18:19:40 +01:00
alufolie91 652423ad14 Cache and reuse removed mobjs when spawning mobjs
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2200
2023-11-06 12:27:23 +01:00
674 changed files with 111572 additions and 61510 deletions

No files matched your search

-73
View File
@@ -1,73 +0,0 @@
version: 2
jobs:
build:
working_directory: /root/SRB2
docker:
- image: debian:stretch
environment:
CC: ccache gcc -m32
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
LIBGME_CFLAGS: -I/usr/include
LIBGME_LDFLAGS: -lgme
CCACHE_COMPRESS: true
WFLAGS: -Wno-unsuffixed-float-constants
GCC49: true
#- image: ubuntu:trusty
# environment:
# CC: ccache gcc -m32
# PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
# LIBGME_CFLAGS: -I/usr/include
# LIBGME_LDFLAGS: -lgme
# CCACHE_COMPRESS: true
# WFLAGS: -Wno-unsuffixed-float-constants
# GCC48: true
steps:
- 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
- run:
name: Support S3 upload
command: apt-get -qq -y install ca-certificates
- restore_cache:
keys:
- v1-SRB2-APT
- run:
name: Install SDK
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: rebuild depend
command: make -C src LINUX=1 clean
- restore_cache:
keys:
- v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
- run:
name: Compile
command: make -C src LINUX=1 ERRORMODE=1 -k
- store_artifacts:
path: /root/SRB2/bin/Linux/Release/
destination: bin
- save_cache:
key: v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
paths:
- /root/.ccache
+1
View File
@@ -4,6 +4,7 @@
*.plg
*.suo
*.vcproj.*.*.user
*.kate-swp
Win32_LIB_ASM_Debug
Win32_LIB_ASM_Release
*.bsc
-436
View File
@@ -1,436 +0,0 @@
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
-712
View File
@@ -1,712 +0,0 @@
# Travis-CI Config
#
# You may use the Deployer to upload packages and builds to external servers.
# See deployer/travis/deployer_defaults.sh for environment variables to configure.
language: c
sudo: required
dist: trusty
matrix:
include:
################################
# Test Buildbots
# Deployer does not operate on these. See Deployer Buildbots, below.
# These bots are disabled when a deployment is triggered by 'deployer' branch name AND DPL_TERMINATE_TESTS=1.
# These bots remain enabled when a deployment is triggered by release tag.
################################
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.4
compiler: gcc-4.4
env: GCC44=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.6
compiler: gcc-4.6
env: GCC46=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.7
compiler: gcc-4.7
env: GCC47=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.7
- os: linux
compiler: gcc
env: GCC48=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
env: GCC48=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-7
compiler: gcc-7
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough" GCC72=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-8
compiler: gcc-8
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow -Wno-error=format-truncation" GCC81=1
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
- os: linux
compiler: clang
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.5.0 (tags/RELEASE_350/final)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.5
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.5
compiler: clang-3.5
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.6
compiler: clang-3.6
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.6.2-svn240577-1~exp1 (branches/release_36) (based on LLVM 3.6.2)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.7
compiler: clang-3.7
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Ubuntu clang version 3.7.1-svn253571-1~exp1 (branches/release_37) (based on LLVM 3.7.1)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.8
compiler: clang-3.8
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.9
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- clang-3.9
compiler: clang-3.9
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#clang version 3.9.X
# - os: linux
# addons:
# apt:
# sources:
# - llvm-toolchain-precise-4.0
# - ubuntu-toolchain-r-test
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - clang-4.0
# compiler: clang-4.0
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #clang version 4.0.X
# - os: linux
# addons:
# apt:
# sources:
# - llvm-toolchain-precise-5.0
# - ubuntu-toolchain-r-test
# packages:
# - libsdl2-mixer-dev
# - libpng-dev
# - libgl1-mesa-dev
# - libgme-dev
# - p7zip-full
# - clang-5.0
# compiler: clang-5.0
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #clang version 5.0.X
# - os: osx
# osx_image: beta-xcode6.1
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
# - os: osx
# osx_image: beta-xcode6.2
# compiler: gcc
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
## - os: osx
## osx_image: beta-xcode6.3
## if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
## #I think xcode.6.3 VM is broken, it does not boot
# - os: osx
# osx_image: xcode6.4
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
# - os: osx
# osx_image: xcode7
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.0 (clang-700.0.72)
# - os: osx
# osx_image: xcode7.1
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.0 (clang-700.1.76)
# - os: osx
# osx_image: xcode7.2
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
# #Apple LLVM version 7.0.2 (clang-700.1.81)
# - os: osx
# osx_image: xcode7.3
# #Apple LLVM version 7.3.0 (clang-703.0.31)
# - os: osx
# osx_image: xcode7.3
# #Apple LLVM version 7.3.0 (clang-703.0.31)
- os: osx
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
#Default: macOS 10.13 and Xcode 9.4.1
################################
# Deployer Buildbots - OSX
################################
- os: osx
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=osx
- _DPL_FTP_TARGET=1
- _DPL_PACKAGE_BINARY=1
#Apple LLVM version 7.3.0 (clang-703.0.31)
################################
# Deployer Buildbots - Linux assets
# Set DPL_TERMINATE_ASSETS to disable all of these
# List Ubuntu LTS next, newest to oldest
# Then list non-LTS, newest to oldest
################################
- 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
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_ASSETS) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=bionic-asset
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- _DPL_PACKAGE_MAIN=0
- _DPL_PACKAGE_ASSET=1
- PACKAGE_DISTRO=bionic
#- PACKAGE_SUBVERSION=~18.04bionic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
################################
# The below asset bots produce packages that occupy too much space.
# It would be nice if the asset files were not included in the source package itself,
# so these can deploy to each Ubuntu target without manual intervention.
#
# Currently, to get around Launchpad's space limitation,
# copy the packages from *one* bot and the space usage is not increased.
################################
# - 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: trusty
# 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_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=trusty-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=trusty
# #- PACKAGE_SUBVERSION=~14.04trusty
# #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_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=disco-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=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_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=cosmic-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=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_ASSETS) != "1"
# env:
# - _DPL_JOB_ENABLED=1
# - _DPL_JOB_NAME=xenial-asset
# - _DPL_DPUT_TARGET=1
# - _DPL_PACKAGE_SOURCE=1
# - _DPL_PACKAGE_MAIN=0
# - _DPL_PACKAGE_ASSET=1
# - PACKAGE_DISTRO=xenial
# #- PACKAGE_SUBVERSION=~16.04xenial
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
################################
# Deployer Buildbots - Linux binaries
# List Ubuntu LTS, newest to oldest
# Then list non-LTS, newest to oldest
################################
- 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
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
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=bionic
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=bionic
- PACKAGE_SUBVERSION=~18.04bionic
#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
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
dist: trusty
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=trusty
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=trusty
- PACKAGE_SUBVERSION=~14.04trusty
#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
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=eoan
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- 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
- compiler: clang-3.6
- compiler: clang-3.7
- compiler: clang-3.8
- compiler: clang-3.9
- compiler: clang-4.0
- compiler: clang-5.0
cache:
apt: true
ccache: true
directories:
- $HOME/srb2_cache
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- zlib1g-dev
- libcurl4-openssl-dev
- p7zip-full
homebrew:
taps:
- mazmazz/srb2
packages:
- sdl2_mixer
- game-music-emu
- p7zip
- cmake
- curl
update: true
before_install:
# Initialize Deployer defaults
- . ./deployer/travis/deployer_defaults.sh
# Initialize Deployer; check if Deployer is enabled
# This needs to be run in the current shell so that $__DPL_ACTIVE is set for this session
- . ./deployer/travis/deployer.sh
# Also check if we should now terminate -- see `deployer.sh` for conditions.
# This should never happen on non-release buildbots when Deployer is not triggered.
- if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]]; then
if [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Exiting early because this job is not deploying.";
exit;
fi;
fi
# If we're triggered by release tag, force ASSET_FILES_OPTIONAL_GET=1
- if [[ "$__DPL_TAG_ELIGIBLE" = "1" ]]; then
ASSET_FILES_OPTIONAL_GET=1;
fi;
install:
# Install OS X library dependencies via Homebrew
# Do this differently for release buildbots:
# * `brew install --build-bottle` builds libraries for x86_64's lowest common denominator CPU, core2
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
# * `brew postinstall` runs post-install scripts after building a bottle
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$__DPL_ACTIVE" == "1" ]]; then
brew install --build-bottle sdl2 game-music-emu;
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
fi;
fi
- mkdir -p $HOME/srb2_cache
before_script:
# OLDPWD is root repo folder
- OLDPWD=$PWD
- __ASSET_DIRECTORY="$OLDPWD/assets/installer"
- mkdir -p "$__ASSET_DIRECTORY"
- cd "$HOME/srb2_cache"
# Get stat command so we know what the cached archive date is.
# stat is different for OSX
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
STATCMD="stat -f %m";
else
STATCMD="stat -c %y";
fi
# Get asset files (required for MD5)
# See `deployer_defaults.sh` for asset download path
- if [[ "$ASSET_ARCHIVE_PATH" != "" ]]; then
if [ -f "$(basename $ASSET_ARCHIVE_PATH)" ]; then
echo "$(basename $ASSET_ARCHIVE_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_PATH))";
fi;
wget --verbose --server-response -N "$ASSET_ARCHIVE_PATH";
7z x "$(basename $ASSET_ARCHIVE_PATH)" -o"$__ASSET_DIRECTORY" -aos;
fi;
# Get optional files too
- if [[ "$__DPL_ACTIVE" == "1" ]] && [[ "$ASSET_FILES_OPTIONAL_GET" == "1" ]] && [[ "$ASSET_ARCHIVE_OPTIONAL_PATH" != "" ]]; then
if [ -f "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" ]; then
echo "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_OPTIONAL_PATH))";
fi;
wget --verbose --server-response -N "$ASSET_ARCHIVE_OPTIONAL_PATH";
7z x "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" -o"$__ASSET_DIRECTORY" -aos;
fi;
# Go back to root repo folder
- cd "$OLDPWD"
# Prepare CMake asset lists
- SRB2_ASSET_HASHED=$(echo ${ASSET_FILES_HASHED// /\;})
- SRB2_ASSET_DOCS=$(echo ${ASSET_FILES_DOCS// /\;})
- SRB2_ASSET_DIRECTORY="$__ASSET_DIRECTORY"
# Prepare CMake
- mkdir build
- cd build
- mkdir package
- export CFLAGS="-Wall -W -Werror $WFLAGS"
- export CCACHE_COMPRESS=true
# If OS X, set -march=core2 to build compatible binaries with old Macs
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CFLAGS="${CFLAGS} -march=core2";
fi;
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/bin -DCPACK_PACKAGE_DIRECTORY=$PWD/package
-DSRB2_ASSET_HASHED="${SRB2_ASSET_HASHED}" -DSRB2_ASSET_DOCS="${SRB2_ASSET_DOCS}"
-DSRB2_ASSET_DIRECTORY="${SRB2_ASSET_DIRECTORY}"
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY="${PROGRAM_NAME}"
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
script:
# Build our Makefile from Cmake!
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
. ../deployer/travis/deployer_build.sh;
else
make -k;
fi;
after_success:
# Run the upload scripts
# These do nothing if Deployer is not triggered
- . ../deployer/travis/deployer_ftp.sh
- . ../deployer/travis/deployer_dput.sh
+38 -29
View File
@@ -1,14 +1,46 @@
cmake_minimum_required(VERSION 3.5)
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project(SRB2
VERSION 1.6
LANGUAGES C)
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
endif()
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project(SRB2
VERSION 1.6
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF) # optional but recommended: disables GNU extensions, forces pure ISO C++
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_C_EXTENSIONS ON)
##### PACKAGE CONFIGURATION #####
set(SRB2_CPACK_GENERATOR "" CACHE STRING "Generator to use for making a package. E.g., ZIP, TGZ, DragNDrop (OSX only). Leave blank for default generator.")
if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(SRB2_CPACK_GENERATOR "ZIP")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(SRB2_CPACK_GENERATOR "TGZ")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(SRB2_CPACK_GENERATOR "TGZ")
endif()
endif()
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
include(CPack)
# Set up CMAKE path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
@@ -73,6 +105,7 @@ endif()
# OS macros
if (UNIX)
add_definitions(-DUNIXCOMMON)
add_link_options(-rdynamic) # Use -rdynamic so a backtrace log shows function names
endif()
if(CMAKE_COMPILER_IS_GNUCC)
@@ -95,14 +128,12 @@ set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Set EXE names so the assets CMakeLists can refer to its target
set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
set(SRB2_WIN_EXE_NAME srb2kartdd CACHE STRING "Executable binary output name for DirectDraw build")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
add_subdirectory(src)
add_subdirectory(assets)
## config.h generation
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
include(GitUtilities)
@@ -111,25 +142,3 @@ git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
set(SRB2_COMP_REVISION "${SRB2_COMP_COMMIT}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
##### PACKAGE CONFIGURATION #####
if(${CMAKE_SYSTEM} MATCHES "Windows")
set(CPACK_GENERATOR "ZIP")
endif()
if(${CMAKE_SYSTEM} MATCHES "Linux")
set(CPACK_GENERATOR "TGZ")
endif()
if(${CMAKE_SYSTEM} MATCHES "Darwin")
set(CPACK_GENERATOR "DragNDrop")
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
include(CPack)
-269
View File
@@ -1,269 +0,0 @@
# Doxyfile 1.4.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = SRB2
PROJECT_NUMBER = 1.09
OUTPUT_DIRECTORY = ./doc/SRB2
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ./src
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox
RECURSIVE = YES
EXCLUDE = ./src/sdl/IMG_xpm.c \
./src/sdl/SRB2DC/scramble.c
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */src/hardware/*/* \
*/src/sdl/SDL_main/* \
*/src/*/*_private.h \
*/src/sdl/*/*help.? \
*/src/md5.? \
*/src/sdl/filter/*
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
#USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN \
HWRENDER \
DIRECTFULLSCREEN \
HW3SOUND \
LOGMESSAGES \
WALLSPLATS \
FLOORSPLATS
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
+20 -1
View File
@@ -13,10 +13,12 @@ Mainly for use in visual-only addons like secondcolor.
**Not netsafe**. Returns player's current sliptide roll angle, taking sliptideroll cvar value into account.
## hud.setVoteBackground(name)
## hud.setVoteBackground(name[, time\_per\_frame])
Changes vote background texture prefix (game looks for PREFIX + "W" or "C" (depends on resolution) + FRAME\_NUMBER).
If time\_per\_frame is set, each frame will last this amount of tics, default value is 2
## hud.add(fn, "vote") and hud.add(fn, "intermission")
Hud hooks for vote screen and intermission screen. They only get drawer (`v`) as argument.
@@ -120,6 +122,11 @@ v.interpLatch(false)
```
When using a custom string drawer, enable this mode to avoid interpolation artifacting when the string changes.
## cameras[] global array
Local player cameras that can be accessed outside of hud hooks.
`#cameras` will return amount of available cameras. (0 on dedicated server, 1 with 1 player, 4 with 4p splitscreen, etc)
## mobj.spritexscale, mobj.spriteyscale, mobj.spritexoffset, mobj.spriteyoffset, mobj.rollangle, mobj.sloperoll, mobj.rollmodel fields
Same fields as in SRB2 2.2
@@ -192,6 +199,18 @@ from `0` to `#musicdefs-1`, or string indices (which is equal to calling `S_Find
Hook is called whenever `S_ShowMusicCredit` (either from game or mod) is called. Takes musicdef as only argument, returning true
will overwrite vanilla behavior (not show music credit), can be used to implement custom music credit pop-ups.
## addHook("SetupVote", function(result, gt, secondgt, prevmap))
Hook is called whenever server sets up options for vote screen. `result` is table where lua can store options to,
(for example, `result[1] = 1` will force green hills as first option), gt is current gametype, secondgt is
alternative gametype picked for 3rd entry (for example, gt can be `GT_RACE`, and secondgt can be `GT_MATCH`)
prevmap is the previous map that was played (small note - in game code, it is offset by -1, but for lua its offset back,
so if previous gamemap was 1, prevmap would also be 1. Which means you can safely do mapheaderinfo[prevmap] to get info on previous map)
Limitations: currently, game can only change gametype for 3rd option in map (meaning for example, if current gametype is race, and you
put battle map in first option, when it gets picked that map will be still run in race gametype). That means, game will only handle maps with
different gametype if it is put in 3rd vote option.
# Other changes
## P_PlayRinglossSound(source, damager)
+18 -85
View File
@@ -1,103 +1,36 @@
# SRB2Kart: Saturn
# SRB2Kart-Saturn
SRB2Kart-Saturn is a modification of SRB2Kart with a focus on new Features, Fixes, Optimizations and general Improvements, all while retaining 100% compatibility with vanilla SRB2Kart.
[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;)
For more information on Saturn´s features check out the changelogs on the [Releases](https://github.com/Indev450/SRB2Kart-Saturn/releases) page and the ingame "Saturn Options" menu.
- 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)
- Palette rendering, make the OpenGL renderer (almost) look like software mode!
- OpenMPT for Tracker module playback instead of GME
- Fixes looping and sounds better
- Allows filter configuration
- Colourize your Kart HUD, to either your player color or whichever colour you like! (optional / requieres extra2.kart file)
- The minimal brightness with Shaders can be configured, now you can seeeee in dark areas (0-255 , uses Sector brightness values)
- Lua 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)
- Support for animated votescreens!
- `showmusiccredit` command, shows you the current music track again
- `listskins` show a list of all skins currently loaded
- Visual Portals from Haya's HEP Client
- Horizonline effect in OpenGL (watch the endless bricks on SNES Bowsers Castle!)
- Localskins! use whatever skin you like!
- Toggable lowercase menu's also from Haya's HEP client
- Everything that Galaxy has
Also be sure to check the LUASTUFF file for more information on all the extra lua features Saturn 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)
- A simple button to rejoin your last visited server
- Ability to show ALL maps in the mapselect screen, this includes hidden or hellmaps "showallmaps yes/no"
- Ability to toggle the Stagetitlecard "maptitles on/off"
## Performance / Debugging
- Access for `mobj_t` and `player_t` fields from Lua has been completely rewritten, for much better performance with many Lua scripts
- Lua shows Tracebacks whenever an error occurs
- The Lua Perfstats page now has multiple pages and is more organized (ps_thinkframe_page X in console)
- People with lower end hardware can disable "screen textures" with "gr_screentextures" command, huge performance gain with minimal visual loss
- 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
- Many bugfixes to the Software renderer, so its much less prone to crashing
- Many bugfixes to the OpenGL renderer (too many too list all of them here; check the changelogs for more information)
- Bugfixes to the soundsystem, mainly regarding Sound muting
- Refactored Zone Memory Allocations (helps a bit with large maps)
- Many many more crash fixes and other bugfixes to the basegame (too many too list all of them here; check the changelogs for more information)
- Crash Backtraces have been replaced by libbacktrace (except for 32bit Windows builds)
Crashlogs now contain alot more informations. and even more if your build has debug symbols
Also allows 64bit Windows builds to produce Crashlogs!
## MISC
- Bird's Camera 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:
## Note
Check the LUASTUFF file for more information on all the lua things Saturn has.
We also have a Flatpak available on [Flathub](https://flathub.org/en/apps/org.srb2.SRB2Kart-Saturn)! (many thanks to riomccloud!)
## Dependencies
- SDL2 (Linux/OS X only)
- SDL2-Mixer (Linux/OS X only)
- libupnp (Linux/OS X only)
- libgme (Linux/OS X only)
- libopenmpt (Linux/OS X only)
- libbacktrace (Linux/OS X only)
- libbacktrace (Linux/OS X only, optional, disable support with NOLIBBACKTRACE)
- libupnp (Linux/OS X only, optional, enable support with HAVE_MINIUPNPC)
## Compiling
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
For Windows only the Makefile build system with GCC or Clang compiler is supported.
Visual C++ (MSVC) is unsupported.
64-bit Windows builds are supported and recommended over 32-bit builds, they will build automatically when using the MSYS2 MinGW 64-bit executable (requires the mingw-w64-x86_64-gcc package), no extra flags needed!
The specific DLLs can be found under /libs/dll-binaries/(i686 for 32bit/x86_64 for 64-bit)/ or in the Release packages
MacOS and Linux can be build with CMake, but it is recommended to use the Makefile for Linux over CMake
Alternatively the [srb2bld](https://github.com/Bijman/srb2bld) script by Bijman can be used aswell!
## Disclaimer
Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.
-2136
View File
File diff suppressed because it is too large. Load diff
-3033
View File
File diff suppressed because it is too large. Load diff
-133
View File
@@ -1,133 +0,0 @@
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'))
+5
View File
@@ -1,5 +1,10 @@
## Assets Target Configuration ##
if(${CMAKE_SYSTEM} MATCHES Linux)
# Asset installation isn't part of the Linux target
return()
endif()
# For prepending the current source path, later
FUNCTION(PREPEND var prefix)
SET(listVar "")
+18
View File
@@ -30,6 +30,24 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
0-Clause BSD License
applies to:
- qs22k
Copyright (c) 2022, Raymond Gardner
--------------------------------------------------------------------------------
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
curl License
applies to:
+3 -2
View File
@@ -1,6 +1,6 @@
include(LibFindMacros)
libfind_pkg_check_modules(GME_PKGCONF GME)
libfind_pkg_check_modules(GME_PKGCONF LIBGME)
find_path(GME_INCLUDE_DIR
NAMES gme.h
@@ -8,6 +8,7 @@ find_path(GME_INCLUDE_DIR
${GME_PKGCONF_INCLUDE_DIRS}
"/usr/include/gme"
"/usr/local/include/gme"
PATH_SUFFIXES gme
)
find_library(GME_LIBRARY
@@ -20,4 +21,4 @@ find_library(GME_LIBRARY
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
set(GME_PROCESS_LIBS GME_LIBRARY)
libfind_process(GME)
libfind_process(GME)
+3 -2
View File
@@ -1,6 +1,6 @@
include(LibFindMacros)
libfind_pkg_check_modules(OPENMPT_PKGCONF OPENMPT)
libfind_pkg_check_modules(OPENMPT_PKGCONF LIBOPENMPT)
find_path(OPENMPT_INCLUDE_DIR
NAMES libopenmpt.h
@@ -8,6 +8,7 @@ find_path(OPENMPT_INCLUDE_DIR
${OPENMPT_PKGCONF_INCLUDE_DIRS}
"/usr/include/libopenmpt"
"/usr/local/include/libopenmpt"
PATH_SUFFIXES libopenmpt
)
find_library(OPENMPT_LIBRARY
@@ -20,4 +21,4 @@ find_library(OPENMPT_LIBRARY
set(OPENMPT_PROCESS_INCLUDES OPENMPT_INCLUDE_DIR)
set(OPENMPT_PROCESS_LIBS OPENMPT_LIBRARY)
libfind_process(OPENMPT)
libfind_process(OPENMPT)
+33
View File
@@ -0,0 +1,33 @@
include(LibFindMacros)
libfind_pkg_check_modules(LIBBACKTRACE_PKGCONF LIBBACKTRACE)
find_path(LIBBACKTRACE_INCLUDE_DIR
NAMES backtrace.h
PATHS
${LIBBACKTRACE_PKGCONF_INCLUDE_DIRS}
"/usr/include"
"/usr/local/include"
)
find_library(LIBBACKTRACE_LIBRARY
NAMES backtrace
PATHS
${LIBBACKTRACE_PKGCONF_LIBRARY_DIRS}
"/usr/lib"
"/usr/local/lib"
)
set(LIBBACKTRACE_PROCESS_INCLUDES LIBBACKTRACE_INCLUDE_DIR)
set(LIBBACKTRACE_PROCESS_LIBS LIBBACKTRACE_LIBRARY)
libfind_process(LIBBACKTRACE)
if(LIBBACKTRACE_FOUND AND NOT TARGET libbacktrace)
add_library(libbacktrace UNKNOWN IMPORTED)
set_target_properties(
libbacktrace
PROPERTIES
IMPORTED_LOCATION "${LIBBACKTRACE_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBBACKTRACE_INCLUDE_DIR}"
)
endif()
+37 -18
View File
@@ -1,4 +1,4 @@
# Version 2.2
# Version 2.4
# Public Domain, originally written by Lasse Kärkkäinen <tronic>
# Maintained at https://github.com/Tronic/cmake-modules
# Please send your improvements as pull requests on Github.
@@ -52,6 +52,10 @@ function (libfind_pkg_detect PREFIX)
if (libraryargs)
find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
endif()
# Read pkg-config version
if (${PREFIX}_PKGCONF_VERSION)
set(${PREFIX}_VERSION ${${PREFIX}_PKGCONF_VERSION} PARENT_SCOPE)
endif()
endfunction()
# Extracts a version #define from a version.h file, output stored to <PREFIX>_VERSION.
@@ -125,24 +129,39 @@ function (libfind_process PREFIX)
# Process deps to add to
foreach (i ${PREFIX} ${${PREFIX}_DEPENDENCIES})
if (DEFINED ${i}_INCLUDE_OPTS OR DEFINED ${i}_LIBRARY_OPTS)
if (DEFINED ${i}_INCLUDE_OPTS)
# The package seems to export option lists that we can use, woohoo!
list(APPEND includeopts ${${i}_INCLUDE_OPTS})
else()
if (DEFINED ${i}_INCLUDE_DIR)
# Singular forms can be used
list(APPEND includeopts ${i}_INCLUDE_DIR)
else()
if (DEFINED ${i}_INCLUDE_DIRS)
# Plural forms can be used
list(APPEND includeopts ${i}_INCLUDE_DIRS)
else()
# Oh no, we don't know the option names
message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes. Aieeh!")
endif()
endif()
endif()
if (DEFINED ${i}_LIBRARY_OPTS)
# The package seems to export option lists that we can use, woohoo!
list(APPEND libraryopts ${${i}_LIBRARY_OPTS})
else()
# If plural forms don't exist or they equal singular forms
if ((NOT DEFINED ${i}_INCLUDE_DIRS AND NOT DEFINED ${i}_LIBRARIES) OR
({i}_INCLUDE_DIR STREQUAL ${i}_INCLUDE_DIRS AND ${i}_LIBRARY STREQUAL ${i}_LIBRARIES))
if (DEFINED ${i}_LIBRARY)
# Singular forms can be used
if (DEFINED ${i}_INCLUDE_DIR)
list(APPEND includeopts ${i}_INCLUDE_DIR)
endif()
if (DEFINED ${i}_LIBRARY)
list(APPEND libraryopts ${i}_LIBRARY)
endif()
list(APPEND libraryopts ${i}_LIBRARY)
else()
# Oh no, we don't know the option names
message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes and libs. Aieeh!")
if (DEFINED ${i}_LIBRARIES)
# Plural forms can be used
list(APPEND libraryopts ${i}_LIBRARIES)
else()
# Oh no, we don't know the option names
message(FATAL_ERROR "We couldn't determine config variable names for ${i} libraries. Aieeh!")
endif()
endif()
endif()
endforeach()
@@ -209,12 +228,12 @@ function (libfind_process PREFIX)
message(STATUS " ${PREFIX}_LIBRARY_OPTS=${libraryopts}")
message(STATUS " ${PREFIX}_LIBRARIES=${libs}")
endif()
set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
endif()
set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
return()
endif()
-70
View File
@@ -1,70 +0,0 @@
srb2 for Debian
---------------
SRB2 Debian package!
Hi there, to rebuild these packages just use debuild in the root source directory (not /src!).
You can build these with or without a key if you want, but if you want to put these on a repo,
generate your own GnuPG key as per the https://help.ubuntu.com/community/GnuPrivacyGuardHowto
instructions and pass the -k<keyid> command to debuild. Make sure you export the key footprint
and give them to your users to install with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
---------------
Templating
Note that you MUST run [repo-root]/debian_template.sh before running debuild
on these scripts! debian_template.sh fills these template files with working values.
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
the identity of the key you will use to sign the package.
Building for Launchpad PPA
Use these steps to prepare building a source package for Launchpad:
1. cd [repo-root]
2. git reset --hard; git clean -fd; git clean -fx;
* Resets your repo folder to a committed state and removes untracked files
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
Build the source package:
1. source [repo-root]/debian_template.sh
* Initializes defaults for the package variables and fills in templates.
2. debuild -S (builds the source package for Launchpad)
Signing for Launchpad PPA
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
to publish the fingerprint of that key to Ubuntu's key server.
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
upload signed source packages and publish them onto your PPA.
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
means your key is not set up correctly with your Launchpad account.
Finally, if your packages have not already been signed, follow these steps:
1. cd ..
* Packages are located in the parent folder of where debuild was called
2. debsign "srb2_[version]_source.changes"
* You may need to specify -k [key-fingerprint]
Uploading for Launchpad PPA
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages.
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
-46
View File
@@ -1,46 +0,0 @@
srb2 for Debian
---------------
Here it is! SRB2 v2.1.2 source code!
GNU/Linux
~~~
Dependencies:
SDL 1.2.7 or better (from libsdl.org)
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
libPNG 1.2.7
Zlib 1.2.3
The Xiph.org libogg and libvorbis libraries
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
installation, so you needn't worry, most likely)
GCC 3.x toolchain and binutils
GNU Make
Build instructions:
make -C src LINUX=1
Build instructions for non-X86 devices (such as X64):
make -C src LINUX=1 NONX86=1
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
follow cross-compiling instructions for cross-compiling on a x86 system:
make -C src LINUX=1 WIILINUX=1
Build instructions to build for Pandora (Linux) on a ARM system,
follow cross-compiling instructions for cross-compiling on a x86 system:
make -C src PANDORA=1
-------------------------------------------------------------------------------
binaries will turn in up in bin/
note: read the src/makefile for more options
- Sonic Team Junior
http://www.srb2.org
-5
View File
@@ -1,5 +0,0 @@
${PACKAGE_NAME} (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
* ${PROGRAM_NAME} v${PROGRAM_VERSION} program build
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
-1
View File
@@ -1 +0,0 @@
7
-51
View File
@@ -1,51 +0,0 @@
# SRB2 Debian package control file.
Source: ${PACKAGE_NAME}
Section: games
Priority: extra
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
Build-Depends: debhelper (>= 7.0.50~),
libsdl2-dev,
libsdl2-mixer-dev,
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]
Standards-Version: 3.8.4
Homepage: ${PACKAGE_WEBSITE}
Package: ${PACKAGE_NAME}
Architecture: any
Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}),
libsdl2-2.0-0,
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
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. It features tons of levels, enemies, speed,
and quite a lot of the fun that the original Sonic games provided.
Package: ${PACKAGE_NAME}-dbg
Architecture: any
# FIXME: should be Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
Depends: libc6, ${MISC_DEPENDS}, ${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}), ${PACKAGE_NAME}
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
port of Doom. SRB2 is closely inspired by the original
Sonic games from the Sega Genesis, and attempts to recreate
the design in 3D. It features tons of levels, enemies, speed,
and quite a lot of the fun that the original Sonic games provided.
This is a debug binary; its symbols will be loaded by gdb
when the user starts the game with gdb for debugging.
-27
View File
@@ -1,27 +0,0 @@
This work was packaged for Debian by:
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
It was downloaded from:
${PACKAGE_WEBSITE}
Upstream Author(s):
${PACKAGE_GROUP_NAME_EMAIL}
Copyright:
Copyright (C) 1998-2018 by Sonic Team Junior
License:
GNU General Public License, version 2
The Debian packaging is:
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
and is licensed under the GPL version 2,
see "/usr/share/common-licenses/GPL-2".
-4
View File
@@ -1,4 +0,0 @@
README.md
assets/README.txt
assets/LICENSE.txt
assets/LICENSE-3RD-PARTY.txt
-172
View File
@@ -1,172 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
#############################################################################
#
# GNU Make Debian package makefile for SRB2
#
# Copyright (C) 1998-2010 by Callum Dickinson
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This file most likely will not need to be modified to make
# branches of SRB2 capable of making their own Debian packages,
# instead look at the /debian/control file for configuration.
#
#############################################################################
#############################################################################
#
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
#
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
# Variables used by the rules script are parenthese'd $(PKGDIR)
# See [repo-root]/debian_template.sh
#
#############################################################################
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# user/group of to-be-installed files
ROOT_USER := 0
ROOT_GROUP := 0
# determine cross-compile (may need some work)
CROSS_COMPILE_BUILD := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CROSS_COMPILE_HOST := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
CROSS_COMPILE := $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "$(CROSS_COMPILE_HOST)")
MKDIR = mkdir -p
MAKE = make
INSTALL = install -o $(ROOT_USER) -g $(ROOT_GROUP) -m 644
MV = mv
RM = rm -rf
STRIPARGS = --strip-unneeded
ifdef CROSS_COMPILE
STRIP = $(CROSS_COMPILE_HOST)-strip $(STRIPARGS)
else
STRIP = strip $(STRIPARGS)
endif
DIR := $(shell pwd)
# FIXME: hate hate hate head/tail hack :(
CONTROLF = $(DIR)/debian/control
PACKAGE = ${PACKAGE_NAME}
DBGPKG = ${PACKAGE}-dbg
TITLE = ${PROGRAM_NAME}
SECTION = Games/Action
EXENAME = ${PROGRAM_FILENAME}
DBGNAME = debug/$(EXENAME)
PKGDIR = $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
DBGDIR = usr/lib/debug/$(PKGDIR)
LINKDIR = $(shell echo "${PACKAGE_LINK_PATH}" | sed -e 's/^\///')
PIXMAPS_DIR = usr/share/pixmaps
DESKTOP_DIR = usr/share/applications
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
OS = LINUX=1
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
BINDIR := $(DIR)/bin/Linux/Release
# FIXME pkg-config dir hacks
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile
# export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
# Some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves
PKG_CONFIG?=pkg-config
LIBGME_PKGCONFIG?=libgme
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
ifeq ($(LIBGME_LDFLAGS),)
MAKEARGS += LIBGME_LDFLAGS=-lgme
endif
build:
$(MKDIR) $(BINDIR)/debug
$(MAKE) -C $(DIR)/src $(MAKEARGS)
$(STRIP) $(BINDIR)/$(EXENAME)
binary-indep:
# only here to kill Lintian warning
echo "no need to do any arch-independent stuff"
binary-arch:
# create ddirs
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DBGDIR)
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DESKTOP_DIR)
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(PIXMAPS_DIR)
# install main binaries
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
# Install desktop file and banner image
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps/${PROGRAM_FILENAME}.png
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications/${PROGRAM_FILENAME}.desktop
# add compiled binaries to include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
# Generate install folder files
echo $(PKGDIR) > $(DIR)/debian/$(PACKAGE).install
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
# Launchpad only calls binary-arch, so just move everything up
#binary: binary-arch
# Generate .desktop specifications
echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu
echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install --sourcedir=$(DIR)/debian/tmp
dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
dh_link $(PKGDIR)/$(EXENAME) $(LINKDIR)/$(EXENAME)
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
-dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch
clean:
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
$(RM) $(BINDIR)/*
$(RM) $(DIR)/debian/$(PACKAGE)/*
$(RM) $(DIR)/debian/$(DBGPKG)/*
$(RM) $(DIR)/debian/tmp/*
$(RM) $(DIR)/debian/$(PACKAGE).install
$(RM) $(DIR)/debian/$(DBGPKG).install
$(RM) $(DIR)/debian/menu
$(RM) $(DIR)/debian/files
$(RM) $(DIR)/debian/source/include-binaries
.PHONY: all clean binary binary-indep build
-1
View File
@@ -1 +0,0 @@
3.0 (native)
-11
View File
@@ -1,11 +0,0 @@
tar-ignore = "assets/*.srb"
tar-ignore = "assets/*.pk3"
tar-ignore = "assets/*.dta"
tar-ignore = "assets/*.wad"
tar-ignore = "assets/*.kart"
tar-ignore = "assets/debian/${PACKAGE_NAME}-data/*"
tar-ignore = "assets/debian/tmp/*"
tar-ignore = "*.obj"
tar-ignore = "*.dep"
tar-ignore = ".git/*"
tar-ignore = ".git*"
-10
View File
@@ -1,10 +0,0 @@
[Desktop Entry]
Name=${PROGRAM_NAME}
Comment=${PROGRAM_DESCRIPTION}
Encoding=UTF-8
Exec=${PACKAGE_INSTALL_PATH}/${PROGRAM_FILENAME}
Icon=/usr/share/pixmaps/${PROGRAM_FILENAME}.png
Terminal=false
Type=Application
StartupNotify=false
Categories=Application;Game;
-166
View File
@@ -1,166 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# Debian package templating
#
# Call this script BEFORE running debuild!
# source ./debian_template.sh [clean] [main/asset]
#
# Before running this script,
# you should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
# the identity of the key you will use to sign the package.
#
# Get script's actual path
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Recursive function for directory crawling
# $1 = Directory root to crawl
# $2 = Code to eval on file
# $3 = Code to eval on directory
# Exposes $dirtails, $dirlevel, and $dirtailname
dirlevel=0 # initialize
dirtails=()
# Utility function to make dira/dirb/dirc string
makedirtailname () {
dirtailname=""
for tail in $dirtails; do
if [[ "$dirtailname" == "" ]]; then
dirtailname="/$tail";
else
dirtailname="$dirtailname/$tail";
fi;
done;
}
evaldirectory () {
if [ -d "$1" ]; then
# Set contextual variables
# dirtails is an array of directory basenames after the crawl root
if (( $dirlevel > 0 )); then
dirtails+=( "$(basename $1)" );
else
dirtails=();
fi;
dirlevel=$((dirlevel+1));
# Generate directory path after the crawl root
makedirtailname;
# Eval our directory with the latest contextual info
# Don't eval on root
if (( $dirlevel > 1 )) && [[ "$3" != "" ]]; then
eval "$3";
fi;
# Iterate entries
for name in $1/*; do
if [ -d "$name" ]; then
# Name is a directory, but don't eval yet
# Recurse so our vars are updated
evaldirectory "$name" "$2" "$3";
# Decrement our directory level and remove a dirtail
unset 'dirtails[ ${#dirtails[@]}-1 ]';
dirlevel=$((dirlevel-1));
makedirtailname;
else
# Name is a file
if [ -f "$name" ] && [[ "$2" != "" ]]; then
eval "$2";
fi;
fi;
done;
# Reset our variables; we're done iterating
if (( $dirlevel == 1 )); then
dirlevel=0;
fi;
fi;
}
#
# Initialize package parameter defaults
#
if [[ "$__DEBIAN_PARAMETERS_INITIALIZED" != "1" ]]; then
. ${DIR}/deployer/travis/deployer_defaults.sh;
fi;
# Clean up after ourselves; we only expect to run this script once
# during buildboting
__DEBIAN_PARAMETERS_INITIALIZED=0
# for envsubst
export __PACKAGE_DATETIME="$(date '+%a, %d %b %Y %H:%M:%S %z')"
export __PACKAGE_DATETIME_DIGIT="$(date -u '+%Y%m%d%H%M%S')"
if [[ "$PACKAGE_REVISION" == "" ]]; then
PACKAGE_REVISION="-$__PACKAGE_DATETIME_DIGIT";
__PACKAGE_REVISION_BY_DATE=1;
export PACKAGE_REVISION=${PACKAGE_REVISION}; # for envsubst
fi;
#
# Clean the old debian/ directories
#
if [[ "$1" == "clean" ]]; then
toclean=$2;
else
toclean=$1;
fi;
if [[ "$toclean" == "" ]] || [[ "$toclean" == "main" ]]; then
echo "Cleaning main package scripts";
if [[ ! -f ${DIR}/debian ]]; then
rm -rf ${DIR}/debian;
fi;
fi;
if [[ "$toclean" == "" ]] || [[ "$toclean" == "asset" ]]; then
echo "Cleaning asset package scripts";
if [[ ! -f ${DIR}/assets/debian ]]; then
rm -rf ${DIR}/assets/debian;
fi;
fi;
#
# Make new templates
#
if [[ "$1" != "clean" ]]; then
totemplate=$1;
# HACK: ${shlibs:Depends} in the templates make the templating fail
# So just define replacemment variables
export SHLIBS_DEPENDS=${SHLIBS_DEPENDS};
export MISC_DEPENDS=${MISC_DEPENDS};
export DEBFILEVAR='$$file'; # used in assets/debian/rules
# Package parameters are exported for envsubst in deployer_defaults.sh
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "main" ]]; then
echo "Generating main package scripts";
fromroot=${DIR}/debian-template;
toroot=${DIR}/debian;
mkdir ${toroot};
evaldirectory ${fromroot} \
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
"mkdir \"${toroot}\${dirtailname}\"";
fi;
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "asset" ]]; then
echo "Generating asset package scripts";
fromroot=${DIR}/assets/debian-template;
toroot=${DIR}/assets/debian;
mkdir ${toroot};
# Root dir to crawl; file eval; directory eval
evaldirectory ${fromroot} \
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
"mkdir \"${toroot}\${dirtailname}\"";
fi;
fi;
if [[ "$__DPL_ACTIVE" != "1" ]] && [[ "$__PACKAGE_REVISION_BY_DATE" == "1" ]]; then
unset PACKAGE_REVISION; # so we can reset the date on subsequent runs
fi;
-195
View File
@@ -1,195 +0,0 @@
@setlocal enableextensions enabledelayedexpansion
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Appveyor Deployer
: See appveyor.yml for default variables
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Evaluate whether we should be deploying
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if not [%DPL_ENABLED%] == [1] (
echo Deployer is not enabled...
exit /b
)
: Don't do DD installs because fmodex DLL handling is not implemented.
if [%CONFIGURATION%] == [DD] (
echo Deployer does not support DD builds...
exit /b
)
if [%CONFIGURATION%] == [DD64] (
echo Deployer does not support DD builds...
exit /b
)
: Substring match from https://stackoverflow.com/questions/7005951/batch-file-find-if-substring-is-in-string-not-in-a-file
: The below line says "if deployer is NOT in string"
: Note that APPVEYOR_REPO_BRANCH for pull request builds is the BASE branch that PR is merging INTO
if x%APPVEYOR_REPO_BRANCH:deployer=%==x%APPVEYOR_REPO_BRANCH% (
if not [%APPVEYOR_REPO_TAG%] == [true] (
echo Deployer is enabled but we are not in a release tag or a 'deployer' branch...
exit /b
) else (
if not [%DPL_TAG_ENABLED%] == [1] (
echo Deployer is not enabled for release tags...
exit /b
)
)
)
: Release tags always get optional assets (music.dta)
if [%APPVEYOR_REPO_TAG%] == [true] (
set "ASSET_FILES_OPTIONAL_GET=1"
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Get asset archives
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist "C:\Users\appveyor\srb2_cache\archives\" (
if [%ASSET_CLEAN%] == [1] (
echo Cleaning asset archives...
rmdir /s /q "C:\Users\appveyor\srb2_cache\archives"
)
)
if not exist "C:\Users\appveyor\srb2_cache\archives\" mkdir "C:\Users\appveyor\srb2_cache\archives"
goto EXTRACT_ARCHIVES
::::::::::::::::::::::::::::::::
: ARCHIVE_NAME_PARTS
: Call this like a function. %archivepath% is the path to extract parts from.
::::::::::::::::::::::::::::::::
for %%a in (%archivepath%) do (
set "file=%%~fa"
set "filepath=%%~dpa"
set "filename=%%~nxa"
)
set "localarchivepath=C:\Users\appveyor\srb2_cache\archives\%filename%"
goto EOF
::::::::::::::::::::::::::::::::
: EXTRACT_ARCHIVES
::::::::::::::::::::::::::::::::
set "archivepath=%ASSET_ARCHIVE_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_PATH_LOCAL=%localarchivepath%"
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATH%" -FileName "%localarchivepath%"
set "archivepath=%ASSET_ARCHIVE_PATCH_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_PATCH_PATH_LOCAL=%localarchivepath%"
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATCH_PATH%" -FileName "%localarchivepath%"
if not [%X86_64%] == [1] (
set "archivepath=%ASSET_ARCHIVE_X86_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_X86_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X86_PATH%" -FileName "!localarchivepath!"
)
if [%X86_64%] == [1] (
set "archivepath=%ASSET_ARCHIVE_X64_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_X64_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X64_PATH%" -FileName "!localarchivepath!"
)
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
set "archivepath=%ASSET_ARCHIVE_OPTIONAL_PATH%"
call :ARCHIVE_NAME_PARTS
set "ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL=!localarchivepath!"
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_OPTIONAL_PATH%" -FileName "!localarchivepath!"
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Build the installers
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
mkdir "assets\installer"
mkdir "assets\patch"
7z x -y "%ASSET_ARCHIVE_PATH_LOCAL%" -o"assets\installer" >null
7z x -y "%ASSET_ARCHIVE_PATCH_PATH_LOCAL%" -o"assets\patch" >null
: Copy optional files to full installer (music.dta)
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
7z x -y "%ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL%" -o"assets\installer" >null
)
: Copy EXE -- BUILD_PATH is from appveyor.yml
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\installer" /XF "*.debug" ".gitignore"
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\patch" /XF "*.debug" ".gitignore"
: Are we building DD? (we were supposed to exit earlier!)
if [%CONFIGURATION%] == [DD] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
if [%CONFIGURATION%] == [DD64] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
: If we are not a release tag, suffix the filename
if not [%APPVEYOR_REPO_TAG%] == [true] (
set "INSTALLER_SUFFIX=-%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%"
) else (
set "INSTALLER_SUFFIX="
)
if not [%X86_64%] == [1] ( goto X86_INSTALL )
::::::::::::::::::::::::::::::::
: X64_INSTALL
::::::::::::::::::::::::::::::::
: Extract DLL binaries
7z x -y "%ASSET_ARCHIVE_X64_PATH_LOCAL%" -o"assets\installer" >null
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
7z x -y "!ASSET_ARCHIVE_X64_PATH_LOCAL!" -o"assets\patch" >null
)
: Build the installer
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
: Build the patch
7z a "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
: Upload artifacts
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe"
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip"
: We only do x86 OR x64, one at a time, so exit now.
goto EOF
::::::::::::::::::::::::::::::::
: X86_INSTALL
::::::::::::::::::::::::::::::::
: Extract DLL binaries
7z x -y "%ASSET_ARCHIVE_X86_PATH_LOCAL%" -o"assets\installer" >null
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
7z x -y "!ASSET_ARCHIVE_X86_PATH_LOCAL!" -o"assets\patch" >null
)
: Build the installer
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
: Build the patch
7z a "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
: Upload artifacts
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe"
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip"
: We only do x86 OR x64, one at a time, so exit now
goto EOF
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: EOF
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
endlocal
-157
View File
@@ -1,157 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# Initialization
#
# Performs validity checks to ensure that Deployer is allowed to run
# e.g., is an FTP hostname specified? Are we whitelisted by OSNAMES and BRANCHES?
#
# Set these environment variables in your Travis-CI settings, where they are stored securely.
# See other shell scripts for more options.
#
# DPL_ENABLED = 1 (leave blank to disable)
# DPL_TAG_ENABLED = 1 (run Deployer on all tags)
# DPL_JOB_ENABLE_ALL = 1 (run Deployer on all jobs; leave blank to act on specific jobs, see below)
# DPL_JOBNAMES = name1,name2 (whitelist of job names to allow uploading; leave blank to upload from all jobs)
# DPL_OSNAMES = osx (whitelist of OS names to allow uploading; leave blank to upload from all OSes)
# DPL_BRANCHES = master,branch1,branch2 (whitelist of branches to upload; leave blank to upload all branches)
#
# To enable Deployer on specific jobs, set _DPL_JOB_ENABLED=1 for that job. Example:
# - matrix:
# - os: osx
# env:
# - _DPL_JOB_ENABLED=1
#
# DO NOT set __DPL_ACTIVE, because that would bypass these validity checks.
# Validate Deployer state
if [[ "$DPL_ENABLED" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
# Test for base eligibility:
# Are we in a deployer branch? Or
# Are we in a release tag AND DPL_TAG_ENABLED=1?
if [[ $TRAVIS_BRANCH == *"deployer"* ]]; then
__DPL_BASE_ELIGIBLE=1;
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
fi;
if [[ "$TRAVIS_TAG" != "" ]] && [[ "$DPL_TAG_ENABLED" == "1" ]]; then
__DPL_BASE_ELIGIBLE=1;
__DPL_TAG_ELIGIBLE=1;
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
fi;
# Logging message for trigger word
if [[ "$__DPL_TAG_ELIGIBLE" != "1" ]] && [[ "$DPL_TRIGGER" != "" ]]; then
echo "Testing for trigger $DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
echo "[${DPL_TRIGGER}]";
echo "[${DPL_TRIGGER}-${_DPL_JOB_NAME}]";
echo "[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]";
fi;
#
# Search for the trigger word
# Force enable if release tags are eligible
#
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_TRIGGER" == "" ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER]"* ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${_DPL_JOB_NAME}]"* ]] \
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]"* ]]; then
#
# Whitelist by branch name
# Force enable if release tags are eligible
#
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
# Set this so we only early-terminate builds when we are specifically deploying
# Trigger string and branch are encompassing conditions; the rest are job-specific
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
# because we're filtering non-deployer jobs.
#
# __DPL_TRY_TERMINATE_EARLY is invalidated in .travis.yml if __DPL_ACTIVE=1
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
__DPL_TRY_TERMINATE_EARLY=1;
fi;
#
# Is the job enabled for deployment?
#
if [[ "$DPL_JOB_ENABLE_ALL" == "1" ]] || [[ "$_DPL_JOB_ENABLED" == "1" ]]; then
#
# Whitelist by job names
#
if [[ "$DPL_JOBNAMES" == "" ]] || [[ "$_DPL_JOB_NAME" == "" ]] || [[ $DPL_JOBNAMES == *"$_DPL_JOB_NAME"* ]]; then
#
# Whitelist by OS names
#
if [[ "$DPL_OSNAMES" == "" ]] || [[ $DPL_OSNAMES == *"$TRAVIS_OS_NAME"* ]]; then
# Base Deployer is eligible for becoming active
# Are we building for Linux?
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]] || [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
__DPL_DEBIAN_ACTIVE=1;
fi;
fi;
fi;
# Now check for deployment targets
if [[ "$_DPL_FTP_TARGET" == "1" ]] && [[ "$DPL_FTP_HOSTNAME" != "" ]]; then
if [[ "$TRAVIS_OS_HOST" == "linux" ]] && [[ "$DPL_FTP_PROTOCOL" == "ftp" ]]; then
echo "Non-secure FTP will not work on Linux Travis-CI jobs!";
echo "Try SFTP or another target. Details:";
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
else
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] || [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_BINARY" == "1" ]]; then
echo "Deployer FTP target is enabled";
__DPL_FTP_ACTIVE=1;
else
echo "Deployer FTP target cannot be enabled: You must specify _DPL_PACKAGE_BINARY=1,";
echo "and/or _DPL_BINARY=1 in your job's environment variables.";
fi;
fi;
fi;
if [[ "$_DPL_DPUT_TARGET" == "1" ]] && [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] \
&& [[ "$DPL_DPUT_INCOMING" != "" ]]; then
if [[ "$DPL_DPUT_METHOD" == "ftp" ]]; then
echo "DPUT will not work with non-secure FTP on Linux Travis-CI jobs!";
echo "Try SFTP or another method for DPUT. Details:";
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
else
echo "Deployer DPUT target is enabled";
__DPL_DPUT_ACTIVE=1;
fi;
fi;
# If any deployment targets are active, then so is the Deployer at large
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
__DPL_ACTIVE=1;
fi;
fi;
fi;
fi;
fi;
else
if [[ "$DPL_TRIGGER" != "" ]]; then
echo "Testing for global trigger [$DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
fi;
if [[ "$DPL_TRIGGER" != "" ]] && [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER"* ]]; then
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
# because we're filtering non-deployer jobs.
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
# Assume that some job received the trigger, so mark this for early termination
__DPL_TRY_TERMINATE_EARLY=1;
fi;
fi;
fi;
fi;
fi;
if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Deployer is active in another job";
fi;
if [[ "$__DPL_TRY_TERMINATE_EARLY" != "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
echo "Deployer is not active";
fi;
-190
View File
@@ -1,190 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# Build Script
#
# Builds the required targets depending on which sub-modules are enabled
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
echo "Building Debian package(s)"
sudo apt-get install devscripts debhelper fakeroot secure-delete expect;
# Build source packages first, since they zip up the entire source folder,
# binaries and all
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
. ../debian_template.sh main;
OLDPWD=$PWD; # [repo]/build
cd ..; # repo root
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
echo "Building main source Debian package";
expect <(cat <<EOD
spawn debuild -S -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building main binary Debian package";
expect <(cat <<EOD
spawn debuild -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
cd $OLDPWD;
fi;
# Also an asset package
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
. ../debian_template.sh asset;
OLDPWD=$PWD; # [repo]/build
cd ../assets;
# make sure the asset files exist, download them if they don't
#echo "Checking asset files for asset Debian package";
#debuild -T build;
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
echo "Building asset source Debian package";
expect <(cat <<EOD
spawn debuild -S -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building asset binary Debian package";
expect <(cat <<EOD
spawn debuild -us -uc;
expect "continue anyway? (y/n)"
send "y\r"
interact
EOD
);
fi;
cd $OLDPWD;
fi;
# Now sign our packages
if [[ "$DPL_PGP_KEY_PRIVATE" != "" ]] && [[ "$DPL_PGP_KEY_PASSPHRASE" != "" ]]; then
# Get the key to sign
# Do this AFTER debuild so that we can specify the passphrase in command line
echo "$DPL_PGP_KEY_PRIVATE" | base64 --decode > key.asc;
echo "$DPL_PGP_KEY_PASSPHRASE" > phrase.txt;
gpg --import key.asc;
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
echo "Signing main package(s)";
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..; # parent of repo root
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*.changes; do
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
done;
done;
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
echo "Signing asset package(s)";
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..; # repo root
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*.changes; do
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
done;
done;
cd $OLDPWD;
fi;
# Delete the keys :eyes:
srm key.asc;
srm phrase.txt;
fi;
fi;
# all other OSes
if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then
#
# Check for binary building
#
if [[ "$_DPL_BINARY" == "1" ]]; then
echo "Building a Binary";
make -k;
fi;
#
# Check for package building
#
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
echo "Building a Package";
# Make an OSX package; superuser is required for library bundling
#
# HACK: OSX packaging can't write libraries to .app package unless we're superuser
# because the original library files don't have WRITE permission
# Bug may be sidestepped by using CHMOD_BUNDLE_ITEMS=TRUE
# But I don't know where this is set. Not `cmake -D...` because this var is ignored.
# https://cmake.org/Bug/view.php?id=9284
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
sudo make -k package;
else
# Some day, when Windows is supported, we'll just make a standard package
make -k package;
fi;
fi;
fi;
fi;
-105
View File
@@ -1,105 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# Default Variables
#
# Here are all of the user-set variables used by Deployer.
# See the "Cross-platform deployment" page on SRB2 Wiki for documentation.
# Core Parameters
: ${DPL_ENABLED} # Enable Deployer behavior; must be set for any deployment activity
: ${DPL_TAG_ENABLED} # Trigger Deployer for all tag releases
: ${DPL_JOB_ENABLE_ALL} # Enable all jobs for deployment
: ${DPL_TERMINATE_TESTS} # Terminate all build test jobs (used in .travis.yml)
: ${DPL_TRIGGER} # Use a [word] in the commit message to trigger Deployer
: ${DPL_JOBNAMES} # Trigger Deployer by job name
: ${DPL_OSNAMES} # Trigger Deployer by OS name (osx,linux)
: ${DPL_BRANCHES} # Trigger Deployer by git branch name
# Job Parameters
: ${_DPL_JOB_ENABLED} # Enable Deployer for this specific job. DPL_ENABLED must be set too.
: ${_DPL_JOB_NAME} # Identifier for the job, used for logging and trigger word matching
: ${_DPL_FTP_TARGET} # Deploy to FTP
: ${_DPL_DPUT_TARGET} # Deploy to DPUT
: ${_DPL_PACKAGE_SOURCE} # Build packages into a Source distribution. Linux only.
: ${_DPL_PACKAGE_BINARY} # Build packages into a Binary distribution.
: ${_DPL_PACKAGE_MAIN:=1} # Build main installation package. Linux only; OS X assumes this.
: ${_DPL_PACKAGE_ASSET} # Build asset installation package. Linux only.
# Asset File Parameters
: ${ASSET_ARCHIVE_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z}
: ${ASSET_ARCHIVE_OPTIONAL_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z}
: ${ASSET_FILES_HASHED:=srb2.srb patch.kart gfx.kart textures.kart chars.kart maps.kart}
: ${ASSET_FILES_DOCS:=README.txt HISTORY.txt LICENSE.txt LICENSE-3RD-PARTY.txt}
: ${ASSET_FILES_OPTIONAL_GET:=0}
# FTP Parameters
: ${DPL_FTP_PROTOCOL}
: ${DPL_FTP_USER}
: ${DPL_FTP_PASS}
: ${DPL_FTP_HOSTNAME}
: ${DPL_FTP_PORT}
: ${DPL_FTP_PATH}
# DPUT Parameters
: ${DPL_DPUT_DOMAIN:=ppa.launchpad.net}
: ${DPL_DPUT_METHOD:=sftp}
: ${DPL_DPUT_INCOMING}
: ${DPL_DPUT_LOGIN:=anonymous}
: ${DPL_SSH_KEY_PRIVATE} # Base64-encoded private key file. Used to sign repository uploads
: ${DPL_SSH_KEY_PASSPHRASE} # Decodes the private key file.
# Package Parameters
: ${PACKAGE_NAME:=srb2kart}
: ${PACKAGE_VERSION:=1.0.2}
: ${PACKAGE_SUBVERSION} # Highly recommended to set this to reflect the distro series target (e.g., ~18.04bionic)
: ${PACKAGE_REVISION} # Defaults to UTC timestamp
: ${PACKAGE_INSTALL_PATH:=/usr/games/SRB2Kart}
: ${PACKAGE_LINK_PATH:=/usr/games}
: ${PACKAGE_DISTRO:=trusty}
: ${PACKAGE_URGENCY:=high}
: ${PACKAGE_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
: ${PACKAGE_GROUP_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
: ${PACKAGE_WEBSITE:=<https://mb.srb2.org/showthread.php?p=802695>}
: ${PACKAGE_ASSET_MINVERSION:=1.0.1} # Number this the version BEFORE the actual required version, because we do a > check
: ${PACKAGE_ASSET_MAXVERSION:=1.0.3} # Number this the version AFTER the actual required version, because we do a < check
: ${PROGRAM_NAME:=Sonic Robo Blast 2 Kart}
: ${PROGRAM_VENDOR:=Kart Krew}
: ${PROGRAM_VERSION:=1.0.2}
: ${PROGRAM_DESCRIPTION:=A kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2.}
: ${PROGRAM_FILENAME:=srb2kart}
: ${DPL_PGP_KEY_PRIVATE} # Base64-encoded private key file. Used to sign Debian packages
: ${DPL_PGP_KEY_PASSPHRASE} # Decodes the private key file.
# Export Asset and Package Parameters for envsubst templating
export ASSET_ARCHIVE_PATH="${ASSET_ARCHIVE_PATH}"
export ASSET_ARCHIVE_OPTIONAL_PATH="${ASSET_ARCHIVE_OPTIONAL_PATH}"
export ASSET_FILES_HASHED="${ASSET_FILES_HASHED}"
export ASSET_FILES_DOCS="${ASSET_FILES_DOCS}"
export ASSET_FILES_OPTIONAL_GET="${ASSET_FILES_OPTIONAL_GET}"
export PACKAGE_NAME="${PACKAGE_NAME}"
export PACKAGE_VERSION="${PACKAGE_VERSION}"
export PACKAGE_SUBVERSION="${PACKAGE_SUBVERSION}" # in case we have this
export PACKAGE_REVISION="${PACKAGE_REVISION}"
export PACKAGE_ASSET_MINVERSION="${PACKAGE_ASSET_MINVERSION}"
export PACKAGE_ASSET_MAXVERSION="${PACKAGE_ASSET_MAXVERSION}"
export PACKAGE_INSTALL_PATH="${PACKAGE_INSTALL_PATH}"
export PACKAGE_LINK_PATH="${PACKAGE_LINK_PATH}"
export PACKAGE_DISTRO="${PACKAGE_DISTRO}"
export PACKAGE_URGENCY="${PACKAGE_URGENCY}"
export PACKAGE_NAME_EMAIL="${PACKAGE_NAME_EMAIL}"
export PACKAGE_GROUP_NAME_EMAIL="${PACKAGE_GROUP_NAME_EMAIL}"
export PACKAGE_WEBSITE="${PACKAGE_WEBSITE}"
export PROGRAM_NAME="${PROGRAM_NAME}"
export PROGRAM_VERSION="${PROGRAM_VERSION}"
export PROGRAM_DESCRIPTION="${PROGRAM_DESCRIPTION}"
export PROGRAM_FILENAME="${PROGRAM_FILENAME}"
# This file is called in debian_template.sh, so mark our completion so we don't run it again
__DEBIAN_PARAMETERS_INITIALIZED=1
-133
View File
@@ -1,133 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# DPUT uploader (e.g., Launchpad PPA)
#
if [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
# Install APT dependencies
# paramiko required for ssh
sudo apt-get install python-paramiko expect dput; # python-pip
#pip install paramiko;
# Output the DPUT config
# Dput only works if you're using secure FTP, so that's what we default to.
cat > "./dput.cf" << EOM
[deployer]
fqdn = ${DPL_DPUT_DOMAIN}
method = ${DPL_DPUT_METHOD}
incoming = ${DPL_DPUT_INCOMING}
login = ${DPL_DPUT_LOGIN}
allow_unsigned_uploads = 0
EOM
# Output SSH config
# Don't let SSH prompt us for untrusted hosts
cat >> "./ssh_config" << EOM
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
PubKeyAuthentication yes
IdentityFile ${PWD}/key.private
IdentitiesOnly yes
EOM
sudo sh -c "cat < ${PWD}/ssh_config >> /etc/ssh/ssh_config";
# Get the private key
echo "$DPL_SSH_KEY_PRIVATE" | base64 --decode > key.private;
chmod 700 ./key.private;
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..;
# Enter passphrase if required
for n in ${PACKAGEFILENAMES}; do
for f in $n*.changes; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
expect <(cat <<EOD
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
expect "Enter passphrase for key"
send "${DPL_SSH_KEY_PASSPHRASE}\r"
interact
EOD
);
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..;
# Enter passphrase if required
for n in ${PACKAGEFILENAMES}; do
for f in $n*.changes; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
expect <(cat <<EOD
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
expect "Enter passphrase for key"
send "${DPL_SSH_KEY_PASSPHRASE}\r"
interact
EOD
);
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
srm ./key.private;
fi;
-137
View File
@@ -1,137 +0,0 @@
#!/bin/bash
# Deployer for Travis-CI
# FTP Uploader
#
# Package files are uploaded to, e.g., ftp://username:password@example.com:21/path/to/upload/STJr/SRB2/master/460873812-151.1
# With file `commit.txt` and folder(s) `bin` and `package`
#
# Set these environment variables in your Travis-CI settings, where they are stored securely.
# See other shell scripts for more options.
#
# DPL_FTP_PROTOCOL = ftp (ftp or sftp or ftps or however your FTP URI begins)
# DPL_FTP_USER = username
# DPL_FTP_PASS = password
# DPL_FTP_HOSTNAME = example.com
# DPL_FTP_PORT = 21
# DPL_FTP_PATH = path/to/upload (do not add trailing slash)
if [[ "$__DPL_FTP_ACTIVE" == "1" ]]; then
if [[ "$TRAVIS_JOB_NAME" != "" ]]; then
JOBNAME=$TRAVIS_JOB_NAME;
else
if [[ "$_DPL_JOB_NAME" != "" ]]; then
JOBNAME=$_DPL_JOB_NAME;
else
JOBNAME=$TRAVIS_OS_NAME;
fi;
fi;
# Generate commit.txt file
echo "Travis-CI Build $TRAVIS_OS_NAME - $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH - $TRAVIS_JOB_NUMBER - $JOBNAME" > "commit.txt";
echo "Job ID $TRAVIS_JOB_ID" >> "commit.txt";
echo "" >> "commit.txt";
echo "Commit $TRAVIS_COMMIT" >> "commit.txt";
echo "$TRAVIS_COMMIT_MESSAGE" >> "commit.txt";
echo "" >> "commit.txt";
# Initialize FTP parameters
if [[ "$DPL_FTP_PORT" == "" ]]; then
DPL_FTP_PORT=21;
fi;
if [[ "$DPL_FTP_PROTOCOL" == "" ]]; then
DPL_FTP_PROTOCOL=ftp;
fi;
__DPL_FTP_LOCATION=$DPL_FTP_PROTOCOL://$DPL_FTP_HOSTNAME:$DPL_FTP_PORT/$DPL_FTP_PATH/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_JOB_ID-$TRAVIS_JOB_NUMBER-$JOBNAME;
# Upload to FTP!
echo "Uploading to FTP...";
curl --ftp-create-dirs -T "commit.txt" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/commit.txt";
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
$PACKAGEDBGFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGENIGHTLYDBGFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHDBGFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
#$PACKAGEPATCHNIGHTLYDBGFILENAME
);
# Main packages are in parent of root repo folder
OLDPWD=$PWD; # [repo]/build
cd ../..;
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/main/$f";
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
PACKAGEFILENAMES=(
$PACKAGEFILENAME
#$PACKAGENIGHTLYFILENAME
#$PACKAGEPATCHFILENAME
#$PACKAGEPATCHNIGHTLYFILENAME
)
# Asset packages are in root repo folder
OLDPWD=$PWD; # [repo]/build
cd ..;
for n in ${PACKAGEFILENAMES}; do
for f in ./$n*; do
# Binary builds also generate source builds, so exclude the source
# builds if desired
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
continue;
fi;
fi;
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/asset/$f";
done;
done;
# Go back to [repo]/build folder
cd $OLDPWD;
fi;
else
if [[ "$_DPL_BINARY" == "1" ]]; then
find bin -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
fi;
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
sudo rm -r package/_CPack_Packages
find package -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
fi;
fi;
fi
-93
View File
@@ -1,93 +0,0 @@
================================================================
How to add Low-res modes to your XF86Config under Linux MANUALLY
================================================================
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!!
This document explains how to add low-res modes like 320x200 to your
X-Server configuration, because some new setup tools for the X-Server
do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
I do not take any responsibility for damage done to your monitor, your
videocard, your harddisk, your cat, your dog or anything else!!!
IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY
MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!!
OK, if you have read up to here, you either know what you do or really
die-hard want those low-res modes. Here is what to do:
Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is
what you have to add to the definition of your modeslines:
# Low-res Doublescan modes
# If your chipset does not support doublescan, you get a 'squashed'
# resolution like 320x400.
# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio
Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan
# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan
# 320x240 @ 72 Hz, 36.5 kHz hsync
Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan
# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio
ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan
# 400x300 @ 60 Hz, 37.8 kHz hsync
Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan
# 400x300 @ 72 Hz, 48.0 kHz hsync
Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan
If your video card only supports a specific set of discrete dotclocks
(RAMDAC) you may have to replace the dotclocks given here by one of the
specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe
that nowadays all cards and monitors should work with these settings, but
if you have outdated hardware you better check the frequencies yourself. If
there is any uncertainty, please check the "XFree86 Video Timings HOWTO".
Then have a look at the section "Screen" with the appropriate driver
(usually either "svga" or "accel"). Under Subsection "Display" there
are modes for the given color depth. Add the desired modes. As an
example I give you my screens definition here with low-res modes in
16 bit color depth:
Section "Screen"
Driver "accel"
Device "3D Charger"
Monitor "Iiyama Pro 450"
DefaultColorDepth 16
Subsection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
Virtual 1280 1024
EndSubsection
Subsection "Display"
Depth 16
Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!!
ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^
Virtual 1152 864
EndSubsection
Subsection "Display"
Depth 24
Modes "800x600" "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
Subsection "Display"
Depth 32
Modes "800x600" "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
EndSection
Once again: important is, that you edit the correct Screen section.
If you use the SVGA Server and edit the ACCEL Server, you might
wonder where your new modes have gone.
If everything went fine and you want to say thank you, just write
to "metzgermeister@users.sourceforge.net". If your monitor blew
up and you want to kill me, find me playing Legacy or Q3A on the net
and frag me (with your second monitor, hehe).
- metzgermeister
-212
View File
@@ -1,212 +0,0 @@
1-99 : Player Starts
1 - Player 1 Start 1
2 - Player 2 Start 2
3 - Player 3 Start 3
4 - Player 4 Start 4
5 - Player 5 Start 4001
6 - Player 6 Start 4002
7 - Player 7 Start 4003
8 - Player 8 Start 4004
9 - Player 9 Start 4005
10 - Player 10 Start 4006
11 - Player 11 Start 4007
12 - Player 12 Start 4008
13 - Player 13 Start 4009
14 - Player 14 Start 4010
15 - Player 15 Start 4011
16 - Player 16 Start 4012
17 - Player 17 Start 4013
18 - Player 18 Start 4014
19 - Player 19 Start 4015
20 - Player 20 Start 4016
21 - Player 21 Start 4017
22 - Player 22 Start 4018
23 - Player 23 Start 4019
24 - Player 24 Start 4020
25 - Player 25 Start 4021
26 - Player 26 Start 4022
27 - Player 27 Start 4023
28 - Player 28 Start 4024
29 - Player 29 Start 4025
30 - Player 30 Start 4026
31 - Player 31 Start 4027
32 - Player 32 Start 4028
33 - Player Match Start 11
34 - Red Team Start 87
35 - Blue Team Start 89
36 - Tag start New
100 - 199 : Enemies
100 - Blue Crawla 3004
101 - Red Crawla 9
102 - GFZ Fish 58
103 - Gold Buzz 5005
104 - Red Buzz 5006
105 - Jetty-Syn Bomber 3005
106 - Jetty-Syn Gunner 22
107 - Crawla Commander 21
108 - Deton 71
109 - Skim 56
110 - THZ Turret 2004
111 - Pop-up Turret 42
200 - 299 : Bosses and their associated items (if any)
200 - Boss 1 16
201 - Boss 2 2008
290 - Boss Fly Point 17
291 - EggTrap Center 2049
300 - 399 : Collectibles
300 - Ring 2014
301 - Homing Ring 69
302 - Rail Ring 3003
303 - Infinity Ring 80
304 - Automatic Ring 26
305 - Explosion Ring 54
306 - Red CTF Flag 31
307 - Blue CTF Flag 34
308 - Special Stage Token 2013
309 - Emerald 1 420
310 - Emerald 2 421
311 - Emerald 3 422
312 - Emerald 4 423
313 - Emerald 5 424
314 - Emerald 6 425
315 - Emerald 7 426
316 - Hunting Emerald 1 64
317 - Hunting Emerald 2 3002
318 - Hunting Emerald 3 3001
400 - 499 : Boxes
400 - Super Ring Box 2011
401 - Grey Ring Box 2012
402 - Ring Shield Box 48
403 - Fire Shield Box 2002
404 - Bomb Shield Box 2018
405 - Jump Shield Box 35
406 - Water Shield Box 2028
407 - Sneaker Box 25
408 - Invincibility Box 2022
409 - 1-Up Box 41
410 - Eggman Box 2005
411 - Mixup Box 78
412 - Question Box 3000
500 - 599 : Interactive Objects (friendly or otherwise - includes springs)
500 - Bubble Patch 33
501 - Level End Sign 86
502 - Starpost 3006
520 - Spike Ball -1
521 - Special Stage Spike Ball 23
522 - Ceiling Spike 67
523 - Floor Spike 68
540 - Fan 32
541 - Steam Riser 30
550 - Yellow Spring 28
551 - Red Spring 79
552 - Blue Spring 5004
553 - Yellow Spring Down 65
554 - Red Spring Down 66
555 - Yellow Diagonal Spring 2015
556 - Red Diagonal Spring 38
557 - Yellow Diag Spring Down 20
558 - Red Diag Spring Down 39
600 - 699 : Special placement patterns
600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84
601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44
602 - Diagonal rings (5) 76
603 - Diagonal rings (10) 77
604 - A ring of rings 47
605 - A BIGGER ring of rings 2007
606 - A ring of wing items 2048
607 - A BIGGER ring of wing items 2010
608 - A ring of rings and wings (alternating) 2046
609 - A BIGGER ring of rings and wings (alternating) 2047
700 - 799 : Powerup indicators/environmental effects/miscellany
700 - Ambient Water 1a (S) 2026
701 - Ambient Water 1b (S) 2024
702 - Ambient Water 2a (M) 2023
703 - Ambient Water 2b (M) 2045
704 - Ambient Water 3a (L) 83
705 - Ambient Water 3b (L) 2019
706 - Ambient Water 4a (XL) 2025
707 - Ambient Water 4b (XL) 27
708 - Random Ambient 1 14
709 - Random Ambient 2 43
750 - Chaos Spawner 8
751 - Teleport Point 5003
752 - Alternate View Point 5007
753 - Zoom Tube Waypoint 18
754 - Pusher 5001
755 - Puller 5002
756 - Street Light 2003
800 - 899 : Greenflower Scenery
800 - Flower 1 36
801 - Flower 2 70
802 - Flower 3 73
804 - Berry Bush 74
805 - Bush 75
900 - 999 : Techno Hill Scenery
900 - THZ Plant 2035
901 - Alarm 2006
1000 - 1099 : Deep Sea Scenery
1000 - Gargoyle 81
1100 - 1199 : Castle Eggman Scenery
1100 - Ceiling Chain 49
1101 - Torch Flame 24
1102 - Eggman Statue 52
1103 - CEZ Flower 2001
1200 - 1299 : Arid Canyon Scenery
1300 - 1399 : Red Volcano Scenery
1400 - 1499 : Dark City Scenery
1500 - 1599 : Doom Ship Scenery
1600 - 1699 : Egg Rock/Final Fight Scenery
1700 - 1799 : NiGHTS Items
1700 - Axis 72
1701 - Axis Transfer (Normal) 61
1702 - Axis Transfer (Line) 46
1703 - Nights Drone 60
1704 - Nights Bumper 82
1705 - Hoop 57
1706 - Nights Wing 37
1707 - Super Loop Powerup 3007
1708 - Drill Refill Powerup 3008
1709 - Helper Powerup 3009
1710 - Egg Capsule 40
1800 - 1849 : Mario Items
1800 - Coin 10005
1801 - Goomba 10000
1802 - Blue Goomba 10001
1803 - FireFlower 50
1804 - Shell 10
1805 - Puma 29
1806 - Koopa 19
1807 - Axe 12
1808 - Mario Bush 1 10002
1809 - Mario Bush 2 10003
1810 - Toad 10004
1850 - 1899 : Christmas Items
1850 - Xmas Pole 5
1851 - Candy Cane 13
1852 - Snowman 6
1900 - 1999 : Misc Scenery
1900 - Stalagmite 0
1901 - Stalagmite 1
1902 - Stalagmite 2
1903 - Stalagmite 3
1904 - Stalagmite 4
1905 - Stalagmite 5
1906 - Stalagmite 6
1907 - Stalagmite 7
1908 - Stalagmite 8
1909 - Stalagmite 9
-223
View File
@@ -1,223 +0,0 @@
Description OldNum NewNum Description
Old Water 14 Removed
Level Parameters/Misc:
Per-Sector Gravity 64 1
Custom Exit 71 2
Zoom Tube Parameters 18 3
Speed Pad 65 4
Camera Scanner 63 5
Disable Linedef 73 6
Flat Alignment 66 7
Sector Special Parameters New 8
Mace Parameters New 9
Sprite Cull Height New 10
Rope Hang Parameters New 11
Rock Spawner Parameters New 12
PolyObjects
Marks first line in PolyObject New 20
Explicitly includes a PolyObject line New 21
PolyObject: Parameters New 22
PolyObject: Waving Flag New 31
Level-Load Effects:
Instant Floor Lower 26 50
Instant Ceiling Raise 24 51
Continuously Falling Sector 88 52
Continuous Floor/Ceiling Mover 2 53
Continuous Floor Mover 3 54
Continuous Ceiling Mover 4 55
Continuous Two-Speed Floor/Ceiling Mover 6 56
Continuous Two-Speed Floor Mover 7 57
Continuous Two-Speed Ceiling Mover 8 58
Activate Floating Platform 232 59
Activate Floating Platform (Adjustable Speed) 233 60
Crusher 1 (Ceiling to Floor) 43 61
Crusher 2 (Floor to Ceiling) 50 62
Fake Floor/Ceiling 242 63
Appearing/Disappearing FOF New 64
Bridge Thinker New 65
Floor Over Floors:
"Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100
"Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101
"Floor Over Floor: Solid, Translucent " 44 102
"Floor Over Floor: Solid, Sides Only " 69 103
"Floor Over Floor: Solid, No Sides " 51 104
"Floor Over Floor: Solid, Invisible " 57 105
"Floor Over Floor: Water, Opaque " 48 120
"Floor Over Floor: Water, Translucent " 45 121
"Floor Over Floor: Water, Opaque, No Sides " 75 122
"Floor Over Floor: Water, Translucent, No Sides " 74 123
"Floor Over Floor: Platform, Opaque " 59 140
"Floor Over Floor: Platform, Translucent " 81 141
"Floor Over Floor: Platform, Translucent, No Sides " 77 142
Floor Over Floor: Bobbing (Air) 38 150
Floor Over Floor: Adjustable Bobbing (Air) 68 151
Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152
"Floor Over Floor: Floating, Bobbing " 34 160
Floor Over Floor: Crumbling (Respawn) 36 170
Floor Over Floor: Crumbling (No Respawn) 35 171
"Floor Over Floor: Crumbling (Respawn), Platform " 79 172
"Floor Over Floor: Crumbling (No Respawn), Platform " 80 173
"Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174
"Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175
"Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176
"Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177
"Floor Over Floor: Crumbling (Respawn), Floating " 37 178
"Floor Over Floor: Crumbling (No Respawn), Floating " 42 179
"Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180
"Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190
"Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191
"Floor Over Floor: Rising Platform, Solid, Translucent " 91 192
"Floor Over Floor: Rising Platform, Solid, Invisible " 94 193
"Floor Over Floor: Rising Platform, Platform, Opaque " 92 194
"Floor Over Floor: Rising Platform, Platform, Translucent " 93 195
Floor Over Floor: Light Block 49 200
Floor Over Floor: Half Light Block 47 201
Floor Over Floor: Fog Block 46 202
"Floor Over Floor: Intangible, Opaque " 62 220
"Floor Over Floor: Intangible, Translucent " 52 221
"Floor Over Floor: Intangible, Sides Only " 67 222
"Floor Over Floor: Intangible, Invisible " 58 223
Floor Over Floor: Mario Block 41 250
Floor Over Floor: Thwomp Block 54 251
Floor Over Floor: Shatter Block 76 252
"Floor Over Floor: Shatter Block, Translucent " 86 253
Floor Over Floor: Bustable Block 55 254
Floor Over Floor: Spin Bust Block 78 255
"Floor Over Floor: Spin Bust Block, Translucent " 84 256
Floor Over Floor: Quicksand Block 56 257
Floor Over Floor: Laser Block 53 258
Floor Over Floor: Custom 87 259
Linedef Executor Triggers:
Trigger Linedef Executor (Continuous) 96 300
Trigger Linedef Executor (Each Time) 97 301
Trigger Linedef Executor (Once) 98 302
Trigger Linedef Executor (Ring Count - Continuous) 95 303
Trigger Linedef Executor (Ring Count - Once) 99 304
Trigger Linedef Executor (Character Ability - Continuous) 19 305
Trigger Linedef Executor (Character Ability - Each Time) 20 306
Trigger Linedef Executor (Character Ability - Once) 21 307
"Trigger Linedef Executor (Race Only, Once) " 9 308
Trigger Linedef Executor (CTF Red Team - Continuous) 10 309
Trigger Linedef Executor (CTF Red Team - Each Time) 11 310
Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311
Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312
Trigger Linedef Executor (No More Enemies - Once) 15 313
Trigger Linedef Executor (# of Pushables - Continuous) New 314
Trigger Linedef Executor (# of Pushables - Once) New 315
Trigger Linedef Executors (PolyObject - Land On) New 316
Trigger Linedef Executor (Level Load) New 399
Linedef Executor Options:
Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400
Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401
Linedef Executor: Set Tagged Sector's Light Level 103 402
Linedef Executor: Move Tagged Sector's Floor 106 403
Linedef Executor: Move Tagged Sector's Ceiling 107 404
Linedef Executor: Lower Floor by Line 108 405
Linedef Executor: Raise Floor by Line 109 406
Linedef Executor: Lower Ceiling by Line 110 407
Linedef Executor: Raise Ceiling by Line 111 408
Linedef Executor: Change Calling Sector's Tag 112 409
Linedef Executor: Change Front Sector's Tag 114 410
Linedef Executor: Stop Plane Movement 116 411
Linedef Executor: Teleport Player to Tagged Sector 104 412
Linedef Executor: Change Music 105 413
Linedef Executor: Play SFX 115 414
Linedef Executor: Run Script 113 415
Linedef Executor: Start Adjustable Fire Flicker 119 416
Linedef Executor: Start Adjustable Glowing Light 120 417
Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418
Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419
Linedef Executor: Fade Light Level 117 420
Linedef Executor: Stop Lighting Effect 118 421
Linedef Executor: Cut-Away View 121 422
Linedef Executor: Change Sky 123 423
Linedef Executor: Change Weather 124 424
Linedef Executor: Change Object State 125 425
Linedef Executor: Stop Object 122 426
Linedef Executor: Award Score 126 427
Linedef Executor: Start Platform Movement 127 428
Linedef Executor: Crush Ceiling Once New 429
Linedef Executor: Crush Floor Once New 430
Linedef Executor: Crush Floor & Ceiling Once New 431
Linedef Executor: Enable 2D Mode New 432
Linedef Executor: Disable 2D Mode New 433
Linedef Executor: Award Custom Power New 434
Linedef Executor: Stop Conveyor New 435
Linedef Executor: Start Conveyor New 436
Linedef Executor: Disable Player Movement New 437
Linedef Executor: Execute Linedef Executor New 450
Linedef Executor: PolyObject: Door Slide New 480
Linedef Executor: PolyObject: Door Swing New 481
Linedef Executor: PolyObject: Move XY New 482
Linedef Executor: PolyObject: Move XY w/ override New 483
Linedef Executor: PolyObject: Rotate Right New 484
Linedef Executor: PolyObject: Rotate Right w/ override New 485
Linedef Executor: PolyObject: Rotate Left New 486
Linedef Executor: PolyObject: Rotate Left w/ override New 487
Linedef Executor: PolyObject: Start waypoint movement New 488
Linedef Executor: PolyObject: Make Invisible New 489
Linedef Executor: PolyObject: Make Visible New 490
Scrollers/Pushers:
Scroll Wall First Side Left 100 500
Scroll Wall First Side Opposite Direction 85 501
Scroll Wall According to Linedef 254 502
Acc Scroll Wall According to Linedef 218 503
Disp Scroll Wall According to Linedef 249 504
Scroll Texture by Offsets 255 505
Scroll Floor Texture 251 510
Acc Scroll Floor Texture 215 511
Disp Scroll Floor Texture 246 512
Scroll Ceiling Texture 250 513
Acc Scroll Ceiling Texture 214 514
Disp Scroll Ceiling Texture 245 515
Carry Objects on Floor (no scroll) 252 520
Acc Carry Objects on Floor 216 521
Disp Carry Objects on Floor 247 522
Carry Objects on Ceiling 203 523
Acc Carry Objects on Ceiling 205 524
Disp Carry Objects on Ceiling 201 525
Scroll Floor Texture and Carry Objects 253 530
Acc Scroll Floor Texture and Carry Objects 217 531
Disp Scroll Floor Texture and Carry Objects 248 532
Scroll Ceiling Texture and Carry Objects 202 533
Acc Scroll Ceiling Texture and Carry Objects 204 534
Disp Scroll Ceiling Texture and Carry Objects 200 535
Friction 223 540
Horizontal Wind 224 541
Upwards Wind 229 542
Downwards Wind 230 543
Horizontal Current 225 544
Upwards Current 227 545
Downwards Current 228 546
Boom Push/Pull Thing 226 547
Lighting:
Floor Lighting 213 600
Ceiling Lighting 5 601
Adjustable Pulsating Light 60 602
Adjustable Flickering Light 61 603
Adjustable Blinking Light (unsynchronized) New 604
Adjustable Blinking Light (synchronized) New 605
Colormap 16 606
BIN
View File
Binary file not shown.
-78
View File
@@ -1,78 +0,0 @@
Removed:
- Buttons 1-20 690-709
- Button 21 (THZ2 A/740 B/741 D/742 E/745 710
- Close Door Blazing (Tag 743) 711
- Raise Ceiling to Highest (Tag 744) 981
- THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986
Stuff to Remove/Change:
- Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine
- Light Blinks On Every 1 Second 3 Add Linedef Combine
- Light Pulses Smoothly 8 Remove
- Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine
- Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine
- Light Flickers Like Fire 17 Remove
? - Damage (Fire) and Current 519 Remove (convert to combination)
? - Damage (Water) and Current 984 Remove (convert to combination)
Section 1:
1 - Damage (Generic) 11
2 - Damage (Water) 983
3 - Damage (Fire) 7
4 - Damage (Electrical) 18
5 - Spikes 4
6 - Death Pit (Camera Mod) 16
7 - Death Pit (No Camera Mod) 5
8 - Instant Kill 10
9 - Ring Drainer (Floor Touch) 978
10 - Ring Drainer (No Floor Touch) 980
11 - Special Stage Damage 9
12 - Space Countdown 6
13 - Ramp Sector (Increase step-up) 992
14 - Non-Ramp Sector (Don't step-down) 996
15 - Bouncy Sector (FOF Control Only) 14
Section 2: << 4
1 - Trigger Linedef Exec (Pushable Objects) 971
2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972
3 - Trigger Linedef Exec (Floor Touch/All Pls) 973
4 - Trigger Linedef Exec (Anywhere in Sec) 974
5 - Trigger Linedef Exec (Floor Touch) 975
6 - Trigger Linedef Exec (Emerald Check) 967
7 - Trigger Linedef Exec (NiGHTS Mare) 968
8 - Check for linedef executor on FOFs (ANY) 970
9 - Egg Trap Capsule 666
10 - Special Stage Time/Rings, Par 990
11 - Custom Global Gravity 991
Section 3: << 8
1 - Ice/Sludge (required?!) 256
2 - Wind/Current (required?!) 512
3 - Ice/Sludge and Wind/Current 768
4 - Conveyor Belt 985
5 - Speed Pad (No Spin) 976
6 - Speed Pad (Spin) 977
7 - Bustable Block Sprite Parameter 1500-1515
8 - "
9 - "
10 - "
11 - "
12 - "
13 - "
14 - "
15 - "
Section 4: << 12
1 - Starpost Activator 993
2 - Special Stage Goal Combine 33
2 - Exit Sector Combine 982
2 - No Tag Zone Combine 987
2 - CTF: Flag Return Combine 995
3 - CTF: Red Team Base 988
4 - CTF: Blue Team Base 989
5 - Fan Sector 997
6 - Super Sonic Transform 969
7 - Spinner 979
8 - Zoom Tube Start 998
9 - Zoom Tube End 999
10 - Finish Line 994
-307
View File
@@ -1,307 +0,0 @@
SRB2
Release v1.09, ? 2005.
Last Updated: June 2005
Original game & sources by: Id Software.
Additions: (c)1998 by: Fabrice Denis & Boris Pereira
(c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe
(c)2000 by: Boris Pereira & Thierry Van Elsuwe
(c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis
Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for
their large contribution and to other DooM LEGACY & SRB2 Team members.
Web site: http://www.SRB2.org/
e-mail: none@none.com
OpenGL specific:
Web site: http://legacy.newdoom.com/gl
-----------------------------------------------------------------------
F.A.Q.
-----------------------------------------------------------------------
If you have any trouble with SRB2, you might find a solution
here.
If you find a solution to a problem that was not listed here,
please tell us so that we can update the FAQ and help other people!
Mail your hardware/software problems to:
None@none.com subject: FAQ
--------
CONTENTS
--------
[0] Miscellaneous
[1] Mouse/Joystick/Keyboard
[2] Video
[3] Sound
[4] Network
[5] Troubleshooting
-----------------
[0] MISCELLANEOUS
-----------------
* under win95 or OS/2, I don't have enough memory. How can i handle with ?
Tell win95 to put more dpmi memory for your dos box.
Or use the -mb option.
---------------------------
[1] MOUSE/JOYSTICK/KEYBOARD
---------------------------
* My mouse/joystick does not work in SRB2.
First, check that the mouse/joystick is activated : go at the
console and type either 'use_mouse' (or use the respective
menuitem) or 'use_joystick'.
If it tells '0' or off than the mouse/joystick is not used,
set the variable to 1. eg: 'use_mouse 1'.
For the joystick, different values will support different
types of joystick, check the console documentation for the
command 'use_joystick' for more.
Even if the mouse or joystick is activated, you have to
set up the contols into the Setup Controls menu. That is:
tell what use you will make of the mouse/joystick buttons.
---------
[2] VIDEO
---------
* Where are the other video modes ? I have only '320x200' in the
Video Modes menu.
DOS
---
SRB2 adds new video modes only if a VESA2 (or better) driver
is present. The VESA2 driver is a standard of 'talking' between a
program and the huge amount of different graphics cards
available today.
If you don't have a VESA2 driver, you can download UNIVBE, or
SMART DISPLAY DOCTOR from
http://www.scitechsoft.com/products/ent/free_titles.html
or if you have an S3 based card, you can download the free
software called 'S3VBE'.
ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip
ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip
http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip
http://www.google.com/search?q=s3vbe318.zip
* The game doesn't restore the video mode I have chosen the last time
I played SRB2.
The current video mode has to be made the 'default' so that it is
saved to the config : press the key 'D' on the Video Options menu
to set the current video mode the default.
* I have some problems with OpenGL mode
Have a look at the FAQ for OpenGL on the glLegacy web site:
http://www.doomnation.com/gllegacy/faqe.htm
# Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution
in fullscreen mode under X and SRB2 is really really slow. Can I
have lower resolutions like 320x200 in fullscreen mode as well?
Probably yes. SRB2 can only use the resolutions offered by the
X-Server. So if all fullscreen modes have a very high resolution you
have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup
(or the appropriate tool coming with your distribution - sax,
xf86config, ...) to do this.
If you do not succeed there, you can enter them manually into your
XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
For a short guide on how to do this, have a look at the file
"Doublescan.txt".
In case of doubt consult the XFree86-HOWTO (or ask your system
administrator :).
# Linux: I cannot have any fullscreen modes at all!
You have only modes above 1024x768 in your XF86Config. Proceed as
described above.
# Linux: After a certain idle time my screensaver jams the display of
SRB2. I can still operate SRB2, but I do not see what's happening
and the screensaver won't go away.
You probably have KDE. The KDE screensaver does not obey the screensaver
rules (at least mine, version 1.1). The solution is to deactivate the
KDE screensaver and use another screensaver (like the xscreensaver,
e.g.). But the hell, when you started SRB2 you should have played it
as well and not left it alone!!!
---------
[3] SOUND
---------
+ DOS:I can't have CD audio music, why ?
Make sure that the MSCDEX driver version 2.0 or later is loaded.
If it says 'MSCDEX version xxx' at game startup, and you still
don't hear the cd music, then probably your card doesn't respond
when SRB2 tries to set the cd volume. If so, make sure your sound
card's mixer have the cd volume set up so that you can hear something.
+ When the CD plays, the game is very 'jerky'. It doesn't do that when
I type 'cd off' in the console.
You have an old/bad cd driver, that can take up to a second to
respond to cd driver commands. Either get the latest version of
your driver, or turn cd update off. Check 'cd_udpate' in the
console documentation for more.
* DOS:How can I *ALWAYS* disable the sounds or music of the game ?
Edit the allegro.cfg file and set digicard/midicard to 0 (none)
* DOS:My sterero sound is reversed, how can I set it the right way ?
Change the console variable 'stereoreverse' to either 1 or 0.
Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable.
* DOS:The sounds are too 'slow', or 'low-pitched'
It seems to be a problem of the auto-detection of some 8bit sound
cards. You will have to set manually the 'sb_freq' value in the
allegro.cfg file to a lower value : 11906, 16129.
* DOS:SRB2 doesn't play any sound/music, but I have a sound
blaster genuine/compatible card.
If you have a genuine or compatible SoundBlaster card, it is very
important that you set the BLASTER environment variable.
If you are playing under DOS, and never installed your sound card
under DOS, run the setup of your sound card for DOS.
Check if the BLASTER variable was set: type 'SET' under dos
(or DOSbox)
Do you see something like 'BLASTER=A220 I5 D1 ...' ?
Yes? If you don't hear sounds/music, then tweak the settings in the
allegro.cfg file until you get something, first try changing the
type of the sound card, it is not always properly detected.
No? You have to set this variable in order that your sound card is
detected. Run the setup that was shipped with your sound card, and
make sure you run the setup for DOS too, it will usually add a
line of the type 'SET BLASTER=... ...' in the autoexec.bat file.
* DOS:How can I have better midi music on my 8bit sound card ?
Use the DIGMID driver, it is supported in SRB2.
What the hell is this? Well, the Gravis Ultrasound uses digital
samples to play midi music. On a simple 8bit card, you can use digital
samples too, which will sound usually better than what is output
by the poor fm synthesis chip of 8bit cards.
You will need to get a Gravis Ultrasound patch set, you can find
several ones for free on internet, it consists of a bunch of '.pat'
files which are the digital samples to play the midi instruments
(eg: piano, conga, guitar, ect.).
Check the Allegro homepage for some links to GUS patches:
http://alleg.sourceforge.net/digmid.html
http://alleg.sourceforge.net/
http://www.talula.demon.co.uk/allegro/digmid.html
http://www.talula.demon.co.uk/allegro/
Now to activate the DIGMID driver:
Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file.
Make sure you leave the 'digi_voices' blank, or set it to a low
value, because the midi music will use digital voices.
At the end of the allegro.cfg file, set the 'patches' value
to the path, where you have installed a Gravis Ultrasound midi
patch set. eg: patches = d:\music\midipat\
# Linux: CD music does not work or only works when run as root.
We do not encourage you to run SRB2 as root (you never know
what SRB2 can do to your system - it's a mighty piece of code :).
There is a common problem with ATAPI CD-rom drives, which are
treated as harddisks. Usually there is a link /dev/cdrom pointing to
device hd[b,c,d]. As harddisks are not supposed to be read directly
via this device (especially not by a common user), there are no read
permissions for "all". For CD-roms you can savely set read permissions
unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc,
set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives
should not have this problem. But if they do, proceed as described
with ATAPI drives.
# Linux: The CD music volume is not set properly.
Go to the console and type "jigglecdvolume 1".
-----------
[4] NETWORK
-----------
* Where can I find Internet servers ?
For the moment there is one public server.
http://srb2.servegame.org/ Master server web page
srb2.servegame.org:28910 current Master Server
* When I start SRB2 with -server or -connect it say :
"BinToPort: Address already in use (EADDRINUSE)"
It appears only when SRB2 crashes or when you leave with ctrl-break.
use -udpport 12345 (or any other free slot) on both sides (client and
server).
This can also happens when there is already a SRB2 running on your
computer if you whant to try two SRB2 running on the same computer
use -clientport 12345 (or any other free slot). Then the second will
connect to the first one.
* Do you use the tcp protocol ?
No, we use the udp protocol which is faster, but don't worry udp is a
part of the internet protocol.
-------------------
[5] Troubleshooting
-------------------
# Linux: SRB2 is hung in fullscreen mode and won´t let me leave.
What shall I do?
Some people press the reset button, but hey, we are not in the
stoneage of operating systems! There are two "proper" ways to
get out: kill your X-Server. You can usually do this by pressing
"CTRL-ALT-BACKSPACE". But if you have other open applications with
important data (probably hacked away on your diploma thesis for 3
weeks without saving once) you can also kill SRB2 directly. Press
"CTRL-ALT-F2" and you will get to a console. Log in, type
"killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7".
Some X-Server crash on this procedure - blame the X-Server for the
loss of 3 weeks work on your diploma thesis :)
-68
View File
@@ -1,68 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Sonic Robo Blast 2 Manual
</title>
<link rel="stylesheet" type="text/css" href="srb2manstyle.css">
<!-- Borrowed some javascript code so the height of the iframe is equal to the size of the document - Sonict -->
<script type="text/javascript">
/* free code from dyn-web.com */
function getDocHeight(doc) {
doc = doc || document;
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = document.getElementById(id);
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = 'hidden';
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
ifrm.style.height = getDocHeight( doc ) + "px";
ifrm.style.visibility = 'visible';
}
</script>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p class="c1">
<img src="manual_img/sonicname2.png" alt="SONIC" width="136" height="36">
<br>
<img src="manual_img/srb2banner.png" alt="ROBO BLAST 2" width="224" height="43">
</p>
<p class="c1">
<big><big><strong>Manual</strong></big></big>
</p>
<table class="cf" align="center">
<tr><td class="c">
<ul class="hmenu">
<li class="hmenu"><a class="hmenu" href="intro.htm" target="ifrm">Main</a></li>
<li class="hmenu"><a class="hmenu" href="items.htm" target="ifrm">Items</a></li>
<li class="hmenu"><a class="hmenu" href="playerabilities.htm" target="ifrm">Player Abilities</a></li>
<li class="hmenu"><a class="hmenu" href="basicplay.htm" target="ifrm">Gameplay</a></li>
<li class="hmenu"><a class="hmenu" href="surroundings.htm" target="ifrm">Surroundings</a></li>
</ul>
</td></tr>
<tr><td class="c">
<ul class="hmenu">
<li class="hmenu"><a class="hmenu" href="multiplayer.htm" target="ifrm">Multiplayer</a></li>
<li class="hmenu"><a class="hmenu" href="zones.htm" target="ifrm">Zones</a></li>
<li class="hmenu"><a class="hmenu" href="controls.htm" target="ifrm">Controls</a></li>
<li class="hmenu"><a class="hmenu" href="consolecommands.htm" target="ifrm">Console Commands</a></li>
<li class="hmenu"><a class="hmenu" href="misc.htm" target="ifrm">Misc</a></li>
</ul>
</td></tr>
</table>
<hr>
<p class="c1">
<!-- The "onload" property of the iframe makes an error when validated through the W3C validation checker. -->
<!-- This will not be fixed as it isn't worth the time to fix it up properly. - Sonict -->
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
</p>
</body>
</html>
-39
View File
@@ -1,39 +0,0 @@
SVN-RULES
- As you can see, there is sub-directory in the repository, one for eatch
platform (djgpp (dos),win32,SDL) the root directory is for all platform,
so take care of the order we have put in.
- do not commit/upload tests of bugged code, try to fix a maximum of know
bugs and update know bugs list in source.txt. If you must commit your source
make your code in #ifdef so we can disable it
- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature
and visual addition.
- Maximize communications between members, do not impose your changes, if your
are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room.
CODE-RULES
- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred
and for makefile)
- Self documented code, variable and function must have a name that help
understand the code, so do not call variable and function a,b, a2, ...
- the usage of extern in a c file is prohibited, except for declaration of a
function with body (so it is like public keyword in c++)
Also function protos haren't allowed for external function, put it un the
corresponding h file.
- Try to minimize #ifdef usage for :
- code readability
- the main code is for all port so if something is good for a platform all
platform can benefit by this feature
- Take care of platform dependent code, we would like to have code that work
on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl.
GOOD PRACTICE
- Try to put as mush static variable and function on module so it help to
understand the role of the varaible/function in the module also this
help the compiler to optimize
- minimise global variable
- make a log of your work, so you don't need to put a lot of comment in
the code, this will also help us to update the what's new section of doc
when doing final release
-240
View File
@@ -1,240 +0,0 @@
1. Compile SRB2
2. Explanation of the code
2.1 The memory model
2.2 Hardware Texture model
1. Compile SRB2
=================
DOS
---
need:
- djgpp 2.03 (http://www.delorie.com/djgpp/)
- allegro 3.12 (http://alleg.sourceforge.net/index.html)
(
- libsocket 0.7.4 (beta 4) or better
for use with Winsock 1.1 (example Windows 3.1)
(http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm)
OR
- Wattcp-32 v2.2 dev.rel 6 or better
For use with a packet driver
(http://www.bgnett.no/~giva/)
(http://groups.yahoo.com/group/watt-32/)
(http://groups.yahoo.com/group/watt-32/files/v2.2/)
)
- bcd 1.03 (inlcude in this package)
- gcc 2.95.2 is recommended
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
compile:
make
make WATTCP=1 (to make a Wattcp-32 version)
debug:
when craching SRB2 will return eip
type make asm, then you will have a 8 megs srb2.s (a assembler file)
the you can find the faulting instruction and function
------------------------------------------------------------------------
Linux/SDL
-----
need:
- tested with gcc 2.95 and 3.X.
- SDL 1.2
- SDL_mixer 1.2
- ibogg and libvorbis (http://Xiph.org/)
- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1
compile
make LINUX=1
debug:
gdb ?
------------------------------------------------------------------------
Win32
-----
need :
- glide 3.x sdk (optional) (http://www.3dfx.com)
- directx6 sdk (or higher) (http://www.micosoft.com/directx)
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
- use src\win32\wLegacy.dsp
- VC6 should also work with VC5, and VS.NET 200X
debug:
press on "step over" with the release version (there is some debug info
on it). Then change the eip in the regster window when you will type
enter the edi will go to the faulting instruction. don't forget that
you can follow the stack for calls.
You can also use trace with the debug version but add -win and -nomouse.
------------------------------------------------------------------------
Win32/minGW/SDL
-----
need:
- tested with gcc 2.95 and 3.X.
- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html
- SDL 1.2
- SDL_mixer 1.2
compile
make minGW=1 SDL=1
or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later
debug:
gdb ?
------------------------------------------------------------------------
WinCE/SDL WIP
-----
need:
- ActiveSync 3.8
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
- ActiveSync 3.7.1, if 3.8 isn't available for your language
http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx
- eMbedded Visual Tools 3.0 - 2002 Edition
http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd
- Pocket PC 2000 SDK
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4
- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this)
http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92
- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this)
http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3
- eMbedded Visual C++ 4.0
http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856
- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2)
http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b
OR
- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support)
http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5
- eMbedded Visual C++ 4.0 Update 5625 (SP4 only)
http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1
- Windows CE: Standard Software Development Kit
http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7
- SDK for Windows Mobile 2003-based Pocket PCs
http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652
- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC
http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C
- Microsoft Device Emulator 1.0 Community Preview
http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website
- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
(if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need)
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762
- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only)
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3
- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE)
compile
use src\SDL\WinCE\SRB2CE.vcw
debug:
?
2. Explanation of the code
==========================
2.1 The memory model (original) (z_zone.c) (by BP)
--------------------
SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function
to allocate in this heap.
Z_Malloc( int size,int tag,void* user )
size is the size in byte
tag can be : PU_STATIC allocated static (like malloc do)
call Z_Free to free it
PU_LEVEL same as static but the zone is "tagged" with the
tag PU_LEVEL, when calling
Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged
with PU_LEVEL are freed (at the end of the level)
PU_CACHE this one _can_ be freed automatiquely by one other
call to Z_Malloc. the *user point to a pointer
to this zone so when freed automatiquely the
pointer is set to NULL so eatch time you use it
you must check if the pointer is not NULL and
reload it.
(...)
2.2 Hardware Texture model (by BP)
--------------------------
Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at
runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware
texture a gr_texture so there is no confusion.
To remind you :
- Texture are set of patch and are associate to linedefs (walls) can be
upper, lower or middle texture. It can have hole on it.
- patch are sprites (the doom patch are run of vertical lines)
- flats are used for floors and ceiling of sectors and have size of 64x64
it can't have hole on it
- pic are new legacy format for picture, it can only handle plain texture
like flats it is now used for hud in full screen for the main picture
of legacy and for coronas (the format was extended to handle 32 bit color
or intensity + alpha, not all are implemented at this time)
Since patch, flat and pic are basic structure represented by only one lump in
the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx)
and init data field to NULL. Since the data structure is allocated in
PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed
(hw_cache.c).
The GlideMipmap_s structures for textures are initialized on
HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level)
the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this
can be changed in runtime in SRB2 (load a wad while runing) it must be
reallocated. Well, at this time it is realloceted at eatch level start. We
can do better, since numtextures change only when a wad is loaded.
The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the
card in fifo order when there is no more place it remove the first gr_texture,
the downloaded field of GlideMipmap_s go to false and when needed it is
reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there
own memory and handle gr_texture memory of the card we no more need to
redownload it but if we not free time to time gr_texture memory in opengl,
it will get alot of memory, so the gr_texture memory is cleared at eatch
new level (same time of texture reallocation). Opengl and 3dfx link the
loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear
textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx !
SRB2 can also draw patch with a differant colormap (thanks to Hurdler).
When needed it create the same gr_texture but just with a differant colormap.
This one is linked with the original in the GlideMipmap_s with the
nextcolormap field.
So when a polygone with a gr_texture must be drawn, first we check if the
gr_textures is not allready loaded in hadware memory (downloaded field) if
not then we check if gr_texture data is there (not grabbed by z_malloc
function) if not we must recompute it eatch type of gr_texture (texture,
patch, flat, pic have there own methode) the we can send the gr_texture
to 3dfx or OpenGl.
-1992
View File
File diff suppressed because it is too large. Load diff
+15
View File
@@ -0,0 +1,15 @@
<?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\SDL2\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)libs\SDL2\lib\$(PlatformTarget);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
+10 -33
View File
@@ -1,41 +1,18 @@
To compile and install SDL:
The 32-bit files are in i686-w64-mingw32
The 64-bit files are in x86_64-w64-mingw32
1. Windows with Visual Studio:
* Read ./docs/README-visualc.md
To install SDL for native development:
make native
Windows with gcc, either native or cross-compiling:
* Read the FAQ at https://wiki.libsdl.org/FAQWindows
* Run './configure; make; make install'
To install SDL for cross-compiling development:
make cross
macOS with Xcode:
* Read docs/README-macosx.md
Look at the example programs in ./test, and check out online documentation:
http://wiki.libsdl.org/
macOS from the command line:
* Run './configure; make; make install'
Linux and other UNIX systems:
* Run './configure; make; make install'
Android:
* Read docs/README-android.md
iOS:
* Read docs/README-ios.md
Using Cmake:
* Read docs/README-cmake.md
2. Look at the example programs in ./test, and check out the online
documentation at https://wiki.libsdl.org/
3. Join the SDL developer discussions, sign up on
https://discourse.libsdl.org/
and go to the development forum
https://discourse.libsdl.org/c/sdl-development/6
4. Sign up for the announcement list through the web interface:
https://www.libsdl.org/mailing-list.php
Join the SDL developer mailing list if you want to join the community:
http://www.libsdl.org/mailing-list.php
That's it!
Sam Lantinga <slouken@libsdl.org>
-18
View File
@@ -1,18 +0,0 @@
Copyright (C) 1997-2025 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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
+21 -17
View File
@@ -1,17 +1,21 @@
# Simple DirectMedia Layer (SDL) Version 2.0
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
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.
More extensive documentation is available in the docs directory, starting
with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Simple DirectMedia Layer
(SDL)
Version 2.0
---
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
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.
More extensive documentation is available in the docs directory, starting
with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)
-19
View File
@@ -1,28 +1,9 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.30.0:
---------------------------------------------------------------------------
General:
* Added support for 2 bits-per-pixel indexed surface formats
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam API handle for a controller, if available
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when the Steam API handle for a controller changes. This could also change the name, VID, and PID of the controller.
* Added the environment variable SDL_LOGGING to control default log output
macOS:
* Added the hint SDL_HINT_JOYSTICK_IOKIT to control whether the IOKit controller driver should be used
* Added the hint SDL_HINT_JOYSTICK_MFI to control whether the GCController controller driver should be used
* Added the hint SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE to choose whether high or low power GPU should be used for rendering, in the case where there are multiple GPUs available
Xbox:
* Added the function SDL_GDKGetDefaultUser()
---------------------------------------------------------------------------
2.28.2:
---------------------------------------------------------------------------
General:
* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers
+97
View File
@@ -0,0 +1,97 @@
# Contributing to SDL
We appreciate your interest in contributing to SDL, this document will describe how to report bugs, contribute code or ideas or edit documentation.
**Table Of Contents**
- [Filing a GitHub issue](#filing-a-github-issue)
- [Reporting a bug](#reporting-a-bug)
- [Suggesting enhancements](#suggesting-enhancements)
- [Contributing code](#contributing-code)
- [Forking the project](#forking-the-project)
- [Following the style guide](#following-the-style-guide)
- [Running the tests](#running-the-tests)
- [Opening a pull request](#opening-a-pull-request)
- [Contributing to the documentation](#contributing-to-the-documentation)
- [Editing a function documentation](#editing-a-function-documentation)
- [Editing the wiki](#editing-the-wiki)
## Filing a GitHub issue
### Reporting a bug
If you think you have found a bug and would like to report it, here are the steps you should take:
- Before opening a new issue, ensure your bug has not already been reported on the [GitHub Issues page](https://github.com/libsdl-org/SDL/issues).
- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
- Include details about your environment, such as your Operating System and SDL version.
- If possible, provide a small example that reproduces your bug.
### Suggesting enhancements
If you want to suggest changes for the project, here are the steps you should take:
- Check if the suggestion has already been made on:
- the [issue tracker](https://github.com/libsdl-org/SDL/issues);
- the [discourse forum](https://discourse.libsdl.org/);
- or if a [pull request](https://github.com/libsdl-org/SDL/pulls) already exists.
- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
- Describe what change you would like to happen.
## Contributing code
This section will cover how the process of forking the project, making a change and opening a pull request.
### Forking the project
The first step consists in making a fork of the project, this is only necessary for the first contribution.
Head over to https://github.com/libsdl-org/SDL and click on the `Fork` button in the top right corner of your screen, you may leave the fields unchanged and click `Create Fork`.
You will be redirected to your fork of the repository, click the green `Code` button and copy the git clone link.
If you had already forked the repository, you may update it from the web page using the `Fetch upstream` button.
### Following the style guide
Code formatting is done using a custom `.clang-format` file, you can learn more about how to run it [here](https://clang.llvm.org/docs/ClangFormat.html).
Some legacy code may not be formatted, as such avoid formatting the whole file at once and only format around your changes.
For your commit message to be properly displayed on GitHub, it should contain:
- A short description of the commit of 50 characters or less on the first line.
- If necessary, add a blank line followed by a long description, each line should be 72 characters or less.
For example:
```
Fix crash in SDL_FooBar.
This addresses the issue #123456 by making sure Foo was successful
before calling Bar.
```
### Running the tests
Tests allow you to verify if your changes did not break any behaviour, here are the steps to follow:
- Before pushing, run the `testautomation` suite on your machine, there should be no more failing tests after your change than before.
- After pushing to your fork, Continuous Integration (GitHub Actions) will ensure compilation and tests still pass on other systems.
### Opening a pull request
- Head over to your fork's GitHub page.
- Click on the `Contribute` button and `Open Pull Request`.
- Fill out the pull request template.
- If any changes are requested, you can add new commits to your fork and they will be automatically added to the pull request.
## Contributing to the documentation
### Editing a function documentation
The wiki documentation for API functions is synchronised from the headers' doxygen comments. As such, all modifications to syntax; function parameters; return value; version; related functions should be done in the header directly.
### Editing the wiki
Other changes to the wiki should done directly from https://wiki.libsdl.org/
+483
View File
@@ -0,0 +1,483 @@
Android
================================================================================
Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
The rest of this README covers the Android gradle style build process.
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
================================================================================
Android SDK (version 34 or later)
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: 19 (Android 4.4)
How the port works
================================================================================
- Android applications are Java-based, optionally with parts written in C
- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to
the SDL library
- This means that your application C code must be placed inside an Android
Java project, along with some C support code that communicates with Java
- This eventually produces a standard Android .apk package
The Android Java code implements an "Activity" and can be found in:
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
The Java code loads your game code, the SDL shared library, and
dispatches to native functions implemented in the SDL library:
src/core/android/SDL_android.c
Building an app
================================================================================
For simple projects you can use the script located at build-scripts/androidbuild.sh
There's two ways of using it:
androidbuild.sh com.yourcompany.yourapp < sources.list
androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c
sources.list should be a text file with a source file name in each line
Filenames should be specified relative to the current directory, for example if
you are in the build-scripts directory and want to create the testgles.c test, you'll
run:
./androidbuild.sh org.libsdl.testgles ../test/testgles.c
One limitation of this script is that all sources provided will be aggregated into
a single directory, thus all your source files should have a unique name.
Once the project is complete the script will tell you where the debug APK is located.
If you want to create a signed release APK, you can use the project created by this
utility to generate it.
Finally, a word of caution: re running androidbuild.sh wipes any changes you may have
done in the build directory for the app!
For more complex projects, follow these instructions:
1. Get the source code for SDL and copy the 'android-project' directory located at SDL/android-project to a suitable location. Also make sure to rename it to your project name (In these examples: YOURPROJECT).
(The 'android-project' directory can basically be seen as a sort of starting point for the android-port of your project. It contains the glue code between the Android Java 'frontend' and the SDL code 'backend'. It also contains some standard behaviour, like how events should be handled, which you will be able to change.)
2. Move or [symlink](https://en.wikipedia.org/wiki/Symbolic_link) the SDL directory into the "YOURPROJECT/app/jni" directory
(This is needed as the source of SDL has to be compiled by the Android compiler)
3. Edit "YOURPROJECT/app/jni/src/Android.mk" to include your source files.
(They should be separated by spaces after the "LOCAL_SRC_FILES := " declaration)
4a. If you want to use Android Studio, simply open your 'YOURPROJECT' directory and start building.
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 "YOURPROJECT/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 "YOURPROJECT/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
build.gradle - build info including the application version and SDK
src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
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
src/main/res/values/strings.xml - strings used in your application, including the application name
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
================================================================================
To customize your application name, edit AndroidManifest.xml and replace
"org.libsdl.app" with an identifier for your product package.
Then create a Java class extending SDLActivity and place it in a directory
under src matching your package, e.g.
src/com/gamemaker/game/MyGame.java
Here's an example of a minimal class file:
--- MyGame.java --------------------------
package com.gamemaker.game;
import org.libsdl.app.SDLActivity;
/**
* A sample wrapper class that just calls SDLActivity
*/
public class MyGame extends SDLActivity { }
------------------------------------------
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
class, .e.g. "MyGame"
Customizing your application icon
================================================================================
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
the drawable directories under the res directory. There are several directories
for different screen sizes.
Loading assets
================================================================================
Any files you put in the "app/src/main/assets" directory of your project
directory will get bundled into the application package and you can load
them using the standard functions in SDL_rwops.h.
There are also a few Android specific functions that allow you to get other
useful paths for saving and loading data:
* SDL_AndroidGetInternalStoragePath()
* SDL_AndroidGetExternalStorageState()
* SDL_AndroidGetExternalStoragePath()
See SDL_system.h for more details on these functions.
The asset packaging system will, by default, compress certain file extensions.
SDL includes two asset file access mechanisms, the preferred one is the so
called "File Descriptor" method, which is faster and doesn't involve the Dalvik
GC, but given this method does not work on compressed assets, there is also the
"Input Stream" method, which is automatically used as a fall back by SDL. You
may want to keep this fact in mind when building your APK, specially when large
files are involved.
For more information on which extensions get compressed by default and how to
disable this behaviour, see for example:
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
Pause / Resume behaviour
================================================================================
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
(versus polling for a resume message).
Upon resume, SDL will attempt to restore the GL context automatically.
In modern devices (Android 3.0 and up) this will most likely succeed and your
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 (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
================================================================================
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
a look here: https://developer.android.com/guide/practices/jni.html
If you want to use threads in your SDL app, it's strongly recommended that you
do so by creating them using SDL functions. This way, the required attach/detach
handling is managed by SDL automagically. If you have threads created by other
means and they make calls to SDL functions, make sure that you call
Android_JNI_SetupThread() before doing anything else otherwise SDL will attach
your thread automatically anyway (when you make an SDL call), but it'll never
detach it.
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
folder and adding the following line:
APP_STL := c++_shared
For more information go here:
https://developer.android.com/ndk/guides/cpp-support
Using the emulator
================================================================================
There are some good tips and tricks for getting the most out of the
emulator here: https://developer.android.com/tools/devices/emulator.html
Especially useful is the info on setting up OpenGL ES 2.0 emulation.
Notice that this software emulator is incredibly slow and needs a lot of disk space.
Using a real device works better.
Troubleshooting
================================================================================
You can see if adb can see any devices with the following command:
adb devices
You can see the output of log messages on the default device with:
adb logcat
You can push files to the device with:
adb push local_file remote_path_and_file
You can push files to the SD Card at /sdcard, for example:
adb push moose.dat /sdcard/moose.dat
You can see the files on the SD card with a shell command:
adb shell ls /sdcard/
You can start a command shell on the default device with:
adb shell
You can remove the library files of your project (and not the SDL lib files) with:
ndk-build clean
You can do a build with the following command:
ndk-build
You can see the complete command line that ndk-build is using by passing V=1 on the command line:
ndk-build V=1
If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
https://developer.android.com/ndk/guides/ndk-stack
If you want to go through the process manually, you can use addr2line to convert the
addresses in the stack trace to lines in your code.
For example, if your crash looks like this:
I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0
I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4
I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c
I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c
I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030
I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so
I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so
I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so
I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so
You can see that there's a crash in the C library being called from the main code.
I run addr2line with the debug version of my code:
arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so
and then paste in the number after "pc" in the call stack, from the line that I care about:
000014bc
I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23.
You can add logging to your code to help show what's happening:
#include <android/log.h>
__android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x);
If you need to build without optimization turned on, you can create a file called
"Application.mk" in the jni directory, with the following line in it:
APP_OPTIM := debug
Memory debugging
================================================================================
The best (and slowest) way to debug memory issues on Android is valgrind.
Valgrind has support for Android out of the box, just grab code using:
svn co svn://svn.valgrind.org/valgrind/trunk valgrind
... and follow the instructions in the file README.android to build it.
One thing I needed to do on Mac OS X was change the path to the toolchain,
and add ranlib to the environment variables:
export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib
Once valgrind is built, you can create a wrapper script to launch your
application with it, changing org.libsdl.app to your package identifier:
--- start_valgrind_app -------------------
#!/system/bin/sh
export TMPDIR=/data/data/org.libsdl.app
exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $*
------------------------------------------
Then push it to the device:
adb push start_valgrind_app /data/local
and make it executable:
adb shell chmod 755 /data/local/start_valgrind_app
and tell Android to use the script to launch your application:
adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app"
If the setprop command says "could not set property", it's likely that
your package name is too long and you should make it shorter by changing
AndroidManifest.xml and the path to your class file in android-project/src
You can then launch your application normally and waaaaaaaiiittt for it.
You can monitor the startup process with the logcat command above, and
when it's done (or even while it's running) you can grab the valgrind
output file:
adb pull /sdcard/valgrind.log
When you're done instrumenting with valgrind, you can disable the wrapper:
adb shell setprop wrap.org.libsdl.app ""
Graphics debugging
================================================================================
If you are developing on a compatible Tegra-based tablet, NVidia provides
Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
and GLES libraries, you must follow their instructions for installing the
interposer library on a rooted device. The non-rooted instructions are not
compatible with applications that use SDL2 for video.
The Tegra Graphics Debugger is available from NVidia here:
https://developer.nvidia.com/tegra-graphics-debugger
Why is API level 19 the minimum required?
================================================================================
The latest NDK toolchain doesn't support targeting earlier than API level 19.
As of this writing, according to https://www.composables.com/tools/distribution-chart
about 99.7% of the Android devices accessing Google Play support API level 19 or
higher (August 2023).
A note regarding the use of the "dirty rectangles" rendering technique
================================================================================
If your app uses a variation of the "dirty rectangles" rendering technique,
where you only update a portion of the screen on each frame, you may notice a
variety of visual glitches on Android, that are not present on other platforms.
This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2
contexts, in particular the use of the eglSwapBuffers function. As stated in the
documentation for the function "The contents of ancillary buffers are always
undefined after calling eglSwapBuffers".
Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED
is not possible for SDL as it requires EGL 1.4, available only on the API level
17+, so the only workaround available on this platform is to redraw the entire
screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
Ending your application
================================================================================
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
is the current maximum number of buttons Android can report.
+163
View File
@@ -0,0 +1,163 @@
# CMake
(www.cmake.org)
SDL's build system was traditionally based on autotools. Over time, this
approach has suffered from several issues across the different supported
platforms.
To solve these problems, a new build system based on CMake was introduced.
It is developed in parallel to the legacy autotools build system, so users
can experiment with it without complication.
The CMake build system is supported on the following platforms:
* FreeBSD
* Linux
* Microsoft Visual C
* MinGW and Msys
* macOS, iOS, and tvOS, with support for XCode
* Android
* Emscripten
* RiscOS
* Playstation Vita
## Building SDL
Assuming the source for SDL is located at `~/sdl`
```sh
cd ~
mkdir build
cd build
cmake ~/sdl
cmake --build .
```
This will build the static and dynamic versions of SDL in the `~/build` directory.
Installation can be done using:
```sh
cmake --install . # '--install' requires CMake 3.15, or newer
```
## Including SDL in your project
SDL can be included in your project in 2 major ways:
- using a system SDL library, provided by your (*nix) distribution or a package manager
- using a vendored SDL library: this is SDL copied or symlinked in a subfolder.
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
```cmake
cmake_minimum_required(VERSION 3.5)
project(mygame)
# Create an option to switch between a system sdl library and a vendored sdl library
option(MYGAME_VENDORED "Use vendored libraries" OFF)
if(MYGAME_VENDORED)
add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
else()
# 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
# 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
endif()
# Create your game executable target as usual
add_executable(mygame WIN32 mygame.c)
# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
if(TARGET SDL2::SDL2main)
# It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
target_link_libraries(mygame PRIVATE SDL2::SDL2main)
endif()
# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
target_link_libraries(mygame PRIVATE SDL2::SDL2)
```
### A system SDL library
For CMake to find SDL, it must be installed in [a default location CMake is looking for](https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure).
The following components are available, to be used as an argument of `find_package`.
| Component name | Description |
|----------------|--------------------------------------------------------------------------------------------|
| SDL2 | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
| SDL2-static | The SDL2 static library, available through the `SDL2::SDL2-static` target |
| SDL2main | The SDL2main static library, available through the `SDL2::SDL2main` target |
| SDL2test | The SDL2test static library, available through the `SDL2::SDL2test` target |
### Using a vendored SDL
This only requires a copy of SDL in a subdirectory.
## CMake configuration options for platforms
### 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-Simulator, using the latest, installed SDK:
```bash
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
```bash
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
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
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
cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
```
- for tvOS-Simulator, using the latest, installed SDK:
```cmake
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
```
- for tvOS-Device, using the latest, installed SDK:
```cmake
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
```
[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.
+123
View File
@@ -0,0 +1,123 @@
DirectFB
========
Supports:
- Hardware YUV overlays
- OpenGL - software only
- 2D/3D accelerations (depends on directfb driver)
- multiple displays
- windows
What you need:
* DirectFB 1.0.1, 1.2.x, 1.3.0
* Kernel-Framebuffer support: required: vesafb, radeonfb ....
* Mesa 7.0.x - optional for OpenGL
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
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.
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
```
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
==============
The following instructions will give you *software* OpenGL. However this
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 this:
```
# Directories
SRC_DIRS = mesa glu
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS =
```
Then do the following:
```
make linux-directfb
make
echo Installing - please enter sudo pw.
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
```
+138
View File
@@ -0,0 +1,138 @@
# Dynamic API
Originally posted on Ryan's Google+ account.
Background:
- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2,
but developers are shipping their own SDL2 with individual Steam games.
These games might stop getting updates, but a newer SDL2 might be needed later.
Certainly we'll always be fixing bugs in SDL, even if a new video target isn't
ever needed, and these fixes won't make it to a game shipping its own SDL.
- Even if we replace the SDL2 in those games with a compatible one, that is to
say, edit a developer's Steam depot (yuck!), there are developers that are
statically linking SDL2 that we can't do this for. We can't even force the
dynamic loader to ignore their SDL2 in this case, of course.
- If you don't ship an SDL2 with the game in some form, people that disabled the
Steam Runtime, or just tried to run the game from the command line instead of
Steam might find themselves unable to run the game, due to a missing dependency.
- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target
generic Linux boxes that may or may not have SDL2 installed, you have to ship
the library or risk a total failure to launch. So now, you might have to have
a non-Steam build plus a Steam build (that is, one with and one without SDL2
included), which is inconvenient if you could have had one universal build
that works everywhere.
- We like the zlib license, but the biggest complaint from the open source
community about the license change is the static linking. The LGPL forced this
as a legal, not technical issue, but zlib doesn't care. Even those that aren't
concerned about the GNU freedoms found themselves solving the same problems:
swapping in a newer SDL to an older game often times can save the day.
Static linking stops this dead.
So here's what we did:
SDL now has, internally, a table of function pointers. So, this is what SDL_Init
now looks like:
```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.
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:
```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.
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:
```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
far as calling into the jump table in this case. But in cases where no override
is desired, the statically linked version will provide its own jump table,
and everyone is happy.
So now:
- Developers can statically link SDL, and users can still replace it.
(We'd still rather you ship a shared library, though!)
- Developers can ship an SDL with their game, Valve can override it for, say,
new features on SteamOS, or distros can override it for their own needs,
but it'll also just work in the default case.
- Developers can ship the same package to everyone (Humble Bundle, GOG, etc),
and it'll do the right thing.
- End users (and Valve) can update a game's SDL in almost any case,
to keep abandoned games running on newer platforms.
- Everyone develops with SDL exactly as they have been doing all along.
Same headers, same ABI. Just get the latest version to enable this magic.
A little more about SDL_InitDynamicAPI():
Internally, InitAPI does some locking to make sure everything waits until a
single thread initializes everything (although even SDL_CreateThread() goes
through here before spinning a thread, too), and then decides if it should use
an external SDL library. If not, it sets up the jump table using the current
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:
```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.
Now, we've got policy here: this table's layout never changes; new stuff gets
added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all
the needed functions if tablesize <= sizeof its own jump table. If tablesize is
bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but
if it's smaller, we know we can provide the entire API that the caller needs.
The version variable is a failsafe switch.
Right now it's always 1. This number changes when there are major API changes
(so we know if the tablesize might be smaller, or entries in it have changed).
Right now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not
inconceivable to have a small dispatch library that only supplies this one
function and loads different, otherwise-incompatible SDL libraries and has the
right one initialize the jump table based on the version. For something that
must generically catch lots of different versions of SDL over time, like the
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
encourage you not to do that. However, on heavily locked down platforms like
iOS, or maybe when debugging, it makes sense to disable it. The way this is
designed in SDL, you just have to change one #define, and the entire system
vaporizes out, and SDL functions exactly like it always did. Most of it is
macro magic, so the system is contained to one C file and a few headers.
However, this is on by default and you have to edit a header file to turn it
off. Our hopes is that if we make it easy to disable, but not too easy,
everyone will ultimately be able to get what they want, but we've gently
nudged everyone towards what we think is the best solution.
+76
View File
@@ -0,0 +1,76 @@
# Emscripten
(This documentation is not very robust; we will update and expand this later.)
## A quick note about audio
Modern web browsers will not permit web pages to produce sound before the
user has interacted with them; this is for several reasons, not the least
of which being that no one likes when a random browser tab suddenly starts
making noise and the user has to scramble to figure out which and silence
it.
To solve this, most browsers will refuse to let a web app use the audio
subsystem at all before the user has interacted with (clicked on) the page
in a meaningful way. SDL-based apps also have to deal with this problem; if
the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
There are two reasonable ways to deal with this: if you are writing some
sort of media player thing, where the user expects there to be a volume
control when you mouseover the canvas, just default that control to a muted
state; if the user clicks on the control to unmute it, on this first click,
open the audio device. This allows the media to play at start, the user can
reasonably opt-in to listening, and you never get access denied to the audio
device.
Many games do not have this sort of UI, and are more rigid about starting
audio along with everything else at the start of the process. For these, your
best bet is to write a little Javascript that puts up a "Click here to play!"
UI, and upon the user clicking, remove that UI and then call the Emscripten
app's main() function. As far as the application knows, the audio device was
available to be opened as soon as the program started, and since this magic
happens in a little Javascript, you don't have to change your C/C++ code at
all to make it happen.
Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
for some Javascript code to steal for this approach.
## Building SDL/emscripten
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
are likely to work, as well.
Build:
$ mkdir build
$ cd build
$ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2"
$ emmake make
Or with cmake:
$ mkdir build
$ cd build
$ emcmake cmake ..
$ emmake make
To build one of the tests:
$ cd test/
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
Uses GLES2 renderer or software
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):
$ EMCONFIGURE_JS=1 emconfigure ../configure
build as usual...
SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):
$ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx
build as usual...
+155
View File
@@ -0,0 +1,155 @@
GDK
=====
This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
Windows (GDK) and Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
Requirements
------------
* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
Windows GDK Status
------
The Windows GDK port supports the full set of Win32 APIs, renderers, controllers, input devices, etc., as the normal Windows x64 build of SDL.
* Additionally, the GDK port adds the following:
* Compile-time platform detection for SDL programs. The `__GDK__` is `#define`d on every GDK platform, and the `__WINGDK__` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
* GDK-specific setup:
* Initializing/uninitializing the game runtime, and initializing Xbox Live services
* Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
* An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
* What doesn't work:
* Compilation with anything other than through the included Visual C++ solution file
## VisualC-GDK Solution
The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
* tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
* tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
*NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
* tests/testsprite2 - Standard SDL test program demonstrating sprite drawing functionality.
If you set one of the test programs as a startup project, you can run it directly from Visual Studio.
Windows GDK Setup, Detailed Steps
---------------------
These steps assume you already have a game using SDL that runs on Windows x64 along with a corresponding Visual Studio solution file for the x64 version. If you don't have this, it's easiest to use one of the test program vcxproj files in the `VisualC-GDK` directory as a starting point, though you will still need to do most of the steps below.
### 1. Add a Gaming.Desktop.x64 Configuration ###
In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
### 2. Build SDL2 and SDL2main for GDK ###
Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built.
### 3. Configuring Project Settings ###
While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
* Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
* Under Linker > Input > Additional Dependencies, you need the following:
* `SDL2.lib`
* `SDL2main.lib` (unless not using)
* `xgameruntime.lib`
* `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
### 4. Setting up SDL_main ###
Rather than using your own implementation of `WinMain`, it's recommended that you instead `#include "SDL_main.h"` and declare a standard main function. If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
### 5. Required DLLs ###
The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
* Your SDL2.dll
* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
* XCurl.dll
You can either copy these in a post-build step, or you can add the dlls into the project and set its Configuration Properties > General > Item type to "Copy file," which will also copy them into the output directory.
### 6. Setting up MicrosoftGame.config ###
You can copy `VisualC-GDK/tests/testgdk/MicrosoftGame.config` and use that as a starting point in your project. Minimally, you will want to change the Executable Name attribute, the DefaultDisplayName, and the Description.
This file must be copied into the same directory as the game's .exe file. As with the DLLs, you can either use a post-build step or the "Copy file" item type.
For basic testing, you do not need to change anything else in `MicrosoftGame.config`. However, if you want to test any Xbox Live services (such as logging in users) _or_ publish a package, you will need to setup a Game app on Partner Center.
Then, you need to set the following values to the values from Partner Center:
* Identity tag - Name and Publisher attributes
* TitleId
* MSAAppId
### 7. Adding Required Logos
Several logo PNG files are required to be able to launch the game, even from the debugger. You can use the sample logos provided in `VisualC-GDK/logos`. As with the other files, they must be copied into the same directory as the game's .exe file.
### 8. Copying any Data Files ###
When debugging GDK games, there is no way to specify a working directory. Therefore, any required game data must also be copied into the output directory, likely in a post-build step.
### 9. Build and Run from Visual Studio ###
At this point, you should be able to build and run your game from the Visual Studio Debugger. If you get any linker errors, make sure you double-check that you referenced all the required libs.
If you are testing Xbox Live functionality, it's likely you will need to change to the Sandbox for your title. To do this:
1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
2. Switch the sandbox name with:
`XblPCSandbox SANDBOX.#`
3. (To switch back to the retail sandbox):
`XblPCSandbox RETAIL`
### 10. Packaging and Installing Locally
You can use one of the test program's `PackageLayout.xml` as a starting point. Minimally, you will need to change the exe to the correct name and also reference any required game data. As with the other data files, it's easiest if you have this copy to the output directory, although it's not a requirement as you can specify relative paths to files.
To create the package:
1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
2. `cd` to the directory containing the `PackageLayout.xml` with the correct paths (if you use the local path as in the sample package layout, this would be from your .exe output directory)
3. `mkdir Package` to create an output directory
4. To package the file into the `Package` directory, use:
`makepkg pack /f PackageLayout.xml /lt /d . /nogameos /pc /pd Package`
5. To install the package, use:
`wdapp install PACKAGENAME.msixvc`
6. Once the package is installed, you can run it from the start menu.
7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
Troubleshooting
---------------
#### Xbox Live Login does not work
As of June 2022 GDK, you must have a valid Title Id and MSAAppId in order to test Xbox Live functionality such as user login. Make sure these are set correctly in the `MicrosoftGame.config`. This means that even testgdk will not let you login without setting these properties to valid values.
Furthermore, confirm that your PC is set to the correct sandbox.
#### "The current user has already installed an unpackaged version of this app. A packaged version cannot replace this." error when installing
Prior to June 2022 GDK, running from the Visual Studio debugger would still locally register the app (and it would appear on the start menu). To fix this, you have to uninstall it (it's simplest to right click on it from the start menu to uninstall it).
+71
View File
@@ -0,0 +1,71 @@
Dollar Gestures
===========================================================================
SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.
Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up.
Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.
Recording:
----------
To begin recording on a touch device call:
SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.
Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.
A SDL_DOLLARRECORD event is a dgesture with the following fields:
* event.dgesture.touchId - the Id of the touch used to record the gesture.
* event.dgesture.gestureId - the unique id of the recorded gesture.
Performing:
-----------
As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:
* event.dgesture.touchId - the Id of the touch which performed the gesture.
* event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke.
* event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match.
* event.dgesture.numFingers - the number of fingers used to draw the stroke.
Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).
Saving:
-------
To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored.
To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored.
Both functions return the number of gestures successfully saved.
Loading:
--------
To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file.
SDL_LoadDollarTemplates returns the number of templates successfully loaded.
===========================================================================
Multi Gestures
===========================================================================
SDL provides simple support for pinch/rotate/swipe gestures.
Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:
* event.mgesture.touchId - the Id of the touch on which the gesture was performed.
* event.mgesture.x - the normalized x coordinate of the gesture. (0..1)
* event.mgesture.y - the normalized y coordinate of the gesture. (0..1)
* event.mgesture.dTheta - the amount that the fingers rotated during this motion.
* event.mgesture.dDist - the amount that the fingers pinched during this motion.
* event.mgesture.numFingers - the number of fingers used in the gesture.
===========================================================================
Notes
===========================================================================
For a complete example see test/testgesture.c
Please direct questions/comments to:
jim.tla+sdl_touch@gmail.com
+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/
+4
View File
@@ -0,0 +1,4 @@
We are no longer hosted in Mercurial. Please see README-git.md for details.
Thanks!
+307
View File
@@ -0,0 +1,307 @@
iOS
======
Building the Simple DirectMedia Layer for iOS 9.0+
==============================================================================
Requirements: Mac OS X 10.9 or later and the iOS 9.0 or newer SDK.
Instructions:
1. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
2. Select your desired target, and hit build.
Using the Simple DirectMedia Layer for iOS
==============================================================================
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!
TODO: Add information regarding App Store requirements such as icons, etc.
Notes -- Retina / High-DPI and window sizes
==============================================================================
Window and display mode sizes in SDL are in "screen coordinates" (or "points",
in Apple's terminology) rather than in pixels. On iOS this means that a window
created on an iPhone 6 will have a size in screen coordinates of 375 x 667,
rather than a size in pixels of 750 x 1334. All iOS apps are expected to
size their content based on screen coordinates / points rather than pixels,
as this allows different iOS devices to have different pixel densities
(Retina versus non-Retina screens, etc.) without apps caring too much.
By default SDL will not use the full pixel density of the screen on
Retina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when
creating your window to enable high-dpi support.
When high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes
will still be in "screen coordinates" rather than pixels, but the window will
have a much greater pixel density when the device supports it, and the
SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on
whether raw OpenGL or the SDL_Render API is used) can be queried to determine
the size in pixels of the drawable screen framebuffer.
Some OpenGL ES functions such as glViewport expect sizes in pixels rather than
sizes in screen coordinates. When doing 2D rendering with OpenGL ES, an
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
==============================================================================
On iOS the application goes through a fixed life cycle and you will get
notifications of state changes via application events. When these events
are delivered you must handle them in an event callback because the OS may
not give you any processing time after the events are delivered.
e.g.
int HandleAppEvents(void *userdata, SDL_Event *event)
{
switch (event->type)
{
case SDL_APP_TERMINATING:
/* Terminate the app.
Shut everything down before returning from this function.
*/
return 0;
case SDL_APP_LOWMEMORY:
/* You will get this when your app is paused and iOS wants more memory.
Release as much memory as possible.
*/
return 0;
case SDL_APP_WILLENTERBACKGROUND:
/* Prepare your app to go into the background. Stop loops, etc.
This gets called when the user hits the home button, or gets a call.
*/
return 0;
case SDL_APP_DIDENTERBACKGROUND:
/* This will get called if the user accepted whatever sent your app to the background.
If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
When you get this, you have 5 seconds to save all your state or the app will be terminated.
Your app is NOT active at this point.
*/
return 0;
case SDL_APP_WILLENTERFOREGROUND:
/* This call happens when your app is coming back to the foreground.
Restore all your state here.
*/
return 0;
case SDL_APP_DIDENTERFOREGROUND:
/* Restart your loops here.
Your app is interactive and getting CPU again.
*/
return 0;
default:
/* No special processing, add it to the event queue */
return 1;
}
}
int main(int argc, char *argv[])
{
SDL_SetEventFilter(HandleAppEvents, NULL);
... run your main loop
return 0;
}
Notes -- Accelerometer as Joystick
==============================================================================
SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory.
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
==============================================================================
Your SDL application for iOS uses OpenGL ES for video by default.
OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute().
If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.
Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0.
OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this:
- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called.
- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called.
- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called.
The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
Notes -- Keyboard
==============================================================================
The SDL keyboard API has been extended to support on-screen keyboards:
void SDL_StartTextInput()
-- enables text events and reveals the onscreen keyboard.
void SDL_StopTextInput()
-- disables text events and hides the onscreen keyboard.
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
==============================================================================
Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory.
Once your application is installed its directory tree looks like:
MySDLApp Home/
MySDLApp.app
Documents/
Library/
Preferences/
tmp/
When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences".
More information on this subject is available here:
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
Notes -- xcFramework
==============================================================================
The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform.
In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
#ifndef SDL_MAIN_HANDLED
#ifdef main
#undef main
#endif
int
main(int argc, char *argv[])
{
return SDL_UIKitRunApp(argc, argv, SDL_main);
}
#endif /* !SDL_MAIN_HANDLED */
Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected:
#include "SDL_main.h"
#include <SDL.h>
#include <SDL_main.h>
Notes -- iPhone SDL limitations
==============================================================================
Windows:
Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS).
Textures:
The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats.
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
==============================================================================
Game Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using:
int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run.
e.g.
extern "C"
void ShowFrame(void*)
{
... do event handling, frame logic and rendering ...
}
int main(int argc, char *argv[])
{
... initialize game ...
#if __IPHONEOS__
// Initialize the Game Center for scoring and matchmaking
InitGameCenter();
// Set up the game to run in the window animation callback on iOS
// so that Game Center and so forth works correctly.
SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL);
#else
while ( running ) {
ShowFrame(0);
DelayFrame();
}
#endif
return 0;
}
Deploying to older versions of iOS
==============================================================================
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
In order to do that you need to download an older version of Xcode:
https://developer.apple.com/download/more/?name=Xcode
Open the package contents of the older Xcode and your newer version of Xcode and copy over the folders in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Then open the file Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and add the versions of iOS you want to deploy to the key Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES
Open your project and set your deployment target to the desired version of iOS
Finally, remove GameController from the list of frameworks linked by your application and edit the build settings for "Other Linker Flags" and add -weak_framework GameController
+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.
+96
View File
@@ -0,0 +1,96 @@
Linux
================================================================================
By default SDL will only link against glibc, the rest of the features will be
enabled dynamically at runtime depending on the available features on the target
system. So, for example if you built SDL with XRandR support and the target
system does not have the XRandR libraries installed, it will be disabled
at runtime, and you won't get a missing library error, at least with the
default configuration parameters.
Build Dependencies
--------------------------------------------------------------------------------
Ubuntu 18.04, all available features enabled:
sudo apt-get install build-essential git make autoconf automake libtool \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
Ubuntu 22.04+ can also add `libpipewire-0.3-dev libdecor-0-dev` to that command line.
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 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 libdecor-devel \
libsamplerate-devel pipewire-jack-audio-connection-kit-devel \
NOTES:
- 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
have this library installed.
- DirectFB isn't included because the configure script (currently) fails to find
it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the
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
debug this, start by installing the evtest utility. On Ubuntu/Debian:
sudo apt-get install evtest
Then run:
sudo evtest
You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
Now run:
cat /dev/input/event/XX
If you get a permission error, you need to set a udev rule to change the mode of
your device (see below)
Also, try:
sudo udevadm info --query=all --name=input/eventXX
If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
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"
You can set up similar rules for your device by changing the values listed in
idProduct and idVendor. To obtain these values, try:
sudo udevadm info -a --name=input/eventXX | grep idVendor
sudo udevadm info -a --name=input/eventXX | grep idProduct
If multiple values come up for each of these, the one you want is the first one of each.
On other systems which ship with an older udev (such as CentOS), you may need
to set up a rule such as:
SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
+285
View File
@@ -0,0 +1,285 @@
# 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.9 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 6 and the 10.9 SDK.
PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
32-bit Intel and macOS 10.8 runtime support has been officially dropped as
of SDL 2.24.0.
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!
+28
View File
@@ -0,0 +1,28 @@
# Nintendo 3DS
SDL port for the Nintendo 3DS [Homebrew toolchain](https://devkitpro.org/) contributed by:
- [Pierre Wendling](https://github.com/FtZPetruska)
Credits to:
- The awesome people who ported SDL to other homebrew platforms.
- The Devkitpro team for making all the tools necessary to achieve this.
## Building
To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run:
```bash
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build
```
## Notes
- Currently only software rendering is supported.
- SDL2main should be used to ensure ROMFS is enabled.
- By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
- `SDL_GetBasePath` returns the romfs root instead of the executable's directory.
- The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information.
+103
View File
@@ -0,0 +1,103 @@
Native Client
================================================================================
Requirements:
* Native Client SDK (https://developer.chrome.com/native-client),
(tested with Pepper version 33 or higher).
The SDL backend for Chrome's Native Client has been tested only with the PNaCl
toolchain, which generates binaries designed to run on ARM and x86_32/64
platforms. This does not mean it won't work with the other toolchains!
================================================================================
Building SDL for NaCl
================================================================================
Set up the right environment variables (see naclbuild.sh), then configure SDL with:
configure --host=pnacl --prefix some/install/destination
Then "make".
As an example of how to create a deployable app a Makefile project is provided
in test/nacl/Makefile, which includes some monkey patching of the common.mk file
provided by NaCl, without which linking properly to SDL won't work (the search
path can't be modified externally, so the linker won't find SDL's binaries unless
you dump them into the SDK path, which is inconvenient).
Also provided in test/nacl is the required support file, such as index.html,
manifest.json, etc.
SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.
This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),
hiding the asynchronous nature of the browser behind the scenes...which is not the
same as making it disappear!
================================================================================
Running tests
================================================================================
Due to the nature of NaCl programs, building and running SDL tests is not as
straightforward as one would hope. The script naclbuild.sh in build-scripts
automates the process and should serve as a guide for users of SDL trying to build
their own applications.
Basic usage:
./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)
This will build testgles2.c by default.
If you want to build a different test, for example testrendercopyex.c:
SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35
Once the build finishes, you have to serve the contents with a web server (the
script will give you instructions on how to do that with Python).
================================================================================
RWops and nacl_io
================================================================================
SDL_RWops work transparently with nacl_io. Two functions control the mount points:
int mount(const char* source, const char* target,
const char* filesystemtype,
unsigned long mountflags, const void *data);
int umount(const char *target);
For convenience, SDL will by default mount an httpfs tree at / before calling
the app's main function. Such setting can be overridden by calling:
umount("/");
And then mounting a different filesystem at /
It's important to consider that the asynchronous nature of file operations on a
browser is hidden from the application, effectively providing the developer with
a set of blocking file operations just like you get in a regular desktop
environment, which eases the job of porting to Native Client, but also introduces
a set of challenges of its own, in particular when big file sizes and slow
connections are involved.
For more information on how nacl_io and mount points work, see:
https://developer.chrome.com/native-client/devguide/coding/nacl_io
https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h
To be able to save into the directory "/save/" (like backup of game) :
mount("", "/save", "html5fs", 0, "type=PERSISTENT");
And add to manifest.json :
"permissions": [
"unlimitedStorage"
]
================================================================================
TODO - Known Issues
================================================================================
* Testing of all systems with a real application (something other than SDL's tests)
* Key events don't seem to work properly
+44
View File
@@ -0,0 +1,44 @@
Nokia N-Gage
============
SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
Compiling
---------
SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project.
The library is included in the
[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
sub-module.
A complete example project based on SDL2 can be found in the GitHub
account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
Current level of implementation
-------------------------------
The video driver currently provides full screen video support with
keyboard input.
At the moment only the software renderer works.
Audio is not yet implemented.
Acknowledgements
----------------
Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the
valuable insight into Symbian programming. Without the SDL 1.2 port
which was specially developed for CDoom (Doom for the Nokia 9210), this
adaptation would not have been possible.
I would like to thank my friends
[Razvan](https://twitter.com/bewarerazvan) and [Dan
Whelan](https://danwhelan.ie/), for their continuous support. Without
you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would
have lost my patience long ago.
Last but not least, I would like to thank the development team of
[EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your
patience and support in troubleshooting helped me a lot.
+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 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.
+17
View File
@@ -0,0 +1,17 @@
Pandora
=====================================================================
( http://openpandora.org/ )
- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES
support to work on the pandora under the framebuffer. This driver do not have
input support for now, so if you use it you will have to add your own control code.
The video driver name is "pandora" so if you have problem running it from
the framebuffer, try to set the following variable before starting your application :
"export SDL_VIDEODRIVER=pandora"
- OpenGL ES support was added to the x11 driver, so it's working like the normal
x11 driver one with OpenGLX support, with SDL input event's etc..
David Carré (Cpasjuste)
cpasjuste@gmail.com
+8
View File
@@ -0,0 +1,8 @@
Platforms
=========
We maintain the list of supported platforms on our wiki now, and how to
build and install SDL for those platforms:
https://wiki.libsdl.org/Installation
+68
View File
@@ -0,0 +1,68 @@
Porting
=======
* Porting To A New Platform
The first thing you have to do when porting to a new platform, is look at
include/SDL_platform.h and create an entry there for your operating system.
The standard format is "__PLATFORM__", where PLATFORM is the name of the OS.
Ideally SDL_platform.h will be able to auto-detect the system it's building
on based on C preprocessor symbols.
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.ac,
take a look at the large section labelled:
"Set up the configuration based on the host platform!"
Add a section for your platform, and then re-run autogen.sh and build!
2. Using an IDE:
If you're using an IDE or other non-configure build system, you'll probably
want to create a custom SDL_config.h for your platform. Edit SDL_config.h,
add a section for your platform, and create a custom SDL_config_{platform}.h,
based on SDL_config_minimal.h and SDL_config.h.in
Add the top level include directory to the header search path, and then add
the following sources to the project:
src/*.c
src/atomic/*.c
src/audio/*.c
src/cpuinfo/*.c
src/events/*.c
src/file/*.c
src/haptic/*.c
src/joystick/*.c
src/power/*.c
src/render/*.c
src/render/software/*.c
src/stdlib/*.c
src/thread/*.c
src/timer/*.c
src/video/*.c
src/audio/disk/*.c
src/audio/dummy/*.c
src/filesystem/dummy/*.c
src/video/dummy/*.c
src/haptic/dummy/*.c
src/joystick/dummy/*.c
src/main/dummy/*.c
src/thread/generic/*.c
src/timer/dummy/*.c
src/loadso/dummy/*.c
Once you have a working library without any drivers, you can go back to each
of the major subsystems and start implementing drivers for your platform.
If you have any questions, don't hesitate to ask on the SDL mailing list:
http://www.libsdl.org/mailing-list.php
Enjoy!
Sam Lantinga (slouken@libsdl.org)
+51
View File
@@ -0,0 +1,51 @@
PS2
======
SDL2 port for the Sony Playstation 2 contributed by:
- Francisco Javier Trujillo Mata
Credit to
- The guys that ported SDL to PSP & Vita because I'm taking them as reference.
- David G. F. for helping me with several issues and tests.
## Building
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
cmake --build build
cmake --install build
```
## Hints
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
## Notes
If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
It could be something similar as:
```c
.....
SDL_PS2_SKIP_IOP_RESET();
int main(int argc, char *argv[])
{
.....
```
For a release binary is recommendable to reset the IOP always.
Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
## Getting PS2 Dev
[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
## Running on PCSX2 Emulator
[PCSX2](https://github.com/PCSX2/pcsx2)
[More PCSX2 information](https://pcsx2.net/)
## To Do
- PS2 Screen Keyboard
- Dialogs
- Others
+36
View File
@@ -0,0 +1,36 @@
PSP
======
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 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)
## 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
+180
View File
@@ -0,0 +1,180 @@
Raspberry Pi
============
Requirements:
Raspbian (other Linux distros may work as well).
Features
--------
* Works without X11
* Hardware accelerated OpenGL ES 2.x
* Sound via ALSA
* Input (mouse/keyboard/joystick) via EVDEV
* Hotplugging of input devices via UDEV
Raspbian Build Dependencies
---------------------------
sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev
You also need the VideoCore binary stuff that ships in /opt/vc for EGL and
OpenGL ES 2.x, it usually comes pre-installed, but in any case:
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
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
------------------------------
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
will be placed in /opt/rpi-tools
sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools
You'll also need a Raspbian binary image.
Get it from: http://downloads.raspberrypi.org/raspbian_latest
After unzipping, you'll get file with a name like: "<date>-wheezy-raspbian.img"
Let's assume the sysroot will be built in /opt/rpi-sysroot.
export SYSROOT=/opt/rpi-sysroot
sudo kpartx -a -v <path_to_raspbian_image>.img
sudo mount -o loop /dev/mapper/loop0p2 /mnt
sudo cp -r /mnt $SYSROOT
sudo apt-get install qemu binfmt-support qemu-user-static
sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin
sudo mount --bind /dev $SYSROOT/dev
sudo mount --bind /proc $SYSROOT/proc
sudo mount --bind /sys $SYSROOT/sys
Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
sudo chroot $SYSROOT
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
exit
sudo umount $SYSROOT/dev
sudo umount $SYSROOT/proc
sudo umount $SYSROOT/sys
sudo umount /mnt
There's one more fix required, as the libdl.so symlink uses an absolute path
which doesn't quite work in our setup.
sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
The final step is compiling SDL itself.
export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux"
cd <SDL SOURCE>
mkdir -p build;cd build
LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
make
make install
To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:
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
-----------------------------------------------
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
will also render the CMA - Dynamic Memory Split functionality useless.
Also, by default the Raspbian distro configures the GPU RAM at 64MB, this is too
low in general, specially if a 1080p TV is hooked up.
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
--------
Make sure you belong to the "input" group.
sudo usermod -aG input `whoami`
No HDMI Audio
-------------
If you notice that ALSA works but there's no audio over HDMI, try adding:
hdmi_drive=2
to your config.txt file and reboot.
Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
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.
If you notice there's no SDL_TEXTINPUT message being emitted, double check that
your app has read access to one of the following:
* /proc/self/fd/0
* /dev/tty
* /dev/tty[0...6]
* /dev/vc/0
* /dev/console
This is usually not a problem if you run from the physical terminal (as opposed
to running from a pseudo terminal, such as via SSH). If running from a PTS, a
quick workaround is to run your app as root or add yourself to the tty group,
then re-login to the system.
sudo usermod -aG tty `whoami`
The keyboard layout used by SDL is the same as the one the kernel uses.
To configure the layout on Raspbian:
sudo dpkg-reconfigure keyboard-configuration
To configure the locale, which controls which keys are interpreted as letters,
this determining the CAPS LOCK behavior:
sudo dpkg-reconfigure locales
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
does not actually have support for it, which causes issues in certain SDL apps
since the presence of OpenGL support supersedes the ES/ES2 variants.
The workaround is to disable OpenGL at configuration time:
./configure --disable-video-opengl
Or if the application uses the Render functions, you can use the SDL_RENDER_DRIVER
environment variable:
export SDL_RENDER_DRIVER=opengles2
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
does not suffer from this issue.
+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.
+86
View File
@@ -0,0 +1,86 @@
Touch
===========================================================================
System Specific Notes
===========================================================================
Linux:
The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it.
Mac:
The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do.
iPhone:
Works out of box.
Windows:
Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com
===========================================================================
Events
===========================================================================
SDL_FINGERDOWN:
Sent when a finger (or stylus) is placed on a touch device.
Fields:
* event.tfinger.touchId - the Id of the touch device.
* event.tfinger.fingerId - the Id of the finger which just went down.
* event.tfinger.x - the x coordinate of the touch (0..1)
* event.tfinger.y - the y coordinate of the touch (0..1)
* event.tfinger.pressure - the pressure of the touch (0..1)
SDL_FINGERMOTION:
Sent when a finger (or stylus) is moved on the touch device.
Fields:
Same as SDL_FINGERDOWN but with additional:
* event.tfinger.dx - change in x coordinate during this motion event.
* event.tfinger.dy - change in y coordinate during this motion event.
SDL_FINGERUP:
Sent when a finger (or stylus) is lifted from the touch device.
Fields:
Same as SDL_FINGERDOWN.
===========================================================================
Functions
===========================================================================
SDL provides the ability to access the underlying SDL_Finger structures.
These structures should _never_ be modified.
The following functions are included from SDL_touch.h
To get a SDL_TouchID call SDL_GetTouchDevice(int index).
This returns a SDL_TouchID.
IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this!
The number of touch devices can be queried with SDL_GetNumTouchDevices().
A SDL_TouchID may be used to get pointers to SDL_Finger.
SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device.
The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following:
float x = event.tfinger.x;
float y = event.tfinger.y;
To get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger.
This returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed.
A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled.
As a result, be very careful to check for NULL return values.
A SDL_Finger has the following fields:
* x, y:
The current coordinates of the touch.
* pressure:
The pressure of the touch.
===========================================================================
Notes
===========================================================================
For a complete example see test/testgesture.c
Please direct questions/comments to:
jim.tla+sdl_touch@gmail.com
(original author, API was changed since)
+60
View File
@@ -0,0 +1,60 @@
# Versioning
## Since 2.23.0
SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
and older versions of the Linux kernel:
* The major version (first part) increases when backwards compatibility
is broken, which will happen infrequently.
* If the minor version (second part) is divisible by 2
(for example 2.24.x, 2.26.x), this indicates a version of SDL that
is believed to be stable and suitable for production use.
* In stable releases, the patchlevel or micro version (third part)
indicates bugfix releases. Bugfix releases should not add or
remove ABI, so the ".0" release (for example 2.24.0) should be
forwards-compatible with all the bugfix releases from the
same cycle (for example 2.24.1).
* The minor version increases when new API or ABI is added, or when
other significant changes are made. Newer minor versions are
backwards-compatible, but not fully forwards-compatible.
For example, programs built against SDL 2.24.x should work fine
with SDL 2.26.x, but programs built against SDL 2.26.x will not
necessarily work with 2.24.x.
* If the minor version (second part) is not divisible by 2
(for example 2.23.x, 2.25.x), this indicates a development prerelease
of SDL that is not suitable for stable software distributions.
Use with caution.
* The patchlevel or micro version (third part) increases with
each prerelease.
* Each prerelease might add new API and/or ABI.
* Prereleases are backwards-compatible with older stable branches.
For example, 2.25.x will be backwards-compatible with 2.24.x.
* Prereleases are not guaranteed to be backwards-compatible with
each other. For example, new API or ABI added in 2.25.1
might be removed or changed in 2.25.2.
If this would be a problem for you, please do not use prereleases.
* Only upgrade to a prerelease if you can guarantee that you will
promptly upgrade to the stable release that follows it.
For example, do not upgrade to 2.23.x unless you will be able to
upgrade to 2.24.0 when it becomes available.
* Software distributions that have a freeze policy (in particular Linux
distributions with a release cycle, such as Debian and Fedora)
should usually only package stable releases, and not prereleases.
## Before 2.23.0
Older versions of SDL followed a similar policy, but instead of the
odd/even rule applying to the minor version, it applied to the patchlevel
(micro version, third part). For example, 2.0.22 was a stable release
and 2.0.21 was a prerelease.
+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.
+10
View File
@@ -0,0 +1,10 @@
WinCE
=====
Windows CE is no longer supported by SDL.
We have left the CE support in SDL 1.2 for those that must have it, and we
have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3.
--ryan.
+58
View File
@@ -0,0 +1,58 @@
# Windows
## LLVM and Intel C++ compiler support
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.
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)
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).
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).
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.
+519
View File
@@ -0,0 +1,519 @@
WinRT
=====
This port allows SDL applications to run on Microsoft's platforms that require
use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases,
refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
In the past, SDL has supported Windows RT 8.x, Windows Phone, etc, but in
modern times this port is focused on UWP apps, which run on Windows 10,
and modern Xbox consoles.
Requirements
------------
* Microsoft Visual C++ (aka Visual Studio) 2019.
- Free, "Community" or "Express" editions may be used, so long as they
include support for either "Windows Store" or "Windows Phone" apps.
"Express" versions marked as supporting "Windows Desktop" development
typically do not include support for creating WinRT apps, to note.
(The "Community" editions of Visual C++ do, however, support both
desktop/Win32 and WinRT development).
* A valid Microsoft account - This requirement is not imposed by SDL, but
rather by Microsoft's Visual C++ toolchain. This is required to launch or
debug apps.
Status
------
Here is a rough list of what works, and what doesn't:
* What works:
* compilation via Visual C++ 2019.
* compile-time platform detection for SDL programs. The C/C++ #define,
`__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
* GPU-accelerated 2D rendering, via SDL_Renderer.
* OpenGL ES 2, via the ANGLE library (included separately from SDL)
* software rendering, via either SDL_Surface (optionally in conjunction with
SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the
SDL_Renderer APIs
* threads
* timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(),
SDL_GetPerformanceFrequency(), etc.)
* file I/O via SDL_RWops
* mouse input (unsupported on Windows Phone)
* audio, via SDL's WASAPI backend (if you want to record, your app must
have "Microphone" capabilities enabled in its manifest, and the user must
not have blocked access. Otherwise, capture devices will fail to work,
presenting as a device disconnect shortly after opening it.)
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
anything outside of the app is not supported.
* system path retrieval via SDL's filesystem APIs
* game controllers. Support is provided via the SDL_Joystick and
SDL_GameController APIs, and is backed by Microsoft's XInput API. Please
note, however, that Windows limits game-controller support in UWP apps to,
"Xbox compatible controllers" (many controllers that work in Win32 apps,
do not work in UWP, due to restrictions in UWP itself.)
* multi-touch input
* app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as
appropriate.
* window events
* using Direct3D 11.x APIs outside of SDL. Non-XAML / Direct3D-only apps can
choose to render content directly via Direct3D, using SDL to manage the
internal WinRT window, as well as input and audio. (Use
SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into
IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.)
* What partially works:
* keyboard input. Most of WinRT's documented virtual keys are supported, as
well as many keys with documented hardware scancodes. Converting
SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs
(MapVirtualKey()) in Microsoft's Windows Store / UWP APIs.
* SDLmain. WinRT uses a different signature for each app's main() function.
SDL-based apps that use this port must compile in SDL_winrt_main_NonXAML.cpp
(in `SDL\src\main\winrt\`) directly in order for their C-style main()
functions to be called.
* What doesn't work:
* compilation with anything other than Visual C++
* programmatically-created custom cursors. These don't appear to be supported
by WinRT. Different OS-provided cursors can, however, be created via
SDL_CreateSystemCursor() (unsupported on Windows Phone)
* SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently
supported by WinRT itself.
* joysticks and game controllers that either are not supported by
Microsoft's XInput API, or are not supported within UWP apps (many
controllers that work in Win32, do not work in UWP, due to restrictions in
UWP itself).
* turning off VSync when rendering on Windows Phone. Attempts to turn VSync
off on Windows Phone result either in Direct3D not drawing anything, or it
forcing VSync back on. As such, SDL_RENDERER_PRESENTVSYNC will always get
turned-on on Windows Phone. This limitation is not present in non-Phone
WinRT (such as Windows 8.x), where turning off VSync appears to work.
* probably anything else that's not listed as supported
Upgrade Notes
-------------
#### SDL_GetPrefPath() usage when upgrading WinRT apps from SDL 2.0.3
SDL 2.0.4 fixes two bugs found in the WinRT version of SDL_GetPrefPath().
The fixes may affect older, SDL 2.0.3-based apps' save data. Please note
that these changes only apply to SDL-based WinRT apps, and not to apps for
any other platform.
1. SDL_GetPrefPath() would return an invalid path, one in which the path's
directory had not been created. Attempts to create files there
(via fopen(), for example), would fail, unless that directory was
explicitly created beforehand.
2. SDL_GetPrefPath(), for non-WinPhone-based apps, would return a path inside
a WinRT 'Roaming' folder, the contents of which get automatically
synchronized across multiple devices. This process can occur while an
application runs, and can cause existing save-data to be overwritten
at unexpected times, with data from other devices. (Windows Phone apps
written with SDL 2.0.3 did not utilize a Roaming folder, due to API
restrictions in Windows Phone 8.0).
SDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by:
1. making sure that SDL_GetPrefPath() returns a directory in which data
can be written to immediately, without first needing to create directories.
2. basing SDL_GetPrefPath() off of a different, non-Roaming folder, the
contents of which do not automatically get synchronized across devices
(and which require less work to use safely, in terms of data integrity).
Apps that wish to get their Roaming folder's path can do so either by using
SDL_WinRTGetFSPathUTF8(), SDL_WinRTGetFSPathUNICODE() (which returns a
UCS-2/wide-char string), or directly through the WinRT class,
Windows.Storage.ApplicationData.
Setup, High-Level Steps
-----------------------
The steps for setting up a project for an SDL/WinRT app looks like the
following, at a high-level:
1. create a new Visual C++ project using Microsoft's template for a,
"Direct3D App".
2. remove most of the files from the project.
3. make your app's project directly reference SDL/WinRT's own Visual C++
project file, via use of Visual C++'s "References" dialog. This will setup
the linker, and will copy SDL's .dll files to your app's final output.
4. adjust your app's build settings, at minimum, telling it where to find SDL's
header files.
5. add files that contains a WinRT-appropriate main function, along with some
data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls)
work properly.
6. add SDL-specific app code.
7. build and run your app.
Setup, Detailed Steps
---------------------
### 1. Create a new project ###
Create a new project using one of Visual C++'s templates for a plain, non-XAML,
"Direct3D App" (XAML support for SDL/WinRT is not yet ready for use). If you
don't see one of these templates, in Visual C++'s 'New Project' dialog, try
using the textbox titled, 'Search Installed Templates' to look for one.
### 2. Remove unneeded files from the project ###
In the new project, delete any file that has one of the following extensions:
- .cpp
- .h
- .hlsl
When you are done, you should be left with a few files, each of which will be a
necessary part of your app's project. These files will consist of:
- an .appxmanifest file, which contains metadata on your WinRT app. This is
similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android.
- a few .png files, one of which is a splash screen (displayed when your app
launches), others are app icons.
- a .pfx file, used for code signing purposes.
### 3. Add references to SDL's project files ###
SDL/WinRT can be built in multiple variations, spanning across three different
CPU architectures (x86, x64, and ARM) and two different configurations
(Debug and Release). WinRT and Visual C++ do not currently provide a means
for combining multiple variations of one library into a single file.
Furthermore, it does not provide an easy means for copying pre-built .dll files
into your app's final output (via Post-Build steps, for example). It does,
however, provide a system whereby an app can reference the MSVC projects of
libraries such that, when the app is built:
1. each library gets built for the appropriate CPU architecture(s) and WinRT
platform(s).
2. each library's output, such as .dll files, get copied to the app's build
output.
To set this up for SDL/WinRT, you'll need to run through the following steps:
1. open up the Solution Explorer inside Visual C++ (under the "View" menu, then
"Solution Explorer")
2. right click on your app's solution.
3. navigate to "Add", then to "Existing Project..."
4. find SDL/WinRT's Visual C++ project file and open it, in the `VisualC-WinRT`
directory.
5. once the project has been added, right-click on your app's project and
select, "References..."
6. click on the button titled, "Add New Reference..."
7. check the box next to SDL
8. click OK to close the dialog
9. SDL will now show up in the list of references. Click OK to close that
dialog.
Your project is now linked to SDL's project, insofar that when the app is
built, SDL will be built as well, with its build output getting included with
your app.
### 4. Adjust Your App's Build Settings ###
Some build settings need to be changed in your app's project. This guide will
outline the following:
- making sure that the compiler knows where to find SDL's header files
- **Optional for C++, but NECESSARY for compiling C code:** telling the
compiler not to use Microsoft's C++ extensions for WinRT development.
- **Optional:** telling the compiler not generate errors due to missing
precompiled header files.
To change these settings:
1. right-click on the project
2. choose "Properties"
3. in the drop-down box next to "Configuration", choose, "All Configurations"
4. in the drop-down box next to "Platform", choose, "All Platforms"
5. in the left-hand list, expand the "C/C++" section
6. select "General"
7. edit the "Additional Include Directories" setting, and add a path to SDL's
"include" directory
8. **Optional: to enable compilation of C code:** change the setting for
"Consume Windows Runtime Extension" from "Yes (/ZW)" to "No". If you're
working with a completely C++ based project, this step can usually be
omitted.
9. **Optional: to disable precompiled headers (which can produce
'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand
list, select "Precompiled Headers", then change the setting for "Precompiled
Header" from "Use (/Yu)" to "Not Using Precompiled Headers".
10. close the dialog, saving settings, by clicking the "OK" button
### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ###
A few files should be included directly in your app's MSVC project, specifically:
1. a WinRT-appropriate main function (which is different than main() functions on
other platforms)
2. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor
(if and when the app needs to do so). *If this cursor resource is not
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 for C/C++ projects:
1. right-click on your project (again, in Visual C++'s Solution Explorer),
navigate to "Add", then choose "Existing Item...".
2. navigate to the directory containing SDL's source code, then into its
subdirectory, 'src/main/winrt/'. Select, then add, the following files:
- `SDL_winrt_main_NonXAML.cpp`
- `SDL2-WinRTResources.rc`
- `SDL2-WinRTResource_BlankCursor.cur`
3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your
project), then click on "Properties...".
4. in the drop-down box next to "Configuration", choose, "All Configurations"
5. in the drop-down box next to "Platform", choose, "All Platforms"
6. in the left-hand list, click on "C/C++"
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 ###
At this point, you can add in SDL-specific source code. Be sure to include a
C-style main function (ie: `int main(int argc, char *argv[])`). From there you
should be able to create a single `SDL_Window` (WinRT apps can only have one
window, at present), as well as an `SDL_Renderer`. Direct3D will be used to
draw content. Events are received via SDL's usual event functions
(`SDL_PollEvent`, etc.) If you have a set of existing source files and assets,
you can start adding them to the project now. If not, or if you would like to
make sure that you're setup correctly, some short and simple sample code is
provided below.
#### 6.A. ... when creating a new app ####
If you are creating a new app (rather than porting an existing SDL-based app),
or if you would just like a simple app to test SDL/WinRT with before trying to
get existing code working, some working SDL/WinRT code is provided below. To
set this up:
1. right click on your app's project
2. select Add, then New Item. An "Add New Item" dialog will show up.
3. from the left-hand list, choose "Visual C++"
4. from the middle/main list, choose "C++ File (.cpp)"
5. near the bottom of the dialog, next to "Name:", type in a name for your
source file, such as, "main.cpp".
6. click on the Add button. This will close the dialog, add the new file to
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.
```c
#include <SDL.h>
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;
}
while (keep_going) {
while (SDL_PollEvent(&evt)) {
if ((evt.type == SDL_KEYDOWN) && (evt.key.keysym.sym == SDLK_ESCAPE)) {
keep_going = SDL_FALSE;
}
}
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
SDL_Quit();
return 0;
}
```
#### 6.B. Adding code and assets ####
If you have existing code and assets that you'd like to add, you should be able
to add them now. The process for adding a set of files is as such.
1. right click on the app's project
2. select Add, then click on "New Item..."
3. open any source, header, or asset files as appropriate. Support for C and
C++ is available.
Do note that WinRT only supports a subset of the APIs that are available to
Win32-based apps. Many portions of the Win32 API and the C runtime are not
available.
A list of unsupported C APIs can be found at
<http://msdn.microsoft.com/en-us/library/windows/apps/jj606124.aspx>
General information on using the C runtime in WinRT can be found at
<https://msdn.microsoft.com/en-us/library/hh972425.aspx>
A list of supported Win32 APIs for WinRT apps can be found at
<http://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx>. To note,
the list of supported Win32 APIs for Windows Phone 8.0 is different.
That list can be found at
<http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662956(v=vs.105).aspx>
### 7. Build and run your app ###
Your app project should now be setup, and you should be ready to build your app.
To run it on the local machine, open the Debug menu and choose "Start
Debugging". This will build your app, then run your app full-screen. To switch
out of your app, press the Windows key. Alternatively, you can choose to run
your app in a window. To do this, before building and running your app, find
the drop-down menu in Visual C++'s toolbar that says, "Local Machine". Expand
this by clicking on the arrow on the right side of the list, then click on
Simulator. Once you do that, any time you build and run the app, the app will
launch in window, rather than full-screen.
#### 7.A. Running apps on older, ARM-based, "Windows RT" devices ####
**These instructions do not include Windows Phone, despite Windows Phone
typically running on ARM processors.** They are specifically for devices
that use the "Windows RT" operating system, which was a modified version of
Windows 8.x that ran primarily on ARM-based tablet computers.
To build and run the app on ARM-based, "Windows RT" devices, you'll need to:
- install Microsoft's "Remote Debugger" on the device. Visual C++ installs and
debugs ARM-based apps via IP networks.
- change a few options on the development machine, both to make sure it builds
for ARM (rather than x86 or x64), and to make sure it knows how to find the
Windows RT device (on the network).
Microsoft's Remote Debugger can be found at
<https://msdn.microsoft.com/en-us/library/hh441469.aspx>. Please note
that separate versions of this debugger exist for different versions of Visual
C++, one each for MSVC 2015, 2013, and 2012.
To setup Visual C++ to launch your app on an ARM device:
1. make sure the Remote Debugger is running on your ARM device, and that it's on
the same IP network as your development machine.
2. from Visual C++'s toolbar, find a drop-down menu that says, "Win32". Click
it, then change the value to "ARM".
3. make sure Visual C++ knows the hostname or IP address of the ARM device. To
do this:
1. open the app project's properties
2. select "Debugging"
3. next to "Machine Name", enter the hostname or IP address of the ARM
device
4. if, and only if, you've turned off authentication in the Remote Debugger,
then change the setting for "Require Authentication" to No
5. click "OK"
4. build and run the app (from Visual C++). The first time you do this, a
prompt will show up on the ARM device, asking for a Microsoft Account. You
do, unfortunately, need to log in here, and will need to follow the
subsequent registration steps in order to launch the app. After you do so,
if the app didn't already launch, try relaunching it again from within Visual
C++.
Troubleshooting
---------------
#### Build fails with message, "error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'"
Try adding the following to your linker flags. In MSVC, this can be done by
right-clicking on the app project, navigating to Configuration Properties ->
Linker -> Command Line, then adding them to the Additional Options
section.
* For Release builds / MSVC-Configurations, add:
/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib
* For Debug builds / MSVC-Configurations, add:
/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib
#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values
This may be caused by a bug in Windows itself, whereby hiding the mouse
cursor can cause mouse-position reporting to fail.
SDL provides a workaround for this, but it requires that an app links to a
set of Win32-style cursor image-resource files. A copy of suitable resource
files can be found in `src/main/winrt/`. Adding them to an app's Visual C++
project file should be sufficient to get the app to use them.
#### SDL's Visual Studio project file fails to open, with message, "The system can't find the file specified."
This can be caused for any one of a few reasons, which Visual Studio can
report, but won't always do so in an up-front manner.
To help determine why this error comes up:
1. open a copy of Visual Studio without opening a project file. This can be
accomplished via Windows' Start Menu, among other means.
2. show Visual Studio's Output window. This can be done by going to VS'
menu bar, then to View, and then to Output.
3. try opening the SDL project file directly by going to VS' menu bar, then
to File, then to Open, then to Project/Solution. When a File-Open dialog
appears, open the SDL project (such as the one in SDL's source code, in its
directory, VisualC-WinRT/UWP_VS2015/).
4. after attempting to open SDL's Visual Studio project file, additional error
information will be output to the Output window.
If Visual Studio reports (via its Output window) that the project:
"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:
Microsoft.VisualStudio.ComponentGroup.UWP.VC"
... then you will need to re-launch Visual Studio's installer, and make sure that
the workflow for "Universal Windows Platform development" is checked, and that its
optional component, "C++ Universal Windows Platform tools" is also checked. While
you are there, if you are planning on targeting UWP / Windows 10, also make sure
that you check the optional component, "Windows 10 SDK (10.0.10240.0)". After
making sure these items are checked as-appropriate, install them.
Once you install these components, try re-launching Visual Studio, and re-opening
the SDL project file. If you still get the error dialog, try using the Output
window, again, seeing what Visual Studio says about it.
#### Game controllers / joysticks aren't working!
Windows only permits certain game controllers and joysticks to work within
WinRT / UWP apps. Even if a game controller or joystick works in a Win32
app, that device is not guaranteed to work inside a WinRT / UWP app.
According to Microsoft, "Xbox compatible controllers" should work inside
UWP apps, potentially with more working in the future. This includes, but
may not be limited to, Microsoft-made Xbox controllers and USB adapters.
(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop)
+63
View File
@@ -0,0 +1,63 @@
# Simple DirectMedia Layer
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
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, 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 "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.
The header files and test programs are well commented and always up to date.
More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
- [Android](README-android.md)
- [CMake](README-cmake.md)
- [DirectFB](README-directfb.md)
- [DynAPI](README-dynapi.md)
- [Emscripten](README-emscripten.md)
- [GDK](README-gdk.md)
- [Gesture](README-gesture.md)
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)
- [macOS](README-macos.md)
- [OS/2](README-os2.md)
- [Native Client](README-nacl.md)
- [Pandora](README-pandora.md)
- [Supported Platforms](README-platforms.md)
- [Porting information](README-porting.md)
- [PSP](README-psp.md)
- [PS2](README-ps2.md)
- [Raspberry Pi](README-raspberrypi.md)
- [Touch](README-touch.md)
- [Versions](README-versions.md)
- [WinCE](README-wince.md)
- [Windows](README-windows.md)
- [WinRT](README-winrt.md)
- [PSVita](README-vita.md)
- [Nokia N-Gage](README-ngage.md)
If you need help with the library, or just want to discuss SDL related
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
[our bug tracker](https://github.com/libsdl-org/SDL/issues)
Enjoy!
Sam Lantinga <mailto:slouken@libsdl.org>
File diff suppressed because it is too large. Load diff
+49
View File
@@ -0,0 +1,49 @@
# Release checklist
When changing the version, run `build-scripts/update-version.sh X Y Z`,
where `X Y Z` are the major version, minor version, and patch level. So
`2 28 1` means "change the version to 2.28.1". This script does much of the
mechanical work.
## New feature release
* Update `WhatsNew.txt`
* Bump version number to 2.EVEN.0:
* `./build-scripts/update-version.sh 2 EVEN 0`
* Do the release
* Update the website file include/header.inc.php to reflect the new version
## New bugfix release
* Check that no new API/ABI was added
* If it was, do a new feature release (see above) instead
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
* `./build-scripts/update-version.sh 2 Y Z+1`
* Do the release
* Update the website file include/header.inc.php to reflect the new version
## After a feature release
* Create a branch like `release-2.24.x`
* Bump version number to 2.ODD.0 for next development branch
* `./build-scripts/update-version.sh 2 ODD 0`
## New development prerelease
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
* `./build-scripts/update-version.sh 2 Y Z+1`
* Do the release
Binary file not shown.
@@ -0,0 +1,65 @@
#!/bin/sh
# Get the canonical path of the folder containing this script
bindir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
# Calculate the canonical path of the prefix, relative to the folder of this script
prefix=$(cd -P -- "$bindir/.." && printf '%s\n' "$(pwd -P)")
exec_prefix=${prefix}
exec_prefix_set=no
libdir=${exec_prefix}/lib
#usage="\
#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
usage="\
Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 2.28.5
;;
--cflags)
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
;;
--libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
;;
--static-libs)
# --libs|--static-libs)
sdl_static_libs=$(echo "-lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid" | sed -E "s#-lSDL2[ $]#$libdir/libSDL2.a #g")
echo -L${exec_prefix}/lib $sdl_static_libs
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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,6 +25,7 @@
* Main include header for the SDL library
*/
#ifndef SDL_h_
#define SDL_h_
@@ -69,8 +70,6 @@
extern "C" {
#endif
/* WIKI CATEGORY: Init */
/* As of version 0.5, SDL is loaded dynamically into the application */
/**
@@ -131,7 +130,7 @@ extern "C" {
* 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.
* \param flags subsystem initialization flags
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -61,8 +61,6 @@ assert can have unique static variables associated with it.
#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(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
#elif defined(__386__) && defined(__WATCOMC__)
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
@@ -193,8 +191,8 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
* 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().
* 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)(
@@ -214,8 +212,8 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
* 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`.
* fails or NULL for the default handler
* \param userdata a pointer that is passed to `handler`
*
* \since This function is available since SDL 2.0.0.
*
@@ -256,7 +254,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void
* 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().
* 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.
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,29 +20,38 @@
*/
/**
* # CategoryAtomic
* \file SDL_atomic.h
*
* Atomic operations.
*
* IMPORTANT: If you are not an expert in concurrent lockless programming, you
* should not be using any functions in this file. You should be protecting
* your data structures with full mutexes instead.
* IMPORTANT:
* If you are not an expert in concurrent lockless programming, you should
* only be using the atomic lock and reference counting functions in this
* file. In all other cases you should be protecting your data structures
* with full mutexes.
*
* ***Seriously, here be dragons!***
* The list of "safe" functions to use are:
* SDL_AtomicLock()
* SDL_AtomicUnlock()
* SDL_AtomicIncRef()
* SDL_AtomicDecRef()
*
* You can find out a little more about lockless programming and the subtle
* issues that can arise here:
* https://learn.microsoft.com/en-us/windows/win32/dxtecharts/lockless-programming
* Seriously, here be dragons!
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^
*
* You can find out a little more about lockless programming and the
* subtle issues that can arise here:
* http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
*
* There's also lots of good information here:
* http://www.1024cores.net/home/lock-free-algorithms
* http://preshing.com/
*
* - https://www.1024cores.net/home/lock-free-algorithms
* - https://preshing.com/
*
* These operations may or may not actually be implemented using processor
* specific atomic operations. When possible they are implemented as true
* processor specific atomic operations. When that is not possible the are
* implemented using locks that *do* use the available atomic operations.
* These operations may or may not actually be implemented using
* processor specific atomic operations. When possible they are
* implemented as true processor specific atomic operations. When that
* is not possible the are implemented using locks that *do* use the
* available atomic operations.
*
* All of the atomic operations that modify memory are full memory barriers.
*/
@@ -85,7 +94,7 @@ typedef int SDL_SpinLock;
* ***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.
* \param lock a pointer to a lock variable
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
* held.
*
@@ -102,7 +111,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *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.
* \param lock a pointer to a lock variable
*
* \since This function is available since SDL 2.0.0.
*
@@ -119,7 +128,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *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.
* \param lock a pointer to a lock variable
*
* \since This function is available since SDL 2.0.0.
*
@@ -200,7 +209,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
#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__)
#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
@@ -248,13 +257,10 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
/**
* A type representing an atomic integer value.
*
* It is a struct so people don't accidentally use numeric operations on it.
* \brief A type representing an atomic integer value. It is a struct
* so people don't accidentally use numeric operations on it.
*/
typedef struct SDL_atomic_t {
int value;
} SDL_atomic_t;
typedef struct { int value; } SDL_atomic_t;
/**
* Set an atomic variable to a new value if it is currently an old value.
@@ -262,9 +268,9 @@ typedef struct SDL_atomic_t {
* ***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.
* \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.
@@ -283,8 +289,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int
* ***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.
* \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.
@@ -299,7 +305,7 @@ extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
* ***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.
* \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.
@@ -316,8 +322,8 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
* ***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.
* \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.
@@ -350,9 +356,9 @@ extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
* ***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.
* \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.
@@ -369,8 +375,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *
* ***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.
* \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.
@@ -386,7 +392,7 @@ extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
* \param a a pointer to a pointer.
* \param a a pointer to a pointer
* \returns the current value of a pointer.
*
* \since This function is available since SDL 2.0.2.
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -22,9 +22,9 @@
/* !!! FIXME: several functions in here need Doxygen comments. */
/**
* # CategoryAudio
* \file SDL_audio.h
*
* Access to the raw audio mixing buffer for the SDL library.
* Access to the raw audio mixing buffer for the SDL library.
*/
#ifndef SDL_audio_h_
@@ -44,24 +44,24 @@ extern "C" {
#endif
/**
* Audio format flags.
* \brief Audio format flags.
*
* These are what the 16 bits in SDL_AudioFormat currently mean...
* (Unspecified bits are always zero).
* These are what the 16 bits in SDL_AudioFormat currently mean...
* (Unspecified bits are always zero).
*
* ```
* ++-----------------------sample is signed if set
* ||
* || ++-----------sample is bigendian if set
* || ||
* || || ++---sample is float if set
* || || ||
* || || || +---sample bit size---+
* || || || | |
* 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
* ```
* \verbatim
++-----------------------sample is signed if set
||
|| ++-----------sample is bigendian if set
|| ||
|| || ++---sample is float if set
|| || ||
|| || || +---sample bit size---+
|| || || | |
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
\endverbatim
*
* There are macros in SDL 2.0 and later to query these bits.
* There are macros in SDL 2.0 and later to query these bits.
*/
typedef Uint16 SDL_AudioFormat;
@@ -149,30 +149,33 @@ typedef Uint16 SDL_AudioFormat;
/* @} *//* Audio flags */
/**
* This function is called when the audio device needs more data.
* This function is called when the audio device needs more data.
*
* \param userdata An application-specific parameter saved in the
* SDL_AudioSpec structure.
* \param stream A pointer to the audio data buffer.
* \param len Length of **stream** in bytes.
* \param userdata An application-specific parameter saved in
* the SDL_AudioSpec structure
* \param stream A pointer to the audio data buffer.
* \param len The length of that buffer in bytes.
*
* Once the callback returns, the buffer will no longer be valid.
* Stereo samples are stored in a LRLRLR ordering.
*
* You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
* you like. Just open your audio device with a NULL callback.
*/
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
int len);
/**
* The calculated values in this structure are calculated by SDL_OpenAudio().
* The calculated values in this structure are calculated by SDL_OpenAudio().
*
* For multi-channel audio, the default SDL channel mapping is:
*
* ```
* 2: FL FR (stereo)
* 3: FL FR LFE (2.1 surround)
* 4: FL FR BL BR (quad)
* 5: FL FR LFE BL BR (4.1 surround)
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
* 7: FL FR FC LFE BC SL SR (6.1 surround)
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
* ```
* For multi-channel audio, the default SDL channel mapping is:
* 2: FL FR (stereo)
* 3: FL FR LFE (2.1 surround)
* 4: FL FR BL BR (quad)
* 5: FL FR LFE BL BR (4.1 surround)
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
* 7: FL FR FC LFE BC SL SR (6.1 surround)
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
*/
typedef struct SDL_AudioSpec
{
@@ -193,11 +196,11 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
SDL_AudioFormat format);
/**
* Upper limit of filters in SDL_AudioCVT
* \brief Upper limit of filters in SDL_AudioCVT
*
* The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
* currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers, one
* of which is the terminating NULL pointer.
* The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
* currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
* one of which is the terminating NULL pointer.
*/
#define SDL_AUDIOCVT_MAX_FILTERS 9
@@ -284,7 +287,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
* meant to be proper names.
*
* \param index the index of the audio driver; the value ranges from 0 to
* SDL_GetNumAudioDrivers() - 1.
* SDL_GetNumAudioDrivers() - 1
* \returns the name of the audio driver at the requested index, or NULL if an
* invalid index was specified.
*
@@ -311,7 +314,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
* specific need to designate the audio driver you want to use. You should
* normally use SDL_Init() or SDL_InitSubSystem().
*
* \param driver_name the name of the desired audio driver.
* \param driver_name the name of the desired audio driver
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
@@ -405,13 +408,13 @@ extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
SDL_AudioSpec * obtained);
/**
* SDL Audio Device IDs.
* SDL Audio Device IDs.
*
* A successful call to SDL_OpenAudio() is always device id 1, and legacy SDL
* audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
* always returns devices >= 2 on success. The legacy calls are good both for
* backwards compatibility and when you don't care about multiple, specific,
* or capture devices.
* A successful call to SDL_OpenAudio() is always device id 1, and legacy
* SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
* always returns devices >= 2 on success. The legacy calls are good both
* for backwards compatibility and when you don't care about multiple,
* specific, or capture devices.
*/
typedef Uint32 SDL_AudioDeviceID;
@@ -449,7 +452,7 @@ typedef Uint32 SDL_AudioDeviceID;
* ```
*
* \param iscapture zero to request playback devices, non-zero to request
* recording devices.
* recording devices
* \returns the number of available devices exposed by the current driver or
* -1 if an explicit list of devices can't be determined. A return
* value of -1 does not necessarily mean an error condition.
@@ -475,7 +478,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
* invalid next time any of several other SDL functions are called.
*
* \param index the index of the audio device; valid values range from 0 to
* SDL_GetNumAudioDevices() - 1.
* SDL_GetNumAudioDevices() - 1
* \param iscapture non-zero to query the list of recording devices, zero to
* query the list of output devices.
* \returns the name of the audio device at the requested index, or NULL on
@@ -501,11 +504,11 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
* count.
*
* \param index the index of the audio device; valid values range from 0 to
* SDL_GetNumAudioDevices() - 1.
* SDL_GetNumAudioDevices() - 1
* \param iscapture non-zero to query the list of recording devices, zero to
* query the list of output devices.
* \param spec The SDL_AudioSpec to be initialized by this function.
* \returns 0 on success, nonzero on error.
* \returns 0 on success, nonzero on error
*
* \since This function is available since SDL 2.0.16.
*
@@ -539,7 +542,7 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
* \param spec The SDL_AudioSpec to be initialized by this function.
* \param iscapture non-zero to query the default recording device, zero to
* query the default output device.
* \returns 0 on success, nonzero on error.
* \returns 0 on success, nonzero on error
*
* \since This function is available since SDL 2.24.0.
*
@@ -591,7 +594,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* frames_ (with stereo output, two samples--left and right--would make a
* single sample frame). This number should be a power of two, and may be
* adjusted by the audio driver to a value more suitable for the hardware.
* Good values seem to range between 512 and 4096 inclusive, depending on
* Good values seem to range between 512 and 8096 inclusive, depending on
* the application and CPU speed. Smaller values reduce latency, but can
* lead to underflow if the application is doing heavy processing and cannot
* fill the audio buffer in time. Note that the number of sample frames is
@@ -642,12 +645,12 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* driver-specific name as appropriate. NULL requests the most
* reasonable default device.
* \param iscapture non-zero to specify a device should be opened for
* recording, not playback.
* recording, not playback
* \param desired an SDL_AudioSpec structure representing the desired output
* format; see SDL_OpenAudio() for more information.
* format; see SDL_OpenAudio() for more information
* \param obtained an SDL_AudioSpec structure filled in with the actual output
* format; see SDL_OpenAudio() for more information.
* \param allowed_changes 0, or one or more flags OR'd together.
* format; see SDL_OpenAudio() for more information
* \param allowed_changes 0, or one or more flags OR'd together
* \returns a valid device ID that is > 0 on success or 0 on failure; call
* SDL_GetError() for more information.
*
@@ -709,7 +712,7 @@ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
* Use this function to get the current audio state of an audio device.
*
* \param dev the ID of an audio device previously opened with
* SDL_OpenAudioDevice().
* SDL_OpenAudioDevice()
* \returns the SDL_AudioStatus of the specified audio device.
*
* \since This function is available since SDL 2.0.0.
@@ -742,7 +745,7 @@ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDevice
*
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
*
* \param pause_on non-zero to pause, 0 to unpause.
* \param pause_on non-zero to pause, 0 to unpause
*
* \since This function is available since SDL 2.0.0.
*
@@ -772,8 +775,8 @@ extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
* callback, you shouldn't pause the audio device, as it will lead to dropouts
* in the audio playback. Instead, you should use SDL_LockAudioDevice().
*
* \param dev a device opened by SDL_OpenAudioDevice().
* \param pause_on non-zero to pause, 0 to unpause.
* \param dev a device opened by SDL_OpenAudioDevice()
* \param pause_on non-zero to pause, 0 to unpause
*
* \since This function is available since SDL 2.0.0.
*
@@ -838,14 +841,14 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
* SDL_LoadWAV("sample.wav", &spec, &buf, &len);
* ```
*
* \param src The data source for the WAVE data.
* \param freesrc If non-zero, SDL will _always_ free the data source.
* \param src The data source for the WAVE data
* \param freesrc If non-zero, SDL will _always_ free the data source
* \param spec An SDL_AudioSpec that will be filled in with the wave file's
* format details.
* format details
* \param audio_buf A pointer filled with the audio data, allocated by the
* function.
* \param audio_len A pointer filled with the length of the audio data buffer
* in bytes.
* in bytes
* \returns This function, if successfully called, returns `spec`, which will
* be filled with the audio data format of the wave source data.
* `audio_buf` will be filled with a pointer to an allocated buffer
@@ -871,9 +874,8 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
Uint32 * audio_len);
/**
* Loads a WAV from a file.
*
* Compatibility convenience function.
* Loads a WAV from a file.
* Compatibility convenience function.
*/
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
@@ -886,7 +888,7 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
* this function with a NULL pointer.
*
* \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
* SDL_LoadWAV_RW().
* SDL_LoadWAV_RW()
*
* \since This function is available since SDL 2.0.0.
*
@@ -910,16 +912,15 @@ extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
* and then can call SDL_ConvertAudio() to complete the conversion.
*
* \param cvt an SDL_AudioCVT structure filled in with audio conversion
* information.
* information
* \param src_format the source format of the audio data; for more info see
* SDL_AudioFormat.
* \param src_channels the number of channels in the source.
* \param src_rate the frequency (sample-frames-per-second) of the source.
* SDL_AudioFormat
* \param src_channels the number of channels in the source
* \param src_rate the frequency (sample-frames-per-second) of the source
* \param dst_format the destination format of the audio data; for more info
* see SDL_AudioFormat.
* \param dst_channels the number of channels in the destination.
* \param dst_rate the frequency (sample-frames-per-second) of the
* destination.
* see SDL_AudioFormat
* \param dst_channels the number of channels in the destination
* \param dst_rate the frequency (sample-frames-per-second) of the destination
* \returns 1 if the audio filter is prepared, 0 if no conversion is needed,
* or a negative error code on failure; call SDL_GetError() for more
* information.
@@ -990,12 +991,12 @@ typedef struct _SDL_AudioStream SDL_AudioStream;
/**
* Create a new audio stream.
*
* \param src_format The format of the source audio.
* \param src_channels The number of channels of the source audio.
* \param src_rate The sampling rate of the source audio.
* \param dst_format The format of the desired audio output.
* \param dst_channels The number of channels of the desired audio output.
* \param dst_rate The sampling rate of the desired audio output.
* \param src_format The format of the source audio
* \param src_channels The number of channels of the source audio
* \param src_rate The sampling rate of the source audio
* \param dst_format The format of the desired audio output
* \param dst_channels The number of channels of the desired audio output
* \param dst_rate The sampling rate of the desired audio output
* \returns 0 on success, or -1 on error.
*
* \since This function is available since SDL 2.0.7.
@@ -1017,9 +1018,9 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
/**
* Add data to be converted/resampled to the stream.
*
* \param stream The stream the audio data is being added to.
* \param buf A pointer to the audio data to add.
* \param len The number of bytes to write to the stream.
* \param stream The stream the audio data is being added to
* \param buf A pointer to the audio data to add
* \param len The number of bytes to write to the stream
* \returns 0 on success, or -1 on error.
*
* \since This function is available since SDL 2.0.7.
@@ -1036,10 +1037,10 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const vo
/**
* Get converted/resampled data from the stream
*
* \param stream The stream the audio is being requested from.
* \param buf A buffer to fill with audio data.
* \param len The maximum number of bytes to fill.
* \returns the number of bytes read from the stream, or -1 on error.
* \param stream The stream the audio is being requested from
* \param buf A buffer to fill with audio data
* \param len The maximum number of bytes to fill
* \returns the number of bytes read from the stream, or -1 on error
*
* \since This function is available since SDL 2.0.7.
*
@@ -1117,9 +1118,6 @@ extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
*/
extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
/**
* Maximum volume allowed in calls to SDL_MixAudio and SDL_MixAudioFormat.
*/
#define SDL_MIX_MAXVOLUME 128
/**
@@ -1134,11 +1132,11 @@ extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
* ...where `format` is the obtained format of the audio device from the
* legacy SDL_OpenAudio() function.
*
* \param dst the destination for the mixed audio.
* \param src the source audio buffer to be mixed.
* \param len the length of the audio buffer in bytes.
* \param dst the destination for the mixed audio
* \param src the source audio buffer to be mixed
* \param len the length of the audio buffer in bytes
* \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
* for full audio volume.
* for full audio volume
*
* \since This function is available since SDL 2.0.0.
*
@@ -1167,13 +1165,13 @@ extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
* SDL_MixAudioFormat() is really only needed when you're mixing a single
* audio stream with a volume adjustment.
*
* \param dst the destination for the mixed audio.
* \param src the source audio buffer to be mixed.
* \param dst the destination for the mixed audio
* \param src the source audio buffer to be mixed
* \param format the SDL_AudioFormat structure representing the desired audio
* format.
* \param len the length of the audio buffer in bytes.
* format
* \param len the length of the audio buffer in bytes
* \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
* for full audio volume.
* for full audio volume
*
* \since This function is available since SDL 2.0.0.
*/
@@ -1217,9 +1215,9 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
* from planar audio formats into a non-planar one (see SDL_AudioFormat)
* before queuing audio.
*
* \param dev the device ID to which we will queue audio.
* \param data the data to queue to the device for later playback.
* \param len the number of bytes (not samples!) to which `data` points.
* \param dev the device ID to which we will queue audio
* \param data the data to queue to the device for later playback
* \param len the number of bytes (not samples!) to which `data` points
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
@@ -1265,9 +1263,9 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
* You should not call SDL_LockAudio() on the device before dequeueing; SDL
* handles locking internally for this function.
*
* \param dev the device ID from which we will dequeue audio.
* \param data a pointer into where audio data should be copied.
* \param len the number of bytes (not samples!) to which (data) points.
* \param dev the device ID from which we will dequeue audio
* \param data a pointer into where audio data should be copied
* \param len the number of bytes (not samples!) to which (data) points
* \returns the number of bytes dequeued, which could be less than requested;
* call SDL_GetError() for more information.
*
@@ -1301,7 +1299,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *dat
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
*
* \param dev the device ID of which we will query queued audio size.
* \param dev the device ID of which we will query queued audio size
* \returns the number of bytes (not samples!) of queued audio.
*
* \since This function is available since SDL 2.0.4.
@@ -1336,7 +1334,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
*
* This function always succeeds and thus returns void.
*
* \param dev the device ID of which to clear the audio queue.
* \param dev the device ID of which to clear the audio queue
*
* \since This function is available since SDL 2.0.4.
*
@@ -1408,7 +1406,7 @@ extern DECLSPEC void SDLCALL SDL_LockAudio(void);
* at once, not only will you block the audio callback, you'll block the other
* thread.
*
* \param dev the ID of the device to be locked.
* \param dev the ID of the device to be locked
*
* \since This function is available since SDL 2.0.0.
*
@@ -1441,7 +1439,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
*
* This function should be paired with a previous SDL_LockAudioDevice() call.
*
* \param dev the ID of the device to be unlocked.
* \param dev the ID of the device to be unlocked
*
* \since This function is available since SDL 2.0.0.
*
@@ -1483,7 +1481,7 @@ extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
* The device ID is invalid as soon as the device is closed, and is eligible
* for reuse in a new SDL_OpenAudioDevice() call immediately.
*
* \param dev an audio device previously opened with SDL_OpenAudioDevice().
* \param dev an audio device previously opened with SDL_OpenAudioDevice()
*
* \since This function is available since SDL 2.0.0.
*
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,9 +20,9 @@
*/
/**
* # CategoryBits
* \file SDL_bits.h
*
* Functions for fiddling with bits and bitmasks.
* Functions for fiddling with bits and bitmasks.
*/
#ifndef SDL_bits_h_
@@ -56,12 +56,6 @@ extern __inline int _SDL_bsr_watcom(Uint32);
modify exact [eax] nomemory;
#endif
/**
* Use this function to get the index of the most significant (set) bit in a
*
* \param x the number to find the MSB of.
* \returns the index of the most significant bit of x, or -1 if x is 0.
*/
SDL_FORCE_INLINE int
SDL_MostSignificantBitIndex32(Uint32 x)
{
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,9 +20,9 @@
*/
/**
* # CategoryBlendmode
* \file SDL_blendmode.h
*
* Header file declaring the SDL_BlendMode enumeration
* Header file declaring the SDL_BlendMode enumeration
*/
#ifndef SDL_blendmode_h_
@@ -35,9 +35,9 @@ extern "C" {
#endif
/**
* The blend mode used in SDL_RenderCopy() and drawing operations.
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
*/
typedef enum SDL_BlendMode
typedef enum
{
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
dstRGBA = srcRGBA */
@@ -60,22 +60,21 @@ typedef enum SDL_BlendMode
} SDL_BlendMode;
/**
* The blend operation used when combining source and destination pixel
* components
* \brief The blend operation used when combining source and destination pixel components
*/
typedef enum SDL_BlendOperation
typedef enum
{
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
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 D3D9, D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
} SDL_BlendOperation;
/**
* The normalized factor used to multiply pixel components
* \brief The normalized factor used to multiply pixel components
*/
typedef enum SDL_BlendFactor
typedef enum
{
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
@@ -159,18 +158,18 @@ typedef enum SDL_BlendFactor
* case.
*
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
* blue components of the source pixels.
* blue components of the source pixels
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
* blue components of the destination pixels.
* 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.
* destination pixels
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
* the source pixels.
* the source pixels
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
* the destination pixels.
* the destination pixels
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
* component of the source and destination pixels.
* component of the source and destination pixels
* \returns an SDL_BlendMode that represents the chosen factors and
* operations.
*
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,7 +20,7 @@
*/
/**
* # CategoryClipboard
* \file SDL_clipboard.h
*
* Include file for SDL clipboard handling
*/
@@ -41,7 +41,7 @@ extern "C" {
/**
* Put UTF-8 text into the clipboard.
*
* \param text the text to store in the clipboard.
* \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.
*
@@ -85,7 +85,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
/**
* Put UTF-8 text into the primary selection.
*
* \param text the text to store in the primary selection.
* \param text the text to store in the primary selection
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -19,41 +19,313 @@
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_config_h_
#ifndef SDL_config_windows_h_
#define SDL_config_windows_h_
#define SDL_config_h_
#include "SDL_platform.h"
/* WIKI CATEGORY: - */
/* Add any platform that doesn't build using the configure system. */
#if defined(__WIN32__)
#include "SDL_config_windows.h"
#elif defined(__WINRT__)
#include "SDL_config_winrt.h"
#elif defined(__WINGDK__)
#include "SDL_config_wingdk.h"
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
#include "SDL_config_xbox.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__IPHONEOS__)
#include "SDL_config_iphoneos.h"
#elif defined(__ANDROID__)
#include "SDL_config_android.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#elif defined(__EMSCRIPTEN__)
#include "SDL_config_emscripten.h"
#elif defined(__NGAGE__)
#include "SDL_config_ngage.h"
#else
/* This is a minimal configuration just to get SDL running on new platforms. */
#include "SDL_config_minimal.h"
#endif /* platform config */
#ifdef USING_GENERATED_CONFIG_H
#error Wrong SDL_config.h, check your include path?
/* 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
#endif /* SDL_config_h_ */
#ifdef HAVE_WINSDKVER_H
#include <winsdkver.h>
#endif
/* sdkddkver.h defines more specific SDK version numbers. This is needed because older versions of the
* Windows 10 SDK have broken declarations for the C API for DirectX 12. */
#if !defined(HAVE_SDKDDKVER_H) && defined(__has_include)
#if __has_include(<sdkddkver.h>)
#define HAVE_SDKDDKVER_H 1
#endif
#endif
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
/* This is a set of defines to configure the SDL features */
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#ifndef _UINTPTR_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#define _UINTPTR_T_DEFINED
#endif
#else
#define HAVE_STDINT_H 1
#endif /* Visual Studio 2008 */
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
#ifdef _WIN64
# define SIZEOF_VOIDP 8
#else
# 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
#ifndef __WATCOMC__
#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
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
#define HAVE_D3D12_H 1
#endif
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
#define HAVE_SHELLSCALINGAPI_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_SENSORSAPI_H 1
#endif
#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
/* Useful headers */
#define STDC_HEADERS 1
#define HAVE_CTYPE_H 1
#define HAVE_FLOAT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDIO_H 1
#define HAVE_STRING_H 1
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ALLOCA 1
/* OpenWatcom requires specific calling conventions for qsort and bsearch */
#ifndef __WATCOMC__
#define HAVE_QSORT 1
#define HAVE_BSEARCH 1
#endif
#define HAVE_ABS 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE__STRREV 1
/* These functions have security warnings, so we won't use them */
/* #undef HAVE__STRUPR */
/* #undef HAVE__STRLWR */
#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 */
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#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_ASIN 1
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
#define HAVE_CEIL 1
#define HAVE_COS 1
#define HAVE_EXP 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_FMOD 1
#define HAVE_LOG 1
#define HAVE_LOG10 1
#define HAVE_POW 1
#define HAVE_SIN 1
#define HAVE_SQRT 1
#define HAVE_TAN 1
#ifndef __WATCOMC__
#define HAVE_ACOSF 1
#define HAVE_ASINF 1
#define HAVE_ATANF 1
#define HAVE_ATAN2F 1
#define HAVE_CEILF 1
#define HAVE__COPYSIGN 1
#define HAVE_COSF 1
#define HAVE_EXPF 1
#define HAVE_FABSF 1
#define HAVE_FLOORF 1
#define HAVE_FMODF 1
#define HAVE_LOGF 1
#define HAVE_LOG10F 1
#define HAVE_POWF 1
#define HAVE_SINF 1
#define HAVE_SQRTF 1
#define HAVE_TANF 1
#endif
#if defined(_MSC_VER)
/* 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_TRUNC 1
#define HAVE_TRUNCF 1
#endif
/* This function is available with at least the VC++ 2008 C runtime library */
#if _MSC_VER >= 1400
#define HAVE__FSEEKI64 1
#endif
#ifdef _USE_MATH_DEFINES
#define HAVE_M_PI 1
#endif
#elif defined(__WATCOMC__)
#define HAVE__FSEEKI64 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_VSSCANF 1
#define HAVE_ROUND 1
#define HAVE_SCALBN 1
#define HAVE_TRUNC 1
#else
#define HAVE_M_PI 1
#endif
#else
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#endif
/* Enable various audio drivers */
#if defined(HAVE_MMDEVICEAPI_H) && defined(HAVE_AUDIOCLIENT_H)
#define SDL_AUDIO_DRIVER_WASAPI 1
#endif
#define SDL_AUDIO_DRIVER_DSOUND 1
#define SDL_AUDIO_DRIVER_WINMM 1
#define SDL_AUDIO_DRIVER_DISK 1
#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
#define SDL_JOYSTICK_DINPUT 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 sensor driver */
#ifdef HAVE_SENSORSAPI_H
#define SDL_SENSOR_WINDOWS 1
#else
#define SDL_SENSOR_DUMMY 1
#endif
/* 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 */
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_WINDOWS 1
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1
#endif
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
#define SDL_VIDEO_RENDER_D3D11 1
#endif
#if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H)
#define SDL_VIDEO_RENDER_D3D12 1
#endif
/* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
#define SDL_VIDEO_OPENGL 1
#endif
#ifndef SDL_VIDEO_OPENGL_WGL
#define SDL_VIDEO_OPENGL_WGL 1
#endif
#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 1
#endif
#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif
#ifndef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_OPENGL_ES2 1
#endif
#ifndef SDL_VIDEO_OPENGL_EGL
#define SDL_VIDEO_OPENGL_EGL 1
#endif
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
/* Enable system power support */
#define SDL_POWER_WINDOWS 1
/* Enable filesystem support */
#define SDL_FILESYSTEM_WINDOWS 1
#endif /* SDL_config_windows_h_ */
/* vi: set ts=4 sw=4 expandtab: */
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -19,16 +19,10 @@
3. This notice may not be removed or altered from any source distribution.
*/
/* WIKI CATEGORY: CPUInfo */
/**
* # CategoryCPUInfo
* \file SDL_cpuinfo.h
*
* CPU feature detection for SDL.
*
* These functions are largely concerned with reporting if the system has
* access to various SIMD instruction sets, but also has other important info
* to share, such as number of logical CPU cores.
* CPU feature detection for SDL.
*/
#ifndef SDL_cpuinfo_h_
@@ -59,11 +53,9 @@ _m_prefetch(void *__P)
#ifndef __MMX__
#define __MMX__
#endif
/*
#ifndef __3dNOW__
#define __3dNOW__
#endif
*/
#endif
#ifndef __SSE__
#define __SSE__
@@ -115,8 +107,7 @@ _m_prefetch(void *__P)
#include <lasxintrin.h>
#define __LASX__
#endif
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) && \
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86))
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
#include <immintrin.h>
#else
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -19,10 +19,11 @@
3. This notice may not be removed or altered from any source distribution.
*/
/*
* This is a simple file to encapsulate the EGL API headers.
/**
* \file SDL_egl.h
*
* This is a simple file to encapsulate the EGL API headers.
*/
#if !defined(_MSC_VER) && !defined(__ANDROID__) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
#if defined(__vita__) || defined(__psp2__)
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,9 +20,9 @@
*/
/**
* # CategoryEndian
* \file SDL_endian.h
*
* Functions for reading and writing endian-specific values
* Functions for reading and writing endian-specific values
*/
#ifndef SDL_endian_h_
@@ -59,15 +59,6 @@ _m_prefetch(void *__P)
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#elif defined(__sun) && defined(__SVR4) /* Solaris */
#include <sys/byteorder.h>
#if defined(_LITTLE_ENDIAN)
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#elif defined(_BIG_ENDIAN)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#error Unsupported endianness
#endif
#elif defined(__OpenBSD__) || defined(__DragonFly__)
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
@@ -88,7 +79,7 @@ _m_prefetch(void *__P)
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MIPSEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
defined(__sparc__) || defined(__sparc)
defined(__sparc__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
@@ -189,16 +180,6 @@ extern __inline Uint16 SDL_Swap16(Uint16);
parm [ax] \
modify [ax];
#else
/**
* Use this function to swap the byte order of a 16-bit value.
*
* \param x the value to be swapped.
* \returns the swapped value.
*
* \sa SDL_SwapBE16
* \sa SDL_SwapLE16
*/
SDL_FORCE_INLINE Uint16
SDL_Swap16(Uint16 x)
{
@@ -250,16 +231,6 @@ extern __inline Uint32 SDL_Swap32(Uint32);
parm [eax] \
modify [eax];
#else
/**
* Use this function to swap the byte order of a 32-bit value.
*
* \param x the value to be swapped.
* \returns the swapped value.
*
* \sa SDL_SwapBE32
* \sa SDL_SwapLE32
*/
SDL_FORCE_INLINE Uint32
SDL_Swap32(Uint32 x)
{
@@ -305,16 +276,6 @@ extern __inline Uint64 SDL_Swap64(Uint64);
parm [eax edx] \
modify [eax edx];
#else
/**
* Use this function to swap the byte order of a 64-bit value.
*
* \param x the value to be swapped.
* \returns the swapped value.
*
* \sa SDL_SwapBE64
* \sa SDL_SwapLE64
*/
SDL_FORCE_INLINE Uint64
SDL_Swap64(Uint64 x)
{
@@ -332,15 +293,6 @@ SDL_Swap64(Uint64 x)
#endif
/**
* Use this function to swap the byte order of a floating point value.
*
* \param x the value to be swapped.
* \returns the swapped value.
*
* \sa SDL_SwapFloatBE
* \sa SDL_SwapFloatLE
*/
SDL_FORCE_INLINE float
SDL_SwapFloat(float x)
{
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,9 +20,9 @@
*/
/**
* # CategoryError
* \file SDL_error.h
*
* Simple error message routines for SDL.
* Simple error message routines for SDL.
*/
#ifndef SDL_error_h_
@@ -53,9 +53,9 @@ extern "C" {
* }
* ```
*
* \param fmt a printf()-style message format string.
* \param fmt a printf()-style message format string
* \param ... additional parameters matching % tokens in the `fmt` string, if
* any.
* any
* \returns always -1.
*
* \since This function is available since SDL 2.0.0.
@@ -109,8 +109,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetError(void);
* 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.
* 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.
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 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
@@ -20,9 +20,9 @@
*/
/**
* # CategoryEvents
* \file SDL_events.h
*
* Include file for SDL event handling.
* Include file for SDL event handling.
*/
#ifndef SDL_events_h_
@@ -52,7 +52,7 @@ extern "C" {
/**
* The types of events that can be delivered.
*/
typedef enum SDL_EventType
typedef enum
{
SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
@@ -131,8 +131,6 @@ typedef enum SDL_EventType
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
SDL_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3,
SDL_CONTROLLERSTEAMHANDLEUPDATED, /**< Game controller Steam handle has changed */
/* Touch events */
SDL_FINGERDOWN = 0x700,
@@ -167,7 +165,7 @@ typedef enum SDL_EventType
/* Internal events */
SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
/** Events SDL_USEREVENT through SDL_LASTEVENT are for your use,
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
* and should be allocated with SDL_RegisterEvents()
*/
SDL_USEREVENT = 0x8000,
@@ -179,7 +177,7 @@ typedef enum SDL_EventType
} SDL_EventType;
/**
* Fields shared by every event
* \brief Fields shared by every event
*/
typedef struct SDL_CommonEvent
{
@@ -188,14 +186,14 @@ typedef struct SDL_CommonEvent
} SDL_CommonEvent;
/**
* Display state change event data (event.display.*)
* \brief Display state change event data (event.display.*)
*/
typedef struct SDL_DisplayEvent
{
Uint32 type; /**< SDL_DISPLAYEVENT */
Uint32 type; /**< ::SDL_DISPLAYEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 display; /**< The associated display index */
Uint8 event; /**< SDL_DisplayEventID */
Uint8 event; /**< ::SDL_DisplayEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
@@ -203,14 +201,14 @@ typedef struct SDL_DisplayEvent
} SDL_DisplayEvent;
/**
* Window state change event data (event.window.*)
* \brief Window state change event data (event.window.*)
*/
typedef struct SDL_WindowEvent
{
Uint32 type; /**< SDL_WINDOWEVENT */
Uint32 type; /**< ::SDL_WINDOWEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The associated window */
Uint8 event; /**< SDL_WindowEventID */
Uint8 event; /**< ::SDL_WindowEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
@@ -219,14 +217,14 @@ typedef struct SDL_WindowEvent
} SDL_WindowEvent;
/**
* Keyboard button event structure (event.key.*)
* \brief Keyboard button event structure (event.key.*)
*/
typedef struct SDL_KeyboardEvent
{
Uint32 type; /**< SDL_KEYDOWN or SDL_KEYUP */
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 repeat; /**< Non-zero if this is a key repeat */
Uint8 padding2;
Uint8 padding3;
@@ -234,13 +232,12 @@ typedef struct SDL_KeyboardEvent
} SDL_KeyboardEvent;
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
/**
* Keyboard text editing event structure (event.edit.*)
* \brief Keyboard text editing event structure (event.edit.*)
*/
typedef struct SDL_TextEditingEvent
{
Uint32 type; /**< SDL_TEXTEDITING */
Uint32 type; /**< ::SDL_TEXTEDITING */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
@@ -249,12 +246,12 @@ typedef struct SDL_TextEditingEvent
} SDL_TextEditingEvent;
/**
* Extended keyboard text editing event structure (event.editExt.*) when text
* would be truncated if stored in the text buffer 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 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 */
@@ -262,43 +259,24 @@ typedef struct SDL_TextEditingExtEvent
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingExtEvent;
/**
* The maximum bytes of text that can be supplied in an SDL_TextInputEvent.
*/
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
/**
* Keyboard text input event structure (event.text.*)
*
* `text` is limited to SDL_TEXTINPUTEVENT_TEXT_SIZE bytes. If the incoming
* string is larger than this, SDL will split it and send it in pieces, across
* multiple events. The string is in UTF-8 format, and if split, SDL
* guarantees that it will not split in the middle of a UTF-8 sequence, so any
* event will only contain complete codepoints. However, if there are several
* codepoints that go together into a single glyph (like an emoji "thumbs up"
* followed by a skin color), they may be split between events.
*
* This event will never be delivered unless text input is enabled by calling
* SDL_StartTextInput(). Text input is enabled by default on desktop
* platforms, and disabled by default on mobile platforms!
*
* \sa SDL_StartTextInput
* \sa SDL_StopTextInput
* \brief Keyboard text input event structure (event.text.*)
*/
typedef struct SDL_TextInputEvent
{
Uint32 type; /**< SDL_TEXTINPUT */
Uint32 type; /**< ::SDL_TEXTINPUT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text; UTF-8 encoded. */
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
} SDL_TextInputEvent;
/**
* Mouse motion event structure (event.motion.*)
* \brief Mouse motion event structure (event.motion.*)
*/
typedef struct SDL_MouseMotionEvent
{
Uint32 type; /**< SDL_MOUSEMOTION */
Uint32 type; /**< ::SDL_MOUSEMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
@@ -310,16 +288,16 @@ typedef struct SDL_MouseMotionEvent
} SDL_MouseMotionEvent;
/**
* Mouse button event structure (event.button.*)
* \brief Mouse button event structure (event.button.*)
*/
typedef struct SDL_MouseButtonEvent
{
Uint32 type; /**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint8 button; /**< The mouse button index */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
Uint8 padding1;
Sint32 x; /**< X coordinate, relative to window */
@@ -327,11 +305,11 @@ typedef struct SDL_MouseButtonEvent
} SDL_MouseButtonEvent;
/**
* Mouse wheel event structure (event.wheel.*)
* \brief Mouse wheel event structure (event.wheel.*)
*/
typedef struct SDL_MouseWheelEvent
{
Uint32 type; /**< SDL_MOUSEWHEEL */
Uint32 type; /**< ::SDL_MOUSEWHEEL */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
@@ -345,11 +323,11 @@ typedef struct SDL_MouseWheelEvent
} SDL_MouseWheelEvent;
/**
* Joystick axis motion event structure (event.jaxis.*)
* \brief Joystick axis motion event structure (event.jaxis.*)
*/
typedef struct SDL_JoyAxisEvent
{
Uint32 type; /**< SDL_JOYAXISMOTION */
Uint32 type; /**< ::SDL_JOYAXISMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The joystick axis index */
@@ -361,11 +339,11 @@ typedef struct SDL_JoyAxisEvent
} SDL_JoyAxisEvent;
/**
* Joystick trackball motion event structure (event.jball.*)
* \brief Joystick trackball motion event structure (event.jball.*)
*/
typedef struct SDL_JoyBallEvent
{
Uint32 type; /**< SDL_JOYBALLMOTION */
Uint32 type; /**< ::SDL_JOYBALLMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 ball; /**< The joystick trackball index */
@@ -377,18 +355,18 @@ typedef struct SDL_JoyBallEvent
} SDL_JoyBallEvent;
/**
* Joystick hat position change event structure (event.jhat.*)
* \brief Joystick hat position change event structure (event.jhat.*)
*/
typedef struct SDL_JoyHatEvent
{
Uint32 type; /**< SDL_JOYHATMOTION */
Uint32 type; /**< ::SDL_JOYHATMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 hat; /**< The joystick hat index */
Uint8 value; /**< The hat position value.
* \sa SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP
* \sa SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT
* \sa SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN
* \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
* \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
* \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
*
* Note that zero means the POV is centered.
*/
@@ -397,51 +375,46 @@ typedef struct SDL_JoyHatEvent
} SDL_JoyHatEvent;
/**
* Joystick button event structure (event.jbutton.*)
* \brief Joystick button event structure (event.jbutton.*)
*/
typedef struct SDL_JoyButtonEvent
{
Uint32 type; /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The joystick button index */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 padding1;
Uint8 padding2;
} SDL_JoyButtonEvent;
/**
* Joystick device event structure (event.jdevice.*)
*
* SDL will send JOYSTICK_ADDED events for devices that are already plugged in
* during SDL_Init.
*
* \sa SDL_ControllerDeviceEvent
* \brief Joystick device event structure (event.jdevice.*)
*/
typedef struct SDL_JoyDeviceEvent
{
Uint32 type; /**< SDL_JOYDEVICEADDED or SDL_JOYDEVICEREMOVED */
Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
} SDL_JoyDeviceEvent;
/**
* Joysick battery level change event structure (event.jbattery.*)
* \brief Joysick battery level change event structure (event.jbattery.*)
*/
typedef struct SDL_JoyBatteryEvent
{
Uint32 type; /**< SDL_JOYBATTERYUPDATED */
Uint32 type; /**< ::SDL_JOYBATTERYUPDATED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
SDL_JoystickPowerLevel level; /**< The joystick battery level */
} SDL_JoyBatteryEvent;
/**
* Game controller axis motion event structure (event.caxis.*)
* \brief Game controller axis motion event structure (event.caxis.*)
*/
typedef struct SDL_ControllerAxisEvent
{
Uint32 type; /**< SDL_CONTROLLERAXISMOTION */
Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
@@ -454,42 +427,36 @@ typedef struct SDL_ControllerAxisEvent
/**
* Game controller button event structure (event.cbutton.*)
* \brief Game controller button event structure (event.cbutton.*)
*/
typedef struct SDL_ControllerButtonEvent
{
Uint32 type; /**< SDL_CONTROLLERBUTTONDOWN or SDL_CONTROLLERBUTTONUP */
Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The controller button (SDL_GameControllerButton) */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 padding1;
Uint8 padding2;
} SDL_ControllerButtonEvent;
/**
* Controller device event structure (event.cdevice.*)
*
* Joysticks that are supported game controllers receive both an
* SDL_JoyDeviceEvent and an SDL_ControllerDeviceEvent.
*
* SDL will send CONTROLLERDEVICEADDED events for joysticks that are already
* plugged in during SDL_Init() and are recognized as game controllers.
* \brief Controller device event structure (event.cdevice.*)
*/
typedef struct SDL_ControllerDeviceEvent
{
Uint32 type; /**< SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED, or SDL_CONTROLLERSTEAMHANDLEUPDATED */
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
} SDL_ControllerDeviceEvent;
/**
* Game controller touchpad event structure (event.ctouchpad.*)
* \brief Game controller touchpad event structure (event.ctouchpad.*)
*/
typedef struct SDL_ControllerTouchpadEvent
{
Uint32 type; /**< SDL_CONTROLLERTOUCHPADDOWN or SDL_CONTROLLERTOUCHPADMOTION or SDL_CONTROLLERTOUCHPADUP */
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 */
@@ -500,24 +467,24 @@ typedef struct SDL_ControllerTouchpadEvent
} SDL_ControllerTouchpadEvent;
/**
* Game controller sensor event structure (event.csensor.*)
* \brief Game controller sensor event structure (event.csensor.*)
*/
typedef struct SDL_ControllerSensorEvent
{
Uint32 type; /**< SDL_CONTROLLERSENSORUPDATE */
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 */
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 */
Uint64 timestamp_us; /**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
} SDL_ControllerSensorEvent;
/**
* Audio device event structure (event.adevice.*)
* \brief Audio device event structure (event.adevice.*)
*/
typedef struct SDL_AudioDeviceEvent
{
Uint32 type; /**< SDL_AUDIODEVICEADDED, or SDL_AUDIODEVICEREMOVED */
Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
@@ -528,11 +495,11 @@ typedef struct SDL_AudioDeviceEvent
/**
* Touch finger event structure (event.tfinger.*)
* \brief Touch finger event structure (event.tfinger.*)
*/
typedef struct SDL_TouchFingerEvent
{
Uint32 type; /**< SDL_FINGERMOTION or SDL_FINGERDOWN or SDL_FINGERUP */
Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
SDL_FingerID fingerId;
@@ -546,11 +513,11 @@ typedef struct SDL_TouchFingerEvent
/**
* Multiple Finger Gesture Event (event.mgesture.*)
* \brief Multiple Finger Gesture Event (event.mgesture.*)
*/
typedef struct SDL_MultiGestureEvent
{
Uint32 type; /**< SDL_MULTIGESTURE */
Uint32 type; /**< ::SDL_MULTIGESTURE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
float dTheta;
@@ -563,11 +530,11 @@ typedef struct SDL_MultiGestureEvent
/**
* Dollar Gesture Event (event.dgesture.*)
* \brief Dollar Gesture Event (event.dgesture.*)
*/
typedef struct SDL_DollarGestureEvent
{
Uint32 type; /**< SDL_DOLLARGESTURE or SDL_DOLLARRECORD */
Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
SDL_GestureID gestureId;
@@ -579,15 +546,13 @@ typedef struct SDL_DollarGestureEvent
/**
* An event used to request a file open by the system (event.drop.*)
*
* This event is enabled by default, you can disable it with SDL_EventState().
*
* If this event is enabled, you must free the filename in the event.
* \brief An event used to request a file open by the system (event.drop.*)
* This event is enabled by default, you can disable it with SDL_EventState().
* \note If this event is enabled, you must free the filename in the event.
*/
typedef struct SDL_DropEvent
{
Uint32 type; /**< SDL_DROPBEGIN or SDL_DROPFILE or SDL_DROPTEXT or SDL_DROPCOMPLETE */
Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
Uint32 windowID; /**< The window that was dropped on, if any */
@@ -595,11 +560,11 @@ typedef struct SDL_DropEvent
/**
* Sensor event structure (event.sensor.*)
* \brief Sensor event structure (event.sensor.*)
*/
typedef struct SDL_SensorEvent
{
Uint32 type; /**< SDL_SENSORUPDATE */
Uint32 type; /**< ::SDL_SENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The instance ID of the sensor */
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
@@ -607,20 +572,29 @@ typedef struct SDL_SensorEvent
} SDL_SensorEvent;
/**
* The "quit requested" event
* \brief The "quit requested" event
*/
typedef struct SDL_QuitEvent
{
Uint32 type; /**< SDL_QUIT */
Uint32 type; /**< ::SDL_QUIT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_QuitEvent;
/**
* A user-defined event type (event.user.*)
* \brief OS Specific event
*/
typedef struct SDL_OSEvent
{
Uint32 type; /**< ::SDL_QUIT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_OSEvent;
/**
* \brief A user-defined event type (event.user.*)
*/
typedef struct SDL_UserEvent
{
Uint32 type; /**< SDL_USEREVENT through SDL_LASTEVENT-1 */
Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The associated window if any */
Sint32 code; /**< User defined event code */
@@ -633,24 +607,20 @@ struct SDL_SysWMmsg;
typedef struct SDL_SysWMmsg SDL_SysWMmsg;
/**
* A video driver dependent system event (event.syswm.*)
* \brief A video driver dependent system event (event.syswm.*)
* This event is disabled by default, you can enable it with SDL_EventState()
*
* This event is disabled by default, you can enable it with SDL_EventState()
*
* If you want to use this event, you should include SDL_syswm.h.
* \note If you want to use this event, you should include SDL_syswm.h.
*/
typedef struct SDL_SysWMEvent
{
Uint32 type; /**< SDL_SYSWMEVENT */
Uint32 type; /**< ::SDL_SYSWMEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
} SDL_SysWMEvent;
/**
* General event structure
*
* The SDL_Event structure is the core of all event handling in SDL. SDL_Event
* is a union of all event structures used in SDL.
* \brief General event structure
*/
typedef union SDL_Event
{
@@ -733,7 +703,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
/* @{ */
typedef enum SDL_eventaction
typedef enum
{
SDL_ADDEVENT,
SDL_PEEKEVENT,
@@ -760,15 +730,15 @@ typedef enum SDL_eventaction
*
* This function is thread-safe.
*
* \param events destination buffer for the retrieved events.
* \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.
* 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.
* SDL_FIRSTEVENT is a safe choice
* \param maxType maximum value of the event type to be considered;
* SDL_LASTEVENT is a safe choice.
* 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.
*
@@ -789,7 +759,7 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
* 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.
* \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.
*
@@ -806,9 +776,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
* 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.
* SDL_EventType for details
* \param maxType the high end of event type to be queried, inclusive; see
* SDL_EventType for details.
* SDL_EventType for details
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
* present, or SDL_FALSE if not.
*
@@ -832,7 +802,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
* 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.
* \param type the type of event to be cleared; see SDL_EventType for details
*
* \since This function is available since SDL 2.0.0.
*
@@ -855,9 +825,9 @@ extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
* 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.
* SDL_EventType for details
* \param maxType the high end of event type to be cleared, inclusive; see
* SDL_EventType for details.
* SDL_EventType for details
*
* \since This function is available since SDL 2.0.0.
*
@@ -898,7 +868,7 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
* ```
*
* \param event the SDL_Event structure to be filled with the next event from
* the queue, or NULL.
* 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.
@@ -922,7 +892,7 @@ extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
* 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.
* 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.
*
@@ -945,9 +915,9 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
* 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.
* from the queue, or NULL
* \param timeout the maximum number of milliseconds to wait for the next
* available event.
* 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.
@@ -982,7 +952,7 @@ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
* 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.
* \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.
@@ -998,11 +968,11 @@ 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.
* \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
@@ -1025,7 +995,7 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
* 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
* 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.
@@ -1040,8 +1010,8 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
* 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`.
* \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.
*
@@ -1060,9 +1030,9 @@ extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter 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 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.
* 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.
@@ -1091,7 +1061,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
* through SDL_PeepEvents().
*
* \param filter an SDL_EventFilter function to call when an event happens.
* \param userdata a pointer that is passed to `filter`.
* \param userdata a pointer that is passed to `filter`
*
* \since This function is available since SDL 2.0.0.
*
@@ -1107,8 +1077,8 @@ extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
* 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().
* \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.
*
@@ -1125,8 +1095,8 @@ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
* 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`.
* \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.
*
@@ -1152,8 +1122,8 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
* 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.
* \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.
*
@@ -1175,7 +1145,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
* 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.
* \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.
*
Loaded 100 of 674 files, more files were not shown because too many files have changed in this diff. Show more