Commit graph

192 commits

Author SHA1 Message Date
James R
051b4f8935 Always use typedef name instead of struct name
mobj_t instead of struct mobj_s
2022-11-27 17:21:40 -08:00
James R
0d0310a140 typedef.h: typedef node_t
d_net.c: rename node_t to netnode_t
2022-11-27 17:21:40 -08: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
Sally Coolatta
8953cf54bb Speed Pads are now a TERRAIN effect
- Use `SpeedPad` to set the strength. Intended to be scaled like Trick Panels, so 1 for yellow, 2 for red, so on. Can use floating point.
- Use `SpeedPadAngle` to rotate the thrust direction. This is in the same system as map angles, so east is 0, north is 90, west is 180, and south is 270. Also accepts floating point.
- Speed Pad angle accounts for the flat alignment itself, as well.
- Like Sneaker and Trick Panels, the sector / line special are now deprecated.
2022-10-11 02:26:54 -04:00
Sally Coolatta
21dd68d392 Reimplement Invert Encore
Also add removal warnings for sector Sneaker Panels, Trick Panels, and fast-approaching deprecation warnings for sector Offroad.
2022-10-10 06:08:25 -04:00
Sally Coolatta
df3c077bf1 Block Monsters is a flag again 2022-10-10 01:51:42 -04:00
MascaraSnake
3b971835ee Add Lua backwards compatibility for FOF flags 2022-10-09 01:56:50 -04:00
MascaraSnake
890b4583fa Fix custom FOF flag conversion in binary maps 2022-10-09 01:27:28 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
MascaraSnake
f16c1cd95f Turn the fog wall linedef type into a blendmode 2022-10-08 19:30:40 -04:00
toaster
46441092dc Address initial review comments + associated cleanup
- Grab thumbnail and minimap pictures even for base game maps
- Repair modified game event for replacement map load
- PU_STATIC thumbnail and minimap, freed on new file load lump discovery
- Fix W_CheckNumForMap to not SIGSEGV if no match
- Reduce the number of pointless map lump hunts, we've already got it stored
- Prevent use-after-free for map pictures on voting screen
- Cache "BLANKLVL" patch once
- Draw minimap on the time attack menu

Unfortunately cups are still broken and I'm not sure where to start on that, or if it's just not having a sample wad to test with that includes cups
2022-09-16 15:01:49 +01:00
Sally Coolatta
ec02e75f0d Implement directional lighting
(Sloped ceilings are reversed and not sure what to do about it)
2022-05-25 02:51:08 -04:00
Sally Coolatta
dc890caef3 Add slope lighting
Makes slopes at a great enough steepness able to match the contrast of walls.

COMING SOON: Directional lighting & contrast modifier, as options for map header.
2022-05-24 22:23:04 -04:00
toaster
884064049e * Allocate the "MISSING" patch only once, statically, at first boot via missingpat, and prevent it from being freed.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
    * If desired graphic is not present in resources:
        * If required is true, return `missingpat`.
        * If false, return NULL as before (font compatibility).
    * Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.
2022-05-14 14:56:02 +01:00
James R
2887385122 pedantic: ignore enums signed overflow 2022-02-20 03:25:46 -08:00
James R
bea79dfa65 Replace GNU zero-length array with ISO C99 flexible array member 2022-02-20 03:10:04 -08:00
James R
0e6bb75230 Check TRIPWIRE texture at map load
So it can be animated.
2021-11-28 04:08:38 -08:00
toaster
ebe38ff518 * Add a blend field to FOFs.
* Set via a fourth digit in the upper midtexture for transparent FOFs
        * For example - #2551 is additive solid, #1282 is subtractive half...
    * The original method of setting the upper midtexture to #900 or 901 still works, since I'm not out to break existing maps.
