diff options
Diffstat (limited to 'src/overlays')
3 files changed, 152 insertions, 53 deletions
diff --git a/src/overlays/actors/ovl_My_Room/ac_my_room.h b/src/overlays/actors/ovl_My_Room/ac_my_room.h index e9f0f87..0ff697b 100644 --- a/src/overlays/actors/ovl_My_Room/ac_my_room.h +++ b/src/overlays/actors/ovl_My_Room/ac_my_room.h @@ -5,8 +5,10 @@ #include "m_actor.h" #include "unk.h" #include "c_keyframe.h" +#include "libc/stdint.h" struct Game_Play; +struct Game; struct My_Room; struct Actor; @@ -23,7 +25,7 @@ typedef struct FurnitureActor { /* 0x134 */ SkeletonInfoR skeletonInfo; /* 0x1A4 */ s_xyz jointTable[9]; /* 0x1DA */ s_xyz morphTable[9]; - /* 0x210 */ Mtx matrix[2][10]; // not sure if the array dimensions are correct + /* 0x210 */ Mtx matrix[2][10]; } FurnitureActor; // size >= 0xA10 typedef void (*FurnitureCreate)(FurnitureActor* this, u8* data); @@ -40,24 +42,28 @@ typedef struct FurnitureActorFunctions { /* 0x10 */ FurnitureDma furnitureDma; } FurnitureActorFunctions; // size = 0x14 -typedef struct FurnitureActorUnkStruct { - /* 0x00 */ UNK_TYPE4 unk00; - /* 0x04 */ UNK_TYPE4 unk04; - /* 0x08 */ UNK_TYPE4 unk08; - /* 0x0C */ UNK_TYPE4 unk0C; - /* 0x10 */ UNK_TYPE4 unk10; - /* 0x14 */ UNK_TYPE4 unk14; - /* 0x18 */ UNK_TYPE4 unk18; - /* 0x1C */ UNK_TYPE4 unk1C; - /* 0x20 */ UNK_TYPE4 unk20; - /* 0x24 */ UNK_TYPE4 unk24; - /* 0x28 */ UNK_TYPE4 unk28; - /* 0x2C */ UNK_TYPE4 unk2C; - /* 0x30 */ UNK_TYPE4 unk30; - /* 0x34 */ UNK_TYPE4 unk34; - /* 0x38 */ UNK_TYPE4 unk38; - /* 0x3C */ UNK_TYPE4 unk3C; +typedef struct FurnitureActorProfile { + /* 0x00 */ uintptr_t objectRomStart; + /* 0x04 */ uintptr_t objectRomEnd; + /* 0x08 */ void* objectSegmentStart; + /* 0x0C */ void* objectSegmentEnd; + /* 0x10 */ UNK_PTR unk10; // opaque0 + /* 0x14 */ UNK_PTR unk14; // opaque1 + /* 0x18 */ UNK_PTR unk18; // translucent0 + /* 0x1C */ UNK_PTR unk1C; // translucent1 + /* 0x20 */ UNK_PTR unk20; // texture + /* 0x24 */ UNK_PTR unk24; // palette + /* 0x28 */ UNK_PTR unk28; // rig + /* 0x2C */ UNK_PTR unk2C; // tex_anim + /* 0x30 */ f32 height; + /* 0x34 */ f32 scale; + /* 0x38 */ UNK_TYPE1 unk38; // shape + /* 0x39 */ UNK_TYPE1 unk39; // move_bg_type + /* 0x3A */ UNK_TYPE1 unk3A; // check_rotation + /* 0x3B */ UNK_TYPE1 unk3B; // kankyo_map + /* 0x3C */ UNK_TYPE1 unk3C; // contact_action + /* 0x3E */ UNK_TYPE2 unk3E; // interaction_type /* 0x40 */ FurnitureActorFunctions* furnitureActorFunctions; -} FurnitureActorUnkStruct; // size = 0x44 +} FurnitureActorProfile; // size = 0x44 #endif diff --git a/src/overlays/furniture/ovl_sum_clchest03/ac_sum_clchest03.c b/src/overlays/furniture/ovl_sum_clchest03/ac_sum_clchest03.c new file mode 100644 index 0000000..92b7ee2 --- /dev/null +++ b/src/overlays/furniture/ovl_sum_clchest03/ac_sum_clchest03.c @@ -0,0 +1,93 @@ +#include "m_lib.h" +#include "c_keyframe.h" +#include "src/overlays/actors/ovl_My_Room/ac_my_room.h" +#include "segment_symbols.h" +#include "objects/furniture/int_sum_clchest03/int_sum_clchest03.h" + +void aSumClChest03_ct(FurnitureActor* this, u8* data UNUSED); +void aSumClChest03_mv(FurnitureActor* this, Actor* myroomactor, Game_Play* game_play, u8* data UNUSED); +void aSumClChest03_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Play* game_play, u8* data UNUSED); +void aSumClChest03_dt(FurnitureActor* this UNUSED, u8* data UNUSED); + +FurnitureActorFunctions aSumClChest03_func = { + /* */ aSumClChest03_ct, + /* */ aSumClChest03_mv, + /* */ aSumClChest03_dw, + /* */ aSumClChest03_dt, + /* */ NULL, +}; + +FurnitureActorProfile iam_sum_clchest03 = { + /* */ SEGMENT_ROM_START(int_sum_clchest03), + /* */ SEGMENT_ROM_END(int_sum_clchest03), + /* */ SEGMENT_VRAM_START(int_sum_clchest03), + /* */ SEGMENT_VRAM_END(int_sum_clchest03), + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ 18.0f, + /* */ 0.01f, + /* */ 4, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 4, + /* */ &aSumClChest03_func, +}; + +void aSumClChest03_ct(FurnitureActor* this, u8* data UNUSED) { + UNUSED s32 pad[2]; + SkeletonInfoR* skeletonInfo = &this->skeletonInfo; + + cKF_SkeletonInfo_R_ct(skeletonInfo, Lib_SegmentedToVirtual(&cKF_bs_r_int_sum_clchest03), + Lib_SegmentedToVirtual(&cKF_ba_r_int_sum_clchest03), this->jointTable, this->morphTable); + cKF_SkeletonInfo_R_init_standard_stop(skeletonInfo, Lib_SegmentedToVirtual(&cKF_ba_r_int_sum_clchest03), NULL); + skeletonInfo->frameControl.speed = 0.0f; + cKF_SkeletonInfo_R_play(skeletonInfo); +} + +void aSumClChest03_mv(FurnitureActor* this, Actor* myroomactor, Game_Play* game_play, u8* data UNUSED) { + if (common_data.clip.myRoomClip != NULL) { + common_data.clip.myRoomClip->unk_34(this, myroomactor, game_play, 1.0f, 16.0f); + } +} + +void aSumClChest03_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Play* game_play, u8* data UNUSED) { + UNUSED s32 pad; + s32 temp = game_play->state.frameCounter & 1; + Mtx* mtx = &this->matrix[temp][0]; + + OPEN_DISPS(game_play->state.gfxCtx); + if (1) {} + if (1) {} + gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(game_play->state.gfxCtx), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_16b, 1, &int_sum_clchest03_hiki_txt); + gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_MIRROR | G_TX_WRAP, 7, + G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD); + gDPLoadSync(POLY_OPA_DISP++); + gDPLoadBlock(POLY_OPA_DISP++, G_TX_LOADTILE, 0, 0, 0x7FF, 0); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_8b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_MIRROR | G_TX_WRAP, 7, + G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD); + gDPSetTileSize(POLY_OPA_DISP++, G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC); + gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, &int_sum_clchest03_pal01_pal); + gDPTileSync(POLY_OPA_DISP++); + gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x01F0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(POLY_OPA_DISP++); + gDPLoadTLUTCmd(POLY_OPA_DISP++, G_TX_LOADTILE, 15); + gDPPipeSync(POLY_OPA_DISP++); + CLOSE_DISPS(game_play->state.gfxCtx); + + cKF_Si3_draw_R_SV(game_play, &this->skeletonInfo, mtx, NULL, NULL, NULL); +} + +void aSumClChest03_dt(FurnitureActor* this UNUSED, u8* data UNUSED) { +} diff --git a/src/overlays/furniture/ovl_sum_hal_chest02/ac_sum_hal_chest02.c b/src/overlays/furniture/ovl_sum_hal_chest02/ac_sum_hal_chest02.c index 3fc94f3..f1c2210 100644 --- a/src/overlays/furniture/ovl_sum_hal_chest02/ac_sum_hal_chest02.c +++ b/src/overlays/furniture/ovl_sum_hal_chest02/ac_sum_hal_chest02.c @@ -1,43 +1,46 @@ #include "m_lib.h" #include "c_keyframe.h" #include "src/overlays/actors/ovl_My_Room/ac_my_room.h" +#include "segment_symbols.h" +#include "objects/furniture/int_sum_hal_chest02/int_sum_hal_chest02.h" void aSumHalChest02_ct(FurnitureActor* this, u8* data); void aSumHalChest02_mv(FurnitureActor* this, Actor* myRoomActor, Game_Play* game_play, u8* data); -void aSumHalChest03_dw(FurnitureActor* this, Actor* myRoomActor, Game_Play* game_play, u8* data); -void aSumHalChest03_dt(FurnitureActor* this, u8* data); +void aSumHalChest02_dw(FurnitureActor* this, Actor* myRoomActor, Game_Play* game_play, u8* data); +void aSumHalChest02_dt(FurnitureActor* this, u8* data); FurnitureActorFunctions aSumHalChest02_func = { /* */ aSumHalChest02_ct, /* */ aSumHalChest02_mv, - /* */ aSumHalChest03_dw, - /* */ aSumHalChest03_dt, + /* */ aSumHalChest02_dw, + /* */ aSumHalChest02_dt, /* */ NULL, }; -FurnitureActorUnkStruct iam_sum_hal_chest02 = { - /* */ 0x015C8000, - /* */ 0x015C9020, - /* */ 0x06000000, - /* */ 0x06001020, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x00000000, - /* */ 0x42200000, - /* */ 0x3C23D70A, - /* */ 0x04000000, - /* */ 0x00000004, +FurnitureActorProfile iam_sum_hal_chest02 = { + /* */ SEGMENT_ROM_START(int_sum_hal_chest02), + /* */ SEGMENT_ROM_END(int_sum_hal_chest02), + /* */ SEGMENT_VRAM_START(int_sum_hal_chest02), + /* */ SEGMENT_VRAM_END(int_sum_hal_chest02), + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ NULL, + /* */ 40.0f, + /* */ 0.01f, + /* */ 4, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 4, /* */ &aSumHalChest02_func, }; -extern BaseSkeletonR cKF_bs_r_int_sum_hal_chest02; -extern BaseAnimationR cKF_ba_r_int_sum_hal_chest02; - void aSumHalChest02_ct(FurnitureActor* this, u8* data UNUSED) { UNUSED s32 pad[2]; SkeletonInfoR* skeletonInfo = &this->skeletonInfo; @@ -50,15 +53,12 @@ void aSumHalChest02_ct(FurnitureActor* this, u8* data UNUSED) { } void aSumHalChest02_mv(FurnitureActor* this, Actor* myRoomActor, Game_Play* game_play, u8* data UNUSED) { - if (common_data.clip.unk_080 != NULL) { - common_data.clip.unk_080->unk_34(this, myRoomActor, game_play, 1.0f, 16.0f); + if (common_data.clip.myRoomClip != NULL) { + common_data.clip.myRoomClip->unk_34(this, myRoomActor, game_play, 1.0f, 16.0f); } } -extern UNK_PTR D_6000020; -extern UNK_PTR D_6000000; - -void aSumHalChest03_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Play* game_play, u8* data UNUSED) { +void aSumHalChest02_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Play* game_play, u8* data UNUSED) { UNUSED s32 pad; s32 temp = game_play->state.frameCounter & 1; Mtx* mtx = &this->matrix[temp][0]; @@ -68,16 +68,16 @@ void aSumHalChest03_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Pla if (1) {} gSPMatrix(POLY_OPA_DISP++, _Matrix_to_Mtx_new(game_play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_16b, 1, &D_6000020); + gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_16b, 1, &int_sum_hal_chest02_hiki_tex_txt); gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD); gDPLoadSync(POLY_OPA_DISP++); - gDPLoadBlock(POLY_OPA_DISP++, G_TX_LOADTILE, 0, 0, 2047, 0); + gDPLoadBlock(POLY_OPA_DISP++, G_TX_LOADTILE, 0, 0, 0x7FF, 0); gDPPipeSync(POLY_OPA_DISP++); gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_I, G_IM_SIZ_8b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, 7, G_TX_NOLOD); gDPSetTileSize(POLY_OPA_DISP++, G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC); - gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, &D_6000000); + gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, &int_sum_hal_chest02_pal); gDPTileSync(POLY_OPA_DISP++); gDPSetTile(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x01F0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -89,5 +89,5 @@ void aSumHalChest03_dw(FurnitureActor* this, Actor* myRoomActor UNUSED, Game_Pla cKF_Si3_draw_R_SV(game_play, &this->skeletonInfo, mtx, NULL, NULL, NULL); } -void aSumHalChest03_dt(FurnitureActor* this UNUSED, u8* data UNUSED) { +void aSumHalChest02_dt(FurnitureActor* this UNUSED, u8* data UNUSED) { } |
