Commit graph

1766 commits

Author SHA1 Message Date
Inuyasha
f1b8bfcfe7 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into repeat-monitors
# Conflicts:
#	src/info.c
#	src/p_map.c
2016-09-29 18:08:50 -07:00
Inuyasha
92da141394 Yes, that stupid off-by-one due to spawning objects in the middle of thinkers being run still applies. 2016-09-29 17:27:33 -07:00
Inuyasha
d7aae15a6f Merge branch 'animated-sky' into 'master'
Animated sky support

What it says on the tin: skies can be animated textures now. Just set them up as normal animated textures (keeping in mind the starting texture still has to comply with the SKYn/SKYnn/SKYnnn naming format) and hey presto, your sky animates.

See merge request !34
2016-09-29 08:34:12 -04:00
Monster Iestyn
31d3c09d15 Merge branch 's_skinprovements' into 'master'
S_SKIN-provements

I like setting up merge requests before they're ready so I can do code comparisons. Yes, I know it's possible through looking at the branch itself, but merge requests are nicer.

New character abilities:
* CA_TWINSPIN - basically the insta shield but without the invincibility. Think rosy.wad. Destroys spikes, enemies and any bustable blocks (even Knuckles ones!) on contact.
* CA2_MELEE - dash forwards and upwards at S_SKIN's maxdash and mindash respectively, destroys spikes, enemies and any bustable blocks (even Knuckles ones!) on contact.

