Commit graph

104 commits

Author SHA1 Message Date
toaster
d0cd059c5e Rework the Level List functions to operate off a provided levelsearch_t pointer.
* Prevents the dependency on a `levellist` global that could be corrupted
* Fixes the issue where cups that were not unlocked would not show up on the cup select (because `M_MapLocked` would make `M_CanShowLevelInList` fail).
* Shows both Race and Battle maps in the cup unlock preview.
2022-12-19 21:18:36 +00:00
toaster
8e88a840bb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/k_menudraw.c
#	src/k_menufunc.c
2022-12-19 20:13:44 +00:00
toaster
f9bdfd8a50 Fix typings for map index 2022-12-18 14:25:38 +00:00
toaster
ed85fb2e79 Clean up cup-related conditions for M_CanShowLevelInList 2022-12-18 13:20:50 +00:00
toaster
6659e78c04 Battle cups
- The cups they're associated with for GP Bonus Round
- Fixes the issue where when opening Ring Cup, Green Hills would be first in the listing because its header is defined before the rest of the cup's maps
- One core set of functions that works between multiple modes
Will merge conflict with Unlockables Undefeatable
2022-12-18 01:08:18 +00:00
toaster
42f4f28e06 Statistics menu
Relatively quick port from v1., but with under-the-hood changes to match the Emblem/Medal and Extra Medal reworks. We can make it prettier (and contain more data) later.
2022-12-14 17:53:35 +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
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
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
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
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
toaster
ac15d4caa3 Icon selection + Extras menu access
* Icon selection
    * You can use up, down, left, right, etc to select icons on the Challenges menu
    * The text at the top changes based on the highlighted icon
        * This text is now ??? if not yet unlocked
    * Uses the border for character rank icons
* Challenges are now accessible on the Extras menu alongside Addons and Replay Hut.
    * Previously there was a "Extras Checklist" dummy which did nothing when selected
    * Now I won't have to clear my gamedata every time I want to check this menu!
* M_ChallengeGridExtraData's array is modified to now contain specific info on whether a given tile is connected to above or left (or both).
2022-12-02 20:13:52 +00:00
toaster
85160b1dc1 M_ChallengeGridExtraData
Precalculates adjacency rules for challengegrid instead of doing it in the drawer
- Simplifies `M_DrawChallenges` a lot, at the expense of a pretty complicated function living in `m_cond.c`
- Handles registering entries both not to be drawn (for non-primary components of `majorunlock` unlockables) and for hint highlights (new for this commit)
    - Hint highlights are a sky blue
2022-12-01 21:55:05 +00:00
toaster
5ba1d4c197 Unlocks now only get marked unlocked when heading to the main menu
EXTREMELY early, but...
- M_InterruptMenuWithChallenges hijacks certain transitions
    - Currently only initial profile selection and title screen, but the intercept is low-profile enough to add wherever necessary
- M_GetNextAchievedUnlock gets the first unlock in the listing that has all its conditions achieved but isn't unlocked
- Preliminary Challenges menu
    - Currently only ticks between Achieved but not Unlocked unlocks with the above function, no tilegrid yet
2022-11-30 17:26:33 +00:00
James R
051b4f8935 Always use typedef name instead of struct name
mobj_t instead of struct mobj_s
2022-11-27 17:21:40 -08:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
toaster
962393f7b9 Restart Map/Try Again pause menu entry
Closer to parity with pre-newmenus behaviour.
- Clinical term for server admins, colloquial for SP contexts (GP/modeattacking)
- Won't show up in GP if you're out of lives
- Also fixes lives going negative in K_PlayerLoseLife
2022-11-17 16:45:07 +00:00
toaster
8aeaf9738d Major changes to follower selection
- Followers now have categories, definable in SOC
- New character select step: Follower category
    - "None" is a category, just skips straight to Follower None
    - Select a category to go to the previous regular follower selection step
- Press the C/Extra button to reset a character select step to its "default"
    - Character: Center the character in the engine class (goes from [0,1] to [1,1], etc)
    - Character alts: Centers the "primary" alt (prefers Eggman over Eggrobo)
    - Skincolor: Centers the character's prefcolour
    - Follower category: Centers on the "None" option
    - Follower: [CURRENTLY NO BEHAVIOUR]
    - Followercolor: Cycles between follower's defaultcolour, "Match", and "Opposite"
2022-11-06 22:53:12 +00:00
toaster
21be387d0f Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into connection-doinglus
# Conflicts:
#	src/d_clisrv.c
#	src/d_main.c
#	src/k_menudraw.c
#	src/m_misc.c
2022-11-03 22:36:34 +00:00
toaster
ff629a4c78 Merge branch 'kill-nonet' into 'master'
Kill last of NONET, DJGPP (DOS), WATTCP (also DOS?), _WINDOWS (DirectDraw)

