Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
ArrowSign.c File Reference

Go to the source code of this file.

Functions

void entity_ArrowSign_setupGfx (s32 entityIndex)
 
void entity_ArrowSign_idle (void)
 
void entity_ArrowSign_init (Entity *entity)
 
s32 entity_ArrowSign_handle_collision (Entity *entity)
 

Variables

Gfx Entity_ArrowSign_Render []
 
Gfx Entity_ArrowSign_RenderRotatedSign []
 
Mtx Entity_ArrowSign_mtxSign
 
EntityScript Entity_ArrowSign_Script
 
EntityModelScript Entity_ArrowSign_RenderScript = STANDARD_ENTITY_MODEL_SCRIPT(Entity_ArrowSign_Render, RENDER_MODE_SURFACE_OPA)
 
EntityBlueprint Entity_ArrowSign
 

Function Documentation

◆ entity_ArrowSign_setupGfx()

void entity_ArrowSign_setupGfx ( s32 entityIndex)

Definition at line 9 of file ArrowSign.c.

9 {
12 ArrowSignData* data = entity->dataBuf.arrowSign;
15 Gfx* gfx;
16
18 guRotateF(sp58, clamp_angle(data->angle - 90.0f), 0.0f, 0.0f, 1.0f);
21
24 gSPDisplayList(gfxPos++, gfx);
27}
BSS s32 PopupMenu_SelectedIndex
Mtx matrixStack[0x200]
f32 Matrix4f[4][4]
#define guRotateF
#define guMtxF2L
#define guMtxCatF
#define clamp_angle
#define ENTITY_ADDR(entity, type, data)
Definition entity.h:64
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
Gfx Entity_ArrowSign_RenderRotatedSign[]
Definition ArrowSign.c:57
Mtx Entity_ArrowSign_mtxSign
Definition ArrowSign.c:32
Gfx * gMainGfxPos
Definition cam_main.c:15
u16 gMatrixListPos
Definition main_loop.c:45
DisplayContext * gDisplayContext
Definition cam_main.c:16

Referenced by entity_ArrowSign_init().

◆ entity_ArrowSign_idle()

void entity_ArrowSign_idle ( void )

Definition at line 29 of file ArrowSign.c.

29 {
30}

◆ entity_ArrowSign_init()

void entity_ArrowSign_init ( Entity * entity)

Definition at line 32 of file ArrowSign.c.

32 {
34 ArrowSignData* data = entity->dataBuf.arrowSign;
35
36 data->angle = angle;
37 data->unk_08 = angle;
38 entity->renderSetupFunc = entity_ArrowSign_setupGfx;
39}
s32 CreateEntityVarArgBuffer[]
Definition entity.c:35
void entity_ArrowSign_setupGfx(s32 entityIndex)
Definition ArrowSign.c:9

◆ entity_ArrowSign_handle_collision()

s32 entity_ArrowSign_handle_collision ( Entity * entity)

Definition at line 41 of file ArrowSign.c.

41 {
43 (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
45 }
46}
@ PA_FLAG_USING_WATT
Definition enums.h:3090
@ ENTITY_COLLISION_PLAYER_TOUCH_WALL
Definition enums.h:2651
s32 entity_start_script(Entity *entity)
Definition entity.c:560
PlayerStatus gPlayerStatus
Definition 77480.c:39

Variable Documentation

◆ Entity_ArrowSign_Render

Gfx Entity_ArrowSign_Render[]
extern

Definition at line 81 of file ArrowSign.c.

81 {
84};
Gfx Entity_ArrowSign_RenderPole__[]
Definition ArrowSign.c:76

◆ Entity_ArrowSign_RenderRotatedSign

Gfx Entity_ArrowSign_RenderRotatedSign[]
extern

◆ Entity_ArrowSign_mtxSign

Mtx Entity_ArrowSign_mtxSign
extern

Definition at line 32 of file ArrowSign.c.

Referenced by entity_ArrowSign_setupGfx().

◆ Entity_ArrowSign_Script

EntityScript Entity_ArrowSign_Script
Initial value:
= {
}
#define es_SetCallback(func, time)
Definition entity.h:38
#define es_End
Definition entity.h:35
void entity_ArrowSign_idle(void)
Definition ArrowSign.c:29

Definition at line 48 of file ArrowSign.c.

◆ Entity_ArrowSign_RenderScript

◆ Entity_ArrowSign

EntityBlueprint Entity_ArrowSign
Initial value:
= {
.typeDataSize = sizeof(ArrowSignData),
.renderCommandList = Entity_ArrowSign_RenderScript,
.modelAnimationNodes = 0,
.updateEntityScript = Entity_ArrowSign_Script,
.fpHandleCollision = entity_ArrowSign_handle_collision,
{ .dma = ENTITY_ROM(ArrowSign) },
.aabbSize = { 18, 50, 10 }
}
#define ENTITY_ROM(name)
Definition entity.h:65
@ ENTITY_TYPE_RED_ARROW_SIGNS
Definition enums.h:2589
@ ENTITY_FLAG_400
Definition enums.h:2623
@ ENTITY_FLAG_FIXED_SHADOW_SIZE
Definition enums.h:2622
@ ENTITY_FLAG_CIRCULAR_SHADOW
Definition enums.h:2624
EntityScript Entity_ArrowSign_Script
Definition ArrowSign.c:48
void entity_ArrowSign_init(Entity *entity)
Definition ArrowSign.c:32
EntityModelScript Entity_ArrowSign_RenderScript
Definition ArrowSign.c:53
s32 entity_ArrowSign_handle_collision(Entity *entity)
Definition ArrowSign.c:41

Definition at line 55 of file ArrowSign.c.

55 {
57 .typeDataSize = sizeof(ArrowSignData),
58 .renderCommandList = Entity_ArrowSign_RenderScript,
59 .modelAnimationNodes = 0,
60 .fpInit = entity_ArrowSign_init,
61 .updateEntityScript = Entity_ArrowSign_Script,
62 .fpHandleCollision = entity_ArrowSign_handle_collision,
63 { .dma = ENTITY_ROM(ArrowSign) },
64 .entityType = ENTITY_TYPE_RED_ARROW_SIGNS,
65 .aabbSize = { 18, 50, 10 }
66};