Further documentations have made:
- src/fight: named all ActorInfos and related functions - src/core2: named shock jump and flight pad ActorInfos and related functions in code_43A40.c, partially documented code_CF3E0.c - include/enums.h: added some enum values
This commit is contained in:
@@ -2,34 +2,34 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_802CA9D0(Actor *this);
|
||||
void func_802CAA44(Actor *this);
|
||||
void func_802CAB70(Actor *this);
|
||||
void chShockJump_update(Actor *this);
|
||||
void chFlightPad_update(Actor *this);
|
||||
void chFightFlightPad_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorInfo D_80366F20 = {
|
||||
extern ActorInfo chShockJump = {
|
||||
0x0D4, ACTOR_B_SHOCKSPRING_PAD, ASSET_489_MODEL_SHOCKSPRING_PAD,
|
||||
0, NULL,
|
||||
func_802CA9D0, func_80326224, actor_draw,
|
||||
chShockJump_update, func_80326224, actor_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80366F44 = {
|
||||
extern ActorInfo chFlightPad = {
|
||||
MARKER_45_FLIGHT_PAD, ACTOR_E4_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD,
|
||||
0, NULL,
|
||||
func_802CAA44, func_80326224, actor_draw,
|
||||
chFlightPad_update, func_80326224, actor_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80366F68 = {
|
||||
extern ActorInfo chFightFlightPad = {
|
||||
MARKER_261_FIGHT_FLIGHT_PAD, ACTOR_39F_FIGHT_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD,
|
||||
0, NULL,
|
||||
func_802CAB70, func_80326224, actor_draw,
|
||||
chFightFlightPad_update, func_80326224, actor_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
|
||||
extern struct31s D_80366F8C = {
|
||||
extern struct31s chFightFlightPad_D_80366F8C = {
|
||||
{0.4f, 0.4f},
|
||||
{0.0f, 0.0f},
|
||||
{0.0f, 0.01f},
|
||||
@@ -38,14 +38,14 @@ extern struct31s D_80366F8C = {
|
||||
};
|
||||
|
||||
|
||||
extern struct43s D_80366FB4 = {
|
||||
extern struct43s chFightFlightPad_D_80366FB4 = {
|
||||
{{-360.0f, 360.0f, -360.0}, {360.0f, 660.0f, 360.0f}},
|
||||
{{0.0f, -1200.0f, 0.0f}, {0.0f, -1200.0f, 0.0f}},
|
||||
{{0.0f, 0.0f, 0.0f}, {0.0f, 40.0f, 0.0f}}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_802CA9D0(Actor *this){
|
||||
void chShockJump_update(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
if(func_803203FC(UNKFLAGS1_86_SANDCASTLE_SHOCKSPRING_JUMP_UNLOCKED)){
|
||||
ability_unlock(ABILITY_D_SHOCK_JUMP);
|
||||
@@ -59,7 +59,7 @@ void func_802CA9D0(Actor *this){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802CAA44(Actor *this){
|
||||
void chFlightPad_update(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
if(func_803203FC(UNKFLAGS1_8A_SANDCASTLE_FLIGHT_UNLOCKED)){
|
||||
ability_unlock(ABILITY_9_FLIGHT);
|
||||
@@ -80,20 +80,20 @@ void func_802CAA44(Actor *this){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802CAAF0(f32 position[3]){
|
||||
void chFightFlightPad_emitSparklesAtPosition(f32 position[3]){
|
||||
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(0x18);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_715_SPRITE_SPARKLE_RED);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80366FB4);
|
||||
func_802EFB98(pCtrl, &D_80366F8C);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &chFightFlightPad_D_80366FB4);
|
||||
func_802EFB98(pCtrl, &chFightFlightPad_D_80366F8C);
|
||||
func_802EFA78(pCtrl, 1);
|
||||
particleEmitter_emitN(pCtrl, 0x18);
|
||||
}
|
||||
|
||||
void func_802CAB70(Actor *this){
|
||||
void chFightFlightPad_update(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
func_802CAAF0(this->position);
|
||||
chFightFlightPad_emitSparklesAtPosition(this->position);
|
||||
FUNC_8030E8B4(SFX_113_PAD_APPEARS, 1.0f, 32000, this->position, 5000, 12000);
|
||||
}
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
typedef KEY_VALUE_PAIR(s16, s16) unkD_80372730;
|
||||
typedef KEY_VALUE_PAIR(s16, s16) MapProgressFlagToDialogID;
|
||||
|
||||
unkD_80372730 D_80372730[] = {
|
||||
/* Mapping for file progess flags to Dialog IDs */
|
||||
MapProgressFlagToDialogID fileProgressDialogMap[] = {
|
||||
{ FILEPROG_AB_SWIM_OILY_WATER, 0xBA1},
|
||||
{ FILEPROG_AC_DIVE_OILY_WATER, 0xBA2},
|
||||
{ FILEPROG_AA_HAS_TOUCHED_CCW_BRAMBLE_FIELD, 0xCE6},
|
||||
@@ -33,8 +34,9 @@ unkD_80372730 D_80372730[] = {
|
||||
{ -1, -1}
|
||||
};
|
||||
|
||||
|
||||
unkD_80372730 D_80372798[] = {
|
||||
/* This progress IDs are not saved in the save file, like when Banjo goes near a Note door which requires more notes than the Banjo has. */
|
||||
/* Triggers a dialog every time after the game restarts. */
|
||||
MapProgressFlagToDialogID volatileProgressDialogMap[] = {
|
||||
{0x9E, 0xBA3},
|
||||
{0x9F, 0xCE8},
|
||||
{0xA0, 0x1032},
|
||||
@@ -59,52 +61,55 @@ unkD_80372730 D_80372798[] = {
|
||||
{ -1, -1}
|
||||
};
|
||||
|
||||
static s32 __findIndex(unkD_80372730 *arg0, s32 arg1) {
|
||||
s32 phi_v1 = 0;
|
||||
static s32 __findIndex(MapProgressFlagToDialogID *map, s32 key) {
|
||||
s32 i = 0;
|
||||
|
||||
while (arg0[phi_v1].key >= 0) {
|
||||
if (arg1 == arg0[phi_v1].key) {
|
||||
return phi_v1;
|
||||
while (map[i].key >= 0) {
|
||||
if (key == map[i].key) {
|
||||
return i;
|
||||
}
|
||||
phi_v1++;
|
||||
i++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 func_803563B8(enum file_progress_e arg0, s32 arg1) {
|
||||
/* Checks for a specific file progress flag and triggers a dialog only if the progress flag was not set and sets the progress flag */
|
||||
s32 func_803563B8(enum file_progress_e progress_flag, s32 arg1) {
|
||||
s32 index;
|
||||
|
||||
if (fileProgressFlag_get(arg0) != 0) {
|
||||
if (fileProgressFlag_get(progress_flag) != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
index = __findIndex(D_80372730, arg0);
|
||||
index = __findIndex(fileProgressDialogMap, progress_flag);
|
||||
if (index != -1) {
|
||||
if (func_80311480(D_80372730[index].value, arg1, 0, 0, 0, 0) != 0) {
|
||||
fileProgressFlag_set(arg0, 1);
|
||||
if (func_80311480(fileProgressDialogMap[index].value, arg1, 0, 0, 0, 0) != 0) {
|
||||
fileProgressFlag_set(progress_flag, 1);
|
||||
}
|
||||
return fileProgressFlag_get(arg0);
|
||||
return fileProgressFlag_get(progress_flag);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8035644C(enum file_progress_e arg0){
|
||||
func_803563B8(arg0, 0);
|
||||
void func_8035644C(enum file_progress_e progress_flag){
|
||||
func_803563B8(progress_flag, 0);
|
||||
}
|
||||
|
||||
void func_8035646C(s32 arg0) {
|
||||
func_803563B8(arg0, 4);
|
||||
void func_8035646C(enum file_progress_e progress_flag) {
|
||||
func_803563B8(progress_flag, 4);
|
||||
}
|
||||
|
||||
/* Checks for a specific "volatile" progress flag and triggers a dialog only if the progress flag was not set and sets the progress flag */
|
||||
s32 func_8035648C(s32 arg0, s32 arg1) {
|
||||
s32 index;
|
||||
|
||||
if (func_803203FC() != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
index = __findIndex(D_80372798, arg0);
|
||||
index = __findIndex(volatileProgressDialogMap, arg0);
|
||||
if (index != -1) {
|
||||
if (func_80311480(D_80372798[index].value, arg1, 0, 0, 0, 0) != 0) {
|
||||
if (func_80311480(volatileProgressDialogMap[index].value, arg1, 0, 0, 0, 0) != 0) {
|
||||
func_803204E4(arg0, 1);
|
||||
}
|
||||
return func_803203FC(arg0);
|
||||
|
||||
@@ -38,8 +38,8 @@ extern ActorInfo D_80366C80; //chhoneycarrier
|
||||
extern ActorInfo D_80366CA4; //chhoney
|
||||
extern ActorInfo chTrainers;
|
||||
extern ActorInfo D_80366EF0; //large_shadow
|
||||
extern ActorInfo D_80366F20; //chshockjump
|
||||
extern ActorInfo D_80366F44; //flight_pad
|
||||
extern ActorInfo chShockJump; //chshockjump
|
||||
extern ActorInfo chFlightPad; //flight_pad
|
||||
extern ActorInfo D_803670B8; //snippet
|
||||
extern ActorInfo D_803670DC; //black_snippet
|
||||
extern ActorInfo D_80367100; //mutie_snippet
|
||||
@@ -251,8 +251,8 @@ void spawnQueue_reset(void){
|
||||
spawnableActorList_add(&D_80367F30, actor_new, 0x0000400);
|
||||
spawnableActorList_add(&chBubble, actor_new, 0x0000004);
|
||||
spawnableActorList_add(&chGloop, actor_new, 0x000008A); //gloop
|
||||
spawnableActorList_add(&D_80366F20, actor_new, 0x0000000); //chshockjump
|
||||
spawnableActorList_add(&D_80366F44, actor_new, 0x0000000); //flight_pad
|
||||
spawnableActorList_add(&chShockJump, actor_new, 0x0000000); //chshockjump
|
||||
spawnableActorList_add(&chFlightPad, actor_new, 0x0000000); //flight_pad
|
||||
spawnableActorList_add(&D_80367D24, actor_new, 0x0200000); //redfeather
|
||||
spawnableActorList_add(&D_80367D48, actor_new, 0x0200000); //goldfeather
|
||||
spawnableActorList_add(&D_80367C90, actor_new, 0x0000004); //spent_redfeather
|
||||
|
||||
Reference in New Issue
Block a user