You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Move some structs/data into proper behavior files
This commit is contained in:
@@ -46,48 +46,6 @@
|
||||
#include "rumble_init.h"
|
||||
#include "puppylights.h"
|
||||
|
||||
struct WFRotatingPlatformData {
|
||||
s16 pad;
|
||||
s16 scale;
|
||||
const Collision *collisionData;
|
||||
s16 collisionDistance;
|
||||
};
|
||||
|
||||
struct TumblingBridgeParams {
|
||||
s16 numBridgeSections;
|
||||
s16 bridgeRelativeStartingXorZ;
|
||||
s16 platformWidth;
|
||||
ModelID16 model;
|
||||
const void *segAddr;
|
||||
};
|
||||
|
||||
struct ExclamationBoxContents {
|
||||
u8 id;
|
||||
u8 unk1;
|
||||
u8 behParams;
|
||||
ModelID16 model;
|
||||
const BehaviorScript *behavior;
|
||||
};
|
||||
|
||||
struct CheckerBoardPlatformInitPosition {
|
||||
s32 relPosZ;
|
||||
Vec3f scale;
|
||||
f32 radius;
|
||||
};
|
||||
|
||||
struct OpenableGrill {
|
||||
s16 halfWidth;
|
||||
ModelID16 modelID;
|
||||
const Collision *collision;
|
||||
};
|
||||
|
||||
static s32 sCapSaveFlags[] = { SAVE_FLAG_HAVE_WING_CAP, SAVE_FLAG_HAVE_METAL_CAP, SAVE_FLAG_HAVE_VANISH_CAP };
|
||||
|
||||
// Boo Roll
|
||||
static s16 sBooHitRotations[] = { 6047, 5664, 5292, 4934, 4587, 4254, 3933, 3624, 3329, 3046, 2775,
|
||||
2517, 2271, 2039, 1818, 1611, 1416, 1233, 1063, 906, 761, 629,
|
||||
509, 402, 308, 226, 157, 100, 56, 25, 4, 0 };
|
||||
|
||||
#include "behaviors/star_door.inc.c"
|
||||
#include "behaviors/mr_i.inc.c"
|
||||
#include "behaviors/pole.inc.c"
|
||||
|
||||
@@ -186,6 +186,11 @@ static void boo_set_move_yaw_for_during_hit(s32 hurt) {
|
||||
}
|
||||
}
|
||||
|
||||
// Boo Roll
|
||||
static s16 sBooHitRotations[] = { 6047, 5664, 5292, 4934, 4587, 4254, 3933, 3624, 3329, 3046, 2775,
|
||||
2517, 2271, 2039, 1818, 1611, 1416, 1233, 1063, 906, 761, 629,
|
||||
509, 402, 308, 226, 157, 100, 56, 25, 4, 0 };
|
||||
|
||||
static void boo_move_during_hit(s32 roll, f32 fVel) {
|
||||
// Boos seem to have been supposed to oscillate up then down then back again
|
||||
// when hit. However it seems the programmers forgot to scale the cosine,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// capswitch.c.inc
|
||||
|
||||
static s32 sCapSaveFlags[] = { SAVE_FLAG_HAVE_WING_CAP, SAVE_FLAG_HAVE_METAL_CAP, SAVE_FLAG_HAVE_VANISH_CAP };
|
||||
|
||||
void cap_switch_act_0(void) {
|
||||
o->oAnimState = o->oBehParams2ndByte;
|
||||
cur_obj_scale(0.5f);
|
||||
@@ -9,10 +11,12 @@ void cap_switch_act_0(void) {
|
||||
if (save_file_get_flags() & sCapSaveFlags[o->oBehParams2ndByte]) {
|
||||
o->oAction = 3;
|
||||
o->header.gfx.scale[1] = 0.1f;
|
||||
} else
|
||||
} else {
|
||||
o->oAction = 1;
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
o->oAction = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void cap_switch_act_1(void) {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
// checkerboard_platform.c.inc
|
||||
|
||||
struct CheckerBoardPlatformInitPosition {
|
||||
s32 relPosZ;
|
||||
Vec3f scale;
|
||||
f32 radius;
|
||||
};
|
||||
|
||||
struct CheckerBoardPlatformInitPosition sCheckerBoardPlatformInitPositions[] = { { 145, { 0.7f, 1.5f, 0.7f }, 7.0f },
|
||||
{ 235, { 1.2f, 2.0f, 1.2f }, 11.6f } };
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
// exclamation_box.c.inc
|
||||
|
||||
struct ExclamationBoxContents {
|
||||
u8 id;
|
||||
u8 unk1;
|
||||
u8 behParams;
|
||||
ModelID16 model;
|
||||
const BehaviorScript *behavior;
|
||||
};
|
||||
|
||||
struct ObjectHitbox sExclamationBoxHitbox = {
|
||||
/* interactType: */ INTERACT_BREAKABLE,
|
||||
/* downOffset: */ 5,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
// grill_door.c.inc
|
||||
|
||||
struct OpenableGrill {
|
||||
s16 halfWidth;
|
||||
ModelID16 modelID;
|
||||
const Collision *collision;
|
||||
};
|
||||
|
||||
struct OpenableGrill gOpenableGrills[] = { { 320, MODEL_BOB_BARS_GRILLS, bob_seg7_collision_gate },
|
||||
{ 410, MODEL_HMC_RED_GRILLS, hmc_seg7_collision_0702B65C } };
|
||||
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
#include "levels/wf/header.h"
|
||||
#include "levels/wdw/header.h"
|
||||
|
||||
struct WFRotatingPlatformData {
|
||||
s16 pad;
|
||||
s16 scale;
|
||||
const Collision *collisionData;
|
||||
s16 collisionDistance;
|
||||
};
|
||||
|
||||
struct WFRotatingPlatformData sWFRotatingPlatformData[] = {
|
||||
{ 0, 100, wf_seg7_collision_rotating_platform, 2000 },
|
||||
{ 0, 150, wdw_seg7_collision_070186B4, 1000 }
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
#include "levels/lll/header.h"
|
||||
#include "levels/bitfs/header.h"
|
||||
|
||||
struct TumblingBridgeParams {
|
||||
s16 numBridgeSections;
|
||||
s16 bridgeRelativeStartingXorZ;
|
||||
s16 platformWidth;
|
||||
ModelID16 model;
|
||||
const void *segAddr;
|
||||
};
|
||||
|
||||
struct TumblingBridgeParams sTumblingBridgeParams[] = {
|
||||
{ 9, -512, 0x80, MODEL_WF_TUMBLING_BRIDGE_PART, wf_seg7_collision_tumbling_bridge },
|
||||
{ 9, -412, 103, MODEL_BBH_TUMBLING_PLATFORM_PART, bbh_seg7_collision_07026B1C },
|
||||
|
||||
Reference in New Issue
Block a user