diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-08-15 22:20:08 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-15 22:20:08 -0600 |
| commit | bd6e3d18e0b26f708defd1833bc063001703bba3 (patch) | |
| tree | a9e39dfa6104bac0d5f06ceb32cb38ef70abbf50 /src/update_objects.c | |
| parent | a4f53b018b00e598c44baebb1b63b543740f9217 (diff) | |
Courses (#54)
* valley
* beach
* sherbet & rainbow
* fix ceremony
* Fix parser for course displaylists
* Fix crash near end of ceremony
* Clean rock
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/update_objects.c')
| -rw-r--r-- | src/update_objects.c | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/src/update_objects.c b/src/update_objects.c index 7cad4739a..27e9083b6 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -35,10 +35,8 @@ #include <assets/other_textures.h> #include "data/some_data.h" #include "memory.h" -#include <assets/luigi_raceway_data.h> -#include <assets/moo_moo_farm_data.h> -#include <assets/bowsers_castle_data.h> -#include <assets/frappe_snowland_data.h> +#include "courses/all_course_offsets.h" +#include "courses/all_course_data.h" #include <assets/boo_frames.h> //! @todo unused? @@ -6720,7 +6718,7 @@ void update_seagulls(void) { void init_ktb_crab(s32 objectIndex) { Object *object; - init_texture_object(objectIndex, d_course_koopa_troopa_beach_crab_tlut, (u8*) d_course_koopa_troopa_beach_crab_frames, 0x40U, (u16) 0x00000040); + init_texture_object(objectIndex, d_course_koopa_troopa_beach_crab_tlut, d_course_koopa_troopa_beach_crab_frames, 0x40U, (u16) 0x00000040); object = &gObjectList[objectIndex]; object->sizeScaling = 0.15f; object->itemDisplay = 0; @@ -6818,17 +6816,18 @@ void update_crabs(void) { #ifdef NON_MATCHING // https://decomp.me/scratch/PYAg4 // 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") @@ -6862,11 +6861,15 @@ void func_80083080(void) { } } +const char *sHedgehogTexList[] = { + d_course_yoshi_valley_hedgehog +}; + void func_8008311C(s32 objectIndex, s32 arg1) { Object *object; Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); - init_texture_object(objectIndex, d_course_yoshi_valley_hedgehog_tlut, d_course_yoshi_valley_hedgehog, 0x40U, (u16) 0x00000040); + init_texture_object(objectIndex, d_course_yoshi_valley_hedgehog_tlut, sHedgehogTexList, 0x40U, (u16) 0x00000040); object = &gObjectList[objectIndex]; object->activeTLUT = d_course_yoshi_valley_hedgehog_tlut; object->activeTexture = d_course_yoshi_valley_hedgehog; @@ -7774,9 +7777,13 @@ void func_80085BB4(s32 objectIndex) { func_80072488(objectIndex); } +const char *sNeonMushroomList[] = { + d_course_rainbow_road_neon_mushroom +}; + void init_obj_neon_mushroom(s32 objectIndex) { set_obj_origin_pos(objectIndex, xOrientation * -1431.0, 827.0f, -2957.0f); - init_texture_object(objectIndex, (u8*) d_course_rainbow_road_neon_mushroom_tlut_list, d_course_rainbow_road_neon_mushroom, 0x40U, (u16) 0x00000040); + init_texture_object(objectIndex, load_lakitu_tlut_x64(d_course_rainbow_road_neon_mushroom_tlut_list, ARRAY_COUNT(d_course_rainbow_road_neon_mushroom_tlut_list)), d_course_rainbow_road_neon_mushroom, 0x40U, (u16) 0x00000040); func_80085BB4(objectIndex); } @@ -7812,9 +7819,13 @@ void func_80085CA0(s32 objectIndex) { } } +const char* sNeonList[] = { + d_course_rainbow_road_neon_mario +}; + void func_80085DB8(s32 objectIndex) { set_obj_origin_pos(objectIndex, xOrientation * 799.0, 1193.0f, -5891.0f); - init_texture_object(objectIndex, (u8*) d_course_rainbow_road_neon_mario_tlut_list, d_course_rainbow_road_neon_mario, 0x40U, (u16) 0x00000040); + init_texture_object(objectIndex, load_lakitu_tlut_x64(d_course_rainbow_road_neon_mario_tlut_list, ARRAY_COUNT(d_course_rainbow_road_neon_mario_tlut_list)), d_course_rainbow_road_neon_mario, 0x40U, (u16) 0x00000040); func_80085BB4(objectIndex); } @@ -7841,9 +7852,13 @@ void func_80085E38(s32 objectIndex) { } } +const char *sNeonBooList[] = { + d_course_rainbow_road_neon_boo +}; + void func_80085EF8(s32 objectIndex) { set_obj_origin_pos(objectIndex, xOrientation * -2013.0, 555.0f, 0.0f); - init_texture_object(objectIndex, (u8*) d_course_rainbow_road_neon_boo_tlut_list, d_course_rainbow_road_neon_boo, 0x40U, (u16) 0x00000040); + init_texture_object(objectIndex, load_lakitu_tlut_x64(d_course_rainbow_road_neon_boo_tlut_list, ARRAY_COUNT(d_course_rainbow_road_neon_boo_tlut_list)), d_course_rainbow_road_neon_boo, 0x40U, (u16) 0x00000040); func_80085BB4(objectIndex); } |
