diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2024-08-23 01:53:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-22 17:53:05 -0600 |
| commit | 3781ce2830a143df855003b65fe069d2e26215d9 (patch) | |
| tree | 61ce31de6afb86fdb1722ceba15c2fa68b70d3c8 | |
| parent | 80549609488498423c93500227e5b58dfca89731 (diff) | |
fix animation (#60)
* fix animation
* Update update_objects.c
| -rw-r--r-- | courses/sherbet_land/course_offsets.c | 14 | ||||
| -rw-r--r-- | include/course_offsets.h | 4 | ||||
| -rw-r--r-- | src/code_80004740.c | 2 | ||||
| -rw-r--r-- | src/code_80004740.h | 8 | ||||
| -rw-r--r-- | src/code_80057C60.c | 8 | ||||
| -rw-r--r-- | src/racing/memory.c | 1 | ||||
| -rw-r--r-- | src/update_objects.c | 20 | ||||
| -rw-r--r-- | yamls/us/sherbet_land_data.yml | 4 |
8 files changed, 33 insertions, 28 deletions
diff --git a/courses/sherbet_land/course_offsets.c b/courses/sherbet_land/course_offsets.c index a04d06fc9..c942bf9a0 100644 --- a/courses/sherbet_land/course_offsets.c +++ b/courses/sherbet_land/course_offsets.c @@ -166,14 +166,14 @@ const Gfx *sherbet_land_dls_2[] = { d_course_sherbet_land_dl_4B20, }; -u32 d_course_sherbet_land_unk_data1[] = { +uintptr_t d_course_sherbet_land_unk_data1[] = { 0x00000001, 0x00000002, 0x00000000, 0x00000007, 0x00000000, - 0x06008D00, + d_course_sherbet_land_dl_8D00, 0x00000000, 0x00000000, 0x00000000, @@ -195,7 +195,7 @@ u32 d_course_sherbet_land_unk_data1[] = { 0x00000000, 0x00000007, 0x00000000, - 0x06008730, + d_course_sherbet_land_dl_8730, 0x00000000, 0x00000000, 0x00000000, @@ -217,7 +217,7 @@ u32 d_course_sherbet_land_unk_data1[] = { 0x00000000, 0x00000007, 0x00000000, - 0x06008808, + d_course_sherbet_land_dl_8808, 0x00000000, 0x00000000, 0x00000000, @@ -239,7 +239,7 @@ u32 d_course_sherbet_land_unk_data1[] = { 0x00000000, 0x00000007, 0x00000000, - 0x06008930, + d_course_sherbet_land_dl_8930, 0x00000000, 0x00000000, 0x00000000, @@ -261,7 +261,7 @@ u32 d_course_sherbet_land_unk_data1[] = { 0x00000000, 0x00000007, 0x00000000, - 0x06008A78, + d_course_sherbet_land_dl_8A78, 0x00000000, 0x00000000, 0x00000000, @@ -283,7 +283,7 @@ u32 d_course_sherbet_land_unk_data1[] = { 0x00000000, 0x00000007, 0x00000000, - 0x06008E00, + d_course_sherbet_land_dl_8E00, 0x00000000, 0x00000000, 0x00000000, diff --git a/include/course_offsets.h b/include/course_offsets.h index 7f869d922..b84888a63 100644 --- a/include/course_offsets.h +++ b/include/course_offsets.h @@ -15,7 +15,7 @@ typedef struct u32 padding; // always zero } course_texture; -extern u32 d_course_sherbet_land_unk_data1[]; +extern uintptr_t d_course_sherbet_land_unk_data1[]; extern s16 d_course_sherbet_land_unk_data2[]; extern animation_type_3_triplet d_course_sherbet_land_unk_data3[]; extern animation_type_2 d_course_sherbet_land_unk_data4; @@ -52,7 +52,7 @@ extern animation_type_2 *d_course_yoshi_valley_unk4[]; extern uintptr_t d_course_yoshi_valley_unk5[]; extern u32 d_course_yoshi_valley_unk6[]; -extern u32 d_course_sherbet_land_unk_data1[]; +extern uintptr_t d_course_sherbet_land_unk_data1[]; extern s16 d_course_sherbet_land_unk_data2[]; extern animation_type_3_triplet d_course_sherbet_land_unk_data3[]; extern animation_type_2 d_course_sherbet_land_unk_data4; diff --git a/src/code_80004740.c b/src/code_80004740.c index 094305e83..b08164f6c 100644 --- a/src/code_80004740.c +++ b/src/code_80004740.c @@ -146,7 +146,7 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 timeCycle temp_v0++; break; } - arg0 = (animation_type_1 *) ((u32 *) arg0 + arg0->size); + arg0 = (animation_type_1 *) ((uintptr_t *) arg0 + arg0->size); } while (new_var != 3); } diff --git a/src/code_80004740.h b/src/code_80004740.h index efafdd122..68d911ba6 100644 --- a/src/code_80004740.h +++ b/src/code_80004740.h @@ -159,11 +159,11 @@ D_80162D70 is a Vec3s that is used to set values in the some Vec3f that goes on */ typedef struct { - /* 0x00 */ s32 type; - /* 0x04 */ s32 size; - /* 0x08 */ s32 always_zero_never_used; + /* 0x00 */ s64 type; + /* 0x04 */ s64 size; + /* 0x08 */ s64 always_zero_never_used; /* 0x0C */ Gfx *optional_segmented_dl_address; - /* 0x10 */ s32 thing[3]; + /* 0x10 */ s64 thing[3]; } animation_type_1; typedef struct { diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 036689bf3..cb8649fc2 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -740,10 +740,10 @@ void render_object_for_player(s32 cameraId) { if (gGamestate != CREDITS_SEQUENCE) { if ((gPlayerCount == 1) || (gPlayerCount == 2)) { - //render_object_seagulls(cameraId); + render_object_seagulls(cameraId); } } else { - //render_object_seagulls(cameraId); + render_object_seagulls(cameraId); } break; case COURSE_ROYAL_RACEWAY: @@ -1637,12 +1637,12 @@ void update_object(void) { if (gGamestate != CREDITS_SEQUENCE) { func_800842C8(); } - //update_penguins(); + update_penguins(); break; case COURSE_RAINBOW_ROAD: if (gGamestate != CREDITS_SEQUENCE) { update_neon(); - //update_chain_chomps(); + update_chain_chomps(); } break; case COURSE_DK_JUNGLE: diff --git a/src/racing/memory.c b/src/racing/memory.c index 4c7f8a64e..a537b316b 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -102,6 +102,7 @@ void *get_segment_base_addr(s32 segment) { * @brief converts an RSP segment + offset address to a normal memory address */ void *segmented_to_virtual(const void *addr) { + return addr; size_t segment = (uintptr_t) addr >> 24; size_t offset = (uintptr_t) addr & 0x00FFFFFF; diff --git a/src/update_objects.c b/src/update_objects.c index 27e9083b6..03d085329 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -6818,16 +6818,16 @@ void update_crabs(void) { // Stack issue caused by the `test` variable, but removing it causes much, much larger differences //! @todo Fix flag animations void func_80082F1C(s32 objectIndex, s32 arg1) { - // YVFlagPoleSpawn *test; - // gObjectList[objectIndex].model = (Gfx *) d_course_yoshi_valley_unk5; - // gObjectList[objectIndex].vertex = (Vtx *) d_course_yoshi_valley_unk4; - // gObjectList[objectIndex].sizeScaling = 0.027f; - // //if (test->rot && test->rot) {} - // test = &D_800E5DF4[arg1]; - // func_80072488(objectIndex); - // set_obj_origin_pos(objectIndex, test->pos[0] * xOrientation, test->pos[1], test->pos[2]); - // set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); - // set_obj_direction_angle(objectIndex, 0U, test->rot, 0U); + YVFlagPoleSpawn *test; + gObjectList[objectIndex].model = (Gfx *) d_course_yoshi_valley_unk5; + gObjectList[objectIndex].vertex = (Vtx *) d_course_yoshi_valley_unk4; + gObjectList[objectIndex].sizeScaling = 0.027f; + //if (test->rot && test->rot) {} + test = &D_800E5DF4[arg1]; + func_80072488(objectIndex); + set_obj_origin_pos(objectIndex, test->pos[0] * xOrientation, test->pos[1], test->pos[2]); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_direction_angle(objectIndex, 0U, test->rot, 0U); } #else GLOBAL_ASM("asm/non_matchings/update_objects/func_80082F1C.s") diff --git a/yamls/us/sherbet_land_data.yml b/yamls/us/sherbet_land_data.yml index 0312e8149..5a68b8769 100644 --- a/yamls/us/sherbet_land_data.yml +++ b/yamls/us/sherbet_land_data.yml @@ -730,6 +730,10 @@ d_course_sherbet_land_penguin_unknown_model: type: vtx offset: 0x8768 count: 10 +d_course_sherbet_land_dl_8808: + symbol: d_course_sherbet_land_dl_8808 + type: gfx + offset: 0x8808 d_course_sherbet_land_dl_8810: symbol: d_course_sherbet_land_dl_8810 type: gfx |