See merge request KartKrew/Kart!704
2022-09-26 17:02:55 +00:00
toaster
3b9959a707 Replay hut code smell fix
- Properly account for non-loaded maps (missed in big-large-map-markers)
- Don't have a million copypasted extrasmenu.demolist indexarooies
- Make one bad replay handler in `G_LoadDemoInfo(` instead of fifty copypastes (Hmn I am smelling a THEME)
2022-09-25 22:47:22 +01:00
James R
f6a5ed9c6c Remove NONET 2022-09-24 19:22:04 -07:00
toaster
fe49543456 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-24 19:53:36 +01:00
toaster
75c8749939 Menu jammin
- Menu uses one of three songs (already in music.pk3)
- Cycles between them every time you return to the title screen after starting a map
- Console-accessible. Do what you want
2022-09-23 22:58:51 +01:00
toaster
60355d9efd Move two of the three remaining NUMMAPS arrays part of the mapheader_t struct
- mapvisited and recorddata_t (previously mainrecords)
- Changed how gamedata is saved and loaded
- Change the versioncheck (funny hex provided by chengi) AND call it `developringdata.dat` in develop builds
- Fix a bunch of off-by-ones in condition and emblem data
ALSO, for Time Attack:
- Fix menu not showing off your times
- Now save times even when gamedata modified, since the menu didn't care (come back to it?)
- Don't save times or do intermission screen if the Capsule Attack ended because you lost all your bumpers
- Fix a crash adding ghosts in Capsule Attack
2022-09-21 22:12:36 +01:00
toaster
b08ae2a716 Fix confirm connect
Still shows the message when you open the pause menu. Needs more attention I can't give it right now
2022-09-13 22:59:02 +01:00
toaster
d5e6d349a5 Egga Channel background for connecting 2022-09-13 13:21:03 +01:00
toaster
bca3ec7e5a Change the default highligh to Aqua, for consistency. 2022-09-05 14:00:26 +01:00
toaster
0c4dca611d Hide Encore on the Gameplay Options menu if not unlocked 2022-09-04 22:14:41 +01:00
toaster
acd777a77a Significant work into the play-starting experience
- Take the weird extra mini settings menu out of the Online Host Game sequence
- Make sure to actively use the server variables in Match Race creation
    - Hides the Auto options for Encore and Kartspeed on the Match Race menu specifically...
    - BUT if you leave it at the default it'll secretly set them to Auto!!!
2022-09-04 20:14:30 +01:00
toaster
26461d568c Addons menu refactor part 3
Search finally works again!
- Now uses a cvar which is copied into static memory to uppercase it, instead of a weird static string uppercased into zone memory.
- You have to scroll to the top of the menu to use it, one entry above the previous first file/folder/"UP...".
- Don't play menu sound if you've reached the end of an un-looping menu.
2022-09-03 21:15:23 +01:00
toaster
8312f12d6c Addons menu refactor part 1
- Move M_AddonsRefresh out of M_DrawAddons - death to a HORRIBLE hack
- Use it as the tickroutine for the addons menu instead
- Behaves as before, possibly more consistent
2022-09-03 16:23:16 +01:00
toaster
bcd9c7efba Fix circumstances the game restricts access to certain pause menu options.
Changed conditions -
- Switch Map and Addons on in-game pause menu
    - now restricted by !K_CanChangeRules(), which covers all singleplayer conditions
- Gameplay and Server Options
    - now restricted if in-game, and either singleplayer conditions or not admin
- Erase data
    - now restricted if in-game at all (fixes new-menus regression)
2022-09-02 21:55:29 +01:00
Sally Coolatta
8b93c05175 Fix party HUD after selecting profile char 2022-08-30 05:30:13 -04:00
Sally Coolatta
6eb5b2dee9 Make back button properly confirm settings 2022-08-30 05:23:54 -04:00
Sally Coolatta
6e5c955501 Only allow Time Attack for 1P
Battle gametype submenu no longer exists.
2022-08-28 06:08:30 -04:00
SinnamonLat
a8d847227d WIP: time attack, kinda works but crashes when you finish lol 2022-07-27 12:04:52 +02:00
SinnamonLat
2a4c4f86fc WIP: server browser (only shows fake servers you can't connect to rn) 2022-07-26 23:50:23 +02:00
SinnamonLat
fdf57e59db futureproof and use int16 for skins in menu instead of sint8 2022-07-22 14:13:31 +02:00
SinnamonLat
fc4b0d8776 Add page system on csel when alone to make alts easier to see 2022-07-22 13:57:48 +02:00
SinnamonLat
3e904e23aa Make menus much faster 2022-07-22 12:08:24 +02:00
SinnamonLat
d5e9283c2e Allow selecting profile with no changes to speed up charsel process 2022-07-20 19:35:51 +02:00
SinnamonLat
9364d0b479 better defaults in menus to make navigation easier when you just want to go fast 2022-05-24 01:50:00 +02:00
toaster
5b13d4f75d Repair character colors and followercolors via the menu, both visually and mechanically.
* Fully reimplement the MenuColor system from 2.2's codebase, so super and emerald colours are now inaccessible again.
* Add FOLLOWERCOLOR_ constants and internal loop support to M_GetColorBefore and M_GetColorAfter.
* Fix improper initialisation of certain menu colour data.
* Repair previously created (or manually-edited) profiles with invalid colours.
* Add an actual function to turn followercolor constants to effective values.
2022-05-22 16:57:26 +01:00
SinnamonLat
95e4bc21ff Allow P1 to retain controller usage when playing alone even if they started charsel with keyboard 2022-05-20 20:07:25 +02:00
SinnamonLat
d0db7e4381 rethink input mapping menu (again (again)) 2022-05-20 01:15:29 +02:00
SinnamonLat
d5d34f9b99 profiles may now be deleted from data options 2022-05-18 14:20:19 +02:00