Commit graph

18945 commits

Author SHA1 Message Date
toaster
c7db580338 Remove debug print from Unlockable SOC color parse 2022-12-14 17:31:10 +00:00
toaster
c693be47f8 Fix possible out of bounds memory access for M_MapLocked 2022-12-14 17:30:39 +00:00
toaster
6545b693d4 Make level titles capitalised on Challenges menu 2022-12-14 17:29:22 +00:00
toaster
f87db3cfab Further K_DrawMapThumbnail changes.
- Precache M_NOLVL.
- Make all width calculations relative to a lump 320 pixels wide, to make outdated map thumbnails much, MUCH more visible.
- Add K_DrawLikeMapThumbnail to draw a 320x200 patch like a map thumbnail (currently used only for RANDOMLVL).
2022-12-14 13:08:06 +00:00
Sally Coolatta
8d43acccb7 Use predetermined roulette speed for Time Attack 2022-12-13 18:03:44 -05:00
Sally Coolatta
6b8a011aa1 Flicker other items when selecting
Makes the lerp back to the middle less jarring, since the items that were just there won't disappear.
2022-12-13 18:02:21 -05:00
toaster
19ab3a8445 Only show hints if an unlocked tile is adjacent 2022-12-13 22:28:46 +00:00
toaster
2a35f7d197 Adjust y offset for challenge description 2022-12-13 22:20:24 +00:00
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
Sally Coolatta
2a546df3fb Fix debugger breaking, reduce size 2022-12-13 12:44:11 -05: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
Sally Coolatta
c184567361 No longer dynamically allocate roulette list
Done with the issues trying to sync this memory over the wire, so now it's just a long static array...
2022-12-13 12:06:52 -05: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
Sally Coolatta
59ee8177d7 Try some things for roulette sync
- PU_STATIC instead of PU_LEVEL, since player_t is always kept around anyway.
- Don't alloc itemList when cap is 0
- Read/write 0 when itemList is NULL
2022-12-13 00:00:37 -05:00
Sally Coolatta
7713ce0ebb Fix speed being messed up near level start
Used the wrong constant, leftover from an earlier experiment that was only partially reverted. Fixes "ghost" roulettes.
2022-12-12 19:41:33 -05:00
Sally Coolatta
8534703de6 Further improve item debugger visibility
- Half the scale of the item graphics, and reduce the spacing, so more of the reel can fit in one column.
- Move the item table text over to the right, depending on how many columns were drawn.
- Display the item roulette speed, as well.
2022-12-12 17:43:32 -05:00
Eidolon
51e0bed20a c++: add finally RAII utility
This mirrors the `finally` utility in Guidelines Support Library for
ensuring that a cleanup function is always called when the utility
object leaves scope, even when unwinding the stack from an exception.
This is to aid in transitioning malloc/free pairs in function bodies to
be more exception-safe.
2022-12-12 16:40:56 -06:00
Eidolon
15acefcc33 c++: Make some defines C++-valid 2022-12-12 16:38:25 -06:00
Eidolon
dceeadd3aa Don't preproc. define inline in C++ 2022-12-12 16:34:26 -06:00
Eidolon
7423b05f46 Redefine boolean for C++ compatibility 2022-12-12 16:34:25 -06:00
Eidolon
7bdcb5883d cmake: Enable C++ 17 and C11 2022-12-12 16:31:35 -06:00
Sally Coolatta
a73e62c163 Re-add roulette itemList user
Turns out the Z_Free error is something else in r_patch.c, seems unrelated to what I made.
2022-12-12 16:59:29 -05: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
Sally Coolatta
b0537de79e Re-implement debugitemodds 2022-12-12 16:44:24 -05:00
Sally Coolatta
9e3ded610d Get rid of my TODO notes
I implemented it, lol
2022-12-12 16:19:45 -05: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
Sally Coolatta
63f6b18d59 No user for roulette itemlist
Fixes the occasional Z_Free complaint
2022-12-12 11:55:28 -05:00
Sally Coolatta
8d2eb9220d Make Super Ring flood happen at 0 rings too 2022-12-12 11:46:03 -05: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
Sally Coolatta
13d7c791f5 Make the slowest speed slower
Was designed for Snap's tiny item sprites, for the huge ones it still feels pretty fast. The fastest speed is unchanged, though :)
2022-12-12 04:36:32 -05:00
Sally Coolatta
e45cef44df Make bots stop roulette instead of waiting it out
Done in kind of a lazy way, might revisit later.
2022-12-12 04:35:51 -05:00
Sally Coolatta
c8f3533b00 Roulette speed adjustments
- Speeds up the farther in the course you are
- Speeds up the further in the front you are
- Slows down before the 20 second mark
2022-12-12 04:01:09 -05:00
Sally Coolatta
10145b75d1 Fix incorrect item reel in actual races 2022-12-12 02:59:58 -05:00
Sally Coolatta
202c505664 Implement roulette visuals 2022-12-12 02:18:18 -05:00