* Software: Remove the horrible `else if` ladder for FOF translucency. Algorithms, baby!
* OpenGL: Move to using `HWR_GetBlendModeFlag` in more places, for more long-term extensible support for multiple blendmodes.
2021-04-01 23:45:21 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Sally Coolatta
4139e67ddb Renderer compile errors 2021-02-28 23:31:56 -05:00
Sally Coolatta
420a6ccccb Fix Dehacked loading 2021-02-28 22:39:47 -05: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
0292464611 Let sector flags control plane ripple effect 2021-01-12 22:16:55 -08:00
Jaime Ita Passos
be274a4fa9 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
Jaime Passos
8599447c70 Remove RF_VOXELSPRITE 2020-11-05 00:44:10 -03:00
Jaime Passos
d2c000b252 Implement an "ignore colormaps" sprite rendering flag 2020-10-27 19:54:50 -03:00
Sryder
d311242a6e Support for additive/subtractive translation maps on FOFs and Polyobjects
Polyobjects set translucency to 11 for additive, and 12 for subtractive
FOFs using the regular translucency settings set the top texture to #900 for additive, and #901 for subtractive
2020-10-22 23:13:51 +01:00
Jaime Passos
96fa912bae Implement object-defined floor sprite slopes. 2020-10-14 00:57:13 -03:00
Jaime Passos
a6f2e8b9c6 Implement relative and absolute sprite offsets for objects (mobjs)
Added RF_ABSOLUTEOFFSETS and RF_FLIPOFFSETS
2020-10-13 12:57:36 -03:00
Jaime Passos
9bb09cdc8c OpenGL support for splats, fix some shadow draw bugs in Software 2020-10-12 19:53:21 -03:00
Jaime Passos
b4b4738c94 Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Jaime Passos
e23929a899 Refactor patch rotation 2020-10-10 18:43:26 -03:00
Jaime Passos
98c6b54994 Improved memory management for patches 2020-09-07 02:23:07 -03:00
Sally Coolatta
9efdc98de6 Makes it through all kart files
All that's left is SDL, OGL, maybe also Lua
2020-08-15 04:42:56 -04:00
Sally Coolatta
9b9ab8a2d5 Get up to p_user 2020-08-14 23:23:14 -04:00
Sally Coolatta
b9436ee015 More fixing up
Got tired again, but now it makes it to f_finale
2020-08-11 18:46:00 -04:00
Sally Coolatta
27f289ea6e Fix random #endif in seg_t 2020-08-10 17:05:29 -04:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
Jaime Passos
f6a5acc6f3 Remove LUA_PATCH_SAFETY 2020-08-08 14:56:04 -03:00
Jaime Passos
a7f3dd7eff Refactor patch loading 2020-08-08 05:16:47 -03:00
SteelT
30fd6f5db5 Merge src/r_defs.h 2020-08-06 18:36:30 -04:00
Nev3r
ebe16a66d9 Merge branch 'udmf-next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_ceilng.c
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_mobj.h
#	src/p_polyobj.c
#	src/p_saveg.c
#	src/p_setup.c
#	src/p_spec.c
#	src/p_spec.h
#	src/p_user.c
#	src/r_bsp.c
#	src/r_defs.h
2020-07-10 18:18:07 +02:00
Nev3r
9210b2ba0b Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-07-10 11:47:16 +02:00
Jaime Passos
9788afa820 Remove Software tricks 2020-07-06 01:26:56 -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
Sryder
d4080e94f7 Better fake contrast.
Fake contrast for the segs are calculated at map load.
OpenGL only has the options "Standard" and "Smooth" now. Standard is default and replicates software. Smooth changes the contrast more smoothly depending on angle.
2020-05-21 16:32:34 +01:00
MascaraSnake
2e9a6afa3e Merge branch 'udmf-next' into executordelay
# Conflicts:
#	src/p_spec.c
2020-05-13 09:55:25 +02:00
Sally Coolatta
15d18640de Merge remote-tracking branch 'public/master' into merge-12 2020-05-12 03:16:14 -04:00
MascaraSnake
8c22834b46 Merge branch 'next' into udmf-next 2020-05-04 20:32:56 +02:00
MascaraSnake
5c0559a3d2 Adapt linedef executor delay to UDMF 2020-05-03 20:41:37 +02:00