Skip to content

entity.h

EntityScript

typedef EntityScript source

EntityModelScript

typedef EntityModelScript source

CreateEntityVarArgBuffer

extern s32 CreateEntityVarArgBuffer[] source

ENTITY_SCRIPT_OP_End

ENTITY_SCRIPT_OP_End source

ENTITY_SCRIPT_OP_Jump

ENTITY_SCRIPT_OP_Jump source

ENTITY_SCRIPT_OP_Call

ENTITY_SCRIPT_OP_Call source

ENTITY_SCRIPT_OP_SetCallback

ENTITY_SCRIPT_OP_SetCallback source

ENTITY_SCRIPT_OP_Goto

ENTITY_SCRIPT_OP_Goto source

ENTITY_SCRIPT_OP_Label

ENTITY_SCRIPT_OP_Label source

ENTITY_SCRIPT_OP_RestartBoundScript

ENTITY_SCRIPT_OP_RestartBoundScript source

ENTITY_SCRIPT_OP_SetFlags

ENTITY_SCRIPT_OP_SetFlags source

ENTITY_SCRIPT_OP_ClearFlags

ENTITY_SCRIPT_OP_ClearFlags source

ENTITY_SCRIPT_OP_PlaySound

ENTITY_SCRIPT_OP_PlaySound source

ENTITY_MODEL_SCRIPT_OP_End

ENTITY_MODEL_SCRIPT_OP_End source

ENTITY_MODEL_SCRIPT_OP_Draw

ENTITY_MODEL_SCRIPT_OP_Draw source

ENTITY_MODEL_SCRIPT_OP_Restart

ENTITY_MODEL_SCRIPT_OP_Restart source

ENTITY_MODEL_SCRIPT_OP_Loop

ENTITY_MODEL_SCRIPT_OP_Loop source

ENTITY_MODEL_SCRIPT_OP_SetRenderMode

ENTITY_MODEL_SCRIPT_OP_SetRenderMode source

ENTITY_MODEL_SCRIPT_OP_SetFlags

ENTITY_MODEL_SCRIPT_OP_SetFlags source

ENTITY_MODEL_SCRIPT_OP_ClearFlags

ENTITY_MODEL_SCRIPT_OP_ClearFlags source

ENTITY_MODEL_SCRIPT_OP_DrawImage

ENTITY_MODEL_SCRIPT_OP_DrawImage source

SaveBlockData

struct SaveBlockData source
Fields

angle: s16

SwitchData

struct SwitchData source
Fields

fallVel: f32

deltaScaleX: f32

deltaScaleY: f32

animStateScaleX: s8

animStateScaleY: s8

baseScale: Vec3f

areaFlagIndex: u16

greenMotionTimer: s16

scaleAnimTimer: s16

linkedSwitch: structEntity*

ShatteringBlockData

struct ShatteringBlockData source
Fields

fragmentFlags: u16 [25];

fragmentDisplayLists: Gfx**

originalPosY: f32

alpha: s16

fadeOutCounter: s16

fragmentRebounds: s8 [25];

fragmentRotSpeed: s8 [25];

fragmentMoveAngle: u8 [25];

fragmentRotX: u8 [25];

fragmentRotY: u8 [25];

fragmentPosX: f32 [25];

fragmentPosY: f32 [25];

fragmentPosZ: f32 [25];

fragmentFallSpeed: f32 [25];

BlockData

struct BlockData source
Fields

parentEntityIndex: u8

empty: s8

coinsLeft: s16

timeLeft: s16

gameFlagIndex: u16

sinkingTimer: s16

item: s16

childEntityIndex: s16

initialY: f32

recoilInterpPhase: f32

SuperBlockContentData

struct SuperBlockContentData source
Fields

parentEntityIndex: u8

effectTimer: s8

paletteTimer: u8

paletteArrOffset: u8

isHidden: u8

yawBufferPos: u16

