Commit graph

151 commits

Author SHA1 Message Date
James R
7d01bd38d8 Fix return value of Lua key hooks not being used 2021-06-29 01:49:53 -07:00
James R
90763d42e1 Shuffle LUA_HookKey 2021-06-29 01:49:45 -07:00
LJ Sonic
e3a5da3f6f Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into HEAD
# Conflicts:
#	src/lua_hook.h
#	src/lua_hooklib.c
2021-06-19 20:49:12 +02:00
LJ Sonic
cfa48574be Merge branch 'next' into 'lua-inputs'
# Conflicts:
#   src/lua_script.c
2021-06-19 10:34:48 -04:00
James R
8be7c1a03d Fix double micros conv.
blame e0a307da15
2021-06-11 18:31:38 -07:00
James R
46ca9613c6 Pop hook id fetched from table 2021-06-10 18:09:39 -07:00
James R
c9417f26e5 Fix pop original table in lua net archive 2021-06-10 17:47:03 -07:00
James R
0f4eb4fab9 Merge conflicts 4d22b9f17 2021-06-07 18:13:56 -07:00
sphere
5a91f3326a Merge branch 'disable-int-emeralds' into 'next'
Some more intermission features for Lua

See merge request STJr/SRB2!1329
2021-06-01 15:38:00 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
Steel Titanium
80fe39bbd1 Fix MusicChange hook not returning some values correctly 2021-05-03 01:40:02 -04:00
GoldenTails
43c21edcbd Send IntermissionThinker and intermission hud hooks stagefailed. 2021-04-20 23:52:25 -05:00
Hannu Hanhi
3670af5a31 Fix incorrect values caused by outdated use of timing functions in perfstats 3 2021-04-16 00:38:34 +03:00
SwitchKaze
3895c02330 Revert "Remove key stuff"
This reverts commit a439e569
2021-04-02 15:46:08 -05:00
SwitchKaze
3faa98cf4a Expose inputs to Lua 2021-04-02 15:45:59 -05:00
lachablock
8162d90c94 Fix LUAh_PlayerHeight returning wrong default value 2021-03-26 18:01:55 +11:00
lachablock
6ea9653681 Add PlayerHeight and PlayerCanEnterSpinGaps Lua hooks 2021-03-25 21:41:09 +11:00
James R
4713b25837 Bit array conflicts 2020-12-16 08:44:03 -08:00
James R
5bb221b3bf Yeah Fuck You SEENAMES 2020-12-12 15:39:13 -08:00
James R
7b6675178e Merge branch 'oldguards' into 'next'
Kill remaining HAVE_BLUA and SEENAMES

See merge request STJr/SRB2!1319
2020-12-12 17:34:04 -05:00
James R
93e4f43e4b Hooklib macros names -> uppercase + documentation 2020-12-12 03:16:30 -08:00
James R
e55d842d7f Kill SEENAMES 2020-12-12 02:11:23 -08:00
James R
9ddeb5f589 Resolve GameQuit hook conflicts 2020-12-12 02:05:21 -08:00
James R
9ea969b62d Merge branch 'gamequit-argument' into 'next'
Send a `quitting` argument to the GameQuit Lua hook.

See merge request STJr/SRB2!1276
2020-12-10 15:25:52 -05:00
James R
dbd8903a53 Use ref for pushing error handler 2020-12-10 08:50:23 -08:00
James R
3f7c2ae0b0 Avoid using multiple tables to fetch hook
String hooks still use a table to fetch the id, but the id indexes a C array.

Also I fixed a missing call in the MusicChange hook.
2020-12-10 05:42:53 -08:00
James R
e0a307da15 Merge branch 'next' into hooklib-refactor 2020-12-10 03:09:24 -08:00
James R
2ab71571aa Merge branch 'high-resolution-timer-2' into next 2020-12-10 02:55:02 -08:00
James R
8d382e49fb Big Large Lua Hooklib Refactor
* Hooks are no longer a mess of lua boiler plate. Helper functions reduce hooks
  to, at the most basic level, only two calls.
* Lua tables (the array part) are used to index hooks. Such tables contain only
  hooks of the same type.
* Hook types are defined in one place so you no longer need to sync up the enum
  and name array.
2020-12-10 00:36:41 -08:00
GoldenTails
59d2646593 Send a quitting argument to the GameQuit Lua hook 2020-11-29 08:30:50 -06:00
James R
b72789b0c9 Huge perfstats refactor
I needed to update it to make it functional with the precise timer. But I also
got sick of looking at the mess of sprintf followed by draw call.
2020-11-07 01:32:59 -08:00
Steel Titanium
ac7781a3b3 Expose more music functions to Lua 2020-10-31 21:15:41 -04:00
Louis-Antoine
37c11e0f2e Fix unfortunate typos 2020-10-22 00:08:06 +02:00
Louis-Antoine
d349e9bf83 Only invoke the Lua API for mobj hooks that need it 2020-10-21 22:48:00 +02:00
Hannu Hanhi
4f20a20165 Performance stats 2020-10-10 22:12:34 +03:00
Zachary McAlpin
e5b6d19f57 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playercmd-kart-port 2020-07-30 15:37:41 -05:00
Zachary McAlpin
c42e06221d Bruh I screwed up 2020-07-17 00:33:07 -05:00
Zachary McAlpin
d26c7654ff Ported Lat's PlayerCmd hook to vanilla SRB2 2020-07-17 00:08:38 -05:00
Nev3r
ff8759e507 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next
# Conflicts:
#	src/hardware/hw_main.c
2020-06-30 20:29:48 +02:00
Zachary McAlpin
6eccc7030d I forgot to pop the error handler 2020-06-12 07:50:57 -05:00
Zachary McAlpin
0d70e16b0b Updated LUAh_GameQuit to use new error handler 2020-06-11 15:11:01 -05:00
MascaraSnake
4a0206b38d Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/p_polyobj.c
2020-06-09 09:38:01 +02:00
Zachary McAlpin
ca66c5e7ee Updated LUAh_GameQuit 2020-06-05 13:18:22 -05:00
Zachary McAlpin
7b779fa89b Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into gamequit-hook 2020-06-05 12:59:41 -05:00
Louis-Antoine
d31346822d Refactor hook library a little 2020-05-30 20:28:45 +02:00
Louis-Antoine
1bacaedde2 Show the traceback when a Lua script error happens 2020-05-30 20:24:33 +02:00
Nev3r
4128f826b7 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next
# Conflicts:
#	src/lua_hooklib.c
2020-04-12 09:57:19 +02:00
Zachary McAlpin
31b19f69a2 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into gamequit-hook 2020-04-09 20:12:11 -05:00
James R
2fda89f1c3 Merge branch 'bot-respawn-hook' into 'next'
BotRespawn hook

See merge request STJr/SRB2!804
2020-04-09 19:52:25 -04:00
James R
1edc300d0c Merge branch 'lua-hook-cleanup' into 'next'
Lua hook cleanup

See merge request STJr/SRB2!851
2020-04-09 19:40:09 -04:00