Commit graph

935 commits

Author SHA1 Message Date
James R
2bd5ee9886 Add a command to crash the game in DEVELOP builds 2023-02-19 22:20:48 -08:00
James R
5b561815d7 Merge branch 'tester-rip' into 'master'
Tester build asset changes

See merge request KartKrew/Kart!930
2023-02-17 02:18:13 +00:00
toaster
61a745b4e3 Tester build asset changes
We are now using base assets for tester builds
2023-02-17 00:23:45 +00:00
James R
2e3ed95338 Add assert command to test whether assertions are enabled at runtime 2023-02-14 04:16:57 -08:00
toaster
de526a7889 D_ClearState: Prevent opportunities for double-wipes 2023-02-05 13:35:15 +00:00
toaster
c6dde48245 g_demo.c, M_EndModeAttackRun, D_ClearState - Unset demo.title in one specific place
Fixes returning from title demo to titlescreen
2023-02-04 17:13:07 +00:00
toaster
fd575deb10 D_ClearState, D_StartTItle: Fix music restarting if shared between connection screen/playsim and menu 2023-02-01 23:26:33 +00:00
toaster
87ee91638e D_ClearState, G_EndGame, G_GameEndTicker: Move netgame-specific server looping out of the general state-clearing function, for sanity's sake. 2023-01-31 14:09:21 +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
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
toaster
d2d7421072 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into acs
# Conflicts:
#	src/CMakeLists.txt
2023-01-21 15:32:13 +00:00
toaster
083d3df96f d_main.c: Adjust shaders.pk3 handling per my comments 2023-01-15 14:00:43 +00:00
Eidolon
01ddbf6dcf (WIP) hardware: add render hardware interface 2023-01-14 18:40:26 -06:00
Sally Coolatta
fdbd1a5f62 Merge branch 'master' into acs 2023-01-07 03:12:39 -05:00
Sally Coolatta
1caf255f5c Merge branch 'master' into acs 2023-01-05 22:23:51 -05:00
James R
94e3050f10 Do not overwrite compbranch in case of detached HEAD 2023-01-05 18:32:54 -08:00
James R
e1b7fd79ee Merge branch 'fix-format-truncation' 2023-01-05 18:02:50 -08:00
James R
e78625455e Resize downloaddir to fix -Wformat-truncation 2023-01-05 04:24:37 -08:00
James R
8b96612e43 Default addons menu to addons folder 2023-01-04 00:08:30 -08:00
Sally Coolatta
a0adb05c9b Merge branch 'master' into acs 2022-12-31 15:04:51 -05:00
toaster
dc7222821c Move M_Init() to fix saving of some menu-specific cvars 2022-12-31 16:05:04 +00:00
toaster
63f75fcba1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-27 11:36:03 +00:00
James R
cc30118e3b Adjust formatting of git branch in game
- Detect and highlight detached HEAD on title screen and in console
- Remove '-' between branch and commit in console
2022-12-27 01:00:57 -08:00
James R
5395194ed6 cmake: generate config.h at build time, always rebuild comptime.c 2022-12-27 00:59:28 -08:00
toaster
2b32baffbb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-26 23:31:50 +00:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
Sally Coolatta
7a5b276ece Merge branch 'save_p-unglobal' into acs 2022-12-26 18:05:15 -05:00
toaster
185b36bd27 gametype_t
- New array of pointers to structures in memory (currently mixing static for base-game and Callocated for custom)
- Centralises a metric-ton of previously seperately handled properties into one struct
    - Gametype_Names[]
    - Gametype_ConstantNames[]
    - gametypetol[]
    - timelimits[]
    - pointlimits[]
    - gametypedefaultrules[]
