Mario Kart 64
Loading...
Searching...
No Matches
actor_types.h File Reference
#include <ultra64.h>
#include <macros.h>
#include <common_structs.h>
Include dependency graph for actor_types.h:

Go to the source code of this file.

Data Structures

struct  Actor
 
struct  TrainCar
 
struct  RailroadCrossing
 
struct  FallingRock
 
struct  ActorSpawnData
 
struct  UnkActorSpawnData
 
struct  YoshiValleyEgg
 
struct  KiwanoFruit
 
struct  PaddleWheelBoat
 
struct  PiranhaPlant
 
struct  PalmTree
 
struct  TripleShellParent
 
struct  ShellActor
 
struct  ItemBox
 
struct  FakeItemBox
 
struct  BananaBunchParent
 
struct  BananaActor
 

Macros

#define ACTOR_LIST_SIZE   100
 
#define ACTOR_IS_NOT_EXPIRED   0xF
 
#define HELD_FAKE_ITEM_BOX   0
 
#define FAKE_ITEM_BOX_ON_GROUND   1
 
#define DESTROYED_FAKE_ITEM_BOX   2
 

Enumerations

enum  ActorType {
  ACTOR_UNKNOWN_0x01 = 0x01 , ACTOR_TREE_MARIO_RACEWAY , ACTOR_TREE_YOSHI_VALLEY , ACTOR_TREE_ROYAL_RACEWAY ,
  ACTOR_FALLING_ROCK , ACTOR_BANANA , ACTOR_GREEN_SHELL , ACTOR_RED_SHELL ,
  ACTOR_YOSHI_EGG , ACTOR_PIRANHA_PLANT , ACTOR_UNKNOWN_0x0B , ACTOR_ITEM_BOX ,
  ACTOR_FAKE_ITEM_BOX , ACTOR_BANANA_BUNCH , ACTOR_TRAIN_ENGINE , ACTOR_TRAIN_TENDER ,
  ACTOR_TRAIN_PASSENGER_CAR , ACTOR_COW , ACTOR_TREE_MOO_MOO_FARM , ACTOR_UNKNOWN_0x14 ,
  ACTOR_TRIPLE_GREEN_SHELL , ACTOR_TRIPLE_RED_SHELL , ACTOR_MARIO_SIGN , ACTOR_UNKNOWN_0x18 ,
  ACTOR_PALM_TREE , ACTOR_UNKNOWN_0x1A , ACTOR_UNKNOWN_0x1B , ACTOR_TREE_BOWSERS_CASTLE ,
  ACTOR_TREE_FRAPPE_SNOWLAND , ACTOR_CACTUS1_KALAMARI_DESERT , ACTOR_CACTUS2_KALAMARI_DESERT , ACTOR_CACTUS3_KALAMARI_DESERT ,
  ACTOR_BUSH_BOWSERS_CASTLE , ACTOR_UNKNOWN_0x21 , ACTOR_WARIO_SIGN , ACTOR_UNKNOWN_0x23 ,
  ACTOR_BOX_TRUCK , ACTOR_PADDLE_BOAT , ACTOR_RAILROAD_CROSSING , ACTOR_SCHOOL_BUS ,
  ACTOR_TANKER_TRUCK , ACTOR_BLUE_SPINY_SHELL , ACTOR_HOT_AIR_BALLOON_ITEM_BOX , ACTOR_CAR ,
  ACTOR_KIWANO_FRUIT
}
 
enum  ShellState {
  HELD_SHELL , RELEASED_SHELL , MOVING_SHELL , RED_SHELL_LOCK_ON ,
  TRIPLE_GREEN_SHELL , GREEN_SHELL_HIT_A_RACER , TRIPLE_RED_SHELL , DESTROYED_SHELL ,
  BLUE_SHELL_LOCK_ON , BLUE_SHELL_TARGET_ELIMINATED
}
 
enum  BananaState {
  HELD_BANANA , DROPPED_BANANA , FIRST_BANANA_BUNCH_BANANA , BANANA_BUNCH_BANANA ,
  BANANA_ON_GROUND , DESTROYED_BANANA
}
 

Variables

struct Actor gActorList [ACTOR_LIST_SIZE]
 

Macro Definition Documentation

◆ ACTOR_IS_NOT_EXPIRED

#define ACTOR_IS_NOT_EXPIRED   0xF

◆ ACTOR_LIST_SIZE

#define ACTOR_LIST_SIZE   100

