Commit graph

1562 commits

Author SHA1 Message Date
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
toasterbabe 73843764de Some more spindash changes. NOTE that this temporarily breaks the charging aura; if we want to, we can either kill that entirely or re-enable it - but none of the main characters are using it, and Lua makes having a dedicated charging aura irrelevant if the main characters don't use it...
* Spindash sound only plays six times during the charge, equally spaced up until you finish charging.
* Spindash animation speed increase rebalanced.
2016-09-02 17:27:39 +01:00
Monster Iestyn eae47c9808 Fix Knuckles in 2D mode attempting to latch onto air when gliding into a slope. Now he just attempts to latch onto the slope directly (which I'll fix another time, if I can figure out how)
(fix for SUGOI's Retro Hill Zone)
2016-09-01 21:21:20 +01:00
toasterbabe c07f273af0 Fixed some oversights with the spindash dashspeed changes 2016-08-30 16:41:00 +01:00
toasterbabe 42d527a955 Did a few things with spindashing:
* 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 for how it works now, http://gfycat.com/MarvelousEnlightenedAuk is how it used to work)
* 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!

Also:

* Climbing animation defaults to rolling instead of walking, because what.
2016-08-30 15:00:01 +01:00
toasterbabe 8d8be8a7b2 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-08-30 13:30:56 +01:00
Monster Iestyn 5e6bf9e340 probably best if we did this instead actually 2016-08-29 23:24:59 +01:00
Monster Iestyn df7c8482e4 If NOT skewing FOF walls, make sure dc_texturemid reverts to using unsloped FOF topheight/bottomheight rather than actual left side top/bottom heights 2016-08-29 23:21:57 +01:00
Monster Iestyn 74e7433a92 Upper Unpegged on an FOF's control linedef now enables skewing of walls with respect to slopes
Skewing direction is decided per in-level wall by the Lower Unpegged flag on in-level linedefs themselves, since they already decide the stuff for FOF wall pegging as it is. That is unless Transfer Line is involved which moves everything to the control sector linedefs instead...
2016-08-29 22:42:06 +01:00
toasterbabe 3bad307e2d Sorry, Inu. 2016-08-28 20:46:56 +01:00
Monster Iestyn 21aa444943 Merge branch 'cutscene-switch-fix' into 'next'
Cutscene switch fix

Yet another fix for SUGOI, lol: apparently going from a final level's post-cutscene straight to a custom credits cutscene gets the latter stuck forever in the first scene (because the game accidentally stops the cutscene responder from realising the custom credits cutscene is running). This branch of course makes a fix for that.

See merge request !108
2016-08-28 13:40:44 -04:00
Monster Iestyn 454b705d32 Merge branch 'wall-collision-fix' into 'next'
Wall collision fixes

Fixes included in this branch:
* A fix for a specific crash encountered in a SUGOI map (sound familiar?) caused by bouncing off a wall adjacent to a slope
* A fix for solid midtextures not accounting for Effect 3/Peg Midtexture properly (https://mb.srb2.org/showthread.php?t=41462)
* A fix for solid midtextures not accounting for texture y offsets properly for non-Lower Unpegged/Peg Midtextured midtextures
* A fix for solid midtextures not accounting for "infinite" repeats (Repeat Midtexture + no repeat count set)
* ~~A fix for Effect 4 on Polyobject First Line making that particular linedef's midtexture solid in addition to making planes visible - this is not wanted if you want a polyobject with both visible planes and full intangibility.~~ Apparently they never did this anyway, don't mind me \o/

See merge request !104
2016-08-28 13:33:14 -04:00
toasterbabe e8775419d1 Removed now-irrelevant braces. 2016-08-28 14:09:15 +01:00
toasterbabe 25ab977862 ...didn't realise P_InsideANonSolidFFloor checks for FF_EXISTS itself, so HM 2016-08-28 14:06:20 +01:00
toasterbabe c0f5f22b6a Suggested improvement by MI on irc. 2016-08-28 13:51:32 +01:00
toasterbabe 50ce152c69 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. 2016-08-28 13:19:17 +01:00
Monster Iestyn 2a6a21a4a2 Solid midtextures now account for "infinite" repeats 2016-08-27 17:14:21 +01:00
Monster Iestyn 541c53c3e1 Merge branch 'public_next' 2016-08-27 15:49:32 +01:00
toasterbabe d17843aee1 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_sprites 2016-08-26 20:48:48 +01:00
toasterbabe 8a244c1816 Nev3r helped me discover a crash caused by NAMEcLcR not loading patches into every angle lump slot.
This is the smallest possible change that fixes the crash.
2016-08-26 16:09:43 +01:00
Monster Iestyn 96f74a3a17 Merge branch 'master' into next 2016-08-25 19:19:53 +01:00
Monster Iestyn ab3f677e66 F_EndCutScene now sets cutsceneover to true BEFORE running Y_EndGame and the like, not AFTER 2016-08-25 17:58:54 +01:00
toasterbabe 41b3b3c5bd GCC 4.6 and lower fix 2016-08-22 23:42:06 +01:00
Monster Iestyn ead52294ab THE LINES LIVE AGAIN (initial horizon lines work commit) 2016-08-21 21:17:47 +01:00
toasterbabe dc3be7b8a1 Removing now-irrelevant whitespace and cleaning up the last of the hack. 2016-08-21 15:42:09 +01:00
toasterbabe f34a28e80e Removed a hack that caused the groundpound spinfire to hurt you if you lost your shield. 2016-08-21 13:55:16 +01:00
Monster Iestyn fd5297ee6c Merge branch 'fix-obj-step' into 'next'
Fix non-player objects having busted step-up/down on slopes

Why the fuck did I make this a player conditional in the first place holy shit

See merge request !103
2016-08-20 18:08:11 -04:00
toasterbabe 79297d0cd7 Woops. 2016-08-20 17:34:59 +01:00
toasterbabe c08e9674be As requested by Nev3r and VAda, seperating MF_PAPER into FF_PAPERSPRITE and MF_PAPERCOLLISION. 2016-08-20 15:15:48 +01:00
toasterbabe ef6c2510a2 Did a few things to make this better.
* Reorganised R_DrawVisSprite to do less needless variable calculation.
* Corrected some clipping oversights.
* Made a few comments clearer.
2016-08-20 12:18:00 +01:00
Inuyasha 44df9358dd If the game becomes modified during a record attack run, end it
RA menu can be opened if the game is modified, but Start can't be selected. (Obvious reason: so scripts to display info can be used easier)
Fixed the stupid background for messages in the Record Attack menu, it was bugging me
2016-08-19 22:18:43 -07:00
toasterbabe 7d5bda709a Sorting is fixed! Turns out rover isn't a FOF, it's another sprite. Thanks @RedEnchilada for noticing this oversight!!
http://gfycat.com/EsteemedPleasedDuck <-- so great
2016-08-20 03:02:40 +01:00
toasterbabe 8df146b713 An additional proper overflow check, and also a little something I forgot earlier. 2016-08-20 01:03:35 +01:00
toasterbabe 552a67200c A revert of the sorting because it produced better (but not perfect) results for paper and normal mobj interaction.
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
2016-08-19 15:06:10 +01:00
toasterbabe fbff05bd17 Fixed the between-objects sorting problem previously mentioned in the merge request. Now they're sorted by whichever sprite has an end closest to the camera, instead of the middle point previously used.
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
2016-08-19 12:26:26 +01:00
toasterbabe 3db3433a51 More consistent comment. 2016-08-19 00:07:32 +01:00
toasterbabe 3d9fe7c899 The ability to disable weapon rings, as heavily requested by Lat and Speedwagon for their high effort character .wads and selfishly also desired to make thokker less hacky. 2016-08-19 00:06:12 +01:00
toasterbabe 66a845a33a silly me 2016-08-18 22:24:36 +01:00
toasterbabe ff362534b4 An experimental attempt at collision correction, put behind a #define because it's buggy as SHIT. 2016-08-18 22:20:42 +01:00
toasterbabe 430a2e07cc Added linedef collision and fixed the following clipping bug, shown in gfy form. http://gfycat.com/BiodegradableNaturalHadrosaurus 2016-08-18 20:55:24 +01:00
toasterbabe 7786ef43e8 Okay, did a bunch of stuff. Getting ready to create a merge request, but not quite there yet.
* 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!!
2016-08-18 20:09:35 +01:00
toasterbabe 430d7cfbd2 Noticed some sorting issues, so introduced the sortscale struct variable. (SORRY, NO FLAG YET) 2016-08-18 15:45:44 +01:00
toasterbabe ce8ae48222 I think this is as optimised as it's gonna get. Now onto the flag! 2016-08-18 12:55:04 +01:00
toasterbabe 2d3ebc5e49 Fixed the last of the odd stretching by:
* 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
2016-08-18 12:40:45 +01:00
toasterbabe 9231a4653c SORTED, THANKS MI
http://gfycat.com/SimpleShallowDeviltasmanian

now to put this behind some sort of flag and optimise it
2016-08-17 22:19:28 +01:00
toasterbabe 66a737a7f0 fuuuuuuuu 2016-08-17 21:24:53 +01:00
toasterbabe 6c559946f0 ok no i misunderstood what he was getting at 2016-08-17 21:14:01 +01:00
toasterbabe 7096659450 Thanks to MI for helping me notice a scaling issue by code alone 2016-08-17 21:11:05 +01:00
toasterbabe 2244e9162b Some overflow checks. They're not proper like the other overflow checks, but they remove all the situations I've been able to discover without making stuff unnecessarily disappear. 2016-08-17 19:09:59 +01:00
toasterbabe 63e58a02f8 Fixed the issue mentioned in last commit, but still not the one from before that. Hrm. 2016-08-17 00:15:23 +01:00
toasterbabe 84c39c24f9 Renamed leftoffset to offset, to refer to its multifaceted uses.
Also, discovered another undesirable bug, but don't understand exactly what's going on so won't describe it here.
2016-08-17 00:03:09 +01:00
toasterbabe 10a8682620 resolved issue where the sides had the opposite scales over ANGLE_180.
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...
2016-08-16 23:38:59 +01:00
toasterbabe a2b26c3bf4 Forgot a border of screen consideration 2016-08-16 23:25:01 +01:00
toasterbabe 27cdef0075 WOOPS, did not mean to leave it in the rangecheck, now it works close to desired
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
2016-08-16 23:17:45 +01:00
toasterbabe 67f8a1295e Couldn't justify my hack in the long run, so it's back to adding and removing MF_NOCLIPTHING instead of the player pointer.
I DID make some steps towards re-implementing PIT_CheckThing for solids only in order to replace the hack long-term and hopefully use less CPU, but is currently disabled via #if 0 since I'm not comfortable changing the function signature of P_CheckPosition right now.
2016-08-16 17:49:20 +01:00
Monster Iestyn df9ad4a0e6 wall-scroll-by-linedef specials now use just linedef dx/dy to determine scrolling direction, rather than the complex system that was in place before
If there's any reason to bring the old system back we could make it togglable by one of the linedef flags I suppose. Not that many people would actually use it though, most likely
2016-08-16 17:15:39 +01:00
toasterbabe 76e53ee3b6 this is shitty and glitchy but it compiles
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)
2016-08-15 20:54:05 +01:00
Monster Iestyn 1530183ddf Fix multiple solid midtexture-related issues:
* Effect 3 (Peg Midtexture) is now accounted for properly, flipping the collision box position to match the actual rendered position of the midtexture
* Fixed incorrect application of y-offsets for non-lower unpegged midtextures collision boxes; +ve always goes up, -ve always goes down!
* Effect 4 now doesn't make midtextures solid for polyobjects at all - this "conflicted" with First Line having both Effect 4 (visible planes) and Effect 3 (intangible) simultaneously, where we kind of expect the first line's wall to not be made solid. This may be less of a problem in future SRB2 versions, but for now solid midtextures for polyobjects are disabled.
2016-08-14 16:56:41 +01:00
Alam Ed Arias 0264fd24ae @MonsterIestyn: Should probably be returning true then 2016-08-14 10:43:44 -04:00
RedEnchilada 55b8ef9f64 More stepping upward fixing ugh 2016-08-14 00:03:00 -05:00
RedEnchilada 758c77fe53 Fixed non-players having fucked slope stepup/down 2016-08-13 17:45:23 -05:00
Monster Iestyn f1a9634260 P_LineOpening now takes a mobj_t argument, instead of relying on tmthing
. tmthing can be NULL if called from PTR_SlideTraverse, so we should use slidemo instead

This fixes a crash that occurs in yet ANOTHER SUGOI map, involving bouncy walls next to sloped floors/ceilings
2016-08-13 21:41:18 +01:00
Alam Ed Arias bdb5db878a NONET should also disable UPNP support 2016-08-13 10:12:14 -04:00
toasterbabe be973d6990 expanded comment for future generations 2016-08-13 15:07:40 +01:00
Alam Ed Arias da23d93b00 Disable netplay for DirectDraw builds 2016-08-13 10:03:17 -04:00
toasterbabe 612575620b Solved the climbing-on-one-sided-lines problem another way, using the last touched line's attributes.
(After talking to Alam, we can't have floats anywhere near P_ functions, so.)
2016-08-13 14:16:06 +01:00
toasterbabe 5d6463fafc Fixed Knuckles being able to climb in space in OpenGL.
To understand: look at AjustSegs(void) in hw_bsp.c. It reallocates the vetex_t pointers for lines as POLYVERTEX_T pointers, and of COURSE things are gonna get wacky when you're casting pointers.

I dunno how resilient the FLOAT_TO_FIXED solution is or whether it'll be netgame compatible (yayyy float precision loss) but it's not like our builds are netgame compatible with themselves
2016-08-13 13:39:24 +01:00
toasterbabe 9e38f44f34 Rob requested a reversion of the NiGHTS camera changes on exiting the level, so here we go. 2016-08-12 21:24:17 +01:00
toasterbabe de77dc4413 Fixed a bug where NiGHTS form didn't properly account for changing skins mid-flight (devmode, maybe mp if standing on ground - haven't checked there)
Also as a consequence, DEFAULTNIGHTSSKIN is #defined in r_things.h instead of p_user.c.
2016-08-12 19:18:50 +01:00
toasterbabe 104fc8ba98 Partially reverted on Inu's reccomendation. 2016-08-12 16:01:03 +01:00
toasterbabe 7795e146fa Two seperate single-line fixes, both concerning the end of NiGHTS maps.
* 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).
* When completing a NiGHTS stage with a non-zero link, the link could flash up in the final few tics before the fade to black. This just checks for player->exiting to make sure it shouldn't be shown.
2016-08-12 15:56:07 +01:00
toasterbabe 8b519631f8 * Keep the camera still when ending a NiGHTS map. http://gfycat.com/ComplicatedComposedAoudad
* Correcting an earlier oversight with the SPR2_ defaulting system for super forms.
2016-08-12 15:40:17 +01:00
toasterbabe 9c02c81095 Now that it's not 3am, here's some fixes to what I pushed last night.
* That hacky anti-NiGHTS-deaxisment code I commented out because I thought it was visual only? Reimplemented in a way that is both more and less hacky. It's identical in result to the original code, but takes a roundabout method to get there.
* Sprite references for SUPE, SUPZ and NDRL are removed because they are now unused.
* Helper's flashing conditional is restructured to do less flag swapping.
* The check for super setting FF_FULLBRIGHT is limited to MAXTRANSLATIONS now, and also correctly takes into account MAXSKINCOLORS == SKINCOLOR_SUPERSILVER1.
* NiGHTS collision bounds aren't hardcoded anymore.
* NiGHTS link will never display when leaving stage.
* Slightly tweaked rules for the supercolor setting when doing a NiGHTS transformation, but only meaningful for setting FF_FULLBRIGHT.
2016-08-12 14:42:22 +01:00
toasterbabe 0c3256fa14 NiGHTS is now spr2-ised. i'll upload the relevant files and etc to the ftp
* 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
2016-08-12 02:57:37 +01:00
Alam Ed Arias 074dde5f78 Merge branch 'public_next' into master 2016-08-11 12:59:04 -04:00
Alam Ed Arias fb8de61a81 Merge branch 'master' into next 2016-08-11 12:48:52 -04:00
toasterbabe 3310b02b68 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-08-11 17:46:08 +01:00
Monster Iestyn c79428a178 Merge branch 'opengl-planes' into 'master'
OpenGL planes fix

This branch removes a specific hack in the OpenGL code for detecting if a plane is for the floor or ceiling of a sector. This it turns out fixes ceiling slopes in Boinciel's SUGOI map going missing. Though, It doesn't fix that other glitch with one FOF (must be unrelated).

If you want to test these fixes out properly, make sure working in-level sectors, FOFs AND also polyobjects all still work fine, sloped or not.

See merge request !97
2016-08-11 12:15:08 -04:00
Monster Iestyn ae5844be76 Merge branch 'fof-slope-crash-fix' into 'master'
Fof slope crash fix

This fixes yet another software renderer crash, this time relating to sloped FOFs: sometimes the renderer thinks parts of FOFs where the top and bottom heights are the same height are actually the bottom going through the top (in other words a negative height). This causes problems when drawing normal walls around such FOFs since the game obviously doesn't expect negative heights anywhere along the FOF - before slopes, the game could just flip around the top and bottom heights automatically with no problems. This branch also should fix crashes for all genuine cases of negative FOF heights when slopes are involved, I suppose.

Hopefully this stops FuriousFox's SUGOI map crashing for the time being, all seemed fine when I tested it out myself.

See merge request !96
2016-08-11 12:13:52 -04:00
toasterbabe a6f4178023 Rob requested new NiGHTS link colours, his wish is my command. (This is only vaguely appropriate for this branch, but the boat sailed on a specific Reduced_Palette branch a while ago.) 2016-08-10 23:51:35 +01:00
toasterbabe 8b333f5933 Forgot a comment. 2016-08-10 22:47:42 +01:00
toasterbabe 8f5258fc22 Two changes to the supercolor stuff.
* Don't allow arbitrary numbers to be used for a skin's supercolor, only strings.
* Devmode is no fun allowed mode, so turn off the god hyper flash there.
2016-08-10 20:31:18 +01:00
toasterbabe b3b6d5c4f9 woops, renamed superwhite to supersilver during writing and forgot to change this comment 2016-08-10 19:54:07 +01:00
toasterbabe 810e1ec041 SUPERCOLOR BONANZA COMMIT.
* 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
2016-08-10 19:48:20 +01:00
toasterbabe bc7389327a Mario invincibility colours now span solely the saturated colours (no white to black, no peach, no brown) 2016-08-09 13:59:31 +01:00
toasterbabe 742dced437 Updating I_Error to use 4 characters for the spritename only in the same way the other ones do 2016-08-09 13:04:53 +01:00
toasterbabe 4183912c60 Please don't assume indentation carries intent, especially since a break that exclusively follows an I_Error will never run 2016-08-09 13:01:56 +01:00
Alam Ed Arias 6c6cbecb10 I do not think you wanted to break on EVERYTHING 2016-08-08 21:30:20 -04:00
Monster Iestyn 841ee6eca0 Reduced GETFLAG macro args to just one as requested, true/yes are also valid now like with level header flags params (everything else is considered 'off') 2016-08-08 22:34:47 +01:00
Monster Iestyn f46ec64958 each SF_ flag can be set by their own parameters again, does not replace "flags" but is an alternative to it
e.g.: super = 1 for SF_SUPER, noskid = 1 for SF_NOSKID, machine = 1 for SF_MACHINE
2016-08-08 21:17:51 +01:00
toasterbabe c77b3aa58d Sorted an issue MI discovered (I was basing the flip code off the C0 scenario rather than the Cn one) 2016-08-08 17:24:36 +01:00
toasterbabe 6a070adf4b Making the flag value more obvious. 2016-08-08 14:35:18 +01:00
toasterbabe aa89eadac4 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_new_spriteframe_angle 2016-08-08 14:16:20 +01:00
Alam Ed Arias c3690092e1 Merge branch 'public_next' into master 2016-08-07 23:29:01 -04:00
Alam Ed Arias 774a93c819 Merge branch 'master' into next 2016-08-07 23:23:50 -04:00
Wolfy bbb4bb8a05 Merge branch 'invalid-map-name-test' into 'next'
-warp checking for invalid map names

I've noticed a bunch of new people getting the "Cannot warp to map 0 (out of range)" error when testing their custom maps. On asking what map name they used, it was clear they didn't use a MAPxx name at all. Sadly it was not obvious to them that other kind of map names are not accepted by SRB2, so I thought it best we make that more clear in-game.

SRB2 now gives you the error "Cannot warp to map \[your input\] (invalid map name)" if you used -warp with a param that is neither a MAPxx name or a plain number.

See merge request !99
2016-08-07 16:34:23 -04:00
Wolfy 8561a6b413 Merge branch 'sprite-loading-tweaks' into 'master'
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
2016-08-07 16:33:15 -04:00
RedEnchilada 02d3382408 Leave a note to anyone foolish enough to try to fix this 2016-08-07 12:17:31 -05:00
toasterbabe 0a75b8d918 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_new_spriteframe_angle 2016-08-07 11:21:53 +01:00
toasterbabe 76e658bf1b Minor re-ordering to optimise this branch. 2016-08-07 00:21:16 +01:00
toasterbabe 6a865abb93 Bugfix for spike sound playing when attempting to attack non-solid spikes with CA_DASHMODE/CA_TWINSPIN/CA2_MELEE. 2016-08-06 23:54:38 +01:00
toasterbabe c678220857 New S_SKIN attribute - "camerascale", another float. Acts as a scale modifier to t_cam_dist and t_cam_height. 2016-08-06 23:18:37 +01:00
toasterbabe 029fd156a8 Some nice optimisations to the new character select menu - no need to iterate up to 3 times a tic at the expense of ((32*2 + 2)*UINT8 - 3*INT32) memory. 2016-08-06 22:41:25 +01:00
toasterbabe 5e35d629f2 A clearer understanding of freeslots and their relation to FF_FRAMEMASK, explained via comment. 2016-08-06 21:22:38 +01:00
toasterbabe 9d870ea31d Enabling patch.dta, and also upping the number of SPR2_ slots (not just freeslots) to be equivalent to FF_FRAMEMASK. 2016-08-06 13:53:16 +01:00
toasterbabe c9227dfbed Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-08-06 12:34:26 +01:00
Monster Iestyn 5b2705ef48 Merge branch 'spr2-freeslots' into 'master'
Spr2 freeslots

Needed for Miles, generally a good idea to have around anyway. Considering Miles uses it without problems, seems to work fine.

See merge request !24
2016-08-04 16:24:37 -04:00
Monster Iestyn f465de8f8c Nev3r's vertical sky distortion 2016-08-01 21:07:01 +01:00
toasterbabe 1ac1f27e4c Preparation for the SPR2_ freeslot branch's merger. *crosses fingers it happens soon* 2016-08-01 17:17:25 +01:00
Monster Iestyn fe5b8c58af Add basic support for animated sky textures 2016-07-31 20:51:39 +01:00
Monster Iestyn 4c4f124611 Detect if -warp's parm is actually a valid map name (MAPxx or plain number), and print an "invalid map name" message if not 2016-07-28 16:07:26 +01:00
Monster Iestyn 2b985bda85 Make sure we detect if start >= numlines so we can deal with that properly
for some apparent reason the compiler didn't like the while loop condition edit on its own (it complained about inline failures for P_MobjReadyToTrigger for some reason), so I had to add that extra bit above the while loop... and it was happy again, huh
2016-07-28 14:57:19 +01:00
Monster Iestyn 2870e19f7f Take out fixedheight-based hacks for checking if floor or ceiling! Use an "isceiling" boolean for that instead
This apparently fixes most of the issues with ceiling slopes in Boinciel's SUGOI map
2016-07-27 19:56:21 +01:00
Monster Iestyn dc765cde2c Fix R_DrawColumnShadowed_8 crash encountered in FuriousFox's map
If you want more specifics, sloped FOFs are to blame it turns out: sometimes the bottom of an FOF wall blocking a segment of an in-level wall column can be considered ABOVE the top part of the FOF there (yikes), and then the dc_y* values go offscreen, and then BOOM
2016-07-24 18:54:01 +01:00
Alam Ed Arias 6b94f286e2 Merge branch 'public_next' into private 2016-07-24 01:08:31 -04:00
Alam Ed Arias 03ddc1f29a define SRTICT_ALIGN to - if the system is x86/x64 system 2016-07-23 23:26:08 -04:00
Alam Ed Arias ddce305c17 under clang, defined does not means true 2016-07-23 23:14:24 -04:00
Alam Ed Arias 82fad646e7 wad and lumps are unsigned, not signed 2016-07-23 23:02:10 -04:00
toasterbabe 436dfbb24f Crashed in THZ1 when testing going down the long section at the end, EIP blames this line, wasn't really necessary in the first place... fair enough. 2016-07-23 21:37:32 +01:00
toasterbabe d0bb7293bd Maximum Drop Dash speed of 75*FRACUNIT. 2016-07-23 21:01:40 +01:00
toasterbabe ad03bb5278 Force Shield's air ability is now the Drop Dash (thanks, Sonic Mania, for making me like the momentum redirection idea by recontextualising it to collision with the ground only!)
* Press spin in midair to make the shield flash solid repeatedly and make a number of ding noises.
* When the player with a flashing, dinging shield hits the ground, they are sent off in spinning form at the maximum of 2*abs(momz) VS the 3D hypotenuse of momx, momy, and momz.
2016-07-23 18:25:51 +01:00
Alam Ed Arias 7b88db478c Merge branch 'public_next' into private 2016-07-21 19:22:30 -04:00
Alam Ed Arias 5c234a817a Merge branch 'master' into next 2016-07-21 18:49:33 -04:00
Alam Ed Arias f6b8b51ac2 Merge branch 'software-fixes' into 'master'
Software crashes fix... fix

Fixes a typo introduced by merge request !75 that caused upper textures to set the wrong ceiling clipping value when not visible, allowing all sorts behind the walls to be visible. This is most noticable in GFZ2 when the inside of the tunnel section is visible

...probably a good idea to make sure this one doesn't introduce any MORE visual glitches by mistake (again, compare with 2.1.15 if possible)

See merge request !93
2016-07-21 17:45:45 -04:00
Alam Ed Arias df0a90957f Merge branch 'tilted-transparent-flats-fix' into 'master'
Fix for flats with transparent pixels on slopes

This fixes how R_DrawTiltedSplat_8 unintentionally allows the cyan pixels to NOT be considered "transparent" if after being remapped, depending on sector brightness and/or linedef type 606 colormaps, the result of remapping is not palette index 247 (the cyan we typically turn transparent). That is, the original colors from the source flat graphic are not checked, but instead the __result__ of coloring the flat under the respective colormap is checked for "transparent" pixels. This is only a problem for the tilted splat drawing function, not the regular one for non-sloped planes with cyan-pixel-using flats.

I found out about this bug from the issues Ritz was having with sloped 255-alpha translucent FOFs using transparent flats and his custom COLORMAP lump (and later when he applied a linedef type 606 colormap to the FOF) for his custom map. Thankfully he has some workarounds, but this should fix the code-side issues that caused his problems in the first place.

I also fixed stuff with another splat drawing function that's not currently used atm (maybe it will be in the future, if splats themselves are ever enabled again? *shrugs*).

See merge request !92
2016-07-21 17:14:43 -04:00
Alam Ed Arias b02c824da8 Merge branch 'skybox-render-fix' into 'master'
Skybox rendering offset fix for third person/alt view camera

Fixes the issue reported in this thread: https://mb.srb2.org/showthread.php?t=41729

I dunno if this will negatively affect any existing skyboxes in SRB2's own levels, that said. I tried out THZ2 and CEZ1 with this fix at least but I forgot to compare them with how they are in 2.1.15 so _*shrugs_*

See merge request !94
2016-07-21 16:58:06 -04:00
Alam Ed Arias 9301344003 Merge branch 'macosx-hacking' into 'master'
OS X Makefile build setup

This merge request:

* Cleans up the OS X bundle resource location code and fixes a SIGSEGV and memory leak
* Simplifies and fixes the OS X desktop alert code, closing more leaks
* Adds the MACOSX build flag to the Makefiles, to allow building a binary (but not Mac app yet) of SRB2.

This is intended to make it easier for developers to build on Mac OS X, without having to pull in all of XCode. You can keep using CMake if you prefer.

To test, use `make -C src MACOSX=1 NONX86=1 SDL=1 NOASM=1` for a release build.

Left to do:

* Add a content bundling script to be run after building, and a flag to trigger doing that.
  `MACOSX_BUNDLE` maybe?
* Somehow get access to a Mac running PowerPC and figure out how to build a multi-platform binary.
* Add the proper magic to compile using gcc if requested. (Right now, compilation is done via LLVM/Clang)

See merge request !72
2016-07-21 15:38:46 -04:00
Alam Ed Arias a9c521031d Merge branch 'gasjets_and_slopes' into 'next'
Gas jets, fan objects, springs and slopes

Whoop whoop whoop minor bugs that only get noticed due to weird experiments whoop whoop whoop

* For gas jets only: the object's standingslope is ALWAYS null. No drifting down the slope for you.
* For gas jets and fan objects: Now checks whether the player's top is below the bottom of the launcher, instead of its bottom. zdist calculation not affected, since it's signed and okay with being negative by about the height of the player.
* For all 3: the player's standingslope is NULL'd so the player isn't launched off at a wacky angle if they're standing on a slope then walk into the thing.

See merge request !91
2016-07-21 15:11:49 -04:00
Alam Ed Arias 1a0fcbd8dc Revert "Merge branch 'RemoveINetC' into 'master'"
This reverts commit 8607f5247c, reversing
changes made to 11d76a6562.
2016-07-21 14:42:00 -04:00
Alam Ed Arias 8607f5247c Merge branch 'RemoveINetC' into 'master'
Remove i_net.c

The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).