- Don't attempt to guess custom gametype in Replay Hut (requires more work to make custom gametypes behave across the entire experience)
- I_Error if invalid gametype set
- gametyperules is deprecated since it will never be modified seperately from gametype (temporarily a #define, don't wanna bloat this commit too much)
2022-12-26 01:07:57 +00:00
toaster
78bc4fdac9 Further changes in anticipation of potential future TESTER builds.
* Create a seperate `unlocks.pk3` so we can customise what the testers have.
* Make TESTERS(/HOSTTESTERS) builds have their own default gamedata.
2022-12-24 16:21:24 +00:00
Sally Coolatta
8eef5efa95 Fully port the ACS integration to C++ 2022-12-23 04:38:05 -05:00
Sally Coolatta
2a790d10da Merge branch 'master' into acs 2022-12-22 08:24:21 -05:00
Sally Coolatta
82df346417 Merge branch 'master' into special-stages 2022-12-22 05:18:56 -05:00
toaster
8e88a840bb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/k_menudraw.c
#	src/k_menufunc.c
2022-12-19 20:13:44 +00:00
Sally Coolatta
85604cfd2e Merge branch 'master' into special-stages 2022-12-19 01:53:41 -05:00
James R
80d1b051b4 Rename patch.pk3 to scripts.pk3 2022-12-18 01:08:15 -08:00
VelocitOni
8cd36dbf03 Merge branch 'master' into unlockables-undefeatable 2022-12-18 01:59:04 -05:00
Sally Coolatta
577f505342 Set eventmode when testing Special Stages from ZB 2022-12-15 23:16:26 -05:00
Sally Coolatta
b50fbce5ee Clear clipping rectangle before each hook call
Prevents Lua from being able to make a mess.
2022-12-11 14:14:12 -05:00
toaster
803490d7aa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/d_clisrv.h
#	src/doomstat.h
#	src/g_demo.h
#	src/m_cond.h
2022-12-10 21:54:58 +00:00
toaster
845fe12b52 Conversion to using gamedata_t
A small piece of (STJr/SRB2!1756).
Due to how RR currently handles time attack records and how it WILL handle unlocks, it's not currently feasible to split everything such that you can have two independent gamedata_t... but what's done so far is certainly more sane and less dependent on global variables
Other minor refactors:
- M_UpdateUnlockablesAndExtraEmblems and M_SilentUpdateUnlockablesAndEmblems are now one function with a boolean for loudness
- Unlock prints are currently living in the console, since the cecho stuff was a little broken
2022-11-30 13:19:21 +00:00
James R
3d500148cd Make Test Run the default map in DEVELOP builds
This makes testing easy by starting the game with -server
2022-11-29 16:54:31 -08:00
toaster
6d0637d39d Unlockable skins (in a way friendly to #define MAXSKINS 255)
Mammoth commit, sorry. I only realised halfway through writing it that SECRET_SKIN was only partially merged.

Ports from 2.2:
- Merge SECRET_SKIN (STJr/SRB2!1474)
    - Default skin is now handled by checking all skins for unlock status, and I_Erroring if none are available
    - Don't show skin names on game startup, to keep our secrets hidden
    - Unlockables now have string variables zallocated.
         - For skin names rather than numbers.
    - Correctly clean up memory when freeing unlockables and emblems.

Bespoke code:
- For temporary testing. `unlocks.pk3`
    - Using this for rapid testing gameboot SOC instead of patch.pk3 because of the intent to turn that into scripts.pk3
- Don't not save gamedata in DEVELOP builds, even if you've used cheats!
- `player->availabilities` is now an array of UINT8
    - (MAXSKINS + 7)/8 entries, or 32 bytes.
    - Included with XD_ADDPLAYER instead of XD_NAMEANDCOLOR.
         - Simplifies a lot of logic with respect to demos, skin changes mid-game, etc.
             - Seriously, there's a lot of random places in the code that just iterate over MAXSPLITSCREENPLAYERS and g_localplayers to update availabilities in real time in a way that's not particularly netsafe...
         - Lines up with the plan for handling unlocks when returning to menus.
         - Was included with XD_ADDBOT, but that actually overruns the netxcmd buffer at first mapload with 7 bots. We might need to consider expanding the size of the netxcmd buffer...
    - In demos, can be interpreted as both relative to the original replay and the current skin list depending on boolean context provided to R_SkinUsable.
    - Used for SF_IRONMAN (and will crash if all other skins are inaccessible).
- Grand Prix bot randomisation uses the host's unlocks.
- Don't show locked characters on the fancy new character select.
-  DXD_JOINDATA for demos
    - Replaces the dual-purpose behaviour of DXD_PLAYSTATE
    - Contains availabilities
    - Handles bot material in a different way
- Forceskin restrictions
    - Won't run in demos, because it's assumed recorded DXD_SKIN will handle all the conversions the original match had
    - Won't run if K_CanChangeRules says no
- Correctly set `mapvisited` on level visit, even in [fake gasp] MULTIPLAYER/NETGAMES!! 🥹
- Added updating unlockables and extra emblems on `mapvisited` update.
    - Currently fails to produce the cecho, but that'll be stripped out entirely in a future commit so I'm not bothered.
2022-11-27 22:53:29 +00:00
toaster
62bf8458c5 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into servers-16
# Conflicts:
#	src/d_main.c
2022-11-21 15:29:35 +00:00
toaster
1242e9256e Clear menus on returning to title screen 2022-11-17 16:37:09 +00:00
Sally Coolatta
5b49f8a492 Merge branch 'master' into acs 2022-11-14 11:19:42 -05:00
toaster
11209c5d24 Fix the most significant, immediately-apparent problems with Dedicated
- Don't load level twice (only became apparent thanks to new console print warnings)
- Get first map of gametype instead of defaulting to Test Run
- Don't apply profile material
2022-11-06 00:16:36 +00:00
toaster
c4fd7d74dd P_AddWadFile partial stages port from SRB2Kart 1.6
Originally written by x.organic, flattened rewrite due to massive changes between RR and SRB2Kart codebase
Notable changes:
- p_adding_file has been reworked into partadd_earliestfile to allow for final setup to use
- much like the public version required removing TEXTURE SOCs, this one required removing Flats support from ANIMDEFS
2022-11-04 16:15:53 +00:00
toaster
e486926943 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into miniladder-16
# Conflicts:
#	src/d_main.c
2022-11-04 12:03:48 +00:00
Sally Coolatta
aad784775a Merge branch 'master' into acs 2022-11-03 19:53:43 -04:00
toaster
310ecb3cb0 Missing variable 2022-11-03 22:44:55 +00:00