animation struct documentation

This commit is contained in:
Banjo Kazooie
2023-03-12 23:11:39 -05:00
parent 7dd7a0b60c
commit af75d8b32d
293 changed files with 2031 additions and 1986 deletions

133
src/core2/animcache.c Normal file
View File

@@ -0,0 +1,133 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "core2/bonetransform.h"
typedef struct {
BoneTransformList *bone_xform;
s16 life;
u8 alive;
// u8 pad7[1];
}struct10E0s;
/* .bss */
struct10E0s D_80379E20[340];
/* .code */
void animCache_init(void){
int i;
for(i = 0; i<340; i++){
D_80379E20[i].alive = FALSE;
D_80379E20[i].bone_xform = NULL;
D_80379E20[i].life = 0;
}
}
void animCache_free(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].alive){
if(D_80379E20[i].bone_xform){
boneTransformList_free(D_80379E20[i].bone_xform);
}
}
}
}
void animCache_flushStale(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform != NULL){
if(D_80379E20[i].life < 0x3b){
boneTransformList_free(D_80379E20[i].bone_xform);
D_80379E20[i].bone_xform = 0;
if(func_80254BC4(1)){
break;
}
}
}
}
}
void animCache_flushAll(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].alive){
func_803203FC(0);
D_80379E20[i].life = 0;
boneTransformList_free(D_80379E20[i].bone_xform);
D_80379E20[i].bone_xform = NULL;
}
}
}
void animCache_update(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform){
if(--D_80379E20[i].life <= 0){
boneTransformList_free(D_80379E20[i].bone_xform);
D_80379E20[i].bone_xform = 0;
}
}
}
}
s16 animCache_getNextFree(void){
int i;
for(i = 0; i<340; i++){
if(!D_80379E20[i].alive){
return i;
}
}
return -1;
}
s16 animCache_getNew(void){
int indx = animCache_getNextFree();
D_80379E20[indx].alive = TRUE;
D_80379E20[indx].life = 0;
D_80379E20[indx].bone_xform = 0;
return indx;
}
bool animCache_inUse(s16 index){
return (D_80379E20[index].bone_xform) ? 1 : 0;
}
void animCache_release(s16 index){
if(D_80379E20[index].bone_xform){
boneTransformList_free(D_80379E20[index].bone_xform);
}
D_80379E20[index].alive = 0;
D_80379E20[index].bone_xform = 0;
D_80379E20[index].life = 0;
}
int animCache_getBoneTransformList(s16 index, BoneTransformList **arg1){
D_80379E20[index].life = 0x3C;
if(D_80379E20[index].bone_xform){
*arg1 = D_80379E20[index].bone_xform;
return FALSE;
}else{
D_80379E20[index].bone_xform = boneTransformList_new();
*arg1 = D_80379E20[index].bone_xform;
return TRUE;
}
}
void animCache_defrag(void){
int i;
for(i = 0; i < 340; i++){
if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform){
D_80379E20[i].bone_xform = boneTransformList_defrag(D_80379E20[i].bone_xform);
}
}
}

View File