◆ DESTROYED_FAKE_ITEM_BOX

#define DESTROYED_FAKE_ITEM_BOX   2

◆ FAKE_ITEM_BOX_ON_GROUND

#define FAKE_ITEM_BOX_ON_GROUND   1

◆ HELD_FAKE_ITEM_BOX

#define HELD_FAKE_ITEM_BOX   0

Enumeration Type Documentation

◆ ActorType

enum ActorType

gActorList should be understood to be populated by generic Actor structs. However, for human readability, many functions interacting with actor list elements expect one of the many specialized types found in this file.

Note that specialized types must be the same size as a plain Actor. Don't be mislead into thinking that because its a separate type that it can modified separately from plain Actor. If you modify/add an actor type and its size is different from plain Actor's, you WILL run into buggy (potentially crash inducing) behaviour.

Specialized structs are customizable so long as the following member specifications are met:

In general: 0x00 -> s16 type 0x02 -> s16 flags 0x30 -> Collision unk30

If player can collide with the actor: 0x0C -> f32 boundingBoxSize

If the actor makes sound (necessary for doppler/volume stuff): 0x18 -> Vec3f pos 0x24 -> Vec3f velocity

Other members are more flexible, and even the non-general specifications can be ignored IF AND ONLY IF you know exactly what you're doing.

Enumerator
ACTOR_UNKNOWN_0x01 
ACTOR_TREE_MARIO_RACEWAY 
ACTOR_TREE_YOSHI_VALLEY 
ACTOR_TREE_ROYAL_RACEWAY 
ACTOR_FALLING_ROCK 
ACTOR_BANANA 
ACTOR_GREEN_SHELL 
ACTOR_RED_SHELL 
ACTOR_YOSHI_EGG 
ACTOR_PIRANHA_PLANT 
ACTOR_UNKNOWN_0x0B 
ACTOR_ITEM_BOX 
ACTOR_FAKE_ITEM_BOX 
ACTOR_BANANA_BUNCH 
ACTOR_TRAIN_ENGINE 
ACTOR_TRAIN_TENDER 
ACTOR_TRAIN_PASSENGER_CAR 
ACTOR_COW 
ACTOR_TREE_MOO_MOO_FARM 
ACTOR_UNKNOWN_0x14 
ACTOR_TRIPLE_GREEN_SHELL 
ACTOR_TRIPLE_RED_SHELL 
ACTOR_MARIO_SIGN 
ACTOR_UNKNOWN_0x18 
ACTOR_PALM_TREE 
ACTOR_UNKNOWN_0x1A 
ACTOR_UNKNOWN_0x1B 
ACTOR_TREE_BOWSERS_CASTLE 
ACTOR_TREE_FRAPPE_SNOWLAND 
ACTOR_CACTUS1_KALAMARI_DESERT 
ACTOR_CACTUS2_KALAMARI_DESERT 
ACTOR_CACTUS3_KALAMARI_DESERT 
ACTOR_BUSH_BOWSERS_CASTLE 
ACTOR_UNKNOWN_0x21 
ACTOR_WARIO_SIGN 
ACTOR_UNKNOWN_0x23 
ACTOR_BOX_TRUCK 
ACTOR_PADDLE_BOAT 
ACTOR_RAILROAD_CROSSING 
ACTOR_SCHOOL_BUS 
ACTOR_TANKER_TRUCK 
ACTOR_BLUE_SPINY_SHELL 
ACTOR_HOT_AIR_BALLOON_ITEM_BOX 
ACTOR_CAR 
ACTOR_KIWANO_FRUIT 

◆ BananaState

Enumerator
HELD_BANANA 
DROPPED_BANANA 
FIRST_BANANA_BUNCH_BANANA 
BANANA_BUNCH_BANANA 
BANANA_ON_GROUND 
DESTROYED_BANANA 

◆ ShellState

enum ShellState
Enumerator
HELD_SHELL 
RELEASED_SHELL 
MOVING_SHELL 
RED_SHELL_LOCK_ON 
TRIPLE_GREEN_SHELL 
GREEN_SHELL_HIT_A_RACER 
TRIPLE_RED_SHELL 
DESTROYED_SHELL 
BLUE_SHELL_LOCK_ON 
BLUE_SHELL_TARGET_ELIMINATED 

Variable Documentation

◆ gActorList

struct Actor gActorList[ACTOR_LIST_SIZE]
extern