Commit graph

217 commits

Author SHA1 Message Date
sphere
55854410ac Merge branch 'line-angle' into 'next'
Add angle field to linedef_t

See merge request STJr/SRB2!1602
2022-03-22 09:09:40 +00:00
MascaraSnake
a78e4e553c Merge branch 'next' into udmf-fofs-mkii 2022-03-18 07:29:02 +01:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
MascaraSnake
a342703b50 Merge branch 'udmf-sector-fields' into udmf-full
# Conflicts:
#	src/lua_maplib.c
#	src/p_setup.c
2022-01-14 21:16:23 +01:00
MascaraSnake
13b8d1cf7e Merge branch 'udmf-more-linedef-types' into udmf-sector-fields 2022-01-14 21:09:11 +01:00
MascaraSnake
79cf2f53e8 Merge branch 'udmf-polyobjects' into udmf-lighting 2022-01-14 20:24:51 +01:00
MascaraSnake
6bb6dc88ca Merge branch 'next' into udmf-fofs-mkii
# Conflicts:
#	src/hardware/hw_main.c
#	src/lua_maplib.c
#	src/p_spec.c
#	src/p_user.c
2022-01-14 07:24:05 +01:00
MascaraSnake
b6a5ff98f0 Merge branch 'udmf-sector-fields' into udmf-full 2022-01-07 12:46:47 +01:00
MascaraSnake
577ae68d6d Make sector friction a floating-point field 2022-01-04 21:25:34 +01:00
MascaraSnake
913731b4bc Merge branch 'blentran-update' into udmf-full
# Conflicts:
#	src/lua_maplib.c
#	src/p_setup.c
#	src/p_spec.c
2022-01-02 23:19:47 +01:00
MascaraSnake
208395214a Implement sector fields for linedef executor triggering 2021-12-31 11:39:34 +01:00
MascaraSnake
b3be8d1f44 Implement sector damagetype field 2021-12-31 08:53:00 +01:00
MascaraSnake
feaa4f1273 Replace most sector specials with sector special flags 2021-12-31 00:03:24 +01:00
MascaraSnake
b3863c57be Replace verticalflip in sector_t with a sector flag that's accessible via Lua and UDMF 2021-12-30 18:50:02 +01:00
MascaraSnake
86e2fefcac Add sector gravity field for UDMF 2021-12-30 18:19:42 +01:00
MascaraSnake
e3d41e0bda Adapt linedef type 540 to UDMF 2021-12-30 15:32:28 +01:00
MascaraSnake
2fd6eafbcf Expose sector flags to Lua and UDMF 2021-12-30 14:16:00 +01:00
sphere
7601afb6c1 blentran part 3: Wall & plane blendmodes. 2021-12-05 00:48:21 +01:00
MascaraSnake
aee4996eba Merge branch 'udmf-polyobjects' into udmf-lighting 2021-12-03 19:22:37 +01:00
MascaraSnake
6dc49042de Port katsy's bouncy FOF cleanup 2021-12-03 18:48:16 +01:00
MascaraSnake
e43831bedb Expose floor/ceiling lighting to Lua 2021-09-19 09:06:39 +02:00
GoldenTails
72bf2a9897 Add angle field to linedef_t 2021-08-24 03:13:18 -05:00
MascaraSnake
23efeeed8e Merge branch 'next' into udmf-fofs-mkii 2021-06-23 19:48:26 +02:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
LJ Sonic
efdfa55328 Remove misleading comment 2021-03-12 19:54:01 +01:00
LJ Sonic
75d0e70236 Fix sector tags being signed in Lua 2021-02-25 23:41:43 +01:00
Nev3r
b642682dde 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
8dd964e3a7 Lua: taglist.add and taglist.remove for sector tag lists 2020-12-05 02:02:06 -08:00
James R
314fd2783a 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
621efbfa15 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
Zachary McAlpin
76822cef2b Expose the selectheading option from mapheader_t in Lua 2020-11-24 20:41:11 -06:00
Nev3r
70512f11ff Merge branch 'udmf-multitag' into udmf-fofs-mkii and pray
# Conflicts:
#	src/p_floor.c
#	src/p_spec.c
2020-11-13 13:23:14 +01:00
Nev3r
3d2d44bfff Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-fofs-mkii
# Conflicts:
#	src/p_user.c
2020-10-27 22:23:30 +01:00
Nev3r
c62ef355ef Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag
# Conflicts:
#	src/lua_baselib.c
#	src/lua_maplib.c
2020-10-27 20:48:25 +01:00
James R
374c19f915 Merge remote-tracking branch 'origin/next' into reverse-offsetof-macro 2020-10-15 16:15:20 -07:00
James R
bd9fda8ceb Merge branch 'lua-polyobjects' into 'next'
Lua polyobjects

