coastline 0.0.4
Loading...
Searching...
No Matches
carselect.h
Go to the documentation of this file.
1#ifndef COASTLINE_CARSELECT_H
2#define COASTLINE_CARSELECT_H
3
4#include "common/laptime.h"
5
11
12#include <PR/gbi.h>
13#include <PR/ultratypes.h>
14
15#include "common/model.h"
16#include "common/vehicle.h"
17#include "racemenu.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
24enum {
32};
33
35enum {
41};
42
44enum {
48};
49
59
69
79
89
90#if TGR_REGION == TGR_REGION_JP
97#endif
98
107extern f32 g_afCarSelectSlide[2];
108
117extern f32 g_afCarSelectAngle[2];
118
128
137extern s32 g_anCarSelectCursor[2];
138
148
158
167extern const char *g_apszCarSelectCategory[2];
168
177extern s32 g_bCarSelectDone;
178
187extern s8 *g_pScrollSoundBuf;
188
196extern u32 g_dwScrollSoundSize;
197
204extern s8 *g_pSelectSoundBuf;
205
212extern u32 g_dwSelectSoundSize;
214
224
233extern s32 g_adwCarSelectState[2];
234
245
253extern s32 g_dwPakDialogPlayerIdx;
254
261extern s32 g_dwPakDialogResult;
262
269extern u8 g_bPakDialogDone;
271
282
290extern s32 g_dwResultsRound;
291
298extern s32 g_dwResultsChampionshipFlags;
299
306extern s32 g_dwResultsTrack;
307
314extern s32 g_dwCarSelectWeather;
316
326
335extern s32 g_dwResultsPage;
336
345extern char g_szResultsBuf[0x58];
346
356
364extern s32 g_dwHandlingOptionCount;
365
372extern MenuItem *g_apTransmissionOptions[];
373
380extern s32 g_dwTransmissionOptionCount;
381
388extern MenuItem *g_apTiresOptions[];
389
396extern s32 g_dwTiresOptionCount;
397
404extern MenuItem *g_apSuspensionOptions[];
405
412extern s32 g_dwSuspensionOptionCount;
414
423extern MenuItem *g_apDecalOptions[];
424
432extern s32 g_dwDecalListCount;
434
443extern const char *g_apszEngineLayouts[];
444
453extern const char *g_apszDriveTypes[];
454
464
472extern Light g_CameraViewLight1;
473
480extern Light g_CameraViewLight2;
481
488extern Light g_CameraViewLight3;
489
496extern Light g_CameraViewLight4;
498
513void DrawProgressBar(s32 x, s32 y, s32 width, s32 height, f32 fraction);
514
527
551 Model *secondModel,
552 s32 vehicleIndex,
553 s32 x,
554 s32 y,
555 s32 width,
556 s32 height,
557 f32 slide,
558 s32 hideChoiceMarker,
559 s32 slot,
560 s32 secondSlot,
561 f32 spread,
562 f32 angle);
563
573
574#ifdef __cplusplus
575}
576#endif
577
578#endif /* COASTLINE_CARSELECT_H */
void DrawProgressBar(s32 x, s32 y, s32 width, s32 height, f32 fraction)
Draw a bar: a black frame, a dark green background, and its filling of a fraction in bright green.
s32 g_bCarSelectDone
Whether every player chose, rather than one leaving.
s32 g_dwResultsPage
The page of the results, by the RESULTS_PAGE_ values.
s32 g_dwCarSelectStartTime
The time the screen started, in milliseconds.
s32 g_bCarSelectInitialized
Whether the screen has been set up since it was last left.
s32 g_adwCarSelectState[2]
The step of each player, by the CAR_SELECT_ values.
s32 IsCarUnlocked(s32 car)
Whether a car may be chosen: unlocked, on the cartridge, and in the paint shop one of the first nine.
s32 g_bSeasonResultsShown
Whether the season results were processed on this screen.
char g_szResultsBuf[0x58]
The text of a line of the results.
f32 g_afCarSelectAngle[2]
The turn of the stage of each player, in radians.
void ProcessCarSelectScreen(void)
Run one frame of the car selection screen, or of the results when g_dwIsReviewMode is set.
s32 g_anCarSelectPrevCursor[2]
The option each player's cursor left, which slides out.
Ambient g_CameraViewAmbientLight
The lights of the models on the stages.
s32 g_dwResultsSeason
The championship as the results show it: its season, round and flags, the track and the weather of th...
@ DECALS_LOAD
Definition carselect.h:46
@ DECALS_CUSTOM
Definition carselect.h:47
@ DECALS_DEFAULT
Definition carselect.h:45
s32 g_dwTitleRedrawFrames
The frames the title is still drawn once the screen has faded in.
@ RESULTS_PAGE_MESSAGE
Definition carselect.h:39
@ RESULTS_PAGE_PLAYER_2
Definition carselect.h:37
@ RESULTS_PAGE_SEASON
Definition carselect.h:38
@ RESULTS_PAGE_PLAYER_1
Definition carselect.h:36
@ RESULTS_PAGE_END
Definition carselect.h:40
s32 g_dwIsReviewMode
Whether the screen shows the results of a race instead of choosing a car.
void RenderCameraView(Model *model, Model *secondModel, s32 vehicleIndex, s32 x, s32 y, s32 width, s32 height, f32 slide, s32 hideChoiceMarker, s32 slot, s32 secondSlot, f32 spread, f32 angle)
Draw a vehicle from its trackside camera in a rectangle of the screen, and a second one beside it,...
s32 g_anCarSelectCursor[2]
The option under the cursor of each player.
const char * g_apszDriveTypes[]
The names of the driven-wheel layouts shown during car selection.
s32 g_adwCarSelectPaintPending[2]
Whether the model in the slot of each player waits to be painted.
const char * g_apszCarSelectCategory[2]
The name of the option each player chooses.
MenuItem * g_apDecalOptions[]
The decals, by the DECALS_ values.
MenuItem * g_apHandlingOptions[]
The options of the cars, each ending with NULL, and their numbers.
@ CAR_SELECT_TRANSMISSION
Definition carselect.h:27
@ CAR_SELECT_READY
Definition carselect.h:31
@ CAR_SELECT_SUSPENSION
Definition carselect.h:29
@ CAR_SELECT_HANDLING
Definition carselect.h:26
@ CAR_SELECT_CAR
Definition carselect.h:25
@ CAR_SELECT_TIRES
Definition carselect.h:28
@ CAR_SELECT_DECALS
Definition carselect.h:30
f32 g_afCarSelectSlide[2]
How far the cars of each player slide on their stage, from 1 or -1 to 0 at rest.
s32 g_adwCarSelectModelSlots[2]
The slot of g_aVehicleModelSlots of the car each player sees.
MenuItem ** g_aapCarSelectOptions[2]
The options each player chooses from.
const char * g_apszEngineLayouts[]
The names of the layouts of the engines and of the driven wheels.
s8 * g_pScrollSoundBuf
The sounds of moving the cursor and of choosing, and their lengths.
s32 g_dwPakDialogActive
The dialog of the controller pak that loads decals: whether it is open, for which player,...
s32 g_anCarSelectOptionCount[2]
The number of options each player chooses from.
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.
The menu screens: the generic screen that turns an item at a time, the track menu,...
An item of a menu screen.
Definition trackmenuitem.h:12
A model loaded from the cartridge, with its display lists and the animations of its parts.
Definition model.h:91
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
unsigned char u8
Definition ultratypes.h:18
An ambient light, aligned for the RSP.
Definition gbi.h:439
A directional light, aligned for the RSP.
Definition gbi.h:33
The vehicles of a race, the cars they are, and their place on the track.