1#ifndef COASTLINE_MODEL_H
2#define COASTLINE_MODEL_H
35#define MODEL_PART_LIGHT_RAMP 0x0003
38#define MODEL_PART_TWO_SIDED 0x0004
41#define MODEL_PART_TRANSLUCENT 0x0008
44#define MODEL_PART_FLAT 0x0080
47#define MODEL_PART_RAMPED 0x0400
59#define MODEL_ANIMATION_REPEAT 0x1
60#define MODEL_ANIMATION_BOUNCE 0x2
61#define MODEL_ANIMATION_REVERSING 0x4
209#ifdef COASTLINE_ROM_POINTERS
The graphics binary interface types the gu routines fill in for the RSP microcode.
void RelocateModelPointers(Model *model)
Turn the offsets a model is loaded with into pointers: its animations, their vertices and keys,...
void RemapPointer(u32 *pointer, const void *lo, const void *hi, const void *base)
Move a pointer that falls in a range of offsets to the same place from a base.
void BounceModelAnimations(Model *model)
Make every animation of a model repeat by turning back at its end.
void PlayModelAnimationsOnce(Model *model)
Make the animations of a model stop at their ends rather than repeat.
void DrawModelAt(Model *model, f32 x, f32 y, f32 z, f32 angle, f32 scale)
Draw a model turned about its own axis by an angle in radians, scaled, stood up and placed at a posit...
Model * DmaReadAndFixupTrackModel(void *dst, u32 romStart, u32 romEnd)
Read a model from the cartridge and turn its offsets into pointers.
void DrawModelList(Model *model, f32 m[4][4])
Draw the parts of a model, the opaque ones first, under a matrix.
Model * DecompressModel(void *dst, u32 source)
Load a model into a buffer and turn its offsets into pointers.
void FixupDisplayListPointers(Gfx *displayList, const void *lo, const void *hi, const void *base)
Remap the addresses of the vertices and textures of a display list, up to its end.
void DrawRotatedModel(Model *model, f32 x, f32 y, f32 z, f32 angle)
Draw a model turned about its own axis by an angle in radians, at a 32nd of its size,...
void AdvanceModelAnimations(Model *model)
Advance every animation of a model by the time of the frame, blending its vertices between keyframes.
s32 g_dwDrawModelListNoZBuffer
Whether DrawModelList() draws without the depth buffer.
void SetModelAnimationFlags(Model *model, s32 set, s32 clear)
Set flags on every animation of a model, then clear others.
Light g_MenuDirectionalLight
The directional light of the menus that draw models.
u32 g_adwModelShadeColors[4]
The light of the parts of a model lit by their light ramp, by its index.
Ambient g_MenuAmbientLight
The ambient light of the menus that draw models.
void LoopModelAnimations(Model *model)
Make every animation of a model wrap to its start at its end, instead of turning back.
Pointers of 32 bits in the data the game reads from files and in its display lists.
#define TGR_PTR(T)
A pointer of 32 bits to T.
Definition ptr32.h:152
A command of a display list of the game.
Definition gbicommand.h:30
The animations of a model.
Definition model.h:82
s32 count
Definition model.h:83
ModelAnimation * entries[]
Definition model.h:84
An animation of vertices of a model, blended between its keys.
Definition model.h:64
u16 startKey
Definition model.h:74
Vtx * vertices
Definition model.h:69
void * unreconstructed8
Definition model.h:71
s32 keyCount
Definition model.h:72
s32 vertexCount
Definition model.h:65
f32 time
Definition model.h:77
f32 endTime
Definition model.h:76
ModelKeyframe * keys[]
Definition model.h:78
u16 flags
Definition model.h:73
f32 startTime
Definition model.h:75
A key of an animation: its time, then the position of each vertex, then its normal.
Definition model.h:53
s16 positions[][3]
Definition model.h:55
f32 time
Definition model.h:54
A part of a model: its display list, how it is drawn, and where.
Definition model.h:24
Vec3f position
Definition model.h:31
u16 flags
Definition model.h:30
Gfx * displayList
Definition model.h:28
A model loaded from the cartridge, with its display lists and the animations of its parts.
Definition model.h:91
ModelAnimationList * animations
Definition model.h:98
u32 partCount
Definition model.h:96
ModelPart parts[]
Definition model.h:99
A point or direction in space.
Definition vecmath.h:17
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
short s16
Definition ultratypes.h:24
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
An ambient light, aligned for the RSP.
Definition gbi.h:439
A display list command for the Fast3D microcode.
Definition gbi.h:132
A directional light, aligned for the RSP.
Definition gbi.h:33
The source or converted vertex data referenced by a display-list command.
Definition gbicommand.h:24
A vertex for the RSP, with a colour or with a normal.
Definition gbi.h:75
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...