Closes #19

See merge request STJr/SRB2!1140
2020-10-15 19:08:54 -04:00
James R
7f8ec74c27 Use the macro in sectorlines_num too 2020-10-10 17:40:01 -07:00
James R
8bc8946be8 Turn the lua sector lines hack into a macro 2020-10-10 16:43:09 -07:00
Monster Iestyn
5f91833701 lua_maplib.c changes now that polyobj_t is supported:
* added line.polyobj for line_t
* added subsector.polyList iteration function, for iterating polyobjs in a subsector
* added seg.polyseg for seg_t, in case we ever reenable support for segs/nodes
2020-09-09 17:31:44 +01: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
d26c7654ff Ported Lat's PlayerCmd hook to vanilla SRB2 2020-07-17 00:08:38 -05:00
Nev3r
d1db5ebf56 Merge branch 'udmf-next' into udmf-fofs-mkii 2020-07-13 09:34:32 +02:00
Nev3r
ad55f5f872 Merge branch 'udmf-next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_ceilng.c
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_mobj.h
#	src/p_polyobj.c
#	src/p_saveg.c
#	src/p_setup.c
#	src/p_spec.c
#	src/p_spec.h
#	src/p_user.c
#	src/r_bsp.c
#	src/r_defs.h
2020-07-10 18:18:07 +02: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
Monster Iestyn
7d2de8394f Merge branch 'lua-side-enum-bruh' into 'next'
Fix missing bruh string in Lua side string options.

See merge request STJr/SRB2!1017
2020-06-22 15:23:34 -04:00
Latapostrophe
80e0d35391 Fix missing bruh string in lua side options. This is stupid. 2020-06-22 21:11:33 +02:00
MascaraSnake
9dbfa28dbc Merge branch 'udmf-next' into udmf-fofs-mkii
# Conflicts:
#	extras/conf/udb/Includes/SRB222_linedefs.cfg
#	src/p_setup.c
2020-06-09 09:50:02 +02:00
toaster
d593e2e1bb Introducing Marathon Run. (I was going to call it Marathon Mode, but NiGHTS Mode being right next to it on the menu looked terrible.)
Basically a dedicated Record Attack-like experience for speedrunning the game as a continuous chunk rather than ILs. Has several quality of life features.

Benefits include:
* An unambiguous real-time bar across the bottom of the screen, always displaying the current time, ticking up until you reach the ending.
* Disable the console (pausing is still allowed, but the timer will still increment).
* Automatically skip intermissions as if you're holding down the spin button.
* Show centiseconds on HUD automatically, like record attack.
* "Live Event Backups" - a category of run fit for major events like GDQ, where recovery from crashes or chokes makes for better entertainment. Essentially a modified SP savefile, down to using the same basic functions, but has its own filename and tweaked internal layout.
* "spmarathon_start" MainCfg block parameter and "marathonnext" mapheader parameter, allowing for a customised flow (makes this fit for purpose for an eventual SUGOI port).
* Disabling inter-level custom cutscenes by default with a menu option to toggle this (won't show up if the mod doesn't *have* any custom cutscenes), although either way ending cutscenes (vanilla or custom) remain intact since is time is called before them.
* Won't show up if you have a mod that consists of only one level (determined by spmarathon_start's nextlevel; this won't trip if you manually set its marathonnext).
* Unconditional gratitude on the evaluation screen, instead of a negging "Try again..." if you didn't get all the emeralds (which you may not have been aiming for).
* Gorgeous new menu (no new assets required, unless you wanna give it a header later).

