Commit graph

21271 commits

Author SHA1 Message Date
toaster
418cc29adc M_FirstPickProfile, M_StartControlPanel: Support restoremenu after first profile selection 2023-01-31 13:12:31 +00:00
toaster
3ba8ccfbfb M_SpecificMenuRestore: Only M_SetupRaceMenu in GT_RACE 2023-01-31 12:54:34 +00:00
toaster
0947ed5eec M_SpecificMenuRestore: Move all conditional sets of restoreMenu inside this function
In the case of returning from the Challenges grid, restoreMenu would not actually match the condition - preventing the relevant code from running.
2023-01-31 12:54:11 +00:00
toaster
8d6be5e662 M_StartControlPanel: Fix incorrect interaction with NULL restoreMenu and Challenges menu 2023-01-30 00:35:52 +00:00
toaster
749de36734 M_InterruptMenuWithChallenges: Fix a rendering error where an irrelevant unlockable could be highlighted during the fade-in before jumping into position 2023-01-29 23:59:53 +00:00
toaster
20e9b2f5e8 Restore menu state after playsim
- restoreMenu, M_SpecificMenuRestore
    - From any Cup Select, Level Select, or Time Attack context (including non-net replay playback), return to the relevant "core menu"
    - From any server OR server connection failure, return to the Online EGGA CHANNEL top-level menu
    - From netreplay, head to replay hut without incorrect gamestate/fade cope
    - Interruption for Challenges unlock sequence now happens on all menu returns, not just post-titlescreen
- M_StartControlPanel
    - Integrate with above
    - Handle menu re-initialisation properly under more contexts
- D_ClearState
    - Split out from D_StartTitle
    - Can be used alongside M_StartControlPanel to restore menu state from any play session in a way just as reliable as D_StartTitle was
2023-01-29 23:53:21 +00:00
toaster
154d9c5f18 Replay Hut: Remove all snapto flags so it works with the border for other aspect ratios 2023-01-29 01:10:54 +00:00
toaster
4530ccf2aa Remove Playback mini-menu shortcut indicators
These are completely incompatible with newmenus because we can't assume anyone would have these buttons unbound. If we add anything like them later, they'll be user-bindable - but the point of good menu design is to not require shortcut keys.
2023-01-29 00:36:38 +00:00
toaster
c55849006d Repair playback mini-menu
- Fix starting the playback mini-menu
- Fix playback mini-menu input not being natively horizontal
- Fix playback mini-menu having been written before r_splitscreen refactor
- Move heinous modifying-menu-data-in-the-drawer behaviour to an actual dedicated ticker
2023-01-29 00:29:46 +00:00
toaster
05301d0825 Repair demos that finish without crashing inexplicably returning to titlescreen after their completion
It's because of cv_cheats' default value in DEVELOP builds...
2023-01-28 23:18:50 +00:00
toaster
7ea596daae M_EndModeAttackRun: Update time attack menu on exit 2023-01-28 22:33:11 +00:00
toaster
c8b8eba6e6 Partial demo conclusion crash fix of invalid player/mo dereference
Still crashes, but now at an address I can't use gdb on...
2023-01-28 22:22:08 +00:00
toaster
594acca383 M_ReplayTimeAttack: Repair non-netreplay demo playback
TODO: Consistently crashes on successful replay finish
2023-01-28 22:20:43 +00:00
toaster
6b85a755eb M_PrepeareTimeAttack: Match numlap count check behaviour for presence of best lap support 2023-01-28 21:56:17 +00:00
toaster
f2a4392475 Time Attack menu: Reimplement Guest replay saving and deletion.
Implemented with less indirection/repetition than SRB2/Kart v1.
2023-01-28 21:52:34 +00:00
toaster
493b54d0f2 M_PrepareTimeAttack
Initialises Time Attack menu
- Check for replay file's existence before showing related options
    - Parity with pre-newmenus behaviour
    - Replay/guest-save functionality not yet (re)implemented
- Handles mutli-gametype timeattack level select listings more thoroughly
2023-01-28 19:09:22 +00:00
toaster
b689e0adf2 Merge branch 'scripts-first' into 'master'
Scripts.pk3 first

See merge request KartKrew/Kart!901
2023-01-27 22:48:03 +00:00
toaster
9e1a2a5201 lib_freeslot: Init dehacked state so SOC initialised later won't nuke freeslots generated here 2023-01-27 19:06:24 +00:00
toaster
ab77b88a24 d_main.c: Load scripts.pk3 before all other files, to permit object definitions to be used in weather and terrain 2023-01-27 18:52:17 +00:00
Oni
f57dd43e36 Merge branch 'minigen' into 'master'
minigen

See merge request KartKrew/Kart!900
2023-01-25 05:54:12 +00:00
Oni
271dae4643 Merge branch 'refcount-goofin' into 'master'
Additional P_SetTarget mobj_t pointer fixes on player struct

