Commit Graph

103 Commits

Author SHA1 Message Date
Nevur 8b64a6eef3 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement 2017-08-08 10:41:33 +02:00
Monster Iestyn 42ed41aeb1 Merge branch 'maces_but_better' into 'master'
Maces but better

See merge request !103
2017-08-07 15:27:05 -04:00
Monster Iestyn f3b7d2f89e Merge branch 'opengl-improvements' into 'master'
OpenGL improvements

See merge request !99
2017-08-07 15:06:16 -04:00
TehRealSalt a813506b8f Clean whitespace 2017-08-06 23:47:39 -04:00
TehRealSalt a5ca158622 LF_SAVEGAME flag instead of savemode
Also always save on file creation
2017-08-06 16:36:55 -04:00
TehRealSalt e24b8b917a Merge remote-tracking branch 'refs/remotes/origin/master' into save-mode 2017-08-06 01:19:33 -04:00
Monster Iestyn 15a1112218 Merge branch 'master' into opengl-improvements 2017-08-05 21:08:48 +01:00
Monster Iestyn 2e2b71da92 Merge branch 'addfile_menu' into 'master'
Add-ons menu

Does what it says on the tin! Very pretty. Would like help testing in filesystems that are not Windows, although I've recieved assurances from Sryder that since it's based on the same filesrch code, it should work cross-platform. Just want to confirm it works, though.

Also, M_* is whitelisted lumpname too.

root/!LatestSRB2Files/srb2win_branch_addfile.exe, requires new patch.dta.

See merge request !92
2017-08-05 16:05:12 -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
Monster Iestyn 157c5625d7 Welp, that space removal was my fault 2017-08-04 22:22:20 +01:00
Monster Iestyn 0270e50ce5 Split off mostly map-specific code into a "CanSaveLevel" function, just to make things a bit less cluttered 2017-08-04 20:43:00 +01:00
TehRealSalt 9d17466d99 Added lastmaploaded to replace the lastmapsaved check
This allows saving in special cases where you can go to a map that
doesn't save, and then back to the map you saved on (see: SUBARASHII
special stages), while still preventing you from killing your lives by
repeatedly retrying in said map.

Kept lastmapsaved just in case. Can be removed if deemed unnecessary.
2017-08-03 20:27:31 -04:00
TehRealSalt 0b05b10bdb Merge remote-tracking branch 'refs/remotes/origin/master' into save-mode 2017-07-30 11:13:52 -04:00
toasterbabe a5477737d7 Whooh boy. Probably requires re-review.
* Support for MF_PAPERCOLLISION tmhitthing in P_SlideMove.
* Knockback for wallspikes is much more consistent.
* Optimised away a FixedDiv call when determining the slopetype of a line.
* Changed the position of the wallspike base slightly.
* Made it so NOTHING can step up onto the player outside of other players, essentially killing a bunch of springs-launch-with-players style bugs. (I was able to recreate that issue with the wallspikes until I added this, which is why I did it in this branch.)
2017-07-18 14:17:23 +01:00
toasterbabe 370d9c3176 Hooh boy.
****
* MF2_MACEROTATE. Apply to any object. Replaces the indiscriminate spamming of A_MaceRotate each tic.
****
* Mace point mapthings have been slightly modified.
   - MTF_AMBUSH: bigger luke theory (has no effect on custom mace, different effect on spring mace)
   - MTF_OBJECTFLIP: flips the objects, but nothing else - just so it doesn't look out of place in gravflip sections
   - MTF_OBJECTSPECIAL: keeps it from attempting to play swinging sounds
   - angle: tag of controlling linedef
   - parameter: number of "spokes" minus one - for example, a parameter of 2 results in 3 equidistant maces rotating around the same point.
****
* Mace linedefs have been significantly revamped.
   - line dx: number of chain links
   - line dy: speed (in FU)
   - frontside floor height: Pitch (in degrees; how much it "tilts" over - Yaw influences the axis it's tilting on)
   - frontside ceiling height: Yaw (in degrees; rotation of entire thing on xy plane)
   - frontside x offset: Phase (in degrees; how far it is through the rotation cycle)
   - frontside y offset: Max speed (in FU; if less than speed, set to speed*2)
   - backside floor height: Pinch (in degrees; 0 if no backside; essentially makes rotation conical instead of wheel-like)
   - backside ceiling height: Roll (in degrees; 0 if no backside; rotates on the axis of the spinning - identical to Phase for spinning maces, but useful for rotating swinging maces as opposed to just offsetting them)
   - backside x offset: Number of "antispokes" (0 if no backside; makes that many spokes not exist so you can put another mace/chain type in there instead; for combo mace/chain instead turns them into chains directly)
   - backside y offset: Width (in number of extra chains per side; 0 if no backside; creates a "skiprope" arrangement)
   ----
   - ML_NOCLIMB: for chains and chain-mace combos, allow for player control of yaw through strafe keys
   - ML_EFFECT1: replacing the seperate mapthings, this makes a mace type swing instead of spin.
   - ML_EFFECT2: for all spokes of the mace wheel ending in maces, make the chains out of the mace type (inverted for firebars)
   - ML_EFFECT3: spawn a bonus mace type at the center(s) of rotation
   - ML_EFFECT4: don't clip inside ground
****
* Mapthing 1104 represents both spinning and swinging maces from prior versions of SRB2.
* Mapthing 1105 has gone from being a swinging mace variant to a combination of chains and maces in a single unit, provided the number of "spokes" is greater than one.
* Mapthing 1105 has gone from being a swinging chain variant to a vertical spring-on-a-ball-on-a-chain. Yellow by default, apply MTF_AMBUSH to turn into a red spring.
* Mapthing 1107 represents both spinning and swinging chains from prior versions of SRB2.
* Mapthing 1108 is completely untouched except to port over 2.1's functionality to the new backend.
* Mapthing 1109 is a Mario castle-level style firebar. This inverts the functionality of ML_EFFECT2 on the tagged linedef.
* Mapthing 1110 is a free slot should we want to implement another type of base-game mace.
* Mapthing 1111 is a custom mace. Use the linedef's frontside texture slots to identify a macetype mobjtype, then use the backside texture slots to identify a linktype mobjtype (defaults to MT_NULL if no backside).
****

Whooh. Requires new patch.dta for sprites.
2017-07-02 15:11:09 +01:00
Nevur f6bd414f35 Fixed stuff which I removed accidentally when manually tweaking p_setup.c on the merge. 2017-06-25 18:30:53 +02:00
Nevur d3a652aa15 Fix merge issue. 2017-06-25 15:39:45 +02:00
Nevur 35189dc219 Fixed PK3s.
-Colormaps, palettes and other stuff are properly loaded now. It was a bug related to the generation of the lump name with files in the root of the PK3.

Known issues:
-Map WADs' REJECT and BLOCKMAP are still not loaded.
2017-06-25 14:02:39 +02:00
Monster Iestyn cefd92fc8e Merge branch 'master' into opengl-improvements 2017-05-31 15:18:42 +01:00
Nevur 19c46f3732 More PK3 work.
-Removed code duplicity on map resource reading.
-Fixed all known PK3-related bugs so far except for the ones mentioned below.
Issues:
-Blockmap and reject matrix still aren't loaded yet when using a map WAD.
-Palettes and colormaps aren't loaded (by extension, TRANS tables might not work either).
2017-05-18 21:13:18 +02:00
Nevur d4c324eb30 PK3 stuff again.
-Now can load map WAD files inside Maps/ directory, but they must only contain map data explicitly!

Known problems:
-There's an issue causing a crash with palettes and colormaps in PK3s.
-SS_START and SS_END don't work now. Will check later.
-Standalone lumps for maps in the Maps/ folder don't work anymore; perhaps I should keep that functionality?

Notes:
-It's now a mashup of something dumb that I wanted to do and yet piling hacks again.
-A lot of code duplicity with map lump loading functions.
2017-05-16 21:10:02 +02: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 72baa4e2d0 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into addfile_menu 2017-05-08 23:43:21 +01:00
Monster Iestyn 9238b2d50f Merge branch 'level-specials-setup-stuff' into 'master'
Level specials setup stuff

Some changes to level setup, largely inconsequential for gameplay but maybe helpful for Lua scripting:

* gravity, weather, and some other internal variables are set to their defaults before loading things, so their values from a previous level don't affect mobj spawning potentially
* Tag lists are also initialised before loading things, so that tag-based search functions (such as P_FindSpecialLineFromTag) can be used internally for the maces and particle generator. This should probably extend to Lua as well
* the level header "forcecharacter" no longer recognises "255" as "None" anymore. This is because it no longer takes skin numbers (as of whenever that change was added... version 2.0?), and level headers are auto-cleared when edited anyway.

See merge request !88
2017-05-08 15:15:50 -04:00
toasterbabe 1fc835e4a3 Made the refreshdirmenu stuff SLIGHTLY less hacky. 2017-05-08 17:28:48 +01:00
Nevur ea2846394e More PK3 work. Now we're getting somewhere.
-DEFLATE-compressed lumps work properly now.
-All "big" lumps are supported now with the exception of WAD maps.

Notes:
-Compiler spits out a shitload of warnings still.
-Individual lump reading clashes with folders of the same name (see TEXTURES lump, and the Textures/ folder).

Signed-off-by: Nevur <apophycens@gmail.com>
2017-05-07 12:30:06 +02:00
Nevur 8ef6d6fd9e A bit more work on PK3.
-Expanded folder recognition for PK3s. Some resources are still not loaded from them yet.
-Took a glimpse at how maps are loaded, since the flat recognition is rooted somewhere there; did nothing yet about it though.
-Working towards "generalizing" how new resources are handled. Some var and functionality redundancy is still present.
2017-05-06 16:52:53 +02:00
Nevur 2c614f8f2c More work on PK3 handling.
-Moved the MD5 check for added files up so it avoids unnecessary work when you mess up and re-add a file.
-Using compression enum for compressed lumps now.
-Vastly improved central directory seeking algorithm, big files are read fine now. Thanks a lot JTE!
-Improved remaining central directory navigation algorithm, we know and expect what data is coming from now on, after all.
-TX_ textures and sounds are replaced, but textures crash the game on mapload, and sounds are simply mute when replaced. Might have to do something with caching, I don't know yet.
2017-05-01 16:37:32 +02:00
Nevur 448ceefe84 Little progress made. The code from everywhere still looks for the basic WAD structure of the lumps.
-Removed a redundant boolean related to texture loading in P_AddWadFile.
-Started working on handling PK3s differently, except that I'm not sure about what I'm doing.

I don't know what to do from now on for today, so I'll leave it here for now.
2017-04-30 20:05:26 +02:00
Nevur afba4b2abd Started to work towards PK3 support.
-Tweaked compression conditional to a switch-case format, looking towards adding several comrpession algorithms; haven't removed the previous "compressed" boolean yet.
-Added dynamically allocated name strings for lumps; haven't removed the previous name field.
-Added rudimentary PK3 central directory recognition; nothing is actually loaded in the end.
2017-04-30 14:49:33 +02:00
Monster Iestyn 21950687ed Make sure noreload levels don't do anything weird with the skybox mobj pointers, especially if Lua was involved
We can assume skyboxviewpnts/skyboxcenterpnts sort themselves out from reloading all the Things at least I guess?
2017-04-26 21:34:22 +01:00
Monster Iestyn bdb3c2ea0e extrainfo now determines "skybox ID", a number between 0 and 16 to identify the viewpoint or centerpoint
also I made that change skybox linedef exec special I guess (linedef type 448)
2017-04-26 18:16:01 +01:00
Monster Iestyn d4c330678a level header's "forcecharacter" parameter doesn't take skin numbers anymore, so this isn't needed! 2017-04-25 20:39:32 +01:00
Monster Iestyn 4e96f624e7 Split off part of P_SpawnSpecials into a new function called P_InitSpecials
This allows tag lists, gravity, weather, and the "CheckFor" vars to be initialised before running P_LoadThings or P_ResetDynamicSlopes, in case they could affect mobj spawning or cause a netgame desync somehow by carrying over the previous level's values
2017-04-24 20:33:39 +01:00
Monster Iestyn 3ff899858c Merge branch 'master' into opengl-improvements
# Conflicts:
#	src/doomdef.h
2017-04-19 14:53:50 +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
TehRealSalt e5245c508d Reimplemented analog mode cam_dist increase, slight comment updates
Analog mode's camera is now x1.2 of your actual cam_dist setting,
instead of being strictly 192. "analog on" seems to reset this modifier
every once in a while, but "useranalog on" prevents this. The wiki
itself says that you should only change useranalog though, so it
shouldn't be too big of a deal.
2017-03-26 17:11:04 -04:00
TehRealSalt dbcbcf5da3 Changed defaults, camera settings save
Camera settings: distance from 128 to 160, height from 20 to 32, speed
from 0.25 to 0.3
Mouse sensitivity from 35 to 12
Default control setup is Mystic's proposed scheme from the New Player
Experiences topic (https://mb.srb2.org/showthread.php?t=42095)

Also, camera settings now save to config, and they no longer try to
reset back to the default at every chance it gets (you can die, start a
new game, or exit, all while still keeping your preferred setting)
2017-03-25 03:13:02 -04: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 4a68f191c8 Mostly-complete structural work, very much incomplete rendering work. 2017-01-26 19:14:52 +00:00
Monster Iestyn 18d018b8ff Merge branch 'master' into opengl-improvements 2017-01-25 19:37:35 +00:00
toasterbabe da42165169 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_alignment_revamp 2017-01-16 17:14:58 +00:00
Monster Iestyn 93a40eb87a Merge branch 'master' into opengl-improvements 2017-01-09 22:13:34 +00:00
Monster Iestyn 3d07915be2 Merge branch 'vada_flickies' into 'master'
Hardcoded VAda Flickies

Many thanks to MI for his help, even if he has sinful opinions on what the collection of creatures should be called. ;P

* Flickies are now handled via A_FlickySpawn instead of hardcoded in P_KillMobj, so there can be mobjtypes with MF_ENEMY which don't create flickies, or other mechanisms which can much easier.
* Added map header "FlickyList" (aka "AnimalList") parameter, which can either be set to:
    * A species (eg: "Rabbit" or "Bluebird", amongst 17 currently supported types in dehacked.c table FLICKYTYPES - including the seed from Sonic CD, which isn't limited to 'soniccd on' in the console now)
    * Any valid mobjtype that isn't MT_NULL (eg: "MT_FLICKY_GHOST")
    * A comma-seperated list of either of the above, up to 64 entries long (eg: "Cow,MT_FLICKY_SPIDER,Chicken")
    * "All" - sets behind-the-scenes stuff to use every 'normal' type of flicky in FLICKYTYPES (a distinction which can be utilised to hide secret level flickies where they wouldn't be appropriate for the main game)
    * "Demo" - sets behind-the-scenes stuff to use the five flickies closest to the species used in the game's long history.
    * "None" - prevents any flickies from spawning.

"Demo" is functionally the default value if you don't include a FlickyList parameter in the header at all.

Of note, a bunch of functions are now created:
* A_FlickySpawn - spawns flicky.
* A_FlickyAim - aims for area near target, but not directly on them - turns around when hitting wall
* A_FlickyFly -  flies/swims around target (calls A_FlickyAim)
* A_FlickySoar - hacky alternate fly (calls A_FlickyAim)
* A_FlickyCoast - slowing down before going off again
* A_FlickyHop - fracunit-scale precision for A_BunnyHop
* A_FlickyFlounder - A_FlickyHop with randomisation
* A_FlickyCheck - State-setter for falling, or being on-ground
* A_FlickyHeightCheck - State-setter for falling, or being below a certain height relative to target
* A_FlickyFlutter - A_FlickyCheck, but with a slow fall/movement (calls A_FlickyCheck and A_FlickyAim)

I don't need to enumerate the object types and states that have been added, do I?

Oh yeah, I also made it so get_mobjtype's failure value was MT_NULL and prohibited SOC from editing the properties of it to compensate.

IN ADDITION: Killed "soniccd" console command, since it made things more complicated and honestly being able to specify Sonic CD seeds in the level header is a better option.

See merge request !60
2017-01-08 17:36:25 -05:00
Monster Iestyn 166c6746cd Merge branch 'public_next' 2017-01-08 16:05:32 +00:00
Monster Iestyn 22020dda03 Merge branch 'savegame-hotfixes' into 'next'
Savegame hotfixes

Yes, this another netgame related fix! Named this "savegame hotfixes" rather than "ERCZ hotfix" or the like in advance of the fact we probably need a general branch for other $$$.sav fixes?

Anyway, fixes included in by this branch:
* ERCZ's lava falls now act as expected rather than being stuck in place for the map's duration, fixing all other known desynchronisation issues known in the map for the time being (yay)
* Changing sector tags in a map no longer causes joiners to netgames to have their SRB2 application stop responding etc
* Player names should no longer turn red in the console in gametypes outside of CTF/Team Match if a resynch occurs (not $$$.sav related, but it's related to netplay so I lumped it in anyway)

See merge request !150
2017-01-07 18:32:07 -05:00
Monster Iestyn 12ae6bb22a Merge branch 'public_next'
# Conflicts:
#	src/d_clisrv.c
#	src/r_things.c
2017-01-07 15:03:59 +00:00