Commit graph

251 commits

Author SHA1 Message Date
TehRealSalt e24b8b917a Merge remote-tracking branch 'refs/remotes/origin/master' into save-mode 2017-08-06 01:19:33 -04:00
Monster Iestyn 0ac63c0949 Merge branch 'lua-lump-load-only' into 'master'
Lua lump load only

This branch prevents the following Lua functions from being used within hooks or coroutines, to prevent netgame desync problems or any other similar oddities when using these weirdly:

* `freeslot()`
* `addHook()`
* `hud.add()`
* `COM_AddCommand()`
* `CV_RegisterVar()`

All of the above should only be called when the Lua script is being loaded (i.e. it takes place the same instant a ".lua" file or a WAD file with a "LUA_" lump is being loaded)

To put it another way:
```
//This is valid usage:
freeslot("MT_TEST")

//This is NOT valid usage
addHook("MobjSpawn", function() freeslot("MT_TEST2") end, MT_PLAYER)

```

See *Monster Iestyn/Lua lump load only* on the FTP for an exe and test script.

See merge request !87
2017-08-05 16:36:05 -04:00
Monster Iestyn 102d30fe8d Merge branch 'nights_emblems' into 'master'
NiGHTS Paraloop-special emblems

Implemented the two NiGHTS Emblem types in the TUDD via var modifications to ET_GLOBAL!
* GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem
* GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem
* Combined means that you essentially have to loop it twice.

Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM).

Check out root/!LatestSRB2Files/srb2win_branch_nightsemblems.exe with the latest patch.dta, along with root/toaster/nightstest.soc for a sample in GFZS.

See merge request !94
2017-08-05 16:03:33 -04:00
TehRealSalt 0b05b10bdb Merge remote-tracking branch 'refs/remotes/origin/master' into save-mode 2017-07-30 11:13:52 -04:00
Monster Iestyn 3948ab6da5 Merge branch 'master' into lua-lump-load-only 2017-07-25 17:18:07 +01:00
toasterbabe ef4dc42c7c * Bustable wallspikes.
* Improve the code for busting vertical spikes.
* Improve the frame arrangement for vertical spikes' spriteset. (Requires new patch.dta)
* Make all spikes consistently do damage with DMG_SPIKE.
* (unrelated) renamed "flame stomp" to "elemental stomp" in P_HitDeathMessages
2017-07-19 16:26:49 +01:00
Monster Iestyn dbc7a4099f Hardcoded SOC_TOKE from patch.dta
Or rather, I killed anything to do with the old background orb, renamed all "EMMY" stuff to "TOKEN", and of course adjusted the new S_TOKEN accordingly
2017-07-15 20:15:34 +01:00
Monster Iestyn aa947ea022 Starting work for hardcoding wall spikes 2017-07-13 22:42:08 +01:00
Monster Iestyn 96ec319897 Hardcoded SOC_TREE from patch.dta
Also made sure the GFZ trees have MF2_STANDONME
2017-07-13 17:29:15 +01:00
Monster Iestyn 0dd15ed8a4 Merge branch 'master' into lua-lump-load-only 2017-07-09 15:06:15 +01:00
Monster Iestyn f44d769d39 dehacked.c cleanup
*removed Texture/Patch SOC implementations, since they weren't used in the end
*removed remnants of AnimTex and some Spritename thing
*none of the save* arrays in DEH_LoadDehackedFile were being used, so I removed all related code disabled or otherwise
*DEH_LoadDehackedFile doesn't need a "wad" param anymore since only the Patch block was using it
2017-06-24 20:33:56 +01:00
Monster Iestyn 8d483cdc47 Fix whitespace on that one line toaster pointed out 2017-05-13 20:51:10 +01:00
Monster Iestyn e45e740a65 Merge branch 'master' into lua-lump-load-only 2017-05-13 20:40:38 +01:00
toasterbabe 61fcbe9b36 Implemented the two NiGHTS Emblem types in the TUDD via var modifications to ET_GLOBAL!
* GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem
* GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem

