Commit graph

115 commits

Author SHA1 Message Date
Alug
5cc8998974 simplify LUA_Alloc
Z_Realloc already handles everything internally, no need to manually free anything
2026-01-24 12:20:39 -05:00
GenericHeroGuy
c91eaa5e0b Make compatmode writable, fix compatmode in nested hooks 2026-01-01 21:15:39 +01:00
GenericHeroGuy
51fbf12903 Start by clearing out a bunch of warnings 2025-12-28 02:00:47 +01:00
GenericHeroGuy
a9c66ec217 Set lua_compatmode for console commands and cvar functions
Thanks Indev for finding this oopsie and the patch for command code
2025-12-16 23:23:16 +01:00
GenericHeroGuy
bcb0eb95cc More fastcmp cleanup 2025-12-11 21:58:37 +01:00
NepDisk
6d6cb09280 Convert most strcmp/stricmp to fastcmp/fasticmp 2025-12-11 13:00:32 -05:00
GenericHeroGuy
58b4949c24 Completely retire the old skinsound system
Everything in Lua related to it is now locked behind compatmode
Also fixed SFX allocations eating into skinsounds
2025-12-01 21:42:06 +01:00
NepDisk
a8609d7204 Un-shitify function.acp1 pointers 2025-10-23 23:26:26 -04:00
Indev
c1788d07ab Fix A_Lua not removing error handler from lua stack 2025-08-15 15:01:50 -04:00
NepDisk
497fe4bcac Rename sfx->pitch to sfx->flags 2025-08-12 19:47:50 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
GenericHeroGuy
13a0378cea Turn namehash/nameofs into a struct, and linearly allocate freeslots
Also fix bugged skincolor & precipprops clear in lua_infolib
2025-05-19 18:22:00 +02:00
GenericHeroGuy
0009807746 Unify info lookup functions for SOC/Lua/ACS
Use MAX* constants instead of -1 for invalid values, because enum signedness
is implementation-defined
2025-05-18 17:37:47 +02:00
GenericHeroGuy
1793c2ea95 Use string buffers for mobjs and states 2025-05-14 15:35:26 +02:00
NepDisk
c1047bee92 Making zero indexing require compatmode 2025-04-08 09:22:52 -04:00
NepDisk
9e2c77f03f Make sfxinfo zero indexed again 2025-04-07 21:40:57 -04:00
GenericHeroGuy
48204a5ba7 Sprite frame/char compatibility 2025-02-20 00:32:31 +01:00
NepDisk
f996d869db misc fixes
Fix time limit, disable mobjscramble, fix paranoia compile, clean up refernces code, fix driftdust negative refernces
2024-12-17 23:53:51 -05:00
James R
72bd4a11a0 Lua spriteinfo brightmap support 2024-09-05 17:15:41 -04:00
NepDisk
be09e70a99 Revert "Lua spriteinfo brightmap support"
This reverts commit f7def8d787.
2024-09-02 04:48:50 -04:00
James R
f7def8d787 Lua spriteinfo brightmap support 2024-09-02 04:31:54 -04:00
NepDisk
70d900264e Revert Merge branch sprite-brightmaps into master
This reverts commit ce47997a10.
2024-08-24 15:25:46 -04:00
Oni
a87c060c4a Merge branch 'sprite-brightmaps' into 'master'
Rudimentary sprite brightmap support

See merge request KartKrew/Kart!801
2024-08-21 23:18:46 -04:00
James R
e1d642f751 Hardcode assist, part J (jartha)
- Add read-only `actionname` field to Lua states.
    - Resolves to function name definition of global Lua functions.
    - Resolves to all-uppercase name for C actions.
    - Resolves to "NULL" string if nil.
2024-08-21 16:49:29 -04:00
toaster
6d02aac210 Hardcode assist, part 1
- Add read-only `string` field to several info table metatables already available in Lua.
    - mobjinfo[i].name
    - states[i].name
    - sfxinfo[i].string