Changes which were required for the above but affect other areas of the game include:
* "useBlackRock" MainCFG block parameter, which can be used to disable the presence of the Black Rock or Egg Rock in both the Evaluation screen and the Marathon Run menu (for total conversions with different stories).
* Disabling Continues in NiGHTS mode, to match the most common singleplayer experience post 2.2.4's release (is reverted if useContinues is set to true).
* Hiding the exitmove "powerup" outside of multiplayer. (Okay, this isn't really related, I just saw this bug in action a lot while doing test runs and got annoyed enough to fix it here.)
* The ability to use V_DrawPromptBack (in hardcode only at the moment, but) to draw in terms of pixels rather than rows of text, by providing negative instead of positive inputs).
* A refactoring of redundant game saves smattered across the ending, credits, and evaluation - in addition to saving the game slightly earlier.
* Minor m_menu.c touchups and refactorings here and there.

Built using feedback from the official server's #speedruns channel, among other places.
2020-05-14 23:10:00 +01:00
MascaraSnake
02c2aeb46a Merge branch 'udmf-next' into udmf-fofs-mkii 2020-05-13 16:23:36 +02:00
MascaraSnake
d3ec12c842 Merge branch 'udmf-next' into executordelay
# Conflicts:
#	src/p_spec.c
2020-05-13 09:55:25 +02:00
MascaraSnake
6e7373a475 Merge branch 'next' into udmf-next 2020-05-04 20:32:56 +02:00
MascaraSnake
f26648e6f2 Adapt linedef executor delay to UDMF 2020-05-03 20:41:37 +02:00
MascaraSnake
700b340827 Allow map-wide gravity to be set via level header 2020-05-03 18:33:18 +02:00
MascaraSnake
4b87bee759 Add level header options for setting special stage time and spheres requirements 2020-05-03 17:56:49 +02:00
MascaraSnake
1aafc2f463 Replace "bouncy FOF" sector type with "make FOF bouncy" linedef type 2020-05-03 12:44:30 +02:00
MascaraSnake
25219b614e Implement "Make FOF quicksand" linedef type 2020-05-02 22:07:42 +02:00
MascaraSnake
1f041496c7 Store bustable FOF data directly in ffloor_t instead of referring to master line 2020-05-02 21:19:55 +02:00
Nev3r
38c665fa79 Remove old taglist access from Lua. 2020-04-17 23:31:08 +02:00
Nev3r
6c12e6701d Make the Lua interface return/set the first tags from the local taglists. 2020-04-17 22:30:16 +02:00
MascaraSnake
1580e14cbc 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
892a8dd6e7 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
Louis-Antoine
e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
Nev3r
68f60f3c29 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-03-11 09:31:31 +01:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
MascaraSnake
cedfc02f19 Implement linedef alpha field (replaces specials 900-908) 2020-01-26 12:24:52 +01:00
MascaraSnake
97c58957ee Merge branch 'next' into udmf-next 2020-01-24 22:38:26 +01:00
James R
f93ddc3f37 Merge branch 'keywords-back-again' into 'next'
Level header keywords

See merge request STJr/SRB2!656
2020-01-16 20:05:24 -05:00
MascaraSnake
b163316cbf Merge branch 'udmf-next' into stringargs 2020-01-11 16:17:53 +01:00
MascaraSnake
4745264a42 Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_slopes.c
2020-01-11 16:16:57 +01:00
James R
735289502c Call it KEYWORDS 2020-01-08 14:41:38 -08:00
James R
74364b84f9 Revert "Oh right, the keywords..."
This reverts commit a00dfcf420.
2020-01-08 14:26:47 -08:00
MascaraSnake
2d7b43c244 Implement linedef string arguments 2020-01-08 08:42:35 +01:00
MascaraSnake
031e3d93b2 Merge branch 'next' into linedef-args 2020-01-06 14:46:47 +01:00
Nev3r
a161bfa619 Merge branch 'remove-vertex-z-mk2' into udmf-vslopes
# Conflicts:
#	src/lua_maplib.c
#	src/p_setup.c
#	src/r_defs.h
2020-01-04 22:59:42 +01:00
Nev3r
9999be2d6e Remove vertex_t's z variable. 2020-01-04 18:29:02 +01:00
Nev3r
f207048ab2 Add Lua support for vertex heights. 2020-01-04 11:40:21 +01:00
MascaraSnake
68da1856da Implement linedef args (unused and untested so far) 2020-01-02 12:23:14 +01:00
MascaraSnake
cfadbb0f36 -Add linedef pointer to side_t, so sidedefs are able to tell if they're a front or back sidedef during setup
-Fix a broken condition during setup of texture fields for the change music linedef
2019-12-29 09:39:50 +01:00
James R
0780e48f86 Merge branch 'titlecard2' into 'next'
More customisable title card

