Commit graph

106 commits

Author SHA1 Message Date
toaster
9411ce5387 Environment::read/writeModuleName: Convert lumpnums to a netsafe form for transit
- Introduces new functions
    - W_LumpIntoNetSave
    - W_LumpFromNetSave
- Essentially shims the upper 16 bits to account for unimportant files
2025-09-19 16:22:06 +01:00
toaster
48261ae4b5 filesearch: Add "Priority folder" string parameter
If non-NULL, filesearch will begin in that subfolder of the desired searchpath, but can go back up to the root of the search later if not found in that location.

Primarily a small optimisation for checking the addons folder first
2025-08-25 20:14:37 +01:00
toaster
4d6fe8f233 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-08-25 19:51:48 +01:00
AJ Martinez
c06fc9cccf Merge branch 'mod-info' into 'master'
MODINFO lump

See merge request kart-krew-dev/ring-racers-internal!2443
2025-07-22 05:35:21 +00:00
Eidolon
9f40034536 Remove W_VerifyFileMD5 2025-04-08 09:34:23 -05:00
Eidolon
5c85a0a578 Add md5expected array to W_InitMultipleFiles 2025-04-08 09:34:23 -05:00
Eidolon
d3c39907f7 Add md5expected to W_InitFile
Optional parameter that specifies the expected md5sum as a hex character
string.
2025-04-08 09:34:23 -05:00
Eidolon
faa0fbd31f Add W_InitShaderLookup, W_ReadShader
This manages a lump list of shader lumps from a shaders.pk3, separate
from the loaded wadlist, so that shaders do not participate in the
wadlist system at all.
2025-03-16 15:39:32 -05:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Sally Coolatta
ae59ee0ab9 MODINFO lump
Lets you set a bunch of metadata for your add-on, and a minimum required Ring Racers version (to prevent annoying tech support questions for mod authors). This version value can also be leveraged to add in backwards compatibility behaviors for older mods.

Currently the values of the metadata are printed out when a mod is loaded, and aren't used otherwise.

Fix pointers for C interface copied strings

Apparently this was luck that it worked earlier.

I love C++'s strings! And conversely, I hate C's strings.
2024-10-17 20:19:21 -04:00
toaster
9d0c9ece4b Demos: Use long lumpname when handling staff ghost information
Implements new W_CheckLongNameForNum funcs, which are broadly copypasted from W_CheckNameForNum
2024-05-01 19:55:30 +01:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
Eidolon
dde6ca0dac Remove all gcc pragma interface
GCC docs say these are not only obsolete but counter-productive for
their intended use case since GCC 2.7.2.

https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/C_002b_002b-Interface.html
2024-01-02 13:38:55 -06:00
Sal
84543da38a Implement getModuleName for ACS environment 2023-11-22 14:37:07 +00:00
James R.
42814cea2b Revert "W_InitFile: calculate md5sum on background thread, for startup wads"
This reverts commit 28f2659342.
2023-09-09 16:30:00 -07:00
James R
28f2659342 W_InitFile: calculate md5sum on background thread, for startup wads
Add W_GetFileMD5, blocks calling thread until md5 is
calculated.
2023-09-06 18:32:41 -07:00
toaster
c10bd068de Fix loading a map in a seperate file before loading a file with the relevant header 2023-01-01 23:39:28 +00:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
X.organic
b0af04eeeb Bring the maximum WAD file count up to 255
Per @TehRealSalt's recommendation.

# Conflicts:
#	src/w_wad.h
2022-11-03 14:02:17 +00:00
toaster
32ec9fd4e9 WADNAME map definition lump special case
- For .wad resources, if a map is called WADNAME:
    - Everything up to the first full stop in the file name is substituted as the long lumpname (so WADNAME in RR_GREENHILLS.beta3.wad replaces map RR_GREENHILLS)
    - Has (hacky) support for Zone Builder temporary files on Windows
    - If WADNAME is passed to `-warp` (but NOT `-map` or `+map`) go to the most recent loaded WADNAME
    - Requires everyone to customise their testing parameters to disable MSDOS 8.3 filenames
