Commit graph

42 commits

Author SHA1 Message Date
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
toaster
d7f4cd2d8f Copyright update for Viv Grannell specifically (the author of this commit) 2024-04-02 17:38:18 +01:00
toaster
8ef64474b7 minigen: Use index 98 for finish lines per desired spec 2023-09-19 18:47:32 +01:00
Eidolon
86a9579e16 Handle gamepads from interface dynamically
Fixes numerous issues with hotswapping, gamepad assignment, and menu
responsiveness.
2023-03-07 00:07:47 -06:00
toaster
fa92c880e0 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.
2023-01-24 18:59:13 +00:00
toaster
6f14b91022 AM_DrawWalls: correct issue with the planes to grab terrain from being incorrect (copypaste error) 2023-01-24 18:48:48 +00:00
toaster
223531ffce 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...
2023-01-24 14:46:25 +00:00
toaster
d7d1fdded3 AM_MinimapGenerate: return NULL if malloc fails 2023-01-23 19:18:19 +00:00
toaster
ea7e29f279 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.
2023-01-23 19:16:45 +00:00
toaster
da639fe65f 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.
2023-01-23 18:38:52 +00:00
toaster
dafd6d5dfa 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
2023-01-23 12:33:35 +00:00
Sally Coolatta
80d9637dda devmode cheat online 2022-09-29 12:19:45 -04:00
Sally Coolatta
cd8862f0bc New input handling
Events have a player ID instead of adding billions of keys for separate gamepads. Axis movement (mouse movement, analog sticks) now are counted as keys, so axes don't need to be separately implemented for all controls. Game controls emulate a Saturn controller (some of the external functions like screenshot / gif should be readded, but I got lazy)

This will allow later us to save a config for a controller that can be reused for any player slot, which is one of the main goals for profiles.

Only just enough was made to use the new input system to make it compile. Menus in this branch should aim to move to using PlayerInputDown entirely, instead of using hardcoded keys & simply remapping to those
2021-11-26 14:56:25 -05: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