Commit graph

497 commits

Author SHA1 Message Date
toaster
8f592c196f Stereo mode
- Minimum viable implementation
- New horizontal menu
    - FUTURE WORK: visuals are extremely basic
- Accessible from both Extras and in-game Pause if SECRET_SOUNDTEST is unlocked
- Rather than the Shadow-the-Hedgehog style free select of SRB2's Sound Test, it's a Best Of The Hacks And Fan Music Sega CD player.
    - Back
        - Exit menu
    - Stop
       - Stops Stereo music entirely
    - Pause
      - Pauses Stereo music without losing place in sequence
          - FUTURE WORK: This should probably just pause the actual player ala minimised viewport
    - Play
      - Begins Stereo music on non-NULL musicdef entry
    - Track
      - For NULL soundtest entry:
          - Switches between sfx
      - For musicdefs with multiple tracks:
          - Switches between them
    - Prev and Next
        - Changes musicdef entry
            - FUTURE WORK: This is extremely naive and doesn't respect the following
                - Cup order
                - Unlocks
- Overrides all game-requested music changes when in Play or Pause mode
    - This makes it an actual fun in-game feature as a menuification of the `tunes` command, not just a pure novelty.
2023-03-25 23:37:07 +00:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00
toaster
8285f0a636 M_DrawChallengePreview for SECRET_SKIN: Keep the engine class indicator square no matter where it is on the grid 2023-03-17 14:49:40 +00:00
toaster
f2f8a10bd0 M_DrawCupSelect: Fix regression for S3K monitor graphic alignment 2023-03-16 12:54:59 +00:00
toaster
29f17809bf Addons menu: Adjust most assetsby a handful of pixels to prevent the loaded indicator from going off the bottom of the screen 2023-03-15 17:34:49 +00:00
toaster
90591942ad musicwads
Record number of music files which we were able to add, so Addons menu shows the correct number of addons loaded.
Also marks main music files in `listwad` command.
2023-03-15 17:33:55 +00:00
toaster
7f3836f916 Chao Key changes
- Chao Keys are now UINT16 instead of UINT8
- The maximum number of Chao Keys is now 9999, which is the largest number of 9s that can fit in a UINT16
- Used keys no longer count towards your total
Will mildly corrupt gamedatas made with previous conditions-cascading builds, but only in a way that gives you extra keys than you've earned.
2023-03-15 14:49:22 +00:00
toaster
2ec3cf498d K_DrawChallenges: Technically possible to have 3-digit Chao Keys, so scooch just a hair further 2023-03-15 13:19:01 +00:00
toaster
bb98db6fce Ring count formatting: Correct to always have leading 0s for up to 3 digits 2023-03-15 13:14:12 +00:00
toaster
2e1efaff0c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_battle.c
#	src/k_hud_track.cpp
#	src/k_kart.c
#	src/p_inter.c
2023-03-14 21:59:19 +00:00
toaster
967ad3662d M_DrawMapMedals: Only shows ET_MAP medals with ME_ENCORE and/or ME_SPBATTACK if you've unlocked those two things 2023-03-14 20:28:36 +00:00
toaster
22e17fd881 Statistics respects cups now
- Adds headers to the list
- Adds indentation
- Doesn't show extra medals if there are none available
- Cleans up some of the undesired duplication in the drawer
2023-03-14 20:27:58 +00:00
toaster
558d3dc842 M_DrawChallenges: Change offset of Chao Keys 2023-03-14 12:48:34 +00:00
toaster
0f14079555 levellist: Fix type of choosemap 2023-03-13 17:34:14 +00:00
toaster
bfb939161a M_DrawChallengePreview: Improve SECRET_MAP
- Change scale and offsets of map icon to match other unlock types that show a single map
- Show a gametype string
    - Fudges GT_VERSUS into GT_SPECIAL just like the menu does
    - Shows "Match Race/Online" for a level with no preferred gametype like TEST RUN
2023-03-13 17:22:25 +00:00
toaster
1701662b6b Lost and Found
- When selecting levels:
    - If the gametype uses cups
    - and a map has no cup
    - and you're not in Grand Prix mode
- show those maps in a quasi-cup called "Lost and Found".
- Implementation details:
    - a few == checks for the pointer to `cupheader_t dummy_lostandfound`
    - Otherwise most of the apparatus was built as part of prior art!
2023-03-13 16:44:21 +00:00
toaster
1d3b5adfdf "Monitor" parameter for cups
- Defaults to 1, AKA Sonic 1/2 monitor
- Set to 2 for Sonic 3k monitor
- Supports a range of 1-9 and A-Z
- Permits fine-grained rapid-prototype stretch goal Chaotix monitor stuff later in development
2023-03-13 16:18:07 +00:00
toaster
241475155b Rename "Break the Capsules" to "Prison Break"
We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it
Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
2023-03-12 20:17:46 +00:00
toaster
0b71b2f71f M_DrawStatistics: Fix "Hours/Minutes/Seconds" plurality if there's only 1 2023-03-12 20:16:03 +00:00
toaster
03b6f50ab8 M_DrawChallengePreview: Selection assistance icons
- SECRET_SKIN:
    - Shows the character icon you'd have to pick (Eggman for Eggrobo, etc)
    - Shows the Engine Class section of the charsel grid you'd have to pick