yawBuffer: f32 [20];

gfx1: Gfx*

gfx2: Gfx*

HeartBlockContentData

struct HeartBlockContentData source
Fields

parentEntityIndex: u8

state: u8

sparkleTimer: s8

sparkleTrailTimer: s8

sparkleTrailPosY: f32

heartbeatTimer: u8

sparkleEffectType: u8

riseVel: f32

sparkleTrailAngle: f32

sparkleTrailRadius: f32

bouncePhase: f32

yawBufferPos: u16

yawBuffer: f32 [10];

rotRate: f32

WoodenCrateData

struct WoodenCrateData source
Fields

itemID: s32

globalFlagIndex: u16

fragmentsGfx: Gfx**

basePosY: f32

fragmentRebounds: s8 [36];

fragmentMoveAngle: u8 [36];

fragmentRotX: u8 [36];

fragmentRotY: u8 [36];

fragmentLateralSpeed: u8 [36];

fragmentRotSpeed: f32 [36];

fragmentPosX: f32 [36];

fragmentPosY: f32 [36];

fragmentPosZ: f32 [36];

fragmentFallSpeed: f32 [36];

ChestData

struct ChestData source
Fields

gameFlagIndex: u16

giveItemTimer: s16

state: u8

openState: u8

postLidAnimDelay: s8

lidAngle: f32

lidAnimInterpPhase: f32

itemID: s32

itemEntityIndex: s32

itemEntityPos: Vec3f

giveItemRadiusInterpPhase: f32

giveItemHeightInterpPhase: f32

itemVelY: f32

gotItemDone: s8

gotItemEffect: structEffectInstance*

BlueWarpPipeData

struct BlueWarpPipeData source
Fields

timer: s32

isRaised: s32

entryID: s32

onEnterPipeEvt: EvtScript*

flagIndex: s32

finalPosY: f32

SimpleSpringData

struct SimpleSpringData source
Fields

launchVel: s32

HiddenPanelData

struct HiddenPanelData source
Fields

state: s8

timer: s8

needSpawnItem: s8

pickupVar: u16

standingNpcIndex: s32

npcFlags: s32

itemID: s32

spawnedItemIndex: s32

spawnedItemPos: Vec3i

initialY: f32

riseVel: f32

riseInterpPhase: f32

rotSpeed: f32

entityMatrix: Matrix4f

modelID: u16

renderDList: Gfx*

SignpostData

struct SignpostData source

PadlockData

struct PadlockData source
Fields

pushSpeed: f32

shacklePos: f32

fallSpeed: f32

rotSpeed: f32

blinkCounter: u8

timer: s8

state: s8

shackleMtx: Mtx*

shackleGfx: Gfx*

BoardedFloorData

struct BoardedFloorData source
Fields

fragmentsGfx: Gfx**

inititalY: f32

fragmentRebounds: s8 [13];

fragmentMoveAngle: u8 [13];

fragmentRotX: u8 [13];

fragmentRotY: u8 [13];

fragmentLateralSpeed: u8 [13];

fragmentRotSpeed: f32 [13];

fragmentPosX: f32 [13];

fragmentPosY: f32 [13];

fragmentPosZ: f32 [13];

fragmentFallSpeed: f32 [13];

BombableRockData

struct BombableRockData source
Fields

fragmentsGfx: Gfx**

inititalY: f32

fragmentRebounds: s8 [6];

fragmentMoveAngle: u8 [6];

fragmentRotX: u8 [6];

fragmentRotY: u8 [6];

fragmentLateralSpeed: u8 [6];

fragmentRotSpeed: f32 [6];

fragmentPosX: f32 [6];

fragmentPosY: f32 [6];

fragmentPosZ: f32 [6];

fragmentFallSpeed: f32 [6];

TweesterPath

typedef TweesterPath source

TweesterData

struct TweesterData source
Fields

faceAnimState: s8

faceAnimTimer: s8

