Commit graph

21253 commits

Author SHA1 Message Date
James R
35d36b3ba2 cmake: fix comptime.c touch
typo 5395194e
2022-12-27 22:12:59 -08:00
toaster
c992438e3c Only tether off UFO if it's not just a teeny emerald 2022-12-27 23:13:02 +00:00
toaster
c47faa37ab ONLY have Super Ring in item reel if UFO is busted 2022-12-27 23:12:04 +00:00
Sally Coolatta
ccfc35a70f Fixes for special config 2022-12-27 18:07:43 -05:00
toaster
edea4e2110 Message says return to menu instead of title screen 2022-12-27 22:56:07 +00:00
toaster
03c6eb3e30 Another bugbear: start on the Start for timeattack menu flow 2022-12-27 22:41:30 +00:00
Sally Coolatta
0543c0daa5 Copy text to stringarg[0] for ACS linedefs
Allows them to be used in Zone Builder binary maps
2022-12-27 17:37:29 -05:00
toaster
978040ca3f Two menu bugbears
- Clear console prints immediately after menu clear (fixes the prints on the black screen before loading level from menu)
- Last kart standing, not last hedgehog standing 🥹
2022-12-27 22:36:20 +00:00
toaster
04f2ac4121 "Special" time attack mode for 1P.
* Both GT_SPECIAL and GT_VERSUS.
* Access controlled by SECRET_SPECIALATTACK. (You're blue now.)

Related changes to precipitate:
* Cups that only have one map in them get selected immediately, rather than off-the-cuff.
    * Done by seperating out a new function M_LevelSelected from M_LevelSelectHandler
* Maps that only have one lap in them don't have a visible lap timestamp sticker.
* Fix a cup with *no* valid maps for the current ruleset being hypothetically selectable
2022-12-27 22:34:02 +00:00
Sally Coolatta
a252e75ba7 Add BEHAVIOR & SCRIPTS to configs 2022-12-27 17:25:54 -05:00
toaster
15587417c7 Coherency changes to special stage behaviour in anticipation of timeattack support
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
    - Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
2022-12-27 22:24:18 +00:00
Sally Coolatta
f4808aa7cf Finish adding highlights to ZB script editor 2022-12-27 17:17:30 -05:00
Sally Coolatta
4ffa63a9c8 Improve compiling, add ACS_Execute
Arbritrary ACS scripts can now be run from linedef executors. I will be implementing more, non-linedef-executor-related methods in the future.
2022-12-27 17:04:06 -05:00
toaster
03c8fd543f More fun rules for Special Stages
- GTR_ROLLINGSTART
    * Initial instathrust, as before
    * Forced MAXPLMOVE forward
    * Disable finish line beam
    * "Super transformation" sound
        - Reference to the previous entry in the series' Perfect Startboost mechanic
- GTR_SPECIALSTART
    * Instant white fade
    * No titlecard (overridden by Boss intro)
    * Starting warp sound
- Match slidein time with no traditional titlecard to the end of the playsim intro fade
- Remove G_IsSpecialStage
2022-12-27 17:58:35 +00:00
toaster
f8999bea36 Changes to tab rankings
* No longer has gametype-specific highlight
* Shows Grand Prix and Capsules instead of gametype name if relevant
* Operates on a heirarchy for important information
    * Shows grand prix round on left if in GP (resolves #360)
    * Shows capsules remaining on right if in BTC
    * Attempts to draw timelimit and pointlimit on both left and right
    * Number of laps remaining/gamespeed is least priority for left and right sides
2022-12-27 16:06:10 +00:00
toaster
1ac0c44f77 Permit using the gametype option for Command_Map_f when not playing multiplayer 2022-12-27 14:34:54 +00:00
toaster
470f82104d Rework intertype_t
- Now you select based on whether you want to rank by
    - Time always (Race, Special)
    - Score always (might be useful for custom gametypes..?)
    - Time in 1P, Score otherwise (Battle, Versus)
- No longer has gametype-specific text colours on the intermission
- Also cleans up a case where invalid music could play for winning a custom gametype without GTR_CIRCUIT *or* GTR_BUMPERS
2022-12-27 14:33:58 +00:00
Sally Coolatta
3135d14387 Replace LinedefExecute hook
- It is now called the "SpecialExecute" hook, since it can be called from ACS in addition to linedef specials.
- The input arguments are completely different now. Instead of (line_t, mobj_t, sector_t), it's (activator_t, args array, stringargs array). activator_t is userdata containing valid, mo (mobj_t), line (line_t), side (side_t), sector (sector_t), and po (polyobject_t).
2022-12-27 09:24:59 -05:00
Sally Coolatta
16a7f1dd63 Update executor 428 for ACS 2022-12-27 08:34:06 -05:00
Sally Coolatta
481cb3cfb0 Remove unnecessary ACSVM files from libs
C API and Exec are unused, and ACSVM compiles based on what folders are present.
2022-12-27 08:32:13 -05:00
Sally Coolatta
f8874f3460 Split up EV_DoElevator 2022-12-27 08:27:09 -05:00
Sally Coolatta
e8dff8f12a Update executor 435 for ACS 2022-12-27 07:43:38 -05:00
Sally Coolatta
7d177a9157 Update executors 400, 403, 405, and 429 for ACS 2022-12-27 07:43:12 -05:00
Sally Coolatta
87a0f81b61 Update polyobject executors (480-492) for ACS
- 480, 483: These originated from Hexen but were set to use line->angle in SRB2, so I reverted them to use args like Hexen again (although using straight-forward integers instead of wacky byte angles)
- 30, 31, 32 ... I edited these because I thought they were executors, oops, but I kept my changes anyway because using args directly is always more convenient than wrangling linedef angles in the map.
- The rest: Usage is completely unchanged.
2022-12-27 06:58:00 -05:00
toaster
63f75fcba1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-27 11:36:03 +00:00
toaster
d86c677ee7 Merge branch 'fix-cmake-git-cache' into 'master'
QOL fixes for CMake and Git integration

See merge request KartKrew/Kart!838
2022-12-27 11:35:28 +00:00
Sally Coolatta
e48f154bfd Update executors 402, 408, 439
These now use their first arg as a tag to copy properties from, with 0 falling back to old behavior, so that they can be more useful for ACS.
2022-12-27 06:12:31 -05: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
cff0def2a4 cmake: reconfigure if git HEAD changes 2022-12-27 00:59:29 -08:00
James R
5395194ed6 cmake: generate config.h at build time, always rebuild comptime.c 2022-12-27 00:59:28 -08:00
James R
aaecabf4d6 cmake: refactor GitUtilities.cmake
Remote branch name can now be resolved from detached HEAD.
2022-12-27 00:40:59 -08:00
Sally Coolatta
38d3267cca Save+load SRB2 vars on ACS threads 2022-12-27 00:19:53 -05:00
Sally Coolatta
8034fd326f Add save/load stream for ACS
Saves the majority of the VM state, but not the SRB2-specific vars ... that can come after food
2022-12-26 22:17:36 -05: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
38a515f8e5 Also make Grand Prix bots spectators if the gametype doesn't support them (or if the initialisation happens into a GPEVENT) 2022-12-26 23:11:33 +00:00
toaster
a3d0c197ec Fix GAMETYPERULE_LIST 2022-12-26 23:08:06 +00:00
toaster
8bb29e340c Fix a crash in K_drawBossHealthBar exposed by the new random functions 2022-12-26 23:07:32 +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
Sally Coolatta
56ae811ced Contain end & size into savebuffer_t
I would've liked to make it use a single allocate function to do this very cleanly, but these cases were very clearly not meant to be standardized and use wildly different methods to allocate & free...
2022-12-26 17:45:25 -05:00
Sal
2533ebba23 Merge branch 'testers-extras' into 'master'
Extra changes for TESTERS builds

See merge request KartKrew/Kart!835
2022-12-26 22:44:43 +00:00
toaster
d29e43f80d Remove GTR_CAMPAIGN
Controlled three things: Vintage SRB2 cutscenes, a certain type of reset on map commands, and whether to go to ceremony/evaluation/credits. All three should be controlled by grandprixinfo.gp instead, since that persists cross-gametype.
2022-12-26 22:29:31 +00:00
toaster
a8a60460fb Server startup cleanup
* Don't do a shoddy attempt at guessing initial gametype in G_DeferedInitNew
* Fix map command on main menu regression (no longer HOM void)
2022-12-26 22:16:14 +00:00
toaster
eb74ec3904 Change the rules for some things selected in the previous commit.
- Only show lap count and gamespeed on rankings if GTR_CIRCUIT
- Adjust offsets for speedometer/accessability icons with GTR_BUMPERS|GTR_SPHERES
- Only show Karma on Bumpers hud with GTR_KARMA
- Permit battle fullscreen without GTR_KARMA
- Make the Break The Capsules roulette show up with GTR_CAPSULES, not absence of GTR_CIRCUIT
- Don't push Break The Capsules roulette to the item list twice
- Make the special mode switching of int_battle happen for all instances of int_battle, not just GT_BATTLE
2022-12-26 22:06:26 +00:00
Sal
d4beb91e18 Merge branch 'remove-lua_save_p' into 'save_p-unglobal'
Let LUA_Archive / LUA_UnArchive use savebuffer_t

See merge request KartKrew/Kart!837
2022-12-26 21:10:26 +00: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
James R
842f375920 Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2022-12-25 14:11:44 -08:00
James R
ea41f91e7f g_demo.c: use savebuffer_t 2022-12-25 14:04:06 -08:00
toaster
59bc094fac We don't have *one* Single Player mode - we have as many gametypes as there are, now. 2022-12-24 22:44:40 +00:00
toaster
8431e52687 All playsim-internal distinctions between Race and Battle are now gametype rules.
New:
- GTR_POWERSTONES
    - Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
    - Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
    - A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
        - Drafting/tether has increased strength/effective distance
        - Spindashing is stronger
        - Invincibility chaining has less effect
        - Grow has a lower total duration
        - Flame shield is more uncontrollable

Extra functionality
- GTR_CAPSULES
    - Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
    - When not present, Flame Shield has perma-full meter
    - When not present, overrides gamespeed with KARTSPEED_EASY
    - Presence of Best Lap sticker in Time Attack menu
    - Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
    - Handles the switch between a gametype recording/displaying Times and Scores in a few places
    - Handles displaying "WANTED" players on the minimap

Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes

Removals
- GTR_LIVES
- GTR_SPECIALBOTS
    - Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
    - WANTED as it existed is functionally dead
2022-12-24 22:43:00 +00:00