S_SKIN parameters (all available read-only to Lua):
* "availability" - defines the Unlockable number that has to become unlocked in order to play as the character. (Note: if you don't want this unlockable to show up in the unlockables menu, use type SECRET_NONE in hardcode, or None in SOC. Otherwise, the only other reasonable option is SECRET_HEADER.) Defaults to 0 if not given, or given a number over MAXUNLOCKABLES - which means playable on first boot as usual. The name of the unlockable referred to is set to the character's realname once this is read.
* "radius" - defines the radius of this player under all circumstances as an int, ignoring scale. Defaults to 16. ("radius = 48" means 48*FRACUNIT)
* "height" - defines the height of this player under regular circumstances as an int, ignoring scale. Defaults to 48. ("height = 12" means 12*FRACUNIT)
* "spinheight" - defines the height of this player under spinning/gliding/flying/etc circumstances as an int, ignoring scale. Defaults to 32. ("spinheight = 64" means 64*FRACUNIT)
* "shieldscale" - defines the scale of the shield sprite relative to the player's, as a float. Defaults to 1. ("shieldscale = 1.5" means 3*FRACUNIT/2) - see http://i.imgur.com/BQ5DhKC.png for justification
* "camerascale" - defines the scale of cam_dist and cam_height (the consvars) relative to normal, as a float. Defaults to 1. ("camerascale = 0.5" means FRACUNIT/2)
* "prefoppositecolor" - The sign background colour used when you're using the skin's prefcolor. 0 (the default) means use the Color_Opposite array for all colours.
* "supercolor" - The base colour you flash when super! Irrelevant if you don't have SF_SUPER. See constants below.
* Supports defining sound replacements as both DSNAME and sfx_name formats.
* Default revitem is now MT_NULL instead of MT_THOK to match all characters in SRB2 right now.
* Thanks to MI, all skin flags can be set via "name = 1" or "name = true" or "name = yes" like in 2.0 and before, AS WELL as the current "flags = SF_NAME"

Super colours:
* SKINCOLOR_SUPERSILVER1-5 - "Silver" - done for fun, looks a little bit like Nazo maybe if you're into that kind of thing
* SKINCOLOR_SUPERRED1-5 - "Red" - I originally neglected to do a proper port of Knuckles' super flash to the Reduced Palette. Here, I've corrected that.
* SKINCOLOR_SUPERORANGE1-5 - "Orange" - Ditto, but for Tails. I avoided doing it because Match Super was dying, so why put in the effort? FOR MODDERS!
* SKINCOLOR_SUPERGOLD1-5 - "Gold" - Just a renamed Sonic super to fit the new naming pattern.
* SKINCOLOR_SUPERPERIDOT1-5 - "Peridot" - Nyeheheheheheh.
* SKINCOLOR_SUPERCYAN1-5 - "Cyan" - @Inuyasha wanted me to do enough colours such that you can have a continuous rainbow of super forms.
* SKINCOLOR_SUPERPURPLE1-5 - "Purple" - So... I picked some of my favourite skincolours that were wide enough apart, since these take a while to do.
* SKINCOLOR_SUPERRUST1-5 - "Rust" - One of the first ones I did, because I liked how S3nK Mecha Sonic's super form wasn't yellow. (For Metal Sonic.)
* SKINCOLOR_SUPERTAN1-5 - "Tan" - Geez, I would've loved to call this champagne... [Here's a reference image for the reasoning behind wanting to include this.](http://i.imgur.com/OB18Cls.png)

New frame flags:
* FF_MIDDLESTARTCHANCE - For SPR2: has a 50% chance of starting the animation halfway in. For FF_ANIMATE: has an equal chance of starting on any frame between the frame number and frame number plus var1. For normal frames: Does nothing.
* FF_SPR2ENDSTATE - if var1 == S_NULL and the object is a player, don't loop, just stop incrementing the frames. Otherwise, go to the state represented by var1. Only works for SPR2 animations.

New skin flags:
* SF_NOJUMPSPIN - Player's height is full whilst jumping, SPR2_JUMP defaults to SPR2_SPNG instead of SPR2_SPIN, and the player goes into fall frames if they start moving downwards or use their ability.
* SF_NOJUMPDAMAGE - Ala rosy.wad, don't damage enemies, etc when jumping into them.
* SF_STOMPDAMAGE - Just for fun. Ala in Mario, always damage enemies when you land on top of them (your gravity reference, not theirs).
* SF_MARIODAMAGE - SF_NOJUMPDAMAGE|SF_STOMPDAMAGE is reasonably accurate to the Mario games, and might as well be surfaced as such.
* SF_MACHINE - creates explosions whilst dying, creates sparks whilst drowning, different drowning numbers and sounds. Requires new patch.dta.

Character select screen updates:
* All disabled characters - through SOC or unlock (via the above availability parameter) - are outright removed (at least visibly). No awkward gap in scrolling - no hint they were ever there in the first place. Character select selections without valid characters are also hidden.
* Vertical loop - the character select images are visually continuous. No matter where you are in the chain, you'll always see a hint of the character above or below your current selection. (This is as long as you have more than one character on the select screen - otherwise you'll just see that one only.)
* Smooth scrolling - Moto and Prime showed me [a gfy](https://gfycat.com/AshamedEsteemedHammerheadbird) from back during 2.1 development where it was super smooth. I didn't make it as slow as that one, but the smoothness was easy to add and the reason it was removed previously - gaps in the character select leading to varying speeds - is no longer relevant.
* [Gfy of example](https://gfycat.com/RealBrightJay) - Metal Sonic is hidden both to show off it's capable of hiding to 'devs, and to make this safe to show off to the public!
* Fallback for a zero character select screen: just try to pick the first character, whatever it is! Just like when it's forcecharacter...

Character behaviour changes:
* CA2_NONE/CA2_MULTIABILITY no longer forces nojumpspin.
* PA_JUMP - for jumping (only when going upwards in the case of SF_NOJUMPSPIN, otherwise it's PA_FALL).
* Instead of not spawning the revitem if your SPR2_ is SPR2_DASH, don't spawn it if it's set to 0.
* Don't get stuck in spindash frames if your maxdash is 0, and don't flash rolling frames if you're on goop.
* SPR2_SWIM (and S_PLAY_SWIM) for using CA_FLY/SWIM underwater.
* CA_SWIM users no longer forced to run on water.
* Drowning characters fall off the screen slower.
* CA_DASHMODE users can destroy normal spinbust blocks whilst they're dashing.
* CA_DOUBLEJUMP and CA2_MULTIABILITY go together nicer now. Each additional jump (up to the (actionspeed>>fracbits)nd jump) has a jump height closer and closer to zero, much like Kirby games.
* Fixed bug where being pushed off a platform whilst charging a spindash would leave you in your charging frames instead of your rolling ones when you hit the ground (http://gfycat.com/MassiveThreadbareItalianbrownbear)
* Fixed bug where spindashing on top of a bubble spawnpoint led to you being able to move around in spindash frames (no gif since obvious desired behaviour is obvious)
* Spindash animation speeds up the faster you'll shoot off.
* The spin charging mechanism is now scale-independent, and only multiplies by scale when shooting off - less FixedMul calls, and potentially deals with weird quirks of changing scale whilst spindashing that nobody's discovered because there's no place to find that in the main game!
* Default maxdash is now 70
* SPR2_SMSL renamed to SPR2_SSTN (stun)
* player->powers[pw_carry] replaces a bunch of carrying stuff.
    * PF_ITEMHANG -> CR_GENERIC
    * PF_CARRIED -> CR_PLAYER
    * (mo->tracer == MT_TUBEWAYPOINT) -> CR_ZOOMTUBE
    * PF_ROPEHANG -> CR_ROPEHANG
    * PF_MACESPIN -> CR_MACESPIN
* Rope hangs and zoom tubes are a LOT smoother. http://gfycat.com/BewitchedIcyHuman
* PF_CANCARRY replaces all the terrible checks for flying, and is given and removed properly.
* Turning "god on" in the console whilst super (and devmode is off) will result in... [Well...](http://gfycat.com/DownrightMemorableDwarfrabbit) ~~(if no fun is allowed let me know and i'll put this behind the #DEVELOP define)~~

Multiplayer consvar changes:
* forceskin now takes a string instead of a number, and requires you to have unlocked that skin to set it.

A comprehensive list of all the circumstances characters are available under:
* If they don't have a respective unlockable.
* If they do have a respective unlockable, but you've unlocked it.
* If you're watching somebody's record attack footage.
* If you're forced to by the map you're playing's level header.
* If you're playing multiplayer, and the host or admin (who must have unlocked the character first, or be running a dedicated server) sets the forceskin console variable to that character.

Character-related NiGHTS stuff:
* Skin-based SPR2_ system instead of Sonic's sprites for everybody.
* If you can turn SF_SUPER, flash your skin's supercolor, otherwise be your normal color.
* If your skin doesn't have a SPR2_NGT0 (horizontal fly), use Sonic's sprites and colour flashing rules (this will hopefully be replaced by 2.2 with sprites of NiGHTS themselves)
* SPR2_NTRN, SPR2_NSTD, SPR2_NFLT, SPR2_NPAN, SPR2_NPUL, SPR2_NATK, SPR2_NGT0-C, SPR2_DRL0-C. (number of flight directions have been upped for EXTRA SMOOTHNESS)

Non-character-related NiGHTS stuff:
* Rob requested the following link colour sequence at unix time 1470866042, and I had the relevant file open: Emerald, Aqua, Cyan, Blue, Pastel, Purple, Magenta, Rosy, Red, Orange, Gold, Yellow, Peridot
* MT_NIGHTSCHAR made irrelevant, everything follows actor->target instead of actor->target->tracer now
* Emerald is now player->mo->tracer instead of player->mo->tracer->target
* Nightopian helpers flash for the 35 tics before they disappear
* Nights capsule makes boss explosions/noises now (I can change it back I just like it this way better)
* Drill off into the sky instead of fly up in floating pose (but no noise)

See merge request !32
2016-09-27 12:55:24 -04:00
toasterbabe
55d8b419e2 MI's last few reccomendations fixed. 2016-09-27 17:51:17 +01:00
toasterbabe
e801c581d3 Fixed off-by-one error with the relationship between FF_ANIMATE's var1/number of frames, FF_MIDDLESTARTCHANCE, and P_RandomKey. 2016-09-27 11:50:48 +01:00
toasterbabe
cf9ea19d11 Tweaked P_SetScale so it allows radii and heights set by Lua (and the skin's radius) to be kept, and tweaked the contents of the last commit to match. 2016-09-27 11:32:34 +01:00
toasterbabe
28f5e7d1bc Did I not commit this fix? Woops. 2016-09-26 12:25:10 +01:00
Inuyasha
1d71dfa5a3 animate icons using FF_ANIMATE
(this also means they last one second again, and the powerup is given after 1/2 a second, things which were lost when the flip was added)
2016-09-25 20:55:08 -07:00
toasterbabe
be0e898bae * Skin-controlled radius is no longer set each tic, only on skin change and player spawn.
* Camerascale, shieldscale, height and spinheight are now player attributes which are set to the skin attribute on skin change, not read directly from the skin.
* P_GetPlayerHeight and P_GetPlayerSpinHeight are now macros instead of functions.
* Extra protection against switching to a locked skin.
2016-09-25 18:21:52 +01:00
toasterbabe
64a9a94604 GETSPEED -> GETFRACBITS completion. woops 2016-09-25 15:23:22 +01:00
toasterbabe
9f69850c05 Basically seriously un-fucked the rope hang and zoom tube code from my experimentations (i just wanted to compare speed and distance and got carried away...) 2016-09-25 15:07:00 +01:00
Inuyasha
1a4b894589 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into repeat-monitors
# Conflicts:
#	src/info.c
2016-09-24 23:05:01 -07:00
toasterbabe
50a44d96b1 Changes to bubbles for new DSZ + bubble sprites (needs new patch.dta). 2016-09-24 17:15:42 +01:00
toasterbabe
da1db42b14 Forgot some compilers would complain about this. 2016-09-24 13:39:04 +01:00
toasterbabe
f933210c03 Let's simplify a lot of stuff. PF_CANCARRY instead of a horrible assortment of checks. 2016-09-24 13:18:08 +01:00
toasterbabe
eb64e4ccd9 Tightened some restrictions on Tails carry because right now the looseness leads to edge case noise spam when trying to pick up a player off a rope hang, for example. 2016-09-24 12:38:37 +01:00
toasterbabe
41b4d9c565 Fixed carry bug that I introduced a while ago. 2016-09-24 12:06:00 +01:00
toasterbabe
1de32b3dac Fixed my mistake with static rope hangs.
Also, the same smoothness changes have been ported over to zoom tubes!
2016-09-24 00:37:18 +01:00
toasterbabe
e16648a72b Introducing player->powers[pw_carry]! Also, I made rope hangs a lot smoother.
* PF_ITEMHANG -> CR_GENERIC
* PF_CARRIED -> CR_PLAYER
* (mo->tracer == MT_TUBEWAYPOINT) -> CR_ZOOMTUBE
* PF_ROPEHANG -> CR_ROPEHANG
* PF_MACESPIN -> CR_MACESPIN
2016-09-23 23:48:48 +01:00
toasterbabe
dcb82c292a Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-09-12 19:23:44 +01:00
toasterbabe
ba78dda276 Just noticed when poking around in dashmodecode that it didn't actually get stopped from running when you were playing in CTF! 2016-09-10 22:44:28 +01:00
toasterbabe
cd0c2347df Ditto with regards to glideandclimb. 2016-09-10 21:13:51 +01:00
toasterbabe
f844fb3460 More strenous checking of ability for these animations in preparation for something I wanna try... 2016-09-10 21:00:57 +01:00
toasterbabe
fb377ad44f Minor tweaks to animations and endsigns. 2016-09-08 17:48:54 +01:00
toasterbabe
941bf8eb03 Corrected multiple oversights with swimming players dropping their friends when they shouldn't. 2016-09-08 14:38:57 +01:00
toasterbabe
df7b375f05 Corrected an oversight for horizontal springs the introduction of PA_JUMP caused. 2016-09-08 13:57:43 +01:00
Monster Iestyn
31b9e762e1 Merge branch 'public_next'
# Conflicts:
#	src/p_mobj.c
2016-09-05 21:28:43 +01:00
Monster Iestyn
1476a4cdb4 Merge branch 'next' into public_next 2016-09-05 21:22:53 +01:00
Alam Ed Arias
b949f49c68 Merge branch 'master' into next 2016-09-04 20:51:45 -04:00
Wolfy
484bb9535c Merge branch 'more-slope-fixes' into 'next'
More slope fixes (aka sorry guys I made another quick SUGOI fix)

Another slopes fix branch!

This branch currently includes a fix for:
* Knuckles gliding into a slope while in 2D mode causes him to try to "climb" on air above them, if the original non-sloped height is higher. Unfortunately he still tries to grab onto places that he can't really climb on, but at least now it's on the slope itself and not in mid-air lol. This issue is encountered in SUGOI's Retro Hill Zone, if you want to check for yourselves.
* Bustable FOF-busting code for both players AND pushables not accounting for slopes
* (Unrelated to slopes): Fix FF_SHATTERBOTTOM FOFs acting like THZ goop when stood on; I added this fix as a bonus because I encountered it in a test map of mine for the bustables fix

(Other fixes may or may not appear here in the near future, I haven't decided yet. Don't wait on me to get in any further fixes before merging, that said)

See merge request !110
2016-09-04 19:34:29 -04:00
Wolfy
58df0e76c3 Merge branch 'nights_bugfixes_i_almost_put_in_internal' into 'next'
Last-minute NiGHTS exiting bugfix

One single-line fix concerning the end of NiGHTS maps. Extremely small, literally zero side effects here, the only reason I'm not committing directly to master (aside from ettiquette) is that I don't have the ability to do so.

* The NiGHTS drone had a single tic of visibility when you hit the goal, which is evident stepping frame by frame through http://gfycat.com/ComplicatedComposedAoudad (the contents of which may or may not make it into 2.2). This is no longer the case.

See merge request !100
2016-09-04 19:27:12 -04:00
Wolfy
bcf7ca421c Merge branch 'DD_netplay_off' into 'next'
DIsable NetPlay on DirectDraw builds

Also disable UPnP support on NONET builds

See merge request !102
2016-09-04 19:01:26 -04:00
Wolfy
987c490bc3 Merge branch 'readmerewrite' into 'master'
Readme rewrite

Our readme.txt is outdated as hell, so I took it upon myself to rewrite it in Markdown. For the sake of simplicity, it links to the wiki for compile instructions. Feel free to commit to the readmerewrite branch if anything should be done differently.

See merge request !111
2016-09-04 19:00:48 -04:00
Monster Iestyn
0595325f4b Make disclaimer H2 instead of H3 2016-09-04 21:54:11 +01:00
Monster Iestyn
86ccecc6c1 Let's be more specific here 2016-09-04 21:26:34 +01:00
Monster Iestyn
f9e01c2b65 Fixed up markdown so the build status isn't treated as a header anywhere 2016-09-04 20:12:59 +01:00
wolfy852
f1ab448442 Readme rewrite 2016-09-03 16:50:00 -05:00
wolfy852
2d94256490 Shut the compiler up 2016-09-03 16:05:45 -05:00
toasterbabe
5bb0b5684e More irrelevant negation reduction, sorry. 2016-09-03 15:46:38 -05:00
Wolfy
7f9accf38b Merge branch 'slope_optimisations' into 'master'
Optimisation of P_GetMobjGravity (relevant for slopes)

Cleaned up some performance issues in Skytop Zone (2.1.16: THE SUGOI UPDATE) arising from some inefficiencies with P_GetMobjGravity. FPS drops only occasionally to 34 now, which is a big improvement when I was frequently getting 27 in Salt's 15andahalf.exe.

(I also tested in a build of 2.1.16's first release candidate, and was getting drops to 16! So SOMETHING improved since then, but this was the major issue.)

See merge request !109
2016-09-03 16:40:50 -04:00
toasterbabe
6ff75d2aa1 Double negation becomes single negation, with handy comment! 2016-09-03 21:37:52 +01:00
Wolfy
cce2a5e048 Merge branch 'RA_hotfix' into 'next'
Record Attack hotfix

Limit damage from http://mb.srb2.org/showthread.php?t=41847, basically.

Also fixed the message popup background because why not

See merge request !107
2016-09-03 16:29:28 -04:00
toasterbabe
0333c9db94 P_MobjCheckWater now properly accounts for changing heights (skin non-spin height for players, mobj height otherwise) instead of mobj info height.
Also, the particles made via spindashing in shallow water are now located behind the player. This does move the running particles too, but that's okay.
2016-09-03 20:00:29 +01:00
toasterbabe
c11d8da3a3 No need to check for under/overflow outside of the spindash code, let's just start at the mindash and not add power if you're over instead. 2016-09-03 16:20:04 +01:00
toasterbabe
2cee8c1a8d SORRY, I SHOULDN'T HAVE PUSHED THE PREVIOUS THING
Revert "Revert "Revitem is saved by tying it to leveltime instead of dashtime, whilst dashtime is now dead.""

This reverts commit 58f815ddbc.
2016-09-03 16:05:58 +01:00
toasterbabe
58f815ddbc Revert "Revitem is saved by tying it to leveltime instead of dashtime, whilst dashtime is now dead."
This reverts commit 0852a20014.
2016-09-03 15:51:38 +01:00
Monster Iestyn
a860c068d8 BONUS UNRELATED FIX: Fix FF_SHATTERBOTTOM FOFs acting like THZ goop when stood on 2016-09-02 22:53:55 +01:00
Monster Iestyn
8f02c50c10 Fix players and pushables not accounting for slopes on bustable FOFs 2016-09-02 21:41:45 +01:00
toasterbabe
0852a20014 Revitem is saved by tying it to leveltime instead of dashtime, whilst dashtime is now dead. 2016-09-02 18:12:46 +01:00