Mario Kart 64
Loading...
Searching...
No Matches
ModelLoader Class Reference

#include <ModelLoader.h>

Collaboration diagram for ModelLoader:
[legend]

Data Structures

struct  CourseMap
 
struct  LoadModelList
 

Public Member Functions

void Add (LoadModelList list)
 
void Load ()
 

Private Member Functions

void Extract (std::shared_ptr< Course > course)
 
void UpdateVtx (LoadModelList list)
 

Private Attributes

std::vector< LoadModelList_deferredList
 
bool _hasRan = false
 

Detailed Description

Lists are deferred until load time so that models that use the same course may all use the same extraction

Note ensure that the buffers passed to LoadModelList are big enough for the requested data.

This class should only be ran once.

Usage:

ModelLoader::LoadModelList bowserStatueList = {
 .course = gBowsersCastle,
 .gfxBuffer = &gBowserStatueGfx[0],
 .gfxBufferSize = 162,
 .gfxStart = (0x2BB8 / 8), // This is 0x2BB8 / sizeof(N64Gfx) not sizeof(Gfx)
 .vtxBuffer = &gBowserStatueVtx[0],
 .vtxBufferSize = 717,
 .vtxStart = 1942,

};

gModelLoader.Add(bowserStatueList);

Member Function Documentation

◆ Add()

void ModelLoader::Add ( LoadModelList list)

◆ Extract()

void ModelLoader::Extract ( std::shared_ptr< Course > course)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Load()

void ModelLoader::Load ( )
Here is the call graph for this function:

◆ UpdateVtx()

void ModelLoader::UpdateVtx ( LoadModelList list)
private
Here is the caller graph for this function:

Field Documentation

◆ _deferredList

std::vector<LoadModelList> ModelLoader::_deferredList
private

◆ _hasRan

bool ModelLoader::_hasRan = false
private

The documentation for this class was generated from the following files: