Commit Graph

71 Commits

Author SHA1 Message Date
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
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
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
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 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
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 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
Monster Iestyn b768c4b961 Sync sector tags and tag list variables properly
Dunno who thought it was a good idea to lump tag, nexttag and firsttag together in $$$.sav, but that meant changing sector tags caused SRB2 to stop responding since it lead to the tag lists being broken
2017-01-03 20:48:39 +00:00
toasterbabe 6ed8d99b48 * Added "Flickylist = DEMO" option, creating the five species of flicky similar enough in appearance to the Freed Animals from the days of yore.
* Set the default flicky group to be equivalent to Flickylist = Demo.
* Refactored a little. (This also removed a crash-causing typo in a Z_Free in P_ClearSingleMapHeaderInfo.)
2017-01-01 16:57:07 +00:00
toasterbabe d9177f778f * Made what MI had compile.
* Added the ability to read in mobjtypes as well as from a short list of flicky constants.
* Added a new state, S_XPLD_FLICKY, which is the new deathstate of all badniks.
* Put the disabled animal-spawn-on-P_KillMobj behind a #define.
* Renamed the branch and associated properties to something not rife with sin.
2016-12-29 17:02:05 +00:00
Monster Iestyn cecc1912fe Starting work on adding new system for spawning animals; added A_FlickySpawn and level header "animallist"/"flickylist" parameter
No idea if this compiles yet (let alone if what is there works at all), just getting this out the way so I can work on certain other things *cough plane displacement cough*
2016-12-27 21:01:20 +00:00
Monster Iestyn d294c9d15c P_NetUnArchiveWorld now uses P_AddLevelFlatRuntime instead of P_AddLevelFlat.
Also created P_CheckLevelFlat to just return the flat # from a name, since that's all P_NetArchiveWorld really needed from P_AddLevelFlat anyway
2016-12-08 21:45:25 +00:00
toasterbabe e34ef54166 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_alignment_revamp
# Conflicts:
#	src/info.c
#	src/p_mobj.c
2016-11-20 19:21:10 +00:00
Inuyasha e62b0f219f Merge branch 'damage-control' into 'master'
Damage control + Match rebalancing

This is two branches in one since while I was working on damage-control's changes months back, I felt it was best Match rebalancing was merged in here too (thanks JTE for helping me do so).

Changes from damage-control:
* `player->health` (formerly the "HUD copy" of `player->mo->health`) is now `player->rings`, and is also now the player's actual ring count.
* `player->mo->health` (formerly rings + 1) is now always 1 when alive, regardless of ring count; if player with rings is damaged, this is untouched.
* P_RingDamage now includes ring spilling code.
* P_ShieldDamage now has a damagetype argument, allowing me to remove the last MT_NULL hack left in from the pre-damagetype days that I forgot about.
* The old "switch-to-seestate" enemy damaging behavior in P_DamageMobj has been removed. This was a Doom left-over and doesn't really affect SRB2's enemies anyway - see, Doom enemies had a random chance of using seestate or painstate, SRB2 enemies always use painstate.
* Other minor efforts to reorganise damaging code and have it make more sense, but otherwise nothing that should affect gameplay in general.

Changes from match-rebalancing:
* New weapon/ammo dropping behavior: if you have the weapon panel + ammo, you drop the panel (but not the ammo); if you don't, you just drop the ammo.
* New Match ammo consumption: Weapon rings can now be fired with no rings at double the ammo cost.
* New emerald behaviour: collecting all 7 emeralds no longer turns you super (read: Match super is dead now) but instead steal points from enemies and gives you and teammates invincibility + sneakers
* Tails ringslinger buff: Any character with CA_FLY will now throw rings 1.5x as fast.

