Commit graph

18883 commits

Author SHA1 Message Date
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
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