Commit graph

20952 commits

Author SHA1 Message Date
Sally Coolatta
f20440984c Add activation flags to -writetextmap 2023-01-01 18:19:04 -05:00
Sally Coolatta
283959ac11 Delete map configs
These belong to the High Voltage Ring repo now.
2023-01-01 18:11:22 -05:00
Sally Coolatta
0d67b12c74 Merge branch 'master' into acs 2023-01-01 17:13:31 -05:00
Sally Coolatta
345e7f83b0 Copy first mapthing tag to their mobjs
Allows the ThingCount and ThingSound ACS functions to fully work now, and adds significantly more possibilities for scripting later.
2023-01-01 17:07:46 -05:00
Eidolon
d13f2c34b9 Merge branch 'cxx-foundations' into 'master'
Add SRB2_ASSERT, srb2::NotNull

See merge request KartKrew/Kart!843
2023-01-01 21:05:51 +00:00
Eidolon
2e229dcdde Merge branch 'discord-rpc-internal' into 'master'
cmake: build discord-rpc internally

See merge request KartKrew/Kart!846
2023-01-01 20:54:56 +00:00
Eidolon
19c5711092 cmake: build discord-rpc internally 2023-01-01 14:50:52 -06:00
Sal
21774564da Merge branch 'fix-c++-strcasestr' into 'master'
Fix strcasestr redefine warnings for G++

See merge request KartKrew/Kart!844
2023-01-01 19:41:14 +00:00
Sally Coolatta
a602530811 Add ACS functions that can replicate line triggers
PlayerTeam, PlayerRings, PlayerScore, CountEnemies, CountPushables, HaveUnlockableTrigger, HaveUnlockable, PlayerSkin, GetObjectDye, PlayerEmeralds, PlayerLap, LowestLap, and EncoreMode
2022-12-31 16:02:55 -05:00
Sally Coolatta
a0adb05c9b Merge branch 'master' into acs 2022-12-31 15:04:51 -05:00
Sally Coolatta
bdc77041ce Merge branch 'acs' of https://git.do.srb2.org/KartKrew/Kart into acs 2022-12-31 13:41:34 -05:00
Sally Coolatta
d5155e3d83 Add Hexen line activation flags
- Lines can be set to activate when crossing or bumping into them, with distinctions for players, enemies, and missiles+items.
- A new flag has been added to determine if a line special can activate more than once.
- Finish Line + Respawn Line are now handled like other specials. This means that:
    - They follow the new line activation rules (so you can potentially have a finish line that you have to bump instead of cross)
    - More importantly, they can be called as functions in ACS. (Player_FinishLine and Player_Respawn)
- Fixed linedef flags not being saved in save games.
2022-12-31 13:41:17 -05:00
Sally Coolatta
c27139dbcb Add Hexen line activation flags
- Lines can be set to activate when crossing or bumping into them, with distinctions for players, enemies, and missiles+items.
- A new flag has been added to determine if a line special can activate more than once.
- Finish Line + Respawn Line are now handled like other specials. This means that:
    - They follow the new line activation rules (so you can potentially have a finish line that you have to bump instead of cross)
    - More importantly, they can be called as functions in ACS. (Player_FinishLine and Player_Respawn)
- Fixed linedef flags not being saved in save games.
2022-12-31 13:38:05 -05:00
Eidolon
6af003771d Add SRB2_ASSERT, srb2::NotNull<T>
Add SRB2_ASSERT, superceding I_Assert

This assertion macro always expands to a call of srb2::do_assert, which
is overloaded with two templates: one which applies if the provided
Level is less than or equal to the SRB2_ASSERTION_LEVEL, and one which
is a no-op. When optimizations are enabled, this will verifiably remove
the evaluation of the expression in all cases, instead of evaluating the
expression and doing nothing with it.

Add srb2::NotNull wrapper utility

This is meant to be used in places where pointers are used as
parameters. It can be used with any pointer-like type, not just raw
pointers. During construction of NotNull, the pointer will be asserted
not-null in debug and paranoia builds, and in release optimizations with
no assertions, the code decays gracefully to standard pointer-passing.
2022-12-30 23:49:29 -06:00
James R
e9dc22a399 Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
2022-12-30 20:17:26 -08:00
Eidolon
fe32cba866 Merge branch 'cxx-io' into 'master'
C++ IO abstractions and std::span

See merge request KartKrew/Kart!840
2022-12-31 03:46:30 +00:00
Eidolon
97ff0dee6a Merge branch 'extern-c-everything' into 'master'
Add extern "C" in C++ to all headers

See merge request KartKrew/Kart!842
2022-12-31 03:46:17 +00:00
Eidolon
e7c379bc8d Add srb2::io streams abstraction 2022-12-30 21:15:44 -06:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
Sally Coolatta
b93ffbef2f Update UDMF config to work with latest UZB 2022-12-30 15:05:25 -05:00
Eidolon
ccb74e7371 Add tcbrindle's C++20 std::span impl (tcb::span) 2022-12-28 16:28:04 -06:00
Eidolon
41ebd7c67d cmake: configure config.h to build directory 2022-12-28 16:04:50 -06:00
Sally Coolatta
8f87c3761b Finish Script Editor tooltips 2022-12-28 16:58:16 -05:00
Sally Coolatta
7a0faf71ab Fix ACS specials not working in binary maps
Didn't copy over the text field.
2022-12-28 08:50:51 -05:00
Sally Coolatta
032e93d686 Fix Log not existing in the ACS definition 2022-12-28 08:49:37 -05:00
James R
35d36b3ba2 cmake: fix comptime.c touch
typo 5395194e
2022-12-27 22:12:59 -08:00
Sally Coolatta
ccfc35a70f Fixes for special config 2022-12-27 18:07:43 -05: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
Sally Coolatta
a252e75ba7 Add BEHAVIOR & SCRIPTS to configs 2022-12-27 17:25:54 -05: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
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
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
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
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