Commit graph

48 commits

Author SHA1 Message Date
James R
e99951d0eb Revert "Attract: show music credit on return to title screen"
This reverts commit 7a5020470d.
2024-03-23 16:21:18 -07:00
James R
a4f2712d8a WIP - credits audio/wipe fixes, document this later 2024-03-23 16:21:03 -07:00
Eidolon
e65b6c8390 Musictest regardless of backend
No reason not to validate these in all cases
2024-03-21 19:48:02 -05:00
James R
0ce93b2d96 Add g_fast_forward_clock_stop, means to end g_fast_forward early if too much real world time is taken 2024-03-18 02:42:22 -07:00
James R
4281cd1283 Attract: fade out and timescale at end of demo
- Do not use a wipe so player can keep moving while fading
  out
- Timescale by half for a "slowdown" effect
2024-03-18 02:42:21 -07:00
James R
7abe285f84 Refactor: replace references to cv_timescale with I_GetTimeScale 2024-03-18 02:42:21 -07:00
James R
7a5020470d Attract: show music credit on return to title screen 2024-03-18 02:42:21 -07:00
James R
326e560329 Attract: fix attract demos end handling
Fixes two bugs:

- Attract mode carrying over to gameplay if an attract
  demo is allowed to finish without interrupting it
- Credits ending after the first replay ends
2024-03-18 02:42:21 -07:00
James R
161125fc83 mainwads is inclusive 2024-03-09 13:56:03 -08:00
Eidolon
161d4480e6 Force rhi to only load shaders from shaders.pk3
Loading custom shaders is dangerous and error-prone and I don't want to
implicitly allow this to occur without having good barriers in place.
2024-03-09 13:51:49 -06:00
James R
7305afa5ea D_ProcessEvents: fix old input events repeating themselves when pressing Y button in Time Attack 2024-03-08 04:52:03 -08:00
James R
26c72f4299 Replays: draw missing HUD
- Notably brings back tab display and cecho messages
2024-03-07 10:19:28 -08:00
SteelT
e97de3d6f3 Merge branch 'master' into reloadmap-fix 2024-03-06 16:03:11 -05:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
SteelT
2385913d9d Reset gamemap when returning to menus
so that g_reloadingMap isn't true when picking the same map again from match race
2024-03-05 00:28:08 -05:00
James R
3be8a72155 Update button states during wipes
- All inputs create input events that get stored in a very
  small buffer
- Normally, the game listens for some inputs and then
  immediately processes them and updates the button state
  in-game
- However, during wipes the processing step would not
  happen and it would just let the events pile up
- Because the buffer is small though, it would quickly
  fill up and lose some events
- This would lead to button states getting stuck on some
  controllers if you released a button during a wipe
  - If you spun an analog stick around, this would cause
    it to happen more frequently, because there is a new
    event for every slight change of an analog stick's
    position
2024-03-03 17:48:11 -08:00
James R
8fa01ee558 Replays: use Virtual Keyboard for title entry
- This shortens the maximum title length from 64 to 31
  characters
2024-03-03 06:30:54 -08:00
Eidolon
da48e91754 Set deferredtitle false when starting title
Oops
2024-02-27 19:51:23 -06:00
Eidolon
4cab794932 Don't reset demo.attract in D_ClearState
Fixes KartKrew/Kart#1053 allowing credits to continue after demo is
exited.
2024-02-17 17:59:20 -06:00
James R
38c9c5f9a7 devmode render: show a list of errored holey textures on the HUD
Holey textures (textures with transparent pixels) cannot
be used on upper/lower textures or on 1-sided linedefs. If
the game tries to render this, the texture name will
appear on the HUD if devmode render is turned on.
2024-02-11 17:10:09 -08:00
James R
93ff380730 Clear g_dc each frame
I was running into a memcpy of overlapping memory regions
in R_RenderMaskedSegRange.

- This is because of the reallocation of lightlists, which
  uses Z_Frame_Alloc.
- The memory pool that Z_Frame_Alloc draws from is cleared
  each frame.
- g_dc was not cleared though, so when the lightlists were
  reallocated, it'd try to copy from invalidated pointers.
- Access to invalid pointers within the memory pool does
  not cause a segfault directly (because the memory pool
  is allocated once). However, a memcpy involving such an
  invalid pointer leads to overlap, which may cause memory
  corruption.
2024-02-05 19:04:23 -08:00
Oni
4ea946067a Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables

See merge request KartKrew/Kart!1811
2024-02-03 19:40:52 +00:00
Sal
3958c15dfe New Credits 2024-01-28 23:31:30 +00:00
toaster
1d13cb64c0 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy
# Conflicts:
#	src/p_mobj.c
2024-01-13 22:08:44 +00:00
Eidolon
02e56a304e Reset all gamekeydown arrays for all devices 2024-01-11 22:04:13 -06:00
toaster
325079a39a Delete everything major flagged up by listunusedsprites
Notable deletions:
- Metal Sonic Race
    - Includes all the specialised recording/playback apparatus which made g_demo.c harder to read