faceAnimTexOffset: s8

rotSpeed: f32

innerWhirlRotY: f32

outerWhirlRotY: f32

mtxInnerWhirl: Mtx

mtxOuterWhirl: Mtx

innerWhirlTexOffsetX: s16

innerWhirlTexOffsetY: s16

outerWhirlTexOffsetX: s16

outerWhirlTexOffsetY: s16

frameCounter: s16

curPath: s32*

paths: s32**

targetX: s16

targetY: s16

targetZ: s16

pathOffset: s16

yaw: f32

StarBoxLauncherData

struct StarBoxLauncherData source
Fields

state: s8

timer: s8

flags: s8

faceDataIndex: s8

faceAnimTimer: s8

faceTexOffset: s8

basePosX: f32

basePosZ: f32

basePosY: f32

riseSpeedPhase: f32

riseVel: f32

rotZPhase: f32

maxRotZ: f32

CymbalPlantData

struct CymbalPlantData source
Fields

state: u8

timer: s16

angle: f32

dist: f32

PinkFlowerData

struct PinkFlowerData source
Fields

state: u16

timer: u16

linkedEntityIndex: u16

initialRotY: f32

SpinningFlowerData

struct SpinningFlowerData source
Fields

state: s8

rot: Vec3f

spinSpeed: f32

goalPos: Vec3s

TrumpetPlantData

struct TrumpetPlantData source
Fields

numCoins: s32

MunchlesiaData

struct MunchlesiaData source

ArrowSignData

struct ArrowSignData source
Fields

angle: f32

CircularShadowA

extern ShadowBlueprint CircularShadowA source

CircularShadowB

extern ShadowBlueprint CircularShadowB source

SquareShadow

extern ShadowBlueprint SquareShadow source

Entity_SavePoint

extern EntityBlueprint Entity_SavePoint source

Entity_RedSwitch

extern EntityBlueprint Entity_RedSwitch source

Entity_BlueSwitch

extern EntityBlueprint Entity_BlueSwitch source

Entity_HugeBlueSwitch

extern EntityBlueprint Entity_HugeBlueSwitch source

Entity_GreenStompSwitch

extern EntityBlueprint Entity_GreenStompSwitch source

Entity_InertYellowBlock

extern EntityBlueprint Entity_InertYellowBlock source

Entity_InertRedBlock

extern EntityBlueprint Entity_InertRedBlock source

Entity_BrickBlock

extern EntityBlueprint Entity_BrickBlock source

Entity_MulticoinBlock

extern EntityBlueprint Entity_MulticoinBlock source

Entity_Hammer1Block

extern EntityBlueprint Entity_Hammer1Block source

Entity_Hammer1BlockWideX

extern EntityBlueprint Entity_Hammer1BlockWideX source

Entity_Hammer1BlockWideZ

extern EntityBlueprint Entity_Hammer1BlockWideZ source

Entity_Hammer1BlockTiny

extern EntityBlueprint Entity_Hammer1BlockTiny source

Entity_Hammer2Block

extern EntityBlueprint Entity_Hammer2Block source

Entity_Hammer2BlockWideX

extern EntityBlueprint Entity_Hammer2BlockWideX source

Entity_Hammer2BlockWideZ

extern EntityBlueprint Entity_Hammer2BlockWideZ source

Entity_Hammer2BlockTiny

extern EntityBlueprint Entity_Hammer2BlockTiny source

Entity_Hammer3Block

extern EntityBlueprint Entity_Hammer3Block source

Entity_Hammer3BlockWideX

extern EntityBlueprint Entity_Hammer3BlockWideX source

Entity_Hammer3BlockWideZ

extern EntityBlueprint Entity_Hammer3BlockWideZ source

Entity_Hammer3BlockTiny

extern EntityBlueprint Entity_Hammer3BlockTiny source

Entity_PushBlock

extern EntityBlueprint Entity_PushBlock source

