Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Shadow.c
Go to the documentation of this file.
1#include "common.h"
2#include "entity.h"
3#include "include_asset.h"
4
6 shadow->scale.x = 0.1f;
7 shadow->scale.y = 0.1f;
8 shadow->scale.z = 0.1f;
9}
10
14 ) {
15 return TRUE;
16 }
17 return FALSE;
18}
19
20INCLUDE_IMG("entity/shadow/square.png", D_802E9170);
21INCLUDE_IMG("entity/shadow/circle.png", D_802E91F0);
22#include "entity/vtx/shadow1.vtx.inc.c"
23#include "entity/vtx/shadow2.vtx.inc.c"
24INCLUDE_IMG("entity/shadow/square_big.png", D_802E92F0);
25INCLUDE_IMG("entity/shadow/circle_big.png", D_802E94F0);
26
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};
38
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};
45
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};
52
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};
60
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};
68
70 gsSPEndDisplayList(),
71};
72
78
79//TODO split files
80s32 D_802E9844_padding[] = { 0, 0, 0};
81
89
97
105
108 .renderCommandList = Entity_CircularShadowA_Render,
109 .animModelNode = NULL,
110 .onCreateCallback = entity_Shadow_init,
111 .entityType = ENTITY_TYPE_SHADOW,
112 .aabbSize = { 25, 10, 25 }
113};
114
117 .renderCommandList = Entity_CircularShadowB_Render,
118 .animModelNode = NULL,
119 .onCreateCallback = entity_Shadow_init,
120 .entityType = ENTITY_TYPE_SHADOW,
121 .aabbSize = { 25, 10, 25 }
122};
123
126 .renderCommandList = Entity_SquareShadow_Render,
127 .animModelNode = NULL,
128 .onCreateCallback = entity_Shadow_init,
129 .entityType = ENTITY_TYPE_SHADOW,
130 .aabbSize = { 25, 10, 25 }
131};
EntityModelScript Entity_RenderNone_Script
Definition Shadow.c:73
EntityModelScript Entity_SquareShadow_Render
Definition Shadow.c:98
Gfx Entity_RenderCircularShadow[]
Definition Shadow.c:61
void entity_Shadow_init(Shadow *shadow)
Definition Shadow.c:5
s32 entity_can_collide_with_jumping_player(Entity *entity)
Definition Shadow.c:11
Gfx Entity_RenderSquareShadow[]
Definition Shadow.c:53
ShadowBlueprint SquareShadow
Definition Shadow.c:124
ShadowBlueprint CircularShadowB
Definition Shadow.c:115
Gfx Entity_Shadow_LoadTexSquare[]
Definition Shadow.c:39
Gfx Entity_Shadow_LoadTexCircle[]
Definition Shadow.c:46
Gfx Entity_RenderNone[]
Definition Shadow.c:69
EntityModelScript Entity_CircularShadowA_Render
Definition Shadow.c:82
ShadowBlueprint CircularShadowA
Definition Shadow.c:106
s32 D_802E9844_padding[]
Definition Shadow.c:80
Gfx Entity_Shadow_GfxCommon[]
Definition Shadow.c:27
EntityModelScript Entity_CircularShadowB_Render
Definition Shadow.c:90
Vec3f scale
s32 EntityModelScript[]
Definition entity.h:7
#define ems_Restart
Definition entity.h:49
#define ems_SetRenderMode(mode)
Definition entity.h:51
#define ems_SetFlags(flags)
Definition entity.h:52
#define ems_End
Definition entity.h:47
#define ems_Draw(dlist, holdTime)
Definition entity.h:48
@ ENTITY_MODEL_FLAG_FOG_DISABLED
Definition enums.h:5021
@ PS_FLAG_JUMPING
Definition enums.h:3035
@ ENTITY_TYPE_SHADOW
Definition enums.h:2544
@ ENTITY_COLLISION_PLAYER_TOUCH_CEILING
Definition enums.h:2650
@ RENDER_MODE_SHADOW
Definition enums.h:3297
@ ENTITY_FLAG_DISABLE_COLLISION
Definition enums.h:2618
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
u8 collisionFlags
PlayerStatus gPlayerStatus
Definition 77480.c:39