See merge request KartKrew/Kart!875
2023-01-25 01:00:42 +00:00
Oni
1ef90e92b3 Merge branch 'follower-unlock-fix' into 'master'
Follower visual unlock fix

See merge request KartKrew/Kart!899
2023-01-25 00:44:22 +00:00
Oni
d42fdd0346 Merge branch 'music-debug' into 'master'
Music debugging, devmode music

See merge request KartKrew/Kart!885
2023-01-25 00:14:42 +00:00
toaster
09e37f59b6 Merge branch 'stumble-damage' into 'master'
Stumble damagetype

See merge request KartKrew/Kart!896
2023-01-24 22:45:39 +00: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
6a723cff58 Support for user-specified minimap bounds
The totally-not-a-secret reason I made this branch.
- doomednum 770 (associated with polyobject anchors 760/761 and skybox centerpoint 780)
- Place exactly two in a map to draw an implicit rectangle.
    - Supports top-left/bottom-right AND bottom-left/top-right placements.
    - I_Errors if you place too many (or only one).
- You don't *have* to have these, this is just a bonus if you're a map like Power Plant or CDSS1 negatively affected by your skybox.
2023-01-24 17:57:56 +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
16d6837112 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.
2023-01-23 19:59:14 +00:00
toaster
d7d1fdded3 AM_MinimapGenerate: return NULL if malloc fails 2023-01-23 19:18:19 +00:00
toaster
9559dab6a2 Add an explicit error for attempting to generate a preliminary minimap while the automap is open. 2023-01-23 19:17:35 +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
toaster
a75a7039d6 HU_DrawRankings: Do not fade screen while automap is visible. 2023-01-23 11:47:34 +00:00
toaster
a602a90a8c m_cheat.c: Permit singleplayer-only cheats in offline match race 2023-01-23 11:47:00 +00:00
toaster
dd222affa2 M_DrawCharSelectCircle: Fix not checking for follower usability when iterating over valid followers in the selected category 2023-01-22 16:38:56 +00:00
toaster
f47d818698 Merge branch 'fix-window-icon' into 'master'
Fix XPM window icon not being used

See merge request KartKrew/Kart!897
2023-01-22 15:50:32 +00:00
toaster
b6be0ef6e8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into music-debug
# Conflicts:
#	src/audio/xmp.cpp
#	src/audio/xmp_player.cpp
#	src/sdl/new_sound.cpp
2023-01-22 15:20:14 +00:00
toaster
23609843e5 P_DamageMobj: Only play ringloss sound if rings are actually being lost 2023-01-22 15:03:51 +00:00
toaster
ceed74d052 Stumble damagetype
- DMG_STUMBLE in SOC, hardcode
- Has sector type
    - UDMF: damagetype = "Stumble"
    - Binary: Sector type 9, section 1
- Can be chained even when invincible, unlike Tumble
- Will never instinctively cause hitlag
2023-01-22 14:56:42 +00:00
Oni
8a771521c2 Merge branch 'spectator-look' into 'master'
Re-implement spectator vertical look

See merge request KartKrew/Kart!898
2023-01-22 03:33:37 +00:00
Oni
13563ce922 Merge branch 'acs' into 'master'
Action Code Script

See merge request KartKrew/Kart!728
2023-01-22 03:22:32 +00:00
Oni
584b714e72 Merge branch 'fix-z-movement-discard-mom' into 'master'
Let P_ZMovement use momentum changes from P_CheckPosition call

Closes #365

See merge request KartKrew/Kart!869
2023-01-22 03:15:42 +00:00
Oni
5664c8addc Merge branch 'title-profile-tweaks' into 'master'
Small fixes for profile selection and skipping title screen

See merge request KartKrew/Kart!895
2023-01-22 02:51:28 +00:00
Oni
90274359db Merge branch 'magician-spectator' into 'master'
Heavy Magician adjustment

See merge request KartKrew/Kart!876
2023-01-22 01:59:48 +00:00
SteelT
aef982c8d5 Fix XPM window icon not being used 2023-01-21 18:47:29 -05:00
toaster
e6e1d6b042 Re-implement spectator vertical look
- Hold lookback to pivot the spectator's vertical aiming angle
    - Forward/backwards item throw/trick input aims up/down
    - Overrides forwards/backwards movement while lookback is held
    - Changes the spectator text to indicate that it's in aiming mode
2023-01-21 23:46:14 +00:00
James R
dfd13b5a7a Merge branch 'fix-nosound' into 'master'
Fix -nosound command line option not disabling sound effects

Closes #405

See merge request KartKrew/Kart!883
2023-01-21 20:26:51 +00:00
James R
65eedaa9ee Merge branch 'overlay-offsets' into 'master'
MT_OVERLAY exception flags

See merge request KartKrew/Kart!878
2023-01-21 20:26:23 +00:00