Commit graph

20672 commits

Author SHA1 Message Date
toaster
5bb149c47a Permit M_CheckNetUnlockByID if conditionset is zeroed 2022-12-13 22:20:06 +00:00
toaster
7081ffd509 Fixes and changes for Emblem system
- New `flags` field
    - Permits coexistence of var and flags
- `notMedal` boolean is now `GE_NOTMEDAL`
- New `GE_TIMED` flag
    - Disappears `var` tics after `starttime`
- Improved M_GetConditionString handling for specific Emblem grabs
- More explicit error handling for invalid Emblem
2022-12-13 22:19:37 +00:00
toaster
0e8c739efc Fix M_GetLevelEmblems to work with gamemap index (as it was used for) instead of mapheaderinfo index 2022-12-13 22:11:07 +00:00
toaster
dbb96dabd6 Fix M_UnlockableFollowerNum to work with followers whose names have spaces in 2022-12-13 22:10:35 +00:00
toaster
e2e6ce6108 Fix follower translation colormap to use TC_DEFAULT 2022-12-13 21:48:49 +00:00
toaster
117b4c6a7b GAMEDATA MainCfg SOC block adustment
Discussed in DMs
- All other `MainCfg` block properties require a custom gamedata (or be a main file) to be modified
- When a custom gamedata is set, clear all unlockables, conditionsets, and emblems are unconditionally cleared
- You may also Clear Levels only if a custom gamedata is used
2022-12-13 18:20:52 +00:00
toaster
b26da37477 Forgot to stage compilation fix 2022-12-13 18:10:47 +00:00
toaster
ff1574f80f Allow for marking Emblems as "not a Medal" via SOC definition
Also remove long-unused `hint` string
2022-12-13 17:48:35 +00:00
toaster
47901939d5 Actually lock Time Attack and Capsule Attack behind SECRET_TIMEATTACK and SECRET_BREAKTHECAPSULES 2022-12-13 17:37:26 +00:00
toaster
ac95f8b494 Improve the Preview area for Challenges significantly.
- New Previews of random-per-session maps with an overlay for
    - SECRET_ENCORE (Phantom Ruby)
    - SECRET_TIMEATTACK and SECRET_BREAKTHECAPSULES (Lap center circle stopwatch)
    - SECRET_HARDSPEED (Rocket Sneaker, a sneaky reference to the current MS webview)
- Fix the position of SECRET_MAP's map to match the above
- Add a grey background at the bottom to really bring the feng shui together
2022-12-13 17:25:47 +00:00
toaster
d5ab51fe38 Fixed unsignedness of M_UnlockableMapNum return type 2022-12-13 16:18:56 +00:00
toaster
0ef95875fa Fix copypaste typo for M_MapLocked 2022-12-13 16:15:48 +00:00
toaster
fc6eff65c2 Cache the result of M_UnlockableSkinNum/FollowerNum/MapNum/Cup
Improves performance on mapheader iteration for M_Map/CupLocked significantly.
2022-12-13 16:15:31 +00:00
toaster
20c754ca66 Preview for SECRET_CUP and SECRET_MAP
Includes a dummied out alternate SECRET_CUP with more consistency to the idea of graphics exclusively in lower left, but matching the cup select screen won out.
2022-12-13 14:49:33 +00:00
toaster
2871ccb4f1 Rewrite level restrictions
Now uses `SECRET_CUP` and `SECRET_MAP` with a stringVar saying the map lump/cup name, instead of `SECRET_NONE` and a levelheader `unlockrequired` property.
2022-12-13 13:45:17 +00:00
toaster
76e290678f Groundwork for later commits
- Make the `SECRET_` constants an easily reshuffable `enum` instead of a series of byzantine `#define`s
    - Includes SECRET_CUP and SECRET_MAP in preperation
- Begin the conceptual seperation between Emblems (special in-level objects) and Medals (specific type of emblem that adds to the counter)
    - Rename UC_TOTALMEDALS and M_GotEnoughMedals, since the count is a Medals only thing
    - M_CountMedals, in addition to being renamed, now has an `all` boolean parameter since getting the total is no longer as easy as `emblems + extraemblems`
2022-12-13 13:07:46 +00:00
toaster
bd5d51ac7b K_DrawMapThumbnail
- Handles map thumbnail drawing in a way agnostic to patch size
- Specify a desired final width in pixels `<< FRACBITS`, not a scale - more specific for our incoming varied purposes.
- Encore and voting screen Random have to be handled externally
- Put in k_hud.c because I'm not sure where would be most appropriate snd it works well enough, can be moved later
2022-12-12 21:51:11 +00:00
toaster
cc4518f80a M_DrawChallengePreview
Draws a preview of an unlock in the bottom left corner.
- Currently only supports unlocked ones (needs a roughly character-sized question mark graphic created)
- Currently only supports SECRET_SKIN and SECRET_FOLLOWER
Also, makes the area available to M_BuildConditionSetString smaller to avoid crossing into that region
2022-12-12 20:39:53 +00:00
toaster
cc9a65c8f8 Add unlock condition text to Challenges menu
Has ifdef'd out code for conditions to change between white and yellow when achieved to match V1 behaviour... wasn't able to figure out why it wasn't working, so dummied out for now.
2022-12-12 16:55:56 +00:00
toaster
6d3a812ff3 Fix some G_BuildMapTitle memory leaks (found while writing the next commit) 2022-12-12 16:44:40 +00:00
toaster
5a404799b3 Add limits to PWR unlock condition 2022-12-12 16:43:27 +00:00
toaster
81c9a7b928 Clean up the calculation of challengegridwidth to be more explicitly correct.
Also elegantly prevent the case where a non-looping grid stuffed to the brim with large tiles has them offset, preventing one tile from being placed.
2022-12-12 13:01:35 +00: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
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