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

#include <Train.h>

Inheritance diagram for ATrain:
[legend]
Collaboration diagram for ATrain:
[legend]

Public Types

enum  SpawnMode : uint16_t { POINT , AUTO }
 
enum  TenderStatus { NO_TENDER , HAS_TENDER }
 

Public Member Functions

 ATrain (const SpawnParams &params)
 
 ~ATrain ()
 
virtual void SetSpawnParams (SpawnParams &params)
 
virtual void Tick () override
 
virtual void Draw (Camera *camera) override
 
virtual void VehicleCollision (s32 playerId, Player *player) override
 
virtual bool IsMod () override
 
s32 AddSmoke (s32 trainIndex, Vec3f pos, f32 velocity)
 
void SyncComponents (TrainCarStuff *trainCar, s16 orientationY)
 
virtual void DrawEditorProperties () override
 
- Public Member Functions inherited from AActor
virtual ~AActor ()=default
 
 AActor ()
 
 AActor (SpawnParams params)
 
virtual void BeginPlay ()
 
virtual void Collision (Player *player, AActor *actor)
 
void SetLocation (FVector pos)
 
virtual void Destroy ()
 
FVector GetLocation () const
 
IRotator GetRotation () const
 
FVector GetScale () const
 
void Translate (FVector pos)
 
void Rotate (IRotator rot)
 
void SetScale (FVector scale)
 

Static Public Member Functions

static size_t GetCount ()
 
static ATrainSpawn (ATrain::TenderStatus tender, size_t numCarriages, f32 speed, uint32_t pathIndex, uint32_t pathPoint, ATrain::SpawnMode spawnMode)
 

Data Fields

TrainCarStuff Locomotive
 
TrainCarStuff Tender
 
std::vector< TrainCarStuffPassengerCars
 
size_t PassengerCarsCount = 0
 
ATrain::SpawnMode SpawnType = ATrain::SpawnMode::AUTO
 
uint32_t PathIndex = 0
 
uint32_t PathPoint = 0
 
TenderStatus HasTender = TenderStatus::NO_TENDER
 
s32 SomeFlags
 
f32 SomeMultiplier
 
size_t Index
 
int32_t SmokeParticles [128]
 
int32_t NextParticlePtr = 0
 
int16_t AnotherSmokeTimer = 0
 
int16_t SmokeTimer = 0
 
- Data Fields inherited from AActor
s16 Type = 0
 
s16 Flags
 
s16 Unk_04
 
s16 State
 
f32 Unk_08
 
f32 BoundingBoxSize
 
Vec3s Rot = {0, 0, 0}
 
s16 Unk_16
 
Vec3f Pos
 
Vec3f Velocity = {0, 0, 0}
 
Collision Unk30
 
const char * Model = ""
 
uint8_t uuid [16]
 
const char * Name = ""
 
const char * ResourceName = ""
 
FVector SpawnPos = {0.0f, 0.0f, 0.0f}
 
IRotator SpawnRot = {0, 0, 0}
 
FVector SpawnScale = {1.0f, 1.0f, 1.0f}
 
FVector Scale = {1, 1, 1}
 
float Speed = 0.0f
 
std::vector< TriangleTriangles
 
bool bPendingDestroy = false
 

Static Private Attributes

static size_t _count = 0
 
static std::map< uint32_t, std::vector< uint32_t > > TrainCounts
 

Detailed Description

Note that you can only remove the tender if there are no carriages

  • waypoint initial waypoint to spawn at.

Member Enumeration Documentation

◆ SpawnMode

enum ATrain::SpawnMode : uint16_t
Enumerator
POINT 
AUTO 

◆ TenderStatus

Enumerator
NO_TENDER 
HAS_TENDER 

Constructor & Destructor Documentation

◆ ATrain()

ATrain::ATrain ( const SpawnParams & params)
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ATrain()

ATrain::~ATrain ( )
inline

Member Function Documentation

◆ AddSmoke()

s32 ATrain::AddSmoke ( s32 trainIndex,
Vec3f pos,
f32 velocity )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Draw()

void ATrain::Draw ( Camera * camera)
overridevirtual

Reimplemented from AActor.

◆ DrawEditorProperties()

void ATrain::DrawEditorProperties ( )
overridevirtual

Reimplemented from AActor.

◆ GetCount()

static size_t ATrain::GetCount ( )
inlinestatic

◆ IsMod()

bool ATrain::IsMod ( )
overridevirtual

Reimplemented from AActor.

◆ SetSpawnParams()

void ATrain::SetSpawnParams ( SpawnParams & params)
virtual

Make sure you call this in derived classes! Usage: MyActor::SetSpawnParams(SetSpawnParams& params) { AActor::SetSpawnParams(params); // Calls default implementation }

Reimplemented from AActor.

Here is the call graph for this function:

◆ Spawn()

static ATrain * ATrain::Spawn ( ATrain::TenderStatus tender,
size_t numCarriages,
f32 speed,
uint32_t pathIndex,
uint32_t pathPoint,
ATrain::SpawnMode spawnMode )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SyncComponents()

void ATrain::SyncComponents ( TrainCarStuff * trainCar,
s16 orientationY )
Todo
: Change actorIndex to ptr to TrainCar actor

◆ Tick()

void ATrain::Tick ( )
overridevirtual

Reimplemented from AActor.

Here is the call graph for this function:

◆ VehicleCollision()

void ATrain::VehicleCollision ( s32 playerId,
Player * player )
overridevirtual

Reimplemented from AActor.

Here is the call graph for this function:

Field Documentation

◆ _count

size_t ATrain::_count = 0
staticprivate

◆ AnotherSmokeTimer

int16_t ATrain::AnotherSmokeTimer = 0

◆ HasTender

◆ Index

size_t ATrain::Index

◆ Locomotive

TrainCarStuff ATrain::Locomotive

◆ NextParticlePtr

int32_t ATrain::NextParticlePtr = 0

◆ PassengerCars

std::vector<TrainCarStuff> ATrain::PassengerCars

◆ PassengerCarsCount

size_t ATrain::PassengerCarsCount = 0

◆ PathIndex

uint32_t ATrain::PathIndex = 0

◆ PathPoint

uint32_t ATrain::PathPoint = 0

◆ SmokeParticles

int32_t ATrain::SmokeParticles[128]

◆ SmokeTimer

int16_t ATrain::SmokeTimer = 0

◆ SomeFlags

s32 ATrain::SomeFlags

◆ SomeMultiplier

f32 ATrain::SomeMultiplier

◆ SpawnType

◆ Tender

TrainCarStuff ATrain::Tender

◆ TrainCounts

std::map< uint32_t, std::vector< uint32_t > > ATrain::TrainCounts
staticprivate

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