Spindash dust
Charging a spindash kicks up dust, we all know this feature was dying to get in at some point. Bubble and flame forms of spin dust are included from FSonic, for underwater and elemental respectively.
Oh, and as a bonus I reorganised the spindash/spinning/other ability2 stuff code to look a bit neater and more organised.
New resources:
* MT_SPINDUST - the object
* S_SPINDUST1 to 4 - the normal form's states
* S_SPINDUST_BUBBLE1 to 4 - the bubble form's states
* S_SPINDUST_FIRE1 to 4 - the bubble form's states
* SPR_DUST - the normal form's sprite set (uses frames A to D, just pinch FSonic's sprites really)
* SPR_FPRT - the flame form's sprite set (frame A only)
SF_NOSPINDASHDUST disables spindash dust for a character
See merge request !52
*Added FLIPX/FLIPY support for multi-patch textures and single-patch textures without holes
*Added FLIPY support for single-patch textures with holes; I'll sort FLIPX support out later
* 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.
* flips the sprite ala MFE_VERTICALFLIP except you don't need to flip the direction of gravity for the object just to draw upside down
* stacks properly with reverse gravity
* Sets the sortscale of the mobj to that of its tracer.
* Basically, Smiles' tails won't clip through shields thanks to this.
* http://gfycat.com/GraveGlassEwe
* Also has support for chains of MF2_LINKDRAW!
Also, I added more sortscale handling in the places where I forgot it.
I probably need some help with the maths here to get this to work nicely. http://gfycat.com/LimpAgedDowitcher
http://i.imgur.com/UyOKX5u.png <-- this common glitch with crawlas given MF_PAPER (THEY'RE NOT GOOD AT TURNING NEAR EDGES) used to show the behind-crawlas in front of the front-crawlas.
Unfortunately, I've just discovered this issue (which happens with the old version of the sorting code too): http://i.imgur.com/QNjbATB.png but to be fair these crawlas have gotten stuck inside the edges of this platform, so I'm not sure I can do anything about this without cutting off Sonic's feet when he stands on the ground? shrug
* MF_AMBUSH is now MF2_AMBUSH, because it's something you turn on in a map editor, not with a SOC definition.
* Where MF_AMBUSH was is now MF_PAPER.
* MF_PAPER accesses all the stuff I did previously in this branch...
* ...as well as turn on paper-thin collision detection between mobjs, which I've gotten working but isn't perfect but it's still good enough for non-solid objects!!
* recognising that the offsets weren't going to be accurate if you just SWAPPED yscale and yscale2 over 180 degrees
* taking scale into account consistently
also, some optimisations
also, i've sussed out WHAT'S going wrong here - the topleft pixel of the sprite will always be rendered at the height on the screen it would be rendered otherwise, which is causing the waving. now to figure out what to change to get that to move appropriately...
some complicated mathemagic leads to something which... seems CLOSE, but not perfectly accurate, so i think i need to tweak it more
http://gfycat.com/JovialSpitefulAmericancrayfish for current behaviour
remove all the places where i've set vis->scalestep to anything other than 0 to see something that LOOKS okay, but doesn't fulfil exactly what i want (that being a sprite that looks exactly like a midtexture)
* 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 (this will hopefully be replaced by 2.2 with sprites of NiGHTS themselves)
* 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 better)
* drill off into the sky instead of fly up in floating pose (but no noise yet)
ALSO:
* default maxdash is now 70
* forgot to add supercolor to lua, it is there now
* SPR2_SMSL renamed to SPR2_SSTN (stun)
* any player with a skincolor that's in the super range is set to FF_FULLBRIGHT at state-set time, so no need to keep super players non-fullbright just because they use spin stuff
* Several new supercolours.
- SKINCOLOR_SUPERSILVER1-5 (for fun) - "Silver"
- SKINCOLOR_SUPERPERIDOT1-5 (nyeheheh) - "Peridot"
- SKINCOLOR_SUPERCYAN1-5 (for fun) - "Cyan"
- SKINCOLOR_SUPERPURPLE1-5 (for fun) - "Purple"
- SKINCOLOR_SUPERRUST1-5 (mecha/metal sonic) - "Rust"
- SKINCOLOR_SUPERTAN1-5 (shadow/silver the hedgehog) - "Tan"
* SKINCOLOR_SUPER1-5 renamed to SKINCOLOR_SUPERGOLD1-5, one index for darkest is changed - "Gold"
* SKINCOLOR_TSUPER1-5 renamed to SKINCOLOR_SUPERORANGE1-5, ported properly to the new palette - "Orange"
* SKINCOLOR_KSUPER1-5 renamed to SKINCOLOR_SUPERRED1-5, ported properly to the new palette - "Red"
* new S_SKIN attribute - supercolor - uses an entirely different function to get the names (R_GetSuperColorByName instead of R_GetColorByName)
* a fun little secret - typing "god on" in the console whilst super makes the player hyper (visual only, no sparkles - just rainbow flash) - can be removed if no fun is allowed
Fix R_AddSingleSpriteDef's I_Error messages
Whoops, seems I forgot about this little branch. Basically this fixes how for a character's sprites, a full sprite lump name is displayed instead of just its sprite prefix in the "R_AddSingleSpriteDef: No patches found for [sprite prefix] frame [frame character]" message (unlike when it occurs for non-character sprites), resulting in something like "R_AddSingleSpriteDef: No patches found for PLAYC2C8 frame \^" which does NOT help custom character authors at all as it just confuses them instead. (for the record, the problem would actually with the ^ frame and not the ones displayed after "PLAY")
Oh, and the same problem is also fixed for this similar message: "R_AddSingleSpriteDef: Sprite [sprite prefix] frame [frame character] is missing rotations"
See merge request !95