Commit graph

45 commits

Author SHA1 Message Date
NepDisk
39e17bce4b remove ylookup, columnofs and topleft lookups
based on 2da89f1946
move screens array to vid struct
remove a bunch of unused stuff

this speeds up 4 player splitscreen ever so slighty
mostly just alot cleaner than the mess it was before
2025-10-18 13:04:39 -04:00
NepDisk
ff467c676c port over most fixes from srb2classics clang-tidy pr
Based on 939354f483
2025-10-17 10:32:21 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
NepDisk
c1ca05c6c5 Adjust some stuff to accout for how the map header toggle works 2025-06-02 15:11:39 -04:00
NepDisk
6ee27d76de Fix up and remove some objects 2025-04-24 16:07:37 -04:00
GenericHeroGuy
f419ccee57 New input handling (port of cd8862f0)
More or less a port with gamecontrols left untouched.

Some notable differences:
* ev_joystick now has a separate data1 for each axis, rather than having you
  check which of data2/3 is INT32_MAX and which one isn't
  (pissed me off when updating menu code...)
* Gutted the 1.6 upgrade code, since we're not upgrading from anything :P
* G_GetControlForKey, a helper for menu code
* Turn smoothing code left unused as a reminder to fix it
* Various small fixes so this commit is playable and doesn't segfault

Menu changes:
* Max 4 binds, joystick axes are now bindable like any other button
* The gamepad options submenu has been replaced by its two remaining options
  after the removal of axis cvars (gamepad select and deadzone)

See cd8862f0's message for more details
2025-03-07 00:05:35 +01:00
GenericHeroGuy
39997e8c67 Fix compile again 2025-02-18 23:48:18 +01:00
toaster
c9b532ad84 minigen: Add black fragments to common objects on valid road
- Drawn underneath absolutely everything else, because it's the least specific of all the guides minigen can provide
- "Common objects" includes:
    - Rings/spheres
    - Waypoints
    - Item boxes/spots
    - Overtime kiosk
    - Rings
    - Item Capsules
- The above were chosen because they're a good distinctor between sectors that are valid to drive on and sectors that would be valid were there no impassable lines or massive height differences preventing the player from getting there.

Related:
- K_TerrainHasAffect now has a "bad only" check mode.
    - If true only report back for strong friction, any offroad, any damage, or stairjank.
2025-02-18 23:48:18 +01:00
toaster
1b163a93f9 AM_DrawWalls: correct issue with the planes to grab terrain from being incorrect (copypaste error) 2025-02-18 23:48:18 +01:00
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
281265f777 AM_MinimapGenerate: return NULL if malloc fails 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
Sally Coolatta
713ac093bf devmode cheat online 2025-01-10 11:36:04 -05:00
StarManiaKG
e4038ecfc8 Add actual multiplayer automap support 2024-08-17 23:08:49 -04:00
Louis-Antoine
6af2871fa5 Rename P_GetZAt to P_GetSlopeZAt and P_GetZAt2 to P_GetZAt 2020-05-18 15:23:56 +02:00
Louis-Antoine
29294a53cc Encapsulate plane height checks 2020-03-22 17:28:50 +01:00
Louis-Antoine
4e7605f0e2 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Jaime Passos
aa6eecb0ec "changes" not "changed" 2020-01-26 23:41:34 -03:00
Jaime Passos
9e84b10af4 Fix going big 2020-01-26 23:39:31 -03:00
Jaime Passos
cc5d8a3bf8 Fix movement to accomodate to window scale changes 2020-01-26 23:34:04 -03:00
Jaime Passos
34e5b13acf Don't stop the automap (just restart it instead.) 2020-01-26 23:12:28 -03:00
Jaime Passos
a1fbf69fdb Doesn't matter. 2020-01-26 22:57:14 -03:00
Jaime Passos
89a58888b8 Optimise pixel drawing 2020-01-26 22:52:15 -03:00
Jaime Passos
3986c28725 Move line drawer setting to AM_Drawer 2020-01-26 22:46:57 -03:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
Jaime Passos
2689fe38d9 INT32 -> boolean 2019-09-24 19:49:24 -03:00
Jaime Passos
80db38c0ce remove unused struct 2019-09-24 19:46:52 -03:00
Jaime Passos
484c673d5f better crosshair 2019-09-24 19:44:30 -03:00
Jaime Passos
54450d34e6 fix automap FRACBITS confusion 2019-09-24 19:11:52 -03:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
Jimita
c29ce1158a Update am_map.c 2018-12-12 19:59:21 -02:00
Jimita
0557123032 Update am_map.c 2018-12-12 19:57:52 -02:00
MPC
91abc8ae9c Remove MINIAUTOMAP code 2018-12-12 18:53:13 -03:00
MPC
3e70ce2565 Fix the automap 2018-12-12 18:01:52 -03:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
be13f10626 ended NDS 2017-09-29 22:48:14 +01:00
Alam Ed Arias
d1aab2e418 gcc: clear uninitialized warnings in am_map.c 2016-05-27 14:22:02 -04:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn
e34da95c4c DEVMODE's automap now supports slopes 2016-03-31 16:32:25 +01:00
Alam Ed Arias
d90536967d removed/remline ununsed code 2016-03-30 14:05:07 -04:00
Alam Ed Arias
15bd266cac SRB2 2.1.5 release 2014-03-23 12:00:29 -04:00
Alam Ed Arias
b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00