Commit graph

67 commits

Author SHA1 Message Date
Oni
79796b00f5 Merge branch 'sprite-brightmaps' into 'master'
Rudimentary sprite brightmap support

See merge request KartKrew/Kart!801
2023-02-02 05:49:31 +00:00
Sally Coolatta
5b147f59ed Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2023-01-06 05:31:53 -05:00
Sally Coolatta
a0adb05c9b Merge branch 'master' into acs 2022-12-31 15:04:51 -05:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06: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
James R
c90d4f8b97 Lua spriteinfo brightmap support 2022-12-05 13:34:07 -08: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
toaster
884064049e * Allocate the "MISSING" patch only once, statically, at first boot via missingpat, and prevent it from being freed.
* Rework HU_UpdatePatch to HU_UpdateOrBlankPatch with a "required" boolean.
    * If desired graphic is not present in resources:
        * If required is true, return `missingpat`.
        * If false, return NULL as before (font compatibility).
    * Add an alias with the previous function signature, so you don't need to add a million `true`s everywhere.
* Remove a ton of irrelevant graphics the game attempts to cache only because of code inherited from vanilla SRB2.
* Remove the unused hudinfo system, also inherited from vanilla SRB2.
2022-05-14 14:56:02 +01:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01: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
Latapostrophe
0657e1bb38 player.respawn wasn't pushed either?? 2021-01-31 22:24:41 +01:00
Latapostrophe
aee76fe88d expose karthud to lua. bruh. 2021-01-21 22:18:00 +01:00
Nev3r
9d99a7880e Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-tag-iterator
# Conflicts:
#	src/doomtype.h
2020-12-16 17:27:44 +01:00
James R
1c6133a39a Lua: taglist.add and taglist.remove for sector tag lists 2020-12-05 02:02:06 -08:00
James R
01e7c48630 Lua tag lists
Index and take length of tag lists like a table, 1-indexed. There are three
methods which may be used on tag lists:

list:iterate() - returns an iterator over the tags in the list
list:has(tag) - returns a boolean whether the tag is in the list
list.shares(list2) - returns whether two lists share a tag

"find" is also an alias to "has". Each method may be accessed from the global
taglist library too, e.g. taglist.iterate(list)

Tag lists may be compared with an equality operator too. This will tell you if
the two lists are composed of identical tags.

Accessible from sector.taglist, line.taglist and mapthing.taglist.
2020-12-04 13:53:27 -08:00
James R
775cb46f75 Lua taglib for accessing taggroups
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)

For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
2020-12-04 00:30:08 -08:00
Steel Titanium
acf0d768fb Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into lua-skinsprites 2020-12-03 17:29:08 -05:00
Steel Titanium
e41d1632c5 Allow access to skin.sprites[]
Only numframes so far though, as there's already a function for what spriteframe provides.
2020-11-07 23:55:37 -05:00
Louis-Antoine
bbd09eace1 Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into register-metatables 2020-10-30 14:46:04 +01:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Louis-Antoine
6f707dfbda Let Lua scripts relink tables to their metatables when unarchiving
This is done through the new "registermetatable" function,
in a somewhat similar fashion to "freeslot" but for metatables:
it must be called at script load to tell SRB2 your metatable
can be automatically relinked during the unarchiving process.
2020-10-03 16:31:04 +02:00
Monster Iestyn
d3f61027f8 Added polyobj.vertices and polyobj.lines to Lua 2020-09-09 21:15:02 +01:00
Monster Iestyn
d5030f8a02 Begin work on adding access to polyobjects in Lua:
* create new file lua_polyobjlib.c
* made a stub LUA_PolyObjLib function
* added META_POLYOBJ to lua_libs.h
* updated makefile, CMake and MSVC project files for lua_polyobjlib.c
2020-09-08 18:08:08 +01:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
MascaraSnake
3ce62d7780 Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/p_polyobj.c
2020-06-09 09:38:01 +02:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
SwitchKaze
77a501ecae Fix typo SKINCOLOT 2020-05-24 12:36:20 -05:00
SwitchKaze
afe56667b8 Update to 2.2.4 2020-05-22 16:47:51 -05:00
Nev3r
dec80cb2a7 Add mapthing arg support. 2020-04-11 12:54:34 +02:00
MascaraSnake
9b76d3af6f Merge branch 'next' into udmf-next
# Conflicts:
#	extras/conf/Includes/SRB222_linedefs.cfg
#	extras/conf/Includes/SRB222_misc.cfg
#	src/p_spec.c
2020-03-21 20:04:31 +01:00
Louis-Antoine
4e7605f0e2 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
Louis-Antoine
46df2b9551 Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
Nev3r
63fb8f846b Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-03-11 09:31:31 +01:00
SwitchKaze
99a1840101 Merge branch 'next' of https://github.com/STJr/SRB2 into next-luacolors 2020-02-23 11:50:13 -05:00
James Hale
51137837c4 Custom skincolors 2020-02-21 21:56:39 -05:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
MascaraSnake
16b515ba06 Implement linedef string arguments 2020-01-08 08:42:35 +01:00
MascaraSnake
85a94e1a58 Implement linedef args (unused and untested so far) 2020-01-02 12:23:14 +01:00
Jaime Passos
be227cc58c un-ROTSPRITE rollangle and spriteinfo 2019-12-17 13:09:25 -03:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
Jaime Passos
8684507e8a finish lua spriteinfo :] 2019-11-07 23:42:14 -03:00
Jaime Passos
2897001d7f spriteinfo lua support 2019-11-07 03:11:16 -03:00
toaster
8b045a8f15 Lua save-banks!
* Array of 8 INT32's natively embedded into savedata (net and SP)!
* Initialised to zero whenever a new save (or equivalent) is started, otherwise untouched by the base game.
* Requires reservation to avoid clobber-conflicts.
    * Access via `reserveLuabanks()` - returns a read-write userdata.
    * Assign userdata to local variable or global rawset to use later.

Mostly for future SUGOIlikes, but I'm sure someone could figure out an unrelated usage eventually.
2019-08-24 18:25:27 +01:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
TehRealSalt
a1bdfb1272 Merge remote-tracking branch 'srb2public/next' into merge-next 2018-12-03 00:31:23 -05:00
Monster Iestyn
2e12cf411d Backport the Blockmap library I made two years ago 2018-11-30 17:11:11 +00:00
TehRealSalt
4507ee18fd Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
Monster Iestyn
d824e05a6f Merge branch 'master' into next 2018-11-25 20:39:17 +00:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
7989e9a482 Merge branch 'public_next'
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/dehacked.c
#	src/g_game.h
#	src/hardware/hw_draw.c
#	src/hardware/hw_main.c
#	src/lua_baselib.c
#	src/lua_hook.h
#	src/lua_hooklib.c
#	src/lua_hudlib.c
#	src/lua_libs.h
#	src/lua_maplib.c
#	src/lua_script.c
#	src/m_misc.h
#	src/p_mobj.c
#	src/s_sound.c
#	src/sdl12/mixer_sound.c
#	src/w_wad.c
2018-11-10 15:41:57 +00:00