- SECRET_FOLLOWER:
    - Shows the category icon you'd have to pick (3DB for Whirl, etc)
- SECRET_CUP:
    - Shows the position on the cup grid, INCLUDING previous pages
2023-03-12 18:10:14 +00:00
toaster
65a4f33b6f R_GetEngineClass
Before unlockable conditions dependent on Engine Class are added, standardise the system.
- enum constant in r_skins.h from A-I + J
    - Engine Class J is for SF_IRONMAN
        - The Joker in the pack of cards
        - Also immediately after I in the alphabet
        - It's a Jape that works on multiple levels
- Integrate into K_UpdateEngineSounds
    - Ignores Engine Class J
- Show the Engine Class in character select extrainfo mode, even in situations character name would have been the only thing shown
2023-03-12 14:41:15 +00:00
toaster
dfe75726df cupwindata_t
Save your best GP stats across sessions.
- Saved into gamedata
- Deliniated per difficulty option
- Draw onto cupgrid in GP cup select
    - Best grade
    - Whether you've ever gotten the Emerald
        - TODO: Always shows Chaos Emerald, will need updating when Super Emerald graphics are created
    - Monitor status changes depending on recorded position
        - 1st: Gold, shiny
        - 2nd: Silver, shiny
        - 3rd: Bronze, shiny
        - 4th and downwards: Beige, barely different
- Wiped with G_ClearRecords

Also, to avoid circular dependencies:
- KARTSPEED/KARTGP constants moved from command.h to doomstat.h
- gp_rank_e enums moved from k_rank.h to doomstat.h
2023-03-10 20:20:48 +00:00
toaster
8b437d5a32 Minimum viable product of Chao Keys condition bypass
- Start with 3, per Sakurai's prior art.
- Earn them per certain number of rounds
    - DEVELOP builds: once every 4 rounds
    - Release builds: once every 50 rounds
    - Has an internal cap based on the maximum number of unlockables supported.
        - Possible future work could adjust this to restrict based on the maximum number of unlockables unlocks.pk3 actually has set.
