coastline
0.0.4
Loading...
Searching...
No Matches
src
n64
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
13
#include "
common/frontendscreens.h
"
14
#include "
common/model.h
"
15
#include "
common/seasons.h
"
16
#include "
common/texrect.h
"
17
#include "
common/trackmenuitem.h
"
18
#include "
common/vehicle.h
"
19
#include "
common/vehicleview.h
"
20
21
#ifdef __cplusplus
22
extern
"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
50
typedef
s32
(*
MenuItemFilter
)(
s32
item);
51
53
typedef
void (*
MenuPostDrawCallback
)(
s32
item);
54
56
typedef
void (*
MenuPreDrawCallback
)(void);
57
66
extern
MenuPostDrawCallback
g_pfnScreenPostDrawCallback
;
67
76
extern
MenuPreDrawCallback
g_pfnScreenPreDrawCallback
;
77
86
extern
s32
g_dwMenuChoosingPlayer
;
87
97
extern
s32
g_dwScreenPlayerIdx
;
98
107
extern
s32
g_dwMenuInputPlayerMask
;
108
117
extern
Texture
*
g_pMenuTitleImage
;
118
127
extern
s32
g_dwMenuTitleImageX
;
128
137
extern
s32
g_dwMenuTitleImageY
;
138
147
extern
s32
g_dwMenuTitleImageWidth
;
148
157
extern
s32
g_dwMenuTitleImageHeight
;
158
168
extern
f32
g_fScreenIdleTimeout
;
169
177
extern
f32
g_fScreenIdleTime;
179
188
extern
s32
g_bScreenStateInitFlag
;
189
198
extern
s32
g_nScreenCursor
;
199
208
extern
s32
g_nPrevScreenSelection
;
209
218
extern
s32
g_nScreenLastActiveIndex
;
219
228
extern
s32
g_nScreenPendingSelection
;
229
239
extern
f32
g_fScreenSlideOffset
;
240
248
extern
f32
g_fScreenRotationAngle;
250
259
extern
s32
g_bScreenItemChosen
;
260
269
extern
s8
*
g_pScreenScrollSoundBuf
;
270
278
extern
u32
g_dwScreenScrollSoundSize;
279
286
extern
s8
*g_pScreenSelectSoundBuf;
287
294
extern
u32
g_dwScreenSelectSoundSize;
296
305
extern
Texture
g_ArrowLeftTextureDesc
;
306
315
extern
Texture
g_ArrowRightTextureDesc
;
316
325
extern
Texture
g_BgTextureDesc
;
326
335
extern
s32
g_bMenuSpotlightBuilt
;
336
345
extern
Vtx
g_aMenuSpotlightVertices
[31];
346
355
extern
Gfx
g_aMenuSpotlightDisplayList
[];
356
366
extern
Gfx
g_aMenuChoiceMarkerDisplayList
[];
367
375
extern
Mtx
g_MenuChoiceMarkerMtx;
377
386
extern
s32
g_dwTrackMenuItemCount
;
387
396
extern
s32
g_dwTrackMenuSelection
;
397
406
extern
s32
g_bTrackMenuChampionship
;
407
416
extern
s32
g_dwTrackMenuInitState
;
417
426
extern
s32
g_bTrackMenuPakScreen
;
427
436
extern
s32
g_bSeasonFirstRace
;
437
446
extern
s32
g_dwContinueFromResults
;
447
456
extern
char
g_szTrackMenuTextBuf
[];
457
465
extern
char
g_szTrackSelectPointsTextBuf[];
467
477
extern
VehicleModelLoad
g_aVehicleModelSlots
[
VEHICLE_MODEL_SLOTS
];
478
490
s32
IsTrackUnlocked
(
s32
track);
491
501
void
ValidateChampionshipProgress
(
void
);
502
513
void
TrackMenuPostDraw
(
s32
item);
514
524
void
SeasonRecordsPreDrawCallback
(
void
);
525
534
void
DrawMenuSpotlight
(
void
);
535
544
void
DrawMenuChoiceMarker
(
void
);
545
554
void
DrawMenuFooterButtons
(
void
);
555
564
void
DrawPauseMenuButtons
(
void
);
565
575
void
SetScreenPendingSelection
(
s32
item);
576
599
s32
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
622
void
LoadMenuItemModels
(
MenuItem
**items,
s32
*itemCount);
623
634
void
ResetAndInitDisplay
(
MenuItem
**items,
s32
*itemCount);
635
636
#ifdef __cplusplus
637
}
638
#endif
639
640
#endif
/* COASTLINE_RACEMENU_H */
frontendscreens.h
The screens of the front end of the Nintendo 64 releases that the game hands over to,...
gbi.h
The graphics binary interface types the gu routines fill in for the RSP microcode.
model.h
The models of the menus and splash screens: loading, animating and drawing them.
ResetAndInitDisplay
void ResetAndInitDisplay(MenuItem **items, s32 *itemCount)
Reset the heap and the callbacks of the menu screen, and load the models of its items.
g_nScreenLastActiveIndex
s32 g_nScreenLastActiveIndex
The item under the cursor when the screen last ran.
g_aMenuSpotlightVertices
Vtx g_aMenuSpotlightVertices[31]
The vertices of the beam of the spotlight, its source first.
g_pMenuTitleImage
Texture * g_pMenuTitleImage
The picture of the title of a menu screen, and its rectangle.
g_fScreenIdleTimeout
f32 g_fScreenIdleTimeout
The time without input after which a screen chooses for itself, or 0 for never, and the time without ...
g_fScreenSlideOffset
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 ...
MenuPostDrawCallback
void(* MenuPostDrawCallback)(s32 item)
A routine a menu screen calls after drawing, with the selected item.
Definition
racemenu.h:53
g_bScreenItemChosen
s32 g_bScreenItemChosen
Whether the screen fades out because an item was chosen.
g_dwMenuTitleImageX
s32 g_dwMenuTitleImageX
The left edge of the menu title, in pixels.
DrawMenuChoiceMarker
void DrawMenuChoiceMarker(void)
Draw the marker under the stage of a screen.
g_dwContinueFromResults
s32 g_dwContinueFromResults
Whether the track menu follows the results of a race.
g_dwMenuChoosingPlayer
s32 g_dwMenuChoosingPlayer
The player whose press chose the last menu item.
g_ArrowRightTextureDesc
Texture g_ArrowRightTextureDesc
The right arrow of the buttons at the bottom of a screen.
g_aMenuChoiceMarkerDisplayList
Gfx g_aMenuChoiceMarkerDisplayList[]
The display list of the marker drawn under the stage while there is another item to move to,...
g_nScreenPendingSelection
s32 g_nScreenPendingSelection
An item to move the cursor to, or -1.
MenuPreDrawCallback
void(* MenuPreDrawCallback)(void)
A routine a menu screen calls in place of drawing its items.
Definition
racemenu.h:56
g_dwTrackMenuItemCount
s32 g_dwTrackMenuItemCount
The number of items of the track menu.
g_dwMenuTitleImageY
s32 g_dwMenuTitleImageY
The top edge of the menu title, in pixels.
MenuItemFilter
s32(* MenuItemFilter)(s32 item)
A routine that tells whether a menu item may be chosen.
Definition
racemenu.h:50
g_bTrackMenuPakScreen
s32 g_bTrackMenuPakScreen
Whether the track menu shows the screen of the controller pak.
SeasonRecordsPreDrawCallback
void SeasonRecordsPreDrawCallback(void)
Draw the records of the season in place of the items of the track menu, and the cars of the season.
g_nPrevScreenSelection
s32 g_nPrevScreenSelection
The item the cursor left.
SetScreenPendingSelection
void SetScreenPendingSelection(s32 item)
Move the cursor of the screen to an item on its next frame.
g_pfnScreenPostDrawCallback
MenuPostDrawCallback g_pfnScreenPostDrawCallback
The callback after the selected item is drawn, or NULL.
DrawMenuFooterButtons
void DrawMenuFooterButtons(void)
Draw the buttons of the bottom of a screen: select and go back.
ProcessScreenState
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.
g_bTrackMenuChampionship
s32 g_bTrackMenuChampionship
Whether the track menu is of the championship; never read.
g_bScreenStateInitFlag
s32 g_bScreenStateInitFlag
Whether ProcessScreenState() has set up its screen.
g_aVehicleModelSlots
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...
g_dwScreenPlayerIdx
s32 g_dwScreenPlayerIdx
The player a screen belongs to, such as the player whose car the paint shop paints or whose controlle...
g_szTrackMenuTextBuf
char g_szTrackMenuTextBuf[]
The text of the track menu and of its records.
g_pScreenScrollSoundBuf
s8 * g_pScreenScrollSoundBuf
The sounds of moving the cursor and of choosing, and their lengths.
g_pfnScreenPreDrawCallback
MenuPreDrawCallback g_pfnScreenPreDrawCallback
The callback that draws in place of the menu items, or NULL.
g_dwTrackMenuInitState
s32 g_dwTrackMenuInitState
Whether the track menu has set up, 1, has still to, 0, or has left for the next screen,...
g_dwMenuTitleImageWidth
s32 g_dwMenuTitleImageWidth
The width of the menu title, in pixels.
LoadMenuItemModels
void LoadMenuItemModels(MenuItem **items, s32 *itemCount)
Blank the screen, count the items of a menu, and load their models, once for each cartridge range.
TrackMenuPostDraw
void TrackMenuPostDraw(s32 item)
Draw the hints of the track menu, and run the screen of the controller pak while it is shown,...
g_BgTextureDesc
Texture g_BgTextureDesc
The gradient behind a screen.
DrawPauseMenuButtons
void DrawPauseMenuButtons(void)
Draw the buttons of the bottom of the pause menu: continue and exit.
ValidateChampionshipProgress
void ValidateChampionshipProgress(void)
Reset the progress of the championship of the first player when its season, its round or its flags ar...
IsTrackUnlocked
s32 IsTrackUnlocked(s32 track)
Whether a track may be chosen: in the championship only the track of the next race,...
g_bSeasonFirstRace
s32 g_bSeasonFirstRace
Whether the next race of the season is its first after a load.
DrawMenuSpotlight
void DrawMenuSpotlight(void)
Draw the beam of the spotlight over the stage of a screen.
g_dwMenuTitleImageHeight
s32 g_dwMenuTitleImageHeight
The height of the menu title, in pixels.
g_ArrowLeftTextureDesc
Texture g_ArrowLeftTextureDesc
The arrows of the buttons at the bottom of a screen.
g_bMenuSpotlightBuilt
s32 g_bMenuSpotlightBuilt
Whether the vertices of the beam of the spotlight over the stage are set; nothing sets it.
g_aMenuSpotlightDisplayList
Gfx g_aMenuSpotlightDisplayList[]
The display list of the beam.
g_nScreenCursor
s32 g_nScreenCursor
The item under the cursor of the screen.
g_dwTrackMenuSelection
s32 g_dwTrackMenuSelection
The item of the track menu under the cursor.
g_dwMenuInputPlayerMask
s32 g_dwMenuInputPlayerMask
A bit for each player whose input the menu screens read, or -1 for all.
seasons.h
The seasons of the championship.
MenuItem
An item of a menu screen.
Definition
trackmenuitem.h:12
Texture
A compressed texture of the cartridge and the memory it is loaded into.
Definition
texrect.h:16
VehicleModelLoad
The decompression of the model of a car into a slot.
Definition
vehicle.h:127
texrect.h
The textures of the interface and their drawing as rectangles of the screen.
trackmenuitem.h
ultratypes.h
Integer and floating-point types of libultra.
u32
unsigned int u32
Definition
ultratypes.h:20
s8
signed char s8
Definition
ultratypes.h:23
f32
float f32
Definition
ultratypes.h:38
s32
int s32
Definition
ultratypes.h:25
Gfx
A display list command for the Fast3D microcode.
Definition
gbi.h:132
Mtx
A 4 by 4 matrix in s15.16 fixed point, with the integer halves before the fractions.
Definition
gbi.h:16
Vtx
A vertex for the RSP, with a colour or with a normal.
Definition
gbi.h:75
vehicle.h
The vehicles of a race, the cars they are, and their place on the track.
VEHICLE_MODEL_SLOTS
#define VEHICLE_MODEL_SLOTS
The slots the models of the cars of the menus load into.
Definition
vehicle.h:134
vehicleview.h
Generated by
1.15.0