Refresh 3

This commit is contained in:
n64 committed 2019-11-03 14:36:27 -05:00
1 parent 6b8bc9b9ec
commit a7c423cb43
4603 files changed
+475500 -437701

No files matched your search

+9 -9
View File
@@ -43,7 +43,7 @@ s16 convert_rotation(s16 inRotation) {
* parameters filling up the upper 2 bytes of newObj->oBehParams.
* The object will not spawn if 'behavior' is NULL.
*/
void spawn_macro_abs_yrot_2params(u32 model, u32 *behavior, s16 x, s16 y, s16 z, s16 ry, s16 params) {
void spawn_macro_abs_yrot_2params(u32 model, const BehaviorScript *behavior, s16 x, s16 y, s16 z, s16 ry, s16 params) {
if (behavior != NULL) {
struct Object *newObj = spawn_object_abs_with_rot(
&gMacroObjectDefaultParent, 0, model, behavior, x, y, z, 0, convert_rotation(ry), 0);
@@ -56,7 +56,7 @@ void spawn_macro_abs_yrot_2params(u32 model, u32 *behavior, s16 x, s16 y, s16 z,
* a single parameter filling up the upper byte of newObj->oBehParams.
* The object will not spawn if 'behavior' is NULL.
*/
void spawn_macro_abs_yrot_param1(u32 model, u32 *behavior, s16 x, s16 y, s16 z, s16 ry, s16 param) {
void spawn_macro_abs_yrot_param1(u32 model, const BehaviorScript *behavior, s16 x, s16 y, s16 z, s16 ry, s16 param) {
if (behavior != NULL) {
struct Object *newObj = spawn_object_abs_with_rot(
&gMacroObjectDefaultParent, 0, model, behavior, x, y, z, 0, convert_rotation(ry), 0);
@@ -68,7 +68,7 @@ void spawn_macro_abs_yrot_param1(u32 model, u32 *behavior, s16 x, s16 y, s16 z,
* Spawns an object at an absolute location with currently 3 unknown variables that get converted to
* floats. Oddly enough, this function doesn't care if 'behavior' is NULL or not.
*/
void spawn_macro_abs_special(u32 model, u32 *behavior, s16 x, s16 y, s16 z, s16 unkA, s16 unkB,
void spawn_macro_abs_special(u32 model, const BehaviorScript *behavior, s16 x, s16 y, s16 z, s16 unkA, s16 unkB,
s16 unkC) {
struct Object *newObj =
spawn_object_abs_with_rot(&gMacroObjectDefaultParent, 0, model, behavior, x, y, z, 0, 0, 0);
@@ -79,21 +79,21 @@ void spawn_macro_abs_special(u32 model, u32 *behavior, s16 x, s16 y, s16 z, s16
newObj->oMacroUnk110 = (f32) unkC;
}
static void Unknown802E142C(u32 (*a0)[], s16 a1[]) {
static void Unknown802E142C(const BehaviorScript *behavior, s16 a1[]) {
struct Object *sp3C;
s16 model;
model = &bhvYellowCoin == a0 ? MODEL_YELLOW_COIN : MODEL_NONE;
model = bhvYellowCoin == behavior ? MODEL_YELLOW_COIN : MODEL_NONE;
sp3C = spawn_object_abs_with_rot(&gMacroObjectDefaultParent, 0, model, a0, a1[1], a1[2], a1[3], 0,
convert_rotation(a1[0]), 0);
sp3C = spawn_object_abs_with_rot(&gMacroObjectDefaultParent, 0, model, behavior,
a1[1], a1[2], a1[3], 0, convert_rotation(a1[0]), 0);
sp3C->oUnk1A8 = a1[4];
sp3C->oBehParams = (a1[4] & 0xFF) >> 16;
}
struct LoadedPreset {
/*0x00*/ u32 *beh;
/*0x00*/ const BehaviorScript *beh;
/*0x04*/ s16 param; // huh? why does the below function swap these.. just use the struct..
/*0x06*/ s16 model;
};
@@ -253,7 +253,7 @@ void spawn_special_objects(s16 areaIndex, s16 **specialObjList) {
u8 type;
u8 presetID;
u8 defaultParam;
u32 *behavior;
const BehaviorScript *behavior;
numOfSpecialObjects = **specialObjList;
(*specialObjList)++;