Commit graph

20943 commits

Author SHA1 Message Date
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
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
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
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
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
8bdb5bdb77 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2022-12-23 08:32:01 -05:00
Sally Coolatta
7f9ae90f88 Don't compile ACSVM's C API
No longer required
2022-12-23 05:26:12 -05:00
Sally Coolatta
8eef5efa95 Fully port the ACS integration to C++ 2022-12-23 04:38:05 -05:00
Sally Coolatta
88ffab9f3c Add ACSVM building to CMake
Currently this breaks some parts of the ACS functionality ... before I made a handful of small extensions to ACSVM's slightly-limited C API myself, and I didn't get them into the actual repo yet.

But now that we've moved to actual C++ compiling, I will likely just flat-out rewrite the SRB2 side of the code in C++ so it can use the library directly.
2022-12-22 09:44:38 -05:00
Sally Coolatta
2a790d10da Merge branch 'master' into acs 2022-12-22 08:24:21 -05:00
Oni
3101cf25cd Merge branch 'special-stages' into 'master'
Special Stages

See merge request KartKrew/Kart!778
2022-12-22 10:58:44 +00:00