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

Go to the source code of this file.

Functions

void entity_Shadow_init (Shadow *shadow)
 
s32 entity_can_collide_with_jumping_player (Entity *entity)
 
 INCLUDE_IMG ("entity/shadow/square.png", D_802E9170)
 
 INCLUDE_IMG ("entity/shadow/circle.png", D_802E91F0)
 
 INCLUDE_IMG ("entity/shadow/square_big.png", D_802E92F0)
 
 INCLUDE_IMG ("entity/shadow/circle_big.png", D_802E94F0)
 

Variables

Gfx Entity_Shadow_GfxCommon []
 
Gfx Entity_Shadow_LoadTexSquare []
 
Gfx Entity_Shadow_LoadTexCircle []
 
Gfx Entity_RenderSquareShadow []
 
Gfx Entity_RenderCircularShadow []
 
Gfx Entity_RenderNone []
 
EntityModelScript Entity_RenderNone_Script
 
s32 D_802E9844_padding [] = { 0, 0, 0}
 
EntityModelScript Entity_CircularShadowA_Render
 
EntityModelScript Entity_CircularShadowB_Render
 
EntityModelScript Entity_SquareShadow_Render
 
ShadowBlueprint CircularShadowA
 
ShadowBlueprint CircularShadowB
 
ShadowBlueprint SquareShadow
 

Function Documentation

◆ entity_Shadow_init()

void entity_Shadow_init ( Shadow * shadow)

Definition at line 5 of file Shadow.c.

5 {
6 shadow->scale.x = 0.1f;
7 shadow->scale.y = 0.1f;
8 shadow->scale.z = 0.1f;
9}
Vec3f scale

◆ entity_can_collide_with_jumping_player()

s32 entity_can_collide_with_jumping_player ( Entity * entity)

Definition at line 11 of file Shadow.c.

11 {
14 ) {
15 return TRUE;
16 }
17 return FALSE;
18}
@ PS_FLAG_JUMPING
Definition enums.h:3035
@ ENTITY_COLLISION_PLAYER_TOUCH_CEILING
Definition enums.h:2650
u8 collisionFlags
PlayerStatus gPlayerStatus
Definition 77480.c:39

Referenced by entity_HeartBlockContent_anim_idle().

◆ INCLUDE_IMG() [1/4]

INCLUDE_IMG ( "entity/shadow/square.png" ,
D_802E9170  )

◆ INCLUDE_IMG() [2/4]

INCLUDE_IMG ( "entity/shadow/circle.png" ,
D_802E91F0  )

◆ INCLUDE_IMG() [3/4]

INCLUDE_IMG ( "entity/shadow/square_big.png" ,
D_802E92F0  )

◆ INCLUDE_IMG() [4/4]

INCLUDE_IMG ( "entity/shadow/circle_big.png" ,
D_802E94F0  )

Variable Documentation

◆ Entity_Shadow_GfxCommon

Gfx Entity_Shadow_GfxCommon[]
Initial value:
= {
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPPipeSync(),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureFilter(G_TF_BILERP),
gsDPSetTextureConvert(G_TC_FILT),
gsSPEndDisplayList(),
}

Definition at line 27 of file Shadow.c.

27 {
28 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
29 gsDPPipeSync(),
30 gsDPSetTexturePersp(G_TP_PERSP),
31 gsDPSetTextureDetail(G_TD_CLAMP),
32 gsDPSetTextureLOD(G_TL_TILE),
33 gsDPSetTextureLUT(G_TT_NONE),
34 gsDPSetTextureFilter(G_TF_BILERP),
35 gsDPSetTextureConvert(G_TC_FILT),
36 gsSPEndDisplayList(),
37};

◆ Entity_Shadow_LoadTexSquare