- Use on the Challenges screen to bust open small tiles with hints (or the very first tile, if you haven't unlocked anything yet).
    - Will do a funny shake if you try anything else.
- Interrupts menu flow just like getting an unlock.
    - The matches you've played will tick upwards, giving you keys as they loop over.
2023-03-09 22:33:10 +00:00
Eidolon
86a9579e16 Handle gamepads from interface dynamically
Fixes numerous issues with hotswapping, gamepad assignment, and menu
responsiveness.
2023-03-07 00:07:47 -06:00
toaster
87b80a62f2 SPB Attack: Integrate into conditions-cascading affairs
- All `cv_dummyspbattack`-related material is now gated with the assistance of SECRET_SPBATTACK.
    - SPB_ATTACK
- Add UC_MAPSPBATTACK condition.
    - Both this and emblems with MV_SPBATTACK have the string "SPB ATTACK: Conquer [LEVEL NAME]", compared to the regular round completion conditions having "Finish a round on [LEVEL NAME]".
        - If SPBATTACK is not unlocked, shows ???: Conquer [LEVEL NAME] instead
2023-03-05 20:48:31 +00:00
toaster
0f715454fa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-05 19:51:48 +00:00
toaster
e994b920c6 gamedata->roundsplayed: Split into multiple roughly-gametype-aligned categories
- Race, Capsule, Battle, Special, Custom
- All categories can now be used for Rounds Played condition
- UCRP_SEALEDSTAR now hides if you haven't beaten a single Sealed Star yet
In addition, introduce M_ClearStats
- As more statistics get added, clearing them manually in G_LoadGameData and M_EraseDataResponse is just going to get annoying
- Change around the options on the Erase Data screen to
    - Make it clear that erasing all game data won't clear your Profiles
    - Add an option to clear stats by themselves, rather than only permitting via complete gamedata wipe
    - Move to the "Challenges" terminology over SRB2's "Secrets" terminology
- Move some entries that were previously handled in M_ClearSecrets into M_ClearStats
2023-03-04 20:09:29 +00:00
AJ Martinez
320685cf97 SPB Attack: review fixup omnibus 2023-03-04 06:41:44 -07:00
toaster
eeb6e40909 Add totalrings to gamedata
- Added to Statistics screen
- Caps at "999,999,999+".
- Controls UC_TOTALRINGS condition
- Improve description for UC_MATCHESPLAYED condition
    - Says "Rounds" now
- Improve Statistics text for playtime
    - Dynamically changes visible units of time (seconds, minutes, hours, days.......)
2023-03-03 22:35:28 +00:00
AJ Martinez
8739d3076a Use more fitting name for SPB Attack menu patch 2023-03-03 12:17:11 -08:00
AJ Martinez
211206ba6f Fix menus, fix failure condition 2023-03-03 12:17:10 -08:00
toaster
92285b90fa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-02 14:38:56 +00:00
toaster
40271cd128 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into hwr2-twodee 2023-03-01 12:30:58 +00:00
Eidolon
83b6c30952 hwr2: add wipe mode to F_RunWipe, fix all wipes 2023-02-27 21:45:59 -06:00
toaster
54a58178a1 Add Extras-related unlocks
- When SECRET_ADDONS is locked
    - No Addons option on Extras submenu
    - No mid-game Addons in K_CanChangeRules
    - Forced onto CORE on Server Browser room selection page
        - Semi-related: If modifiedgame is true, force onto MODDED, even if you haven't unlocked it
        - TODO: Update UI to show you can't switch in a more elegant way
    - Hide Addons Options on Data Options submenu
- When SECRET_EGGTV is locked
    - No Egg TV option on Extras submenu
    - Semi-related: Rename to Egg TV per team discussion
2023-02-27 19:55:11 +00:00
toaster
6d43d8ef09 Add SECRET_ONLINE.
- Online menu is inaccessible until unlocked.
- Unlike most unlocks, the fact that it's not enabled is very clearly signposted.
    - This is because the previous entry in the series barely had any offline content at all, so the fact you'll have to work for it will catch a lot of people by surprise.
    - Has a message that straight up tells you you need experience in Grand Prix mode.
- Has no affect in TESTERS builds, for which this is the only method of play available.
2023-02-27 17:01:15 +00:00
toaster
102ada37ca Unlock system: Imprement SECRET_MASTERMODE
- Locks Master difficulty in GP difficulty select.
- Remove SECRET_LEGACYBOXRUMMAGE at the same time, because that plan is long dead.
2023-02-27 13:39:47 +00:00
Eidolon
d855d96a10 hwr2: Add hardware 2D rendering 2023-02-26 18:47:42 -06:00
toaster
26ceb13672 Character Select: Press R (drift) to toggle an "extra info" mode
- Hides "A PLAYER/A $profilename" text
- Shows extra info relevant text
    - Early stages: "[EXTRAINFOMODE]"
    - Grid select: Speed and weight
    - Clone select/READY!!: Character name
    - Color: Color name
    - Follower category: Category name
    - Follower: Follower name
    - Follower color: Follower color name
- The hidden setup_page toggle feature now only uses L button
2023-02-26 23:28:00 +00:00
toaster
6d0409e33d M_DrawChallenges: Adjust drawing order so all underlays are drawn before any actual content
Prevents reticule on bottom row getting slightly cut off
2023-02-25 14:16:43 +00:00
toaster
500e951e59 M_DrawChallengeTile: Faded outline for locked tiles
- Additive for hint-available
- Subtractive for completely locked
2023-02-25 13:59:22 +00:00
toaster
9779d6066c Challenge Grid: Introduce flipping tiles
- When a tile is selected, flips from category side to specific icon side
- Flips back when unselected
- Hold R (drift) to flip all tiles to visible side
2023-02-25 00:21:28 +00:00
toaster
8dc4971c2a M_DrawChallengeTile: Don't draw the ? stuff if not yet unlocked 2023-02-24 19:06:45 +00:00
toaster
e65bb87ec5 M_DrawChallengeTile: Change the appearance of locked tiles
- Question mark
- If next to an unlocked tile (ie, hint mode)
    - Have ring around when highlighted, per hint ring
    - ELSE, make blink-colormapped + subtractive
2023-02-24 18:15:38 +00:00
toaster
4380876959 Challenges Grid: create dedicated struct for menu extradata
- challengegridextradata_t
- Existing UINT8 data per entry has been converted to "flags" property
- This is a tool that will help us later.
2023-02-24 17:38:08 +00:00
toaster
9cb176de36 M_DrawCharSelectExplosions: Fix alignment of explosions for Challenges Grid 2023-02-24 00:16:39 +00:00
toaster
2164121ce6 M_DrawChallengeTile: Have different appearance for hovered over tile (current behaviour) and category information 2023-02-24 00:08:58 +00:00
toaster
2875400397 Challenges Grid: New tile borders + selection reticule
M_DrawChallenges: Adjust all offsets to new 22x22 bordered system (from 16x16)
M_DrawChallengeTile: Border, colorization, and reticule
2023-02-23 21:39:55 +00:00
toaster
d17525fac7 M_DrawChallenges: reimplement dark areas for contrast/readability
Now uses V_DrawFadeFill and MENUHINT patch directly.
2023-02-23 17:24:11 +00:00
toaster
d66a4cff81 M_DrawChallenges: Scrolling question mark background 2023-02-23 16:55:36 +00:00