coastline 0.0.4
Loading...
Searching...
No Matches
racemenu.h
Go to the documentation of this file.
1#ifndef COASTLINE_RACEMENU_H
2#define COASTLINE_RACEMENU_H
3
9
10#include <PR/gbi.h>
11#include <PR/ultratypes.h>
12
14#include "common/model.h"
15#include "common/seasons.h"
16#include "common/texrect.h"
18#include "common/vehicle.h"
19#include "common/vehicleview.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
26#define MENU_ITEM_ADJUSTABLE 0x01
27
29#define MENU_ITEM_IMMEDIATE 0x02
30
32#define MENU_ITEM_SPINNING 0x04
33
35#define MENU_ITEM_UNAVAILABLE 0x08
36
38#define MENU_ITEM_FIRST_PLAYER 0x20
39
41#define MENU_ITEM_LOCKED 0x40
42
43/* The results of ProcessScreenState(). */
44#define MENU_RESULT_CHOSEN 1
45#define MENU_RESULT_CANCELLED 2
46#define MENU_RESULT_UP 3
47#define MENU_RESULT_DOWN 4
48
50typedef s32 (*MenuItemFilter)(s32 item);
51
53typedef void (*MenuPostDrawCallback)(s32 item);
54
56typedef void (*MenuPreDrawCallback)(void);
57
67
77
87
98
108
118
128
138
148
158
169
177extern f32 g_fScreenIdleTime;
179
189
198extern s32 g_nScreenCursor;
199
209
219
229
240
248extern f32 g_fScreenRotationAngle;
250
260
270
278extern u32 g_dwScreenScrollSoundSize;
279
286extern s8 *g_pScreenSelectSoundBuf;
287
294extern u32 g_dwScreenSelectSoundSize;
296
306
316
326
336
346
356
367
375extern Mtx g_MenuChoiceMarkerMtx;
377
387
397
407
417
427
437
447
456extern char g_szTrackMenuTextBuf[];
457
465extern char g_szTrackSelectPointsTextBuf[];
467
478
491
502
514
525
535
545
555
565
576
599s32 ProcessScreenState(const char *title,
600 s32 itemCount,
601 MenuItem **items,
602 s32 *selection,
603 MenuItemFilter isSelectable,
604 s32 topRed,
605 s32 topGreen,
606 s32 topBlue,
607 s32 bottomRed,
608 s32 bottomGreen,
609 s32 bottomBlue);
610
622void LoadMenuItemModels(MenuItem **items, s32 *itemCount);
623
634void ResetAndInitDisplay(MenuItem **items, s32 *itemCount);
635
636#ifdef __cplusplus
637}
638#endif
639
640#endif /* COASTLINE_RACEMENU_H */
The screens of the front end of the Nintendo 64 releases that the game hands over to,...
The graphics binary interface types the gu routines fill in for the RSP microcode.
The models of the menus and splash screens: loading, animating and drawing them.
void ResetAndInitDisplay(MenuItem **items, s32 *itemCount)
Reset the heap and the callbacks of the menu screen, and load the models of its items.
s32 g_nScreenLastActiveIndex
The item under the cursor when the screen last ran.
Vtx g_aMenuSpotlightVertices[31]
The vertices of the beam of the spotlight, its source first.
Texture * g_pMenuTitleImage
The picture of the title of a menu screen, and its rectangle.
f32 g_fScreenIdleTimeout
The time without input after which a screen chooses for itself, or 0 for never, and the time without ...
f32 g_fScreenSlideOffset
How far the items have still to slide, from 1 or -1 when the cursor moves to 0, and the angle of the ...
void(* MenuPostDrawCallback)(s32 item)
A routine a menu screen calls after drawing, with the selected item.
Definition racemenu.h:53
s32 g_bScreenItemChosen
Whether the screen fades out because an item was chosen.
s32 g_dwMenuTitleImageX
The left edge of the menu title, in pixels.
void DrawMenuChoiceMarker(void)
Draw the marker under the stage of a screen.
s32 g_dwContinueFromResults
Whether the track menu follows the results of a race.
s32 g_dwMenuChoosingPlayer
The player whose press chose the last menu item.
Texture g_ArrowRightTextureDesc
The right arrow of the buttons at the bottom of a screen.
Gfx g_aMenuChoiceMarkerDisplayList[]
The display list of the marker drawn under the stage while there is another item to move to,...
s32 g_nScreenPendingSelection
An item to move the cursor to, or -1.
void(* MenuPreDrawCallback)(void)
A routine a menu screen calls in place of drawing its items.
Definition racemenu.h:56
s32 g_dwTrackMenuItemCount
The number of items of the track menu.
s32 g_dwMenuTitleImageY
The top edge of the menu title, in pixels.
s32(* MenuItemFilter)(s32 item)
A routine that tells whether a menu item may be chosen.
Definition racemenu.h:50
s32 g_bTrackMenuPakScreen
Whether the track menu shows the screen of the controller pak.
void SeasonRecordsPreDrawCallback(void)
Draw the records of the season in place of the items of the track menu, and the cars of the season.
s32 g_nPrevScreenSelection
The item the cursor left.
void SetScreenPendingSelection(s32 item)
Move the cursor of the screen to an item on its next frame.
MenuPostDrawCallback g_pfnScreenPostDrawCallback
The callback after the selected item is drawn, or NULL.
void DrawMenuFooterButtons(void)
Draw the buttons of the bottom of a screen: select and go back.
s32 ProcessScreenState(const char *title, s32 itemCount, MenuItem **items, s32 *selection, MenuItemFilter isSelectable, s32 topRed, s32 topGreen, s32 topBlue, s32 bottomRed, s32 bottomGreen, s32 bottomBlue)
Run one frame of a menu screen over a background gradient.
s32 g_bTrackMenuChampionship
Whether the track menu is of the championship; never read.
s32 g_bScreenStateInitFlag
Whether ProcessScreenState() has set up its screen.
VehicleModelLoad g_aVehicleModelSlots[VEHICLE_MODEL_SLOTS]
The loads of the models of the cars the screens show: a slot for each player, and another for each th...
s32 g_dwScreenPlayerIdx
The player a screen belongs to, such as the player whose car the paint shop paints or whose controlle...
char g_szTrackMenuTextBuf[]
The text of the track menu and of its records.
s8 * g_pScreenScrollSoundBuf
The sounds of moving the cursor and of choosing, and their lengths.
MenuPreDrawCallback g_pfnScreenPreDrawCallback
The callback that draws in place of the menu items, or NULL.
s32 g_dwTrackMenuInitState
Whether the track menu has set up, 1, has still to, 0, or has left for the next screen,...
s32 g_dwMenuTitleImageWidth
The width of the menu title, in pixels.
void LoadMenuItemModels(MenuItem **items, s32 *itemCount)
Blank the screen, count the items of a menu, and load their models, once for each cartridge range.
void TrackMenuPostDraw(s32 item)
Draw the hints of the track menu, and run the screen of the controller pak while it is shown,...
Texture g_BgTextureDesc
The gradient behind a screen.
void DrawPauseMenuButtons(void)
Draw the buttons of the bottom of the pause menu: continue and exit.
void ValidateChampionshipProgress(void)
Reset the progress of the championship of the first player when its season, its round or its flags ar...
s32 IsTrackUnlocked(s32 track)
Whether a track may be chosen: in the championship only the track of the next race,...
s32 g_bSeasonFirstRace
Whether the next race of the season is its first after a load.
void DrawMenuSpotlight(void)
Draw the beam of the spotlight over the stage of a screen.
s32 g_dwMenuTitleImageHeight
The height of the menu title, in pixels.
Texture g_ArrowLeftTextureDesc
The arrows of the buttons at the bottom of a screen.
s32 g_bMenuSpotlightBuilt
Whether the vertices of the beam of the spotlight over the stage are set; nothing sets it.
Gfx g_aMenuSpotlightDisplayList[]
The display list of the beam.
s32 g_nScreenCursor
The item under the cursor of the screen.
s32 g_dwTrackMenuSelection
The item of the track menu under the cursor.
s32 g_dwMenuInputPlayerMask
A bit for each player whose input the menu screens read, or -1 for all.
The seasons of the championship.
An item of a menu screen.
Definition trackmenuitem.h:12
A compressed texture of the cartridge and the memory it is loaded into.
Definition texrect.h:16
The decompression of the model of a car into a slot.
Definition vehicle.h:127
The textures of the interface and their drawing as rectangles of the screen.
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
signed char s8
Definition ultratypes.h:23
float f32
Definition ultratypes.h:38
int s32
Definition ultratypes.h:25
A display list command for the Fast3D microcode.
Definition gbi.h:132
A 4 by 4 matrix in s15.16 fixed point, with the integer halves before the fractions.
Definition gbi.h:16
A vertex for the RSP, with a colour or with a normal.
Definition gbi.h:75
The vehicles of a race, the cars they are, and their place on the track.
#define VEHICLE_MODEL_SLOTS
The slots the models of the cars of the menus load into.
Definition vehicle.h:134