mirror of
https://github.com/zeldaret/af.git
synced 2026-09-29 07:00:42 -04:00
@@ -19994,18 +19994,16 @@ jtbl_80A8ECE0_jp = 0x80A8ECE0; // type:jtbl
|
||||
// .text
|
||||
|
||||
aTAM_actor_ct = 0x80A8EEF0; // type:func
|
||||
func_80A8EF30_jp = 0x80A8EF30; // type:func
|
||||
func_80A8EFBC_jp = 0x80A8EFBC; // type:func
|
||||
func_80A8EFCC_jp = 0x80A8EFCC; // type:func
|
||||
func_80A8EFEC_jp = 0x80A8EFEC; // type:func
|
||||
aTAM_actor_dt = 0x80A8EF30; // type:func
|
||||
aTAM_wait = 0x80A8EFBC; // type:func
|
||||
aTAM_setup_action = 0x80A8EFCC; // type:func
|
||||
aTAM_actor_move = 0x80A8EFEC; // type:func
|
||||
aTAM_actor_init = 0x80A8F0D4; // type:func
|
||||
aTAM_actor_draw = 0x80A8F13C; // type:func
|
||||
|
||||
// .data
|
||||
|
||||
Tama_Profile = 0x80A8F270; //
|
||||
D_80A8F294_jp = 0x80A8F294; //
|
||||
D_80A8F298_jp = 0x80A8F298; //
|
||||
|
||||
// .text
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void aKAG_actor_ct(Actor* thisx, UNUSED Game_Play* game_play) {
|
||||
this->type = this->actor.fgName - 0x5835;
|
||||
this->structureType = this->type + 0x23;
|
||||
this->structurePalette = this->type + 0x4C;
|
||||
aKAG_setup_action(this, 0);
|
||||
aKAG_setup_action(this, KAG_PROCESS_WAIT);
|
||||
aKAG_set_bgOffset(this, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
struct Game_Play;
|
||||
struct Kago;
|
||||
|
||||
typedef enum KagoProcess {
|
||||
KAG_PROCESS_WAIT,
|
||||
} KagoProcess;
|
||||
|
||||
typedef void (*KagoActionFunc)(struct Kago*, struct Game_Play*);
|
||||
|
||||
typedef struct Kago {
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
#include "ac_tama.h"
|
||||
#include "m_actor_dlftbls.h"
|
||||
#include "m_object.h"
|
||||
#include "m_actor_shadow.h"
|
||||
#include "overlays/gamestates/ovl_play/m_play.h"
|
||||
#include "overlays/actors/player_actor/m_player.h"
|
||||
#include "m_player_lib.h"
|
||||
#include "libc/math.h"
|
||||
#include "69E2C0.h"
|
||||
#include "m_field_info.h"
|
||||
#include "code_variables.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
#include "objects/object_00D5E000/obj_e_kago_r/obj_e_kago_r.h"
|
||||
#include "objects/object_00D5E000/obj_e_kago_w/obj_e_kago_w.h"
|
||||
|
||||
#define THIS ((Tama*)thisx)
|
||||
|
||||
void aTAM_actor_ct(Actor* thisx, Game_Play* game_play);
|
||||
void func_80A8EF30_jp(Actor* thisx, Game_Play* game_play);
|
||||
void aTAM_actor_dt(Actor* thisx, Game_Play* game_play);
|
||||
void aTAM_actor_init(Actor* thisx, Game_Play* game_play);
|
||||
void aTAM_actor_draw(Actor* thisx, Game_Play* game_play);
|
||||
|
||||
#if 0
|
||||
ActorProfile Tama_Profile = {
|
||||
/* */ ACTOR_TAMA,
|
||||
/* */ ACTOR_PART_0,
|
||||
@@ -17,23 +29,102 @@ ActorProfile Tama_Profile = {
|
||||
/* */ GAMEPLAY_KEEP,
|
||||
/* */ sizeof(Tama),
|
||||
/* */ aTAM_actor_ct,
|
||||
/* */ func_80A8EF30_jp,
|
||||
/* */ aTAM_actor_dt,
|
||||
/* */ aTAM_actor_init,
|
||||
/* */ aTAM_actor_draw,
|
||||
/* */ NULL,
|
||||
};
|
||||
#endif
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/aTAM_actor_ct.s")
|
||||
void aTAM_setup_action(Tama*, s32);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/func_80A8EF30_jp.s")
|
||||
void aTAM_actor_ct(Actor* thisx, UNUSED Game_Play* game_play) {
|
||||
Tama* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/func_80A8EFBC_jp.s")
|
||||
this->type = this->actor.fgName - 0x5833;
|
||||
this->structureType = this->type + 0x23;
|
||||
this->structurePalette = this->type + 0x4C;
|
||||
aTAM_setup_action(this, TAM_PROCESS_WAIT);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/func_80A8EFCC_jp.s")
|
||||
void aTAM_actor_dt(Actor* thisx, UNUSED Game_Play* game_play) {
|
||||
Tama* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/func_80A8EFEC_jp.s")
|
||||
common_data.clip.unk_08C->unk_A8(&common_data.clip.unk_08C->unk_B0, 8, this->structureType, &this->actor);
|
||||
common_data.clip.unk_08C->unk_A8(&common_data.clip.unk_08C->unk_454, 9, this->structurePalette, &this->actor);
|
||||
common_data.clip.unk_08C->unk_A8(&common_data.clip.unk_08C->unk_86C, 8, this->structureType, &this->actor);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/aTAM_actor_init.s")
|
||||
void aTAM_wait(UNUSED Tama* this, UNUSED Game_Play* game_play) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Tama/ac_tama/aTAM_actor_draw.s")
|
||||
void aTAM_setup_action(Tama* this, s32 processIndex) {
|
||||
static TamaActionFunc process[] = { aTAM_wait };
|
||||
this->process = process[processIndex];
|
||||
this->processNum = processIndex;
|
||||
}
|
||||
|
||||
void aTAM_actor_move(Actor* thisx, Game_Play* game_play) {
|
||||
UNUSED UNK_TYPE1 pad[0x4];
|
||||
Tama* this = THIS;
|
||||
Player* player = get_player_actor_withoutCheck(game_play);
|
||||
s32 xBlock;
|
||||
s32 yBlock;
|
||||
s32 playerXBlock;
|
||||
s32 playerYBlock;
|
||||
|
||||
mFI_Wpos2BlockNum(&xBlock, &yBlock, this->actor.world.pos);
|
||||
mFI_Wpos2BlockNum(&playerXBlock, &playerYBlock, player->actor.world.pos);
|
||||
if ((mDemo_Check(1, &player->actor) == 0) && (mDemo_Check(5, &player->actor) == 0) &&
|
||||
((xBlock != playerXBlock) || (yBlock != playerYBlock))) {
|
||||
Actor_delete(&this->actor);
|
||||
} else {
|
||||
this->process(this, game_play);
|
||||
}
|
||||
}
|
||||
|
||||
void aTAM_actor_init(Actor* thisx, Game_Play* game_play) {
|
||||
Tama* this = THIS;
|
||||
|
||||
mFI_SetFG_common(0xF0FC, this->actor.home.pos, 0);
|
||||
aTAM_actor_move(&this->actor, game_play);
|
||||
this->actor.update = aTAM_actor_move;
|
||||
}
|
||||
|
||||
#define OPEN_CUSTOM_POLY_OPA() \
|
||||
{ \
|
||||
Gfx* __polyOpa = __gfxCtx->polyOpa.p; \
|
||||
int __opa_opened = 0; \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
#define CLOSE_CUSTOM_POLY_OPA() \
|
||||
__gfxCtx->polyOpa.p = __polyOpa; \
|
||||
(void)__opa_opened; \
|
||||
} \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
void aTAM_actor_draw(Actor* thisx, Game_Play* game_play) {
|
||||
static Gfx* model[2] = { kago_r_ball_DL_model, kago_w_ball_DL_model };
|
||||
GraphicsContext* gfxCtx = game_play->state.gfxCtx;
|
||||
Tama* this = THIS;
|
||||
u32 object = common_data.clip.unk_08C->unk_AC(this->structureType);
|
||||
u16* palette = common_data.clip.unk_08C->unk_450(this->structurePalette);
|
||||
Mtx* mtx;
|
||||
|
||||
_texture_z_light_fog_prim(gfxCtx);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
OPEN_CUSTOM_POLY_OPA();
|
||||
gSPSegment(__polyOpa++, 0x08, palette);
|
||||
gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object);
|
||||
gSPSegment(__polyOpa++, 0x06, object);
|
||||
Matrix_translate(0.0f, 0.0f, 4000.0f, 1);
|
||||
mtx = _Matrix_to_Mtx_new(gfxCtx);
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(__polyOpa++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(__polyOpa++, model[this->type]);
|
||||
CLOSE_CUSTOM_POLY_OPA();
|
||||
}
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
@@ -4,15 +4,28 @@
|
||||
#include "ultra64.h"
|
||||
#include "m_actor.h"
|
||||
#include "unk.h"
|
||||
#include "c_keyframe.h"
|
||||
|
||||
struct Game_Play;
|
||||
struct Tama;
|
||||
|
||||
typedef enum TamaProcess {
|
||||
TAM_PROCESS_WAIT,
|
||||
} TamaProcess;
|
||||
|
||||
typedef void (*TamaActionFunc)(struct Tama*, struct Game_Play*);
|
||||
|
||||
typedef struct Tama {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x174 */ UNK_TYPE1 unk_174[0x164];
|
||||
/* 0x174 */ UNK_TYPE1 unk_174[0x12C];
|
||||
/* 0x2A0 */ TamaActionFunc process;
|
||||
/* 0x2A4 */ UNK_TYPE1 unk_2A4[0x4];
|
||||
/* 0x2A8 */ s32 structureType;
|
||||
/* 0x2AC */ s32 structurePalette;
|
||||
/* 0x2B0 */ UNK_TYPE1 unk_2B0[0x4];
|
||||
/* 0x2B4 */ s32 type;
|
||||
/* 0x2B8 */ s32 processNum;
|
||||
/* 0x2BC */ UNK_TYPE1 unk_2BC[0x1C];
|
||||
} Tama; // size = 0x2D8
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F4F4 80A8F274 */ .word
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F4F8 80A8F278 */ .word 0x58330003
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F4FC 80A8F27C */ .word 0x000002D8
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F500 80A8F280 */ .word aTAM_actor_ct
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F504 80A8F284 */ .word func_80A8EF30_jp
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F504 80A8F284 */ .word aTAM_actor_dt
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F508 80A8F288 */ .word aTAM_actor_init
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F50C 80A8F28C */ .word aTAM_actor_draw
|
||||
asm/jp/data/overlays/actors/ovl_Tama/ac_tama.data.s-/* 94F510 80A8F290 */ .word 0x00000000
|
||||
|
||||
@@ -14898,7 +14898,7 @@
|
||||
bss_size: 0x0
|
||||
subsegments:
|
||||
- [0x94F170, c, overlays/actors/ovl_Tama/ac_tama]
|
||||
- [0x94F4F0, data, overlays/actors/ovl_Tama/ac_tama]
|
||||
- [0x94F4F0, .data, overlays/actors/ovl_Tama/ac_tama]
|
||||
- name: ovl_Tama_reloc
|
||||
type: code
|
||||
start: 0x94F520
|
||||
|
||||
Reference in New Issue
Block a user