The roulette contains NO (non-seeded) RNG anymore. You manually stop it at any time.
Still needs the visual of the items scrolling, to make it not blind.
Instead of the absolute insanity that is V_DrawCroppedPatch, which makes you specify the number of pixels to crop off the top/left and then the number of pixels to show after the crop ... you just use V_SetClipRect to create a rectangle for any future draws to be cropped down to, and V_ClearClipRect afterwards to clear it.
Currently only supported by V_DrawStretchyFixedPatch. Ideally other drawing functions should also receive clipping rectangle support too.
* `gamedata->unlockpending[MAXUNLOCKABLES]` stores info to prevent the same unlock causing multiple sounds, and simplify `M_GetNextAchievedUnlock`
* Remove the DEVELOP cechotext
* Each unlock on the challenges menu updates all the unlockables, rather than just `M_CheckUnlockConditions`
* The unlock update function handles the incoming unlock sound itself if `loud` is true. This will allow us to quickly replace every sound at once when we've made a decision what to use
Also:
* Fixes the size of the savebuffer allocation in `G_SaveGame` to account for the challengegrid array.
- Unlock explosions should occour relative to the highlighted coords, not the selected coords. (Yes, they can be disjoint.)
- I got the comments for left and right on challenge tile auto focus swapped.
- The rightwards cap on auto focus scroll for large tiles was handled incorrectly.
- M_ChallengesAutoFocus handles all scenarioes where the game automatically highlights a tile, rather than via user input
- Fix leftward scrolling onto highlighted large tiles being inconsistent between manual and auto selection
- Fix nonexistent challengegrid error case for input handler
- Way more comments, to help the maintainability of the code
System for netsyncing unlocks, inspired by but with nowhere near as many moving parts as (STJr/SRB2!1756).
* `gamedata->unlocked[MAXUNLOCKABLES]` is duplicated to `netUnlocked[MAXUNLOCKABLES]` (or all `true` in `dedicated`
* New `local` boolean for M_SecretUnlocked
* Removed last vestiges of SRB2 special stage token code because it occupied the spot in the netsave we wanted to use.
* Correct typing of multiple `m_cond` functions that returned `boolean` constants as `UINT8`s.
* Challengegrid now loops and scrolls horizontally.
- Scroll position currently tied directly to selected row/column, but can (and will) be seperated relatively easily later.
- In `DEVELOP` builds always scrolls - but in release builds, if someone makes a custom gamedata with less than 20 challengegrid columns (BASEVIDWIDTH/16), it'll remain static.
* Challenge ticker now automatically unlocks all pending at a rate of ~one per second.
- Based on VC discussion and Kirby Air Ride.
- Since no user input necessary, screen is now part-faded when unlocks are pending.
* Drawing a specific grid tile is now its own `k_menudraw.c` function.
* There is now a light grey grid around unselected tiles.
* Unlock explosions now use the tile's colour or, if not provided, the current profile's color.
Completely clientside, unlike SECRET_SKIN. Followers have no gameplay function, and it saves us having to write even more to our demos/netsaves. Replaces SECRET_WARP.
Also:
- Now don't apply skins or followers from profiles if the skin is locked - instead, get the closest skin in stats. (Same function as from demos!)
- If you're looking at a profile and the skin or follower are locked, make them solid colour (TC_BLINK).
- Don't show the ring cursor before you've selected a profile.
- M_MapLocked
- If a level has a cup, will return true if that cup is locked
- will return always false in marathon mode (not yet accessible, that'll be another branch's work, but thinking ahead)
- Getting rid of a bunch of index fudging caused by SINT8 rather than UINT8 - we can use MAXUNLOCKABLES as the special invalid value
- You can now create an unlockable that gives you an emblem only with SECRET_EXTRAEMBLEM.
- One step above the completely rewardless squares from Kirby Air Ride.
- Added color to `unlockable_t`.
- Can be used both with user-specified icons (remappable green->color) and with non-SECRET_SKIN default graphics (invincibility full-range remap)
- Replaced condition type UC_EXTRAEMBLEM with the more general UC_UNLOCKABLE.
- MAXUNLOCKABLES is now == MAXCONDITIONSETS
- MAXCONDITIONSETS is UINT8_MAX
- MAXUNLOCKABLES is (MAXCONDITIONSETS-MAXEXTRAEMBLEMS)
Haven't come to a decision yet on whether Extra Emblems should just be made with the Unlockable struct or maintain their distinct status, this commit kicks that can down the road
- The pieces do the positioning, instead of the capsule itself. This makes it so that the parts update after the capsule has applied its momentum.
- Use proper inradius instead, so the sides line up.
- Because of the above change, the capsule as a whole is bigger. This means...
- Increased hitbox again
- Changed a few of the sprites
Done so it doesn't begin during a transition, and you get to properly appreciate the first one
Comes with the following changes and refactors:
* Uses the default UN_RR00c icons for entries without icons (currently all except SECRET_SKIN)
* `challengesmenu->extradata` updated in less places
* `M_GetNextAchievedUnlock` no longer handles setting `unlocked` so we can do that during the above timer
* Test button explosion repetition no longer duplicates M_ChallengesTick code
* Instead of giving `challengesmenu->currentunlock == MAXUNLOCKABLES` special behaviour, add a `challengesmenu->requestnew`
* The crash prevention for nonexistent extradata in the input handler is now actually functional.
* Generalised the existing system to work here, no need to copypaste
* Spawned on unlock AND on debug button, so you can watch how they propogate
* Currently unsure on how large tile does it - right now it just spawns two sets of explosions on topleft and bottomright corners.
Also fixed an issue where a large tile could fail to show its highlight border if it looped between the two ends of the challenge grid