See merge request !28
2016-11-13 16:47:05 -05:00
Monster Iestyn fea97b4880 Merge branch 'master' into next 2016-11-10 16:45:49 +00:00
Inuyasha 8107765677 make console back color use just one section of memory
let's be honest, it's pretty dumb to have every single possible back colormap in memory when only one is being used at a time
2016-11-02 14:26:35 -07:00
Monster Iestyn 82d29b59c1 Merge branch 'master' into damage-control 2016-10-29 17:05:59 +01:00
Yukita Mayako cdb841ef54 Only P_InitPicAnims when wads are loaded.
Not in P_SetupLevel. That's just dumb.
2016-10-19 03:24:43 -04:00
Monster Iestyn 0fb89c620d Merge branch 'master' into damage-control 2016-09-30 21:05:44 +01:00
toasterbabe 4ccb3b88d0 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_alignment_revamp
# Conflicts:
#	src/p_mobj.c
2016-08-10 00:10:18 +01:00
Alam Ed Arias e87e747a29 clean up warning done in setup-fixes 2016-06-19 12:48:35 -04:00
Monster Iestyn 9b037164bc Added debug messages for when REJECT lump is not loaded 2016-06-12 21:51:27 +01:00
Monster Iestyn f94dd510ad change back to 8, add \0s 2016-06-12 21:16:41 +01:00
Alam Ed Arias 472dce1ae6 Do not why we are not checking REJECT\0\0, let fix this check 2016-06-11 21:42:02 -04:00
Monster Iestyn 1d0e74f9c0 "REJECT" is only 5 chars long, not 8. 2016-06-11 21:19:16 +01:00
Monster Iestyn a7a7a7ee6d Added P_LoadReject function to properly check if REJECT lump is valid or not when loading it, so P_CheckSight can avoid accessing it if not.
This should mean that maps built with ZBSDP (no reject) should have less or no problems in netgames compared to the standard ZenNode maps now, hopefully. =)
2016-06-11 18:45:56 +01:00
Monster Iestyn df92dc8d9e Print debugging message if sector->linecount is zero 2016-06-11 16:14:08 +01:00
toasterbabe 2ffc06c0bc Fan particle generators now suck less!
For the object...
* Tag via its angle field
* Number of objects to spawn per tic around it via its z field, if zero then just spawn at center
* Is flipped if given MTF_OBJECTFLIP.

Now there's a linedef type 15!
* Tag is tag of object(s!)
* Object type set via concatenation of frontside textures, MT_PARTICLE is default
* The length of the linedef is the radius the particle is spawned out (zeroed if z field is 0)
* Frontside x offset is speed upwards
* Frontside y offset is number of degrees to turn each tic (zeroed if z field is 0)
* Frontside floor and ceiling heights are the heights in which the particle is bound through some fun mathematics and/or BDSM

Of course, not every story has a happy ending.
* A_ParticleSpawn no longer accepts objects via its var1 because of how specialised it's gotten. Considering it can be set via abuse of actor->cvmem, I don't consider this an issue. Maybe you might disagree.
2016-06-06 00:00:31 +01:00
toasterbabe 482c1ce665 Speed pads are now nicer.
Linedef type 4 now works as follows.
* Frontside x offset is dash speed.
* Effect 4 flag doesn't center the player. (same as before)
* Effect 5 flag sends them off in rolling frames. (as a result there is only one speed pad sector type now, not two)
* Frontside upper texture is sound to play on launch, defaults to sfx_spdpad when not given
2016-06-05 00:23:20 +01:00
toasterbabe 6f291d667e Bustable blocks revamped. I'm on a roll!
Linedef type 14 (Bustable block parameter)
* Applied to one of the linedefs of any FOF's control sector
* Concatenation of frontside textures is MT_ object type to spawn, defaults to MT_ROCKCRUMBLE1 if not present
* Sound played when being busted is object type's activesound
* Frontside x offset is spacing (in fracunits) of spawned particles, defaults to 32<<FRACBITS
* Frontside y offset is the fuse of spawned particles in tics, defaults to 3*TICRATE, if set to -1 assume infinite lifetime
* Effect 1/Slope Skew flag makes particles fly out

Linedef type 250 (Mario Block):
* No Climb flag turns it into a brick block (busts when hit from the bottom, player hits their head/fist/whatever, no more upwards momentum)
2016-06-04 18:59:24 +01:00
Monster Iestyn 9007904a72 Merge branch 'master' into damage-control
# Conflicts:
#	src/p_inter.c
#	src/p_mobj.c
2016-05-25 15:33:09 +01:00
Alam Ed Arias f45feb77fc MSVC: kill level 3 warnings 2016-05-22 00:44:12 -04:00
Monster Iestyn b4cf7fbc97 Fix player 1 and player 2 affecting whether the other can see skyboxes or not 2016-05-18 18:20:56 +01:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn aab5e656ea removed unused "total" variable in P_GroupLines 2016-04-02 17:01:58 +01:00
Monster Iestyn f9c4b877ca Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2Internal.git into damage-control 2016-03-13 20:37:43 +00:00
Inuyasha a8bca89dbd Merge branch 'backport_unslot-music' into 'next'
BACKPORT: removal of music slots

Relevant commits cherry-picked. Basically everything except the internal music track name switches.

See merge request !43
2016-03-03 22:31:21 -05:00