Docuement core2/anseq.c
This commit is contained in:
parent
819ba6b9ce
commit
a6af6eb323
|
@ -507,7 +507,7 @@ segments:
|
|||
- [0xF79CA0, c, anim/sprite]
|
||||
- [0xF7A2B0, c, animcache]
|
||||
- [0xF7A720, c, code_1550]
|
||||
- [0xF7AB00, c, code_1930]
|
||||
- [0xF7AB00, c, anseq]
|
||||
- [0xF7B410, c, code_2240]
|
||||
- [0xF7BA60, c, ba/anim]
|
||||
- [0xF7C650, c, snackerctl]
|
||||
|
@ -1123,7 +1123,7 @@ segments:
|
|||
# - [0x1042790, .data, code_DC4B0]
|
||||
- [0x1066790, .rodata, animctrl]
|
||||
- [0x10667C0, .rodata, anim/sprite]
|
||||
- [0x10667D0, .rodata, code_1930]
|
||||
- [0x10667D0, .rodata, anseq]
|
||||
- [0x10667F0, .rodata, ba/anim]
|
||||
- [0x1066860, .rodata, snackerctl]
|
||||
- [0x1066870, .rodata, code_39D0]
|
||||
|
@ -1376,7 +1376,7 @@ segments:
|
|||
- [0x0106C980, .bss, anim/sprite]
|
||||
- [0x0106C980, .bss, animcache]
|
||||
- [0x0106C980, .bss, code_1550]
|
||||
- [0x0106C980, .bss, code_1930]
|
||||
- [0x0106C980, .bss, anseq]
|
||||
- [0x0106C980, .bss, ba/anim]
|
||||
- [0x0106C980, .bss, snackerctl]
|
||||
- [0x0106C980, .bss, code_39D0]
|
||||
|
|
|
@ -508,7 +508,7 @@ segments:
|
|||
- [0xF56430, c, anim/sprite]
|
||||
- [0xF56A40, c, animcache]
|
||||
- [0xF56EB0, c, code_1550]
|
||||
- [0xF57290, c, code_1930]
|
||||
- [0xF57290, c, anseq]
|
||||
- [0xF57BA0, c, code_2240]
|
||||
- [0xF581F0, c, ba/anim]
|
||||
- [0xF58DE0, c, snackerctl]
|
||||
|
@ -1122,7 +1122,7 @@ segments:
|
|||
- [0x1042790, .data, code_DC4B0]
|
||||
- [0x10427C0, ".rodata", animctrl]
|
||||
- [0x10427F0, .rodata, anim/sprite]
|
||||
- [0x1042800, .rodata, code_1930]
|
||||
- [0x1042800, .rodata, anseq]
|
||||
- [0x1042880, .rodata, ba/anim]
|
||||
- [0x1042890, .rodata, snackerctl]
|
||||
- [0x10428A0, .rodata, code_39D0]
|
||||
|
@ -1374,7 +1374,7 @@ segments:
|
|||
- [0x1048560, .bss, anim/sprite]
|
||||
- [0x1048560, .bss, animcache]
|
||||
- [0x1048560, .bss, code_1550]
|
||||
- [0x1048560, .bss, code_1930]
|
||||
- [0x1048560, .bss, anseq]
|
||||
- [0x1048560, .bss, ba/anim]
|
||||
- [0x1048560, .bss, snackerctl]
|
||||
- [0x1048560, .bss, code_39D0]
|
||||
|
|
|
@ -255,7 +255,7 @@ typedef struct actor_s{
|
|||
f32 scale;
|
||||
/* 0x12C */ struct actor_info_s *actor_info;
|
||||
void (* unk130)(struct actor_s *);
|
||||
vector(struct2s) **unk134; //vector<struct2s> //saved marker->dieFunc
|
||||
vector(AnSeqElement) **unk134; //vector<AnSeqElement> //saved marker->dieFunc
|
||||
u32 unk138_31:1;
|
||||
u32 unk138_30:1;
|
||||
u32 unk138_29:1;
|
||||
|
|
|
@ -150,15 +150,14 @@ typedef struct struct_0_s{ //floor
|
|||
} struct0; //geo(used for floor)
|
||||
|
||||
typedef struct struct_2_s{
|
||||
f32 unk0;
|
||||
u8 unk4; //argument_count
|
||||
u8 unk5;
|
||||
u8 pad6[2];
|
||||
u32 unk8;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
void *unk14; //function_ptr
|
||||
} struct2s;
|
||||
f32 duration;
|
||||
u8 argCount;
|
||||
u8 activationFrameDelay;
|
||||
s32 arg0;
|
||||
s32 arg1;
|
||||
s32 arg2;
|
||||
void *funcPtr;
|
||||
} AnSeqElement;
|
||||
|
||||
typedef struct struct_3_s{
|
||||
u32 unk0;
|
||||
|
@ -563,7 +562,7 @@ typedef struct {
|
|||
typedef struct struct_63_s{
|
||||
s16 unk0;
|
||||
// u8 pad2[2];
|
||||
void (*unk4)(vector(struct2s) **, struct actorMarker_s *);
|
||||
void (*unk4)(vector(AnSeqElement) **, struct actorMarker_s *);
|
||||
} Struct63s;
|
||||
|
||||
typedef struct struct_64_s{
|
||||
|
|
|
@ -136,7 +136,7 @@ u8 D_8038C1D4[] = {0xA, 0x12, 0xF, 0x9, 0xE, 0xD, 0x9, 0x11, 0xB, 0xF, 0, 0};
|
|||
f32 D_8038C1E0[3] = {0.0f, 3250.0f, -3200.0f}; //jiggy spawn position
|
||||
|
||||
/* .bss */
|
||||
struct {
|
||||
static struct {
|
||||
s32 unk0;
|
||||
ActorMarker *motzhand_marker;
|
||||
Struct_MMM_3420_0 *unk8;
|
||||
|
@ -144,11 +144,11 @@ struct {
|
|||
u8 pattern;
|
||||
//u8 padE[2];
|
||||
u8 *unk10;
|
||||
}D_8038C4F0;
|
||||
}Me;
|
||||
|
||||
/* .code */
|
||||
void MMM_func_80389810(ActorMarker *caller, enum asset_e text_id, s32 arg2) {
|
||||
switch (D_8038C4F0.state) {
|
||||
switch (Me.state) {
|
||||
case 2:
|
||||
organMinigame_setState(3);
|
||||
return;
|
||||
|
@ -196,8 +196,8 @@ void organMinigame_setState(s32 next_state){
|
|||
func_8028F8F8(1, FALSE);
|
||||
|
||||
if (next_state == 2) {
|
||||
if (D_8038C4F0.pattern == 0) {
|
||||
D_8038C4F0.pattern = 1;
|
||||
if (Me.pattern == 0) {
|
||||
Me.pattern = 1;
|
||||
gcdialog_showText(ASSET_AD3_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
}
|
||||
else {//L80389A84
|
||||
|
@ -206,39 +206,39 @@ void organMinigame_setState(s32 next_state){
|
|||
}//L80389A9C
|
||||
|
||||
if(next_state == 3){
|
||||
D_8038C4F0.unk0 = 0;
|
||||
if(D_8038C4F0.pattern == 1){
|
||||
D_8038C4F0.unk10 = D_8038C1CC;
|
||||
Me.unk0 = 0;
|
||||
if(Me.pattern == 1){
|
||||
Me.unk10 = D_8038C1CC;
|
||||
}
|
||||
else{
|
||||
D_8038C4F0.unk10 = D_8038C1D4;
|
||||
Me.unk10 = D_8038C1D4;
|
||||
}
|
||||
func_8028F8F8(1, TRUE);
|
||||
func_803876C8(D_8038C4F0.motzhand_marker, D_8038C4F0.pattern);
|
||||
func_803876C8(Me.motzhand_marker, Me.pattern);
|
||||
}//L80389AF4
|
||||
|
||||
if(next_state == 4){
|
||||
gcdialog_showText(ASSET_ADD_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
func_80387720(D_8038C4F0.motzhand_marker);
|
||||
func_80387720(Me.motzhand_marker);
|
||||
}
|
||||
|
||||
if(next_state == 5){
|
||||
D_8038C4F0.pattern++;
|
||||
Me.pattern++;
|
||||
gcdialog_showText(ASSET_AD4_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
func_80387720(D_8038C4F0.motzhand_marker);
|
||||
func_80387720(Me.motzhand_marker);
|
||||
}
|
||||
|
||||
if(next_state == 6){
|
||||
MMM_func_803898C8();
|
||||
timedFunc_set_0(1.25f, func_803899BC);
|
||||
func_80387654(D_8038C4F0.motzhand_marker);
|
||||
func_80387654(Me.motzhand_marker);
|
||||
}
|
||||
|
||||
D_8038C4F0.state = next_state;
|
||||
Me.state = next_state;
|
||||
}
|
||||
|
||||
s32 func_80389BBC(void){
|
||||
return D_8038C4F0.unk8->unk4;
|
||||
return Me.unk8->unk4;
|
||||
}
|
||||
|
||||
//organCtrl_getKeyPosition
|
||||
|
@ -279,12 +279,12 @@ void MMM_func_80389CD8() {}
|
|||
void func_80389CE0() {}
|
||||
|
||||
int func_80389CE8(s32 arg0, s32 arg1, s32 arg2){
|
||||
if(D_8038C4F0.state == 3){
|
||||
if(*D_8038C4F0.unk10 == arg2){
|
||||
D_8038C4F0.unk0--;
|
||||
D_8038C4F0.unk10++;
|
||||
if(*D_8038C4F0.unk10 == 0){
|
||||
if(D_8038C4F0.pattern == 1){
|
||||
if(Me.state == 3){
|
||||
if(*Me.unk10 == arg2){
|
||||
Me.unk0--;
|
||||
Me.unk10++;
|
||||
if(*Me.unk10 == 0){
|
||||
if(Me.pattern == 1){
|
||||
organMinigame_setState(5);
|
||||
}
|
||||
else{
|
||||
|
@ -305,7 +305,7 @@ void func_80389D9C(s32 key_id){
|
|||
s32 sp24;
|
||||
sp24 = D_8038C198[key_id].unk1;
|
||||
MMM_func_8038B6D4(func_803517B8(sp24), func_803517E8(sp24));
|
||||
D_8038C4F0.unk0++;
|
||||
Me.unk0++;
|
||||
}
|
||||
|
||||
// organ game/higgy in church?
|
||||
|
@ -314,13 +314,13 @@ void code3420_handleOrganGame(s32 arg0, s32 arg1) {
|
|||
f32 key_position[3];
|
||||
bool is_black_key;
|
||||
|
||||
D_8038C4F0.unk8 = &D_8038BF20;
|
||||
Me.unk8 = &D_8038BF20;
|
||||
func_80250170(0, 0x6A, 0);
|
||||
D_8038C4F0.state = 0;
|
||||
Me.state = 0;
|
||||
|
||||
if ((map_get() == MAP_1C_MMM_CHURCH) && (arg1 == 2)) {
|
||||
D_8038C4F0.motzhand_marker = NULL;
|
||||
D_8038C4F0.pattern = 0;
|
||||
Me.motzhand_marker = NULL;
|
||||
Me.pattern = 0;
|
||||
|
||||
key_position[0] = -1345.0f;
|
||||
key_position[1] = 1150.0f;
|
||||
|
@ -355,7 +355,7 @@ void code3420_handleOrganGame(s32 arg0, s32 arg1) {
|
|||
}
|
||||
|
||||
|
||||
void organMinigame_update(void){
|
||||
void maOrgan_update(void){
|
||||
UNK_TYPE(u32) sp4C;
|
||||
f32 motzhand_dist;
|
||||
Actor *motzhand;
|
||||
|
@ -363,28 +363,28 @@ void organMinigame_update(void){
|
|||
f32 plyr_pos[3];
|
||||
Actor *motzhand_2;
|
||||
|
||||
if (D_8038C4F0.state == 0) {
|
||||
if (Me.state == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(func_802501A0(0, 0x6A, &sp4C)){
|
||||
func_80250170(0, 0x6A, 0);
|
||||
D_8038C4F0.unk8++;
|
||||
if(D_8038C4F0.unk8->unk4 == -1){
|
||||
D_8038C4F0.unk8 = &D_8038BF20[10];
|
||||
Me.unk8++;
|
||||
if(Me.unk8->unk4 == -1){
|
||||
Me.unk8 = &D_8038BF20[10];
|
||||
}
|
||||
}//L8038A02C
|
||||
|
||||
if(D_8038C4F0.state == 1 && D_8038C4F0.motzhand_marker == NULL){
|
||||
if(Me.state == 1 && Me.motzhand_marker == NULL){
|
||||
sp38[0] = sp38[1] = sp38[2] = 0.0f;
|
||||
motzhand = actorArray_findClosestActorFromActorId(sp38, ACTOR_3A_MOTZHAND, -1, &motzhand_dist);
|
||||
D_8038C4F0.motzhand_marker = motzhand->marker;
|
||||
Me.motzhand_marker = motzhand->marker;
|
||||
}//L8038A078
|
||||
|
||||
if(D_8038C4F0.state == 1 || D_8038C4F0.state == 3){
|
||||
if(func_8038769C(D_8038C4F0.motzhand_marker)){
|
||||
if(Me.state == 1 || Me.state == 3){
|
||||
if(func_8038769C(Me.motzhand_marker)){
|
||||
player_getPosition(plyr_pos);
|
||||
motzhand_2 = marker_getActor(D_8038C4F0.motzhand_marker);
|
||||
motzhand_2 = marker_getActor(Me.motzhand_marker);
|
||||
if( ml_vec3f_distance(motzhand_2->position, plyr_pos) < 400.0f
|
||||
&& motzhand_2->position_y - 50.0f <= plyr_pos[1]
|
||||
){
|
||||
|
@ -393,7 +393,7 @@ void organMinigame_update(void){
|
|||
}
|
||||
}//L8038A104
|
||||
|
||||
if(D_8038C4F0.state == 3 && D_8038C4F0.unk0 >= 3){
|
||||
if(Me.state == 3 && Me.unk0 >= 3){
|
||||
organMinigame_setState(4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80288F78(Actor*, f32, s32);
|
||||
extern void anSeq_func_80288F78(Actor*, f32, s32);
|
||||
|
||||
/* .code */
|
||||
void SM_func_803863F0(Actor *this, s32 arg1) {
|
||||
func_80288F78(this, 0.20f, 0xF280FA);
|
||||
anSeq_func_80288F78(this, 0.20f, 0xF280FA);
|
||||
}
|
||||
|
||||
void SM_func_80386420(Actor *arg0, s32 arg1) {
|
||||
func_80288F78(arg0, 0.20f, 0x3ED803E);
|
||||
func_80288F78(arg0, 0.35f, 0x3ED8C3E);
|
||||
func_80288F78(arg0, 0.71f, 0x21F336);
|
||||
func_80288F78(arg0, 0.79f, 0x21F336);
|
||||
func_80288F78(arg0, 0.80f, 0x3ED8C3E);
|
||||
func_80288F78(arg0, 0.87f, 0x21F336);
|
||||
anSeq_func_80288F78(arg0, 0.20f, 0x3ED803E);
|
||||
anSeq_func_80288F78(arg0, 0.35f, 0x3ED8C3E);
|
||||
anSeq_func_80288F78(arg0, 0.71f, 0x21F336);
|
||||
anSeq_func_80288F78(arg0, 0.79f, 0x21F336);
|
||||
anSeq_func_80288F78(arg0, 0.80f, 0x3ED8C3E);
|
||||
anSeq_func_80288F78(arg0, 0.87f, 0x21F336);
|
||||
}
|
||||
|
||||
/* .data */
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void rumbleManager_80250E6C(f32, f32);
|
||||
extern void func_802BB360(s32, f32);
|
||||
extern void func_802BB378(s32, f32, f32);
|
||||
extern void func_802BB3AC(s32, f32);
|
||||
extern void func_8031B908(s32, s32, s32, f32);
|
||||
|
||||
|
||||
/* .bss */
|
||||
s32 s_activationFrameDelay;
|
||||
|
||||
/* .code */
|
||||
void __anSeq_func_802888C0(s32 arg0, s32 arg1)
|
||||
{
|
||||
u8 sp1C[3];
|
||||
f32 f0;
|
||||
sp1C[0] = (arg0 >> 16) & 0xFF;
|
||||
sp1C[1] = (arg0 >> 8) & 0xFF;
|
||||
sp1C[2] = (arg0 >> 0) & 0xFF;
|
||||
f0 = reinterpret_cast(f32, arg1);
|
||||
func_8031B908(sp1C[0], sp1C[1], sp1C[2], f0);
|
||||
}
|
||||
|
||||
void __anSeq_func_80288914(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
f32 f2 = reinterpret_cast(f32, arg2);
|
||||
func_802BB378(arg0, f0, f2);
|
||||
}
|
||||
|
||||
void __anSeq_func_8028894C(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
f32 f2 = reinterpret_cast(f32, arg2);
|
||||
func_802BB3DC(arg0, f0, f2);
|
||||
}
|
||||
|
||||
void __anSeq_func_8028984(s32 arg0, s32 arg1){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
func_802BB360(arg0, f0);
|
||||
func_802BB3AC(arg0, 1.0f);
|
||||
func_802BB3C4(arg0);
|
||||
}
|
||||
|
||||
void __anSeq_func_80289C8(s32 arg0, s32 arg1){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
func_802BB3AC(arg0, f0);
|
||||
}
|
||||
|
||||
void __anSeq_func_80289F4(s32 arg0) {
|
||||
s32 sp18;
|
||||
s32 temp_t6;
|
||||
s32 phi_a3;
|
||||
|
||||
phi_a3 = arg0 >> 0x10;
|
||||
if( !(phi_a3 == 0xF2 && map_get() == MAP_91_FILE_SELECT && func_802C5A30() != 0)
|
||||
&& !((phi_a3 == 0x21 || phi_a3 == 0x3ED) && map_get() == MAP_91_FILE_SELECT && (func_802C5A30() == 1))
|
||||
){
|
||||
func_8030E6A4(phi_a3, (f32) ((f64) ((arg0 >> 8) & 0xFF) * 0.0078125), (s32) ((f64) (arg0 & 0xFF) * 128.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void __anSeq_func_8028AE0(s32 arg0){
|
||||
func_8025A6EC((u16) (arg0 >> 16), (u16)arg0 - 1);
|
||||
}
|
||||
|
||||
void __anSeq_func_8028B14(enum sfx_e arg0){
|
||||
func_8025A7DC(arg0);
|
||||
}
|
||||
|
||||
void __anSeq_func_80288B34(s32 arg0, s32 arg1){
|
||||
f32 f12 = reinterpret_cast(f32, arg0);
|
||||
f32 f14 = reinterpret_cast(f32, arg1);
|
||||
rumbleManager_80250E6C(f12, f14);
|
||||
}
|
||||
|
||||
void __anSeq_func_80288B60(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f12 = reinterpret_cast(f32, arg0);
|
||||
f32 f14 = reinterpret_cast(f32, arg1);
|
||||
f32 f0 = reinterpret_cast(f32, arg2);
|
||||
rumbleManager_80250D94(f12, f14, f0);
|
||||
}
|
||||
|
||||
void __anSeq_updateStep(vector(AnSeqElement) **ppAnSeq, AnSeqElement *pStep){
|
||||
if(pStep->activationFrameDelay){
|
||||
if(pStep->activationFrameDelay == 0xFF)
|
||||
return;
|
||||
|
||||
pStep->activationFrameDelay -= 1;
|
||||
if(pStep->activationFrameDelay)
|
||||
return;
|
||||
|
||||
pStep->activationFrameDelay = 0xFF;
|
||||
}
|
||||
|
||||
switch(pStep->argCount){
|
||||
case 0:// 80288BF8
|
||||
((void (*)(void)) pStep->funcPtr)();
|
||||
break;
|
||||
case 1:// 80288C0C
|
||||
((void (*)(s32)) pStep->funcPtr)(pStep->arg0);
|
||||
break;
|
||||
case 2:// 80288C24
|
||||
((void (*)(s32, s32)) pStep->funcPtr)(pStep->arg0, pStep->arg1);
|
||||
break;
|
||||
case 3:// 80288C40
|
||||
((void (*)(s32, s32, s32)) pStep->funcPtr)(pStep->arg0, pStep->arg1, pStep->arg2);
|
||||
break;
|
||||
case 4:// 80288C5C
|
||||
((void (*)(void*)) pStep->funcPtr)(&pStep->arg0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void anSeq_clear(vector(AnSeqElement) **ppAnSeq){
|
||||
vector_clear(*ppAnSeq);
|
||||
}
|
||||
|
||||
AnSeqElement * __anSeq_pushStep( vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg_cnt, void *funcPtr, s32 arg0, s32 arg1, s32 arg2){
|
||||
AnSeqElement *ptr = (AnSeqElement *) vector_pushBackNew(ppAnSeq);
|
||||
ptr->duration = duration;
|
||||
ptr->argCount = arg_cnt;
|
||||
ptr->funcPtr = funcPtr;
|
||||
ptr->arg0 = arg0;
|
||||
ptr->arg1 = arg1;
|
||||
ptr->arg2 = arg2;
|
||||
ptr->activationFrameDelay = s_activationFrameDelay;
|
||||
s_activationFrameDelay = 0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void anSeq_PushStep_0Arg(vector(AnSeqElement) **ppAnSeq, f32 duration, void *func_ptr){
|
||||
__anSeq_pushStep(ppAnSeq, duration, 0, func_ptr, 0, 0, 0);
|
||||
}
|
||||
|
||||
void anSeq_PushStep_1Arg(vector(AnSeqElement) **ppAnSeq, f32 duration, void *func_ptr, s32 arg0){
|
||||
__anSeq_pushStep(ppAnSeq, duration, 1, func_ptr, arg0, 0, 0);
|
||||
}
|
||||
|
||||
void anSeq_PushStep_2Arg(vector(AnSeqElement) **ppAnSeq, f32 duration, void *func_ptr, s32 arg0, s32 arg4){
|
||||
__anSeq_pushStep(ppAnSeq, duration, 2, func_ptr, arg0, arg4, 0);
|
||||
}
|
||||
|
||||
void anSeq_PushStep_3Arg(vector(AnSeqElement) **ppAnSeq, f32 duration, void *func_ptr, s32 arg0, s32 arg4, s32 arg5){
|
||||
__anSeq_pushStep(ppAnSeq, duration, 3, func_ptr, arg0, arg4, arg5);
|
||||
}
|
||||
|
||||
void anSeq_PushStep_ManyArg(vector(AnSeqElement) **ppAnSeq, f32 duration, void *func_ptr, void* arg_ptr, s32 arg_size){
|
||||
AnSeqElement *out = __anSeq_pushStep(ppAnSeq, duration, 4, func_ptr, 0, 0, 0);
|
||||
memcpy(&out->arg0, arg_ptr, arg_size);
|
||||
}
|
||||
|
||||
void anSeq_func_80288E68(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3, s32 arg4){
|
||||
anSeq_PushStep_3Arg(ppAnSeq, duration, __anSeq_func_80288914, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
void func_80288EB0(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3, s32 arg4){
|
||||
anSeq_PushStep_3Arg(ppAnSeq, duration, __anSeq_func_8028894C, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
void anSeq_func_80288EF8(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3){
|
||||
anSeq_PushStep_2Arg(ppAnSeq, duration, __anSeq_func_8028984, arg2, arg3);
|
||||
}
|
||||
|
||||
void anSeq_func_80288F38(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3){
|
||||
anSeq_PushStep_2Arg(ppAnSeq, duration, __anSeq_func_80289C8, arg2, arg3);
|
||||
}
|
||||
|
||||
void anSeq_func_80288F78(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2){
|
||||
anSeq_PushStep_1Arg(ppAnSeq, duration, __anSeq_func_80289F4, arg2);
|
||||
}
|
||||
|
||||
void anSeq_func_80288FA8(vector(AnSeqElement) **ppAnSeq, f32 duration, enum sfx_e sfx_id){
|
||||
anSeq_PushStep_1Arg(ppAnSeq, duration, __anSeq_func_8028B14, sfx_id);
|
||||
}
|
||||
|
||||
void anSeq_func_80288FD8(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2){
|
||||
anSeq_PushStep_1Arg(ppAnSeq, duration, __anSeq_func_8028AE0, arg2);
|
||||
}
|
||||
|
||||
void anSeq_func_80289008(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3){
|
||||
do{
|
||||
anSeq_PushStep_2Arg(ppAnSeq, duration, __anSeq_func_80288B34, arg2, arg3);
|
||||
}while(0);
|
||||
}
|
||||
|
||||
void anSeq_func_80289048(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, s32 arg3, s32 arg4){
|
||||
do{
|
||||
anSeq_PushStep_3Arg(ppAnSeq, duration, __anSeq_func_80288B60, arg2, arg3, arg4);
|
||||
}while(0);
|
||||
}
|
||||
|
||||
void anSeq_func_80289090(vector(AnSeqElement) **ppAnSeq, f32 duration, s32 arg2, f32 arg3){
|
||||
anSeq_PushStep_2Arg(ppAnSeq, duration, __anSeq_func_802888C0, arg2, reinterpret_cast(s32, arg3));
|
||||
}
|
||||
|
||||
void anSeq_free(vector(AnSeqElement)** ppAnSeq){
|
||||
vector_free(*ppAnSeq);
|
||||
free(ppAnSeq);
|
||||
}
|
||||
|
||||
vector(AnSeqElement) **anSeq_new(void){
|
||||
vector(AnSeqElement) **ptr = (vector(AnSeqElement) **)malloc(sizeof(vector(AnSeqElement) **));
|
||||
*ptr = vector_new(sizeof(AnSeqElement), 2);
|
||||
anSeq_clear(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
void anSeq_setActivationFrameDelay(vector(AnSeqElement) **ppAnSeq, s32 arg1){
|
||||
s_activationFrameDelay = arg1;
|
||||
}
|
||||
|
||||
void anSeq_update(vector(AnSeqElement) **ppAnSeq, AnimCtrl *pAnCtl){
|
||||
AnSeqElement *iPtr;
|
||||
for(iPtr = vector_getBegin(*ppAnSeq); iPtr != (AnSeqElement*)vector_getEnd(*ppAnSeq); iPtr++){
|
||||
if(animctrl_isAt(pAnCtl, iPtr->duration))
|
||||
__anSeq_updateStep(ppAnSeq, iPtr);
|
||||
}
|
||||
}
|
|
@ -1,222 +0,0 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
|
||||
|
||||
extern void rumbleManager_80250E6C(f32, f32);
|
||||
extern void func_802BB360(s32, f32);
|
||||
extern void func_802BB378(s32, f32, f32);
|
||||
extern void func_802BB3AC(s32, f32);
|
||||
extern void func_8031B908(s32, s32, s32, f32);
|
||||
|
||||
/* .bss */
|
||||
s32 D_8037BF10;
|
||||
|
||||
/* .code */
|
||||
void func_802888C0(s32 arg0, s32 arg1)
|
||||
{
|
||||
u8 sp1C[3];
|
||||
f32 f0;
|
||||
sp1C[0] = (arg0 >> 16) & 0xFF;
|
||||
sp1C[1] = (arg0 >> 8) & 0xFF;
|
||||
sp1C[2] = (arg0 >> 0) & 0xFF;
|
||||
f0 = reinterpret_cast(f32, arg1);
|
||||
func_8031B908(sp1C[0], sp1C[1], sp1C[2], f0);
|
||||
}
|
||||
|
||||
void func_80288914(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
f32 f2 = reinterpret_cast(f32, arg2);
|
||||
func_802BB378(arg0, f0, f2);
|
||||
}
|
||||
|
||||
void func_8028894C(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
f32 f2 = reinterpret_cast(f32, arg2);
|
||||
func_802BB3DC(arg0, f0, f2);
|
||||
}
|
||||
|
||||
void func_80288984(s32 arg0, s32 arg1){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
func_802BB360(arg0, f0);
|
||||
func_802BB3AC(arg0, 1.0f);
|
||||
func_802BB3C4(arg0);
|
||||
}
|
||||
|
||||
void func_802889C8(s32 arg0, s32 arg1){
|
||||
f32 f0 = reinterpret_cast(f32, arg1);
|
||||
func_802BB3AC(arg0, f0);
|
||||
}
|
||||
|
||||
void func_802889F4(s32 arg0) {
|
||||
s32 sp18;
|
||||
s32 temp_t6;
|
||||
s32 phi_a3;
|
||||
|
||||
phi_a3 = arg0 >> 0x10;
|
||||
if( !(phi_a3 == 0xF2 && map_get() == MAP_91_FILE_SELECT && func_802C5A30() != 0)
|
||||
&& !((phi_a3 == 0x21 || phi_a3 == 0x3ED) && map_get() == MAP_91_FILE_SELECT && (func_802C5A30() == 1))
|
||||
){
|
||||
func_8030E6A4(phi_a3, (f32) ((f64) ((arg0 >> 8) & 0xFF) * 0.0078125), (s32) ((f64) (arg0 & 0xFF) * 128.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void func_80288AE0(s32 arg0){
|
||||
func_8025A6EC((u16) (arg0 >> 16), (u16)arg0 - 1);
|
||||
}
|
||||
|
||||
void func_80288B14(enum sfx_e arg0){
|
||||
func_8025A7DC(arg0);
|
||||
}
|
||||
|
||||
void func_80288B34(s32 arg0, s32 arg1){
|
||||
f32 f12 = reinterpret_cast(f32, arg0);
|
||||
f32 f14 = reinterpret_cast(f32, arg1);
|
||||
rumbleManager_80250E6C(f12, f14);
|
||||
}
|
||||
|
||||
void func_80288B60(s32 arg0, s32 arg1, s32 arg2){
|
||||
f32 f12 = reinterpret_cast(f32, arg0);
|
||||
f32 f14 = reinterpret_cast(f32, arg1);
|
||||
f32 f0 = reinterpret_cast(f32, arg2);
|
||||
rumbleManager_80250D94(f12, f14, f0);
|
||||
}
|
||||
|
||||
void func_80288B98(vector(struct2s) **arg0, struct2s *arg1){
|
||||
if(arg1->unk5){
|
||||
if(arg1->unk5 == 0xFF)
|
||||
return;
|
||||
if(--arg1->unk5)
|
||||
return;
|
||||
|
||||
arg1->unk5 = 0xFF;
|
||||
}
|
||||
|
||||
switch(arg1->unk4){
|
||||
case 0:// 80288BF8
|
||||
((void (*)(void)) arg1->unk14)();
|
||||
break;
|
||||
case 1:// 80288C0C
|
||||
((void (*)(s32)) arg1->unk14)(arg1->unk8);
|
||||
break;
|
||||
case 2:// 80288C24
|
||||
((void (*)(s32, s32)) arg1->unk14)(arg1->unk8, arg1->unkC);
|
||||
break;
|
||||
case 3:// 80288C40
|
||||
((void (*)(s32, s32, s32)) arg1->unk14)(arg1->unk8, arg1->unkC, arg1->unk10);
|
||||
break;
|
||||
case 4:// 80288C5C
|
||||
((void (*)(u8*)) arg1->unk14)((u8*)&arg1->unk8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80288C7C(vector(struct2s) **arg0){
|
||||
vector_clear(*arg0);
|
||||
}
|
||||
|
||||
s32 func_80288C9C( vector(struct2s) **arg0, f32 arg1, s32 arg_cnt, void *funcPtr, s32 arg4, s32 arg5, s32 arg6){
|
||||
struct2s *ptr = (struct2s *) vector_pushBackNew(arg0);
|
||||
ptr->unk0 = arg1;
|
||||
ptr->unk4 = arg_cnt;
|
||||
ptr->unk14 = funcPtr;
|
||||
ptr->unk8 = arg4;
|
||||
ptr->unkC = arg5;
|
||||
ptr->unk10 = arg6;
|
||||
ptr->unk5 = D_8037BF10;
|
||||
D_8037BF10 = 0;
|
||||
|
||||
}
|
||||
|
||||
void func_80288D08(vector(struct2s) **arg0, f32 arg1, void *arg2){
|
||||
func_80288C9C(arg0, arg1, 0, arg2, 0, 0, 0);
|
||||
}
|
||||
|
||||
void func_80288D40(vector(struct2s) **arg0, f32 arg1, void *arg2, s32 arg3){
|
||||
func_80288C9C(arg0, arg1, 1, arg2, arg3, 0, 0);
|
||||
}
|
||||
|
||||
void func_80288D84(vector(struct2s) **arg0, f32 arg1, void *arg2, s32 arg3, s32 arg4){
|
||||
func_80288C9C(arg0, arg1, 2, arg2, arg3, arg4, 0);
|
||||
}
|
||||
|
||||
void func_80288DCC(vector(struct2s) **arg0, f32 arg1, void *arg2, s32 arg3, s32 arg4, s32 arg5){
|
||||
func_80288C9C(arg0, arg1, 3, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
void func_80288E18(vector(struct2s) **arg0, f32 arg1, void *func_ptr, void* arg_ptr, s32 arg_size){
|
||||
s32 out = func_80288C9C(arg0, arg1, 4, func_ptr, 0, 0, 0);
|
||||
memcpy(out + 8, arg_ptr, arg_size);
|
||||
}
|
||||
|
||||
void func_80288E68(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4){
|
||||
func_80288DCC(arg0, arg1, func_80288914, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
void func_80288EB0(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4){
|
||||
func_80288DCC(arg0, arg1, func_8028894C, arg2, arg3, arg4);
|
||||
}
|
||||
|
||||
void func_80288EF8(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3){
|
||||
func_80288D84(arg0, arg1, func_80288984, arg2, arg3);
|
||||
}
|
||||
|
||||
void func_80288F38(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3){
|
||||
func_80288D84(arg0, arg1, func_802889C8, arg2, arg3);
|
||||
}
|
||||
|
||||
void func_80288F78(vector(struct2s) **arg0, f32 arg1, s32 arg2){
|
||||
func_80288D40(arg0, arg1, func_802889F4, arg2);
|
||||
}
|
||||
|
||||
void func_80288FA8(vector(struct2s) **arg0, f32 arg1, enum sfx_e sfx_id){
|
||||
func_80288D40(arg0, arg1, func_80288B14, sfx_id);
|
||||
}
|
||||
|
||||
void func_80288FD8(vector(struct2s) **arg0, f32 arg1, s32 arg2){
|
||||
func_80288D40(arg0, arg1, func_80288AE0, arg2);
|
||||
}
|
||||
|
||||
void func_80289008(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3){
|
||||
do{
|
||||
func_80288D84(arg0, arg1, func_80288B34, arg2, arg3);
|
||||
}while(0);
|
||||
}
|
||||
|
||||
void func_80289048(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4){
|
||||
do{
|
||||
func_80288DCC(arg0, arg1, func_80288B60, arg2, arg3, arg4);
|
||||
}while(0);
|
||||
}
|
||||
|
||||
void func_80289090(vector(struct2s) **arg0, f32 arg1, s32 arg2, s32 arg3){
|
||||
func_80288D84(arg0, arg1, func_802888C0, arg2, arg3);
|
||||
}
|
||||
|
||||
void func_802890D0(VLA** arg0){
|
||||
vector_free(*arg0);
|
||||
free(arg0);
|
||||
}
|
||||
|
||||
vector(struct2s) **func_802890FC(void){
|
||||
vector(struct2s) **ptr = (vector(struct2s) **)malloc(sizeof(vector(struct2s) **));
|
||||
*ptr = vector_new(sizeof(struct2s), 2);
|
||||
func_80288C7C(ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
void func_8028913C(vector(struct2s) **arg0, s32 arg1){
|
||||
D_8037BF10 = arg1;
|
||||
}
|
||||
|
||||
void func_8028914C(vector(struct2s) **arg0, AnimCtrl *arg1){
|
||||
struct2s *iPtr;
|
||||
for(iPtr = vector_getBegin(*arg0); iPtr != (struct2s*)vector_getEnd(*arg0); iPtr++){
|
||||
if(animctrl_isAt(arg1, iPtr->unk0))
|
||||
func_80288B98(arg0, iPtr);
|
||||
}
|
||||
}
|
|
@ -149,7 +149,7 @@ void overlay_mmm_init(void){
|
|||
|
||||
void __overlay_mmm_update(void){
|
||||
func_8038966C();
|
||||
organMinigame_update();
|
||||
maOrgan_update();
|
||||
func_8038AA44();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80288C7C(VLA**);
|
||||
extern void func_80288D84(s32, f32, void (*)(s32,s32), s32, s32);
|
||||
extern void func_80288DCC(s32 , f32, void (*)(s32, s32,s32), s32, s32, s32);
|
||||
extern void anSeq_clear(VLA**);
|
||||
extern void anSeq_PushStep_2Arg(s32, f32, void (*)(s32,s32), s32, s32);
|
||||
extern void anSeq_PushStep_3Arg(s32 , f32, void (*)(s32, s32,s32), s32, s32, s32);
|
||||
|
||||
//TODO import from cutscenes/code_0.h
|
||||
extern Struct63s D_8038D904[];
|
||||
|
@ -148,32 +148,32 @@ void func_80361BD0(s32 arg0, s32 arg1, s32 arg2){
|
|||
}
|
||||
|
||||
void func_80361C24(s32 arg0, f32 arg1, ActorMarker * arg2, f32 arg3){
|
||||
func_80288D84(arg0, arg1, func_80361B68, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3));
|
||||
anSeq_PushStep_2Arg(arg0, arg1, func_80361B68, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3));
|
||||
}
|
||||
|
||||
void func_80361C64(s32 arg0, f32 arg1, ActorMarker * arg2, s32 arg3, s32 arg4){
|
||||
func_80288DCC(arg0, arg1, func_80361B98, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), arg4);
|
||||
anSeq_PushStep_3Arg(arg0, arg1, func_80361B98, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), arg4);
|
||||
}
|
||||
|
||||
void func_80361CAC(s32 arg0, f32 arg1, ActorMarker *arg2, f32 arg3){
|
||||
func_80288DCC(arg0, arg1, func_80361BD0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), 1);
|
||||
anSeq_PushStep_3Arg(arg0, arg1, func_80361BD0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), 1);
|
||||
}
|
||||
|
||||
void func_80361CF4(s32 arg0, f32 arg1, ActorMarker *arg2, f32 arg3){
|
||||
func_80288DCC(arg0, arg1, func_80361BD0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), 2);
|
||||
anSeq_PushStep_3Arg(arg0, arg1, func_80361BD0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3), 2);
|
||||
}
|
||||
|
||||
void func_80361D3C(s32 arg0, f32 arg1, s32 arg2, s32 arg3){
|
||||
func_80288D84(arg0, arg1, func_80361AB0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3));
|
||||
anSeq_PushStep_2Arg(arg0, arg1, func_80361AB0, reinterpret_cast(s32, arg2), reinterpret_cast(s32, arg3));
|
||||
}
|
||||
|
||||
void func_80361D7C(s32 arg0, f32 arg1, struct ActorMarker *arg2, s32 arg3, u32 arg4){
|
||||
func_80288DCC(arg0, arg1, func_80361AE0, reinterpret_cast(s32, arg2), arg3, arg4);
|
||||
anSeq_PushStep_3Arg(arg0, arg1, func_80361AE0, reinterpret_cast(s32, arg2), arg3, arg4);
|
||||
}
|
||||
|
||||
void func_80361DC4(Actor *this){
|
||||
if(this->unk134){
|
||||
func_802890D0(this->unk134);
|
||||
anSeq_free(this->unk134);
|
||||
}
|
||||
this->unk134 = NULL;
|
||||
|
||||
|
@ -188,7 +188,7 @@ void func_80361E10(Actor *this) {
|
|||
for(phi_v0 = 0; phi_v0 < 0x20; phi_v0++){
|
||||
if(D_803731E0[phi_v0].unk0 == this->modelCacheIndex){
|
||||
this->unk108 = &D_803731E0[phi_v0];
|
||||
this->unk134 = func_802890FC();
|
||||
this->unk134 = anSeq_new();
|
||||
this->unk160 = func_8032479C();
|
||||
this->unk10C = 0;
|
||||
return;
|
||||
|
@ -219,7 +219,7 @@ void func_80361EE0(Actor *this) {
|
|||
sp28 = animctrl_getIndex(this->animctrl);
|
||||
if (sp28 != this->unk10C) {
|
||||
this->unk10C = sp28;
|
||||
func_80288C7C(this->unk134);
|
||||
anSeq_clear(this->unk134);
|
||||
for(sp20 = sp24->unk4; sp20->unk4 != NULL; sp20++){
|
||||
if (sp28 == sp20->unk0) {
|
||||
sp20->unk4(this->unk134, this->marker);
|
||||
|
@ -227,6 +227,6 @@ void func_80361EE0(Actor *this) {
|
|||
}
|
||||
}
|
||||
}
|
||||
func_8028914C(this->unk134, this->animctrl);
|
||||
anSeq_update(this->unk134, this->animctrl);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue