Commit graph

18945 commits

Author SHA1 Message Date
Sally Coolatta
534026764c Make Eggman Mark actually work 2022-12-12 00:22:14 -05:00
Sally Coolatta
79813f1398 Merge branch 'clipping-rectangle' into deterministic-roulette 2022-12-11 23:58:55 -05:00
Sally Coolatta
a481e4b34b Deterministic roulette
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.
2022-12-11 23:58:11 -05:00
James R
db062fd0bb OpenGL: clipping support for HWR_DrawStretchyFixedPatch 2022-12-11 17:45:15 -08:00
James R
09c55858b7 Fix off-by-one when clipping rectangle bottom 2022-12-11 17:43:11 -08:00
Sally Coolatta
8cdfcea319 Prevent modifying cliprect, wordier vars 2022-12-11 16:47:25 -05:00
toaster
7f45ae4212 Now that the background and border colour is the same, only draw unselected border when a tile is being drawn. 2022-12-11 20:34:52 +00:00
toaster
ae43e3a6ce A little extra cleanup to M_DrawChallengeTile 2022-12-11 20:28:41 +00:00
Sally Coolatta
b50fbce5ee Clear clipping rectangle before each hook call
Prevents Lua from being able to make a mess.
2022-12-11 14:14:12 -05:00
Sally Coolatta
3a8b1ea8e6 Comment out test case 2022-12-11 14:02:48 -05:00
Sally Coolatta
b95a18676f Clipping rectangle
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.
2022-12-11 13:53:51 -05:00
toaster
b92af9222f Change the colours on the Challenges menu for increased contrast 2022-12-11 17:28:23 +00:00
toaster
edeb9d072c Re-add cross-around hack for M_DrawChallenges 2022-12-11 17:01:25 +00:00
toaster
f179a3523f Clean up M_UpdateUnlockablesAndExtraEmblems and related
* `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.
2022-12-11 16:59:11 +00:00
toaster
0211bed1eb Fix the condition for non-net unlock check with M_SecretUnlocked to not trip if the host has it unlocked 2022-12-11 16:14:12 +00:00
toaster
803490d7aa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/d_clisrv.h
#	src/doomstat.h
#	src/g_demo.h
#	src/m_cond.h
2022-12-10 21:54:58 +00:00
toaster
6d4b55a2d5 Add a x/X counter to the unlocks menu, like KAR and Smash 2022-12-10 21:06:24 +00:00
toaster
d2c9c7027d Correct some issues with the previous commit.
- 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.
2022-12-10 21:05:06 +00:00
toaster
358305d872 Clean up the Challenges menu code
- 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
2022-12-10 19:47:21 +00:00
toaster
d554856d04 No longer necessary to call M_CheckUnlockConditions twice in M_UpdateUnlockablesAndExtraEmblems 2022-12-09 17:29:16 +00:00
toaster
e7c79ab461 M_CheckNetUnlockByID
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.
2022-12-09 17:26:52 +00:00
James R
32f747fd5a Merge branch 'voltage-damage' into 'master'
Add voltage damage type, for Lightning Shield

See merge request KartKrew/Kart!804
2022-12-09 04:14:31 +00:00
James R
f4a7aa487c Merge branch 'scale-smoldering-momz' into 'master'
Mobj scale explosions smoldering rising momentum

See merge request KartKrew/Kart!803
2022-12-09 04:14:15 +00:00
James R
70cf67bd15 Merge branch 'scale-speed-to-weight-buff' into 'master'
Mobj scale weight buff from moving above top speed

See merge request KartKrew/Kart!802
2022-12-09 04:13:54 +00:00
Sal
697daba74b Merge branch 'testrun-develop' into 'master'
Start on Test Run by default, only in DEVELOP builds

See merge request KartKrew/Kart!797
2022-12-06 10:22:44 +00:00
Sal
c5472a23f6 Merge branch 'spring-reset' into 'master'
Reset pitch/roll on springs + trick panels

Closes #348

See merge request KartKrew/Kart!798
2022-12-06 10:22:29 +00:00
Sal
b51769c015 Merge branch 'fix-solid-midtex' into 'master'
Fix solid midtextures

Closes #349

See merge request KartKrew/Kart!799
2022-12-06 10:22:16 +00:00
Sal
aa44e7682a Merge branch 'egg-capsules-solid-fix' into 'master'
Egg Capsule fixes

See merge request KartKrew/Kart!800
2022-12-06 10:22:00 +00:00
James R
90a4159acd Add IMON sprite definition 2022-12-05 13:45:26 -08:00
James R
cbb1f3c714 Fix NULL lump name guard for W_CheckNumForName 2022-12-05 13:06:52 -08:00
James R
3bc359e298 Mobj scale explosions smoldering rising momentum 2022-12-05 13:06:23 -08:00
James R
abdb2e3ac3 Set Lightning Shield attack to DMG_VOLTAGE 2022-12-05 13:04:47 -08:00
James R
7b2095f6a5 Scale player weight buff from speed to mobjscale 2022-12-05 13:03:46 -08:00
James R
5f42692b8f Merge branch 'S_ReducedFXSoundAtVolume-player_t-owner' into 'master'
Use player_t parameter in S_ReducedVFXSoundAtVolume

See merge request KartKrew/Kart!790
2022-12-05 21:00:36 +00:00
James R
c7ad1e659e Merge branch 'universal-typedef' into 'master'
Move all typedef into one file

See merge request KartKrew/Kart!791
2022-12-05 20:59:43 +00:00
toaster
d78668e0a6 Crash prevention: Only do debugging switcharoo on a tile that has a valid unlockable assigned. 2022-12-04 20:59:58 +00:00
toaster
a657a5e591 Disjointed scroll and selection
* You can be at most 3*16 pixels away from the centerline.
* Bonus polish: during unlock sequence, movement is smooth and zips back and forth.
2022-12-04 20:59:13 +00:00
toaster
be38ba1511 A heaping of polish
* 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.
2022-12-04 15:30:38 +00:00
toaster
fefaee1982 SECRET_FOLLOWER
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.
2022-12-04 01:09:08 +00:00
toaster
a33d6d9235 Fix level/cup unlocks
- 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
2022-12-03 17:29:14 +00:00
toaster
f25907d7bc M_Challenges: only get a random challenge to focus on if you're not about to unlock something 2022-12-03 16:26:46 +00:00
toaster
d061dd09fd Removing extraemblem_t
- 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
2022-12-03 14:52:58 +00:00
toaster
017871eaad Custom Icon support for unlockable_t 2022-12-03 12:18:59 +00:00
toaster
6671e181b0 Increase unlockable/conditionset limits
- 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
2022-12-03 11:40:58 +00:00
Sally Coolatta
2140c2f616 Use P1-4 starts in Capsules Attack / Bonus Stage
Rather than randomized Battle starts.
2022-12-03 04:45:59 -05:00
Sally Coolatta
226cb7d736 Update capsule parts
- 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
2022-12-03 04:25:34 -05:00
Sally Coolatta
d6bd869b92 Give Egg Capsules drop shadows 2022-12-03 03:08:44 -05:00
toaster
9df1f1d34c Unlock explosions are now slightly delayed
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.
2022-12-02 22:39:45 +00:00
toaster
9de675165f Roughest layout from cup grid 2022-12-02 22:03:33 +00:00
toaster
5e76896ac4 Challenge unlock explosions (from character select screen)
* 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
2022-12-02 21:31:13 +00:00