Commit graph

18721 commits

Author SHA1 Message Date
toaster
8ed510ca88 Precalculate as much shared minimap/automap data on level load as possible
- `P_InitMinimapInfo`
    - Writes to `p_local.h` extern struct
    - Handles everything previously distributed across multiple K_drawKartMinimapIcon calls (and most of AM_findMinMaxBoundaries)
- Reduces complexity of drawKartMinimapIcon significantly
- Last prerequisite before implementing user-placable minimap boundaries...
2025-02-18 23:48:18 +01:00
toaster
ab58883d85 minigen command: Support -m(ultiplier) parameter
Supports values between 1 and 10, with 1 being the default.
If a multiplier greater than 1 is provided, the filename will take the form "MINIMAP-%d.png", where %d is the multiplier.
2025-02-18 23:48:18 +01:00
toaster
281265f777 AM_MinimapGenerate: return NULL if malloc fails 2025-02-18 23:48:18 +01:00
toaster
5cd0f14345 Add an explicit error for attempting to generate a preliminary minimap while the automap is open. 2025-02-18 23:48:18 +01:00
toaster
073c3ed4c2 Refactor in preperation for scaling feature
Return a `minigen_t` struct with explicit width and height instead of extending the UINT8 buffer by 2 to provide that information in a very datatype-limited way.
2025-02-18 23:48:18 +01:00
toaster
8269db8f99 Rework automap/minigen colours
- All pre-existing colours are now actually what the code says they should be for the 2.2 palette
- RR-specific colour changes.
    - Remove all noclimb-specific line colours
    - Render areas that can't be stepped up/down onto as walls
    - Add colours for
        - Tripwire (cyan, but not 0xff cyan)
        - Finish Line (grey)
        - FOF info (blue)
    - Use a low-intensity colour to signal possible offroad/hazard sector or stairjank step
- Rework to support drawing in multiple passes, so that information that is strictly more important (solid walls, finish line) will not be obscured at minimap resolution by nearby lines signalling offroad/stairjank

Related:
- Added K_TerrainHasAffect
    - Returns true if terrain has any properties which would affect the player's gameplay, false if not.
2025-02-18 23:48:18 +01:00
toaster
017e62f4b2 New console command "minigen"
- Generates "MINIMAP.png" in your srb2home
- Uses inherited automap code to render to a temporary buffer
    - Because am_map.c is a mess of filescope static variables right now, this only works when the automap is disabled.
- Currently an equal alternate method to SLADE's map image export, but because we're in control, additional features can be added later...
    - TODO: Off vertically by one pixel on GHZ. Otherwise effectively identical in shape
    - TODO: the colours are rancid, I wonder if they were even updated for the 2.2 palette

Related:
- Use identical linear-time mechanisms for detecting borders of map geometry between automap and minimap
    - Automap was previously using iteration over all vertices
    - Minimap was previously pointlessly writing min/max values twice