The vast majority of code in the file seems to be contained in HAVE_SDLNET ifdefs, and I'm pretty sure SRB2 has never used SDLNET in a public build. The only bit not contained in that block is I_InitNetwork(), which just prints an error and returns false.

Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.

See merge request !73
2016-07-21 14:15:58 -04:00
Alam Ed Arias c5fe08dcd2 Merge branch 'aatree-refactor' into 'next'
Re-factoring AA tree code from m_misc.c/m_misc.h into its own files

What the title says. The AA tree-related code now lives in the files m_aatree.c and m_aatree.h. Part of why I did this was to solve this m_misc.h/w_wad.h cyclic dependency problem (involving MAX_WADPATH and AA trees themselves) mentioned in the now-removed comments, another reason was ...only OpenGL uses AA trees at all, why include the relevent structs/functions/otherwise anywhere except where is necessary (which is very few files as it turns out)?

Otherwise, it just looked better on its own rather than mixed with all the other stuff already in the m_misc files. Not really important or anything affecting gameplay at all I guess.

See merge request !82
2016-07-21 14:13:38 -04:00
toasterbabe d0cd1d951f Add prefoppositecolor to Lua. 2016-07-20 15:53:08 +01:00
toasterbabe 4435815c35 "prefoppositecolor" - exists solely for metal so he can have his sonic 4 peridot-background end sign when using skincolor_blue. not updating player.dta yet though. 2016-07-20 15:48:24 +01:00
Monster Iestyn 6ba568ac49 Fixed typo of mine that lead to the ceiling part of GFZ2's tunnel section being rendered wrongly 2016-07-20 15:11:36 +01:00
toasterbabe f1311c515d Making FF_MIDDLESTARTCHANCE more useful for FF_ANIMATE animations. 2016-07-19 13:45:31 +01:00
toasterbabe 46e50a523f Let's be consistent with how other parts of the code handle this same issue of conditional operations surrounding non-conditional operations. 2016-07-19 01:19:03 +01:00
toasterbabe cfcd25f2cd Fixing a bug which could be caused by tapping up/down on the character select at high speeds by ensuring that o is never negative instead of assuming the one circumstance it may have been negative under. 2016-07-19 01:03:40 +01:00
toasterbabe 333d8c882e Recreating NAMEcLcR sprite angle loading in internal, as Inu requested. 2016-07-19 00:04:00 +01:00
Monster Iestyn 77a40e9016 Slightly unrelated, but if R_DrawTranslucentSplat_8 is ever going to be used this is probably more efficient (also fixing early colormap application for the last part) 2016-07-17 23:01:07 +01:00
Monster Iestyn 9ad205f5ba R_DrawTiltedSplat_8 fix: apply colormapping AFTER checking the source pixel is cyan first 2016-07-17 22:33:37 +01:00
toasterbabe ac2ff5e386 CA_MELEE. Mostly complete.
* When moving slowly, P_InstaThrust at S_SKIN's maxdash forward, and set momz to S_SKIN's mindash upwards. Plays a tok noise (not thok). Hurts enemies/bosses, busts spikes/monitors/all types of bustable blocks.
* When moving quickly... doesn't do anything yet, but WILL do a slide.

Also, P_DoSpinDash is now renamed to P_DoSpinAbility, and CA_TWINSPIN users can bust all bustable blocks on collision too.
2016-07-17 21:31:15 +01:00
toasterbabe 4168fc02cb Decided the forcing of S_PLAY_FALL when PF_THOKKED was present wasn't that great. 2016-07-17 18:57:03 +01:00
toasterbabe 4bd56b82be Better multiability support.
* CA_TWINSPIN - you can do it multiple times
* CA_DOUBLEJUMP - your jump height is reduced each time, like in Kirby games. The number of extra jumps once you've left the ground that are available is determined by the character's actionspd.
2016-07-17 17:41:44 +01:00
Monster Iestyn 4d0f0230de Fix chasecam/awayviewmobj viewz offset to be consistent with non-skybox frame rendering 2016-07-17 17:36:37 +01:00
toasterbabe df8568642e Dashmode users can break spinbust blocks when dashing, twinspin users can break both spinbust and Knuckles-only blocks when twinspinning. 2016-07-17 16:34:07 +01:00
toasterbabe cc9f874c5d Further improvements to the character select menu. 2016-07-17 16:21:46 +01:00
toasterbabe 9557cad235 Noticed some bad logic and typos, so correcting. 2016-07-17 15:56:31 +01:00
toasterbabe 9c48cbb68c Doing stuff for Rob, turns out the anim was designed to go twice as fast. Tally ho! 2016-07-17 01:22:50 +01:00
toasterbabe 898e17a441 SF_MACHINE characters create boss explosions on death.
Also, the gravity of drowning characters has been reduced to look more natural.
2016-07-16 23:26:52 +01:00
toasterbabe 8cb8990863 Merge branch 's_skinprovements' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-07-16 22:44:01 +01:00
toasterbabe f757fb3545 SF_MACHINE. Currently only changes drowning, but could do more.
* Electric sparks coming off entire body instead of bubbles coming out mouth
* Different sounds.
* Different icons.

