2019-08-25 04:46:40 +00:00
|
|
|
#ifndef RENDERING_GRAPH_NODE_H
|
|
|
|
#define RENDERING_GRAPH_NODE_H
|
|
|
|
|
2020-06-02 16:44:34 +00:00
|
|
|
#include <PR/ultratypes.h>
|
|
|
|
|
2019-08-25 04:46:40 +00:00
|
|
|
#include "engine/graph_node.h"
|
|
|
|
|
|
|
|
extern struct GraphNodeRoot *gCurGraphNodeRoot;
|
|
|
|
extern struct GraphNodeMasterList *gCurGraphNodeMasterList;
|
|
|
|
extern struct GraphNodePerspective *gCurGraphNodeCamFrustum;
|
|
|
|
extern struct GraphNodeCamera *gCurGraphNodeCamera;
|
|
|
|
extern struct GraphNodeObject *gCurGraphNodeObject;
|
|
|
|
extern struct GraphNodeHeldObject *gCurGraphNodeHeldObject;
|
|
|
|
extern u16 gAreaUpdateCounter;
|
2020-09-06 20:54:01 +00:00
|
|
|
extern struct Object* gCurGraphNodeProcessingObject;
|
2019-08-25 04:46:40 +00:00
|
|
|
|
|
|
|
// after processing an object, the type is reset to this
|
|
|
|
#define ANIM_TYPE_NONE 0
|
|
|
|
|
|
|
|
// Not all parts have full animation: to save space, some animations only
|
|
|
|
// have xz, y, or no translation at all. All animations have rotations though
|
|
|
|
#define ANIM_TYPE_TRANSLATION 1
|
|
|
|
#define ANIM_TYPE_VERTICAL_TRANSLATION 2
|
|
|
|
#define ANIM_TYPE_LATERAL_TRANSLATION 3
|
|
|
|
#define ANIM_TYPE_NO_TRANSLATION 4
|
|
|
|
|
|
|
|
// Every animation includes rotation, after processing any of the above
|
|
|
|
// translation types the type is set to this
|
|
|
|
#define ANIM_TYPE_ROTATION 5
|
|
|
|
|
2020-06-02 16:44:34 +00:00
|
|
|
void geo_process_node_and_siblings(struct GraphNode *firstNode);
|
|
|
|
void geo_process_root(struct GraphNodeRoot *node, Vp *b, Vp *c, s32 clearColor);
|
2020-09-04 08:55:54 +00:00
|
|
|
void interpolate_vectors(Vec3f res, Vec3f a, Vec3f b);
|
|
|
|
void interpolate_vectors_s16(Vec3s res, Vec3s a, Vec3s b);
|
2019-08-25 04:46:40 +00:00
|
|
|
|
|
|
|
#endif // RENDERING_GRAPH_NODE_H
|