@@ -101,9 +101,9 @@ void func_802871A4(AnimCtrl *this){
AnimCtrl *animctrl_new(s32 arg0){ //new
ActorAnimCtrl *this;
this = (ActorAnimCtrl *)malloc( func_80289680() + 0x28);
this = (ActorAnimCtrl *)malloc( anim_getSize() + 0x28);
this->animctrl.animation = &this->animation;
func_802896EC(&this->animation, 1);
anim_new(&this->animation, 1);
this->animctrl.playback_type = 0;
this->animctrl.index = 0;
this->animctrl.default_start = TRUE;
@@ -119,7 +119,7 @@ AnimCtrl *animctrl_new(s32 arg0){ //new
}
void animctrl_free(AnimCtrl * this){ //free
func_802896A0(this->animation);
anim_release(this->animation);
free(this);
}
@@ -193,12 +193,12 @@ void __animctrl_gotoStart(AnimCtrl *this){
void _animctrl_start(AnimCtrl * this, char *file, s32 line){
if(this->smooth_transition && anim_getIndex(this->animation) != 0){
func_80289674(this->animation);
anim_resetSmooth(this->animation);
anim_setIndex(this->animation, this->index);
__animctrl_gotoStart(this);
anim_setDuration(this->animation, 0.0f);
} else{
anim_8028980C(this->animation);
anim_resetNow(this->animation);
anim_setIndex(this->animation, this->index);
__animctrl_gotoStart(this);
anim_setDuration(this->animation, 1.0f);
@@ -292,29 +292,29 @@ void animctrl_setTimer(AnimCtrl *this, f32 arg1){
this->timer = arg1;
}
s32 animctrl_8028780C(AnimCtrl *this, s32 arg1){
s32 animctrl_8028780C(f32 position[3], s32 arg1){
return 0;
}
s32 func_8028781C(AnimCtrl *this, f32 *arg1, s32 arg2){
void animctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){
s32 map;
map = map_get();
if( map != MAP_1E_CS_START_NINTENDO
&& map != MAP_1F_CS_START_RAREWARE
&& map != MAP_20_CS_END_NOT_100
&& this->unk23 !=0
&& arg1 != NULL
&& position != NULL
){
this->unk24 = this->unk24 -1;
if(this->unk24 == 0xFF){
this->unk24 = animctrl_8028780C(arg1, arg2);
this->unk24 = animctrl_8028780C(position, arg2);
}
else{
anim_802897A0(this->animation);
anim_drawSetup(this->animation);
return;
}
}
func_802895F8(this->animation);
anim_update(this->animation);
}
s32 animctrl_isStopped(AnimCtrl *this){

View File

@@ -92,33 +92,33 @@ void __baanim_applyBottlesBonus(s32 arg0, s32 arg1) {
}
if ((D_8037BF4C & 1)) {//either big hands or big feet
__baanim_oscillateScale(scale, sp28, 2.0f, 1.0f);
func_8033A928(arg0, 6, scale);
func_8033A928(arg0, 0x14, scale);
boneTransformList_setBoneScale(arg0, 6, scale);
boneTransformList_setBoneScale(arg0, 0x14, scale);
}
if (D_8037BF4C & 2) {//either big hands or big feet
__baanim_oscillateScale(scale, sp28, 2.0f, 1.0f);
func_8033A928(arg0, 0x10, scale);
func_8033A928(arg0, 0x1E, scale);
boneTransformList_setBoneScale(arg0, 0x10, scale);
boneTransformList_setBoneScale(arg0, 0x1E, scale);
}
if (D_8037BF4C & BAANIM_BIGHEAD) {
__baanim_oscillateScale(scale, sp28, 2.0f, 1.0f);
func_8033A928(arg0, 0x12, scale);
boneTransformList_setBoneScale(arg0, 0x12, scale);
}
if (D_8037BF4C & BAANIM_SMALLHEAD) {
__baanim_oscillateScale(scale, sp28, 0.2f, 0.5f);
func_8033A928(arg0, 0x12, scale);
boneTransformList_setBoneScale(arg0, 0x12, scale);
}
if (D_8037BF4C & BAANIM_LONGBODY) {
func_8033A968(arg0, 1, &D_803635E0);
}
if (D_8037BF4C & BAANIM_BIGKAZOOIEHEAD) {
__baanim_oscillateScale(scale, sp28, 2.0f, 1.0f);
func_8033A928(arg0, 0x6C, scale);
boneTransformList_setBoneScale(arg0, 0x6C, scale);
}
if (D_8037BF4C & BAANIM_BIGWINGS) {
__baanim_oscillateScale(scale, sp28, 2.0f, 1.0f);
func_8033A928(arg0, 0x64, scale);
func_8033A928(arg0, 0x67, scale);
boneTransformList_setBoneScale(arg0, 0x64, scale);
boneTransformList_setBoneScale(arg0, 0x67, scale);
}
if (map_get() == MAP_A_TTC_SANDCASTLE) {
if ((D_8037BF4C & BAANIM_WISHYWASHY) && (player_getTransformation() != TRANSFORM_7_WISHWASHY)) {
@@ -209,7 +209,7 @@ void baanim_80289F30(void){
f32 sp1C[3];
_player_getPosition(sp1C);
func_8028781C(playerAnimCtrl, sp1C, 1);
animctrl_drawSetup(playerAnimCtrl, sp1C, 1);
}
AnimCtrl *baanim_getAnimCtrlPtr(void){

View File

@@ -166,7 +166,7 @@ void __baMarker_8028B9A8(s32 arg0){
}
void __baMarker_8028BA00(s32 arg0){
__spawnQueue_add_1((GenMethod_1)__baMarker_8028B9A8, reinterpret_cast(s32, arg0));
__spawnQueue_add_1((GenFunction_1)__baMarker_8028B9A8, reinterpret_cast(s32, arg0));
}
@@ -543,7 +543,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
__baMarker_8028B8DC();
}
__spawnQueue_add_4((GenMethod_4)__baMarker_8028B904, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z), jiggy_id);
__spawnQueue_add_4((GenFunction_4)__baMarker_8028B904, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z), jiggy_id);
marker_despawn(marker);
}
}
@@ -573,7 +573,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
case 0x54: //L8028C820
func_8025A6EC(COMUSIC_19_LOW_PITCH_FLUTES, 28000);
func_803012F8();
__spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
__spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
marker_despawn(marker);
break;
@@ -746,7 +746,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
miscflag_set(MISC_FLAG_E_TOUCHING_WADING_BOOTS);
func_802A6388(chwadingboots_802D6E4C(actor));
bs_checkInterrupt(BS_INTR_1B);
__spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
__spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
chwadingboots_802D6E54(actor);
break;
@@ -770,7 +770,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
miscflag_set(MISC_FLAG_10_TOUCHING_TURBO_TRAINERS);
set_turbo_duration(chtrainers_getDuration(actor));
bs_checkInterrupt(BS_INTR_1A);
__spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
__spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z));
chtrainers_pickup(actor);
break;

View File

@@ -98,7 +98,7 @@ void baModel_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8029DD6C();
modelRender_setEnvColor(env_color[0], env_color[1], env_color[2], baModelEnvAlpha);
func_8033A280(2.0f);
modelRender_preDraw((GenMethod_1)_baModel_preDraw, 0);
modelRender_preDraw((GenFunction_1)_baModel_preDraw, 0);
func_8033A450(D_80363780);
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
if(D_8037C150.unk0){
@@ -144,7 +144,7 @@ void baModel_reset(void){
if(!func_8028ADB4())
baModel_updateModel();
player_getPosition(plyr_pos);
__spawnQueue_add_4((GenMethod_4)func_802C4140,
__spawnQueue_add_4((GenFunction_4)func_802C4140,
ACTOR_17_PLAYER_SHADOW,
reinterpret_cast(s32, plyr_pos[0]),
reinterpret_cast(s32, plyr_pos[1]),

View File

@@ -219,7 +219,7 @@ void func_802B0060(UNK_TYPE(s32) arg0, UNK_TYPE(s32) arg1){
for(i = 0; i < 3; i++){
sp4C[i] = func_80257AD4(D_8037D470.unk20 + ((f32)i/3.0)*0.5, 0.5f)*(D_8037D470.unk24*D_8037D470.unk28) + D_8037D470.unk24;
}
func_8033A928(arg0, 3, sp4C);
boneTransformList_setBoneScale(arg0, 3, sp4C);
}

View File

@@ -136,7 +136,7 @@ void func_802D729C(Actor *actor, f32 arg1){
return;
}
if(!actor->unk104){
__spawnQueue_add_2((GenMethod_2)func_802D71A0, (s32) actor->marker, reinterpret_cast(s32, arg1));
__spawnQueue_add_2((GenFunction_2)func_802D71A0, (s32) actor->marker, reinterpret_cast(s32, arg1));
return;
}

View File

@@ -14,7 +14,7 @@ ActorAnimationInfo D_803672C0[] ={
ActorInfo D_803672E0 = {0x50, ACTOR_12_BEEHIVE, ASSET_364_MODEL_BEEHIVE,
1, D_803672C0,
func_802CE8D4, func_80326224, func_80325888,
func_802CE8D4, func_80326224, actor_draw,
0, 0x333, 0.0f, 0
};
@@ -27,8 +27,8 @@ void func_802CE7E0(ActorMarker *marker, ActorMarker *other){
actor_playAnimationOnce(actor);
marker->collidable = FALSE;
actor->unk138_27 = 3;
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
actor->marker->propPtr->unk8_3 = 0;
func_803115C4(ASSET_D96_DIALOG_BEEHIVE_MEET);
func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES);

View File

@@ -341,7 +341,7 @@ Actor *func_802C6E84(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
f32 sp40[3];
actor = func_80325888(marker, gfx, mtx, vtx);
actor = actor_draw(marker, gfx, mtx, vtx);
if(marker->unk14_21){
f32 sp34[3] = {0.0f, 4.0f, -15.0f};
f32 sp28[3];

View File

@@ -45,7 +45,7 @@ typedef struct{
}Struct_core2_560F0_2;
extern void item_set(enum item_e, s32);
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
extern void func_8024CE60(f32, f32);
Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
@@ -171,8 +171,8 @@ Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
gDPSetTextureFilter((*gfx)++, G_TF_POINT);
gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp50));
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)sp6C);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)sp6C);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, sp60, NULL, D_80368250, sp54, func_80330B1C(marker));
gDPSetTextureFilter((*gfx)++, G_TF_BILERP);
@@ -269,7 +269,7 @@ f32 chBottlesBonus_func_802DD804(f32 arg0) {
return sinf(M_PI * arg0 / 2);
}
void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) {
s32 i;
f32 spD8[3];
f32 spD4;
@@ -289,7 +289,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
D_8037DEB0 = 1;
for(i = 0; i < 20; i++){
func_8033A57C(arg0, D_80368254[i], D_8037DEC4[i].unkC);
func_8033A670(arg0, D_80368254[i], D_8037DEC4[i].unk1C);
boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEC4[i].unk1C);
chBottlesBonus_func_802DD778(arg0, i, D_8037DEC4[i].unk0);
chBottlesBonusCursor_func_802DF460(i + 20, chBottlesBonusMarker, D_8037DEC4[i].unk0);
}
@@ -300,9 +300,9 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
D_8037DEB4 = 1;
for(i = 0; i < 20; i++){
func_8033A57C(arg0, D_80368254[i], D_8037DEB8[i].unkC);
func_8033A670(arg0, D_80368254[i], D_8037DEB8[i].unk1C);
boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEB8[i].unk1C);
chBottlesBonus_func_802DD778(arg0, i, D_8037DEB8[i].unk0);
func_80345250(D_8037DEC0[i].unkC, D_8037DEB8[i].unkC);
vec4f_clone(D_8037DEC0[i].unkC, D_8037DEB8[i].unkC);
D_8037DEC0[i].unk0[0] = D_8037DEB8[i].unk0[0];
D_8037DEC0[i].unk0[1] = D_8037DEB8[i].unk0[1];
D_8037DEC0[i].unk0[2] = D_8037DEB8[i].unk0[2];
@@ -337,7 +337,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
D_8037DEC0[i].unk1C[1] = D_8037DEBC[i].unk1C[1];
D_8037DEC0[i].unk1C[2] = D_8037DEBC[i].unk1C[2];
func_80345250(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC);
vec4f_clone(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC);
break;
case 2://L802DDD9C
chBottlesBonus_func_802DD484(spD8, spD4, 1.0f, 0.2);
@@ -352,7 +352,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
D_8037DEC0[i].unk1C[0] = D_8037DEBC[i].unk1C[0];
D_8037DEC0[i].unk1C[1] = D_8037DEBC[i].unk1C[1];
D_8037DEC0[i].unk1C[2] = D_8037DEBC[i].unk1C[2];
func_80345250(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC);
vec4f_clone(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC);
chBottlesBonusCursor_func_802DF460(40 + i, chBottlesBonusMarker, D_803681A0);
break;
@@ -375,7 +375,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) {
spD8[0] = spD8[0] * D_8037DEBC[i].unk1C[0];
spD8[1] = spD8[1] * D_8037DEBC[i].unk1C[1];
spD8[2] = spD8[2] * D_8037DEBC[i].unk1C[2];
func_8033A928(arg0, D_80368254[i], spD8);
boneTransformList_setBoneScale(arg0, D_80368254[i], spD8);
chBottlesBonus_func_802DD6E0(arg0, i, D_8037DEBC[i].unk0);
D_8037DEC8[i] += spD0;
D_8037DF18[i] += spD0;

View File

@@ -15,7 +15,7 @@ extern void func_8025AABC(enum comusic_e);
extern f32 func_8024E420(s32, s32, s32);
extern f32 func_8033DDB8(void);
extern void chBottlesBonus_func_802DEA50(s32);
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
extern void chBottlesBonus_completedPuzzle(void);
@@ -124,7 +124,7 @@ bool chBottlesBonusCursor_checkPuzzleCompletion(void) {
for(i = 0; i < 20 && D_8037E5C0.is_completed != 0; i++){
if((D_8037E248[i].state != 3)
|| (i != D_8037E248[i].piece_id)
|| !func_803454D0(chBottlesBonus_func_802DEAF8(i))
|| !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(i))
) {
D_8037E5C0.is_completed = FALSE;
}
@@ -146,8 +146,8 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
f32 sp3C;
this = marker_getActorAndRotation(chBottlesBonusSursorMarker, &rotation);
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)chBottlesBonusSursorMarker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)chBottlesBonusSursorMarker);
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
actor_setOpacity(this, 0xB9);
func_8024E030(this->position, D_8037E5C0.unk18);
@@ -177,7 +177,7 @@ ActorMarker *chBottlesBonusCursor_spawn(void){
void chBottlesBonusCursor_func_802DF928(s32 indx) {
f32 rotation_3d[3];
func_80345250(D_8037E248[indx].unk1C, D_8037E248[indx].unkC);
vec4f_clone(D_8037E248[indx].unk1C, D_8037E248[indx].unkC);
rotation_3d[0] = D_8037E248[indx].rotation;
rotation_3d[1] = 0.0f;
rotation_3d[2] = 0.0f;
@@ -312,7 +312,7 @@ void chBottlesBonusCursor_update(Actor *this) {
) {
if (D_8037E248[D_8037E5B8 - 41].state == 3) {
if( D_8037E5B8 - 41 != D_8037E248[D_8037E5B8 - 41].piece_id
|| !func_803454D0(chBottlesBonus_func_802DEAF8(D_8037E5B8 - 41))
|| !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5B8 - 41))
) {
D_8037E5C0.unk0 = D_8037E5B8 - 41;
chBottlesBonus_func_802DEA50(D_8037E5C0.unk0);
@@ -341,7 +341,7 @@ void chBottlesBonusCursor_update(Actor *this) {
if ((D_8037E5B8 >= 21) && (D_8037E5B8 < 41)) {
held_piece->state = 3;
held_piece->piece_id = D_8037E5B8 - 21;
if ((D_8037E5C0.unk0 == held_piece->piece_id) && func_803454D0(chBottlesBonus_func_802DEAF8(D_8037E5C0.unk0))) {
if ((D_8037E5C0.unk0 == held_piece->piece_id) && vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5C0.unk0))) {
sp44 = COMUSIC_2B_DING_B;
func_80328B8C(this, 6, 0.0f, 1);
actor_playAnimationOnce(this);

View File

@@ -8,17 +8,17 @@ void func_803567EC(Actor *this);
ActorInfo D_80372810 = {
MARKER_1A7_CLANKER_WHIPCRACK, ACTOR_28A_CLANKER_WHIPCRACK, ASSET_432_MODEL_CLANKER_WHIPCRACK,
0, NULL,
func_803567EC, NULL, func_80325888,
func_803567EC, NULL, actor_draw,
0, 0, 0.0f, 0
};
/* .code */
void func_80356770(Actor *this, s32 next_state){
if(next_state == 1)
func_80335924(this->unk148, ASSET_15C_ANIM_CLANKER_WHIPCRACK_IDLE, 0.5f, 1.0f);
skeletalAnim_set(this->unk148, ASSET_15C_ANIM_CLANKER_WHIPCRACK_IDLE, 0.5f, 1.0f);
if(next_state == 2)
func_80335924(this->unk148, ASSET_15D_ANIM_CLANKER_WHIPCRACK_ATTACK, 0.5f, 1.0f);
skeletalAnim_set(this->unk148, ASSET_15D_ANIM_CLANKER_WHIPCRACK_ATTACK, 0.5f, 1.0f);
this->state = next_state;
}
@@ -44,7 +44,7 @@ void func_803567EC(Actor *this){
}
if(this->state == 2){
func_8033568C(this->unk148, &sp44, &sp40);
skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40);
if(sp44 < 0.13 && 0.13 <= sp40)
func_8030E9C4(SFX_6A_FLAGPOLE_WOBBLE, randf2(0.9f, 1.0f), 14000, this->position, 500.0f, 1000.0f);

View File

@@ -55,9 +55,9 @@ void func_80357264(Actor *this, s32 next_state){
this->marker->unk14_20 = MARKER_1D0_CLUCKER_B;
actor_collisionOff(this);
if(next_state == 1 || next_state == 2){
func_80335924(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, 2.5f);
func_80335A74(this->unk148, 0.99f);
func_80335A8C(this->unk148, 4);
skeletalAnim_set(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, 2.5f);
skeletalAnim_setProgress(this->unk148, 0.99f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED);
if(this->state == 4){
if(local->unk0 == 2){
local->unk4 = randf2(0.5f, 0.75f);
@@ -82,10 +82,10 @@ void func_80357264(Actor *this, s32 next_state){
actor_collisionOn(this);
local->unk0 = (local->unk0 + 1) % 3;
if(local->unk0 < 2)
func_80335924(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, randf2( 0.6f, 1.0f));
skeletalAnim_set(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, randf2( 0.6f, 1.0f));
else
func_80335924(this->unk148, ASSET_185_ANIM_CLUCKER_ATTACK_LONG, 0.0f, randf2( 2.3f, 2.7f));
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_185_ANIM_CLUCKER_ATTACK_LONG, 0.0f, randf2( 2.3f, 2.7f));
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_8030E6A4(SFX_4A_CLUCKER_AHH, randf2(0.85f, 0.95f), 32000);
}
@@ -100,7 +100,7 @@ void func_80357264(Actor *this, s32 next_state){
func_80324E38(2.0f, 0);
}//L80357518
func_8030E6D4(SFX_1E_HITTING_AN_ENEMY_2);
func_80335924(this->unk148, ASSET_186_ANIM_CLUCKER_DIE, 0.05f, 2.0f);
skeletalAnim_set(this->unk148, ASSET_186_ANIM_CLUCKER_DIE, 0.05f, 2.0f);
}//L80357540
this->state = next_state;
@@ -120,7 +120,7 @@ Actor *func_803575B8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C(3, (this->state == 5)? 1 : 0);
func_8033A45C(4, (this->state == 0 || this->state == 1 || this->state == 6)? 0 : 1);
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8035765C(Actor *this){
@@ -174,8 +174,8 @@ void func_8035765C(Actor *this){
}
if(this->state == 4){
func_8033568C(this->unk148, &sp4C, &sp48);
if(func_8033567C(this->unk148) == 0x185){
skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48);
if(skeletalAnim_getAnimId(this->unk148) == 0x185){
if(sp4C < 0.58 && 0.58 <= sp48){
this->marker->unk14_20 = MARKER_1D0_CLUCKER_B;
}
@@ -206,13 +206,13 @@ void func_8035765C(Actor *this){
func_8030E6D4(SFX_2_CLAW_SWIPE);
}
}//L80357B30
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
func_80357264(this, 2);
}
}//L80357B48
if(this->state == 5){
func_8033568C(this->unk148, &sp44, &sp40);
skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40);
if(sp44 < 0.1 && 0.1 <= sp40){
func_8030E6A4(SFX_68_CLUCKER_AAEEGHH, randf2(1.0f, 1.1f), 32000);
}
@@ -220,7 +220,7 @@ void func_8035765C(Actor *this){
if(sp44 < 0.7 && 0.7 <= sp40){
func_8030E6D4(SFX_61_CARTOONY_FALL);
}
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
func_80357264(this, 6);
}
}

View File

@@ -25,9 +25,9 @@ void func_803569F0(Actor *this, s32 next_state){
this->marker->unk14_20 = 0x1cf;
actor_collisionOff(this);
if(next_state == 1 || next_state == 2){
func_80335924(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f);
func_80335A74(this->unk148, 0.99f);
func_80335A8C(this->unk148, 4);
skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f);
skeletalAnim_setProgress(this->unk148, 0.99f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED);
if(this->state == 4){
local->unk0 = randf2(0.5f, 1.0f);
}
@@ -44,15 +44,15 @@ void func_803569F0(Actor *this, s32 next_state){
if(next_state == 4){
this->marker->unk14_20 = 0x29;
actor_collisionOn(this);
func_80335924(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, randf2(2.3f, 2.7f));
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, randf2(2.3f, 2.7f));
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_8030E760(0x3ef, 1.1f, 25000);
func_8030E760(0x3ef, 1.1f, 25000);
}//L80356B90
if(next_state == 5){
func_8030E760(SFX_1E_HITTING_AN_ENEMY_2, 1.0f, 32000);
func_80335924(this->unk148, ASSET_15B_ANIM_GRILL_CHOMPA_DIE, 0.05f, 2.0f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_15B_ANIM_GRILL_CHOMPA_DIE, 0.05f, 2.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}
this->state = next_state;
}
@@ -73,7 +73,7 @@ Actor *func_80356C50(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
}
else{
func_8033A45C(3, (actor->state == 1 || actor->state == 6)? 0:1);
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
}
@@ -121,7 +121,7 @@ void func_80356CCC(Actor *this){
}
}//L80356EAC
if(this->state == 4){
func_8033568C(this->unk148, &sp4C, &sp48);
skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48);
if(sp4C < 0.59 && 0.59 <= sp48){
this->marker->unk14_20 = 0x1cf;
}
@@ -137,19 +137,19 @@ void func_80356CCC(Actor *this){
if(sp4C < 0.9 && 0.9 <= sp48){
func_8030E760(SFX_2_CLAW_SWIPE, 1.0f, 32000);
}
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
func_803569F0(this, 2);
}
}//L80357078
if(this->state == 5){
func_8033568C(this->unk148, &sp44, &sp40);
skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40);
if(sp44 < 0.1 && 0.1 <= sp40){
func_8030E760(SFX_D7_GRABBA_DEATH, 1.0f, 32000);
}
if(sp44 < 0.7 && 0.7 <= sp40){
func_8030E760(SFX_A_BANJO_LANDING_05, 0.8f, 32000);
}
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
func_803569F0(this, 6);
}
}//L8035713C

View File

@@ -78,7 +78,7 @@ void func_802D8C98(Actor *this, s32 arg1) {
bool chCollectible_collectItem(Actor* actor, enum file_progress_e arg1, enum asset_e dialogId, enum comusic_e sfxId, enum item_e itemId, f32 arg5){
func_8025A6EC(sfxId,32000);
timedFunc_set_1(0.75f, (GenMethod_1)func_8035644C, arg1);
timedFunc_set_1(0.75f, (GenFunction_1)func_8035644C, arg1);
if(!func_802FADD4(0x1b)){
item_inc(itemId);
} else {

View File

@@ -179,7 +179,7 @@ void __chCrab_die(ActorMarker *marker, ActorMarker *other){
is_black_snippet = this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET;
FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 32750, this->position, 950, 1900);
FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 28000, this->position, 950, 1900);
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
this->unk60 = 5.0f;
marker->collidable = FALSE;
this->unk138_27 = 1;
@@ -399,6 +399,6 @@ void chCrab_update(Actor *this) {
}
/* .data */
ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0};
ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0};
ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0};

View File

@@ -10,7 +10,7 @@ void chfirefx_update(Actor *this);
ActorInfo gChFireFxInfo = {
MARKER_256_FIRE_FX, ACTOR_383_FIRE_FX, ASSET_526_SPRITE_FIRE,
0, NULL,
chfirefx_update, func_80326224, func_80325888,
chfirefx_update, func_80326224, actor_draw,
0, 0, 0.0f, 0
};

View File

@@ -58,7 +58,7 @@ void func_8035C080(Actor *this, s32 next_state){
local->unkD = next_state;
if(next_state == 1){
func_80335924(this->unk148, 0, 0.0f, 0.0f);
skeletalAnim_set(this->unk148, 0, 0.0f, 0.0f);
this->yaw = local->unk34[0];
}
if( next_state == 3
@@ -66,7 +66,7 @@ void func_8035C080(Actor *this, s32 next_state){
|| next_state == 7
|| next_state == 6
){
func_80335924(this->unk148, ASSET_132_ANIM_FLOTSAM_MOVE, 0.1f, 0.7f);
skeletalAnim_set(this->unk148, ASSET_132_ANIM_FLOTSAM_MOVE, 0.1f, 0.7f);
local->unk10[0] = this->position_x;
local->unk10[1] = this->position_y;
local->unk10[2] = this->position_z;
@@ -176,8 +176,8 @@ void func_8035C080(Actor *this, s32 next_state){
func_802F9EC4(sp38, this->position, 0x5dc, 0x9c4);
func_802F9F80(sp38, 0.0f, 2.0f, 2.0f);
func_802FA060(sp38, 0x6590, 0x6d60, 500.0f);
func_80335924(this->unk148, ASSET_189_ANIM_FLOTSAM_DIE, 0.1f, 4.0f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, ASSET_189_ANIM_FLOTSAM_DIE, 0.1f, 4.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
local->pCtrl_8 = particleEmitter_new(20);
particleEmitter_setSprite(local->pCtrl_8, ASSET_70E_SPRITE_SMOKE_2);
particleEmitter_setStartingFrameRange(local->pCtrl_8, 0, 7);
@@ -214,7 +214,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
if(this->state == 0) return this;
if(this->state == 8){
sp5C = func_803356A0(this->unk148);
sp5C = skeletalAnim_getBoneTransformList(this->unk148);
if(sp5C){
sp40[0] = 0.0f;
sp40[1] = 0.0f;
@@ -224,7 +224,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
sp34[0] = 1.0 - local->unk0*0.5;
sp34[1] = 1.0 - local->unk0*0.5;
sp34[2] = 1.0 - local->unk0*0.5;
func_8033A928(sp5C, 3, sp34);
boneTransformList_setBoneScale(sp5C, 3, sp34);
}
}
@@ -232,7 +232,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A450(func_80329934());
}
func_80325888(marker, gfx, mtx, vtx);
actor_draw(marker, gfx, mtx, vtx);
if(local->pCtrl_8 && this->marker->unk14_21){
func_8034A174(func_80329934(), 5, sp28);
@@ -296,7 +296,7 @@ void func_8035C8F4(Actor *this){
ml_interpolate_vec3f(this->position, local->unk10, local->unk1C, local->unk0);
this->position_y += 100.0f*sinf(local->unk0*3.141592654);
this->yaw = local->unk0*(local->unk34[2] - local->unk34[1]) + local->unk34[1];
if(func_80335794(this->unk148) > 0){
if(skeletalAnim_getLoopCount(this->unk148) > 0){
if(ml_distance_vec3f(this->position, local->unk28) < 10.0f){
func_8035C080(this, 1);
}
@@ -326,7 +326,7 @@ void func_8035C8F4(Actor *this){
if(this->state == 8){
local->unk0 += 0.25*sp34;
if(func_80335794(this->unk148) > 0)
if(skeletalAnim_getLoopCount(this->unk148) > 0)
marker_despawn(this->marker);
}
}

View File

@@ -118,7 +118,7 @@ Actor *func_802C4360(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
else{
modelRender_setEnvColor(0x64, 0x64, 0x64, 0xFF);
}
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
Actor *func_802C4464(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
@@ -302,7 +302,7 @@ void func_802C4C14(Actor *this){
return;
if(!this->initialized){
__spawnQueue_add_1((GenMethod_1)func_802C4BB4, reinterpret_cast(s32, this->marker));
__spawnQueue_add_1((GenFunction_1)func_802C4BB4, reinterpret_cast(s32, this->marker));
func_802C7318(this);
this->unk130 = func_802C71F0;
if(sp84 == 0){
@@ -352,7 +352,7 @@ void func_802C4C14(Actor *this){
case 1://L802C4F10
if(sp84 == 1){
func_8030E510(SFX_136_GAMEBOY_STARTUP, 15000);
timedFunc_set_3(0.25f, (GenMethod_3)comusic_8025AB44, COMUSIC_73_GAMEBOY, -1, 2000);
timedFunc_set_3(0.25f, (GenFunction_3)comusic_8025AB44, COMUSIC_73_GAMEBOY, -1, 2000);
func_8025A58C(0, 2000);
}
else{
@@ -394,19 +394,19 @@ void func_802C4C14(Actor *this){
if(animctrl_isStopped(this->animctrl)){
chBottlesBonus_func_802DEB80();
if(!gameFile_isNotEmpty(sp84)){
timedFunc_set_3(0.0f, (GenMethod_3)func_802E4078, MAP_85_CS_SPIRAL_MOUNTAIN_3, 0, 1);
timedFunc_set_3(0.0f, (GenFunction_3)func_802E4078, MAP_85_CS_SPIRAL_MOUNTAIN_3, 0, 1);
}
else{//L802C511C
sp44 = 0.0f;
if(this->state == 4 && (sp84 == 0 || sp84 == 1))
sp44 = 0.25f;
if(func_802DA498() && fileProgressFlag_get(FILEPROG_BD_ENTER_LAIR_CUTSCENE)){
timedFunc_set_2(sp44, (GenMethod_2)func_8031FB14, 0, 0);
timedFunc_set_2(sp44, (GenFunction_2)func_8031FB14, 0, 0);
}
else{//L802C5188
timedFunc_set_2(sp44, (GenMethod_2)func_8031F678, 0, 0);
timedFunc_set_2(sp44, (GenFunction_2)func_8031F678, 0, 0);
}//L802C51A0
timedFunc_set_1(sp44, (GenMethod_1)func_80335110, 1);
timedFunc_set_1(sp44, (GenFunction_1)func_80335110, 1);
}//L802C51B8
this->state = 6;
}
@@ -430,17 +430,17 @@ void func_802C4C14(Actor *this){
case 0://L802C52B8
func_8030E510(SFX_31_BANJO_OHHWAAOOO, 28000);
func_8030E540(SFX_135_CARTOONY_SPRING);
timedFunc_set_2(0.4f, (GenMethod_2)func_8030E510, SFX_13A_GLASS_BREAKING_7, 0x7fff);
timedFunc_set_2(0.9f, (GenMethod_2)func_8030E510, SFX_150_PORCELAIN_CRASH, 0x7fff);
timedFunc_set_2(1.0f, (GenMethod_2)func_8030E510, SFX_151_CAT_MEOW, 0x7fff);
timedFunc_set_2(0.4f, (GenFunction_2)func_8030E510, SFX_13A_GLASS_BREAKING_7, 0x7fff);
timedFunc_set_2(0.9f, (GenFunction_2)func_8030E510, SFX_150_PORCELAIN_CRASH, 0x7fff);
timedFunc_set_2(1.0f, (GenFunction_2)func_8030E510, SFX_151_CAT_MEOW, 0x7fff);
break;
case 1://L802C5320
timedFunc_set_2(0.4f, (GenMethod_2)func_8030E510, SFX_31_BANJO_OHHWAAOOO, 28000);
timedFunc_set_2(0.2f, (GenMethod_2)func_8030E510, SFX_E_SHOCKSPRING_BOING, 28000);
timedFunc_set_2(0.4f, (GenFunction_2)func_8030E510, SFX_31_BANJO_OHHWAAOOO, 28000);
timedFunc_set_2(0.2f, (GenFunction_2)func_8030E510, SFX_E_SHOCKSPRING_BOING, 28000);
func_8030E540(SFX_2D_KABOING);
break;
case 2://L802C5364
timedFunc_set_2(0.15f, (GenMethod_2)func_8030E510, SFX_32_BANJO_EGHEE, 28000);
timedFunc_set_2(0.15f, (GenFunction_2)func_8030E510, SFX_32_BANJO_EGHEE, 28000);
func_8030E510(SFX_3F6_UNKNOWN, 28000);
func_8030E540(SFX_8F_SNOWBALL_FLYING);
break;

View File

@@ -26,14 +26,14 @@ ActorAnimationInfo D_80372BE0[] ={
ActorInfo D_80372C18 = { //TEEHEE
MARKER_99_TEEHEE, ACTOR_CA_TEEHEE, ASSET_3CB_MODEL_TEEHEE,
0x1, D_80372BE0,
func_8035B900, func_80326224, func_80325888,
func_8035B900, func_80326224, actor_draw,
6500, 0, 0.9f, 0
};
ActorInfo D_80372C3C = { //PURPLE_TEEHEE (inside tumblar)
MARKER_296_TEEHEE_PURPLE, ACTOR_3C1_PURPLE_TEEHEE, ASSET_564_MODEL_PURPLE_TEEHEE,
0x1, D_80372BE0,
func_8035B900, func_8035BD48, func_80325888,
func_8035B900, func_8035BD48, actor_draw,
6500, 0, 0.9f, 0
};

View File

@@ -25,7 +25,7 @@ ActorInfo chGloop = {
/* .code */
Actor *chgloop_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = func_80325888(marker, gfx, mtx, vtx);
Actor *this = actor_draw(marker, gfx, mtx, vtx);
if(!marker->unk14_21)
return this;

View File

@@ -6,7 +6,7 @@
Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8035F138(Actor *this);
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
extern f32 func_80257204(f32, f32, f32, f32);
typedef struct {
@@ -50,8 +50,8 @@ Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
local = (ActorLocal_core2_D7D10 *)&this->local;
func_8033A45C(3, (s32) this->velocity[1]);
func_8033A45C(4, local->unk0);
modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, D_80373008, func_803257B4(marker));
return this;
}

View File

@@ -42,7 +42,7 @@ s32 D_80372BD4[3] = {200, 200, 255};
Actor *chicecube_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *actor = marker_getActor(marker);
func_8033A45C(3, actor->unk38_31);
actor = func_80325888(marker, gfx, mtx, vtx);
actor = actor_draw(marker, gfx, mtx, vtx);
return actor;
}
@@ -226,7 +226,7 @@ void __chicecube_die(ActorMarker *marker, ActorMarker *other_marker){
func_8035A04C(actor->position, 12, ASSET_505_MODEL_ICECUBE_CHUNK, actor->scale);
func_8035A228(actor->position, 6, ASSET_700_SPRITE_DUST, actor->scale);
if(actor->unkF4_8 != 1){
__spawnQueue_add_1((GenMethod_1)__chicecube_spawnHalfCubes, reinterpret_cast(s32, actor->marker));
__spawnQueue_add_1((GenFunction_1)__chicecube_spawnHalfCubes, reinterpret_cast(s32, actor->marker));
}
marker_despawn(actor->marker);
}

View File

@@ -62,8 +62,8 @@ void func_802C7AB0(ActorMarker * arg0, u32 arg1){
}
void func_802C7AF8(u32 x, u32 y, u32 z, u32 arg3){
__spawnQueue_add_4((GenMethod_4)func_802C41D8, ACTOR_4C_STEAM, x, y, z);
__spawnQueue_add_4((GenMethod_4)func_802C41D8, ACTOR_14F_DESTROYED_JIGGY, x, y, z);
__spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_4C_STEAM, x, y, z);
__spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_14F_DESTROYED_JIGGY, x, y, z);
mapSpecificFlags_set(arg3, 1);
}
@@ -80,10 +80,10 @@ void func_802C7B8C(Actor *this, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5
actor_collisionOff(this);
func_802BAFE4(arg3);
func_80356520(arg6);
timedFunc_set_4(0.6f, (GenMethod_4)func_802C7AF8, (s32)this->position[0], (s32)this->position[1], (s32)this->position[2], arg4);
timedFunc_set_2(0.6f, (GenMethod_2)func_802C7AB0, (s32)this->marker, arg5);
timedFunc_set_0(1.0f, (GenMethod_0)func_802BE720);
timedFunc_set_1(3.9f, (GenMethod_1)func_802C7B6C, arg4);
timedFunc_set_4(0.6f, (GenFunction_4)func_802C7AF8, (s32)this->position[0], (s32)this->position[1], (s32)this->position[2], arg4);
timedFunc_set_2(0.6f, (GenFunction_2)func_802C7AB0, (s32)this->marker, arg5);
timedFunc_set_0(1.0f, (GenFunction_0)func_802BE720);
timedFunc_set_1(3.9f, (GenFunction_1)func_802C7B6C, arg4);
mapSpecificFlags_set(arg1, 1);
}
}
@@ -109,7 +109,7 @@ Actor *chjiggy_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
func_8033A280(10.0f);
func_8033A244(30000.0f);
}
thisActor = func_80325888(this, gdl, mptr, arg3);
thisActor = actor_draw(this, gdl, mptr, arg3);
}
return thisActor;
}

View File

@@ -34,7 +34,7 @@ Actor *__chJigsawDance_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3
return thisActor;
}
else{
return func_80325888(this, gdl, mptr, arg3);
return actor_draw(this, gdl, mptr, arg3);
}
}

View File

@@ -24,11 +24,11 @@ ActorAnimationInfo chJinjoAnimations[] = {
{ASSET_31_ANIM_JINJO_JUMP, 0.75f}
};
ActorInfo chJinjoBlue = { MARKER_5A_JINJO_BLUE, ACTOR_60_JINJO_BLUE, ASSET_3C0_MODEL_JINJO_BLUE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo chJinjoGreen = { MARKER_5B_JINJO_GREEN, ACTOR_62_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo chJinjoYellow = { MARKER_5E_JINJO_YELLOW, ACTOR_5E_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo chJinjoPink = { MARKER_5D_JINJO_PINK, ACTOR_61_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo chJinjoOrange = { MARKER_5C_JINJO_ORANGE, ACTOR_5F_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo chJinjoBlue = { MARKER_5A_JINJO_BLUE, ACTOR_60_JINJO_BLUE, ASSET_3C0_MODEL_JINJO_BLUE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo chJinjoGreen = { MARKER_5B_JINJO_GREEN, ACTOR_62_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo chJinjoYellow = { MARKER_5E_JINJO_YELLOW, ACTOR_5E_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo chJinjoPink = { MARKER_5D_JINJO_PINK, ACTOR_61_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo chJinjoOrange = { MARKER_5C_JINJO_ORANGE, ACTOR_5F_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
enum asset_e __chJinjo_getMeetDialogId(enum marker_e marker_id){
switch(marker_id){

View File

@@ -107,7 +107,7 @@ Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
if(actor->state != 1 && actor->state != 5){
func_8033A45C(3, 0);
func_8033A45C(4, 0);
actor = func_80325888(marker, gfx, mtx, vtx);
actor = actor_draw(marker, gfx, mtx, vtx);
}
return actor;
@@ -325,7 +325,7 @@ void func_802D9D60(Actor *this){
this->unk38_0 = TRUE;
nodeprop_getPosition(node_prop, this->unk1C);
}
__spawnQueue_add_1((GenMethod_1)func_802D9C54, reinterpret_cast(s32, this->marker));
__spawnQueue_add_1((GenFunction_1)func_802D9C54, reinterpret_cast(s32, this->marker));
this->marker->propPtr->unk8_3 = FALSE;
this->marker->collidable = FALSE;
this->initialized = TRUE;

View File

@@ -42,7 +42,7 @@ Actor *func_802DA560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *actor = marker_getActor(marker);
ActorLocal_MoleHill * local = (ActorLocal_MoleHill *) &actor->local;
if(actor->unk16C_4){
actor = func_80325888(marker, gfx, mtx, vtx);
actor = actor_draw(marker, gfx, mtx, vtx);
func_8034A174(actor->marker->unk44, 5, actor->velocity);
func_8034A174(actor->marker->unk44, 6, actor->unk1C);
func_8034A174(actor->marker->unk44, 7, local->unk4);

View File

@@ -3,7 +3,7 @@
#include "variables.h"
extern Actor *func_8032813C(enum actor_e, f32[3], s32);
extern void func_80325794(ActorMarker *marker);
extern void actor_postdrawMethod(ActorMarker *marker);
Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chOverlayNoController_update(Actor *this);
@@ -35,8 +35,8 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt
actor = marker_getActor(marker);
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)actor);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
func_8024E258();
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};

View File

@@ -3,8 +3,8 @@
#include "variables.h"
extern void func_80328B8C(Actor *, s32, f32, s32);
extern void func_803253A0(Actor *);
extern void func_80325794(ActorMarker *);
extern void actor_predrawMethod(Actor *);
extern void actor_postdrawMethod(ActorMarker *);
extern Actor *func_8032813C(enum actor_e id, f32[3], s32);
@@ -45,8 +45,8 @@ Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx
if(D_8037DE84)
return actor;
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)actor);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
func_8024E258();
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};

View File

@@ -112,7 +112,7 @@ void chShrapnel_explode(ActorMarker *marker, ActorMarker *other_marker) {
this = marker_getActor(marker);
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32736, this->position, 1250, 2500);
__spawnQueue_add_1((GenMethod_1)chShrapnel_spawnExplodeActor, reinterpret_cast(s32, this));
__spawnQueue_add_1((GenFunction_1)chShrapnel_spawnExplodeActor, reinterpret_cast(s32, this));
chShrapnel_emitExplosion(this);
chShrapnel_emitSmoke(this);
chShrapnel_emitBodyParts(this, ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE, 2);
@@ -194,6 +194,6 @@ void chshrapnel_update(Actor *this) {
ActorInfo chShrapnelDescription = {
MARKER_65_SHRAPNEL, ACTOR_56_SHRAPNEL, ASSET_3EC_MODEL_SHRAPNEL,
0x1, chShrapnelAnimations,
chshrapnel_update, func_80326224, func_80325888,
chshrapnel_update, func_80326224, actor_draw,
2500, 0x333, 0.0f, 0
};

View File

@@ -29,7 +29,7 @@ f32 D_8037E640[3];
Actor *chSnowball_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
Actor *this;
this = func_80325888(marker, gfx, mtx, vtx);
this = actor_draw(marker, gfx, mtx, vtx);
if (marker->unk14_21 && this->state != 2) {
func_8033E73C(marker, 5, func_80329904);
func_8033E3F0(0xD, marker->unk14_21);

View File

@@ -51,7 +51,7 @@ Actor *chSnowman_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
local = (ActorLocal_chSirSlush *)&actor->local;
func_8033A45C(1, local->unk9);
func_8033A45C(2, local->unkA);
func_80325888(marker, gfx, mtx, vtx);
actor_draw(marker, gfx, mtx, vtx);
}
void __chSnowman_spawnSnowball(ActorMarker *marker){
@@ -186,7 +186,7 @@ void __chSnowman_deathCallback(ActorMarker *marker, ActorMarker *other_marker){
FUNC_8030E8B4(SFX_3EA_UNKNOWN, 1.0f, 30000, actor->position, 1500, 4500);
FUNC_8030E8B4(SFX_2F_ORANGE_SPLAT, 1.0f, 30000, actor->position, 1500, 4500);
__spawnQueue_add_1((GenMethod_1)__chSnowman_spawnHat, (s32)actor->marker);
__spawnQueue_add_1((GenFunction_1)__chSnowman_spawnHat, (s32)actor->marker);
if(map_get() == MAP_27_FP_FREEZEEZY_PEAK)
fp_sirslushgame_decRemaining();
__chSnowman_spawnSnowballParticles(actor->position, 0xC);
@@ -312,7 +312,7 @@ void chSnowman_update(Actor *this){
&& local->unkB
){
func_8030E878(SFX_8F_SNOWBALL_FLYING, randf2(0.95f, 1.05f), 30000, this->position, 800.0f, 3050.0f);
__spawnQueue_add_1((GenMethod_1)__chSnowman_spawnSnowball, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1)__chSnowman_spawnSnowball, (s32)this->marker);
local->unk9 = FALSE;
}

View File

@@ -8,7 +8,7 @@ void chSnowmanHat_update(Actor *this);
ActorInfo chSnowmanHat = {
MARKER_B3_SIR_SLUSH_HAT, ACTOR_126_SIR_SLUSH_HAT, ASSET_379_MODEL_SIRSLUSH_HAT,
0x1, NULL,
chSnowmanHat_update, func_80326224, func_80325888,
chSnowmanHat_update, func_80326224, actor_draw,
4500, 0, 1.0f, 0
};

View File

@@ -115,7 +115,7 @@ void func_802D096C(s32 arg0, s32 arg1, s32 arg2, s32 arg3){
}
void func_802D09B8(Actor *this, s32 arg1){
__spawnQueue_add_4((GenMethod_4)func_802D096C,
__spawnQueue_add_4((GenFunction_4)func_802D096C,
reinterpret_cast(s32, this->position[0]),
reinterpret_cast(s32, this->position[1]),
reinterpret_cast(s32, this->position[2]),

View File

@@ -237,6 +237,6 @@ void chTermite_update(Actor *this) {
ActorInfo chTermite = {
MARKER_4_TERMITE, ACTOR_5_TERMITE, ASSET_350_MODEL_TERMITE,
0x1, chTermiteAnimations,
chTermite_update, func_80326224, func_80325888,
chTermite_update, func_80326224, actor_draw,
2000, 0, 0.0f, 0
};

View File

@@ -28,7 +28,7 @@ Actor *chtrainers_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = marker_getActor(marker);
if( !this->unk10_12 )
return this;
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}

View File

@@ -29,7 +29,7 @@ Actor *chwadingboots_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
if(!this->unk10_12) return this;
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
void chwadingboots_update(Actor *this){

View File

@@ -8,7 +8,7 @@ void chwhipcrack_update(Actor *this);
ActorInfo D_80373100 = {
MARKER_1C5_WHIPCRACK, ACTOR_30F_WHIPCRACK, ASSET_4FD_MODEL_WHIPCRACK,
0, NULL,
chwhipcrack_update, NULL, func_80325888,
chwhipcrack_update, NULL, actor_draw,
0, 0, 0.0f, 0
};
@@ -69,10 +69,10 @@ void __chwhipcrack_spawnSmoke(Actor *this, s32 cnt){
void __chwhipcrack_setState(Actor *this, s32 next_state){
if(next_state == 1)
func_80335924(this->unk148, ASSET_22A_ANIM_WHIPCRACK_IDLE, 0.5f, 1.0f);
skeletalAnim_set(this->unk148, ASSET_22A_ANIM_WHIPCRACK_IDLE, 0.5f, 1.0f);
if(next_state == 2)
func_80335924(this->unk148, ASSET_229_ANIM_WHIPCRACK_ATTACK, 0.5f, 1.0f);
skeletalAnim_set(this->unk148, ASSET_229_ANIM_WHIPCRACK_ATTACK, 0.5f, 1.0f);
if(next_state == 3){
__chwhipcrack_spawnPieces(this, ASSET_4FE_MODEL_WHIPCRACK_PART_1, 4);
@@ -113,7 +113,7 @@ void chwhipcrack_update(Actor *this){
}
if(this->state == 2){
func_8033568C(this->unk148, &sp44, &sp40);
skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40);
if((sp44 < 0.13) && (0.13 <= sp40)){
func_8030E878(SFX_69_WHIPCRACK_CREAKING, randf2(1.05f, 1.1f), 15000, this->position, 500.0f, 1000.0f);
}

View File

@@ -1,132 +0,0 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
typedef struct {
s32 unk0;
s16 unk4;
u8 unk6;
u8 pad7[1];
}struct10E0s;
/* .bss */
struct10E0s D_80379E20[340];
/* .code */
void func_80288070(void){
int i;
for(i = 0; i<340; i++){
D_80379E20[i].unk6 = 0;
D_80379E20[i].unk0 = 0;
D_80379E20[i].unk4 = 0;
}
}
void func_802880C0(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].unk6){
if(D_80379E20[i].unk0){
func_8033A6F0(D_80379E20[i].unk0);
}
}
}
}
void func_80288120(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){
if(D_80379E20[i].unk4 < 0x3b){
func_8033A6F0(D_80379E20[i].unk0);
D_80379E20[i].unk0 = 0;
if(func_80254BC4(1)){
break;
}
}
}
}
}
void func_802881AC(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].unk6){
func_803203FC(0);
D_80379E20[i].unk4 = 0;
func_8033A6F0(D_80379E20[i].unk0);
D_80379E20[i].unk0 = 0;
}
}
}
void func_80288210(void){
int i;
for(i = 0; i<340; i++){
if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){
if(--D_80379E20[i].unk4 <= 0){
func_8033A6F0(D_80379E20[i].unk0);
D_80379E20[i].unk0 = 0;
}
}
}
}
s16 func_80288298(void){
int i;
for(i = 0; i<340; i++){
if(!D_80379E20[i].unk6){
return i;
}
}
return -1;
}
s16 func_80288330(void){
int indx = func_80288298();
D_80379E20[indx].unk6 = 1;
D_80379E20[indx].unk4 = 0;
D_80379E20[indx].unk0 = 0;
return indx;
}
int func_80288374(s16 arg0){
return (D_80379E20[arg0].unk0) ? 1 : 0;
}
void func_802883AC(s16 arg0){
if(D_80379E20[arg0].unk0){
func_8033A6F0(D_80379E20[arg0].unk0);
}
D_80379E20[arg0].unk6 = 0;
D_80379E20[arg0].unk0 = 0;
D_80379E20[arg0].unk4 = 0;
}
int func_80288400(s16 arg0, s32 *arg1){
D_80379E20[arg0].unk4 = 0x3C;
if(D_80379E20[arg0].unk0){
*arg1 = D_80379E20[arg0].unk0;
return FALSE;
}else{
D_80379E20[arg0].unk0 = func_8033A710();
*arg1 = D_80379E20[arg0].unk0;
return TRUE;
}
}
void func_80288470(void){
int i;
for(i = 0; i < 340; i++){
if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){
D_80379E20[i].unk0 = func_8033A9E4(D_80379E20[i].unk0);
}
}
}

View File

@@ -889,7 +889,7 @@ void func_8029CBC4(void){
void func_8029CBF4(void){
if(item_getCount(ITEM_E_JIGGY) == 10){
if( jiggyscore_total() == 100 && fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY)){
timedFunc_set_3(4.1f, (GenMethod_3)func_802E4078, MAP_95_CS_END_ALL_100, 0, 1);
timedFunc_set_3(4.1f, (GenFunction_3)func_802E4078, MAP_95_CS_END_ALL_100, 0, 1);
}//L8029CC58
timedFunc_set_0(4.0f, func_8029CBC4);

View File

@@ -4,13 +4,13 @@
#include "animation.h"
AnimationFile *animcache_get(enum asset_e assest_id);
AnimationFile *animBinCache_get(enum asset_e assest_id);
/* .data */
s16 D_803635C0[] = {0x1, 0x3, 0x5, 0xC, 0xE, 0x17, 0x18, 0x19, 0x1A, 0x1C, 0x1D, 0};
/* .bss */
AnimationCache D_8037A8C0[0x2CA];
AnimationFileCache D_8037A8C0[0x2CA];
/* .code */
void func_802884E0(void){
@@ -22,16 +22,16 @@ void func_802884E0(void){
}
}
void animcache_loadAll(void){
void animBinCache_loadAll(void){
s32 i;
for(i = 0; i < 0x2CA; i++){
if(D_8037A8C0[i].unk4_0){
animcache_get(i);
animBinCache_get(i);
}
}
}
AnimationFile *animcache_get(enum asset_e asset_id){
AnimationFile *animBinCache_get(enum asset_e asset_id){
if(!D_8037A8C0[asset_id].unk0){
D_8037A8C0[asset_id].unk0 = (AnimationFile *) assetcache_get(asset_id);
}
@@ -39,7 +39,7 @@ AnimationFile *animcache_get(enum asset_e asset_id){
return D_8037A8C0[asset_id].unk0;
}
void animcache_free(void){
void animBinCache_free(void){
s32 i;
for(i = 0; i < 0x2CA; i++){
if(D_8037A8C0[i].unk0){
@@ -48,7 +48,7 @@ void animcache_free(void){
}
}
void animcache_init(void){
void animBinCache_init(void){
s32 i = 0;
for(i = 0; i < 0x2CA; i++){
D_8037A8C0[i].unk0 = NULL;
@@ -56,7 +56,7 @@ void animcache_init(void){
D_8037A8C0[i].unk4_0 = 0;
}
func_802884E0();
animcache_loadAll();
animBinCache_loadAll();
}
void func_8028873C(s32 arg0){

View File

@@ -6,116 +6,117 @@
//function declarations
void anim_setIndex(Animation *this, enum asset_e arg1);
s32 anim_802897A0(Animation *this);
s32 func_802892FC(Animation *this);
void func_8033AA50(s32, f32, s32);
void func_8033A750(s32, s32, s32, f32);
void anim_drawSetup(Animation *this);
void animationFile_getBoneTransformList(s32, f32, s32);
void boneTransformList_interpolate(s32, s32, s32, f32);
//function definitions
void func_802891D0(Animation *this, s32 arg1){
static void __anim_resetTransform(Animation *this, s32 arg1){
s32 *tmp;
if(func_80288400(this->unkA[arg1], &tmp) == 0){
func_8033A510(tmp);
if(animCache_getBoneTransformList(this->animcache_index[arg1], &tmp) == 0){
boneTransformList_reset(tmp);
};
}
void func_8028920C(Animation *this){
func_802891D0(this, this->unk8);
void __anim_resetCurrentTransform(Animation *this){
__anim_resetTransform(this, this->unk8);
}
void func_8028922C(Animation *this){
func_802891D0(this, 2);
void __anim_resetTargetTransform(Animation *this){
__anim_resetTransform(this, 2);
}
s32 func_8028924C(Animation *this, s32 arg1){
return func_80288374(this->unkA[arg1]);
s32 __anim_transformInUse(Animation *this, s32 arg1){
return animCache_inUse(this->animcache_index[arg1]);
}
s32 func_80289274(Animation *this){
return func_8028924C(this, this->unk8);
s32 __anim_currentTransformInUse(Animation *this){
return __anim_transformInUse(this, this->unk8);
}
s32 func_80289294(Animation *this){
return func_8028924C(this, (this->unk8 != 0)? 0: 1);
s32 __anim_startTransformInUse(Animation *this){
return __anim_transformInUse(this, (this->unk8 != 0)? 0: 1);
}
s32 func_802892CC(Animation *this, s32 arg1){
s32 tmp;
func_80288400(this->unkA[arg1], &tmp);
BoneTransformList *anim_getTransform(Animation *this, s32 index){
BoneTransformList *tmp;
animCache_getBoneTransformList(this->animcache_index[index], &tmp);
return tmp;
}
s32 func_802892FC(Animation *this){
return func_802892CC(this, this->unk8);
BoneTransformList *animcache_getCurrentTransform(Animation *this){
return anim_getTransform(this, this->unk8);
}
s32 func_8028931C(Animation *this){
return func_802892CC(this, (this->unk8 != 0)? 0: 1);
BoneTransformList *anim_getStartTransform(Animation *this){
return anim_getTransform(this, (this->unk8 != 0)? 0: 1);
}
s32 func_80289354(Animation *this){
return func_802892CC(this, 2);
BoneTransformList *anim_getTargetTransform(Animation *this){
return anim_getTransform(this, 2);
}
void func_80289374(Animation *this){
if(this->unk1C == 1 && func_80289274(this)){
this->unk8 = (this->unk8)? 0 : 1;
void __anim_update_doubleBuffer(Animation *this){
if(this->reset == 1 && __anim_currentTransformInUse(this)){
this->unk8 = (this->unk8)? 0 : 1; //swap current transform and start transfrom
}
this->unk1C = 0;
if( this->duration < 1.0f && func_80289294(this)){
func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this));
func_8033A750(func_802892FC(this), func_8028931C(this), func_802892FC(this), this->duration);
this->reset = 0;
if( this->duration < 1.0f && __anim_startTransformInUse(this)){
animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this));
boneTransformList_interpolate(animcache_getCurrentTransform(this), anim_getStartTransform(this), animcache_getCurrentTransform(this), this->duration);
}
else{
func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this));
animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this));
}
}
void func_8028948C(Animation *this){
if(this->unk1C == 1 && this->unk1E == 0){
if(func_80289274(this)){
this->unk8 = (this->unk8)? 0 : 1;
func_8028922C(this);
void __anim_update_tripleBuffer(Animation *this){
if(this->reset == 1 && this->unk1E == 0){
//smooth a current Xfrom become startXform
if(__anim_currentTransformInUse(this)){
this->unk8 = (this->unk8)? 0 : 1;//swap current transform and start transfrom
__anim_resetTargetTransform(this);
}
}
else{
if(this->unk1C == 2)
func_8028920C(this);
//not smooth
if(this->reset == 2)
__anim_resetCurrentTransform(this);
}
this->unk1C = 0;
if( this->duration < 1.0f && func_80289294(this) && !this->unk1E){
func_8033AA50(animcache_get(this->index), this->timer, func_80289354(this));
func_8033A750(func_802892FC(this), func_8028931C(this), func_80289354(this), this->duration);
this->reset = 0;
if( this->duration < 1.0f && __anim_startTransformInUse(this) && !this->unk1E){
animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, anim_getTargetTransform(this));
boneTransformList_interpolate(animcache_getCurrentTransform(this), anim_getStartTransform(this), anim_getTargetTransform(this), this->duration);
}
else{
func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this));
animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this));
if(this->unk1E && this->index)
this->unk1E = 0;
}
}
void func_802895F8(Animation *this){
if(this->unk1D == 1){
func_8028948C(this);
void anim_update(Animation *this){
if(this->triple_buffer == 1){
__anim_update_tripleBuffer(this);
}
else{
func_80289374(this);
__anim_update_doubleBuffer(this);
}
if(this->matrices){
(*(this->matrices))(func_802892FC(this), this->unk4);
(*(this->matrices))(animcache_getCurrentTransform(this), this->unk4);
}
anim_802897A0(this);
anim_drawSetup(this);
}
void func_80289674(Animation *this){
this->unk1C = 1;
void anim_resetSmooth(Animation *this){
this->reset = 1;
}
s32 func_80289680(void){
return 0x20;
size_t anim_getSize(void){
return sizeof(Animation);
}
enum asset_e anim_getIndex(Animation *this){
@@ -130,27 +131,27 @@ f32 anim_getDuration(Animation *this){
return this->duration;
}
void func_802896A0(Animation *this){
func_802883AC(this->unkA[0]);
func_802883AC(this->unkA[1]);
if(this->unk1D == 1){
func_802883AC(this->unkA[2]);
void anim_release(Animation *this){
animCache_release(this->animcache_index[0]);
animCache_release(this->animcache_index[1]);
if(this->triple_buffer == 1){
animCache_release(this->animcache_index[2]);
}
}
void func_802896EC(Animation *this, s32 arg1){
this->unk1D = arg1;
void anim_new(Animation *this, bool triple_buffer){
this->triple_buffer = triple_buffer;
anim_setIndex(this,0);
anim_setTimer(this, 0.0f);
anim_setDuration(this, 1.0f);
anim_80289790(this, NULL);
this->unk1C = 0;
this->reset = 0;
this->unk1E = 1;
this->unk8 = 0;
this->unkA[0] = func_80288330();
this->unkA[1] = func_80288330();
if(this->unk1D == 1){
this->unkA[2] = func_80288330();
this->animcache_index[0] = animCache_getNew();
this->animcache_index[1] = animCache_getNew();
if(this->triple_buffer == 1){
this->animcache_index[2] = animCache_getNew(); //target_bone_transform_list
}
}
@@ -170,18 +171,18 @@ void anim_80289798(Animation *this, s32 arg1){
this->unk4 = arg1;
}
s32 anim_802897A0(Animation *this){
return func_8033A238(func_802892FC(this));
void anim_drawSetup(Animation *this){
modelRender_setBoneTransformList(animcache_getCurrentTransform(this));
}
void anim_setDuration(Animation *this, f32 arg1){
this->duration = arg1;
}
void anim_802897D4(Animation *this, BKAnimationList *arg0, Animation *dst){
func_802EA1A8(this, arg0, func_802892FC(dst));
void anim_802897D4(AnimMtxList *this, BKAnimationList *arg0, Animation *dst){
animMtxList_setBoned(this, arg0, animcache_getCurrentTransform(dst));
}
void anim_8028980C(Animation *this){
this->unk1C = 2;
void anim_resetNow(Animation *this){
this->reset = 2;
}

View File

@@ -422,7 +422,7 @@ void func_802BAFE4(s32 arg0) {
temp_f0 = func_802BAFA0(arg0, phi_s1);
switch(D_803654B8[arg0][phi_s1 + 1]){
case -5:
timedFunc_set_6(temp_f0, (GenMethod_6) func_802BAF80, NULL);
timedFunc_set_6(temp_f0, (GenFunction_6) func_802BAF80, NULL);
phi_s0++;
break;

View File

@@ -355,7 +355,7 @@ void func_802BC2CC(s32 arg0) {
viewport_setPosition(D_8037D908);
viewport_setRotation(D_8037D918);
viewport_update();
__spawnQueue_add_2((GenMethod_2)func_802BC2A0, reinterpret_cast(s32, sp24), reinterpret_cast(s32, sp20));
__spawnQueue_add_2((GenFunction_2)func_802BC2A0, reinterpret_cast(s32, sp24), reinterpret_cast(s32, sp20));
if (ncCameraType == CAMERA_TYPE_2_DYNAMIC) {
func_802BE720();
if (sp1C != 0x63) {

View File

@@ -14,13 +14,13 @@ void chHoneycomb_update(Actor *this);
/* .data */
ActorInfo D_80366C80 = { MARKER_53_EMPTY_HONEYCOMB, ACTOR_47_EMPTY_HONEYCOMB, ASSET_361_MODEL_EMPTY_HONEYCOMB,
0, NULL,
chHoneycomb_update, func_80326224, func_80325888,
chHoneycomb_update, func_80326224, actor_draw,
0, 0, 0.8f, 0
};
ActorInfo D_80366CA4 = { MARKER_55_HONEYCOMB, ACTOR_50_HONEYCOMB, ASSET_363_MODEL_HONEYCOMB,
0, NULL,
chHoneycomb_update, func_80326224, func_80325888,
chHoneycomb_update, func_80326224, actor_draw,
0, 0, 0.8f, 0
};

View File

@@ -52,7 +52,7 @@ Actor *func_802CA7BC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
rotation[1] = this->yaw;
rotation[2] = this->roll;
sp44 = ml_map_f(sp54[1] - sp40, 0.0f, 300.0f, 0.43f, 0.28f);
modelRender_preDraw((GenMethod_1)func_802CA790, (s32)this);
modelRender_preDraw((GenFunction_1)func_802CA790, (s32)this);
modelRender_draw(gfx, mtx, this->position, rotation, sp44, NULL, func_80330B1C(marker));
return this;
}

View File

@@ -10,21 +10,21 @@ void func_802CAB70(Actor *this);
extern ActorInfo D_80366F20 = {
0x0D4, ACTOR_B_SHOCKSPRING_PAD, ASSET_489_MODEL_SHOCKSPRING_PAD,
0, NULL,
func_802CA9D0, func_80326224, func_80325888,
func_802CA9D0, func_80326224, actor_draw,
0, 0, 0.0f, 0
};
extern ActorInfo D_80366F44 = {
MARKER_45_FLIGHT_PAD, ACTOR_E4_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD,
0, NULL,
func_802CAA44, func_80326224, func_80325888,
func_802CAA44, func_80326224, actor_draw,
0, 0, 0.0f, 0
};
extern ActorInfo D_80366F68 = {
MARKER_261_FIGHT_FLIGHT_PAD, ACTOR_39F_FIGHT_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD,
0, NULL,
func_802CAB70, func_80326224, func_80325888,
func_802CAB70, func_80326224, actor_draw,
0, 0, 0.0f, 0
};

View File

@@ -7,7 +7,6 @@ extern f32 func_802575BC(f32);
extern f32 func_80309B24(f32[3]);
extern void func_8030DBB4(u8, f32);
extern void func_802CC340(Actor *, f32[3]);
extern void func_80335A8C(void *, s32);
extern bool func_80320DB0(f32[3], f32, f32[3], u32);
typedef struct {
@@ -148,8 +147,8 @@ void func_802CC640(Actor *this, s32 next_state) {
local = (ActorLocal_Core2_45310 *)&this->local;
if (this->state == 0) {
func_80335924(this->unk148, 0xF9, 0.0f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0xF9, 0.0f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
this->state = next_state;
local->unk36 = 0;
@@ -160,8 +159,8 @@ void func_802CC640(Actor *this, s32 next_state) {
}
if (this->state == 2) {
func_80335924(this->unk148, 0xF9, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0xF9, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
for(phi_s0 = 0; phi_s0 < 10; phi_s0++){
sp54[0] = this->position[0];
sp54[1] = (f32) local->unk30[1];
@@ -190,8 +189,8 @@ void func_802CC640(Actor *this, s32 next_state) {
if (this->state == 5) {
func_8028F55C(1, this->marker);
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
func_80335924(this->unk148, 0xF9, 0.4f, 1.0f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0xF9, 0.4f, 1.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
timed_playSfx(0.8f, 0x3FC, randf2(0.97f, 1.05f), 32000);
local->unk3A = 0;
local->unk28 = 2.0f;
@@ -206,8 +205,8 @@ void func_802CC640(Actor *this, s32 next_state) {
this->marker->collidable = FALSE;
this->unk10_1 = FALSE;
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
func_80335924(this->unk148, 0x110, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0x110, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
local->unk36 = 0x3E8;
local->unk3A = 0;
}
@@ -254,7 +253,7 @@ Actor *func_802CCA7C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
} else {
this->alpha_124_19 = 0xff;
}
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_802CCBC8(Actor *this) {
@@ -379,10 +378,10 @@ void func_802CCC5C(Actor *this) {
if (this->state == 2) {
local->unk3A = 1;
} else if (this->state == 3) {
if (func_8033567C(this->unk148) != 0x10E) {
func_80335924(this->unk148, 0x10E, 0.2f, 0.75f);
func_80335A8C(this->unk148, 2);
} else if (0.575 <= func_80335684(this->unk148)) {
if (skeletalAnim_getAnimId(this->unk148) != 0x10E) {
skeletalAnim_set(this->unk148, 0x10E, 0.2f, 0.75f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
} else if (0.575 <= skeletalAnim_getProgress(this->unk148)) {
local->unk3A = 1;
}
}
@@ -413,14 +412,14 @@ void func_802CCC5C(Actor *this) {
sp9C = func_802575BC(local->unk4);
ml_interpolate_vec3f(this->position, local->unk8, local->unk18, sp9C);
this->yaw = local->unk14 + (sp9C * (local->unk24 - local->unk14));
if ((func_8033567C(this->unk148) == 0x10E) && (func_80335794(this->unk148) > 0)) {
func_80335924(this->unk148, 0x10F, 0.1f, 0.45f);
func_80335A8C(this->unk148, 1);
if ((skeletalAnim_getAnimId(this->unk148) == 0x10E) && (skeletalAnim_getLoopCount(this->unk148) > 0)) {
skeletalAnim_set(this->unk148, 0x10F, 0.1f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
if( (local->unk3A == 0)
|| ((func_8033567C(this->unk148) == 0x10F) && (0.7 <= local->unk4))) {
func_80335924(this->unk148, 0xF9, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
|| ((skeletalAnim_getAnimId(this->unk148) == 0x10F) && (0.7 <= local->unk4))) {
skeletalAnim_set(this->unk148, 0xF9, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
if (this->state == 3) {
if (0.2 <= local->unk4) {
@@ -490,7 +489,7 @@ void func_802CCC5C(Actor *this) {
this->yaw += 10.0f * spB8;
}
if (this->state == 6) {
if (func_8033567C(this->unk148) == 0x110) {
if (skeletalAnim_getAnimId(this->unk148) == 0x110) {
sp40[0] = this->position[0] - spC4[0];
sp40[1] = this->position[1] - spC4[1];
sp40[2] = this->position[2] - spC4[2];
@@ -503,12 +502,12 @@ void func_802CCC5C(Actor *this) {
local->unk36 -= 3000.0f * spB8;
if (this->position[1] < func_80309724(this->position)) {
this->position[1] = func_80309724(this->position);
func_80335924(this->unk148, 0x111, 0.1f, 1.0f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, 0x111, 0.1f, 1.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
timed_playSfx(0.1f, SFX_66_BIRD_AUUGHH, 1.6f, 32000);
}
} else if (func_80335794(this->unk148) > 0) {
} else if (skeletalAnim_getLoopCount(this->unk148) > 0) {
spBC = 7;
}
}

View File

@@ -489,7 +489,7 @@ Actor *chMumbo_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
func_8033A45C(7, (this->unk60 == 1.0f));
func_8033A45C(8, (this->unk60 == 2.0f));
func_8033A45C(9, 0);
out = func_80325888(marker, gfx, mtx, vtx);
out = actor_draw(marker, gfx, mtx, vtx);
if( marker->unk14_21 && out->state == 8){
if( actor_animationIsAt(out, 0.2f)
|| actor_animationIsAt(out, 0.28f)

View File

@@ -5,11 +5,11 @@
void chMumboSign_update(Actor *this);
/* .data */
ActorInfo D_80367530 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_368_5_MUMBO_TOKEN_SIGN, ASSET_301_MODEL_5_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367554 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36B_10_MUMBO_TOKEN_SIGN, ASSET_302_MODEL_10_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367578 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36A_15_MUMBO_TOKEN_SIGN, ASSET_303_MODEL_15_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_8036759C = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_369_20_MUMBO_TOKEN_SIGN, ASSET_304_MODEL_20_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_803675C0 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN, ASSET_305_MODEL_25_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367530 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_368_5_MUMBO_TOKEN_SIGN, ASSET_301_MODEL_5_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367554 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36B_10_MUMBO_TOKEN_SIGN, ASSET_302_MODEL_10_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367578 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36A_15_MUMBO_TOKEN_SIGN, ASSET_303_MODEL_15_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_8036759C = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_369_20_MUMBO_TOKEN_SIGN, ASSET_304_MODEL_20_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_803675C0 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN, ASSET_305_MODEL_25_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
void chMumboSign_update(Actor *this) {
if (!this->unk16C_4) {

View File

@@ -82,22 +82,22 @@ ActorAnimationInfo D_803676B0[] = {
{0x217, 0.3f}
};
ActorInfo D_80367760 = { 0x26E, 0x2D9, 0x3B4, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
ActorInfo D_80367784 = { 0x26F, 0x2DA, 0x3B5, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
ActorInfo D_803677A8 = { MARKER_168_ICE_KEY, ACTOR_25D_ICE_KEY, ASSET_50C_MODEL_ICE_KEY, 0x1, NULL, func_802D4250, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
ActorInfo D_80367760 = { 0x26E, 0x2D9, 0x3B4, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0};
ActorInfo D_80367784 = { 0x26F, 0x2DA, 0x3B5, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0};
ActorInfo D_803677A8 = { MARKER_168_ICE_KEY, ACTOR_25D_ICE_KEY, ASSET_50C_MODEL_ICE_KEY, 0x1, NULL, func_802D4250, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0};
ActorInfo D_803677CC = { 0x233, 0x23D, 0x4DD, 0x12, D_803676B0, func_802D4388, func_80326224, func_802D4588, 0, 0, 0.0f, 0};
ActorInfo D_803677F0 = { 0x16A, 0x242, 0x0, 0x0, NULL, func_802D4680, NULL, func_80325340, 0, 0, 0.0f, 0};
ActorInfo D_80367814 = { MARKER_169_SNS_EGG, ACTOR_25E_SNS_EGG, ASSET_50D_MODEL_SNS_EGG, 0x1, NULL, func_802D3FD4, NULL, func_802D41C4, 0, 0, 0.0f, 0};
ActorInfo D_80367838 = { 0x265, 0x2E4, 0x55A, 0x1, NULL, func_802D3DA4, NULL, func_802D3F48, 0, 0, 0.0f, 0};
ActorInfo D_8036785C = { MARKER_103_MM_WITCH_SWITCH, ACTOR_204_MM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4B94, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367880 = { MARKER_104_MMM_WITCH_SWITCH, ACTOR_206_MMM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C34, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_803678A4 = { MARKER_105_TTC_WITCH_SWITCH, ACTOR_208_TTC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C5C, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_803678C8 = { MARKER_106_RBB_WITCH_SWITCH, ACTOR_20B_RBB_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C84, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_803678EC = { MARKER_22A_CCW_WITCH_SWITCH, ACTOR_237_CCW_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CAC, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367910 = { MARKER_22B_FP_WITCH_SWITCH, ACTOR_239_FP_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CD4, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367934 = { MARKER_166_CC_WITCH_SWITCH, ACTOR_25B_CC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BBC, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_80367958 = { MARKER_162_BGS_WITCH_SWITCH, ACTOR_257_BGS_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BE4, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_8036797C = { MARKER_161_GV_WITCH_SWITCH, ACTOR_256_GV_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C0C, func_80326224, func_80325888, 0, 0, 0.0f, 0};
ActorInfo D_8036785C = { MARKER_103_MM_WITCH_SWITCH, ACTOR_204_MM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4B94, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367880 = { MARKER_104_MMM_WITCH_SWITCH, ACTOR_206_MMM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C34, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_803678A4 = { MARKER_105_TTC_WITCH_SWITCH, ACTOR_208_TTC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C5C, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_803678C8 = { MARKER_106_RBB_WITCH_SWITCH, ACTOR_20B_RBB_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C84, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_803678EC = { MARKER_22A_CCW_WITCH_SWITCH, ACTOR_237_CCW_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CAC, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367910 = { MARKER_22B_FP_WITCH_SWITCH, ACTOR_239_FP_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CD4, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367934 = { MARKER_166_CC_WITCH_SWITCH, ACTOR_25B_CC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BBC, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_80367958 = { MARKER_162_BGS_WITCH_SWITCH, ACTOR_257_BGS_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BE4, func_80326224, actor_draw, 0, 0, 0.0f, 0};
ActorInfo D_8036797C = { MARKER_161_GV_WITCH_SWITCH, ACTOR_256_GV_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C0C, func_80326224, actor_draw, 0, 0, 0.0f, 0};
s32 D_803679A0[4] = {0x87, 0x87, 0x87, 0xA0};
s16 D_803679B0[] = {0x5, 0x90, 0xA, 0x93, 0xF,0x92, 0x14, 0x91, 0x19, 0x94, -1};
@@ -400,7 +400,7 @@ Actor *func_802D3F48(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
for(i = 0; i < 9; i++){
func_8033A45C(i + 1, i+1 == phi_s2);
}
return func_80325E78(marker, gfx, mtx, vtx);
return actor_drawFullDepth(marker, gfx, mtx, vtx);
}
void func_802D3FD4(Actor *this){
@@ -466,7 +466,7 @@ Actor *func_802D41C4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C(i+1, FALSE);
}
func_8033A45C(sp2C, TRUE);
return func_80325E78(marker, gfx, mtx, vtx);
return actor_drawFullDepth(marker, gfx, mtx, vtx);
}
void func_802D4250(Actor *this){
@@ -541,7 +541,7 @@ Actor *func_802D4588(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
phi_a1 = (marker_getActor(marker)->unk38_0) ? ((func_8023DB5C() & 4) != 0) ? 1 : 2 : 2;
func_8033A45C(1, phi_a1);
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
bool func_802D4608(void){
@@ -554,7 +554,7 @@ void func_802D4614(enum map_e map_id){
D_803676AC = TRUE;
func_8028F918(2);
func_8025A788(COMUSIC_69_FF_WARP, 0.0f, 1.7f);
timedFunc_set_2(1.0f, (GenMethod_2) func_8031CC40, map_id, 2);
timedFunc_set_2(1.0f, (GenFunction_2) func_8031CC40, map_id, 2);
}
void func_802D4680(Actor *this){
@@ -744,7 +744,7 @@ void func_802D4D3C(enum actor_e arg0, enum actor_e arg1) {
func_8030E6D4(SFX_1B_EXPLOSION_1);
}
else{
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM,
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM,
reinterpret_cast(s32, sp5C[0]),
reinterpret_cast(s32, sp5C[1]),
reinterpret_cast(s32, sp5C[2])
@@ -775,7 +775,7 @@ void func_802D5058(enum map_e map_id, s32 arg1, bool arg2) {
D_8036769C = 0;
D_803676A0 = 0;
if (map_id != D_80367694) {
timedFunc_set_1(0.25f, (GenMethod_1)func_802D5000, map_id);
timedFunc_set_1(0.25f, (GenFunction_1)func_802D5000, map_id);
} else {
timedFunc_set_0(0.25f, func_802D63D4);
}
@@ -913,21 +913,21 @@ void func_802D5628(void){
switch(D_8036768C){
case 0x1: // L802D57C8
if(!D_80367690){
timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x34, 0x205);
timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x34, 0x205);
D_80367690++;
}
break;
case 0x2: // L802D5808
if(!D_80367690){
timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x39, 0x207);
timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x39, 0x207);
D_80367690++;
}
break;
case 0x3: // L802D5848
if(!D_80367690){
timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x36, 0x20a);
timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x36, 0x20a);
D_80367690++;
}
break;
@@ -935,14 +935,14 @@ void func_802D5628(void){
case 0x4: // L802D5888
func_802D5260();
if(!D_80367690){
timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x3b, 0x20c);
timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x3b, 0x20c);
D_80367690++;
}
break;
case 0x12: // L802D58D0
if(!D_80367690){
timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x3c, 0x238);
timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x3c, 0x238);
D_80367690++;
}
break;
@@ -1141,7 +1141,7 @@ void func_802D6264(f32 delay, enum map_e map_id, s32 arg2, s32 arg3, s32 arg4, e
D_803676A0 = 0;
if(map_id != D_80367694){
timedFunc_set_1(delay, (GenMethod_1) func_802D61FC, map_id);
timedFunc_set_1(delay, (GenFunction_1) func_802D61FC, map_id);
}
else{
timedFunc_set_0(delay, func_802D63D4);

View File

@@ -21,35 +21,35 @@ ActorAnimationInfo D_80367B50[] = {
ActorInfo D_80367B80 = {
MARKER_36_ORANGE_COLLECTIBLE, ACTOR_29_ORANGE_COLLECTIBLE, ASSET_2D2_MODEL_ORANGE,
0x5, NULL,
chLevelCollectible_update, func_80326224, func_80325888,
chLevelCollectible_update, func_80326224, actor_draw,
0, 0, 0.6f,0
};
ActorInfo D_80367BA4 = {
MARKER_37_GOLD_BULLION, ACTOR_2A_GOLD_BULLION, ASSET_3C7_MODEL_GOLD_BULLION,
0x5, NULL,
chLevelCollectible_update, func_80326224, func_80325888,
chLevelCollectible_update, func_80326224, actor_draw,
0, 0, 0.6f, 0
};
ActorInfo D_80367BC8 = {
MARKER_1FD_BLUE_PRESENT_COLLECTIBLE, ACTOR_1ED_BLUE_PRESENT_COLLECTIBLE, ASSET_47F_MODEL_XMAS_GIFT_BLUE,
0x5, D_80367B50,
chLevelCollectible_update, func_80326224, func_80325888,
chLevelCollectible_update, func_80326224, actor_draw,
0, 0, 1.8f, 0
};
ActorInfo D_80367BEC = {
MARKER_1FE_GREEN_PRESENT_COLLECTIBLE, ACTOR_1EF_GREEN_PRESENT_COLLECTIBLE, ASSET_480_MODEL_XMAS_GIFT_GREEN,
0x5, D_80367B50,
chLevelCollectible_update, func_80326224, func_80325888,
chLevelCollectible_update, func_80326224, actor_draw,
0, 0, 1.4f, 0
};
ActorInfo D_80367C10 = {
MARKER_1FF_RED_PRESENT_COLLECTIBLE, ACTOR_1F1_RED_PRESENT_COLLECTIBLE, ASSET_481_MODEL_XMAS_GIFT_RED,
0x5, D_80367B50,
chLevelCollectible_update, func_80326224, func_80325888,
chLevelCollectible_update, func_80326224, actor_draw,
0, 0, 1.4f, 0
};
@@ -145,7 +145,7 @@ void __chLevelCollectible_collide(ActorMarker *marker, ActorMarker *other_marker
break;
}
if (dialog_id != 0) {
timedFunc_set_1(0.5f, (GenMethod_1)__chLevelCollectible_callDialog, dialog_id);
timedFunc_set_1(0.5f, (GenFunction_1)__chLevelCollectible_callDialog, dialog_id);
}
func_8028F030(this->modelCacheIndex);
marker_despawn(marker);

View File

@@ -89,5 +89,5 @@ void func_802D8B20(enum actor_e actor_id){
}
void func_802D8BE4(bool gold_feather){
__spawnQueue_add_1((GenMethod_1)func_802D8B20, (!gold_feather) ? 0x1FF : 0x200);
__spawnQueue_add_1((GenFunction_1)func_802D8B20, (!gold_feather) ? 0x1FF : 0x200);
}

View File

@@ -3,7 +3,7 @@
#include "variables.h"
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_802DC45C(Actor *this);
@@ -29,8 +29,8 @@ Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
f32 sp34[3];
this = marker_getActor(marker);
modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
func_8024E258();
vp_position[0] = 0.0f;
vp_position[1] = 0.0f;

View File

@@ -2,7 +2,7 @@
#include "functions.h"
#include "variables.h"
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_802DC900(Actor *this);
@@ -28,8 +28,8 @@ Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
f32 sp34[3];
this = marker_getActor(marker);
modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
func_8024E258();
sp58[0] = 0.0f;
sp58[1] = 0.0f;

View File

@@ -2,7 +2,7 @@
#include "functions.h"
#include "variables.h"
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
extern void chBottlesBonus_func_802DD080(Gfx **, Mtx **);
extern void func_80311714(s32);
@@ -65,8 +65,8 @@ Actor *func_802DEC00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
gDPSetColorDither((*gfx)++, G_CD_DISABLE);
func_80253190(gfx);
gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp48));
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, this->position, NULL, 4.5f, sp4C, func_80330B1C(marker));
gDPSetTextureFilter((*gfx)++, G_TF_BILERP);
gDPSetColorDither((*gfx)++, G_CD_MAGICSQ);

View File

@@ -2,7 +2,7 @@
#include "functions.h"
#include "variables.h"
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
void func_802DF2C4(Actor *this);
@@ -31,8 +31,8 @@ Actor *func_802DF160(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
gDPSetTextureFilter((*gfx)++, G_TF_POINT);
gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp38));
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)D_8037E000);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)D_8037E000);
modelRender_draw(gfx, mtx, &D_80368360, NULL, 1.0f, NULL, func_80330B1C(D_8037E000));
gDPSetTextureFilter((*gfx)++, G_TF_BILERP);
return this;

View File

@@ -3,7 +3,7 @@
#include "variables.h"
extern void func_802C71F0(Actor *);
extern void func_80325794(ActorMarker *);
extern void actor_postdrawMethod(ActorMarker *);
Actor *func_802E0738(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_802E07E0(Actor *this);
@@ -18,7 +18,7 @@ ActorAnimationInfo D_80368440[] = {
ActorInfo D_80368450 = {
MARKER_72_FIRE_SPARKLE, ACTOR_A2_FIRE_SPARKLE, ASSET_3AD_FIRE_SPARKLE,
0x1, D_80368440,
func_802E08F0, func_80326224, func_80325888,
func_802E08F0, func_80326224, actor_draw,
0, 0, 0.0f, 0
};
@@ -80,7 +80,7 @@ ActorInfo D_80368570 = {
/* .code */
void func_802E0710(Actor *this){
func_803253A0(this);
actor_predrawMethod(this);
func_80361E9C(this);
}
@@ -89,8 +89,8 @@ Actor *func_802E0738(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this;
this = marker_getActorAndRotation(marker, &sp34);
modelRender_preDraw( (GenMethod_1)func_802E0710, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw( (GenFunction_1)func_802E0710, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, this->position, sp34, this->scale, NULL, func_80330B1C(marker));
return this;
}

View File

@@ -33,7 +33,7 @@ ActorAnimationInfo D_803685D0[] ={
ActorInfo D_80368620 = {
0x14, 0x68, 0x3B0,
0x1, D_803685D0,
chsnacker_update, func_80326224, func_80325888,
chsnacker_update, func_80326224, actor_draw,
0, 0, 0.0f, 0
};

View File

@@ -363,13 +363,13 @@ void func_802E4170(void){
func_802F4F64();
timedFuncQueue_free();
func_802F9C48();
func_8033A17C();
modelRender_free();
func_80253420();
func_802E398C(0);
func_8030AFD8(0);
func_80321854();
func_8031FBF8();
func_802880C0();
animCache_free();
comusicPlayer_free();
func_8030D8DC();
}
@@ -393,9 +393,9 @@ void func_802E4214(enum map_e map_id){
func_802F51B8();
func_802E5F38();
defragManager_init();
func_8033A1A4();
modelRender_init();
func_80253428(1);
func_80288070();
animCache_init();
func_8024CCC4();
func_8024CE60(1.0f, 10000.0f);
func_8034A6B4();
@@ -585,7 +585,7 @@ s32 game_defrag(void){
return NULL;
glspline_defrag();
func_80288470();
animCache_defrag();
func_802F1320();
ncCameraNodeList_defrag();
modelRender_defrag();

View File

@@ -26,32 +26,32 @@ void func_802E6A90(BKModelUnk28List *arg0, BKVertexList *arg1, s32 arg2, f32 arg
}
}
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, struct58s *arg2) {
Vtx *vtx_list;
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, AnimMtxList *mtx_list) {
Vtx *vtx;
Vtx *i_vtx;
s32 i;
BKModelUnk28 *var_s1;
BKModelUnk28 *i_ptr;
s16 sp50[3];
s32 temp_v0;
s32 var_s3;
s32 mtx_index;
s32 var_s4;
vtx_list = vtxList_getVertices(arg1);
var_s1 = (BKModelUnk28 *)(arg0 + 1);
var_s3 = -2;
vtx = vtxList_getVertices(arg1);
i_ptr = (BKModelUnk28 *)(arg0 + 1);
mtx_index = -2;
for(var_s4 = 0; var_s4 < arg0->count; var_s4++){
if (var_s3 != var_s1->unk6) {
var_s3 = var_s1->unk6;
func_80251BCC(func_802EA110(arg2, var_s3));
if (mtx_index != i_ptr->anim_index) {
mtx_index = i_ptr->anim_index;
mlMtxSet(animMtxList_get(mtx_list, mtx_index));
}
mlMtx_apply_vec3s(sp50, var_s1->unk0);
for(i = 0; i < var_s1->vtx_count; i++){
i_vtx = &vtx_list[var_s1->vtx_list[i]];
mlMtx_apply_vec3s(sp50, i_ptr->coord);
for(i = 0; i < i_ptr->vtx_count; i++){
i_vtx = &vtx[i_ptr->vtx_list[i]];
i_vtx->v.ob[0] = sp50[0];
i_vtx->v.ob[1] = sp50[1];
i_vtx->v.ob[2] = sp50[2];
}
var_s1 = (BKModelUnk28 *)((s16*)(var_s1 + 1) + (var_s1->vtx_count - 1));
i_ptr = (BKModelUnk28 *)((s16*)(i_ptr + 1) + (i_ptr->vtx_count - 1));
}
osWritebackDCache(vtx_list, vtxList_getVtxCount(arg1) * sizeof(Vtx));
osWritebackDCache(vtx, vtxList_getVtxCount(arg1) * sizeof(Vtx));
}

View File

@@ -1,28 +1,29 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "animation.h"
void func_802EA060(struct58s **arg0, BKAnimationList *anim_list){
struct58s * sp24;
void animMtxList_setBoneless(AnimMtxList **this_ptr, BKAnimationList *anim_list){
AnimMtxList * this;
Mtx *end_ptr;
Mtx *i_ptr;
sp24 = *arg0;
if(sp24->capacity_44 < anim_list->cnt_4){
sp24 = (struct58s *)realloc(sp24, anim_list->cnt_4 * sizeof(Mtx) + sizeof(struct58s));
sp24->capacity_44 = anim_list->cnt_4;
(*arg0) = sp24;
this = *this_ptr;
if(this->capacity_44 < anim_list->cnt_4){
this = (AnimMtxList *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(AnimMtxList));
this->capacity_44 = anim_list->cnt_4;
(*this_ptr) = this;
}
sp24->size_40 = anim_list->cnt_4;
end_ptr = (Mtx *)(sp24->size_40*sizeof(Mtx) + (s32)sp24 +sizeof(struct58s));
this->size_40 = anim_list->cnt_4;
end_ptr = (Mtx *)(this->size_40*sizeof(Mtx) + (s32)this +sizeof(AnimMtxList));
mlMtxIdent();
for(i_ptr = sp24->data; i_ptr < end_ptr; i_ptr++){
for(i_ptr = this->data; i_ptr < end_ptr; i_ptr++){
mlMtxGet(i_ptr);
}
}
Mtx *func_802EA110(struct58s *this, s32 arg1){
Mtx *animMtxList_get(AnimMtxList *this, s32 arg1){
if (arg1 == -1){
return &this->mtx_0;
}
@@ -30,12 +31,12 @@ Mtx *func_802EA110(struct58s *this, s32 arg1){
}
void func_802EA134(struct58s *this){
void animMtxList_free(AnimMtxList *this){
free(this);
}
struct58s *func_802EA154(void){
struct58s *this = malloc(sizeof(struct58s));
AnimMtxList *animMtxList_new(void){
AnimMtxList *this = malloc(sizeof(AnimMtxList));
this->size_40 = 0;
this->capacity_44 = 0;
mlMtxIdent();
@@ -43,17 +44,17 @@ struct58s *func_802EA154(void){
return this;
}
s32 func_802EA190(struct58s* this){
s32 animMtxList_len(AnimMtxList* this){
if(this)
return this->size_40;
return 1;
}
void func_80251BCC(Mtx*);
void func_8033A5B8(s32, s32, f32[3],f32[3], f32[3]);
void mlMtxSet(Mtx*);
void func_8033A5B8(s32, s32, f32[4],f32[3], f32[3]);
void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){
struct58s * this;
void animMtxList_setBoned(AnimMtxList **this_ptr, BKAnimationList *anim_list, BoneTransformList *arg2){
AnimMtxList * this;
Mtx *start_ptr;
Mtx *end_ptr;
Mtx *i_ptr;
@@ -61,18 +62,18 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){
f32 tmp_f0;
s32 pad94[1];
f32 sp88[3];
s32 pad80[2];
f32 sp74[3];
s32 pad80[1];
f32 sp74[4];
f32 sp68[3];
f32 sp5C[3];
s32 sp50[3];
//resize animation matrices
this = *arg0;
this = *this_ptr;
if(this->capacity_44 < anim_list->cnt_4){
this = (struct58s *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(struct58s));
this = (AnimMtxList *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(AnimMtxList));
this->capacity_44 = anim_list->cnt_4;
(*arg0) = this;
(*this_ptr) = this;
}
this->size_40 = anim_list->cnt_4;
@@ -80,15 +81,15 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){
end_ptr = &start_ptr[this->size_40];
s0 = anim_list->anim;
for(i_ptr = start_ptr; i_ptr < end_ptr; s0++, i_ptr++){
func_8033A5B8(arg2, s0->unkC, sp74, sp68, sp5C);
if(s0->unkE == -1)
func_8033A5B8(arg2, s0->bone_id, sp74, sp68, sp5C);
if(s0->mtx_id == -1)
mlMtxIdent();
else if(s0->unkE + 1 != i_ptr - start_ptr)
func_80251BCC(&start_ptr[s0->unkE]);
else if(s0->mtx_id + 1 != i_ptr - start_ptr)
mlMtxSet(&start_ptr[s0->mtx_id]);
tmp_f0 = anim_list->unk0;
mlMtxTranslate(s0->unk0[0] + tmp_f0*sp5C[0], s0->unk0[1] + tmp_f0*sp5C[1], s0->unk0[2] + tmp_f0*sp5C[2] );
if(!func_80345434(sp74)){
if(!vec4f_isZero(sp74)){
func_80345274(sp74, sp88);
func_802515D4(sp88);
}
@@ -99,6 +100,6 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){
}
}
struct58s *func_802EA374(struct58s *this){
AnimMtxList *animMtxList_defrag(AnimMtxList *this){
return defrag(this);
}

View File

@@ -153,7 +153,7 @@ s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
return 0;
}
s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, struct58s *arg5, f32 arg6[3], f32 arg7) {
s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, AnimMtxList *arg5, f32 arg6[3], f32 arg7) {
f32 spF4[3];
f32 spE8[3];
f32 spDC[3];
@@ -191,7 +191,7 @@ s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
spD0[0] *= 2;
spD0[1] *= 2;
spD0[2] *= 2;
func_802519C8(&D_80380880, func_802EA110(arg5, i_ptr->unk16));
func_802519C8(&D_80380880, animMtxList_get(arg5, i_ptr->unk16));
func_80252E4C(spF4, spD0);
func_802524F0(spB0, spE8[0], spE8[1], spE8[2]);
func_802524F0(sp98, spE8[0], spE8[1], spDC[2]);
@@ -270,7 +270,7 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
spAC[0] = (f32) (i_ptr->unkA[0] * 2);
spAC[1] = (f32) (i_ptr->unkA[1] * 2);
spAC[2] = (f32) (i_ptr->unkA[2] * 2);
func_802519C8(&D_80380880, func_802EA110(arg5, i_ptr->unkE));
func_802519C8(&D_80380880, animMtxList_get(arg5, i_ptr->unkE));
func_80252D8C(spB8, spAC);
func_802524F0(sp98, 0.0f, 0.0f, (f32) ((-i_ptr->unk2) / 2));
func_802524F0(sp8C, 0.0f, 0.0f, (f32) (i_ptr->unk2 / 2));
@@ -339,7 +339,7 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scal
sp5C[0] = sp68[0] + (f32) i_ptr->unk0;
sp5C[1] = sp68[1];
sp5C[2] = sp68[2];
func_80251BCC(func_802EA110(arg5, i_ptr->unk9));
mlMtxSet(animMtxList_get(arg5, i_ptr->unk9));
func_8025235C(sp68, sp68);
func_8025235C(sp5C, sp5C);
sp44[0] = sp5C[0] - sp68[0];

View File

@@ -71,7 +71,7 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
spD0[0] = self->unk0[0] - spDC[0];
spD0[1] = self->unk0[1] - spDC[1];
spD0[2] = self->unk0[2] - spDC[2];
func_80251BCC(func_8024DD90());
mlMtxSet(func_8024DD90());
func_80252330(spD0[0], spD0[1], spD0[2]);
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, OS_K0_TO_PHYSICAL((*mtx)++), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -79,7 +79,7 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
temp_f2 = D_80380A10[self->unk26] * (self->unk25 / 255.0f);
spBC = (s32) ((f32)self->unk20 * (1.0f + temp_f2));
temp_s5 = (s32) ((f32)self->unk20 * ((1.0f - (self->unk25 / 255.0f)) + ((self->unk25 / 255.0f) - temp_f2)));
func_80251BCC(&D_80380A18);
mlMtxSet(&D_80380A18);
func_8025235C(spD0, spD0);
spD0[0] = (-297.0f * spD0[0]) / spD0[2];
spD0[1] = (297.0f * spD0[1]) / spD0[2];

View File

@@ -133,7 +133,7 @@ void func_8028DE6C(enum actor_e actor_id){
func_802948F8(marker);
}
else{
__spawnQueue_add_1((GenMethod_1)func_8028DE0C, baMarker_getCarriedObjectActorId());
__spawnQueue_add_1((GenFunction_1)func_8028DE0C, baMarker_getCarriedObjectActorId());
}
}

View File

@@ -139,7 +139,7 @@ void __chMinigame_setState(Actor *this, u32 arg1) {
func_8025A70C((func_803203FC(5)) ? COMUSIC_3B_MINIGAME_VICTORY : COMUSIC_3C_MINIGAME_LOSS);
func_802E4A70();
func_803204E4(0x21, TRUE);
timedFunc_set_3(2.0f, (GenMethod_3)func_802E4078, MAP_8E_GL_FURNACE_FUN, 1, 1);
timedFunc_set_3(2.0f, (GenFunction_3)func_802E4078, MAP_8E_GL_FURNACE_FUN, 1, 1);
break;
}
func_80328A84(this, arg1);

View File

@@ -63,8 +63,8 @@ bool func_8031C6E4(void) {
if (!mapSpecificFlags_get(0xC)) {
mapSpecificFlags_set(0xC, TRUE);
func_802DC528(0, 0);
timedFunc_set_2(11.0f, (GenMethod_2)func_802DC560, 0, 0);
timedFunc_set_3(12.0f, (GenMethod_3)func_802E4078, MAP_1F_CS_START_RAREWARE, 0, 1);
timedFunc_set_2(11.0f, (GenFunction_2)func_802DC560, 0, 0);
timedFunc_set_3(12.0f, (GenFunction_3)func_802E4078, MAP_1F_CS_START_RAREWARE, 0, 1);
} else {
timedFuncQueue_flush();
}

View File

@@ -21,9 +21,9 @@ f32 player_getYaw(void);
extern void func_8032FFF4(ActorMarker *, ActorMarker *, s32);
extern void func_802C9334(s32, Actor *);
extern void func_8032B3A0(Actor *, ActorMarker *);
extern void func_8032EE0C(GenMethod_2, s32);
extern void func_8032EE0C(GenFunction_2, s32);
extern void func_8032EE20(void);
extern void __spawnQueue_add_5(GenMethod_5, s32, s32, s32, s32, s32);
extern void __spawnQueue_add_5(GenFunction_5, s32, s32, s32, s32, s32);
void func_8032A6A8(Actor *arg0);
@@ -84,7 +84,7 @@ Actor *func_80325340(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
return NULL;
}
void func_803253A0(Actor *this){
void actor_predrawMethod(Actor *this){
s32 pad4C;
BKModelBin *sp48;
bool sp44;
@@ -94,13 +94,13 @@ void func_803253A0(Actor *this){
sp48 = func_80330B1C(this->marker);
func_80330534(this);
if(this->animctrl != NULL){
func_8028781C(this->animctrl, this->position, 1);
animctrl_drawSetup(this->animctrl, this->position, 1);
}
if(this->marker->unk20 != NULL){
sp44 = FALSE;
if(this->unk148 != NULL){
func_802EA1A8(&this->marker->unk20, model_getAnimationList(sp48), func_803356A0(this->unk148));
animMtxList_setBoned(&this->marker->unk20, model_getAnimationList(sp48), skeletalAnim_getBoneTransformList(this->unk148));
sp44 = TRUE;
}//L8032542C
else if(this->animctrl != NULL && model_getAnimationList(sp48)){
@@ -144,7 +144,7 @@ void func_803253A0(Actor *this){
}
if(this->unk148 && !this->marker->unk20){
func_8033A238(func_803356A0(this->unk148));
modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148));
}
func_8033056C(this);
@@ -186,7 +186,7 @@ void func_80325760(Actor *this) {
func_8033A45C(2, 4);
}
void func_80325794(ActorMarker *marker){
void actor_postdrawMethod(ActorMarker *marker){
marker->unk14_21 = TRUE;
}
@@ -212,13 +212,13 @@ bool func_803257B4(ActorMarker *marker) {
}
Actor *func_80325888(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
Actor *actor_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
f32 sp3C[3];
Actor *this;
this = marker_getActorAndRotation(marker, sp3C);
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, this->position, sp3C, this->scale, (this->unk104 != NULL) ? D_8036E580 : NULL, func_803257B4(marker));
return this;
}
@@ -333,14 +333,14 @@ Actor *func_80325CAC(ActorMarker *marker, Gfx **gfx, Gfx **mtx, Vtx **vtx) {
return this;
}
Actor *func_80325E78(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
Actor *actor_drawFullDepth(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
f32 rotation[3];
Actor *this;
this = marker_getActorAndRotation(marker, rotation);
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this);
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this);
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, (this->unk104 != NULL) ? D_8036E580 : NULL, func_803257B4(marker));
return this;
}
@@ -348,7 +348,7 @@ Actor *func_80325E78(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
Actor *func_80325F2C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
func_8033A244(30000.0f);
func_8033A280(2.0f);
return func_80325E78(marker, gfx, mtx, vtx);
return actor_drawFullDepth(marker, gfx, mtx, vtx);
}
void func_80325F84(Actor *this){}
@@ -401,7 +401,7 @@ void func_80325FE8(Actor *this) {
marker->unk48 = 0;
}
if (this->unk148 != NULL) {
func_80335874(this->unk148);
skeletalAnim_free(this->unk148);
this->unk148 = NULL;
}
if (marker->unk50 != 0) {
@@ -579,9 +579,9 @@ void func_803268B4(void) {
}
if (actor->unk148) {
if (!actor->despawn_flag) {
func_80335A94(actor->unk148, time_getDelta(), marker->unk14_21);
skeletalAnim_update(actor->unk148, time_getDelta(), marker->unk14_21);
} else {
func_80335924(actor->unk148, 0, 0.0f, 0.0f);
skeletalAnim_set(actor->unk148, 0, 0.0f, 0.0f);
}
}
if ((actor_info->shadow_scale != 0.0f) && actor->unk124_6 && marker->unk14_21) {
@@ -941,7 +941,7 @@ Actor *actor_new(s32 (* position)[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
D_80383390->unk148 = 0;
if(flags & 0x800){
D_80383390->unk148 = func_803358B4();
D_80383390->unk148 = skeletalAnim_new();
}
if(flags & 0x4000){
@@ -2013,7 +2013,7 @@ void func_8032AB84(Actor *arg0) {
}
if (marker->unk20 == NULL && arg0->unk3C & 0x20) {
marker->unk20 = func_802EA154();
marker->unk20 = animMtxList_new();
}
}
@@ -2039,7 +2039,7 @@ void func_8032ACA8(Actor *arg0) {
}
if (sp30->unk20 != NULL) {
func_802EA134(sp30->unk20);
animMtxList_free(sp30->unk20);
sp30->unk20 = 0;
}
}
@@ -2116,11 +2116,11 @@ void actorArray_defrag(void) {
}
if (i_actor->marker->unk20 != NULL) {
i_actor->marker->unk20 = func_802EA374(i_actor->marker->unk20);
i_actor->marker->unk20 = animMtxList_defrag(i_actor->marker->unk20);
}
if (i_actor->unk148 != NULL) {
i_actor->unk148 = (Struct80s*)defrag(i_actor->unk148);
i_actor->unk148 = (SkeletalAnimation*)defrag(i_actor->unk148);
}
if (i_actor->marker->unk50 != NULL) {
@@ -2169,12 +2169,12 @@ void func_8032B258(Actor *this, enum collision_e arg1) {
func_8034A174( this->marker->unk44, 0x20, sp38);
}
if (((s32)this->marker->unk44 < 0) && ((sp38[0] != 0.0f) || (sp38[1] != 0.0f) || (sp38[2] != 0.0f))) {
__spawnQueue_add_5((GenMethod_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44));
__spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44));
return;
}
else{
sp34 = this->position[1] + 50.0f;
__spawnQueue_add_5((GenMethod_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44));
__spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44));
}
}
}
@@ -2290,15 +2290,15 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) {
}
func_8032EE0C(func_8032B38C, this);
if (((s32)arg0->unk44 < 0) && ((sp50[0] != 0.0f) || (sp50[1] != 0.0f) || (sp50[2] != 0.0f))) {
__spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C));
__spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C));
} else if (this->unk16C_3 && func_803048E0(sp3C, &sp4C, &sp48, 3, (s32) (func_8033229C(arg0) * 4.0f))) {
sp50[0] = (f32) sp48->x;
sp50[1] = (f32) sp48->y;
sp50[2] = (f32) sp48->z;
__spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C));
__spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C));
} else {
sp38 = this->position[1] + func_8033229C(arg0);
__spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, sp5C));
__spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, sp5C));
}
func_8032EE20();
}

View File

@@ -1476,7 +1476,7 @@ s32 func_80330974(ActorMarker *marker, s32 arg1, f32 arg2, s32 arg3) {
rotation[2] = (f32)marker->roll;
scale = (marker->unk3E_0) ? marker_getActor(marker)->scale : 1.0f;
if (func_802EA190(marker->unk20)) {
if (animMtxList_len(marker->unk20)) {
return func_802EBAE0(sp58, position, rotation, scale, 0, marker->unk20, arg1, arg2, arg3);
}
return 0;

View File

@@ -145,7 +145,7 @@ void func_80334910(void) {
func_8033FA24();
func_80344C80();
func_80287D70();
animcache_free();
animBinCache_free();
func_802BC10C();
ncCameraNodeList_free();
func_802F1388();
@@ -184,7 +184,7 @@ void func_80334910(void) {
func_80322FDC();
func_8033BD6C();
func_80255198();//heap_flush_free_queue
func_802881AC();
animCache_flushAll();
}
void func_80334B20(enum map_e arg0, s32 arg1, s32 arg2) {
@@ -221,7 +221,7 @@ void func_80334B20(enum map_e arg0, s32 arg1, s32 arg2) {
func_8031F9E8();
func_80323230();
commonParticleType_init();
animcache_init();
animBinCache_init();
func_80287C58();
func_80344C50();
func_8033F9C0();
@@ -327,7 +327,7 @@ s32 func_80334ECC(void) {
}
func_8033E1E0();
func_802F11E8();
func_80288210();
animCache_update();
func_80288834();
ncCamera_update();
func_803045D8();

View File

@@ -1,272 +0,0 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "animation.h"
extern void func_8033AA50(void *, f32, Struct_B1400_1 *);
extern void func_8033A750(s32, s32, Struct_B1400_1 *, f32);
/* .code */
void func_80335560(Struct80s *self){
if(self->unk0 != NULL){
func_8033A6F0(self->unk0);
self->unk0 = NULL;
}
if(self->unk4 != NULL){
assetcache_release(self->unk4);
self->unk4 = NULL;
}
if(self->unk24 != NULL){
func_8033A6F0(self->unk24);
self->unk24 = NULL;
}
if(self->unk28 != NULL){
func_8033A6F0(self->unk28);
self->unk28 = NULL;
}
self->unk2C = 0.0f;
}
void func_803355F8(Struct7Fs* arg0){
if(arg0->unk4 == 0){
((void(*)(void))(arg0->unk8))();
}
else if(arg0->unk4 == 1){
((void(*)(s32))(arg0->unk8))(arg0->unkC);
}
}
void func_80335650(Struct80s *self){
if(self->unk10 != NULL){
vector_clear(self->unk10);
}
}
enum asset_e func_8033567C(Struct80s *self){
return self->unk16;
}
f32 func_80335684(Struct80s *self){
return self->unk8;
}
void func_8033568C(Struct80s *self, f32 *arg1, f32 *arg2){
*arg1 = self->unk1C;
*arg2 = self->unk8;
}
s32 func_803356A0(Struct80s *self){
self->unk14 = 0;
if(self->unk0 == 0){
self->unk0 = func_8033A710();
}
if(self->unk30 != 0){
self->unk30 = 0;
return self->unk0;
}
if(self->unk16 == 0){
return self->unk0;
}
if(self->unk4 == NULL){
self->unk4 = (AnimationFile *)assetcache_get(self->unk16);
}
if(0.0f == self->unk2C){
func_8033AA50(self->unk4, self->unk8, self->unk0);
return self->unk0;
}
if(self->unk28 == 0){
self->unk28 = (Struct_B1400_1 *) func_8033A710();
}
func_8033AA50(self->unk4, self->unk8, self->unk28);
func_8033A750(self->unk0, self->unk24, self->unk28, self->unk20);
return self->unk0;
}
s32 func_80335794(Struct80s *self){
return self->unk18;
}
void func_8033579C(Struct80s *self, f32 arg1, void(*arg2)(void)){
Struct7Fs *ptr;
if(self->unk10 == NULL){
self->unk10 = vector_new(sizeof(Struct7Fs), 8);
}
ptr = (Struct7Fs *)vector_pushBackNew(&self->unk10);
ptr->unk0 = arg1;
ptr->unk4 = 0;
ptr->unk8 = arg2;
ptr->unkC = 0;
}
void func_80335800(Struct80s *self, f32 arg1, void(*arg2)(ActorMarker *), ActorMarker *arg3){
Struct7Fs *ptr;
if(self->unk10 == NULL){
self->unk10 = vector_new(sizeof(Struct7Fs), 8);
}
ptr = (Struct7Fs *)vector_pushBackNew(&self->unk10);
ptr->unk0 = arg1;
ptr->unk4 = 1;
ptr->unk8 = arg2;
ptr->unkC = arg3;
}
void func_80335874(Struct80s *self){
VLA * temp_a0;
func_80335560(self);
temp_a0 = self->unk10;
if(temp_a0 != NULL){
vector_free(temp_a0);
}
free(self);
}
Struct80s *func_803358B4(void){
Struct80s *self;
self = (Struct80s *)malloc(sizeof(Struct80s));
self->unk0 = 0;
self->unk4 = NULL;
self->unk10 = 0;
self->unk14 = 0;
self->unk15 = 1;
self->unk18 = 0;
self->unk16 = 0;
self->unk30 = 0;
self->unk24 = 0;
self->unk28 = 0;
self->unk8 = 0.0f;
self->unkC = 0.0f;
self->unk1C = 0.0f;
self->unk20 = 0.0f;
self->unk2C = 0.0f;
return self;
}
void func_80335918(Struct80s *self){
self->unk30 = 1;
}
void func_80335924(Struct80s *self, enum asset_e anim_id, f32 arg2, f32 arg3){
if(self->unk4 != NULL && anim_id != self->unk16){
assetcache_release(self->unk4);
self->unk4 = NULL;
}
if(self->unk10 != NULL && anim_id != self->unk16){
vector_free(self->unk10);
self->unk10 = NULL;
}
self->unk8 = 0.0f;
self->unkC = arg3;
self->unk18 = 0;
self->unk16 = anim_id;
self->unk1C = 0.0f;
self->unk20 = 0.0f;
self->unk2C = arg2;
if(0.0f < arg2){
if(self->unk0 != 0 ){
s32 tmp;
tmp = self->unk24;
self->unk24 = self->unk0;
self->unk0 = tmp;
if(self->unk28 != 0){
func_8033A510(self->unk28);
}
} else {
self->unk2C = 0.0f;
}
}
}
void func_80335A24(Struct80s *self, enum asset_e anim_id, f32 arg2, f32 arg3){
f32 sp1C;
sp1C = func_80335684(self);
func_80335924(self, anim_id, arg2, arg3);
func_80335A74(self, sp1C);
}
void func_80335A74(Struct80s *self, f32 arg1){
self->unk8 = arg1;
}
void func_80335A80(Struct80s *self, f32 arg1){
self->unkC = arg1;
}
void func_80335A8C(Struct80s *self, s32 arg1){
self->unk15 = arg1;
}
void func_80335A94(Struct80s *self, f32 arg1, s32 arg2) {
f32 pad2C;
Struct7Fs *begin_ptr;
Struct7Fs *end_ptr;
Struct7Fs *i_ptr;
if (arg2 == 0) {
if (self->unk14 < 10) {
self->unk14++;
if (self->unk14 == 0xA) {
func_80335560(self);
}
}
}
if (self->unk16 != 0) {
self->unk1C = self->unk8;
if ( self->unkC > 0.0f) {
if (self->unk15 == 1) {
self->unk8 += arg1 / self->unkC;
while (self->unk8 >= 1.0f) {
self->unk8 -= 1.0f;
self->unk18++;
}
} else if ((self->unk15 == 2) && (self->unk18 == 0)) {
self->unk8 += (arg1 / self->unkC);
if (self->unk8 >= 1.0f) {
self->unk8 = 0.99999f;
self->unk18++;
}
} else if ((self->unk15 == 3) && (self->unk8 > 0.0f)) {
self->unk8 -= (arg1 / self->unkC);
if (self->unk8 < 0.0f) {
self->unk8 = 0.0f;
}
}
}
if (self->unk10 != NULL) {
begin_ptr = vector_getBegin(self->unk10);
end_ptr = vector_getEnd(self->unk10);
for(i_ptr = begin_ptr; i_ptr < end_ptr; i_ptr++) {
if (((self->unk1C < i_ptr->unk0) || (self->unk8 < self->unk1C)) && ( i_ptr->unk0 <= self->unk8)) {
func_803355F8(i_ptr);
}
}
}
if (self->unk2C > 0.0f) {
if (self->unk20 < 1.0f) {
self->unk20 += arg1 / self->unk2C;
if (self->unk20 >= 1.0f) {
self->unk20 = 1.0f;
}
} else {
self->unk2C = 0.0f;
if (self->unk0 != 0) {
func_8033A510(self->unk0);
}
}
}
}
}

View File

@@ -3,7 +3,7 @@
#include "variables.h"
Mtx *func_8024DD9C(void);
void func_80251BCC(Mtx *);
void mlMtxSet(Mtx *);
void func_80252330(f32, f32, f32);
void mlMtxApply(Mtx *);
void func_803382D8(s32 arg0);
@@ -447,7 +447,7 @@ void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
sp20[0] = arg2[0] - sp2C[0];
sp20[1] = arg2[1] - sp2C[1];
sp20[2] = arg2[2] - sp2C[2];
func_80251BCC(func_8024DD90());
mlMtxSet(func_8024DD90());
func_80252330(sp20[0], sp20[1], sp20[2]);
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -461,7 +461,7 @@ void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
sp20[0] = arg2[0] - sp2C[0];
sp20[1] = arg2[1] - sp2C[1];
sp20[2] = arg2[2] - sp2C[2];
func_80251BCC(func_8024DD9C());
mlMtxSet(func_8024DD9C());
func_80252330(sp20[0], sp20[1], sp20[2]);
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@@ -6,123 +6,122 @@
extern void func_803458E4(f32[4], f32[4], f32[4], f32);
void func_8033A510(Struct_B1400_1 *arg0) {
Struct_B1400 *end_ptr;
Struct_B1400 *i_ptr;
void boneTransformList_reset(BoneTransformList *this) {
BoneTransform *end_ptr;
BoneTransform *i_ptr;
i_ptr = arg0->unk0;
end_ptr = i_ptr + arg0->unk4;
i_ptr = this->ptr;
end_ptr = i_ptr + this->count;
for(i_ptr = i_ptr; i_ptr < end_ptr; i_ptr++){
i_ptr->unk0[0] = i_ptr->unk0[1] = i_ptr->unk0[2] = 0.0f;
i_ptr->unk0[3] = 1.0f;
i_ptr->unk10[0] = i_ptr->unk10[1] = i_ptr->unk10[2] = 1.0f;
i_ptr->scale[0] = i_ptr->scale[1] = i_ptr->scale[2] = 1.0f;
i_ptr->unk1C[0] = i_ptr->unk1C[1] = i_ptr->unk1C[2] = 0.0f;
}
}
void func_8033A57C(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]) {
func_80345250(arg2, arg0->unk0[arg1].unk0);
void func_8033A57C(BoneTransformList *this, s32 bone_id, f32 arg2[4]) {
vec4f_clone(arg2, this->ptr[bone_id].unk0);
}
void func_8033A5B8(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4], f32 arg3[3], f32 arg4[3]) {
func_80345250(arg2, arg0->unk0[arg1].unk0);
arg3[0] = arg0->unk0[arg1].unk10[0];
arg3[1] = arg0->unk0[arg1].unk10[1];
arg3[2] = arg0->unk0[arg1].unk10[2];
arg4[0] = arg0->unk0[arg1].unk1C[0];
arg4[1] = arg0->unk0[arg1].unk1C[1];
arg4[2] = arg0->unk0[arg1].unk1C[2];
void func_8033A5B8(BoneTransformList *this, s32 bone_id, f32 arg2[4], f32 scale[3], f32 arg4[3]) {
vec4f_clone(arg2, this->ptr[bone_id].unk0);
scale[0] = this->ptr[bone_id].scale[0];
scale[1] = this->ptr[bone_id].scale[1];
scale[2] = this->ptr[bone_id].scale[2];
arg4[0] = this->ptr[bone_id].unk1C[0];
arg4[1] = this->ptr[bone_id].unk1C[1];
arg4[2] = this->ptr[bone_id].unk1C[2];
}
void func_8033A670(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) {
arg2[0] = arg0->unk0[arg1].unk10[0];
arg2[1] = arg0->unk0[arg1].unk10[1];
arg2[2] = arg0->unk0[arg1].unk10[2];
void boneTransformList_getBoneScale(BoneTransformList *this, s32 bone_id, f32 scale[3]) {
scale[0] = this->ptr[bone_id].scale[0];
scale[1] = this->ptr[bone_id].scale[1];
scale[2] = this->ptr[bone_id].scale[2];
}
void func_8033A6B0(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) {
arg2[0] = arg0->unk0[arg1].unk1C[0];
arg2[1] = arg0->unk0[arg1].unk1C[1];
arg2[2] = arg0->unk0[arg1].unk1C[2];
void func_8033A6B0(BoneTransformList *this, s32 bone_id, f32 arg2[3]) {
arg2[0] = this->ptr[bone_id].unk1C[0];
arg2[1] = this->ptr[bone_id].unk1C[1];
arg2[2] = this->ptr[bone_id].unk1C[2];
}
void func_8033A6F0(Struct_B1400_1 *arg0){
free(arg0);
void boneTransformList_free(BoneTransformList *this){
free(this);
}
Struct_B1400_1 *func_8033A710(void) {
Struct_B1400_1 *sp1C;
BoneTransformList *boneTransformList_new(void) {
BoneTransformList *this;
sp1C = (Struct_B1400_1 *)malloc(sizeof(Struct_B1400_1) + 0x6D*sizeof(Struct_B1400));
sp1C->unk0 = (Struct_B1400 *) (sp1C + 1);
sp1C->unk4 = 0x6D;
func_8033A510(sp1C);
return sp1C;
this = (BoneTransformList *)malloc(sizeof(BoneTransformList) + 0x6D*sizeof(BoneTransform));
this->ptr = (BoneTransform *) (this + 1);
this->count = 0x6D;
boneTransformList_reset(this);
return this;
}
//interpolates animation structs?
void func_8033A750(Struct_B1400_1 *arg0, Struct_B1400_1 *arg1, Struct_B1400_1 *arg2, f32 arg3) {
void boneTransformList_interpolate(BoneTransformList *this, BoneTransformList *start_xform_list, BoneTransformList *end_xform_list, f32 arg3) {
s32 i;
s32 cnt;
Struct_B1400 *start_ptr;
Struct_B1400 *end_ptr;
Struct_B1400 *i_ptr;
Struct_B1400 *j_ptr;
Struct_B1400 *k_ptr;
BoneTransform *start_ptr;
BoneTransform *end_ptr;
BoneTransform *i_xform;
BoneTransform *start_xform;
BoneTransform *end_xform;
start_ptr = arg0->unk0;
j_ptr = arg1->unk0;
k_ptr = arg2->unk0;
end_ptr = start_ptr + arg0->unk4;
for(i_ptr = start_ptr; i_ptr < end_ptr; i_ptr++, j_ptr++, k_ptr++){
if( (j_ptr->unk0[0] == k_ptr->unk0[0])
&& (j_ptr->unk0[1] == k_ptr->unk0[1])
&& (j_ptr->unk0[2] == k_ptr->unk0[2])
&& (j_ptr->unk0[3] == k_ptr->unk0[3])
start_ptr = this->ptr;
start_xform = start_xform_list->ptr;
end_xform = end_xform_list->ptr;
end_ptr = start_ptr + this->count;
for(i_xform = start_ptr; i_xform < end_ptr; i_xform++, start_xform++, end_xform++){
if( (start_xform->unk0[0] == end_xform->unk0[0])
&& (start_xform->unk0[1] == end_xform->unk0[1])
&& (start_xform->unk0[2] == end_xform->unk0[2])
&& (start_xform->unk0[3] == end_xform->unk0[3])
) {
i_ptr->unk0[0] = j_ptr->unk0[0];
i_ptr->unk0[1] = j_ptr->unk0[1];
i_ptr->unk0[2] = j_ptr->unk0[2];
i_ptr->unk0[3] = j_ptr->unk0[3];
i_xform->unk0[0] = start_xform->unk0[0];
i_xform->unk0[1] = start_xform->unk0[1];
i_xform->unk0[2] = start_xform->unk0[2];
i_xform->unk0[3] = start_xform->unk0[3];
} else {
func_803458E4(i_ptr, j_ptr, k_ptr, arg3);
func_803458E4(i_xform, start_xform, end_xform, arg3);
}
i_ptr->unk10[0] = j_ptr->unk10[0] + ((k_ptr->unk10[0] - j_ptr->unk10[0]) * arg3);
i_ptr->unk10[1] = j_ptr->unk10[1] + ((k_ptr->unk10[1] - j_ptr->unk10[1]) * arg3);
i_ptr->unk10[2] = j_ptr->unk10[2] + ((k_ptr->unk10[2] - j_ptr->unk10[2]) * arg3);
i_ptr->unk1C[0] = j_ptr->unk1C[0] + ((k_ptr->unk1C[0] - j_ptr->unk1C[0]) * arg3);
i_ptr->unk1C[1] = j_ptr->unk1C[1] + ((k_ptr->unk1C[1] - j_ptr->unk1C[1]) * arg3);
i_ptr->unk1C[2] = j_ptr->unk1C[2] + ((k_ptr->unk1C[2] - j_ptr->unk1C[2]) * arg3);
i_xform->scale[0] = start_xform->scale[0] + ((end_xform->scale[0] - start_xform->scale[0]) * arg3);
i_xform->scale[1] = start_xform->scale[1] + ((end_xform->scale[1] - start_xform->scale[1]) * arg3);
i_xform->scale[2] = start_xform->scale[2] + ((end_xform->scale[2] - start_xform->scale[2]) * arg3);
i_xform->unk1C[0] = start_xform->unk1C[0] + ((end_xform->unk1C[0] - start_xform->unk1C[0]) * arg3);
i_xform->unk1C[1] = start_xform->unk1C[1] + ((end_xform->unk1C[1] - start_xform->unk1C[1]) * arg3);
i_xform->unk1C[2] = start_xform->unk1C[2] + ((end_xform->unk1C[2] - start_xform->unk1C[2]) * arg3);
}
}
void func_8033A8F0(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]){
func_80345250(&arg0->unk0[arg1], arg2);
void func_8033A8F0(BoneTransformList *this, s32 bone_id, f32 arg2[4]){
vec4f_clone(&this->ptr[bone_id], arg2);
}
void func_8033A928(Struct_B1400_1 *arg0, s32 arg1, f32 scale[3]) {
arg0->unk0[arg1].unk10[0] = scale[0];
arg0->unk0[arg1].unk10[1] = scale[1];
arg0->unk0[arg1].unk10[2] = scale[2];
void boneTransformList_setBoneScale(BoneTransformList *this, s32 bone_id, f32 scale[3]) {
this->ptr[bone_id].scale[0] = scale[0];
this->ptr[bone_id].scale[1] = scale[1];
this->ptr[bone_id].scale[2] = scale[2];
}
void func_8033A968(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) {
arg0->unk0[arg1].unk1C[0] = arg2[0];
arg0->unk0[arg1].unk1C[1] = arg2[1];
arg0->unk0[arg1].unk1C[2] = arg2[2];
void func_8033A968(BoneTransformList *this, s32 bone_id, f32 arg2[3]) {
this->ptr[bone_id].unk1C[0] = arg2[0];
this->ptr[bone_id].unk1C[1] = arg2[1];
this->ptr[bone_id].unk1C[2] = arg2[2];
}
void func_8033A9A8(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]){
void func_8033A9A8(BoneTransformList *this, s32 bone_id, f32 arg2[4]){
f32 sp18[4];
func_80345C78(sp18, arg2);
func_8033A8F0(arg0, arg1, sp18);
func_8033A8F0(this, bone_id, sp18);
}
Struct_B1400_1 * func_8033A9E4(Struct_B1400_1 *arg0){
Struct_B1400_1 *var_v0;
var_v0 = (Struct_B1400_1 *)defrag(arg0);
var_v0->unk0 = (Struct_B1400 *)(var_v0 + 1);
BoneTransformList * boneTransformList_defrag(BoneTransformList *this){
BoneTransformList *var_v0;
var_v0 = (BoneTransformList *)defrag(this);
var_v0->ptr = (BoneTransform *)(var_v0 + 1);
return var_v0;
}

View File

@@ -37,7 +37,7 @@ extern s32 assetcache_release(void * arg0);
f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1);
f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2);
s32 func_8033AC0C(AnimationFile *this);
void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]);
void func_8033AFB8(BoneTransformList *arg0, s32 arg1, f32 arg2[3][3]);
void func_8033BAB0(enum asset_e asset_id, s32 offset, s32 size, void *dst_ptr);
/* .core2 */
@@ -47,21 +47,21 @@ f32 func_8033AA10(AnimationFile *this, s32 arg1){
return (f32)(arg1 - this->unk0)/(f32)(this->unk2 - this->unk0);
}
void func_8033AA50(AnimationFile *anim_file, f32 arg1, Struct_B1400 *arg2){
s32 tmp_s1;
void animationFile_getBoneTransformList(AnimationFile *anim_file, f32 progress, BoneTransformList *bone_transform_list){
s32 bone_id;
int i;
f32 tmp_f22;
AnimationFileElement *tmp_s0;
f32 sp54[3][3];
tmp_f22 = func_8033ABA0(anim_file, arg1);
tmp_f22 = func_8033ABA0(anim_file, progress);
tmp_s0 = (AnimationFileElement *)((s32)anim_file + sizeof(AnimationFile));
tmp_s1 = 0;
bone_id = 0;
for(i = 0; i < anim_file->elem_cnt; i++){//L8033AAB8
if(tmp_s0->unk0_15 != tmp_s1){
if(tmp_s1)
func_8033AFB8(arg2, tmp_s1, sp54);
tmp_s1 = tmp_s0->unk0_15;
if(tmp_s0->unk0_15 != bone_id){
if(bone_id != 0)
func_8033AFB8(bone_transform_list, bone_id, sp54);
bone_id = tmp_s0->unk0_15;
sp54[0][0] = sp54[0][1] = sp54[0][2] = 0.0f;
sp54[1][0] = sp54[1][1] = sp54[1][2] = 1.0f;
sp54[2][0] = sp54[2][1] = sp54[2][2] = 0.0f;
@@ -70,7 +70,7 @@ void func_8033AA50(AnimationFile *anim_file, f32 arg1, Struct_B1400 *arg2){
tmp_s0 += tmp_s0->data_cnt;
tmp_s0++;
}//L8033AB60
func_8033AFB8(arg2, tmp_s1, sp54);
func_8033AFB8(bone_transform_list, bone_id, sp54);
}
f32 func_8033ABA0(AnimationFile *this, f32 arg1){
@@ -94,7 +94,7 @@ s32 func_8033AC1C(AnimationFile *this){
return this->unk2 - this->unk0 + 1;
}
s32 func_8033AC30(AnimationFile *this){
s32 animationFile_count(AnimationFile *this){
return this->elem_cnt;
}
@@ -149,12 +149,12 @@ f32 func_8033AC38(AnimationFile *this, AnimationFileElement *elem, f32 time){
return glspline_catmull_rom_interpolate(temp_f12, 4, knot_list);
}
void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]){
void func_8033AFB8(BoneTransformList *bone_transform_list, s32 bone_id, f32 arg2[3][3]){
f32 sp18[4];
func_80345CD4(sp18, arg2[0]);
func_8033A8F0(arg0, arg1, sp18);
func_8033A928(arg0, arg1, arg2[1]);
func_8033A968(arg0, arg1, arg2[2]);
func_8033A8F0(bone_transform_list, bone_id, sp18);
boneTransformList_setBoneScale(bone_transform_list, bone_id, arg2[1]);
func_8033A968(bone_transform_list, bone_id, arg2[2]);
}
void func_8033B020(void *ptr){

View File

@@ -43,7 +43,7 @@ void func_8033F7F0(u8 arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx){
viewport_getPosition(sp3C);
ml_vec3f_diff_copy(sp30, sp48, sp3C);
if(sp54->unk28_12){
func_80251BCC(func_8024DD90());
mlMtxSet(func_8024DD90());
}
else{
mlMtxIdent();

View File

@@ -81,7 +81,7 @@ void func_80344138(BKSpriteDisplayData *self, s32 frame, s32 mirrored, f32 posit
if (D_80371EC0.unk0 != NULL) {
D_80371EC0.unk0(D_80371EC0.unk4);
}
func_80251BCC(func_8024DD90());
mlMtxSet(func_8024DD90());
func_80252330(sp50[0], sp50[1], sp50[2]);
if ((scale != NULL) || mirrored) {
mlMtxScale_xyz((mirrored) ? -scale[0] : scale[0], sp38, sp34);
@@ -140,7 +140,7 @@ void func_80344424(BKSpriteDisplayData *arg0, s32 frame, bool mirrored, f32 posi
if (D_80371EC0.unk0 != NULL) {
D_80371EC0.unk0(D_80371EC0.unk4);
}
func_80251BCC(func_8024DD90());
mlMtxSet(func_8024DD90());
mlMtxRotate(0.0f, 0.0f, rotation);
func_80252330(sp50[0], sp50[1], sp50[2]);
if ((scale != NULL) || mirrored) {

View File

@@ -11,7 +11,7 @@ s32 D_80371ED0[3] = {1, 2, 0};
/* .code */
//vec4f_copy
void func_80345250(f32 dst[4], f32 src[4]){
void vec4f_clone(f32 dst[4], f32 src[4]){
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
@@ -66,14 +66,14 @@ void func_80345274(f32 arg0[4], f32 arg1[3][3]) {
arg1[2][2] = 1.0 - (sp28 + sp1C);
}
bool func_80345434(f32 arg0[4]){
bool vec4f_isZero(f32 arg0[4]){
return ((arg0[0] == 0.0f)
&& (arg0[1] == 0.0f)
&& (arg0[2] == 0.0f)
&& (arg0[3] == 1.0f));
}
bool func_803454D0(f32 arg0[4]) {
bool vec4f_isAlmostZero(f32 arg0[4]) {
return (((0.0f <= arg0[0]) ? arg0[0] : - arg0[0]) < 0.01)
&& (((0.0f <= arg0[1]) ? arg0[1] : - arg0[1]) < 0.01)
&& (((0.0f <= arg0[1]) ? arg0[1] : - arg0[1]) < 0.01)
@@ -81,7 +81,7 @@ bool func_803454D0(f32 arg0[4]) {
&& (((0.0f <= arg0[3]) ? arg0[3] : - arg0[3]) > 0.99);
}
void func_80345630(f32 arg0[4]){
void vec4f_zero(f32 arg0[4]){
arg0[0] = arg0[1] = arg0[2] = 0.0f;
arg0[3] = 1.0f;
}
@@ -197,7 +197,7 @@ void func_80345A44(f32 arg0[4], f32 arg1[4][4]) {
}
}
void func_80345C78(s32 arg0, f32 arg1[3]) {
void func_80345C78(f32 arg0[4], f32 arg1[3]) {
mlMtxIdent();
mlMtxRotYaw(arg1[1]);
mlMtxRotPitch(arg1[0]);

View File

@@ -12,7 +12,7 @@ void func_80347B10(Struct81s *arg0){
}
void func_80347B54(Struct81s *arg0){
__spawnQueue_add_1((GenMethod_1)func_80347B10, reinterpret_cast(s32, arg0));
__spawnQueue_add_1((GenFunction_1)func_80347B10, reinterpret_cast(s32, arg0));
}
void func_80347B80(Struct81s *arg0) {

View File

@@ -14,7 +14,7 @@ void func_80347C80(Struct81s *arg0){
}
void func_80347CC8(Struct81s *arg0){
__spawnQueue_add_1((GenMethod_1)func_80347C80, reinterpret_cast(s32, arg0));
__spawnQueue_add_1((GenFunction_1)func_80347C80, reinterpret_cast(s32, arg0));
}
void func_80347CF4(Struct81s *arg0) {

View File

@@ -79,7 +79,7 @@ void func_80347DF0(Struct81s *arg0){
}
void func_80347E34(Struct81s *arg0){
__spawnQueue_add_1((GenMethod_1) func_80347DF0, reinterpret_cast(s32, arg0));
__spawnQueue_add_1((GenFunction_1) func_80347DF0, reinterpret_cast(s32, arg0));
}
void func_80347E60(Struct81s *arg0) {

View File

@@ -3,8 +3,8 @@
#include "variables.h"
extern GenMethod_0 commonParticleType_getFreeMethod(enum common_particle_e);
extern GenMethod_0 commonParticleType_getUpdateMethod(enum common_particle_e);
extern GenFunction_0 commonParticleType_getFreeMethod(enum common_particle_e);
extern GenFunction_0 commonParticleType_getUpdateMethod(enum common_particle_e);
typedef struct {
u8 unk0; //prev_particle_type

View File

@@ -4,14 +4,14 @@
typedef struct{
GenMethod_0 init_method;
GenMethod_0 update_method;
GenMethod_0 free_method;
GenFunction_0 init_method;
GenFunction_0 update_method;
GenFunction_0 free_method;
s32 unkC;
s32 unk10;
}CommonParticleType;
void commonParticleType_set(enum common_particle_e arg0, GenMethod_0 init_method, s32 update_method, GenMethod_0 free_method, s32 arg4, s32 arg5);
void commonParticleType_set(enum common_particle_e arg0, GenFunction_0 init_method, s32 update_method, GenFunction_0 free_method, s32 arg4, s32 arg5);
/* .bss */
CommonParticleType D_80386260[0x12];
@@ -25,7 +25,7 @@ void commonParticleType_init(void){
}
}
void commonParticleType_set(enum common_particle_e id, GenMethod_0 init_method, s32 update_method, GenMethod_0 free_method, s32 arg4, s32 arg5){
void commonParticleType_set(enum common_particle_e id, GenFunction_0 init_method, s32 update_method, GenFunction_0 free_method, s32 arg4, s32 arg5){
D_80386260[id].init_method = init_method;
D_80386260[id].update_method = update_method;
D_80386260[id].free_method = free_method;
@@ -33,16 +33,16 @@ void commonParticleType_set(enum common_particle_e id, GenMethod_0 init_method,
D_80386260[id].unk10 = arg5;
}
GenMethod_0 commonParticleType_getInitMethod(enum common_particle_e id)
GenFunction_0 commonParticleType_getInitMethod(enum common_particle_e id)
{
return D_80386260[id].init_method;
}
GenMethod_0 commonParticleType_getUpdateMethod(enum common_particle_e id){
GenFunction_0 commonParticleType_getUpdateMethod(enum common_particle_e id){
return D_80386260[id].update_method;
}
GenMethod_0 commonParticleType_getFreeMethod(enum common_particle_e id){
GenFunction_0 commonParticleType_getFreeMethod(enum common_particle_e id){
return D_80386260[id].free_method;
}

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern void func_80335A8C(Struct80s *, s32);
extern f32 func_8025715C(f32, f32);
extern f32 func_802575BC(f32);
extern void ml_interpolate_vec3f(f32[3], f32[3], f32[3], f32);
@@ -115,8 +114,8 @@ void func_80357F0C(Actor *this, s32 next_state) {
local = (ActorLocal_core2_D0CA0 *)&this->local;
if (this->state == 0) {
func_80335924(this->unk148, 0x23A, 0.0f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0x23A, 0.0f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
this->state = next_state;
@@ -126,8 +125,8 @@ void func_80357F0C(Actor *this, s32 next_state) {
local->unk28 = randf2(0.0f, 2.0f);
}
if (this->state == 2) {
func_80335924(this->unk148, 0x23A, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0x23A, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
for(var_s0 = 0; var_s0 < 10; var_s0++){
sp54[0] = this->position[0];
sp54[1] = this->position[1];
@@ -154,8 +153,8 @@ void func_80357F0C(Actor *this, s32 next_state) {
if (this->state == 5) {
func_8028F55C(1, this->marker);
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
func_80335924(this->unk148, 0x23A, 0.4f, 1.0f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0x23A, 0.4f, 1.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
timed_playSfx(0.8f, 0x3FC, randf2(0.97f, 1.05f), 32000);
local->unk39 = 0;
local->unk28 = 2.0f;
@@ -168,8 +167,8 @@ void func_80357F0C(Actor *this, s32 next_state) {
this->marker->collidable = FALSE;
this->unk10_1 = FALSE;
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
func_80335924(this->unk148, 0x23D, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
skeletalAnim_set(this->unk148, 0x23D, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
local->unk36 = 0x3E8;
local->unk39 = 0;
}
@@ -214,7 +213,7 @@ Actor *func_80358344(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
} else {
this->alpha_124_19 = 0xff;
}
return func_80325888(marker, gfx, mtx, vtx);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_80358490(Actor *this) {
@@ -364,10 +363,10 @@ void func_80358684(Actor *this) {
if (this->state == 2) {
local->unk39 = 1;
} else if (this->state == 3) {
if (func_8033567C(this->unk148) != 0x23B) {
func_80335924(this->unk148, 0x23B, 0.2f, 0.75f);
func_80335A8C(this->unk148, 2);
} else if (0.575 <= func_80335684(this->unk148)) {
if (skeletalAnim_getAnimId(this->unk148) != 0x23B) {
skeletalAnim_set(this->unk148, 0x23B, 0.2f, 0.75f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
} else if (0.575 <= skeletalAnim_getProgress(this->unk148)) {
local->unk39 = 1U;
}
}
@@ -396,13 +395,13 @@ void func_80358684(Actor *this) {
sp70 = func_802575BC(local->unk4);
ml_interpolate_vec3f(this->position, local->unk8, local->unk18, sp70);
this->yaw = local->unk14 + (sp70 * (local->unk24 - local->unk14));
if ((func_8033567C(this->unk148) == 0x23B) && (func_80335794(this->unk148) > 0)) {
func_80335924(this->unk148, 0x23C, 0.1f, 0.45f);
func_80335A8C(this->unk148, 1);
if ((skeletalAnim_getAnimId(this->unk148) == 0x23B) && (skeletalAnim_getLoopCount(this->unk148) > 0)) {
skeletalAnim_set(this->unk148, 0x23C, 0.1f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
if ((local->unk39 == 0) || ((func_8033567C(this->unk148) == 0x23C) && (0.7 <= (f64) local->unk4))) {
func_80335924(this->unk148, 0x23A, 0.3f, 0.45f);
func_80335A8C(this->unk148, 1);
if ((local->unk39 == 0) || ((skeletalAnim_getAnimId(this->unk148) == 0x23C) && (0.7 <= (f64) local->unk4))) {
skeletalAnim_set(this->unk148, 0x23A, 0.3f, 0.45f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP);
}
if (this->state == 3) {
if (0.0f <= local->unk4 - 0.2) {
@@ -450,7 +449,7 @@ void func_80358684(Actor *this) {
this->yaw += 10.0f * sp88;
}
if (this->state == 6) {
if (func_8033567C(this->unk148) == 0x23D) {
if (skeletalAnim_getAnimId(this->unk148) == 0x23D) {
sp3C[0] = this->position[0] - sp94[0];
sp3C[1] = this->position[1] - sp94[1];
sp3C[2] = this->position[2] - sp94[2];
@@ -467,7 +466,7 @@ void func_80358684(Actor *this) {
FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200);
timed_playSfx(0.1f, SFX_66_BIRD_AUUGHH, 1.6f, 32000);
}
} else if (func_80335794(this->unk148) > 0) {
} else if (skeletalAnim_getLoopCount(this->unk148) > 0) {
next_state = 7;
}
}

View File

@@ -50,7 +50,7 @@ ActorAnimationInfo D_80372D20[] = {
ActorInfo D_80372D78 = {
MARKER_218_LIMBO, ACTOR_34E_LIMBO, ASSET_4CC_MODEL_LIMBO,
0x1, D_80372D20,
chskeleton_update, func_80326224, func_80325888,
chskeleton_update, func_80326224, actor_draw,
2500, 0, 1.0f, 0
};
@@ -73,7 +73,7 @@ void chskeleton_despawn(ActorMarker *marker, s32 arg1) {
func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4CD_MODEL_LIMBO_ARM);
func_8035CCA0(partEmitMgr_newEmitter(4), this, ASSET_4D0_MODEL_LIMBO_BONE);
FUNC_8030E8B4(SFX_119_FISH_DEATH, 1.0f, 32000, this->position, 1250, 2500);
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
marker_despawn(marker);
}

View File

@@ -51,7 +51,7 @@ ActorAnimationInfo D_80372DA0[] = {
ActorInfo D_80372DF8 = {
MARKER_21A_SEAMAN_GRUBLIN, ACTOR_350_SEAMAN_GRUBLIN, ASSET_49D_MODEL_SEAMAN_GRUBLIN,
0x1, D_80372DA0,
func_8035D058, func_80326224, func_80325888,
func_8035D058, func_80326224, actor_draw,
2500, 0, 1.0f, 0
};

View File

@@ -48,7 +48,7 @@ ActorAnimationInfo D_80372E20[] = {
ActorInfo D_80372E78 = {
MARKER_219_MUMMUM, ACTOR_34F_MUMMUM, ASSET_4C7_MODEL_MUMMUM,
0x1, D_80372E20,
func_8035D3D8, func_80326224, func_80325888,
func_8035D3D8, func_80326224, actor_draw,
2500, 0, 1.0f, 0
};
@@ -71,7 +71,7 @@ void func_8035D1F0(ActorMarker *arg0, s32 arg1) {
func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4C8_MODEL_MUMMUM_ARM);
func_8035D110(partEmitMgr_newEmitter(1), this, ASSET_4CB_MODEL_MUMMUM_BODY);
FUNC_8030E8B4(SFX_119_FISH_DEATH, 0.8f, 32000, this->position, 1250, 2500);
__spawnQueue_add_4((GenMethod_4) func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
__spawnQueue_add_4((GenFunction_4) func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
marker_despawn(arg0);
}

View File

@@ -30,7 +30,7 @@ ActorAnimationInfo D_80372EA0[] = {
ActorInfo D_80372EE0 = {
MARKER_69_CHUMP_FISH, ACTOR_A_CHUMP_FISH, ASSET_36B_CHUMP_FISH,
0x2, D_80372EA0,
func_8035DA1C, func_80326224, func_80325888,
func_8035DA1C, func_80326224, actor_draw,
3000, 0, 0.0f, 0
};

View File

@@ -29,7 +29,7 @@ ActorAnimationInfo D_80373090[] = {
ActorInfo D_803730D8 = {
MARKER_127_BAT, ACTOR_163_BAT, ASSET_3CA_MODEL_BAT,
0x1, D_80373090,
func_80360828, func_80326224, func_80325888,
func_80360828, func_80326224, actor_draw,
2500, 0, 0.9f, 0
};

View File

@@ -15,14 +15,14 @@ u8 D_80373130[] = {0, 1, 0, 0};
ActorInfo D_80373134 = {
0x1a6, 0x289, 0x431,
0x0, NULL,
func_8036158C, NULL, func_80325888,
func_8036158C, NULL, actor_draw,
0, 0, 0.0f, 0
};
ActorInfo D_80373158 = {
0x1a6, 0x28f, 0x431,
0x0, NULL,
func_8036158C, NULL, func_80325888,
func_8036158C, NULL, actor_draw,
0, 0, 0.0f, 0
};
@@ -68,8 +68,8 @@ void func_80361330(Actor *this, s32 next_state){
func_802F9F80(tmp_s0, 0.0f, 0.2f, 0.6f);
func_802FA060(tmp_s0, 27000, 27000, 0.0f);
local->unk4 = 0.6f;
func_80335924(this->unk148, 0x169, 0.0f, 0.6f);
func_80335A8C(this->unk148, 2);
skeletalAnim_set(this->unk148, 0x169, 0.0f, 0.6f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
}//L8036155C
this->state = next_state;

View File

@@ -211,7 +211,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx,
}
func_80253208(gfx, a1->unk30 - a1->unk6C, sp40 - a1->unk6C, 2*a1->unk6C, 2*a1->unk6C, D_803A5D00[func_8024BDA0()]);
if(a1->anim_ctrl != NULL){
func_8028781C(a1->anim_ctrl, sp5C, 1);
animctrl_drawSetup(a1->anim_ctrl, sp5C, 1);
}
modelRender_draw(gfx, mtx, sp5C, sp68, a1->unk3C*sp3C, sp44, a1->model);
}//L80300BA4

View File

@@ -228,12 +228,12 @@ void fxhoneycarrierscore_update(s32 arg0, struct8s *arg1){
D_803815E4 = 0;
D_803815E0 = 0.9999f;
func_803463D4(ITEM_13_EMPTY_HONEYCOMB, -6);
timedFunc_set_2(0.25f, (GenMethod_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000);
timedFunc_set_2(0.25f, (GenFunction_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000);
func_803463D4(ITEM_14_HEALTH, 0);
timedFunc_set_1(1.25f, (GenMethod_1)item_inc, ITEM_15_HEALTH_TOTAL);
timedFunc_set_1(1.25f, (GenMethod_1)func_8030E484, SFX_3EA_UNKNOWN);
timedFunc_set_2(1.25f, (GenMethod_2)item_set, ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL)+1);
timedFunc_set_1(1.5f, (GenMethod_1)gcpausemenu_80314AC8, 1);
timedFunc_set_1(1.25f, (GenFunction_1)item_inc, ITEM_15_HEALTH_TOTAL);
timedFunc_set_1(1.25f, (GenFunction_1)func_8030E484, SFX_3EA_UNKNOWN);
timedFunc_set_2(1.25f, (GenFunction_2)item_set, ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL)+1);
timedFunc_set_1(1.5f, (GenFunction_1)gcpausemenu_80314AC8, 1);
}
break;
case 2://L802FECD4

View File

@@ -232,13 +232,13 @@ void gcparade_setState(enum parade_state_e next_state) {
break;
case PARADE_STATE_5_WAIT_ON_NAME:
if ((D_803830F0.parade_id == 1) && (D_803830F0.parade_element->exit >= 0)) {
timedFunc_set_1(2.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition
timedFunc_set_1(2.0f, (GenFunction_1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition
}
break;
case PARADE_STATE_7_GOTO_NEXT:
D_803830F0.indx++;
D_803830F0.parade_element++;
timedFunc_set_1(0.25f, (GenMethod_1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP);
timedFunc_set_1(0.25f, (GenFunction_1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP);
break;
case PARADE_STATE_8_END:
func_803204E4(0x1F, 0);
@@ -294,13 +294,13 @@ void gcparade_update(void) {
sp34 = 0xA0;
if (D_803830F0.parade_element->exit >= 0)
sp34 = 0xA8;
timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 0);
timedFunc_set_1(1.0f, (GenFunction_1)func_80311714, 0);
func_80324DBC(1.0f, D_803830F0.indx + 0x11AF, sp34, NULL, NULL, gcparade_textCallback, NULL);
timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 1);
timedFunc_set_1(1.0f, (GenFunction_1)func_80311714, 1);
} else if (D_803830F0.parade_element->exit >= 0) {
func_8028F918(2);
}
timedFunc_set_1(1.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR);
timedFunc_set_1(1.0f, (GenFunction_1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR);
D_803830F0.unk5 = 1;
}
}

View File

@@ -222,7 +222,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
if(D_80382430.animctrl != NULL){
gDPSetTextureFilter((*gdl)++, G_TF_POINT);
gDPSetColorDither((*gdl)++, G_CD_DISABLE);
func_8028781C(D_80382430.animctrl, sp58, 1);
animctrl_drawSetup(D_80382430.animctrl, sp58, 1);
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
}
if(D_80382430.unk8 == 1 || D_80382430.unk8 == 6){

View File

@@ -843,7 +843,7 @@ void func_803163A8(gczoombox_t *this, Gfx **gfx, Mtx **mtx) {
func_8033A308(sp44);
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
if (this->anim_ctrl != NULL) {
func_8028781C(this->anim_ctrl, sp50, 1);
animctrl_drawSetup(this->anim_ctrl, sp50, 1);
}
modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model);
}

View File

@@ -2,6 +2,7 @@
#include "functions.h"
#include "variables.h"
#include "core2/modelRender.h"
#include "animation.h"
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
@@ -19,8 +20,8 @@ extern s32 func_8024DB50(f32[3], f32);
extern void func_80251788(f32, f32, f32);
extern void mlMtxScale(f32);
extern void mlMtxApply(Mtx* mtx);
extern struct58s *func_802EA154();
extern struct58s *func_802EA374(struct58s *);
extern AnimMtxList *animMtxList_new();
extern AnimMtxList *animMtxList_defrag(AnimMtxList *);
typedef struct{
@@ -602,19 +603,19 @@ enum model_render_color_mode_e{
/* .bss */
struct5Bs *D_80383650;
s32 D_80383658[0x2A];
s32 D_80383700;
BoneTransformList *modelRenderBoneTransformList;
bool D_80383704;
f32 D_80383708;
f32 D_8038370C;
s32 D_80383710;
enum model_render_color_mode_e modelRenderColorMode;
BKGfxList * modelRenderDisplayList;
struct58s * D_8038371C;
AnimMtxList * D_8038371C;
static BKTextureList * modelRenderTextureList;
s32 modelRenderAnimatedTexturesCacheId;
static BKVertexList * modelRendervertexList;
BKModelUnk20List * D_8038372C;
struct58s * D_80383730;
AnimMtxList * modelRenderAnimMtxList;
f32 modelRenderScale;
struct{
@@ -631,9 +632,9 @@ struct{
} D_80383758;
struct{
GenMethod_1 pre_method;
GenFunction_1 pre_method;
s32 pre_arg;
GenMethod_1 post_method;
GenFunction_1 post_method;
s32 post_arg;
} modelRenderCallback;
@@ -674,7 +675,7 @@ f32 D_80383C98[3];
/* .code */
void modelRender_reset(void){
D_80383700 = 0;
modelRenderBoneTransformList = 0;
D_80383708 = 30000.0f;
D_80383704 = TRUE;
D_8038370C = 1.0f;
@@ -794,7 +795,7 @@ void func_803387F8(Gfx **gfx, Mtx **mtx, void *arg2){
GeoCmd2 *cmd = (GeoCmd2 *)arg2;
if(D_8038371C){
func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unk9));
func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unk9));
if(D_80370990){
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -874,7 +875,7 @@ void func_80338BFC(Gfx **gfx, Mtx **mtx, void *arg2){
if(D_80383650){
if(D_8038371C){
func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unkA));
func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unkA));
func_8025235C(sp20, cmd->unkC);
mlMtxPop();
}
@@ -969,7 +970,7 @@ void func_80338EB8(Gfx ** gfx, Mtx ** mtx, void *arg2){
sp30 = (f32)cmd->unkE*modelRenderScale;
if(D_8038371C){
func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unk12));
func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unk12));
func_8025235C(sp34, sp34);
mlMtxPop();
}
@@ -1237,13 +1238,13 @@ BKModelBin *modelRender_draw(Gfx **gfx, Mtx **mtx, f32 position[3], f32 rotation
D_8038371C = 0;
}
else if(D_8038371C == 0 && modelRenderModelBin->animation_list_offset_18){
if(D_80383700 == 0){
func_802EA060(&D_80383730, (u8*)model_bin + model_bin->animation_list_offset_18);
if(modelRenderBoneTransformList == NULL){
animMtxList_setBoneless(&modelRenderAnimMtxList, (u8*)model_bin + model_bin->animation_list_offset_18);
}
else{
func_802EA1A8(&D_80383730, (u8*)model_bin + model_bin->animation_list_offset_18, D_80383700);
animMtxList_setBoned(&modelRenderAnimMtxList, (u8*)model_bin + model_bin->animation_list_offset_18, modelRenderBoneTransformList);
}
D_8038371C = D_80383730;
D_8038371C = modelRenderAnimMtxList;
}
if(D_8038372C){
@@ -1301,8 +1302,8 @@ BKModelUnk28List *func_8033A048(BKModelBin *arg0){
return (BKModelUnk28List *)((s32)arg0 + arg0->unk28);
}
s32 func_8033A064(void){
return D_80383700;
BoneTransformList *modelRender_getBoneTransformList(void){
return modelRenderBoneTransformList;
}
s32 func_8033A070(BKModelBin *arg0){
@@ -1373,18 +1374,18 @@ s32 func_8033A170(void){
return D_80370990;
}
void func_8033A17C(void){
func_802EA134(D_80383730);
D_80383730 = NULL;
void modelRender_free(void){
animMtxList_free(modelRenderAnimMtxList);
modelRenderAnimMtxList = NULL;
}
void func_8033A1A4(void){
void modelRender_init(void){
modelRender_reset();
D_80383758.unk18 = 0;
D_803837E0.cur_lookat = D_803837E0.lookat_buffer;
D_803837E0.lookat_buffer_end = D_803837E0.cur_lookat + ARRAYLEN(D_803837E0.lookat_buffer);
D_803837E0.eye_pos[0] = D_803837E0.eye_pos[1] = D_803837E0.eye_pos[2] = 0.0f;
D_80383730 = func_802EA154();
modelRenderAnimMtxList = animMtxList_new();
}
void func_8033A1FC(void){
@@ -1394,8 +1395,8 @@ void func_8033A1FC(void){
}
}
void func_8033A238(s32 arg0){
D_80383700 = arg0;
void modelRender_setBoneTransformList(BoneTransformList *arg0){
modelRenderBoneTransformList = arg0;
}
f32 func_8033A244(f32 arg0){
@@ -1427,7 +1428,7 @@ void func_8033A298(bool arg0){
/* moderRender_preDraw() sets a generic 1 argument function that will
* be called immediately prior to the model being drawn
*/
void modelRender_preDraw(GenMethod_1 func, s32 arg){
void modelRender_preDraw(GenFunction_1 func, s32 arg){
modelRenderCallback.pre_method = func;
modelRenderCallback.pre_arg = arg;
}
@@ -1435,7 +1436,7 @@ void modelRender_preDraw(GenMethod_1 func, s32 arg){
/* moderRender_postDraw() sets a generic 1 argument function that will
* be called immediately after to the model has been drawn
*/
void modelRender_postDraw(GenMethod_1 func, s32 arg){
void modelRender_postDraw(GenFunction_1 func, s32 arg){
modelRenderCallback.post_method = func;
modelRenderCallback.post_arg = arg;
}
@@ -1484,7 +1485,7 @@ void modelRender_setAlpha(s32 a){
}
}
void func_8033A444(struct58s *arg0){
void func_8033A444(AnimMtxList *arg0){
D_8038371C = arg0;
}
@@ -1523,7 +1524,7 @@ void modelRender_setDepthMode(enum model_render_depth_mode_e renderMode){
}
void modelRender_defrag(void){
if(D_80383730 != NULL){
D_80383730 = func_802EA374(D_80383730);
if(modelRenderAnimMtxList != NULL){
modelRenderAnimMtxList = animMtxList_defrag(modelRenderAnimMtxList);
}
}

277
src/core2/skeletalanim.c Normal file
View File

@@ -0,0 +1,277 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "animation.h"
extern void animationFile_getBoneTransformList(void *, f32, BoneTransformList *);
extern void boneTransformList_interpolate(BoneTransformList *, BoneTransformList *, BoneTransformList *, f32);
extern BoneTransformList *boneTransformList_new(void);
/* .code */
static void skeletalAnim_clearTransition(SkeletalAnimation *self){
if(self->bone_transform != NULL){
boneTransformList_free(self->bone_transform);
self->bone_transform = NULL;
}
if(self->animation_bin != NULL){
assetcache_release(self->animation_bin);
self->animation_bin = NULL;
}
if(self->transition_start != NULL){
boneTransformList_free(self->transition_start);
self->transition_start = NULL;
}
if(self->transition_target != NULL){
boneTransformList_free(self->transition_target);
self->transition_target = NULL;
}
self->transition_duration = 0.0f;
}
static void __perform_callback(SkeletalAnimationCallback* arg0){
if(arg0->arg_count == 0){
((void(*)(void))(arg0->callback_fn))();
}
else if(arg0->arg_count == 1){
((void(*)(s32))(arg0->callback_fn))(arg0->arg);
}
}
void skeletalAnim_clearCallbacks(SkeletalAnimation *self){
if(self->callback_list != NULL){
vector_clear(self->callback_list);
}
}
enum asset_e skeletalAnim_getAnimId(SkeletalAnimation *self){
return self->animation_id;
}
f32 skeletalAnim_getProgress(SkeletalAnimation *self){
return self->progress;
}
void skeletalAnim_getProgressRange(SkeletalAnimation *self, f32 *prev_progress, f32 *progress){
*prev_progress = self->prev_progress;
*progress = self->progress;
}
BoneTransformList *skeletalAnim_getBoneTransformList(SkeletalAnimation *self){
self->unk14 = 0;
if(self->bone_transform == NULL){
self->bone_transform = boneTransformList_new();
}
if(self->unk30 != 0){
self->unk30 = 0;
return self->bone_transform;
}
if(self->animation_id == 0){
return self->bone_transform;
}
if(self->animation_bin == NULL){
self->animation_bin = (AnimationFile *)assetcache_get(self->animation_id);
}
if(0.0f == self->transition_duration){
animationFile_getBoneTransformList(self->animation_bin, self->progress, self->bone_transform);
return self->bone_transform;
}
if(self->transition_target == NULL){
self->transition_target = (BoneTransformList *) boneTransformList_new();
}
animationFile_getBoneTransformList(self->animation_bin, self->progress, self->transition_target);
boneTransformList_interpolate(self->bone_transform, self->transition_start, self->transition_target, self->transition_progress);
return self->bone_transform;
}
s32 skeletalAnim_getLoopCount(SkeletalAnimation *self){
return self->loop_count;
}
void skeletalAnim_setCallback_0(SkeletalAnimation *self, f32 when, GenFunction_0 fn){
SkeletalAnimationCallback *ptr;
if(self->callback_list == NULL){
self->callback_list = vector_new(sizeof(SkeletalAnimationCallback), 8);
}
ptr = (SkeletalAnimationCallback *)vector_pushBackNew(&self->callback_list);
ptr->when = when;
ptr->arg_count = 0;
ptr->callback_fn = fn;
ptr->arg = 0;
}
void skeletalAnim_setCallback_1(SkeletalAnimation *self, f32 when, GenFunction_1 fn, s32 arg){
SkeletalAnimationCallback *ptr;
if(self->callback_list == NULL){
self->callback_list = vector_new(sizeof(SkeletalAnimationCallback), 8);
}
ptr = (SkeletalAnimationCallback *)vector_pushBackNew(&self->callback_list);
ptr->when = when;
ptr->arg_count = 1;
ptr->callback_fn = fn;
ptr->arg = (s32)arg;
}
void skeletalAnim_free(SkeletalAnimation *self){
VLA * temp_a0;
skeletalAnim_clearTransition(self);
temp_a0 = self->callback_list;
if(temp_a0 != NULL){
vector_free(temp_a0);
}
free(self);
}
SkeletalAnimation *skeletalAnim_new(void){
SkeletalAnimation *self;
self = (SkeletalAnimation *)malloc(sizeof(SkeletalAnimation));
self->bone_transform = NULL;
self->animation_bin = NULL;
self->callback_list = 0;
self->unk14 = 0;
self->behavior = SKELETAL_ANIM_1_LOOP;
self->loop_count = 0;
self->animation_id = 0;
self->unk30 = 0;
self->transition_start = NULL;
self->transition_target = NULL;
self->progress = 0.0f;
self->duration = 0.0f;
self->prev_progress = 0.0f;
self->transition_progress = 0.0f;
self->transition_duration = 0.0f;
return self;
}
void skeletalAnim_func_80335918(SkeletalAnimation *self){
self->unk30 = 1;
}
void skeletalAnim_set(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration){
if(self->animation_bin != NULL && anim_id != self->animation_id){
assetcache_release(self->animation_bin);
self->animation_bin = NULL;
}
if(self->callback_list != NULL && anim_id != self->animation_id){
vector_free(self->callback_list);
self->callback_list = NULL;
}
self->progress = 0.0f;
self->duration = duration;
self->loop_count = 0;
self->animation_id = anim_id;
self->prev_progress = 0.0f;
self->transition_progress = 0.0f;
self->transition_duration = transistion_duration;
if(0.0f < transistion_duration){
if(self->bone_transform != NULL ){
BoneTransformList *tmp;
tmp = self->transition_start;
self->transition_start = self->bone_transform;
self->bone_transform = tmp;
if(self->transition_target != 0){
boneTransformList_reset(self->transition_target);
}
} else {
self->transition_duration = 0.0f;
}
}
}
//sets animation, but retains current animation's progress
void skeletalAnim_swap(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration){
f32 sp1C;
sp1C = skeletalAnim_getProgress(self);
skeletalAnim_set(self, anim_id, transistion_duration, duration);
skeletalAnim_setProgress(self, sp1C);
}
void skeletalAnim_setProgress(SkeletalAnimation *self, f32 progress){
self->progress = progress;
}
void skeletalAnim_setDuration(SkeletalAnimation *self, f32 duration){
self->duration = duration;
}
void skeletalAnim_setBehavior(SkeletalAnimation *self, enum skeletal_anim_e behavior){
self->behavior = behavior;
}
void skeletalAnim_update(SkeletalAnimation *self, f32 dt, s32 arg2) {
f32 pad2C;
SkeletalAnimationCallback *begin_ptr;
SkeletalAnimationCallback *end_ptr;
SkeletalAnimationCallback *i_ptr;
if (arg2 == 0) {
if (self->unk14 < 10) {
self->unk14++;
if (self->unk14 == 0xA) {
skeletalAnim_clearTransition(self);
}
}
}
if (self->animation_id != 0) {
self->prev_progress = self->progress;
if ( self->duration > 0.0f) {
if (self->behavior == SKELETAL_ANIM_1_LOOP) { //LOOP
self->progress += dt / self->duration;
while (self->progress >= 1.0f) {
self->progress -= 1.0f;
self->loop_count++;
}
} else if ((self->behavior == SKELETAL_ANIM_2_ONCE) && (self->loop_count == 0)) {
//FORWARD ONCE
self->progress += (dt / self->duration);
if (self->progress >= 1.0f) {
self->progress = 0.99999f;
self->loop_count++;
}
} else if ((self->behavior == SKELETAL_ANIM_3_BACKWARDS) && (self->progress > 0.0f)) {
//BACKWARDS ONCE
self->progress -= (dt / self->duration);
if (self->progress < 0.0f) {
self->progress = 0.0f;
}
}
}
if (self->callback_list != NULL) {
begin_ptr = vector_getBegin(self->callback_list);
end_ptr = vector_getEnd(self->callback_list);
for(i_ptr = begin_ptr; i_ptr < end_ptr; i_ptr++) {
if (((self->prev_progress < i_ptr->when) || (self->progress < self->prev_progress)) && ( i_ptr->when <= self->progress)) {
__perform_callback(i_ptr);
}
}
}
if (self->transition_duration > 0.0f) {
if (self->transition_progress < 1.0f) {
self->transition_progress += dt / self->transition_duration;
if (self->transition_progress >= 1.0f) {
self->transition_progress = 1.0f;
}
} else {
self->transition_duration = 0.0f;
if (self->bone_transform != 0) {
boneTransformList_reset(self->bone_transform);
}
}
}
}
}

View File

@@ -475,7 +475,7 @@ void __spawnQueue_add_0(void (* arg0)(void)){
}
}
void __spawnQueue_add_1(GenMethod_1 arg0, s32 arg1){
void __spawnQueue_add_1(GenFunction_1 arg0, s32 arg1){
u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF;
if(tmp != spawnQueueLength){
spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0;
@@ -508,7 +508,7 @@ void __spawnQueue_add_3(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3){
}
}
void __spawnQueue_add_4(GenMethod_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){
void __spawnQueue_add_4(GenFunction_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){
u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF;
if(tmp != spawnQueueLength){
spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0;

View File

@@ -12,13 +12,13 @@ typedef struct timed_function_queue_s{
u8 arg_cnt;
u8 pad5[3];
union {
GenMethod_0 func0;
GenMethod_1 func1;
GenMethod_2 func2;
GenMethod_3 func3;
GenMethod_4 func4;
GenMethod_5 func5;
GenMethod_6 func6;
GenFunction_0 func0;
GenFunction_1 func1;
GenFunction_2 func2;
GenFunction_3 func3;
GenFunction_4 func4;
GenFunction_5 func5;
GenFunction_6 func6;
};
s32 arg[25];
@@ -83,7 +83,7 @@ TimedFunction* __timedFuncQueue_insert(f32 time, s32 cnt, void *funcPtr, s32 arg
retVal = (TimedFunction * )vector_insertNew((vector(TimedFunction)**)&D_80383380, ((s32)iPtr - (s32)startPtr)/(s32)sizeof(TimedFunction));
retVal->time = time;
retVal->arg_cnt = cnt;
retVal->func5 = (GenMethod_5) funcPtr;
retVal->func5 = (GenFunction_5) funcPtr;
retVal->arg[0] = arg0;
retVal->arg[1] = arg1;
retVal->arg[2] = arg2;
@@ -162,7 +162,7 @@ f32 func_80324C7C(void){
}
void timed_playSfx(f32 time, enum sfx_e arg0, f32 arg1, s32 arg2){
timedFunc_set_3(time, (GenMethod_3)func_80324A68, arg0, (s32)(arg1*1000.0f), arg2);
timedFunc_set_3(time, (GenFunction_3)func_80324A68, arg0, (s32)(arg1*1000.0f), arg2);
}
void func_80324CD8(f32 time){
@@ -170,11 +170,11 @@ void func_80324CD8(f32 time){
}
void func_80324CFC(f32 time, s32 id, s32 volume){
timedFunc_set_2(time, (GenMethod_2)func_80324A28, id, volume);
timedFunc_set_2(time, (GenFunction_2)func_80324A28, id, volume);
}
void func_80324D2C(f32 time, enum comusic_e arg0){
timedFunc_set_1(time, (GenMethod_1) func_80324A48, arg0);
timedFunc_set_1(time, (GenFunction_1) func_80324A48, arg0);
}
void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position[3], f32 arg5, f32 arg6){
@@ -188,7 +188,7 @@ void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position
argStruct.unkC[1] = position[1];
argStruct.unkC[2] = position[2];
timedFunc_set_6(time, (GenMethod_6) func_80324AA4, (void *) &argStruct);
timedFunc_set_6(time, (GenFunction_6) func_80324AA4, (void *) &argStruct);
}
void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], ActorMarker *caller, void (*callback_method_1)(ActorMarker *, enum asset_e, s32), void (*callback_method_2)(ActorMarker *, enum asset_e, s32)) {
@@ -207,47 +207,47 @@ void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], Ac
} else {
sp20.position[0] = sp20.position[1] = sp20.position[2] = 0.0f;
}
timedFunc_set_6(time, (GenMethod_6) func_80324AEC, (void *) &sp20);
timedFunc_set_6(time, (GenFunction_6) func_80324AEC, (void *) &sp20);
}
void func_80324E38(f32 time, s32 arg0){
timedFunc_set_1(time, (GenMethod_1) func_80324BA0, arg0);
timedFunc_set_1(time, (GenFunction_1) func_80324BA0, arg0);
}
void timed_setStaticCameraToNode(f32 time, s32 arg0){
timedFunc_set_1(time, (GenMethod_1) ncStaticCamera_setToNode, arg0);
timedFunc_set_1(time, (GenFunction_1) ncStaticCamera_setToNode, arg0);
}
void timed_exitStaticCamera(f32 time){
timedFunc_set_0(time, (GenMethod_0) ncStaticCamera_exit);
timedFunc_set_0(time, (GenFunction_0) ncStaticCamera_exit);
}
void timedFunc_set_0(f32 time, GenMethod_0 funcPtr){
void timedFunc_set_0(f32 time, GenFunction_0 funcPtr){
__timedFuncQueue_insert(time, 0, (void *) funcPtr, 0, 0, 0, 0, 0);
}
void timedFunc_set_1(f32 time, GenMethod_1 funcPtr, s32 arg0){
void timedFunc_set_1(f32 time, GenFunction_1 funcPtr, s32 arg0){
__timedFuncQueue_insert(time, 1, (void *) funcPtr, arg0, 0, 0, 0, 0);
}
void timedFunc_set_2(f32 time, GenMethod_2 funcPtr, s32 arg0, s32 arg1){
void timedFunc_set_2(f32 time, GenFunction_2 funcPtr, s32 arg0, s32 arg1){
__timedFuncQueue_insert(time, 2, (void *) funcPtr, arg0, arg1, 0, 0, 0);
}
void timedFunc_set_3(f32 time, GenMethod_3 funcPtr, s32 arg0, s32 arg1, s32 arg2){
void timedFunc_set_3(f32 time, GenFunction_3 funcPtr, s32 arg0, s32 arg1, s32 arg2){
__timedFuncQueue_insert(time, 3, (void *) funcPtr, arg0, arg1, arg2, 0, 0);
}
void timedFunc_set_4(f32 time, GenMethod_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3){
void timedFunc_set_4(f32 time, GenFunction_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3){
__timedFuncQueue_insert(time, 4, (void *) funcPtr, arg0, arg1, arg2, arg3, 0);
}
void timedFunc_set_5(f32 time, GenMethod_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){
void timedFunc_set_5(f32 time, GenFunction_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){
__timedFuncQueue_insert(time, 5, (void *) funcPtr, arg0, arg1, arg2, arg3, arg4);
}
void timedFunc_set_6(f32 time, GenMethod_6 funcPtr, void* argPtr ){
void timedFunc_set_6(f32 time, GenFunction_6 funcPtr, void* argPtr ){
TimedFunction *q = __timedFuncQueue_insert(time, 6, funcPtr, 0, 0, 0, 0, 0);
memcpy(&q->arg[5], argPtr, 0x50);
}
@@ -260,7 +260,7 @@ void timedJiggySpawn(f32 time, s32 jiggyId, f32 *position){
jiggyInfo.pos[1] = position[1];
jiggyInfo.pos[2] = position[2];
timedFunc_set_6(time, (GenMethod_6) __spawnjiggy, (void*) &jiggyInfo);
timedFunc_set_6(time, (GenFunction_6) __spawnjiggy, (void*) &jiggyInfo);
}
bool timedFuncQueue_is_empty(void){

View File

@@ -1,6 +1,6 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "core2/vla.h"
/* VARIABLE LENGTH ARRAY */