- A bunch of hyperspecialised code inside several A_ actions
- EXCEPTION: intentfully left in the spriteless SMK stuff for Sal's add-on down the line.
2024-01-11 01:21:43 +00:00
Eidolon
746da46321 Read staff ghosts from pk3 directory 2024-01-02 21:05:43 -06:00
toaster
3c19c80842 Intro changes
Multi-stage swagscreens.

Also fixes some issues with using playintro under New Menu conditions
2023-11-28 00:51:34 +00:00
toaster
21f152989d Clear separation between basegame and mods
- Always force a page seperation between the last core files cup and the first modded cup
- Lost and Found sits exactly between them
    - If any cup on the last page of basegame is unlocked, place LnF on the last core page
    - Else, LnF is the first "cup" on the first Modded page
    - It's done this way so no Core material is spoiled if you haven't unlocked it yet. We want people to believe RR contains only 7 cups unless they go above and beyond

Also address Volt's bug report: Prevent the first page of cups from being overridden if everything is locked
2023-11-21 22:59:12 +00:00
toaster
a55803b690 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into other-progression 2023-11-18 18:00:05 +00:00
toaster
0762b93ef2 Tutorial skipping challenge - first pass
- Go to a MainCfg-specified map on its guessed gametype
    - `TutorialChallengeMap = RR_ZonedCity`
- Some unique settings
    - K_CanChangeRules() == false
    - If GTR_CIRCUIT, make it Hard Speed
    - If GTR_BUMPERS, die in one hit
    - If GTR_BOTS, make them all difficulty 13 of the default bot skin
    - No Medals or Spray Cans during the Tutorial Challenge
- Complete the stage in 1st place or don't bother at all
- Has the "Give up" menu option available, but no "Try Again"
- Condition for successfully completing the Tutorial Skip
    - `Condition1 = TutorialSkip`

Related bugfixes:
- Correctly wipe skipstats when returning to the Title/menus
- Typing of `ultimatemode` (hey this isn't accessible by anything right now I wonder)
2023-11-16 21:44:52 +00:00
James R
61709d36a8 Add basic profiling for Lua hooks (except HUD hooks)
- Add lua_profile cheat: calculate average time spent in
  hooks over a period
- Show hook times in a sorted table, along with lump name,
  script line number and hook type
- Show cumulative time spent in game logic hooks and
  percentage of overhead to game logic
2023-11-11 02:27:39 -08:00
Oni
a3b2dc11ec Merge branch 'frameskip-fixups' into 'master'
Measure frameskip timing before sleeping

See merge request KartKrew/Kart!1602
2023-11-05 21:00:57 +00:00
AJ Martinez
0677708216 Measure frameskip timing before sleeping 2023-11-05 04:30:45 -07:00
toaster
bd5fdb3b82 PR_INTERPHUDRANDOM
Fixes several things to do with the boss healthbar.
- Makes its randomised jitter work with interp/pause
- Constantly calling the external PRNG tanks performance, at least on Windows, so this solves that too

Done as a special non-netsynced random class so the author of this commit wouldn't have to create a third suite of duplicated Random functions.
2023-10-25 12:55:44 +01:00
Eidolon
d32823bac8 Defer title start in intro responder to ticker
Fixes KartKrew/Kart#731
2023-10-22 17:56:16 -05:00
Oni
2d83bdbc7c Merge branch 'basic-frame-skip' into 'master'
Frame skipping

See merge request KartKrew/Kart!1566
2023-10-19 06:52:40 +00:00
James R
1b19ad8890 Frame skipping
Skip up to 3 frames of rendering if the time between tics
exceeds TICRATE. If rendering is a significant source of
that slowdown, skipping some frames can speed up the game
loop and improve input responsiveness.
2023-10-18 01:40:15 -07:00
Oni
005d05ac15 Merge branch 'threaded-software' into 'master'
Threaded software

See merge request KartKrew/Kart!1553
2023-10-17 09:28:59 +00:00
AJ Martinez
f9f5c74244 New bans 2023-10-16 23:50:50 +00:00
Eidolon
9e00c6ffde Only render HWR player view if literally in opengl 2023-10-14 15:26:52 -05:00
Eidolon
28f22e3f71 Add per-frame linear memory allocator 2023-10-14 15:26:52 -05:00
James R.
7ea0e2081e Move HOM removal from R_RenderPlayerView to D_Display
This lets duplicate displayplayers[0] render correctly,
since repeating occurrences of displayplayers[0] won't
clear the screen multiple times.
2023-09-25 03:07:02 -07:00
James R.
acbe0b270c s_sound.c: consolidate music volume related functions, always use cvars internally 2023-09-22 02:00:50 -07:00
James R.
472f7d060c Kill HW3SOUND related code (in files that are actually used) 2023-09-22 02:00:42 -07:00
Eidolon
e8e72fceed Tracy instrument TryRunTics, or at least try to 2023-09-18 17:25:11 -05:00
Eidolon
b5d606a7f3 Instrument D_Display 2023-09-18 17:25:11 -05:00
Eidolon
686150875c Convert d_main.cpp 2023-09-18 17:25:10 -05:00
Renamed from src/d_main.c (Browse further)