2025-02-18 23:48:18 +01:00
NepDisk
df5e3f76c1 Add safety fallback for respawn code 2025-02-18 17:29:57 -05:00
GenericHeroGuy
a8974a5f71 or just... check longname????? 2025-02-18 22:55:41 +01:00
GenericHeroGuy
7a9bb9deea Don't find old encore/tweak lumps for long map names 2025-02-18 22:48:23 +01:00
SteelT
a314db98dd Fix double-free in W_Shutdown 2025-02-18 16:19:56 -05:00
GenericHeroGuy
bfe1a253da Palette texture hack for palremap 2025-02-18 21:56:24 +01:00
GenericHeroGuy
d3d67d1d0e W_NeedPaletteRemap refactor because I'm stupid 2025-02-18 21:56:24 +01:00
NepDisk
283f5a5fc7 Prevent weather from I_Erroring in GL as well 2025-02-18 15:48:08 -05:00
NepDisk
dd4022ee51 Prevent weather from I_Erroring 2025-02-18 15:29:13 -05:00
NepDisk
b181133810 Fix streamersafemusic Cvar 2025-02-18 14:50:02 -05:00
GenericHeroGuy
71dd3666b8 Fix the other scrollers too 2025-02-18 14:49:24 +01:00
Sally Coolatta
08c67ab0e7 Spec 500 uses the same speeds as other scrollers 2025-02-18 14:33:29 +01:00
NepDisk
dcb3570475 Merge pull request 'Add support for longmapnames' (#22) from longmapnames into ACS2
Reviewed-on: https://codeberg.org/NepDisk/blankart/pulls/22
2025-02-17 22:38:05 +00:00
NepDisk
dc9a3b4d31 Use final version of 'W_CheckNumForMapPwad' 2025-02-17 17:27:38 -05:00
GenericHeroGuy
8d3083cefe Fix some G_BuildMapName string formats
more like "flex xva" but ok
2025-02-17 21:51:31 +01:00
GenericHeroGuy
723164152f Salvage the remaining parts of 8f68a21
I'm keeping the screenshot mapname tho :^)
2025-02-17 21:51:31 +01:00
GenericHeroGuy
c93fa43f24 xva: dynamically allocated va 2025-02-17 21:51:31 +01:00
GenericHeroGuy
1c1b72bd6c Change thumbnail reference scale to 320x200
Seems more sensible than "it was more convenient at the time"
2025-02-17 21:51:31 +01:00
NepDisk
4d6bbc7b2c Allow skynum online 2025-02-13 12:51:36 -05:00
NepDisk
122b269601 Step up code shit again 2025-02-12 21:29:47 -05:00
NepDisk
c72f81f4e8 Always show the loading text 2025-02-12 11:33:16 -05:00
NepDisk
b72537d6fb Revert "Place this here"
This reverts commit 58c198a6ab.
2025-02-12 11:18:15 -05:00
NepDisk
58c198a6ab Place this here 2025-02-12 01:28:15 -05:00
NepDisk
c71f2f931f p_saveg.c: consolidate P_RelinkPointers copy-pasted code
43d090f699
2025-02-12 01:24:42 -05:00
toaster
21cea6853a 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-02-12 01:18:59 -05:00
GenericHeroGuy
e9795f5271 Expose map thumbnails and minimaps to Lua
...

LET'S FUCKING GOOOOOOOOOOOOOOOOOOOOOOOOO
2025-02-12 03:24:11 +01:00
GenericHeroGuy
5f063aa014 I'm sick of cherry-picking, just silence this warning 2025-02-12 01:56:39 +01:00
toaster
4e559aed87 Level and cup header information: Hashing for referencing by name
Foundational assistive work.
Also guarantees a consistent cup name length in memory, as some places read/wrote 15 bytes, and some places read/wrote 16 bytes. We settle on the latter (including null terminator) for the broadest backwards compatibility.

G: partial merge, missing lots of cup stuff
2025-02-12 01:50:46 +01:00
toaster
2c3fc38f27 "Monitor" parameter for cups
- Defaults to 1, AKA Sonic 1/2 monitor
- Set to 2 for Sonic 3k monitor
- Supports a range of 1-9 and A-Z
- Permits fine-grained rapid-prototype stretch goal Chaotix monitor stuff later in development
2025-02-12 01:24:47 +01:00
GenericHeroGuy
6db125c0f3 Introducing... M_GetMapThumbnail and arbitrarily scaled thumbnails
* only supports two sizes
2025-02-12 01:09:02 +01:00
GenericHeroGuy
ec5f317f28 Oops, forgot about G_LoadDemoInfo 2025-02-12 01:00:10 +01:00
LJ Sonic
edbc5660a7 Fix io.open() crashing the client sometimes 2025-02-11 17:12:44 -05:00
Gustaf Alhäll
f00bdda0bb Fix segfault when going up steep slopes in rare cases 2025-02-11 17:00:37 -05:00
sphere
76022b40bf Merge branch 'fix-slope-convex-sectors' into 'next'
Fix physics quirkiness on slopes with convex sectors

See merge request STJr/SRB2!2250
2025-02-11 16:58:57 -05:00
Lactozilla
5681f5b803 Fix a possible crash in R_RenderMaskedSegRange
R_AllocTextureColumnTables wasn't checking if the tables were never allocated, making the renderer later attempt to render midtextures for drawsegs that don't contain actual midtextures.
2025-02-11 16:48:45 -05:00
Lactozilla
6afcd88727 Interpolate polyobjects properly for the software renderer 2025-02-11 16:46:49 -05:00
NepDisk
8f040ed151 Reapply 'Implement per-texture offsets in UDMF'
This reverts commit c713de1225.
2025-02-11 16:11:03 -05:00
NepDisk
c713de1225 Revert "Implement per-texture offsets in UDMF"
This reverts commit 6808564763.
2025-02-11 15:52:37 -05:00
GenericHeroGuy
4697a69bd9 Ignore old SOC map header fields 2025-02-11 21:33:12 +01:00
NepDisk
50e5725e4a Various UDMF fixes 2025-02-11 15:32:19 -05:00
MascaraSnake
30dd68aea3 Don't require floor touch for currents in non-FOF sectors unless it's a horizontal currents in binary (because backwards compatibility) 2025-02-11 15:14:44 -05:00
GenericHeroGuy
27d51b370f Restore 'map +' command 2025-02-11 21:12:47 +01:00
GenericHeroGuy
d5418e4bdb You win this time, cv_nextmap... 2025-02-11 20:41:54 +01:00
toaster
342f6294eb Kill spstage_start and spmarathon_start 2025-02-11 17:30:03 +01:00