These sprites are currently local only, but I'll be doing a lot of asset updating this evening since Rob asked me to so it won't be long until you can get them.
2016-07-16 22:43:49 +01:00
Alam Ed Arias 4e064dc335 whitespace: cleanup 2016-07-16 16:05:00 -04:00
Alam Ed Arias e393b12cec Merge branch 'master' into s_skinprovements 2016-07-16 16:04:10 -04:00
Alam Ed Arias 4e322af6cb whitespace: cleanup 2016-07-16 16:03:32 -04:00
toasterbabe 0f79e9ea3b On Rob's request, the twinspin can break spikes. (woo) 2016-07-16 18:54:22 +01:00
toasterbabe 21ba204c9e Revert of the FF_MIDDLESTARTCHANCE changes for player states, although the flag still exists internally since there's no reason to remove it. 2016-07-16 18:34:42 +01:00
toasterbabe 765254f183 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements 2016-07-16 17:24:19 +01:00
toasterbabe d8065fa525 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements
# Conflicts:
#	src/d_player.h
#	src/dehacked.c
#	src/info.c
#	src/p_user.c
2016-07-16 17:23:25 +01:00
Monster Iestyn 99ee3d5149 Merge branch 'side-springs' into 'master'
Sideways springs, horizontal hog-launchers, perpendicular plungers...