Entity_PowBlock

extern EntityBlueprint Entity_PowBlock source

Entity_YellowBlock

extern EntityBlueprint Entity_YellowBlock source

Entity_HiddenYellowBlock

extern EntityBlueprint Entity_HiddenYellowBlock source

Entity_RedBlock

extern EntityBlueprint Entity_RedBlock source

Entity_HiddenRedBlock

extern EntityBlueprint Entity_HiddenRedBlock source

Entity_TriggerBlock

extern EntityBlueprint Entity_TriggerBlock source

Entity_HeartBlock

extern EntityBlueprint Entity_HeartBlock source

Entity_SuperBlock

extern EntityBlueprint Entity_SuperBlock source

Entity_ScriptSpring

extern EntityBlueprint Entity_ScriptSpring source

Entity_SimpleSpring

extern EntityBlueprint Entity_SimpleSpring source

Entity_HiddenPanel

extern EntityBlueprint Entity_HiddenPanel source

Entity_GiantChest

extern EntityBlueprint Entity_GiantChest source

Entity_Chest

extern EntityBlueprint Entity_Chest source

Entity_WoodenCrate

extern EntityBlueprint Entity_WoodenCrate source

Entity_BlueWarpPipe

extern EntityBlueprint Entity_BlueWarpPipe source

Entity_Signpost

extern EntityBlueprint Entity_Signpost source

Entity_Padlock

extern EntityBlueprint Entity_Padlock source

Entity_PadlockRedFrame

extern EntityBlueprint Entity_PadlockRedFrame source

Entity_PadlockRedFace

extern EntityBlueprint Entity_PadlockRedFace source

Entity_PadlockBlueFace

extern EntityBlueprint Entity_PadlockBlueFace source

Entity_BoardedFloor

extern EntityBlueprint Entity_BoardedFloor source

Entity_BombableRock

extern EntityBlueprint Entity_BombableRock source

Entity_BombableRockWide

extern EntityBlueprint Entity_BombableRockWide source

Entity_Tweester

extern EntityBlueprint Entity_Tweester source

Entity_StarBoxLauncher

extern EntityBlueprint Entity_StarBoxLauncher source

Entity_CymbalPlant

extern EntityBlueprint Entity_CymbalPlant source

Entity_PinkFlower

extern EntityBlueprint Entity_PinkFlower source

Entity_SpinningFlower

extern EntityBlueprint Entity_SpinningFlower source

Entity_BellbellPlant

extern EntityBlueprint Entity_BellbellPlant source

Entity_TrumpetPlant

extern EntityBlueprint Entity_TrumpetPlant source

Entity_Munchlesia

extern EntityBlueprint Entity_Munchlesia source

Entity_ArrowSign

extern EntityBlueprint Entity_ArrowSign source

EntityModel

struct EntityModel source
Fields

flags: s32

renderMode: s8

nextFrameTime: f32Set to 1.0 after each update

timeScale: f32Default is 1.0

cmdListReadPos: EntityModelScript*

gfx: union { ... }

transform: Mtx

cmdListSavedPos: EntityModelScript*

vertexArray: Vec3s*

fpSetupGfxCallback: void (*)(void *)

setupGfxCallbackArg0: void*

EntityModelList

typedef EntityModelList source

get_entity_model

EntityModel* get_entity_model(s32 idx) source

load_entity_model

s32 load_entity_model(EntityModelScript* cmdList) source

ALT_load_entity_model

s32 ALT_load_entity_model(EntityModelScript* cmdList) source

entity_set_render_script

void entity_set_render_script( Entity* entity, EntityModelScript* cmdList ) source

set_entity_model_render_command_list

void set_entity_model_render_command_list( s32 idx, EntityModelScript* cmdList ) source

virtual_entity_list_render_world

void virtual_entity_list_render_world() source

virtual_entity_list_render_UI

void virtual_entity_list_render_UI() source