2024-08-21 16:48:52 -04:00
NepDisk
00889e7001 Revert "Merge branch 'lua-action-profile' into 'master'"
This reverts commit e1c010c8ed.
2024-08-01 03:34:53 -04:00
James R.
e1c010c8ed Merge branch 'lua-action-profile' into 'master'
lua_profile: measure lua actions

See merge request KartKrew/Kart!2219
2024-08-01 03:26:46 -04:00
James R
305f86787c Lua spriteinfo default pivot support 2024-07-31 03:12:12 -04:00
James R
1c90971c3d Refactor Lua spriteinfo
Fixes available not being set when pivot list is updated
on its own.
2024-07-31 03:11:46 -04:00
Sally Coolatta
a33c2743a1 Clear precipprops in Lua more automatically 2022-05-31 19:33:18 -04:00
Sally Coolatta
4c3f89cdf7 Allow freesloting & editing precipprops
Allows for custom weather types.

In SOC:
```Freeslot
PRECIP_GROOVY

Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```

In Lua:
```freeslot("PRECIP_GROOVY")

precipprops[PRECIP_GROOVY] = {
    type = MT_PARTICLE,
    effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```

Then in level header, simply set `Weather = PRECIP_GROOVY`.

Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
2022-05-31 09:03:06 -04:00
James R
e82bba18f6 Use volume field of sound, access with SOC/lua
Volumes may be defined on a 0-100 scale, but any number is
accepted.

If the volume is negative then the sound will play at
normal volume (therefore the info table won't need to be
modified.)
2021-11-08 18:50:19 -08:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
SwitchKaze
d992b52577 Return nil on skincolor invalid field access 2020-12-21 15:48:49 -06:00
LJ Sonic
079df8df4d Merge branch 'fix-stacktrace' of https://git.do.srb2.org/STJr/SRB2.git into next
# Conflicts:
#	src/dehacked.c
#	src/dehacked.h
2020-11-29 21:54:15 +01:00
GoldenTails
d673604b48 Split dehacked.c into multiple files. 2020-11-23 21:42:26 -06:00
Louis-Antoine
31f5cada65 Delete unneeded check 2020-11-15 01:24:12 +01:00
Louis-Antoine
ff7ca5450f Only call the Lua API for overridden actions 2020-11-15 01:15:58 +01:00
Louis-Antoine
05ae84bd09 Fix Lua stacktrace not showing in various situations 2020-11-13 19:12:25 +01:00
Louis-Antoine
2ebbbecf94 Add missing lua_pop call 2020-11-13 18:19:13 +01:00
Sally Coolatta
875493d778 Remove the need for setting rotation axis in spriteinfo for models
Now it just does it like Software
2020-10-30 02:15:49 -04:00
Jaime Passos
b44837324f Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
Zachary McAlpin
bff3b20c4a Made states unmodifable in CMD building code 2020-10-06 16:54:23 -05:00
Zachary McAlpin
36d7ddeb09 Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into playercmd-kart-port 2020-10-06 02:07:05 -05:00
kaysrishaq
87d71bf811 Update lua_infolib.c 2020-09-18 17:47:38 -04:00
SteelT
6a168ac5e9 Merge branch 'pictureformats' into 'next'
PNG conversion refactoring

See merge request STJr/SRB2!675
2020-09-10 15:58:18 -04:00
Jaime Passos
98c6b54994 Improved memory management for patches 2020-09-07 02:23:07 -03:00
Jaime Passos
7bc4af41ab Merge branch 'pictureformats' into patch-stuff-again-2 2020-08-15 20:48:28 -03:00
Jaime Passos
a7f3dd7eff Refactor patch loading 2020-08-08 05:16:47 -03:00
Zachary McAlpin
3e79966be9 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playercmd-kart-port 2020-07-25 20:06:12 -05:00