You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Name a bunch of stuff
This commit is contained in:
@@ -579,11 +579,11 @@
|
||||
#define /*0x110*/ oHootMarioReleaseTime OBJECT_FIELD_S32(0x22)
|
||||
|
||||
/* Horizontal Movement */
|
||||
#define /*0x0F4*/ oHorizontalMovementUnkF4 OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oHorizontalMovementUnkF8 OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x100*/ oHorizontalMovementUnk100 OBJECT_FIELD_F32(0x1E)
|
||||
#define /*0x104*/ oHorizontalMovementUnk104 OBJECT_FIELD_S32(0x1F)
|
||||
#define /*0x108*/ oHorizontalMovementUnk108 OBJECT_FIELD_F32(0x20)
|
||||
#define /*0x0F4*/ oLllOctMeshWaveTimer OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oLllOctMeshActionOffset OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x100*/ oLllOctMeshWaveOffset1 OBJECT_FIELD_F32(0x1E)
|
||||
#define /*0x104*/ oLllOctMeshStandTimer OBJECT_FIELD_S32(0x1F)
|
||||
#define /*0x108*/ oLllOctMeshWaveOffset2 OBJECT_FIELD_F32(0x20)
|
||||
|
||||
/* Kickable Board */
|
||||
#define /*0x0F4*/ oKickableBoardF4 OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
@@ -89,22 +89,22 @@
|
||||
#define LAYER_FIRST_NON_ZB (LAYER_ZB_LAST + 1)
|
||||
#define LAYER_LAST_ALL LAYER_TRANSPARENT_INTER
|
||||
|
||||
#define INPUT_NONZERO_ANALOG 0x0001
|
||||
#define INPUT_A_PRESSED 0x0002
|
||||
#define INPUT_OFF_FLOOR 0x0004
|
||||
#define INPUT_ABOVE_SLIDE 0x0008
|
||||
#define INPUT_FIRST_PERSON 0x0010
|
||||
#define INPUT_UNKNOWN_5 0x0020
|
||||
#define INPUT_SQUISHED 0x0040
|
||||
#define INPUT_A_DOWN 0x0080
|
||||
#define INPUT_IN_POISON_GAS 0x0100
|
||||
#define INPUT_IN_WATER 0x0200
|
||||
#define INPUT_STOMPED 0x0400
|
||||
#define INPUT_INTERACT_OBJ_GRABBABLE 0x0800
|
||||
#define INPUT_UNKNOWN_12 0x1000
|
||||
#define INPUT_B_PRESSED 0x2000
|
||||
#define INPUT_Z_DOWN 0x4000
|
||||
#define INPUT_Z_PRESSED 0x8000
|
||||
#define INPUT_NONZERO_ANALOG /* 0x0001 */ (1 << 0)
|
||||
#define INPUT_A_PRESSED /* 0x0002 */ (1 << 1)
|
||||
#define INPUT_OFF_FLOOR /* 0x0004 */ (1 << 2)
|
||||
#define INPUT_ABOVE_SLIDE /* 0x0008 */ (1 << 3)
|
||||
#define INPUT_FIRST_PERSON /* 0x0010 */ (1 << 4)
|
||||
#define INPUT_UNKNOWN_5 /* 0x0020 */ (1 << 5)
|
||||
#define INPUT_SQUISHED /* 0x0040 */ (1 << 6)
|
||||
#define INPUT_A_DOWN /* 0x0080 */ (1 << 7)
|
||||
#define INPUT_IN_POISON_GAS /* 0x0100 */ (1 << 8)
|
||||
#define INPUT_IN_WATER /* 0x0200 */ (1 << 9)
|
||||
#define INPUT_STOMPED /* 0x0400 */ (1 << 10)
|
||||
#define INPUT_INTERACT_OBJ_GRABBABLE /* 0x0800 */ (1 << 11)
|
||||
#define INPUT_UNKNOWN_12 /* 0x1000 */ (1 << 12)
|
||||
#define INPUT_B_PRESSED /* 0x2000 */ (1 << 13)
|
||||
#define INPUT_Z_DOWN /* 0x4000 */ (1 << 14)
|
||||
#define INPUT_Z_PRESSED /* 0x8000 */ (1 << 15)
|
||||
|
||||
#define GROUND_STEP_LEFT_GROUND 0
|
||||
#define GROUND_STEP_NONE 1
|
||||
@@ -150,28 +150,29 @@
|
||||
#define PARTICLE_TRIANGLE /* 0x00040000 */ (1 << 18)
|
||||
#define PARTICLE_19 /* 0x00080000 */ (1 << 19)
|
||||
|
||||
#define MODEL_STATE_NOISE_ALPHA 0x180
|
||||
#define MODEL_STATE_METAL 0x200
|
||||
#define MODEL_STATE_ALPHA (1 << 8) // 0x100
|
||||
#define MODEL_STATE_NOISE_ALPHA ((1 << 7) | MODEL_STATE_ALPHA) // (0x080 | MODEL_STATE_ALPHA)
|
||||
#define MODEL_STATE_METAL (1 << 9) // 0x200
|
||||
|
||||
#define MARIO_NORMAL_CAP 0x00000001
|
||||
#define MARIO_VANISH_CAP 0x00000002
|
||||
#define MARIO_METAL_CAP 0x00000004
|
||||
#define MARIO_WING_CAP 0x00000008
|
||||
#define MARIO_CAP_ON_HEAD 0x00000010
|
||||
#define MARIO_CAP_IN_HAND 0x00000020
|
||||
#define MARIO_METAL_SHOCK 0x00000040
|
||||
#define MARIO_TELEPORTING 0x00000080
|
||||
#define MARIO_UNKNOWN_08 0x00000100
|
||||
#define MARIO_UNKNOWN_13 0x00002000
|
||||
#define MARIO_ACTION_SOUND_PLAYED 0x00010000
|
||||
#define MARIO_MARIO_SOUND_PLAYED 0x00020000
|
||||
#define MARIO_UNKNOWN_18 0x00040000
|
||||
#define MARIO_PUNCHING 0x00100000
|
||||
#define MARIO_KICKING 0x00200000
|
||||
#define MARIO_TRIPPING 0x00400000
|
||||
#define MARIO_UNKNOWN_25 0x02000000
|
||||
#define MARIO_UNKNOWN_30 0x40000000
|
||||
#define MARIO_UNKNOWN_31 0x80000000
|
||||
#define MARIO_NORMAL_CAP /* 0x00000001 */ (1 << 0)
|
||||
#define MARIO_VANISH_CAP /* 0x00000002 */ (1 << 1)
|
||||
#define MARIO_METAL_CAP /* 0x00000004 */ (1 << 2)
|
||||
#define MARIO_WING_CAP /* 0x00000008 */ (1 << 3)
|
||||
#define MARIO_CAP_ON_HEAD /* 0x00000010 */ (1 << 4)
|
||||
#define MARIO_CAP_IN_HAND /* 0x00000020 */ (1 << 5)
|
||||
#define MARIO_METAL_SHOCK /* 0x00000040 */ (1 << 6)
|
||||
#define MARIO_TELEPORTING /* 0x00000080 */ (1 << 7)
|
||||
#define MARIO_JUMPING /* 0x00000100 */ (1 << 8)
|
||||
#define MARIO_NO_PURPLE_SWITCH /* 0x00002000 */ (1 << 13)
|
||||
#define MARIO_ACTION_SOUND_PLAYED /* 0x00010000 */ (1 << 16)
|
||||
#define MARIO_MARIO_SOUND_PLAYED /* 0x00020000 */ (1 << 17)
|
||||
#define MARIO_FALL_SOUND_PLAYED /* 0x00040000 */ (1 << 18)
|
||||
#define MARIO_PUNCHING /* 0x00100000 */ (1 << 20)
|
||||
#define MARIO_KICKING /* 0x00200000 */ (1 << 21)
|
||||
#define MARIO_TRIPPING /* 0x00400000 */ (1 << 22)
|
||||
#define MARIO_LEDGE_CLIMB_CAMERA /* 0x02000000 */ (1 << 25)
|
||||
#define MARIO_AIR_HIT_WALL /* 0x40000000 */ (1 << 30)
|
||||
#define MARIO_PUSHING /* 0x80000000 */ (1 << 31)
|
||||
|
||||
#define MARIO_SPECIAL_CAPS (MARIO_VANISH_CAP | MARIO_METAL_CAP | MARIO_WING_CAP)
|
||||
#define MARIO_CAPS (MARIO_NORMAL_CAP | MARIO_SPECIAL_CAPS)
|
||||
|
||||
@@ -44,13 +44,37 @@ struct Controller
|
||||
#endif
|
||||
};
|
||||
|
||||
// -- Booleans --
|
||||
|
||||
typedef u8 Bool8;
|
||||
typedef u16 Bool16;
|
||||
typedef u32 Bool32;
|
||||
|
||||
// -- Vectors --
|
||||
|
||||
typedef u8 Vec2uc[2];
|
||||
typedef s8 Vec2c[2];
|
||||
typedef s16 Vec2s[2];
|
||||
typedef s32 Vec2i[2];
|
||||
typedef f32 Vec2f[2];
|
||||
typedef f32 Vec3f[3]; // X, Y, Z, where Y is up
|
||||
typedef f64 Vec2d[2];
|
||||
|
||||
typedef u8 Vec3uc[3];
|
||||
typedef s8 Vec3c[3];
|
||||
typedef s16 Vec3s[3];
|
||||
typedef s32 Vec3i[3];
|
||||
typedef f32 Vec4f[4];
|
||||
typedef s16 Vec4s[4];
|
||||
typedef f32 Vec3f[3]; // X, Y, Z, where Y is up
|
||||
typedef f64 Vec3d[3];
|
||||
|
||||
typedef u8 Vec4uc[4];
|
||||
typedef s8 Vec4c[4];
|
||||
typedef s16 Vec4s[4];
|
||||
typedef s32 Vec4i[4];
|
||||
typedef f32 Vec4f[4];
|
||||
typedef f64 Vec4d[4];
|
||||
|
||||
typedef f32 Mat2[2][2];
|
||||
typedef f32 Mat3[3][3];
|
||||
typedef f32 Mat4[4][4];
|
||||
|
||||
typedef uintptr_t GeoLayout;
|
||||
@@ -67,6 +91,13 @@ typedef COLLISION_DATA_TYPE TerrainData;
|
||||
typedef ROOM_DATA_TYPE RoomData;
|
||||
typedef TerrainData Vec3t[3];
|
||||
|
||||
// -- Angle --
|
||||
|
||||
typedef s16 Angle;
|
||||
typedef u16 UAngle;
|
||||
typedef s32 Angle32;
|
||||
typedef Angle Vec3a[3];
|
||||
|
||||
enum SpTaskState {
|
||||
SPTASK_STATE_NOT_STARTED,
|
||||
SPTASK_STATE_RUNNING,
|
||||
@@ -91,12 +122,12 @@ struct VblankHandler
|
||||
|
||||
#define ANIM_FLAG_NOLOOP (1 << 0) // 0x01
|
||||
#define ANIM_FLAG_FORWARD (1 << 1) // 0x02
|
||||
#define ANIM_FLAG_2 (1 << 2) // 0x04
|
||||
#define ANIM_FLAG_NO_ACCEL (1 << 2) // 0x04
|
||||
#define ANIM_FLAG_HOR_TRANS (1 << 3) // 0x08
|
||||
#define ANIM_FLAG_VERT_TRANS (1 << 4) // 0x10
|
||||
#define ANIM_FLAG_5 (1 << 5) // 0x20
|
||||
#define ANIM_FLAG_6 (1 << 6) // 0x40
|
||||
#define ANIM_FLAG_7 (1 << 7) // 0x80
|
||||
#define ANIM_FLAG_DISABLED (1 << 5) // 0x20
|
||||
#define ANIM_FLAG_NO_TRANS (1 << 6) // 0x40
|
||||
#define ANIM_FLAG_UNUSED (1 << 7) // 0x80
|
||||
|
||||
struct Animation {
|
||||
/*0x00*/ s16 flags;
|
||||
@@ -295,7 +326,7 @@ struct MarioBodyState
|
||||
|
||||
struct MarioState
|
||||
{
|
||||
/*0x00*/ u16 unk00;
|
||||
/*0x00*/ u16 playerID;
|
||||
/*0x02*/ u16 input;
|
||||
/*0x04*/ u32 flags;
|
||||
/*0x08*/ u32 particleFlags;
|
||||
@@ -345,7 +376,7 @@ struct MarioState
|
||||
/*0xAC*/ s8 numKeys; // Unused key mechanic
|
||||
/*0xAD*/ s8 numLives;
|
||||
/*0xAE*/ s16 health;
|
||||
/*0xB0*/ s16 unkB0;
|
||||
/*0xB0*/ s16 animYTrans;
|
||||
/*0xB2*/ u8 hurtCounter;
|
||||
/*0xB3*/ u8 healCounter;
|
||||
/*0xB4*/ u8 squishTimer;
|
||||
@@ -354,7 +385,7 @@ struct MarioState
|
||||
/*0xB8*/ s16 prevNumStarsForDialog;
|
||||
/*0xBC*/ f32 peakHeight;
|
||||
/*0xC0*/ f32 quicksandDepth;
|
||||
/*0xC4*/ f32 unkC4;
|
||||
/*0xC4*/ f32 windGravity;
|
||||
};
|
||||
|
||||
#endif // TYPES_H
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#define MESG_START_GFX_SPTASK 103
|
||||
#define MESG_NMI_REQUEST 104
|
||||
|
||||
OSThread D_80339210; // unused?
|
||||
OSThread gUnkThread; // unused?
|
||||
OSThread gIdleThread;
|
||||
OSThread gMainThread;
|
||||
OSThread gGameLoopThread;
|
||||
|
||||
@@ -48,8 +48,6 @@ struct GraphNode gObjParentGraphNode;
|
||||
struct AllocOnlyPool *gGraphNodePool;
|
||||
struct GraphNode *gCurRootGraphNode;
|
||||
|
||||
UNUSED s32 D_8038BCA8;
|
||||
|
||||
/* The gGeoViews array is a mysterious one. Some background:
|
||||
*
|
||||
* If there are e.g. multiple Goombas, the multiple Goomba objects share one
|
||||
@@ -96,12 +94,9 @@ uintptr_t gGeoLayoutStack[16];
|
||||
struct GraphNode *gCurGraphNodeList[32];
|
||||
s16 gCurGraphNodeIndex;
|
||||
s16 gGeoLayoutStackIndex; // similar to SP register in MIPS
|
||||
UNUSED s16 D_8038BD7C;
|
||||
s16 gGeoLayoutReturnIndex; // similar to RA register in MIPS
|
||||
u8 *gGeoLayoutCommand;
|
||||
|
||||
u32 unused_8038B894[3] = { 0 };
|
||||
|
||||
/*
|
||||
0x00: Branch and store return address
|
||||
cmd+0x04: void *branchTarget
|
||||
|
||||
@@ -31,23 +31,16 @@
|
||||
|
||||
extern struct AllocOnlyPool *gGraphNodePool;
|
||||
extern struct GraphNode *gCurRootGraphNode;
|
||||
extern UNUSED s32 D_8038BCA8;
|
||||
extern struct GraphNode **gGeoViews;
|
||||
extern u16 gGeoNumViews;
|
||||
extern uintptr_t gGeoLayoutStack[];
|
||||
extern struct GraphNode *gCurGraphNodeList[];
|
||||
extern s16 gCurGraphNodeIndex;
|
||||
extern s16 gGeoLayoutStackIndex;
|
||||
extern UNUSED s16 D_8038BD7C;
|
||||
extern s16 gGeoLayoutReturnIndex;
|
||||
extern u8 *gGeoLayoutCommand;
|
||||
extern struct GraphNode gObjParentGraphNode;
|
||||
|
||||
extern struct AllocOnlyPool *D_8038BCA0;
|
||||
extern struct GraphNode *D_8038BCA4;
|
||||
extern s16 D_8038BD78;
|
||||
extern struct GraphNode *D_8038BCF8[];
|
||||
|
||||
void geo_layout_cmd_branch_and_link(void);
|
||||
void geo_layout_cmd_end(void);
|
||||
void geo_layout_cmd_branch(void);
|
||||
|
||||
@@ -741,7 +741,7 @@ void geo_obj_init_spawninfo(struct GraphNodeObject *graphNode, struct SpawnInfo
|
||||
|
||||
graphNode->areaIndex = spawn->areaIndex;
|
||||
graphNode->activeAreaIndex = spawn->activeAreaIndex;
|
||||
graphNode->sharedChild = spawn->unk18;
|
||||
graphNode->sharedChild = spawn->modelNode;
|
||||
graphNode->unk4C = spawn;
|
||||
graphNode->throwMatrix = NULL;
|
||||
graphNode->animInfo.curAnim = 0;
|
||||
@@ -817,7 +817,7 @@ s16 geo_update_animation_frame(struct AnimInfo *obj, s32 *accelAssist) {
|
||||
|
||||
anim = obj->curAnim;
|
||||
|
||||
if (obj->animTimer == gAreaUpdateCounter || anim->flags & ANIM_FLAG_2) {
|
||||
if (obj->animTimer == gAreaUpdateCounter || anim->flags & ANIM_FLAG_NO_ACCEL) {
|
||||
if (accelAssist != NULL) {
|
||||
accelAssist[0] = obj->animFrameAccelAssist;
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ static void level_cmd_begin_area(void) {
|
||||
|
||||
sCurrAreaIndex = areaIndex;
|
||||
screenArea->areaIndex = areaIndex;
|
||||
gAreas[areaIndex].unk04 = screenArea;
|
||||
gAreas[areaIndex].graphNode = screenArea;
|
||||
|
||||
if (node != NULL) {
|
||||
gAreas[areaIndex].camera = (struct Camera *) node->config.camera;
|
||||
@@ -468,7 +468,7 @@ static void level_cmd_init_mario(void) {
|
||||
gMarioSpawnInfo->areaIndex = 0;
|
||||
gMarioSpawnInfo->behaviorArg = CMD_GET(u32, 4);
|
||||
gMarioSpawnInfo->behaviorScript = CMD_GET(void *, 8);
|
||||
gMarioSpawnInfo->unk18 = gLoadedGraphNodes[CMD_GET(ModelID, 0x2)];
|
||||
gMarioSpawnInfo->modelNode = gLoadedGraphNodes[CMD_GET(ModelID, 0x2)];
|
||||
gMarioSpawnInfo->next = NULL;
|
||||
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
@@ -496,7 +496,7 @@ static void level_cmd_place_object(void) {
|
||||
|
||||
spawnInfo->behaviorArg = CMD_GET(u32, 16);
|
||||
spawnInfo->behaviorScript = CMD_GET(void *, 20);
|
||||
spawnInfo->unk18 = gLoadedGraphNodes[model];
|
||||
spawnInfo->modelNode = gLoadedGraphNodes[model];
|
||||
spawnInfo->next = gAreas[sCurrAreaIndex].objectSpawnInfos;
|
||||
|
||||
gAreas[sCurrAreaIndex].objectSpawnInfos = spawnInfo;
|
||||
|
||||
@@ -44,8 +44,8 @@ struct GraphNode **gLoadedGraphNodes = gGraphNodePointers;
|
||||
struct Area *gAreas = gAreaData;
|
||||
struct Area *gCurrentArea = NULL;
|
||||
struct CreditsEntry *gCurrCreditsEntry = NULL;
|
||||
Vp *D_8032CE74 = NULL;
|
||||
Vp *D_8032CE78 = NULL;
|
||||
Vp *gViewportOverride = NULL;
|
||||
Vp *gViewportClip = NULL;
|
||||
s16 gWarpTransDelay = 0;
|
||||
u32 gFBSetColor = 0;
|
||||
u32 gWarpTransFBSetColor = 0;
|
||||
@@ -78,7 +78,7 @@ u8 sSpawnTypeFromWarpBhv[] = {
|
||||
MARIO_SPAWN_AIRBORNE_STAR_COLLECT, MARIO_SPAWN_AIRBORNE_DEATH, MARIO_SPAWN_LAUNCH_STAR_COLLECT, MARIO_SPAWN_LAUNCH_DEATH,
|
||||
};
|
||||
|
||||
Vp D_8032CF00 = { {
|
||||
Vp gViewport = { {
|
||||
{ 640, 480, 511, 0 },
|
||||
{ 640, 480, 511, 0 },
|
||||
} };
|
||||
@@ -95,8 +95,8 @@ void override_viewport_and_clip(Vp *a, Vp *b, u8 c, u8 d, u8 e) {
|
||||
u16 sp6 = ((c >> 3) << 11) | ((d >> 3) << 6) | ((e >> 3) << 1) | 1;
|
||||
|
||||
gFBSetColor = (sp6 << 16) | sp6;
|
||||
D_8032CE74 = a;
|
||||
D_8032CE78 = b;
|
||||
gViewportOverride = a;
|
||||
gViewportClip = b;
|
||||
}
|
||||
|
||||
void set_warp_transition_rgb(u8 red, u8 green, u8 blue) {
|
||||
@@ -188,7 +188,7 @@ void clear_areas(void) {
|
||||
gAreaData[i].index = i;
|
||||
gAreaData[i].flags = 0;
|
||||
gAreaData[i].terrainType = 0;
|
||||
gAreaData[i].unk04 = NULL;
|
||||
gAreaData[i].graphNode = NULL;
|
||||
gAreaData[i].terrainData = NULL;
|
||||
gAreaData[i].surfaceRooms = NULL;
|
||||
gAreaData[i].macroObjects = NULL;
|
||||
@@ -211,21 +211,21 @@ void clear_area_graph_nodes(void) {
|
||||
s32 i;
|
||||
|
||||
if (gCurrentArea != NULL) {
|
||||
geo_call_global_function_nodes(&gCurrentArea->unk04->node, GEO_CONTEXT_AREA_UNLOAD);
|
||||
geo_call_global_function_nodes(&gCurrentArea->graphNode->node, GEO_CONTEXT_AREA_UNLOAD);
|
||||
gCurrentArea = NULL;
|
||||
gWarpTransition.isActive = FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (gAreaData[i].unk04 != NULL) {
|
||||
geo_call_global_function_nodes(&gAreaData[i].unk04->node, GEO_CONTEXT_AREA_INIT);
|
||||
gAreaData[i].unk04 = NULL;
|
||||
if (gAreaData[i].graphNode != NULL) {
|
||||
geo_call_global_function_nodes(&gAreaData[i].graphNode->node, GEO_CONTEXT_AREA_INIT);
|
||||
gAreaData[i].graphNode = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void load_area(s32 index) {
|
||||
if (gCurrentArea == NULL && gAreaData[index].unk04 != NULL) {
|
||||
if (gCurrentArea == NULL && gAreaData[index].graphNode != NULL) {
|
||||
gCurrentArea = &gAreaData[index];
|
||||
gCurrAreaIndex = gCurrentArea->index;
|
||||
|
||||
@@ -239,14 +239,14 @@ void load_area(s32 index) {
|
||||
}
|
||||
|
||||
load_obj_warp_nodes();
|
||||
geo_call_global_function_nodes(&gCurrentArea->unk04->node, GEO_CONTEXT_AREA_LOAD);
|
||||
geo_call_global_function_nodes(&gCurrentArea->graphNode->node, GEO_CONTEXT_AREA_LOAD);
|
||||
}
|
||||
}
|
||||
|
||||
void unload_area(void) {
|
||||
if (gCurrentArea != NULL) {
|
||||
unload_objects_from_area(0, gCurrentArea->index);
|
||||
geo_call_global_function_nodes(&gCurrentArea->unk04->node, GEO_CONTEXT_AREA_UNLOAD);
|
||||
geo_call_global_function_nodes(&gCurrentArea->graphNode->node, GEO_CONTEXT_AREA_UNLOAD);
|
||||
|
||||
gCurrentArea->flags = 0;
|
||||
gCurrentArea = NULL;
|
||||
@@ -370,9 +370,9 @@ void play_transition_after_delay(s16 transType, s16 time, u8 red, u8 green, u8 b
|
||||
|
||||
void render_game(void) {
|
||||
if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) {
|
||||
geo_process_root(gCurrentArea->unk04, D_8032CE74, D_8032CE78, gFBSetColor);
|
||||
geo_process_root(gCurrentArea->graphNode, gViewportOverride, gViewportClip, gFBSetColor);
|
||||
|
||||
gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&D_8032CF00));
|
||||
gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gViewport));
|
||||
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, gBorderHeight, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT - gBorderHeight);
|
||||
@@ -390,8 +390,8 @@ void render_game(void) {
|
||||
gSaveOptSelectIndex = gMenuOptSelectIndex;
|
||||
}
|
||||
|
||||
if (D_8032CE78 != NULL) {
|
||||
make_viewport_clip_rect(D_8032CE78);
|
||||
if (gViewportClip != NULL) {
|
||||
make_viewport_clip_rect(gViewportClip);
|
||||
} else
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, gBorderHeight, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT - gBorderHeight);
|
||||
@@ -413,8 +413,8 @@ void render_game(void) {
|
||||
}
|
||||
} else {
|
||||
render_text_labels();
|
||||
if (D_8032CE78 != NULL) {
|
||||
clear_viewport(D_8032CE78, gWarpTransFBSetColor);
|
||||
if (gViewportClip != NULL) {
|
||||
clear_viewport(gViewportClip, gWarpTransFBSetColor);
|
||||
} else {
|
||||
clear_frame_buffer(gWarpTransFBSetColor);
|
||||
}
|
||||
@@ -425,6 +425,6 @@ void render_game(void) {
|
||||
puppyprint_render_profiler();
|
||||
#endif
|
||||
|
||||
D_8032CE74 = NULL;
|
||||
D_8032CE78 = NULL;
|
||||
gViewportOverride = NULL;
|
||||
gViewportClip = NULL;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ struct SpawnInfo
|
||||
/*0x0D*/ s8 activeAreaIndex;
|
||||
/*0x10*/ u32 behaviorArg;
|
||||
/*0x14*/ void *behaviorScript;
|
||||
/*0x18*/ struct GraphNode *unk18;
|
||||
/*0x18*/ struct GraphNode *modelNode;
|
||||
/*0x1C*/ struct SpawnInfo *next;
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ struct Area
|
||||
/*0x00*/ s8 index;
|
||||
/*0x01*/ s8 flags; // Only has 1 flag: 0x01 = Is this the active area?
|
||||
/*0x02*/ u16 terrainType; // default terrain of the level (set from level script cmd 0x31)
|
||||
/*0x04*/ struct GraphNodeRoot *unk04; // geometry layout data
|
||||
/*0x04*/ struct GraphNodeRoot *graphNode; // geometry layout data
|
||||
/*0x08*/ s16 *terrainData; // collision data (set from level script cmd 0x2E)
|
||||
/*0x0C*/ s8 *surfaceRooms; // (set from level script cmd 0x2F)
|
||||
/*0x10*/ s16 *macroObjects; // Macro Objects Ptr (set from level script cmd 0x39)
|
||||
|
||||
@@ -180,18 +180,19 @@ Gfx *geo_move_mario_part_from_parent(s32 run, UNUSED struct GraphNode *node, Mat
|
||||
#include "behaviors/jumping_box.inc.c"
|
||||
#include "behaviors/boo_cage.inc.c"
|
||||
|
||||
static s16 sSpawnSparkleParticleAngle = 0x0;
|
||||
|
||||
// not in behavior file
|
||||
// n is the number of objects to spawn, r if the rate of change of phase (frequency?)
|
||||
void spawn_sparkle_particles(s32 n, s32 a1, s32 a2, s32 r) {
|
||||
static s16 D_8035FF10;
|
||||
void spawn_sparkle_particles(s32 n, s32 radius, s32 height, s32 r) {
|
||||
s32 i;
|
||||
s16 separation = 0x10000 / n; // Evenly spread around a circle
|
||||
for (i = 0; i < n; i++) {
|
||||
spawn_object_relative(0, sins(D_8035FF10 + i * separation) * a1, (i + 1) * a2,
|
||||
coss(D_8035FF10 + i * separation) * a1, o, MODEL_NONE, bhvSparkleSpawn);
|
||||
spawn_object_relative(0, sins(sSpawnSparkleParticleAngle + i * separation) * radius, (i + 1) * height,
|
||||
coss(sSpawnSparkleParticleAngle + i * separation) * radius, o, MODEL_NONE, bhvSparkleSpawn);
|
||||
}
|
||||
|
||||
D_8035FF10 += r * 0x100;
|
||||
sSpawnSparkleParticleAngle += r * 0x100;
|
||||
}
|
||||
|
||||
#include "behaviors/beta_boo_key.inc.c"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
struct FloorSwitchTriggeredAnimationFrame {
|
||||
const void *collisionDataPtr;
|
||||
s16 model;
|
||||
ModelID model;
|
||||
};
|
||||
|
||||
struct FloorSwitchTriggeredAnimationFrame sFloorSwitchTriggeredAnimationFrames[][5] = {
|
||||
@@ -29,7 +29,7 @@ struct FloorSwitchTriggeredAnimationFrame sFloorSwitchTriggeredAnimationFrames[]
|
||||
},
|
||||
};
|
||||
|
||||
s16 D_80331ACC[] = { 250, 200, 200 };
|
||||
s16 sAnimatesOnFloorSwitchPressTimers[] = { 250, 200, 200 };
|
||||
|
||||
void bhv_animates_on_floor_switch_press_init(void) {
|
||||
o->parentObj = cur_obj_nearest_object_with_behavior(bhvFloorSwitchAnimatesObject);
|
||||
@@ -42,7 +42,7 @@ void bhv_animates_on_floor_switch_press_loop(void) {
|
||||
}
|
||||
|
||||
if (o->oFloorSwitchPressAnimationUnkFC != 0) {
|
||||
o->oFloorSwitchPressAnimationUnkF4 = D_80331ACC[o->oBehParams2ndByte];
|
||||
o->oFloorSwitchPressAnimationUnkF4 = sAnimatesOnFloorSwitchPressTimers[o->oBehParams2ndByte];
|
||||
} else {
|
||||
o->oFloorSwitchPressAnimationUnkF4 = 0;
|
||||
}
|
||||
|
||||
@@ -67,15 +67,15 @@ s32 unknown_chuckya_function(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) {
|
||||
return sp1C;
|
||||
}
|
||||
|
||||
s32 approach_forward_vel(f32 *arr, f32 spC, f32 sp10) {
|
||||
if (arr[0] > spC) {
|
||||
arr[0] -= sp10;
|
||||
if (arr[0] < spC)
|
||||
arr[0] = spC;
|
||||
} else if (arr[0] < spC) {
|
||||
arr[0] += sp10;
|
||||
if (arr[0] > spC)
|
||||
arr[0] = spC;
|
||||
s32 approach_forward_vel(f32 *arr, f32 target, f32 inc) {
|
||||
if (arr[0] > target) {
|
||||
arr[0] -= inc;
|
||||
if (arr[0] < target)
|
||||
arr[0] = target;
|
||||
} else if (arr[0] < target) {
|
||||
arr[0] += inc;
|
||||
if (arr[0] > target)
|
||||
arr[0] = target;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ struct ObjectHitbox sEyerokHitbox = {
|
||||
/* hurtboxHeight: */ 1,
|
||||
};
|
||||
|
||||
s8 D_80331BA4[] = { 0, 1, 3, 2, 1, 0 };
|
||||
s8 sEyerokAnimStatesList[] = { 0, 1, 3, 2, 1, 0 };
|
||||
|
||||
static s32 eyerok_check_mario_relative_z(s32 arg0) {
|
||||
if (gMarioObject->oPosZ - o->oHomeZ < arg0) {
|
||||
@@ -277,7 +277,7 @@ static void eyerok_hand_act_show_eye(void) {
|
||||
if (o->oEyerokHandUnkFC != 0) {
|
||||
o->oEyerokHandUnkFC -= 1;
|
||||
}
|
||||
o->oAnimState = D_80331BA4[o->oEyerokHandUnkFC];
|
||||
o->oAnimState = sEyerokAnimStatesList[o->oEyerokHandUnkFC];
|
||||
} else {
|
||||
o->oEyerokHandUnkFC = 5;
|
||||
o->oEyerokHandUnk100 = random_linear_offset(20, 50);
|
||||
|
||||
@@ -10,11 +10,6 @@ struct ObjectHitbox sFirePiranhaPlantHitbox = {
|
||||
/* hurtboxHeight: */ 150,
|
||||
};
|
||||
|
||||
f32 D_80331B5C[] = {
|
||||
0.5f,
|
||||
2.0f,
|
||||
};
|
||||
|
||||
struct ObjectHitbox sPiranhaPlantFireHitbox = {
|
||||
/* interactType: */ INTERACT_FLAME,
|
||||
/* downOffset: */ 10,
|
||||
@@ -31,7 +26,7 @@ s32 sNumActiveFirePiranhaPlants;
|
||||
s32 sNumKilledFirePiranhaPlants;
|
||||
|
||||
void bhv_fire_piranha_plant_init(void) {
|
||||
o->oFirePiranhaPlantNeutralScale = D_80331B5C[(u16)(o->oBehParams >> 16)];
|
||||
o->oFirePiranhaPlantNeutralScale = (((u16)(o->oBehParams >> 16)) ? 2.0f : 0.5f);
|
||||
obj_set_hitbox(o, &sFirePiranhaPlantHitbox);
|
||||
|
||||
if ((u16)(o->oBehParams >> 16) != 0) {
|
||||
|
||||
@@ -1,59 +1,96 @@
|
||||
// lll_octagonal_rotating_mesh.c.inc
|
||||
|
||||
s16 D_8032F860[] = { 2, 30, 0x4000, 0, 1, 220, 900, 30, 1, 30, 0, -30, 2,
|
||||
30, -0x4000, 0, 1, 220, 900, 30, 1, 30, 0, -30, 3, 0 };
|
||||
s16 D_8032F894[] = { 4, 0, 0, 0, 1, 475, 900, 30, 1, 30, 0, -30, 2,
|
||||
30, 0x8000, 0, 1, 475, 900, 30, 1, 30, 0, -30, 3, 0 };
|
||||
s16 *D_8032F8C8[] = { D_8032F860, D_8032F894 };
|
||||
enum {
|
||||
LLL_OCTMESH_CHANGE_DIR = 1, // 1
|
||||
LLL_OCTMESH_LINEAR_MOVE, // 2
|
||||
LLL_OCTMESH_RESET, // 3
|
||||
LLL_OCTMESH_WAIT_FOR_MARIO // 4
|
||||
};
|
||||
|
||||
//! Note: useless zero at the reset instruction, there's no accesses beyond that anyway
|
||||
|
||||
s32 lll_octagonal_mesh_move(s16 *a0, s32 a1) {
|
||||
switch (a0[a1]) {
|
||||
case 4:
|
||||
o->oMoveAngleYaw = a0[a1 + 2];
|
||||
o->oForwardVel = a0[a1 + 3] / 100.0f;
|
||||
struct LllOctagonalMeshAction {
|
||||
s16 instruction;
|
||||
s16 time;
|
||||
Angle moveAngle;
|
||||
s16 forwardVel;
|
||||
};
|
||||
|
||||
// Path for big bullies platforms
|
||||
static struct LllOctagonalMeshAction gLllOctagonalMeshAction0[] = {
|
||||
// instruction time moveAngle forwardVel
|
||||
{ LLL_OCTMESH_LINEAR_MOVE, 30, 0x4000, 0 }, // 90 degrees
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 220, 900, 30 },
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 30, 0, -30 },
|
||||
{ LLL_OCTMESH_LINEAR_MOVE, 30, -0x4000, 0 }, // 90 degrees
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 220, 900, 30 },
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 30, 0, -30 },
|
||||
{ LLL_OCTMESH_RESET, 0, 0, 0 }
|
||||
};
|
||||
|
||||
// Path for rolling log
|
||||
static struct LllOctagonalMeshAction gLllOctagonalMeshAction1[] = {
|
||||
// instruction time moveAngle forwardVel
|
||||
{ LLL_OCTMESH_WAIT_FOR_MARIO, 0, 0, 0 },
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 475, 900, 30 },
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 30, 0, -30 },
|
||||
{ LLL_OCTMESH_LINEAR_MOVE, 30, 0x8000, 0 }, // 180 degrees
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 475, 900, 30 },
|
||||
{ LLL_OCTMESH_CHANGE_DIR, 30, 0, -30 },
|
||||
{ LLL_OCTMESH_RESET, 0, 0, 0 }
|
||||
};
|
||||
|
||||
// picked by oBehParams2ndByte
|
||||
static struct LllOctagonalMeshAction *gLllOctagonalMeshActionList[] = { gLllOctagonalMeshAction0, gLllOctagonalMeshAction1 };
|
||||
|
||||
s32 lll_octagonal_mesh_move(struct LllOctagonalMeshAction *actionTable, s32 actionOffset) {
|
||||
struct LllOctagonalMeshAction *action = &(actionTable[actionOffset]);
|
||||
switch (action->instruction) {
|
||||
case LLL_OCTMESH_WAIT_FOR_MARIO:
|
||||
o->oMoveAngleYaw = action->moveAngle;
|
||||
o->oForwardVel = action->forwardVel / 100.0f;
|
||||
if (cur_obj_is_mario_on_platform()) {
|
||||
a1 += 4;
|
||||
actionOffset += 4;
|
||||
o->oTimer = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
o->oMoveAngleYaw = a0[a1 + 2];
|
||||
o->oForwardVel = a0[a1 + 3] / 100.0f;
|
||||
if (o->oTimer > a0[a1 + 1]) {
|
||||
a1 += 4;
|
||||
case LLL_OCTMESH_LINEAR_MOVE:
|
||||
o->oMoveAngleYaw = action->moveAngle;
|
||||
o->oForwardVel = action->forwardVel / 100.0f;
|
||||
if (o->oTimer > action->time) {
|
||||
actionOffset += 4;
|
||||
o->oTimer = 0;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
approach_f32_signed(&o->oForwardVel, a0[a1 + 2] / 100.0f, a0[a1 + 3] / 100.0f);
|
||||
if (o->oTimer > a0[a1 + 1]) {
|
||||
a1 += 4;
|
||||
case LLL_OCTMESH_CHANGE_DIR:
|
||||
approach_f32_signed(&o->oForwardVel, action->moveAngle / 100.0f, action->forwardVel / 100.0f);
|
||||
if (o->oTimer > action->time) {
|
||||
actionOffset += 4;
|
||||
o->oTimer = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case LLL_OCTMESH_RESET:
|
||||
o->oForwardVel = 0.0f;
|
||||
a1 = 0;
|
||||
actionOffset = 0;
|
||||
break;
|
||||
}
|
||||
return a1;
|
||||
return actionOffset;
|
||||
}
|
||||
|
||||
s32 lll_octagonal_mesh_find_y_offset(s32 *a0, f32 *a1, s32 a2, s32 a3) {
|
||||
s32 lll_octagonal_mesh_find_y_offset(s32 *standTimer, f32 *posOffset, s32 standTimerInc, s32 moveDownAmount) {
|
||||
if (cur_obj_is_mario_on_platform()) {
|
||||
if (a0[0] < 0x4000)
|
||||
a0[0] += a2;
|
||||
if (standTimer[0] < 0x4000)
|
||||
standTimer[0] += standTimerInc;
|
||||
else
|
||||
a0[0] = 0x4000;
|
||||
standTimer[0] = 0x4000;
|
||||
} else {
|
||||
if (a0[0] > 0)
|
||||
a0[0] -= a2;
|
||||
if (standTimer[0] > 0)
|
||||
standTimer[0] -= standTimerInc;
|
||||
else
|
||||
a0[0] = 0;
|
||||
standTimer[0] = 0;
|
||||
}
|
||||
a1[0] = sins(a0[0]) * a3;
|
||||
if (a0[0] == 0 || a0[0] == 0x4000)
|
||||
posOffset[0] = sins(standTimer[0]) * moveDownAmount;
|
||||
if (standTimer[0] == 0 || standTimer[0] == 0x4000)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
@@ -61,16 +98,16 @@ s32 lll_octagonal_mesh_find_y_offset(s32 *a0, f32 *a1, s32 a2, s32 a3) {
|
||||
|
||||
void bhv_lll_moving_octagonal_mesh_platform_loop(void) {
|
||||
if (o->oAction == 0) {
|
||||
o->oHorizontalMovementUnkF8 = 0;
|
||||
o->oLllOctMeshActionOffset = 0;
|
||||
o->oAction++;
|
||||
} else
|
||||
o->oHorizontalMovementUnkF8 =
|
||||
lll_octagonal_mesh_move(D_8032F8C8[o->oBehParams2ndByte], o->oHorizontalMovementUnkF8);
|
||||
print_debug_top_down_objectinfo("number %d\n", o->oHorizontalMovementUnkF8);
|
||||
o->oLllOctMeshActionOffset =
|
||||
lll_octagonal_mesh_move(gLllOctagonalMeshActionList[o->oBehParams2ndByte], o->oLllOctMeshActionOffset);
|
||||
print_debug_top_down_objectinfo("number %d\n", o->oLllOctMeshActionOffset);
|
||||
cur_obj_move_using_fvel_and_gravity();
|
||||
if (lll_octagonal_mesh_find_y_offset(&o->oHorizontalMovementUnk104, &o->oHorizontalMovementUnk108, 0x400, -80)) {
|
||||
o->oHorizontalMovementUnkF4 += 0x800;
|
||||
o->oHorizontalMovementUnk100 -= sins(o->oHorizontalMovementUnkF4) * 2;
|
||||
if (lll_octagonal_mesh_find_y_offset(&o->oLllOctMeshStandTimer, &o->oLllOctMeshWaveOffset2, 0x400, -80)) {
|
||||
o->oLllOctMeshWaveTimer += 0x800;
|
||||
o->oLllOctMeshWaveOffset1 -= sins(o->oLllOctMeshWaveTimer) * 2;
|
||||
}
|
||||
o->oPosY = o->oHorizontalMovementUnk100 + o->oHomeY + o->oHorizontalMovementUnk108;
|
||||
o->oPosY = o->oLllOctMeshWaveOffset1 + o->oHomeY + o->oLllOctMeshWaveOffset2;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void bhv_pushable_loop(void) {
|
||||
s16 angleToMario;
|
||||
obj_set_hitbox(o, &sMetalBoxHitbox);
|
||||
o->oForwardVel = 0.0f;
|
||||
if (obj_check_if_collided_with_object(o, gMarioObject) && gMarioStates[0].flags & MARIO_UNKNOWN_31) {
|
||||
if (obj_check_if_collided_with_object(o, gMarioObject) && gMarioStates[0].flags & MARIO_PUSHING) {
|
||||
angleToMario = obj_angle_to_object(o, gMarioObject);
|
||||
if (abs_angle_diff(angleToMario, gMarioObject->oMoveAngleYaw) > 0x4000) {
|
||||
o->oMoveAngleYaw = (s16)((gMarioObject->oMoveAngleYaw + 0x2000) & 0xc000);
|
||||
|
||||
@@ -11,10 +11,7 @@ struct ObjectHitbox sMrBlizzardHitbox = {
|
||||
/* hurtboxHeight: */ 170,
|
||||
};
|
||||
|
||||
// Mr. Blizzard particle spawner.
|
||||
void mr_blizzard_spawn_white_particles(s8 count, s8 offsetY, s8 forwardVelBase, s8 velYBase,
|
||||
s8 sizeBase) {
|
||||
static struct SpawnParticlesInfo D_80331A00 = {
|
||||
static struct SpawnParticlesInfo sMrBlizzardParticlesInfo = {
|
||||
/* behParam: */ 0,
|
||||
/* count: */ 6,
|
||||
/* model: */ MODEL_WHITE_PARTICLE,
|
||||
@@ -29,12 +26,14 @@ void mr_blizzard_spawn_white_particles(s8 count, s8 offsetY, s8 forwardVelBase,
|
||||
/* sizeRange: */ 5.0f,
|
||||
};
|
||||
|
||||
D_80331A00.count = count;
|
||||
D_80331A00.offsetY = offsetY;
|
||||
D_80331A00.forwardVelBase = forwardVelBase;
|
||||
D_80331A00.velYBase = velYBase;
|
||||
D_80331A00.sizeBase = sizeBase;
|
||||
cur_obj_spawn_particles(&D_80331A00);
|
||||
// Mr. Blizzard particle spawner.
|
||||
void mr_blizzard_spawn_white_particles(s8 count, s8 offsetY, s8 forwardVelBase, s8 velYBase, s8 sizeBase) {
|
||||
sMrBlizzardParticlesInfo.count = count;
|
||||
sMrBlizzardParticlesInfo.offsetY = offsetY;
|
||||
sMrBlizzardParticlesInfo.forwardVelBase = forwardVelBase;
|
||||
sMrBlizzardParticlesInfo.velYBase = velYBase;
|
||||
sMrBlizzardParticlesInfo.sizeBase = sizeBase;
|
||||
cur_obj_spawn_particles(&sMrBlizzardParticlesInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ void bhv_purple_switch_loop(void) {
|
||||
case PURPLE_SWITCH_IDLE:
|
||||
cur_obj_set_model(MODEL_PURPLE_SWITCH);
|
||||
cur_obj_scale(1.5f);
|
||||
if (gMarioObject->platform == o && !(gMarioStates[0].action & MARIO_UNKNOWN_13)) {
|
||||
if (gMarioObject->platform == o && !(gMarioStates[0].action & MARIO_NO_PURPLE_SWITCH)) {
|
||||
if (lateral_dist_between_objects(o, gMarioObject) < 127.5) {
|
||||
o->oAction = PURPLE_SWITCH_PRESSED;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
// tox_box.c.inc
|
||||
|
||||
s8 D_8032F8F0[] = { 4, 1, 4, 1, 6, 1, 6, 1, 5, 1, 5, 1, 6, 1, 6, 1, 5, 1, 2, 4, 1, 4, 1, 4, 1, 2,
|
||||
5, 1, 5, 1, 7, 1, 7, 1, 4, 1, 4, 1, 7, 1, 7, 1, 5, 1, 5, 1, 5, 1, 2, 4, 1, -1 };
|
||||
s8 D_8032F924[] = { 4, 1, 4, 1, 7, 1, 7, 1, 7, 1, 2, 6, 1, 6, 1, 6, 1, 5,
|
||||
1, 5, 1, 6, 1, 5, 1, 5, 1, 2, 4, 1, 4, 1, 7, 1, -1 };
|
||||
s8 D_8032F948[] = { 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 5, 1, 5, 1, 5, 1, 5,
|
||||
1, 5, 1, 7, 1, 2, 6, 1, 6, 1, 5, 1, 2, 4, 1, 7, 1, -1 };
|
||||
s8 *D_8032F96C[] = { D_8032F8F0, D_8032F924, D_8032F948 };
|
||||
s8 sToxBoxDirectionPattern1[] = { 4, 1, 4, 1, 6, 1, 6, 1, 5, 1, 5, 1, 6, 1, 6, 1, 5, 1, 2, 4, 1, 4, 1, 4, 1, 2,
|
||||
5, 1, 5, 1, 7, 1, 7, 1, 4, 1, 4, 1, 7, 1, 7, 1, 5, 1, 5, 1, 5, 1, 2, 4, 1, -1 };
|
||||
s8 sToxBoxDirectionPattern2[] = { 4, 1, 4, 1, 7, 1, 7, 1, 7, 1, 2, 6, 1, 6, 1, 6, 1, 5,
|
||||
1, 5, 1, 6, 1, 5, 1, 5, 1, 2, 4, 1, 4, 1, 7, 1, -1 };
|
||||
s8 sToxBoxDirectionPattern3[] = { 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 5, 1, 5, 1, 5, 1, 5,
|
||||
1, 5, 1, 7, 1, 2, 6, 1, 6, 1, 5, 1, 2, 4, 1, 7, 1, -1 };
|
||||
s8 *sToxBoxDirectionPatterns[] = { sToxBoxDirectionPattern1, sToxBoxDirectionPattern2, sToxBoxDirectionPattern3 };
|
||||
|
||||
void tox_box_shake_screen(void) {
|
||||
if (o->oDistanceToMario < 3000.0f)
|
||||
if (o->oDistanceToMario < 3000.0f) {
|
||||
cur_obj_shake_screen(SHAKE_POS_SMALL);
|
||||
}
|
||||
}
|
||||
|
||||
void tox_box_move(f32 forwardVel, f32 a1, s16 deltaPitch, s16 deltaRoll)
|
||||
{
|
||||
void tox_box_move(f32 forwardVel, f32 a1, s16 deltaPitch, s16 deltaRoll) {
|
||||
o->oPosY = 99.41124 * sins((f32)(o->oTimer + 1) / 8 * 0x8000) + o->oHomeY + 3.0f;
|
||||
o->oForwardVel = forwardVel;
|
||||
o->oUpVel = a1;
|
||||
@@ -66,8 +66,8 @@ void tox_box_act_3(void) {
|
||||
}
|
||||
|
||||
void tox_box_act_0(void) {
|
||||
s8 *sp1C = D_8032F96C[o->oBehParams2ndByte];
|
||||
o->oAction = cur_obj_set_direction_table(sp1C);
|
||||
s8 *pattern = sToxBoxDirectionPatterns[o->oBehParams2ndByte];
|
||||
o->oAction = cur_obj_set_direction_table(pattern);
|
||||
}
|
||||
|
||||
void (*sToxBoxActions[])(void) = { tox_box_act_0, tox_box_act_1, tox_box_act_2, tox_box_act_3,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user