rename around object

This commit is contained in:
coco875
2024-08-04 23:40:18 +02:00
parent 421548767d
commit e66120f02e
7 changed files with 346 additions and 343 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ void init_item_window(s32 objectIndex) {
temp_v0 = (ItemWindowObjects *)&gObjectList[objectIndex];
temp_v0->currentItem = ITEM_NONE;
temp_v0->itemDisplay = temp_v0->currentItem;
temp_v0->textureListIndex = temp_v0->currentItem;
temp_v0->tlutList = (u8 *) common_tlut_item_window_none;
temp_v0->activeTLUT = (u8 *) common_tlut_item_window_none;
temp_v0->textureList = common_texture_item_window_none;
+10 -10
View File
@@ -1452,7 +1452,7 @@ void func_8008A9B8(s32 objectIndex) {
object = &gObjectList[objectIndex];
object->controlPoints++;
object->unk_09A = (s16) (10000 / (s16) (object->controlPoints[0].velocity));
object->timer = 0;
object->animationTimer = 0;
func_8008A920(objectIndex);
}
@@ -1461,7 +1461,7 @@ void func_8008AA3C(s32 objectIndex) {
object = &gObjectList[objectIndex];
object->controlPoints = object->spline->controlPoints;
object->unk_084[9] = 0;
object->timer = 0;
object->animationTimer = 0;
/*
This is INCREDIBLY stupid. This should really be
temp_v0->unk_084[8] = temp_v0->spline->numControlPoints;
@@ -1484,8 +1484,8 @@ void func_8008AB10(s32 objectIndex) {
object->offset[0] += object->velocity[0];
object->offset[1] += object->velocity[1];
object->offset[2] += object->velocity[2];
object->timer += (u16)object->unk_09A;
if (object->timer >= 0x2710) {
object->animationTimer += (u16)object->unk_09A;
if (object->animationTimer >= 0x2710) {
object->unk_084[9] = (u16)object->unk_084[9] + 1;
if (((u16)object->unk_084[9] + 1) == (u16) object->unk_084[8]) {
object->unk_0AE += 1;
@@ -1689,7 +1689,7 @@ void func_8008B3E4(s32 objectIndex) {
if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
object = &gObjectList[objectIndex];
object->unk_084[9] = 0;
object->timer = 0;
object->animationTimer = 0;
object->controlPoints = object->spline->controlPoints;
/*
This is INCREDIBLY stupid. This should really be
@@ -1703,7 +1703,7 @@ void func_8008B3E4(s32 objectIndex) {
}
void func_8008B44C(s32 objectIndex) {
gObjectList[objectIndex].timer = 0;
gObjectList[objectIndex].animationTimer = 0;
gObjectList[objectIndex].controlPoints++;
}
@@ -1723,7 +1723,7 @@ void func_8008B478(s32 objectIndex, s32 arg1) {
// I think the game treats each spline as being having a lenght of 10000
// This is getting the percent along the spline we want to reach,
// which is then treated as the `t` value given to the curve calculations
sp34 = ((f32)gObjectList[objectIndex].timer / 10000.0);
sp34 = ((f32)gObjectList[objectIndex].animationTimer / 10000.0);
// Calculate the curve at `t`
func_8008B17C(objectIndex, sp34);
if (is_obj_flag_status_active(objectIndex, 0x800) != 0) {
@@ -1736,7 +1736,7 @@ void func_8008B478(s32 objectIndex, s32 arg1) {
temp = gObjectList[objectIndex].controlPoints[1].velocity;
gObjectList[objectIndex].unk_09A = 10000.0 / (((temp - var_f6) * sp34) + var_f6);
gObjectList[objectIndex].timer += gObjectList[objectIndex].unk_09A;
gObjectList[objectIndex].animationTimer += gObjectList[objectIndex].unk_09A;
}
void func_8008B620(s32 objectIndex) {
@@ -1745,7 +1745,7 @@ void func_8008B620(s32 objectIndex) {
func_8008B478(objectIndex, 0);
object = &gObjectList[objectIndex];
if (object->timer >= 0x2710) {
if (object->animationTimer >= 0x2710) {
// Have to do it this way due to the u16 cast
object->unk_084[9] = (u16) object->unk_084[9] + 1;
if (((u16) object->unk_084[9] + 3) == (u16) object->unk_084[8]) {
@@ -1761,7 +1761,7 @@ void func_8008B6A4(s32 objectIndex) {
func_8008B478(objectIndex, 1);
object = &gObjectList[objectIndex];
if (object->timer >= 0x2710) {
if (object->animationTimer >= 0x2710) {
// Have to do it this way due to the u16 cast
object->unk_084[9] = (u16) object->unk_084[9] + 1;
if ((u16)object->unk_084[9] == (u16)object->unk_084[8]) {
+3 -3
View File
@@ -3978,7 +3978,7 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) {
sp34[2] = object->pos[2];
rsp_set_matrix_transformation_inverted_x_y_orientation(sp34, object->orientation, object->sizeScaling);
gSPDisplayList(gDisplayListHead++, D_0D0077D0);
func_80004DFC((animation_type_1 *) object->model, (animation_type_2 **) object->vertex, (s16) object->unk_0D8, (s16) object->itemDisplay);
func_80004DFC((animation_type_1 *) object->model, (animation_type_2 **) object->vertex, (s16) object->unk_0D8, (s16) object->textureListIndex);
}
} else if (arg1 < 0x15F91U) {
func_8004A7AC(objectIndex, 1.5f);
@@ -3986,7 +3986,7 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) {
}
rsp_set_matrix_transformation(object->pos, object->orientation, object->sizeScaling);
gSPDisplayList(gDisplayListHead++, D_0D0077D0);
func_80004DFC((animation_type_1 *) object->model, (animation_type_2 **) object->vertex, (s16) object->unk_0D8, (s16) object->itemDisplay);
func_80004DFC((animation_type_1 *) object->model, (animation_type_2 **) object->vertex, (s16) object->unk_0D8, (s16) object->textureListIndex);
}
}
@@ -4050,7 +4050,7 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) {
} else {
rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling);
gSPDisplayList(gDisplayListHead++, D_0D0077D0);
func_80004DFC((animation_type_1 *) gObjectList[objectIndex].model, (animation_type_2 **) gObjectList[objectIndex].vertex, 0, (s16) gObjectList[objectIndex].itemDisplay);
func_80004DFC((animation_type_1 *) gObjectList[objectIndex].model, (animation_type_2 **) gObjectList[objectIndex].vertex, 0, (s16) gObjectList[objectIndex].textureListIndex);
}
}
}
+321 -318
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -26,11 +26,11 @@ void func_800722CC(s32, s32);
void func_800722F8(s32, s32);
s32 func_80072320(s32, s32);
s32 func_80072354(s32, s32);
void set_object_unk_0CB(s32, s32);
void set_object_timer_running(s32, s32);
void init_object(s32, s32);
void func_80072408(s32);
void func_80072428(s32);
void func_80072488(s32);
void reset_timer_go_next_state(s32);
void func_800724DC(s32);
void func_800724F8(s32, s32);
s16 func_80072530(s32);
@@ -41,7 +41,7 @@ void func_8007266C(s32);
void func_800726CC(s32, s32);
void func_8007271C(s32, s32);
void func_8007274C(s32);
s32 func_8007278C(s32, s32);
s32 set_and_run_timer_object(s32, s32);
s32 func_8007281C(s32, s32);
s32 func_800728B0(s32, s32, s32);
void func_80072950(s32, s32, s32, s32);