Call them what you like, they're in the code now. And have been for months!

Nev3r uses the hell out of these and I'm fed up of them being <!>'s all over the place, so please have 'em in master so we can update srb2.srb and make things better for all of us.

See merge request !30
2016-07-16 12:20:22 -04:00
toasterbabe 94490623b5 Cleanup of P_CheckUnderwaterAndSpaceTimer's conditional checks for future PF_ROBOT changes, where characters like Metal make electric zaps instead of bubbles. 2016-07-16 17:11:34 +01:00
Monster Iestyn 9b15247191 Merge branch 'dashmode' into 'master'
Dashmode

This branch Metal Sonic's abilities (CA_DASHMODE) to the game.

See merge request !26
2016-07-16 12:09:20 -04:00
toasterbabe 226785dcd6 Putting the swim animation checks in one place. 2016-07-16 14:45:22 +01:00
toasterbabe cc35a5e1c1 Ported CA_HAMMER from new-character-actions in a way that takes advantage of all of the non-hardcodey things I've added in this branch.
Also, it's called CA_TWINSPIN because that's more inoccouous.
2016-07-16 13:55:12 +01:00
toasterbabe df8be73787 ...fixed this error 2016-07-15 22:13:47 +01:00
toasterbabe 1e648e4709 Woops, forgot SOC parser. 2016-07-15 17:32:29 +01:00
toasterbabe 03fe312490 On MI's reccomendation, a skin flag to disable the effects of FF_MIDDLESTARTCHANCE for specific characters whose animations might not be symmetrical. 2016-07-15 17:30:52 +01:00
toasterbabe 01dc98f8f0 New frame flags for more complicated animations.
* FF_MIDDLESTARTCHANCE - has a 50% chance of starting the spr2 or FF_ANIMATE animation halfway in
* FF_SPR2ENDSTATE - if var1 == S_NULL, don't loop, just stop incrementing the frames. Otherwise, go to the state represented by var1.

