Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
graph_node.h
Go to the documentation of this file.
1 #ifndef _GRAPH_NODE_H_
2 #define _GRAPH_NODE_H_
3 
4 #include "types.h"
5 #include "game/memory.h"
6 
7 struct AllocOnlyPool;
8 
13 extern u16 gAreaUpdateCounter;
14 
15 extern struct GraphNode *gCurRootGraphNode;
16 extern struct GraphNode *gCurGraphNodeList[];
17 
18 extern s16 gCurGraphNodeIndex;
19 
20 extern struct GraphNode gObjParentGraphNode;
21 
22 extern Vec3f gVec3fZero;
23 extern Vec3s gVec3sZero;
24 extern Vec3f gVec3fOne;
25 extern Vec3s gVec3sOne;
26 
27 #define GRAPH_RENDER_ACTIVE (1 << 0)
28 #define GRAPH_RENDER_CHILDREN_FIRST (1 << 1)
29 #define GRAPH_RENDER_BILLBOARD (1 << 2)
30 #define GRAPH_RENDER_Z_BUFFER (1 << 3)
31 #define GRAPH_RENDER_INVISIBLE (1 << 4)
32 #define GRAPH_RENDER_HAS_ANIMATION (1 << 5)
33 
34 // Whether the node type has a function pointer of type GraphNodeFunc
35 #define GRAPH_NODE_TYPE_FUNCTIONAL 0x100
36 
37 // The discriminant for different types of geo nodes
38 #define GRAPH_NODE_TYPE_ROOT 0x001
39 #define GRAPH_NODE_TYPE_ORTHO_PROJECTION 0x002
40 #define GRAPH_NODE_TYPE_PERSPECTIVE (0x003 | GRAPH_NODE_TYPE_FUNCTIONAL)
41 #define GRAPH_NODE_TYPE_MASTER_LIST 0x004
42 #define GRAPH_NODE_TYPE_START 0x00A
43 #define GRAPH_NODE_TYPE_LEVEL_OF_DETAIL 0x00B
44 #define GRAPH_NODE_TYPE_SWITCH_CASE (0x00C | GRAPH_NODE_TYPE_FUNCTIONAL)
45 #define GRAPH_NODE_TYPE_CAMERA (0x014 | GRAPH_NODE_TYPE_FUNCTIONAL)
46 #define GRAPH_NODE_TYPE_TRANSLATION_ROTATION 0x015
47 #define GRAPH_NODE_TYPE_TRANSLATION 0x016
48 #define GRAPH_NODE_TYPE_ROTATION 0x017
49 #define GRAPH_NODE_TYPE_OBJECT 0x018
50 #define GRAPH_NODE_TYPE_ANIMATED_PART 0x019
51 #define GRAPH_NODE_TYPE_BILLBOARD 0x01A
52 #define GRAPH_NODE_TYPE_DISPLAY_LIST 0x01B
53 #define GRAPH_NODE_TYPE_SCALE 0x01C
54 #define GRAPH_NODE_TYPE_SHADOW 0x028
55 #define GRAPH_NODE_TYPE_OBJECT_PARENT 0x029
56 #define GRAPH_NODE_TYPE_GENERATED_LIST (0x02A | GRAPH_NODE_TYPE_FUNCTIONAL)
57 #define GRAPH_NODE_TYPE_BACKGROUND (0x02C | GRAPH_NODE_TYPE_FUNCTIONAL)
58 #define GRAPH_NODE_TYPE_HELD_OBJ (0x02E | GRAPH_NODE_TYPE_FUNCTIONAL)
59 #define GRAPH_NODE_TYPE_CULLING_RADIUS 0x02F
60 
61 // The number of master lists. A master list determines the order and render
62 // mode with which display lists are drawn.
63 #define GFX_NUM_MASTER_LISTS 8
64 
65 // Passed as first argument to a GraphNodeFunc to give information about in
66 // which context it was called and what it is expected to do.
67 #define GEO_CONTEXT_CREATE 0 // called when node is created from a geo command
68 #define GEO_CONTEXT_RENDER 1 // called from rendering_graph_node.c
69 #define GEO_CONTEXT_AREA_UNLOAD 2 // called when unloading an area
70 #define GEO_CONTEXT_AREA_LOAD 3 // called when loading an area
71 #define GEO_CONTEXT_AREA_INIT 4 // called when initializing the 8 areas
72 #define GEO_CONTEXT_HELD_OBJ 5 // called when processing a GraphNodeHeldObj
73 
74 // The signature for a function stored in a geo node
75 // The context argument depends on the callContext:
76 // - for GEO_CONTEXT_CREATE it is the AllocOnlyPool from which the node was allocated
77 // - for GEO_CONTEXT_RENDER or GEO_CONTEXT_HELD_OBJ it is the top of the float matrix stack with type Mat4
78 // - for GEO_CONTEXT_AREA_* it is the root geo node
79 typedef s32 (*GraphNodeFunc)(s32 callContext, struct GraphNode *node, void *context);
80 
86 {
87  /*0x00*/ struct GraphNode node;
88  /*0x14*/ GraphNodeFunc func;
89 };
90 
94 {
95  /*0x00*/ struct GraphNode node;
96  /*0x14*/ u8 areaIndex;
97  /*0x15*/ s8 unk15; // ?
98  /*0x16*/ s16 x;
99  /*0x18*/ s16 y;
100  /*0x1A*/ s16 width; // half width, 160
101  /*0x1C*/ s16 height; // half height
102  /*0x1E*/ s16 numViews; // number of entries in mystery array
103  /*0x20*/ struct GraphNode **views;
104 };
105 
110 {
111  /*0x00*/ struct GraphNode node;
112  /*0x14*/ f32 scale;
113 };
114 
120 {
121  /*0x00*/ struct FnGraphNode fnNode;
122  /*0x18*/ s32 unused;
123  /*0x1C*/ f32 fov; // horizontal field of view in degrees
124  /*0x20*/ s16 near; // near clipping plane
125  /*0x22*/ s16 far; // far clipping plane
126 };
127 
132 {
133  void *transform;
134  void *displayList;
136 };
137 
144 {
145  /*0x00*/ struct GraphNode node;
146  /*0x14*/ struct DisplayListNode *listHeads[GFX_NUM_MASTER_LISTS];
147  /*0x34*/ struct DisplayListNode *listTails[GFX_NUM_MASTER_LISTS];
148 };
149 
154 {
155  /*0x00*/ struct GraphNode node;
156 };
157 
165 {
166  /*0x00*/ struct GraphNode node;
167  /*0x14*/ s16 minDistance;
168  /*0x16*/ s16 maxDistance;
169 };
170 
177 {
178  /*0x00*/ struct FnGraphNode fnNode;
179  /*0x18*/ s32 unused;
180  /*0x1C*/ s16 numCases;
181  /*0x1E*/ s16 selectedCase;
182 };
183 
188 {
189  /*0x00*/ struct FnGraphNode fnNode;
190  /*0x18*/ union {
191  // When the node is created, a preset is assigned to the node.
192  // Later in geo_camera_preset_and_pos a LevelCamera is allocated,
193  // the preset is passed to the struct, and the field is overridden
194  // by a pointer to the struct. Gotta save those 4 bytes.
197  } config;
198  /*0x1C*/ Vec3f from;
199  /*0x28*/ Vec3f to;
200  /*0x34*/ void *matrixPtr; // pointer to look-at matrix of this camera as a Mat4
201  /*0x38*/ s16 roll; // roll in look at matrix. Doesn't account for light direction unlike rollScreen.
202  /*0x3A*/ s16 rollScreen; // rolls screen while keeping the light direction consistent
203 };
204 
212 {
213  /*0x00*/ struct GraphNode node;
214  /*0x14*/ void *displayList;
215  /*0x18*/ Vec3s translation;
216  /*0x1E*/ Vec3s rotation;
217 };
218 
224 {
225  /*0x00*/ struct GraphNode node;
226  /*0x14*/ void *displayList;
227  /*0x18*/ Vec3s translation;
228  u8 pad1E[2];
229 };
230 
237 {
238  /*0x00*/ struct GraphNode node;
239  /*0x14*/ void *displayList;
240  /*0x18*/ Vec3s rotation;
241  u8 pad1E[2];
242 };
243 
252 {
253  /*0x00*/ struct GraphNode node;
254  /*0x14*/ void *displayList;
255  /*0x18*/ Vec3s translation;
256 };
257 
264 {
265  /*0x00*/ struct GraphNode node;
266  /*0x14*/ void *displayList;
267  /*0x18*/ Vec3s translation;
268 };
269 
274 {
275  /*0x00*/ struct GraphNode node;
276  /*0x14*/ void *displayList;
277 };
278 
288 {
289  /*0x00*/ struct GraphNode node;
290  /*0x14*/ void *displayList;
291  /*0x18*/ f32 scale;
292 };
293 
300 {
301  /*0x00*/ struct GraphNode node;
302  /*0x14*/ s16 shadowScale; // diameter (when a circle) or side (when a square) of shadow
303  /*0x16*/ u8 shadowSolidity; // opacity of shadow, 255 = opaque
304  /*0x17*/ u8 shadowType; // see ShadowType enum in shadow.h
305 };
306 
311 {
312  /*0x00*/ struct GraphNode node;
313  /*0x14*/ struct GraphNode *sharedChild;
314 };
315 
325 {
326  /*0x00*/ struct FnGraphNode fnNode;
327  /*0x18*/ u32 parameter; // extra context for the function
328 };
329 
334 {
335  /*0x00*/ struct FnGraphNode fnNode;
336  /*0x18*/ s32 unused;
337  /*0x1C*/ s32 background; // background ID, or rgba5551 color if fnNode.func is null
338 };
339 
343 {
344  /*0x00*/ struct FnGraphNode fnNode;
345  /*0x18*/ s32 unused;
346  /*0x1C*/ struct GraphNodeObject *objNode; // assumed type
347  /*0x20*/ Vec3s translation;
348 };
349 
356 {
357  /*0x00*/ struct GraphNode node;
358  /*0x14*/ s16 cullingRadius; // specifies the 'sphere radius' for purposes of frustrum culling
359  u8 pad1E[2];
360 };
361 
363 
365  s16, s16 x, s16 y, s16 width, s16 height);
368  f32 sp20, s16 sp26, s16 sp2a, GraphNodeFunc sp2c, s32 sp30);
369 struct GraphNodeStart *init_graph_node_start(struct AllocOnlyPool *pool, struct GraphNodeStart *sp1c);
374  s16 numCases, s16 sp26, GraphNodeFunc nodeFunc, s32 sp2c);
375 struct GraphNodeCamera *init_graph_node_camera(struct AllocOnlyPool *pool, struct GraphNodeCamera * sp1c,
376  f32 *sp20, f32 *sp24, GraphNodeFunc sp28, s32 sp2c);
378  struct GraphNodeTranslationRotation *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28, Vec3s sp2c);
380  s32 drawingLayer, void *displayList, Vec3s sp28);
381 struct GraphNodeRotation *init_graph_node_rotation(struct AllocOnlyPool *pool, struct GraphNodeRotation *graphNode,
382  s32 drawingLayer, void *displayList, Vec3s sp28);
384  struct GraphNodeScale *graphNode, s32 drawingLayer, void *displayList, f32 sp28);
385 struct GraphNodeObject *init_graph_node_object(struct AllocOnlyPool *pool, struct GraphNodeObject *graphNode,
386  struct GraphNode *sp20, Vec3f pos, Vec3s angle, Vec3f scale);
388  s16 sp22);
390  s32 drawingLayer, void *displayList, Vec3s relativePos);
392  struct GraphNodeBillboard *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28);
394  s32 drawingLayer, void *displayList);
395 struct GraphNodeShadow *init_graph_node_shadow(struct AllocOnlyPool *pool, struct GraphNodeShadow *sp1c,
396  s16 sp22, u8 sp27, u8 sp2b);
398  struct GraphNode *sp20);
400  GraphNodeFunc sp20, s32 sp24);
402  u16 sp22, GraphNodeFunc sp24, s32 sp28);
404  s32 sp20, Vec3s sp24, GraphNodeFunc sp28, s32 sp2c);
405 
406 struct GraphNode *geo_add_child(struct GraphNode *, struct GraphNode *);
407 struct GraphNode *geo_remove_child(struct GraphNode *);
408 struct GraphNode *geo_make_first_child(struct GraphNode *a0);
409 
411 void geo_call_global_function_nodes(struct GraphNode *graphNode, s32 sp1c);
412 
413 void geo_reset_object_node(struct GraphNodeObject *sp20);
414 void geo_obj_init(struct GraphNodeObject *sp18, void *sp1c, Vec3f sp20, Vec3s sp24);
415 void geo_obj_init_spawninfo(struct GraphNodeObject *sp18, struct SpawnInfo *sp1c);
416 void geo_obj_init_animation(struct GraphNodeObject *, void *);
417 void geo_obj_init_animation_accel(struct GraphNodeObject *sp30, void *sp34, u32 sp38);
418 
420 
423 
424 struct GraphNodeRoot *geo_find_root(struct GraphNode *graphNode);
425 
427 s16 *read_vec3s(Vec3s dst, s16 *src);
428 s16 *read_vec3s_angle(Vec3s dst, s16 *src);
429 
430 void register_scene_graph_node(struct GraphNode *);
431 
432 #endif /* _GRAPH_NODE_H_ */
s32 preset
Definition: graph_node.h:195
struct GraphNodeLevelOfDetail * init_graph_node_render_range(struct AllocOnlyPool *pool, struct GraphNodeLevelOfDetail *graphNode, s16 minDistance, s16 maxDistance)
Allocates and returns a newly created render range node.
Definition: graph_node.c:137
Definition: area.h:121
Vec3f from
Definition: graph_node.h:198
struct GraphNodeShadow * init_graph_node_shadow(struct AllocOnlyPool *pool, struct GraphNodeShadow *sp1c, s16 sp22, u8 sp27, u8 sp2b)
Allocates and returns a newly created shadow node.
Definition: graph_node.c:392
struct GraphNode * sharedChild
Definition: graph_node.h:313
void * displayList
Definition: graph_node.h:254
f32 Vec3f[3]
Definition: types.h:23
#define GFX_NUM_MASTER_LISTS
Definition: graph_node.h:63
A node that allows an object to specify a different culling radius than the default one of 300...
Definition: graph_node.h:355
Vec3f to
Definition: graph_node.h:199
GraphNode that draws a background image or a rectangle of a color.
Definition: graph_node.h:333
u8 areaIndex
Definition: graph_node.h:96
struct GraphNode ** views
Definition: graph_node.h:103
Vec3s translation
Definition: graph_node.h:215
signed char s8
Definition: ultratypes.h:11
struct GraphNodeMasterList * gCurGraphNodeMasterList
Definition: rendering_graph_node.c:119
struct GraphNodeRoot * geo_find_root(struct GraphNode *graphNode)
Unused function to find the root of the geo node tree, which should be a GraphNodeRoot.
Definition: graph_node.c:844
void register_scene_graph_node(struct GraphNode *)
Add the given graph node as a child to the current top of the gfx stack: &#39;gCurGraphNodeList&#39;.
Definition: graph_node_manager.c:48
s16 near
Definition: graph_node.h:124
s16 far
Definition: graph_node.h:125
The very root of the geo tree.
Definition: graph_node.h:93
unsigned short int u16
Definition: ultratypes.h:14
void geo_obj_init(struct GraphNodeObject *sp18, void *sp1c, Vec3f sp20, Vec3s sp24)
Initialize an object node using the given parameters.
Definition: graph_node.c:662
GraphNode part that scales itself and its children.
Definition: graph_node.h:287
s32 unused
Definition: graph_node.h:345
signed short int s16
Definition: ultratypes.h:13
void * transform
Definition: graph_node.h:133
void geo_retreive_animation_translation(struct GraphNodeObject *sp28, Vec3f sp2c)
Unused function to retrieve an object&#39;s current animation translation Assumes that it has x...
Definition: graph_node.c:814
void * displayList
Definition: graph_node.h:214
Definition: types.h:77
void * displayList
Definition: graph_node.h:266
void init_scene_graph_node_links(struct GraphNode *, s32)
Initialize a geo node with a given type.
Definition: graph_node.c:24
s8 unk15
Definition: graph_node.h:97
A GraphNode that simply draws a display list without doing any transformation beforehand.
Definition: graph_node.h:273
s16 selectedCase
Definition: graph_node.h:181
f32 fov
Definition: graph_node.h:123
void geo_call_global_function_nodes_helper(struct GraphNode *, s32)
Helper function for geo_call_global_function_nodes that recursively traverses the scene graph and cal...
Definition: graph_node.c:585
A node that sets up a perspective projection.
Definition: graph_node.h:119
s32(* GraphNodeFunc)(s32 callContext, struct GraphNode *node, void *context)
Definition: graph_node.h:79
s16 shadowScale
Definition: graph_node.h:302
Renders the object that Mario is holding.
Definition: graph_node.h:342
struct GraphNodeSwitchCase * init_graph_node_switch_case(struct AllocOnlyPool *pool, struct GraphNodeSwitchCase *graphNode, s16 numCases, s16 sp26, GraphNodeFunc nodeFunc, s32 sp2c)
Allocates and returns a newly created switch case node.
Definition: graph_node.c:155
GraphNode that draws display lists not directly in memory but generated by a function.
Definition: graph_node.h:324
struct GraphNodeCullingRadius * init_graph_node_culling_radius(struct AllocOnlyPool *pool, struct GraphNodeCullingRadius *sp1c, s16 sp22)
Allocates and returns a newly created frustum culling radius node.
Definition: graph_node.c:317
s16 minDistance
Definition: graph_node.h:167
struct GraphNode gObjParentGraphNode
Definition: geo_layout.c:101
struct GraphNodeObject * objNode
Definition: graph_node.h:346
s16 Vec3s[3]
Definition: types.h:24
struct GraphNodeCamera * init_graph_node_camera(struct AllocOnlyPool *pool, struct GraphNodeCamera *sp1c, f32 *sp20, f32 *sp24, GraphNodeFunc sp28, s32 sp2c)
Allocates and returns a newly created camera node.
Definition: graph_node.c:180
Simply used as a parent to group multiple children.
Definition: graph_node.h:153
struct GraphNode * gCurGraphNodeList[]
Definition: geo_layout.c:95
void geo_obj_init_spawninfo(struct GraphNodeObject *sp18, struct SpawnInfo *sp1c)
Initialize and object node using the given SpawnInfo struct.
Definition: graph_node.c:680
Definition: types.h:100
s32 unused
Definition: graph_node.h:122
Vec3s angle
Definition: types.h:106
Vec3s translation
Definition: graph_node.h:347
struct GraphNodeRoot * init_graph_node_root(struct AllocOnlyPool *, struct GraphNodeRoot *, s16, s16 x, s16 y, s16 width, s16 height)
Allocated and returns a newly created root node.
Definition: graph_node.c:35
u8 shadowSolidity
Definition: graph_node.h:303
s16 cullingRadius
Definition: graph_node.h:358
Definition: types.h:88
void * matrixPtr
Definition: graph_node.h:200
float f32
Definition: ultratypes.h:29
Vec3f gVec3fZero
Definition: graph_node.c:16
void * displayList
Definition: graph_node.h:134
GraphNode that renders exactly one of its children.
Definition: graph_node.h:176
void geo_call_global_function_nodes(struct GraphNode *graphNode, s32 sp1c)
Call the update functions of geo nodes that are stored in global variables.
Definition: graph_node.c:639
s32 retrieve_animation_index(s32 a0, u16 **a1)
Retrieves an index into animation data based on the attribute pointer An attribute is an x-...
Definition: graph_node.c:738
struct LevelCamera * levelCamera
Definition: graph_node.h:196
struct GraphNodeOrthoProjection * init_graph_node_ortho_projection(struct AllocOnlyPool *, struct GraphNodeOrthoProjection *, f32)
Allocates and returns a newly created otrhographic projection node.
Definition: graph_node.c:60
s16 x
Definition: graph_node.h:98
Vec3s translation
Definition: graph_node.h:267
struct GraphNodeObjectParent * init_graph_node_object_parent(struct AllocOnlyPool *pool, struct GraphNodeObjectParent *sp1c, struct GraphNode *sp20)
Allocates and returns a newly created object parent node.
Definition: graph_node.c:411
Vec3s gVec3sOne
Definition: graph_node.c:19
GraphNodeFunc func
Definition: graph_node.h:88
s16 y
Definition: graph_node.h:99
struct GraphNode * geo_remove_child(struct GraphNode *)
Remove a node from the scene graph.
Definition: graph_node.c:529
An entry in the master list.
Definition: graph_node.h:131
s16 numViews
Definition: graph_node.h:102
struct GraphNodeCamera * gCurGraphNodeCamera
Definition: rendering_graph_node.c:121
struct GraphNodePerspective * gCurGraphNodeCamFrustum
Definition: rendering_graph_node.c:120
struct GraphNode * geo_make_first_child(struct GraphNode *a0)
Reorders the given node so it&#39;s the first child of its parent.
Definition: graph_node.c:558
Vec3s rotation
Definition: graph_node.h:240
struct GraphNodeGenerated * init_graph_node_generated(struct AllocOnlyPool *pool, struct GraphNodeGenerated *sp1c, GraphNodeFunc sp20, s32 sp24)
Allocates and returns a newly created generated node.
Definition: graph_node.c:428
s16 maxDistance
Definition: graph_node.h:168
GraphNode that draws a shadow under an object.
Definition: graph_node.h:299
s16 * read_vec3s_angle(Vec3s dst, s16 *src)
Takes a pointer to three angles in degrees (supplied by a geo layout script) and converts it to a vec...
Definition: graph_node_manager.c:37
Vec3s gVec3sZero
Definition: graph_node.c:17
s16 roll
Definition: graph_node.h:201
GraphNode that translates and rotates its children.
Definition: graph_node.h:211
struct GraphNodeRotation * init_graph_node_rotation(struct AllocOnlyPool *pool, struct GraphNodeRotation *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28)
Allocates and returns a newly created rotation node.
Definition: graph_node.c:249
struct GraphNodeStart * init_graph_node_start(struct AllocOnlyPool *pool, struct GraphNodeStart *sp1c)
Allocates and returns a newly created start node.
Definition: graph_node.c:103
struct DisplayListNode * next
Definition: graph_node.h:135
Vec3f pos
Definition: types.h:107
Vec3s translation
Definition: graph_node.h:227
void * displayList
Definition: graph_node.h:276
struct GraphNodePerspective * init_graph_node_perspective(struct AllocOnlyPool *pool, struct GraphNodePerspective *sp1c, f32 sp20, s16 sp26, s16 sp2a, GraphNodeFunc sp2c, s32 sp30)
Allocates and returns a newly created perspective node.
Definition: graph_node.c:76
Definition: area.h:151
Vec3s rotation
Definition: graph_node.h:216
s16 geo_update_animation_frame(struct GraphNodeObject_sub *a0, s32 *a1)
Update the animation frame of an object.
Definition: graph_node.c:756
struct GraphNodeMasterList * init_graph_node_master_list(struct AllocOnlyPool *pool, struct GraphNodeMasterList *, s16 sp22)
Allocates and returns a newly created master list node.
Definition: graph_node.c:118
s16 numCases
Definition: graph_node.h:180
s16 width
Definition: graph_node.h:100
s16 gCurGraphNodeIndex
Definition: geo_layout.c:96
struct GraphNodeAnimatedPart * init_graph_node_animated_part(struct AllocOnlyPool *pool, struct GraphNodeAnimatedPart *graphNode, s32 drawingLayer, void *displayList, Vec3s relativePos)
Allocates and returns a newly created animated part node.
Definition: graph_node.c:334
void * displayList
Definition: graph_node.h:290
GraphNode that specifies the location and aim of the camera.
Definition: graph_node.h:187
unsigned char u8
Definition: ultratypes.h:12
void geo_obj_init_animation(struct GraphNodeObject *, void *)
Initialize the animation of an object node.
Definition: graph_node.c:703
A node that sets up an orthographic projection based on the global root node.
Definition: graph_node.h:109
struct GraphNodeScale * init_graph_node_scale(struct AllocOnlyPool *pool, struct GraphNodeScale *graphNode, s32 drawingLayer, void *displayList, f32 sp28)
Allocates and returns a newly created scaling node.
Definition: graph_node.c:269
s16 height
Definition: graph_node.h:101
struct GraphNodeBillboard * init_graph_node_billboard(struct AllocOnlyPool *pool, struct GraphNodeBillboard *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28)
Allocates and returns a newly created billboard node.
Definition: graph_node.c:354
Vec3f gVec3fOne
Definition: graph_node.c:18
struct GraphNodeDisplayList * init_graph_node_display_list(struct AllocOnlyPool *pool, struct GraphNodeDisplayList *graphNode, s32 drawingLayer, void *displayList)
Allocates and returns a newly created displaylist node.
Definition: graph_node.c:374
struct GraphNodeObject * init_graph_node_object(struct AllocOnlyPool *pool, struct GraphNodeObject *graphNode, struct GraphNode *sp20, Vec3f pos, Vec3s angle, Vec3f scale)
Allocates and returns a newly created object node.
Definition: graph_node.c:288
f32 scale
Definition: graph_node.h:112
void geo_reset_object_node(struct GraphNodeObject *sp20)
When objects are cleared, this is called on all object nodes (loaded or unloaded).
Definition: graph_node.c:653
GraphNode part that transforms itself and its children based on animation data.
Definition: graph_node.h:251
signed int s32
Definition: ultratypes.h:15
Vec3f scale
Definition: types.h:108
GraphNode that only renders its children if the current transformation matrix has a z-translation (in...
Definition: graph_node.h:164
GraphNode that translates itself and its children.
Definition: graph_node.h:223
u32 parameter
Definition: graph_node.h:327
GraphNode that contains as its sharedChild a group node containing all object nodes.
Definition: graph_node.h:310
struct GraphNodeTranslation * init_graph_node_translation(struct AllocOnlyPool *pool, struct GraphNodeTranslation *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28)
Allocates and returns a newly created translation node.
Definition: graph_node.c:228
A GraphNode that draws a display list rotated in a way to always face the camera. ...
Definition: graph_node.h:263
Definition: memory.h:9
struct GraphNodeHeldObject * gCurGraphNodeHeldObject
Definition: rendering_graph_node.c:123
s32 background
Definition: graph_node.h:337
struct GraphNodeBackground * init_graph_node_background(struct AllocOnlyPool *pool, struct GraphNodeBackground *sp1c, u16 sp22, GraphNodeFunc sp24, s32 sp28)
Allocates and returns a newly created background node.
Definition: graph_node.c:450
void * displayList
Definition: graph_node.h:239
struct GraphNode * geo_add_child(struct GraphNode *, struct GraphNode *)
Adds &#39;childNode&#39; to the end of the list children from &#39;parent&#39;.
Definition: graph_node.c:500
s32 unused
Definition: graph_node.h:336
Vec3s translation
Definition: graph_node.h:255
void * displayList
Definition: graph_node.h:226
struct GraphNodeHeldObject * init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *sp1c, s32 sp20, Vec3s sp24, GraphNodeFunc sp28, s32 sp2c)
Allocates and returns a newly created held object node.
Definition: graph_node.c:475
GraphNode that rotates itself and its children.
Definition: graph_node.h:236
struct GraphNode * gCurRootGraphNode
Definition: geo_layout.c:48
f32 scale
Definition: graph_node.h:291
s32 unused
Definition: graph_node.h:179
void geo_obj_init_animation_accel(struct GraphNodeObject *sp30, void *sp34, u32 sp38)
Initialize the animation of an object node.
Definition: graph_node.c:717
An extension of a graph node that includes a function pointer.
Definition: graph_node.h:85
GraphNode that manages the 8 top-level display lists that will be drawn Each list has its own render ...
Definition: graph_node.h:143
unsigned int u32
Definition: ultratypes.h:16
s16 * read_vec3s_to_vec3f(Vec3f, s16 *src)
Takes a pointer to three shorts (supplied by a geo layout script) and copies it to the destination fl...
Definition: graph_node_manager.c:15
u16 gAreaUpdateCounter
Definition: rendering_graph_node.c:124
s16 rollScreen
Definition: graph_node.h:202
struct GraphNodeTranslationRotation * init_graph_node_translation_rotation(struct AllocOnlyPool *pool, struct GraphNodeTranslationRotation *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28, Vec3s sp2c)
Allocates and returns a newly created translation rotation node.
Definition: graph_node.c:207
s16 * read_vec3s(Vec3s dst, s16 *src)
Takes a pointer to three shorts (supplied by a geo layout script) and copies it to the destination ve...
Definition: graph_node_manager.c:26
u8 shadowType
Definition: graph_node.h:304