Refresh 10
This commit is contained in:
1 parent
e58669b4b3
commit
d43d9b7f20
444 files changed
+30163
-7628
No files matched your search
@@ -1,16 +1,18 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
#include "sm64.h"
|
||||
#include "behavior_data.h"
|
||||
#include "behavior_script.h"
|
||||
#include "game/area.h"
|
||||
#include "game/behavior_actions.h"
|
||||
#include "game/game_init.h"
|
||||
#include "game/mario.h"
|
||||
#include "game/memory.h"
|
||||
#include "game/obj_behaviors_2.h"
|
||||
#include "game/object_helpers.h"
|
||||
#include "game/object_list_processor.h"
|
||||
#include "graph_node.h"
|
||||
#include "surface_collision.h"
|
||||
#include "game/object_helpers.h"
|
||||
#include "game/mario.h"
|
||||
#include "game/game_init.h"
|
||||
#include "game/obj_behaviors_2.h"
|
||||
#include "behavior_data.h"
|
||||
#include "game/object_list_processor.h"
|
||||
|
||||
// Macros for retrieving arguments from behavior scripts.
|
||||
#define BHV_CMD_GET_1ST_U8(index) (u8)((gCurBhvCommand[index] >> 24) & 0xFF) // unused
|
||||
@@ -63,7 +65,7 @@ u16 random_u16(void) {
|
||||
return gRandomSeed16;
|
||||
}
|
||||
|
||||
// Generate a pseudorandom float from 0 to 1.
|
||||
// Generate a pseudorandom float in the range [0, 1).
|
||||
f32 random_float(void) {
|
||||
f32 rnd = random_u16();
|
||||
return rnd / (double) 0x10000;
|
||||
@@ -98,10 +100,10 @@ static void cur_obj_bhv_stack_push(uintptr_t bhvAddr) {
|
||||
// Retrieve the last behavior command address from the object's behavior stack.
|
||||
static uintptr_t cur_obj_bhv_stack_pop(void) {
|
||||
uintptr_t bhvAddr;
|
||||
|
||||
|
||||
gCurrentObject->bhvStackIndex--;
|
||||
bhvAddr = gCurrentObject->bhvStack[gCurrentObject->bhvStackIndex];
|
||||
|
||||
|
||||
return bhvAddr;
|
||||
}
|
||||
|
||||
@@ -115,7 +117,7 @@ static void stub_behavior_script_1(void) {
|
||||
// Usage: HIDE()
|
||||
static s32 bhv_cmd_hide(void) {
|
||||
cur_obj_hide();
|
||||
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -124,7 +126,7 @@ static s32 bhv_cmd_hide(void) {
|
||||
// Usage: DISABLE_RENDERING()
|
||||
static s32 bhv_cmd_disable_rendering(void) {
|
||||
gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
|
||||
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -133,7 +135,7 @@ static s32 bhv_cmd_disable_rendering(void) {
|
||||
// Usage: BILLBOARD()
|
||||
static s32 bhv_cmd_billboard(void) {
|
||||
gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_BILLBOARD;
|
||||
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -142,9 +144,9 @@ static s32 bhv_cmd_billboard(void) {
|
||||
// Usage: SET_MODEL(modelID)
|
||||
static s32 bhv_cmd_set_model(void) {
|
||||
s32 modelID = BHV_CMD_GET_2ND_S16(0);
|
||||
|
||||
|
||||
gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[modelID];
|
||||
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -195,7 +197,7 @@ static s32 bhv_cmd_spawn_child_with_param(void) {
|
||||
// Command 0x1D: Exits the behavior script and despawns the object.
|
||||
// Usage: DEACTIVATE()
|
||||
static s32 bhv_cmd_deactivate(void) {
|
||||
gCurrentObject->activeFlags = 0;
|
||||
gCurrentObject->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
return BHV_PROC_BREAK;
|
||||
}
|
||||
|
||||
@@ -216,7 +218,7 @@ static s32 bhv_cmd_break_unused(void) {
|
||||
static s32 bhv_cmd_call(void) {
|
||||
const BehaviorScript *jumpAddress;
|
||||
gCurBhvCommand++;
|
||||
|
||||
|
||||
cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(1)); // Store address of the next bhv command in the stack.
|
||||
jumpAddress = segmented_to_virtual(BHV_CMD_GET_VPTR(0));
|
||||
gCurBhvCommand = jumpAddress; // Jump to the new address.
|
||||
@@ -300,7 +302,7 @@ static s32 bhv_cmd_begin_repeat(void) {
|
||||
static s32 bhv_cmd_end_repeat(void) {
|
||||
u32 count = cur_obj_bhv_stack_pop(); // Retrieve loop count from the stack.
|
||||
count--;
|
||||
|
||||
|
||||
if (count != 0) {
|
||||
gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Jump back to the first command in the loop
|
||||
// Save address and count to the stack again
|
||||
@@ -320,7 +322,7 @@ static s32 bhv_cmd_end_repeat(void) {
|
||||
static s32 bhv_cmd_end_repeat_continue(void) {
|
||||
u32 count = cur_obj_bhv_stack_pop();
|
||||
count--;
|
||||
|
||||
|
||||
if (count != 0) {
|
||||
gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Jump back to the first command in the loop
|
||||
// Save address and count to the stack again
|
||||
@@ -546,7 +548,7 @@ static s32 bhv_cmd_drop_to_floor(void) {
|
||||
f32 x = gCurrentObject->oPosX;
|
||||
f32 y = gCurrentObject->oPosY;
|
||||
f32 z = gCurrentObject->oPosZ;
|
||||
|
||||
|
||||
f32 floor = find_floor_height(x, y + 200.0f, z);
|
||||
gCurrentObject->oPosY = floor;
|
||||
gCurrentObject->oMoveFlags |= OBJ_MOVE_ON_GROUND;
|
||||
@@ -665,7 +667,7 @@ static s32 bhv_cmd_nop_4(void) {
|
||||
static s32 bhv_cmd_begin(void) {
|
||||
// These objects were likely very early objects, which is why this code is here
|
||||
// instead of in the respective behavior scripts.
|
||||
|
||||
|
||||
// Initiate the room if the object is a haunted chair or the mad piano.
|
||||
if (cur_obj_has_behavior(bhvHauntedChair)) {
|
||||
bhv_init_room();
|
||||
@@ -696,7 +698,7 @@ static void bhv_cmd_set_int_random_from_table(s32 tableSize) {
|
||||
}
|
||||
|
||||
cur_obj_set_int(field, table[(s32)(tableSize * random_float())]);
|
||||
|
||||
|
||||
// Does not increment gCurBhvCommand or return a bhv status
|
||||
}
|
||||
|
||||
@@ -719,7 +721,7 @@ static s32 bhv_cmd_set_int_random_from_table(void) {
|
||||
|
||||
// Set the field to a random entry of the table.
|
||||
cur_obj_set_int(field, table[(s32)(tableSize * random_float())]);
|
||||
|
||||
|
||||
gCurBhvCommand += (tableSize / 2) + 1;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -729,9 +731,9 @@ static s32 bhv_cmd_set_int_random_from_table(void) {
|
||||
// Usage: LOAD_COLLISION_DATA(collisionData)
|
||||
static s32 bhv_cmd_load_collision_data(void) {
|
||||
u32 *collisionData = segmented_to_virtual(BHV_CMD_GET_VPTR(1));
|
||||
|
||||
|
||||
gCurrentObject->collisionData = collisionData;
|
||||
|
||||
|
||||
gCurBhvCommand += 2;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -742,7 +744,7 @@ static s32 bhv_cmd_set_home(void) {
|
||||
gCurrentObject->oHomeX = gCurrentObject->oPosX;
|
||||
gCurrentObject->oHomeY = gCurrentObject->oPosY;
|
||||
gCurrentObject->oHomeZ = gCurrentObject->oPosZ;
|
||||
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
@@ -815,9 +817,9 @@ static s32 bhv_cmd_parent_bit_clear(void) {
|
||||
// Usage: SPAWN_WATER_DROPLET(dropletParams)
|
||||
static s32 bhv_cmd_spawn_water_droplet(void) {
|
||||
struct WaterDropletParams *dropletParams = BHV_CMD_GET_VPTR(1);
|
||||
|
||||
|
||||
spawn_water_droplet(gCurrentObject, dropletParams);
|
||||
|
||||
|
||||
gCurBhvCommand += 2;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#ifndef _BEHAVIOR_SCRIPT_H_
|
||||
#define _BEHAVIOR_SCRIPT_H_
|
||||
#ifndef BEHAVIOR_SCRIPT_H
|
||||
#define BEHAVIOR_SCRIPT_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#define BHV_PROC_CONTINUE 0
|
||||
#define BHV_PROC_BREAK 1
|
||||
@@ -21,9 +23,8 @@ u16 random_u16(void);
|
||||
float random_float(void);
|
||||
s32 random_sign(void);
|
||||
|
||||
void obj_update_gfx_pos_and_angle(struct Object *);
|
||||
void stub_behavior_script_2(void);
|
||||
|
||||
void cur_obj_update(void);
|
||||
|
||||
#endif /* _BEHAVIOR_SCRIPT_H_ */
|
||||
#endif // BEHAVIOR_SCRIPT_H
|
||||
@@ -210,7 +210,7 @@ void geo_layout_cmd_node_root(void) {
|
||||
|
||||
// number of entries to allocate for gGeoViews array
|
||||
// at least 2 are allocated by default
|
||||
// cmd+0x02 = 0x00: mario face, 0x0A: all other levels
|
||||
// cmd+0x02 = 0x00: Mario face, 0x0A: all other levels
|
||||
gGeoNumViews = cur_geo_cmd_s16(0x02) + 2;
|
||||
|
||||
graphNode = init_graph_node_root(gGraphNodePool, NULL, 0, x, y, width, height);
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
#ifndef _GEO_LAYOUT_H_
|
||||
#define _GEO_LAYOUT_H_
|
||||
#ifndef GEO_LAYOUT_H
|
||||
#define GEO_LAYOUT_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "game/memory.h"
|
||||
#include "macros.h"
|
||||
#include "types.h"
|
||||
|
||||
#define GEO_CMD_FLAGS_RESET 0
|
||||
#define GEO_CMD_FLAGS_SET 1
|
||||
#define GEO_CMD_FLAGS_CLEAR 2
|
||||
|
||||
#define CMD_SIZE_SHIFT (sizeof(void *) >> 3)
|
||||
#define CMD_PROCESS_OFFSET(offset) ((offset & 3) | ((offset & ~3) << CMD_SIZE_SHIFT))
|
||||
#define CMD_PROCESS_OFFSET(offset) (((offset) & 3) | (((offset) & ~3) << CMD_SIZE_SHIFT))
|
||||
|
||||
#define cur_geo_cmd_u8(offset) \
|
||||
(gGeoLayoutCommand[CMD_PROCESS_OFFSET(offset)])
|
||||
@@ -80,4 +84,4 @@ void geo_layout_cmd_node_culling_radius(void);
|
||||
|
||||
struct GraphNode *process_geo_layout(struct AllocOnlyPool *a0, void *segptr);
|
||||
|
||||
#endif /* _GEO_LAYOUT_H_ */
|
||||
#endif // GEO_LAYOUT_H
|
||||
+71
-73
@@ -1,29 +1,12 @@
|
||||
#ifndef _GRAPH_NODE_H_
|
||||
#define _GRAPH_NODE_H_
|
||||
#ifndef GRAPH_NODE_H
|
||||
#define GRAPH_NODE_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/gbi.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "game/memory.h"
|
||||
|
||||
struct AllocOnlyPool;
|
||||
|
||||
extern struct GraphNodeMasterList *gCurGraphNodeMasterList;
|
||||
extern struct GraphNodePerspective *gCurGraphNodeCamFrustum;
|
||||
extern struct GraphNodeCamera *gCurGraphNodeCamera;
|
||||
extern struct GraphNodeHeldObject *gCurGraphNodeHeldObject;
|
||||
extern u16 gAreaUpdateCounter;
|
||||
|
||||
extern struct GraphNode *gCurRootGraphNode;
|
||||
extern struct GraphNode *gCurGraphNodeList[];
|
||||
|
||||
extern s16 gCurGraphNodeIndex;
|
||||
|
||||
extern struct GraphNode gObjParentGraphNode;
|
||||
|
||||
extern Vec3f gVec3fZero;
|
||||
extern Vec3s gVec3sZero;
|
||||
extern Vec3f gVec3fOne;
|
||||
extern Vec3s gVec3sOne;
|
||||
|
||||
#define GRAPH_RENDER_ACTIVE (1 << 0)
|
||||
#define GRAPH_RENDER_CHILDREN_FIRST (1 << 1)
|
||||
#define GRAPH_RENDER_BILLBOARD (1 << 2)
|
||||
@@ -249,7 +232,7 @@ struct GraphNodeRotation
|
||||
* data. This animation data is not stored in the node itself but in global
|
||||
* variables that are set when object nodes are processed if the object has
|
||||
* animation.
|
||||
* Usef for Mario, enemies and anything else with animation data.
|
||||
* Used for Mario, enemies and anything else with animation data.
|
||||
* The display list can be null, in which case it won't draw anything itself.
|
||||
*/
|
||||
struct GraphNodeAnimatedPart
|
||||
@@ -332,7 +315,7 @@ struct GraphNodeGenerated
|
||||
};
|
||||
|
||||
/** GraphNode that draws a background image or a rectangle of a color.
|
||||
* Drawn in an orthgraphic projection, used for skyboxes.
|
||||
* Drawn in an orthographic projection, used for skyboxes.
|
||||
*/
|
||||
struct GraphNodeBackground
|
||||
{
|
||||
@@ -353,84 +336,99 @@ struct GraphNodeHeldObject
|
||||
|
||||
/** A node that allows an object to specify a different culling radius than the
|
||||
* default one of 300. For this to work, it needs to be a direct child of the
|
||||
* object node. Used for very large objects, such as shockwave rings that Bowser
|
||||
* creates, tornados, the big eel.
|
||||
* object node. Used for very large objects, such as shock wave rings that Bowser
|
||||
* creates, tornadoes, the big eel.
|
||||
*/
|
||||
struct GraphNodeCullingRadius
|
||||
{
|
||||
/*0x00*/ struct GraphNode node;
|
||||
/*0x14*/ s16 cullingRadius; // specifies the 'sphere radius' for purposes of frustrum culling
|
||||
/*0x14*/ s16 cullingRadius; // specifies the 'sphere radius' for purposes of frustum culling
|
||||
u8 pad1E[2];
|
||||
};
|
||||
|
||||
void init_scene_graph_node_links(struct GraphNode *, s32);
|
||||
extern struct GraphNodeMasterList *gCurGraphNodeMasterList;
|
||||
extern struct GraphNodePerspective *gCurGraphNodeCamFrustum;
|
||||
extern struct GraphNodeCamera *gCurGraphNodeCamera;
|
||||
extern struct GraphNodeHeldObject *gCurGraphNodeHeldObject;
|
||||
extern u16 gAreaUpdateCounter;
|
||||
|
||||
struct GraphNodeRoot *init_graph_node_root(struct AllocOnlyPool *, struct GraphNodeRoot *,
|
||||
s16, s16 x, s16 y, s16 width, s16 height);
|
||||
struct GraphNodeOrthoProjection *init_graph_node_ortho_projection(struct AllocOnlyPool *, struct GraphNodeOrthoProjection *, f32);
|
||||
struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *pool, struct GraphNodePerspective *sp1c,
|
||||
f32 sp20, s16 sp26, s16 sp2a, GraphNodeFunc sp2c, s32 sp30);
|
||||
struct GraphNodeStart *init_graph_node_start(struct AllocOnlyPool *pool, struct GraphNodeStart *sp1c);
|
||||
struct GraphNodeMasterList *init_graph_node_master_list(struct AllocOnlyPool *pool, struct GraphNodeMasterList *, s16 sp22);
|
||||
extern struct GraphNode *gCurRootGraphNode;
|
||||
extern struct GraphNode *gCurGraphNodeList[];
|
||||
|
||||
extern s16 gCurGraphNodeIndex;
|
||||
|
||||
extern Vec3f gVec3fZero;
|
||||
extern Vec3s gVec3sZero;
|
||||
extern Vec3f gVec3fOne;
|
||||
extern Vec3s gVec3sOne;
|
||||
|
||||
void init_scene_graph_node_links(struct GraphNode *graphNode, s32 type);
|
||||
|
||||
struct GraphNodeRoot *init_graph_node_root(struct AllocOnlyPool *pool, struct GraphNodeRoot *graphNode,
|
||||
s16 areaIndex, s16 x, s16 y, s16 width, s16 height);
|
||||
struct GraphNodeOrthoProjection *init_graph_node_ortho_projection(struct AllocOnlyPool *pool, struct GraphNodeOrthoProjection *graphNode, f32 scale);
|
||||
struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *pool, struct GraphNodePerspective *graphNode,
|
||||
f32 fov, s16 near, s16 far, GraphNodeFunc nodeFunc, s32 unused);
|
||||
struct GraphNodeStart *init_graph_node_start(struct AllocOnlyPool *pool, struct GraphNodeStart *graphNode);
|
||||
struct GraphNodeMasterList *init_graph_node_master_list(struct AllocOnlyPool *pool, struct GraphNodeMasterList *graphNode, s16 on);
|
||||
struct GraphNodeLevelOfDetail *init_graph_node_render_range(struct AllocOnlyPool *pool, struct GraphNodeLevelOfDetail *graphNode,
|
||||
s16 minDistance, s16 maxDistance);
|
||||
s16 minDistance, s16 maxDistance);
|
||||
struct GraphNodeSwitchCase *init_graph_node_switch_case(struct AllocOnlyPool *pool, struct GraphNodeSwitchCase *graphNode,
|
||||
s16 numCases, s16 sp26, GraphNodeFunc nodeFunc, s32 sp2c);
|
||||
struct GraphNodeCamera *init_graph_node_camera(struct AllocOnlyPool *pool, struct GraphNodeCamera * sp1c,
|
||||
f32 *sp20, f32 *sp24, GraphNodeFunc sp28, s32 sp2c);
|
||||
struct GraphNodeTranslationRotation *init_graph_node_translation_rotation(struct AllocOnlyPool *pool,
|
||||
struct GraphNodeTranslationRotation *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28, Vec3s sp2c);
|
||||
s16 numCases, s16 selectedCase, GraphNodeFunc nodeFunc, s32 unused);
|
||||
struct GraphNodeCamera *init_graph_node_camera(struct AllocOnlyPool *pool, struct GraphNodeCamera *graphNode,
|
||||
f32 *pos, f32 *focus, GraphNodeFunc func, s32 mode);
|
||||
struct GraphNodeTranslationRotation *init_graph_node_translation_rotation(struct AllocOnlyPool *pool, struct GraphNodeTranslationRotation *graphNode,
|
||||
s32 drawingLayer, void *displayList, Vec3s translation, Vec3s rotation);
|
||||
struct GraphNodeTranslation *init_graph_node_translation(struct AllocOnlyPool *pool, struct GraphNodeTranslation *graphNode,
|
||||
s32 drawingLayer, void *displayList, Vec3s sp28);
|
||||
s32 drawingLayer, void *displayList, Vec3s translation);
|
||||
struct GraphNodeRotation *init_graph_node_rotation(struct AllocOnlyPool *pool, struct GraphNodeRotation *graphNode,
|
||||
s32 drawingLayer, void *displayList, Vec3s sp28);
|
||||
struct GraphNodeScale *init_graph_node_scale(struct AllocOnlyPool *pool,
|
||||
struct GraphNodeScale *graphNode, s32 drawingLayer, void *displayList, f32 sp28);
|
||||
s32 drawingLayer, void *displayList, Vec3s rotation);
|
||||
struct GraphNodeScale *init_graph_node_scale(struct AllocOnlyPool *pool, struct GraphNodeScale *graphNode,
|
||||
s32 drawingLayer, void *displayList, f32 scale);
|
||||
struct GraphNodeObject *init_graph_node_object(struct AllocOnlyPool *pool, struct GraphNodeObject *graphNode,
|
||||
struct GraphNode *sp20, Vec3f pos, Vec3s angle, Vec3f scale);
|
||||
struct GraphNodeCullingRadius *init_graph_node_culling_radius(struct AllocOnlyPool *pool, struct GraphNodeCullingRadius *sp1c,
|
||||
s16 sp22);
|
||||
struct GraphNode *sharedChild, Vec3f pos, Vec3s angle, Vec3f scale);
|
||||
struct GraphNodeCullingRadius *init_graph_node_culling_radius(struct AllocOnlyPool *pool, struct GraphNodeCullingRadius *graphNode, s16 radius);
|
||||
struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool *pool, struct GraphNodeAnimatedPart *graphNode,
|
||||
s32 drawingLayer, void *displayList, Vec3s relativePos);
|
||||
struct GraphNodeBillboard *init_graph_node_billboard(struct AllocOnlyPool *pool,
|
||||
struct GraphNodeBillboard *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28);
|
||||
s32 drawingLayer, void *displayList, Vec3s translation);
|
||||
struct GraphNodeBillboard *init_graph_node_billboard(struct AllocOnlyPool *pool, struct GraphNodeBillboard *graphNode,
|
||||
s32 drawingLayer, void *displayList, Vec3s translation);
|
||||
struct GraphNodeDisplayList *init_graph_node_display_list(struct AllocOnlyPool *pool, struct GraphNodeDisplayList *graphNode,
|
||||
s32 drawingLayer, void *displayList);
|
||||
struct GraphNodeShadow *init_graph_node_shadow(struct AllocOnlyPool *pool, struct GraphNodeShadow *sp1c,
|
||||
s16 sp22, u8 sp27, u8 sp2b);
|
||||
s32 drawingLayer, void *displayList);
|
||||
struct GraphNodeShadow *init_graph_node_shadow(struct AllocOnlyPool *pool, struct GraphNodeShadow *graphNode,
|
||||
s16 shadowScale, u8 shadowSolidity, u8 shadowType);
|
||||
struct GraphNodeObjectParent *init_graph_node_object_parent(struct AllocOnlyPool *pool, struct GraphNodeObjectParent *sp1c,
|
||||
struct GraphNode *sp20);
|
||||
struct GraphNode *sharedChild);
|
||||
struct GraphNodeGenerated *init_graph_node_generated(struct AllocOnlyPool *pool, struct GraphNodeGenerated *sp1c,
|
||||
GraphNodeFunc sp20, s32 sp24);
|
||||
GraphNodeFunc gfxFunc, s32 parameter);
|
||||
struct GraphNodeBackground *init_graph_node_background(struct AllocOnlyPool *pool, struct GraphNodeBackground *sp1c,
|
||||
u16 sp22, GraphNodeFunc sp24, s32 sp28);
|
||||
u16 background, GraphNodeFunc backgroundFunc, s32 zero);
|
||||
struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *sp1c,
|
||||
struct Object *objNode, Vec3s translation, GraphNodeFunc nodeFunc, s32 playerIndex);
|
||||
struct Object *objNode, Vec3s translation,
|
||||
GraphNodeFunc nodeFunc, s32 playerIndex);
|
||||
struct GraphNode *geo_add_child(struct GraphNode *parent, struct GraphNode *childNode);
|
||||
struct GraphNode *geo_remove_child(struct GraphNode *graphNode);
|
||||
struct GraphNode *geo_make_first_child(struct GraphNode *newFirstChild);
|
||||
|
||||
struct GraphNode *geo_add_child(struct GraphNode *, struct GraphNode *);
|
||||
struct GraphNode *geo_remove_child(struct GraphNode *);
|
||||
struct GraphNode *geo_make_first_child(struct GraphNode *a0);
|
||||
void geo_call_global_function_nodes_helper(struct GraphNode *graphNode, s32 callContext);
|
||||
void geo_call_global_function_nodes(struct GraphNode *graphNode, s32 callContext);
|
||||
|
||||
void geo_call_global_function_nodes_helper(struct GraphNode *, s32);
|
||||
void geo_call_global_function_nodes(struct GraphNode *graphNode, s32 sp1c);
|
||||
|
||||
void geo_reset_object_node(struct GraphNodeObject *sp20);
|
||||
void geo_obj_init(struct GraphNodeObject *sp18, void *sp1c, Vec3f sp20, Vec3s sp24);
|
||||
void geo_obj_init_spawninfo(struct GraphNodeObject *sp18, struct SpawnInfo *sp1c);
|
||||
void geo_reset_object_node(struct GraphNodeObject *graphNode);
|
||||
void geo_obj_init(struct GraphNodeObject *graphNode, void *sharedChild, Vec3f pos, Vec3s angle);
|
||||
void geo_obj_init_spawninfo(struct GraphNodeObject *graphNode, struct SpawnInfo *spawn);
|
||||
void geo_obj_init_animation(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr);
|
||||
void geo_obj_init_animation_accel(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr, u32 animAccel);
|
||||
|
||||
s32 retrieve_animation_index(s32 a0, u16 **a1);
|
||||
s32 retrieve_animation_index(s32 frame, u16 **attributes);
|
||||
|
||||
s16 geo_update_animation_frame(struct GraphNodeObject_sub *a0, s32* a1);
|
||||
void geo_retreive_animation_translation(struct GraphNodeObject *sp28, Vec3f sp2c);
|
||||
s16 geo_update_animation_frame(struct GraphNodeObject_sub *obj, s32 *accelAssist);
|
||||
void geo_retreive_animation_translation(struct GraphNodeObject *obj, Vec3f position);
|
||||
|
||||
struct GraphNodeRoot *geo_find_root(struct GraphNode *graphNode);
|
||||
|
||||
// graph_node_manager
|
||||
s16 *read_vec3s_to_vec3f(Vec3f, s16 *src);
|
||||
s16 *read_vec3s(Vec3s dst, s16 *src);
|
||||
s16 *read_vec3s_angle(Vec3s dst, s16 *src);
|
||||
void register_scene_graph_node(struct GraphNode *graphNode);
|
||||
|
||||
void register_scene_graph_node(struct GraphNode *);
|
||||
|
||||
#endif /* _GRAPH_NODE_H_ */
|
||||
#endif // GRAPH_NODE_H
|
||||
@@ -1,13 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "sm64.h"
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "game/level_update.h"
|
||||
#include "math_util.h"
|
||||
#include "game/memory.h"
|
||||
#include "graph_node.h"
|
||||
#include "game/rendering_graph_node.h"
|
||||
#include "game/area.h"
|
||||
#include "geo_layout.h"
|
||||
|
||||
#if IS_64_BIT
|
||||
static s16 next_s16_in_geo_script(s16 **src) {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#ifdef NO_SEGMENTED_MEMORY
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "sm64.h"
|
||||
#include "audio/external.h"
|
||||
@@ -17,13 +20,11 @@
|
||||
#include "geo_layout.h"
|
||||
#include "graph_node.h"
|
||||
#include "level_script.h"
|
||||
#include "level_misc_macros.h"
|
||||
#include "math_util.h"
|
||||
#include "surface_collision.h"
|
||||
#include "surface_load.h"
|
||||
|
||||
#define CMD_SIZE_SHIFT (sizeof(void *) >> 3)
|
||||
#define CMD_PROCESS_OFFSET(offset) ((offset & 3) | ((offset & ~3) << CMD_SIZE_SHIFT))
|
||||
|
||||
#define CMD_GET(type, offset) (*(type *) (CMD_PROCESS_OFFSET(offset) + (u8 *) sCurrentCmd))
|
||||
|
||||
// These are equal
|
||||
@@ -353,7 +354,7 @@ static void level_cmd_begin_area(void) {
|
||||
|
||||
sCurrAreaIndex = areaIndex;
|
||||
screenArea->areaIndex = areaIndex;
|
||||
gAreas[areaIndex].unk04 = (struct GraphNode *) screenArea;
|
||||
gAreas[areaIndex].unk04 = screenArea;
|
||||
|
||||
if (node != NULL) {
|
||||
gAreas[areaIndex].camera = (struct Camera *) node->config.camera;
|
||||
@@ -601,7 +602,18 @@ static void level_cmd_set_gamma(void) {
|
||||
|
||||
static void level_cmd_set_terrain_data(void) {
|
||||
if (sCurrAreaIndex != -1) {
|
||||
#ifndef NO_SEGMENTED_MEMORY
|
||||
gAreas[sCurrAreaIndex].terrainData = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
#else
|
||||
Collision *data;
|
||||
u32 size;
|
||||
|
||||
// The game modifies the terrain data and must be reset upon level reload.
|
||||
data = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
size = get_area_terrain_size(data) * sizeof(Collision);
|
||||
gAreas[sCurrAreaIndex].terrainData = alloc_only_pool_alloc(sLevelPool, size);
|
||||
memcpy(gAreas[sCurrAreaIndex].terrainData, data, size);
|
||||
#endif
|
||||
}
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
@@ -615,7 +627,19 @@ static void level_cmd_set_rooms(void) {
|
||||
|
||||
static void level_cmd_set_macro_objects(void) {
|
||||
if (sCurrAreaIndex != -1) {
|
||||
#ifndef NO_SEGMENTED_MEMORY
|
||||
gAreas[sCurrAreaIndex].macroObjects = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
#else
|
||||
// The game modifies the macro object data (for example marking coins as taken),
|
||||
// so it must be reset when the level reloads.
|
||||
MacroObject *data = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
s32 len = 0;
|
||||
while (data[len++] != MACRO_OBJECT_END()) {
|
||||
len += 4;
|
||||
}
|
||||
gAreas[sCurrAreaIndex].macroObjects = alloc_only_pool_alloc(sLevelPool, len * sizeof(MacroObject));
|
||||
memcpy(gAreas[sCurrAreaIndex].macroObjects, data, len * sizeof(MacroObject));
|
||||
#endif
|
||||
}
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#ifndef _LEVEL_SCRIPT_H
|
||||
#define _LEVEL_SCRIPT_H
|
||||
#ifndef LEVEL_SCRIPT_H
|
||||
#define LEVEL_SCRIPT_H
|
||||
|
||||
struct LevelCommand *level_script_execute(struct LevelCommand *cmd);
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
struct LevelCommand;
|
||||
|
||||
extern u8 level_script_entry[];
|
||||
|
||||
#endif /* _LEVEL_SCRIPT_H */
|
||||
struct LevelCommand *level_script_execute(struct LevelCommand *cmd);
|
||||
|
||||
#endif // LEVEL_SCRIPT_H
|
||||
@@ -557,7 +557,7 @@ void mtxf_mul_vec3s(Mat4 mtx, Vec3s b) {
|
||||
* Convert float matrix 'src' to fixed point matrix 'dest'.
|
||||
* The float matrix may not contain entries larger than 65536 or the console
|
||||
* crashes. The fixed point matrix has entries with a 16-bit integer part, so
|
||||
* the floating point numbers are multipled by 2^16 before being cast to a s32
|
||||
* the floating point numbers are multiplied by 2^16 before being cast to a s32
|
||||
* integer. If this doesn't fit, the N64 and iQue consoles will throw an
|
||||
* exception. On Wii and Wii U Virtual Console the value will simply be clamped
|
||||
* and no crashes occur.
|
||||
@@ -758,7 +758,7 @@ f32 atan2f(f32 y, f32 x) {
|
||||
* value t in [0, 1] and gSplineState. Given the current control point P, these
|
||||
* weights are for P[0], P[1], P[2] and P[3] to obtain an interpolated point.
|
||||
* The weights naturally sum to 1, and they are also always in range [0, 1] so
|
||||
* the inteprolated point will never overshoot. The curve is guaranteed to go
|
||||
* the interpolated point will never overshoot. The curve is guaranteed to go
|
||||
* through the first and last point, but not through intermediate points.
|
||||
*
|
||||
* gSplineState ensures that the curve is clamped: the first two points
|
||||
@@ -820,7 +820,7 @@ void spline_get_weights(Vec4f result, f32 t, UNUSED s32 c) {
|
||||
|
||||
/**
|
||||
* Initialize a spline animation.
|
||||
* 'keyframes' should be an array of (s, x, y, z) vectors
|
||||
* 'keyFrames' should be an array of (s, x, y, z) vectors
|
||||
* s: the speed of the keyframe in 1000/frames, e.g. s=100 means the keyframe lasts 10 frames
|
||||
* (x, y, z): point in 3D space on the curve
|
||||
* The array should end with three entries with s=0 (infinite keyframe duration).
|
||||
|
||||
+25
-22
@@ -1,5 +1,8 @@
|
||||
#ifndef _MATH_UTIL_H_
|
||||
#define _MATH_UTIL_H_
|
||||
#ifndef MATH_UTIL_H
|
||||
#define MATH_UTIL_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
@@ -43,29 +46,29 @@ void *vec3f_to_vec3s(Vec3s dest, Vec3f a);
|
||||
void *find_vector_perpendicular_to_plane(Vec3f dest, Vec3f a, Vec3f b, Vec3f c);
|
||||
void *vec3f_cross(Vec3f dest, Vec3f a, Vec3f b);
|
||||
void *vec3f_normalize(Vec3f dest);
|
||||
void mtxf_copy(f32 dest[4][4], f32 src[4][4]);
|
||||
void mtxf_identity(f32 mtx[4][4]);
|
||||
void mtxf_translate(f32 a[4][4], Vec3f b);
|
||||
void mtxf_lookat(f32 mtx[4][4], Vec3f b, Vec3f c, s16 d);
|
||||
void mtxf_rotate_zxy_and_translate(f32 mtx[4][4], Vec3f b, Vec3s c);
|
||||
void mtxf_rotate_xyz_and_translate(f32 mtx[4][4], Vec3f b, Vec3s c);
|
||||
void mtxf_billboard(f32 mtx1[4][4], f32 mtx2[4][4], Vec3f c, s16 d);
|
||||
void mtxf_align_terrain_normal(f32 mtx[4][4], Vec3f b, Vec3f c, s16 d);
|
||||
void mtxf_align_terrain_triangle(f32 mtx[4][4], Vec3f b, s16 c, f32 d);
|
||||
void mtxf_mul(f32 dest[4][4], f32 a[4][4], f32 b[4][4]);
|
||||
void mtxf_scale_vec3f(f32 a[4][4], f32 b[4][4], Vec3f c);
|
||||
void mtxf_mul_vec3s(f32 a[4][4], Vec3s b);
|
||||
void mtxf_to_mtx(Mtx *a, f32 b[4][4]);
|
||||
void mtxf_rotate_xy(Mtx *a, s16 b);
|
||||
void get_pos_from_transform_mtx(Vec3f a, f32 b[4][4], f32 c[4][4]);
|
||||
void mtxf_copy(Mat4 dest, Mat4 src);
|
||||
void mtxf_identity(Mat4 mtx);
|
||||
void mtxf_translate(Mat4 dest, Vec3f b);
|
||||
void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll);
|
||||
void mtxf_rotate_zxy_and_translate(Mat4 dest, Vec3f translate, Vec3s rotate);
|
||||
void mtxf_rotate_xyz_and_translate(Mat4 dest, Vec3f b, Vec3s c);
|
||||
void mtxf_billboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle);
|
||||
void mtxf_align_terrain_normal(Mat4 dest, Vec3f upDir, Vec3f pos, s16 yaw);
|
||||
void mtxf_align_terrain_triangle(Mat4 mtx, Vec3f pos, s16 yaw, f32 radius);
|
||||
void mtxf_mul(Mat4 dest, Mat4 a, Mat4 b);
|
||||
void mtxf_scale_vec3f(Mat4 dest, Mat4 mtx, Vec3f s);
|
||||
void mtxf_mul_vec3s(Mat4 mtx, Vec3s b);
|
||||
void mtxf_to_mtx(Mtx *dest, Mat4 src);
|
||||
void mtxf_rotate_xy(Mtx *mtx, s16 angle);
|
||||
void get_pos_from_transform_mtx(Vec3f dest, Mat4 objMtx, Mat4 camMtx);
|
||||
void vec3f_get_dist_and_angle(Vec3f from, Vec3f to, f32 *dist, s16 *pitch, s16 *yaw);
|
||||
void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s16 pitch, s16 yaw);
|
||||
s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec);
|
||||
f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec);
|
||||
s16 atan2s(f32 a, f32 b);
|
||||
s16 atan2s(f32 y, f32 x);
|
||||
f32 atan2f(f32 a, f32 b);
|
||||
void spline_get_weights(Vec4f a, f32 b, UNUSED s32 c);
|
||||
void anim_spline_init(Vec4s *a);
|
||||
s32 anim_spline_poll(Vec3f a);
|
||||
void spline_get_weights(Vec4f result, f32 t, UNUSED s32 c);
|
||||
void anim_spline_init(Vec4s *keyFrames);
|
||||
s32 anim_spline_poll(Vec3f result);
|
||||
|
||||
#endif
|
||||
#endif // MATH_UTIL_H
|
||||
@@ -1,17 +1,15 @@
|
||||
#include <ultra64.h>
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "sm64.h"
|
||||
#include "game/level_update.h"
|
||||
#include "game/debug.h"
|
||||
#include "game/camera.h"
|
||||
#include "game/level_update.h"
|
||||
#include "game/mario.h"
|
||||
#include "behavior_script.h"
|
||||
#include "game/object_list_processor.h"
|
||||
#include "surface_collision.h"
|
||||
#include "surface_load.h"
|
||||
#include "game/object_list_processor.h"
|
||||
|
||||
/**************************************************
|
||||
* WALLS *
|
||||
* WALLS *
|
||||
**************************************************/
|
||||
|
||||
/**
|
||||
@@ -219,14 +217,13 @@ s32 find_wall_collisions(struct WallCollisionData *colData) {
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* CEILINGS *
|
||||
* CEILINGS *
|
||||
**************************************************/
|
||||
|
||||
/**
|
||||
* Iterate through the list of ceilings and find the first ceiling over a given point.
|
||||
*/
|
||||
static struct Surface *find_ceil_from_list(struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z,
|
||||
f32 *pheight) {
|
||||
static struct Surface *find_ceil_from_list(struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z, f32 *pheight) {
|
||||
register struct Surface *surf;
|
||||
register s32 x1, z1, x2, z2, x3, z3;
|
||||
struct Surface *ceil = NULL;
|
||||
@@ -355,7 +352,7 @@ f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) {
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* FLOORS *
|
||||
* FLOORS *
|
||||
**************************************************/
|
||||
|
||||
/**
|
||||
@@ -399,8 +396,7 @@ f32 find_floor_height_and_data(f32 xPos, f32 yPos, f32 zPos, struct FloorGeometr
|
||||
/**
|
||||
* Iterate through the list of floors and find the first floor under a given point.
|
||||
*/
|
||||
static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z,
|
||||
f32 *pheight) {
|
||||
static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32 x, s32 y, s32 z, f32 *pheight) {
|
||||
register struct Surface *surf;
|
||||
register s32 x1, z1, x2, z2, x3, z3;
|
||||
f32 nx, ny, nz;
|
||||
@@ -484,7 +480,7 @@ f32 find_floor_height(f32 x, f32 y, f32 z) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the highest dynamic floor under a given position. Perhaps originally static and
|
||||
* Find the highest dynamic floor under a given position. Perhaps originally static
|
||||
* and dynamic floors were checked separately.
|
||||
*/
|
||||
f32 unused_find_dynamic_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) {
|
||||
@@ -584,7 +580,7 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) {
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* ENVIRONMENTAL BOXES *
|
||||
* ENVIRONMENTAL BOXES *
|
||||
**************************************************/
|
||||
|
||||
/**
|
||||
@@ -663,7 +659,7 @@ f32 find_poison_gas_level(f32 x, f32 z) {
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* DEBUG *
|
||||
* DEBUG *
|
||||
**************************************************/
|
||||
|
||||
/**
|
||||
@@ -741,7 +737,7 @@ void debug_surface_list_info(f32 xPos, f32 zPos) {
|
||||
* Perhaps an original implementation of surfaces before they were more specialized.
|
||||
*/
|
||||
s32 unused_resolve_floor_or_ceil_collisions(s32 checkCeil, f32 *px, f32 *py, f32 *pz, f32 radius,
|
||||
struct Surface **psurface, f32 *surfaceHeight) {
|
||||
struct Surface **psurface, f32 *surfaceHeight) {
|
||||
f32 nx, ny, nz, oo;
|
||||
f32 x = *px;
|
||||
f32 y = *py;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#ifndef _SURFACE_COLLISION_H
|
||||
#define _SURFACE_COLLISION_H
|
||||
#ifndef SURFACE_COLLISION_H
|
||||
#define SURFACE_COLLISION_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define LEVEL_BOUNDARY_MAX 0x2000
|
||||
#define CELL_SIZE 0x400
|
||||
@@ -33,5 +37,4 @@ f32 find_water_level(f32 x, f32 z);
|
||||
f32 find_poison_gas_level(f32 x, f32 z);
|
||||
void debug_surface_list_info(f32 xPos, f32 zPos);
|
||||
|
||||
|
||||
#endif /* _SURFACE_COLLISION_H */
|
||||
#endif // SURFACE_COLLISION_H
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
|
||||
@@ -491,8 +491,7 @@ static s16 *read_vertex_data(s16 **data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads in special environmental regions, such as water,
|
||||
* poison gas, and JRB fog.
|
||||
* Loads in special environmental regions, such as water, poison gas, and JRB fog.
|
||||
*/
|
||||
static void load_environmental_regions(s16 **data) {
|
||||
s32 numRegions;
|
||||
@@ -533,6 +532,57 @@ void alloc_surface_pools(void) {
|
||||
reset_red_coins_collected();
|
||||
}
|
||||
|
||||
#ifdef NO_SEGMENTED_MEMORY
|
||||
/**
|
||||
* Get the size of the terrain data, to get the correct size when copying later.
|
||||
*/
|
||||
u32 get_area_terrain_size(s16 *data) {
|
||||
s16 *startPos = data;
|
||||
s32 end = FALSE;
|
||||
s16 terrainLoadType;
|
||||
s32 numVertices;
|
||||
s32 numRegions;
|
||||
s32 numSurfaces;
|
||||
s16 hasForce;
|
||||
|
||||
while (!end) {
|
||||
terrainLoadType = *data++;
|
||||
|
||||
switch (terrainLoadType) {
|
||||
case TERRAIN_LOAD_VERTICES:
|
||||
numVertices = *data++;
|
||||
data += 3 * numVertices;
|
||||
break;
|
||||
|
||||
case TERRAIN_LOAD_OBJECTS:
|
||||
data += get_special_objects_size(data);
|
||||
break;
|
||||
|
||||
case TERRAIN_LOAD_ENVIRONMENT:
|
||||
numRegions = *data++;
|
||||
data += 6 * numRegions;
|
||||
break;
|
||||
|
||||
case TERRAIN_LOAD_CONTINUE:
|
||||
continue;
|
||||
|
||||
case TERRAIN_LOAD_END:
|
||||
end = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
numSurfaces = *data++;
|
||||
hasForce = surface_has_force(terrainLoadType);
|
||||
data += (3 + hasForce) * numSurfaces;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return data - startPos;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Process the level file, loading in vertices, surfaces, some objects, and environmental
|
||||
* boxes (water, gas, JRB fog).
|
||||
@@ -550,7 +600,7 @@ void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects
|
||||
|
||||
clear_static_surfaces();
|
||||
|
||||
// A while loop interating through each section of the level data. Sections of data
|
||||
// A while loop iterating through each section of the level data. Sections of data
|
||||
// are prefixed by a terrain "type." This type is reused for surfaces as the surface
|
||||
// type.
|
||||
while (TRUE) {
|
||||
@@ -607,7 +657,7 @@ static void unused_80383604(void) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies an object's tranformation to the object's vertices.
|
||||
* Applies an object's transformation to the object's vertices.
|
||||
*/
|
||||
void transform_object_vertices(s16 **data, s16 *vertexData) {
|
||||
register s16 *vertices;
|
||||
@@ -647,8 +697,7 @@ void transform_object_vertices(s16 **data, s16 *vertexData) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Load in the surfaces for the gCurrentObject. This includes setting the flags,
|
||||
* exertion, and room.
|
||||
* Load in the surfaces for the gCurrentObject. This includes setting the flags, exertion, and room.
|
||||
*/
|
||||
void load_object_surfaces(s16 **data, s16 *vertexData) {
|
||||
s32 surfaceType;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#ifndef _SURFACE_LOAD_H
|
||||
#define _SURFACE_LOAD_H
|
||||
#ifndef SURFACE_LOAD_H
|
||||
#define SURFACE_LOAD_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
@@ -28,8 +30,11 @@ extern struct Surface *sSurfacePool;
|
||||
extern s16 sSurfacePoolSize;
|
||||
|
||||
void alloc_surface_pools(void);
|
||||
#ifdef NO_SEGMENTED_MEMORY
|
||||
u32 get_area_terrain_size(s16 *data);
|
||||
#endif
|
||||
void load_area_terrain(s16 index, s16 *data, s8 *surfaceRooms, s16 *macroObjects);
|
||||
void clear_dynamic_surfaces(void);
|
||||
void load_object_collision_model(void);
|
||||
|
||||
#endif
|
||||
#endif // SURFACE_LOAD_H
|
||||
Reference in new issue
Block a user