See merge request STJr/SRB2!552
2019-12-24 14:47:55 -05:00
Jaime Passos
254d812901 More customisable title card
Add TitleCardZigZag, TitleCardZigZagText and TitleCardActDiamond fields to SOC.
Add the same fields to Lua under their internal names.
Turn map header level flags into an UINT16, so that NoTitleCard works. (NOBODY caught this, I'm actually disappointed.)
2019-12-18 00:28:58 -03:00
Monster Iestyn
f028bb0219 Fix numoflines calculations in sectorlines_* functions by first typecasting seclines (the sector.lines address) to size_t before doing any math on it, then (after the math) typecast the result to size_t * and dereference it.
And yes, this time I tested it to make sure it works :)
2019-12-16 17:46:27 +00:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
Monster Iestyn
75ee3193f4 Write a new hack for getting sector->linecount from sector->lines in Lua, to put my mind at rest about it at last.
1) In sector_get, actually push the memory address of the lines array within sector_t, rather than push the value of "lines" itself (essentially, we we want a pointer to a double pointer, or rather a TRIPLE pointer haha)
2) In the sectorlines_* functions, use offsetof to shift the memory address so we can obtain the value of linecount within the sector_t struct, and dereference the result to obtain the value of linecount itself
3) ??? profit

Untested and uncompiled atm, but I have some confidence this might work
2019-09-25 20:27:41 +01:00
mazmazz
46993268ae * Added FORCERESETMUSIC level header
* cv_resetmusicbyheader toggle to disable said override
* Never reset music during time attack
* Change cv_resetmusic default back to off
2019-08-04 20:02:38 -04:00
toaster
384dc0674e Revert "Revert "Merge branch 'musicplus-aug2019-b' into 'master'""
This reverts commit 603d5805f7.
2019-08-04 12:03:57 +01:00
toaster
603d5805f7 Revert "Merge branch 'musicplus-aug2019-b' into 'master'"
This reverts commit 56bfdb7113, reversing
changes made to c29cfbef9b.
2019-08-04 11:32:55 +01:00
mazmazz
cdb7250da4 Merge branch 'musicplus-feature-postboss' into musicplus-aug2019-b 2019-08-04 03:22:36 -04:00
toaster
7bff305672 * Strip the word "function" from INLEVEL error messages, since they're now shared between access and function cases.
* Move it into lua_script.h, so it's available to everything that needs it.
2019-07-30 17:57:57 +01:00
toaster
69e573517f Fix lua scripts erroring on the title screen because they're run there but it's not counted as GS_LEVEL (aka #168). 2019-07-30 17:48:13 +01:00
MascaraSnake
e9978b2955 Merge branch 'master' into thinkerlists
# Conflicts:
#	src/f_finale.c
#	src/p_enemy.c
2019-07-02 23:08:37 +02:00
Steel Titanium
a801efa946 Forgot to do this. 2019-06-23 18:51:42 -04:00
Nev3r
5401e9560f Dynamic slopes now use thinkers.
* Moved dynamic slope-related data into its own thinker.
* Vertex slopes no longer use the mapthings directly.

Signed-off-by: Nev3r <apophycens@gmail.com>
2019-04-19 14:14:43 +02:00
mazmazz
f163633591 Merge branch 'public_next' 2019-03-15 01:43:03 -04:00
mazmazz
6cf05a4613 Implement MUSICINTERFADEOUT level header 2019-03-15 01:05:52 -04:00
mazmazz
4377386153 Merge branch 'public_next' 2019-03-15 00:33:06 -04:00
mazmazz
9ec98c588f Merge branch 'public_next' 2019-03-14 22:15:34 -04:00
Monster Iestyn
f3796dc7f6 revert to LF_SAVEGAME system code, removing all traces of saveoverride
(I believe Sal wanted us to do this anyway, so...)
2019-01-08 17:14:21 +00:00
mazmazz
1e702443e3 Merge remote-tracking branch 'origin/musicplus-core' into musicplus-feature-postboss 2019-01-07 01:10:54 -05:00
Steel Titanium
827461cc36 Support for per-map intermission music 2019-01-02 05:15:23 -05:00
mazmazz
075f28b7c8 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