The former is just something I did for fun, the latter is something that'll come in handy when porting in new-character-moves.
2016-07-15 16:48:30 +01:00
toasterbabe 9b68da63de Minor cockup with availability handling not being updated when I changed how it worked. 2016-07-14 17:10:17 +01:00
toasterbabe b8fe20a086 Changing irrelevant comment. 2016-07-14 16:27:48 +01:00
toasterbabe 4c6ed6da76 The availability unlockable number for a skin is now available, read only, to Lua. 2016-07-14 15:51:03 +01:00
toasterbabe 417e9187d9 Realised the potential for out-of-bounds memory accessing, so put some limits in place to prevent that from happening.
(skin->availability is a UINT8, so it'll never be negative)
2016-07-14 14:45:15 +01:00
toasterbabe caed5718c1 Characters can now be unlocked just like any existing unlockable.
Setup:
* S_SKIN needs an "availability" line. Set to 0 to have always available, otherwise is assumed to be UINT8 unlockable number. If it's a valid unlockable, its name will be copied over with the character's realname.
* Define an unlockable via SOC or hardcode. If you don't want it visible on the Secrets menu, just set its type to None. Everything else is as normal - you can set the conditionset to whatever, objective, height, nochecklist, nocecho...
2016-07-14 14:39:22 +01:00
toasterbabe c5f6ae8aaa Fixed forceskin to not always allow due to bad logic. 2016-07-14 13:24:57 +01:00
toasterbabe 674ec3e515 Correction of the new default revitem setup. 2016-07-14 12:31:20 +01:00
toasterbabe 6e0c9f7e18 The "forcecharacter" level header now allows for hidden characters.
Also, new default for revitem to match player.dta, and an updated Force Skin netgame option name to reflect the fact it's string based now.
2016-07-13 22:28:23 +01:00
toasterbabe 76910a8e11 Sorry, one last change. I know I should be more certain when committing. 2016-07-13 20:24:39 +01:00
toasterbabe f1b1e1aa9b I'm stupid. 2016-07-13 20:19:52 +01:00
toasterbabe 2ee22fc40a Dedicated servers have all skins unlocked for the purpose of forceskin.
Meanwhile, a sneaky sneaky for hiding hidden characters further.
2016-07-13 20:14:07 +01:00
toasterbabe a108fcce5b Simplification of the hide check after discussion with Rob. 2016-07-13 19:10:31 +01:00
toasterbabe 824458a5ff Swimming animation! Since I know we want it for Smiles eventually.
Also, I guess CA_SWIM isn't forced into running on water anymore.
2016-07-13 18:18:18 +01:00
toasterbabe c2aba46298 New S_SKIN attributes.
* radius - sets the player's radius for that skin.
* height - sets the player's normal height for that skin.
* spinheight - sets the player's spinheight for that skin.
* shieldscale - see http://i.imgur.com/BQ5DhKC.png for justification
2016-07-13 15:15:45 +01:00
toasterbabe 8087cde5db Correcting a few cockups. 2016-07-13 13:26:21 +01:00
toasterbabe b2bfe3737a Rudimentary SOC shuffling if you add a character with the same name as a previous character to prevent character select from breaking. 2016-07-13 12:17:53 +01:00
toasterbabe fcfe8c0132 More clearly defined handling for replacing character select images. Specifically takes into account whether the hidden character was added in this file or a seperate one.
Also, removed some commented out code regarding character selects, and removed a useless case for R_SkinAvailable().
2016-07-12 20:10:01 +01:00
toasterbabe 80a3d79d4d Some hacks added to forceskin to:
* support hidden characters
* take the skin->name, not the number
* display the skin->name in the menu

Also, minor tweaks to other things.
2016-07-12 14:40:20 +01:00
toasterbabe b5108afe16 Substantial re-engineering for the foundations of hidden characters.
R_SkinUnlock defines the circumstances under which a skin is available. For simplicty's sake, I've currently bound it to an S_SKIN variable so I can toggle it easily, but it WILL be replaced with a hook into the savegame system at some point.
* Currently has three tiers of unlock - freebie (forceskin or modeattacking via a loaded replay), Ringslinger Only, and SP/Coop and Ringslinger.
* I don't know anything about netcode so I basically decided to make R_SkinUnlock relevant only under local circumstances, try as hard as possible to stop bad skin info from getting sent to the server, and then admit defeat once the server has the information. If this is a bad choice, please discipline me and show me how to fix it.
* Character Select now checks for whether the character is hidden or not on menu load and does/undoes it based on that info, but will never touch one disabled via SOC. I also used this opportunity to optimise, checking for/filling out charsel pictures instead of doing it later. (It now also includes special casing for a select screen with zero characters!)
* Mode Attack now hides hidden characters in its character select based on SP rules.

Things that still need to be done:
* ForceSkin_OnChange. Is there a graceful way to handle this?
* No obvious skin name conflicts. Add a salt to the names of hidden skins, and then remove it when they're unhidden?
* The gap between Knuckles' skin number and the first custom character anybody adds will be way too obvious. A seperate hidden skin numbering system? Start at 32 and count up from there? There's a few ways...
2016-07-12 03:15:58 +01:00
toasterbabe ee92e043b9 Preparation for hidden characters, making sure R_SkinAvailable was being used where appropriate.
Also, bugfix for something my optimisation introduced.
2016-07-11 23:40:31 +01:00
toasterbabe eee6a6ff45 Optimisations to the character select screen.
* If a character select character image is not set, don't iterate every tic - iterate on first image get and then save to the struct.
* A character select screen with only two characters now has special case handling.
* A memory leak in the making has been plugged. (specifically, picname not being Z_Free'd if the loop fails to do so)
* Logic/operation simplification.

Also, some typo corrections and clarity case movements of stuff in other files I've been looking at.
2016-07-11 23:01:43 +01:00
Alam Ed Arias 8f0994b38b Merge branch 'public_next' into master 2016-07-11 16:22:05 -04:00
Alam Ed Arias 765d68899f Merge branch 'master' into next 2016-07-11 16:10:40 -04:00
Alam Ed Arias b347ed2ca6 Merge branch 'public_next' into master 2016-07-11 15:52:27 -04:00
Alam Ed Arias 59fd7bbe46 Merge branch 'public_next' (early part) into private 2016-07-11 15:50:06 -04:00