Gfx Entity_Shadow_LoadTexSquare[]
Initial value:
= {
gsSPDisplayList(Entity_Shadow_GfxCommon),
gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile_4b(D_802E9170, G_IM_FMT_I, 16, 16, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
}
Gfx Entity_Shadow_GfxCommon[]
Definition Shadow.c:27

Definition at line 39 of file Shadow.c.

39 {
40 gsSPDisplayList(Entity_Shadow_GfxCommon),
41 gsDPSetTextureLUT(G_TT_NONE),
42 gsDPLoadTextureTile_4b(D_802E9170, G_IM_FMT_I, 16, 16, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
43 gsSPEndDisplayList(),
44};

◆ Entity_Shadow_LoadTexCircle

Gfx Entity_Shadow_LoadTexCircle[]
Initial value:
= {
gsSPDisplayList(Entity_Shadow_GfxCommon),
gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile_4b(D_802E91F0, G_IM_FMT_I, 16, 16, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
}

Definition at line 46 of file Shadow.c.

46 {
47 gsSPDisplayList(Entity_Shadow_GfxCommon),
48 gsDPSetTextureLUT(G_TT_NONE),
49 gsDPLoadTextureTile_4b(D_802E91F0, G_IM_FMT_I, 16, 16, 0, 0, 15, 15, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
50 gsSPEndDisplayList(),
51};

◆ Entity_RenderSquareShadow

Gfx Entity_RenderSquareShadow[]
Initial value:
= {
gsSPDisplayList(Entity_Shadow_LoadTexSquare),
gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
gsSPVertex(D_802E92B0, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
}
Gfx Entity_Shadow_LoadTexSquare[]
Definition Shadow.c:39

Definition at line 53 of file Shadow.c.

53 {
54 gsSPDisplayList(Entity_Shadow_LoadTexSquare),
55 gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
56 gsSPVertex(D_802E92B0, 4, 0),
57 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
58 gsSPEndDisplayList(),
59};

◆ Entity_RenderCircularShadow

Gfx Entity_RenderCircularShadow[]
Initial value:
= {
gsSPDisplayList(Entity_Shadow_LoadTexCircle),
gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
gsSPVertex(D_802E9270, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
}
Gfx Entity_Shadow_LoadTexCircle[]
Definition Shadow.c:46

Definition at line 61 of file Shadow.c.

61 {
62 gsSPDisplayList(Entity_Shadow_LoadTexCircle),
63 gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH),
64 gsSPVertex(D_802E9270, 4, 0),
65 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
66 gsSPEndDisplayList(),
67};

◆ Entity_RenderNone

Gfx Entity_RenderNone[]
Initial value:
= {
gsSPEndDisplayList(),
}

Definition at line 69 of file Shadow.c.

69 {
70 gsSPEndDisplayList(),
71};

◆ Entity_RenderNone_Script

EntityModelScript Entity_RenderNone_Script
Initial value:
= {
}
Gfx Entity_RenderNone[]
Definition Shadow.c:69
#define ems_Restart
Definition entity.h:49
#define ems_End
Definition entity.h:47
#define ems_Draw(dlist, holdTime)
Definition entity.h:48

Definition at line 73 of file Shadow.c.

73 {
77};

◆ D_802E9844_padding

s32 D_802E9844_padding[] = { 0, 0, 0}

Definition at line 80 of file Shadow.c.

80{ 0, 0, 0};

◆ Entity_CircularShadowA_Render

EntityModelScript Entity_CircularShadowA_Render
Initial value:
= {
}
Gfx Entity_RenderCircularShadow[]
Definition Shadow.c:61
#define ems_SetRenderMode(mode)
Definition entity.h:51
#define ems_SetFlags(flags)
Definition entity.h:52
@ ENTITY_MODEL_FLAG_FOG_DISABLED
Definition enums.h:5021
@ RENDER_MODE_SHADOW
Definition enums.h:3297

Definition at line 82 of file Shadow.c.

◆ Entity_CircularShadowB_Render

◆ Entity_SquareShadow_Render

◆ CircularShadowA

ShadowBlueprint CircularShadowA
Initial value:
= {
.renderCommandList = Entity_CircularShadowA_Render,
.animModelNode = NULL,
.onCreateCallback = entity_Shadow_init,
.entityType = ENTITY_TYPE_SHADOW,
.aabbSize = { 25, 10, 25 }
}
void entity_Shadow_init(Shadow *shadow)
Definition Shadow.c:5
EntityModelScript Entity_CircularShadowA_Render
Definition Shadow.c:82
@ ENTITY_TYPE_SHADOW
Definition enums.h:2544
@ ENTITY_FLAG_DISABLE_COLLISION
Definition enums.h:2618

Definition at line 106 of file Shadow.c.

106 {
108 .renderCommandList = Entity_CircularShadowA_Render,
109 .animModelNode = NULL,
110 .onCreateCallback = entity_Shadow_init,
111 .entityType = ENTITY_TYPE_SHADOW,
112 .aabbSize = { 25, 10, 25 }
113};

Referenced by create_shadow_type().

◆ CircularShadowB

ShadowBlueprint CircularShadowB
Initial value:
= {
.renderCommandList = Entity_CircularShadowB_Render,
.animModelNode = NULL,
.onCreateCallback = entity_Shadow_init,
.entityType = ENTITY_TYPE_SHADOW,
.aabbSize = { 25, 10, 25 }
}
EntityModelScript Entity_CircularShadowB_Render
Definition Shadow.c:90

Definition at line 115 of file Shadow.c.

115 {
117 .renderCommandList = Entity_CircularShadowB_Render,
118 .animModelNode = NULL,
119 .onCreateCallback = entity_Shadow_init,
120 .entityType = ENTITY_TYPE_SHADOW,
121 .aabbSize = { 25, 10, 25 }
122};

Referenced by create_shadow_type().

◆ SquareShadow

ShadowBlueprint SquareShadow
Initial value:
= {
.renderCommandList = Entity_SquareShadow_Render,
.animModelNode = NULL,
.onCreateCallback = entity_Shadow_init,
.entityType = ENTITY_TYPE_SHADOW,
.aabbSize = { 25, 10, 25 }
}
EntityModelScript Entity_SquareShadow_Render
Definition Shadow.c:98

Definition at line 124 of file Shadow.c.

124 {
126 .renderCommandList = Entity_SquareShadow_Render,
127 .animModelNode = NULL,
128 .onCreateCallback = entity_Shadow_init,
129 .entityType = ENTITY_TYPE_SHADOW,
130 .aabbSize = { 25, 10, 25 }
131};

Referenced by create_shadow_type().