Combined means that you essentially have to loop it twice.

Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM).
2017-05-09 16:20:26 +01:00
toasterbabe 73f1550242 There are now captions for specific types of music! (Currently signified with an M, but I'll change that in a bit...) A whole lotta things needed to be modified for this, though.
* Serious refactor of - and internal exposure of - what has become S_StartCaption().
* Renaming of a few existing captions.
* The prevention of access to - or writing over - sfx_None's stuff in SOC or Lua.
* The new Lua wrapper function S_StartMusicCaption(string, tics, optional player), which essentially allows custom music captions to be created. (This is best used for stuff like final lap music in SRB2 Kart or bonus time in a thokker-like game, not a comprehensive Now Playing expy. That'd be a different kettle of fish.)

Also, updated all the lock-on stuff to use P_IsLocalPlayer instead of rolling my own.
2017-04-29 16:27:52 +01:00
Monster Iestyn 1462c638cb Added the "lua_lumploading" variable for restricting certain Lua functions to lump load time only 2017-04-25 21:45:53 +01:00
toasterbabe bcf0df7cb6 Ended up being stressed and not getting any real work done, so figured I'd finish up the checklist system. 2017-04-23 00:16:09 +01:00
toasterbabe bef9520556 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into Deez_NewUserXperiences 2017-04-19 23:03:47 +01:00
Monster Iestyn 0f2c9c40a2 Hardcoded the big gargoyle 2017-04-18 20:38:13 +01:00
Monster Iestyn 941ab72204 Hardcode new/updated xmas scenery object type/state info 2017-04-18 18:32:52 +01:00
Monster Iestyn 0e358b3d9f Add new Pity shield orb state info, remove unused Pity states 2017-04-18 17:36:04 +01:00
toasterbabe 3e29ee3f01 Closed captioning!
* Provides a helpful description for the hearing impaired, whether permanent, temporary or situational.
* Consvar "closedcaptioning", with on/off values available.
* Only works if sounds are on. This is frustrating. I will see what I can do to allow it to work with sounds off in future, but for now it's dependent in order to properly accept or decline sounds.
* Thanks to MI for making that wiki page a lot more comprehensive a few days ago.

* Weapon ring is now a seperate sfx_wepfir instead of doubling up on sfx_thok.

* Also, made V_StringWidth work with V_NOSCALESTART.
2017-04-17 01:09:47 +01:00
toasterbabe 3efa66d537 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3
# Conflicts:
#	src/m_menu.c
2017-04-04 21:03:35 +01:00
Rob 8fdbc5669c Merge branch 'level_select' into 'master'
Revamped Level Select (platter view)

Seriously revamped every level select instance in the game to use a more attractive and easier to navigate platter view, including:

* Game CLEAR! save (Title/Pause menus)
* Secrets Menu (including custom ones)
* Record Attack/NiGHTS Mode
* Server creation (Online/2P)
* MP Pause level select (Online/2P)

As a result, the layout of the last three above menus has been changed to varying degrees of difference.

Also, bonus feature: using level select (or MAP MAPxx without -force) in Co-op multiplayer won't reset your score, will keep any lives you have above the startinglives variable, and will not take away all your emeralds. The -force thing prevents both warping directly to special stages to rack up the emeralds AND ensures there IS a way to start a new game.

Check out <root>/!LatestSRB2Files/srb2win_branch_levelselect.exe with the latest patch.dta to see more.

Also, LF2_WIDEICON lets you do this. https://gfycat.com/MenacingClearAngora

See merge request !68
2017-04-04 12:23:18 -04:00
toasterbabe 76b56a0285 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3
# Conflicts:
#	src/p_user.c
2017-04-04 16:55:20 +01:00
TehRealSalt a84eed162d Save mode
Lets modders set how the game should be saved. Likely useless for
vanilla, but helpful for other mods. This was spawned out of selfishness
for SUGOI to make it only save at the hub, but mods like Boss Mayhem,
which has a hidden map and an act 3 (without any other acts) in the
normal SP campaign, and other mods where the default is detrimental
would benefit as well.

0 for default, 1 for always, 2 for never (no constants because bonustype
doesn't have them either). Won't save if the game is modified, if using
a no-save slot, if playing ultimate mode, or if in a special stage, even
if savemode is set to always.
2017-03-29 18:25:09 -04:00
toasterbabe 5065fa302a Mutiability flag-ised as requested by Rob. 2017-03-27 15:03:21 +01:00
toasterbabe fa29f7deca A bunch of stuff again.
* Lock on targets bob now, and are used for CA_HOMINGTHOK and SH_ATTRACT as well.
* Flag stuff is now animated like it was designed to be but which was kinda messed up.
* Cork sounds.
* P_SpawnLockOn(player_t player, mobj_t lockon, statenum_t state) for Lua.
* Added homing/firing CA2_GUNSLINGER stuff at egg guard shields.
* Fixed homing stuff wrt egg guard shields and sea egg balloons.
* Fixed attract orb goin' gold when doing a CA_HOMINGTHOK homing ability.
* Fixed positioning of player during homing attack.
* Cleaned up lockon spawn code.
2017-03-23 19:11:22 +00:00
toasterbabe ddf8db12af Big commit, sorry. I broke several things trying to get other things to work and it's only now that all the code that worked yesterday works today!
*P_LookForEnemies is now side-effect-less and only provides a pointer to the found mobj
*player-jumping is dead, long live PF_STARTJUMP
*per Mystic's request, CA2_GUNSLINGER has a targeting icon. It also has a more restricted vertical aiming range.
*mobj for this is in the game as requested
*fast teetering animation flag
*general code cleanup
2017-03-22 18:51:30 +00:00
TehRealSalt 92e785a9f2 Map emblem type flags
As per toaster's request
2017-03-22 14:45:26 -04:00
TehRealSalt b418ac0acb Level completion emblems
Simple port of something I made for a 2.1 exe mod that Mystic mentioned
needed doing on the 2.2 Priorities topic
(http://mb.srb2.org/showpost.php?p=790613&postcount=4). Adds emblem type
"map", which gives you an emblem upon beating the map it's for. Var sets
more specific conditions; 1 for all emeralds completion, 2 for Ultimate
mode completion, 3 for Perfect Bonus completion. (These can be easily
removed if requested; these were added simply because it was easy to
implement for modders.)

Criticism on the way it's coded and/or how it is implemented is highly
encouraged. Test wad is <root>/TehRealSalt/levelemblems.wad,
pre-compiled exe is <root>/TehRealSalt/levelemblems.exe.
2017-03-22 12:59:16 -04:00
toasterbabe 7ac0373dbf After usability complaints:
* CA2_MELEE/CA_TWINSPIN combination abilities (ground hit, somersalt) disabled.
* Enabled movement controls whilst using CA2_MELEE in the air.
* CA2_GUNSLINGER no longer requires charging. In exchange, it involves a cooldown in which you can't move.
* CA2_GUNSLINGER lock-on distance improved, and aiming allowance reduced to compensate.
* Lots of cleanup/gravflip allowances for homing/targeting code.

* Unrelated: Flickies now properly face the direction they're supposed to when getting knocked out of the egg capsule.
* Unrelated: Thok trail fades like spindash trail now.
* Unrelated: Using CA_HOMINGATTACK when nowhere near an enemy uncurls you.
2017-03-21 16:04:49 +00:00
toasterbabe f24302adfb Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3 2017-03-21 00:56:03 +00:00
toasterbabe 59bc0da022 Introducing CA2_GUNSLINGER.
* Mildly hacky proof of concept! Will de-hack later.
* Charge up your ability!
* You can only damage others if it's at full power.
* Fires directly at enemies/bosses when at full power. Does NOT aim at players.
2017-03-21 00:54:47 +00:00
Monster Iestyn a979b425e0 Merge branch 'TEXTURES_More' into 'master'
Transparent patch support in TEXTURES

Adds transparent patch functionality for the TEXTURES format.
Duplicates source-to-cache column drawer functions and adds extra functionality which uses trans tables.
Changes how the column drawer is picked so it's done once per patch instead of per column.

See merge request !72
2017-03-19 16:17:31 -04:00
Monster Iestyn 351a391e43 Fixed errors reported while compiling 2017-03-19 19:43:02 +00:00
toasterbabe 3a6f659b93 She's a lot more complete.
* Melee now has a proper weightiness to it with a landing frame.
* If you have twinspin too, do a somersalt when running and hitting the melee button.
* If you have melee, go into the melee landing frame when twinspinning into the ground.
2017-03-19 16:48:35 +00:00
toasterbabe 99f13c88ae Made jump damage flag application less hacky. 2017-03-18 21:06:06 +00:00
toasterbabe 6fa319041a A serious defuckening of my fancy character select code. 2017-03-17 14:27:17 +00:00
toasterbabe 95e4a23a69 pw_ingoop is now CR_BRAKGOOP because i can't stop refactoring CAN'T STOP WON'T STOP 2017-03-15 21:51:35 +00:00
toasterbabe b2c0930807 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3 2017-03-14 18:12:47 +00:00
toasterbabe 7aeeb278fe Increased space in pflags (because we were getting VERY close to full capacity), which I will re-organise when this branch is closer to completion.
* PF_NIGHTSMODE is now CR_NIGHTSMODE as part of player->powers[pw_carry]. This is because it's mutually exclusive to every other "carry" type.
* PF_SUPERREADY is dead because it literally just checked for all 7 emeralds and 50 rings. That's it. You couldn't even appreciably alter its presence with Lua. That logic has been placed back in P_SuperReady.
2017-03-14 18:11:17 +00:00
toasterbabe e20292844d * SPR2_DRL0-C are gone. They're now (FF_SPR2SUPER|SPR2_NGT0-C). This frees up a bunch of badly-used freeslots, considering that you can't be super AND NiGHTS at the same time.
* Speaking of, actively enforced not being able to be Super and NiGHTS at the same time.
* Also on that note - SPR2_TRNS is now the NiGHTS transformation. The Super transformation is (FF_SPR2SUPER|SPR2_TRNS).
* SPR2_NPAN is now SPR2_NSTN, since it matches Super Sonic's stun animation rather than the pain animation.
* Fixed a bunch of things where Super float was handled badly with 2AM brain.
* Fixed the R_ProjectSprite error going out of spr2names' bounds.
* Fixed order of FF's in dehackéd.
* Fixed that thing where Super Sonic was blue for 1 tic after transformation, and the life icon was a blue Super Sonic.
2017-03-11 17:14:39 +00:00
toasterbabe 75ac351940 It's 2am, I'll upload the exe and player.dta to the ftp later.
* Super sprites are now deliniated via an additional S_SUPER lump between S_START and S_END. Above are normal sprites, below are super sprites. Handled internally via FF_SPR2SUPER.
* Sprite2 numbers are now appropriately limited for the data type that stores them.
* SPR2_SPIN is now SPR2_ROLL, SPR2_DASH is now SPR2_SPIN and SPR2_PEEL is now SPR2_DASH. Makes more sense, right?
2017-03-11 02:09:01 +00:00
toasterbabe c882851f14 Wide icons for the level select platter's exclusive usage.
https://gfycat.com/MenacingClearAngora

More for what's coming than what's here right now, but still quite pretty as a placeholder.
2017-02-17 01:45:21 +00:00
toasterbabe 3feac5bc90 bad bounce https://gfycat.com/DeliciousReliableGentoopenguin 2017-02-13 18:04:08 +00:00
toasterbabe a66567ea0f borp https://gfycat.com/AcceptableWhiteJabiru
doesn't do anything in ogl sorry, inu might change that later but
2017-02-10 23:24:06 +00:00
toasterbabe c04ee6bfb7 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3 2017-02-04 15:19:02 +00:00
toasterbabe 4a68f191c8 Mostly-complete structural work, very much incomplete rendering work. 2017-01-26 19:14:52 +00:00
toasterbabe 97a6f786a3 De-meming. 2017-01-25 17:23:57 +00:00