- For all resources:
    - Jart added lumpname hashes for the first 8 characters. Use these in W_CheckNumForLongNamePwad and the map equivalent
2022-10-10 16:26:20 +01:00
SteelT
ae38b7091a Fix function prototype 2022-09-12 17:37:50 -04:00
SteelT
c64f36309a Support reading PICTURE/MINIMAP/ENCORE/TWEAKMAP lumps from a map resource
This supersedes the header-based method of fetching those lumps.
2022-09-12 17:29:15 -04:00
SteelT
556aa1c4c0 Add patch support from a virtual lump 2022-09-12 12:51:31 -04:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
James R
b30ffea49a Hash name lookup for textures and lumps 2022-01-22 03:18:06 -08:00
Sally Coolatta
359cf86efb Merge branch 'master' into big-large-map-markers 2021-04-09 19:49:33 -04:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
James R
d5688f53a0 Don't print W_VerifyFile errors more than once 2020-11-28 20:51:21 -08:00
James R
64b418cb27 Added W_CheckNumForMapPwad, both functions check long lump name, ignore case 2020-10-31 18:48:14 -07:00
Jaime Passos
b44837324f Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
James R
d612fb5c99 Add wads from the -file parameter after netvars are registered
This is so netvars registered by any lua scripts will load in the correct order.
2020-10-01 16:50:31 -07:00
toaster
23faef24d7 * Introduce SPR2_XTRA for face graphics, since the current system is prone to plenty of conflicts with modders if you're not careful.
* Fixed a bug where you'd see :nick: on the current character selection screen if you didn't have many skins loaded.
* Fixed a bug where character skins loaded in PK3s would attempt to load every single lump of the PK3, even if it wasn't in the same subfolder as the original S_SKIN, as a sprite into the player struct. Could stand to be ported to vanilla.

Requires new chars.kart, which was created using the help of the indev 2.2-based Kartmaker update which will be available shortly.
2020-09-23 23:46:54 +01:00
Sally Coolatta
fd5fe916bc Get past w_wad.o 2020-08-15 03:31:23 -04:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
Jaime Passos
a7f3dd7eff Refactor patch loading 2020-08-08 05:16:47 -03:00
SteelT
6106589507 Merge src/w_wad.c/h 2020-08-06 18:52:39 -04:00
Hannu Hanhi
6961bba693 Merge remote-tracking branch 'upstream/next' into shaders-224-next-merge 2020-06-07 20:01:05 +03:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
Louis-Antoine
70d03c9c6f Restore old entry searching functions and add alternate versions for long names 2020-04-26 00:39:52 +02:00
James R
eb0ba37dce Merge remote-tracking branch 'origin/master' into HEAD 2020-04-24 22:10:59 -07:00
Louis-Antoine
90ebe18c5a Add a longname field to lumpinfo_t 2020-04-21 10:21:41 +02:00
Louis-Antoine
74e8d7f733 Rename lumpinfo_t.name2 to lumpinfo_t.fullname 2020-04-20 23:40:41 +02:00
James R
81a01041e8 Merge remote-tracking branch 'origin/master' into next 2020-04-09 17:04:04 -07:00
James R
f68a361f6e Merge branch 'pk3-directory-start' into 'next'
Don't skip the first directory entry of PK3 if it's a file

See merge request STJr/SRB2!764
2020-04-09 19:49:44 -04:00
Jaime Passos
876d4cd02b Fix OpenGL 2020-03-17 15:23:13 -03:00
fickleheart
33a9e5aa83 Merge remote-tracking branch 'upstream/master' into shaders-222
# Conflicts:
#	src/hardware/r_opengl/r_opengl.c
#	src/i_video.h
#	src/r_main.c
#	src/r_main.h
#	src/screen.c
#	src/sdl/i_video.c
#	src/sdl/ogl_sdl.c
#	src/w_wad.c
2020-03-14 12:52:15 -05:00
Latapostrophe
8ed53d1aaa don't set MAX_WADFILES to 256, worst mistake of my life 2020-03-11 12:34:35 +01:00
Latapostrophe
4fcefbc48b Bump MAX_WADFILES to 256 2020-03-11 07:20:11 +01:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00