Renaming LMonkey
This commit is contained in:
@@ -2292,9 +2292,9 @@ enum bs_e
|
|||||||
|
|
||||||
enum mm_specific_flags {
|
enum mm_specific_flags {
|
||||||
MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED,
|
MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED,
|
||||||
|
MM_SPECIFIC_FLAG_1_ORANGE_HAS_BEEN_COLLECTED,
|
||||||
MM_SPECIFIC_FLAG_2_UNKNOWN = 0x2,
|
MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED,
|
||||||
MM_SPECIFIC_FLAG_3_UNKNOWN,
|
MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED,
|
||||||
MM_SPECIFIC_FLAG_4_SHAKE,
|
MM_SPECIFIC_FLAG_4_SHAKE,
|
||||||
|
|
||||||
MM_SPECIFIC_FLAG_6_UNKNOWN = 0x6,
|
MM_SPECIFIC_FLAG_6_UNKNOWN = 0x6,
|
||||||
|
@@ -432,7 +432,7 @@ void subaddie_set_state(Actor *, u32);
|
|||||||
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
|
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
|
||||||
int subaddie_maybe_set_state(Actor *, s32, f32);
|
int subaddie_maybe_set_state(Actor *, s32, f32);
|
||||||
void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
|
void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
|
||||||
int subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
|
bool subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
|
||||||
void func_80328CEC(Actor *, s32, s32, s32);
|
void func_80328CEC(Actor *, s32, s32, s32);
|
||||||
void func_80328FB0(Actor *, f32);
|
void func_80328FB0(Actor *, f32);
|
||||||
int func_80329030(Actor *, s32);
|
int func_80329030(Actor *, s32);
|
||||||
|
@@ -271,7 +271,7 @@ void CCW_func_80389BFC(Actor *this) {
|
|||||||
}
|
}
|
||||||
if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) {
|
if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) {
|
||||||
func_8028F364(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this);
|
func_8028F364(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this);
|
||||||
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (func_8028FC34() != 0)) {
|
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
|
||||||
func_8028FA54(D_8038FDE0);
|
func_8028FA54(D_8038FDE0);
|
||||||
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
|
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
|
||||||
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);
|
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);
|
||||||
|
@@ -143,7 +143,7 @@ void chnabnut_update(Actor *this) {
|
|||||||
}
|
}
|
||||||
if (this->is_first_encounter && !func_803114B0()) {
|
if (this->is_first_encounter && !func_803114B0()) {
|
||||||
func_8028F364(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
|
func_8028F364(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
|
||||||
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && func_8028FC34()) {
|
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
|
||||||
func_8028FA54(D_8038F350);
|
func_8028FA54(D_8038F350);
|
||||||
local->returned_acorn_count++;
|
local->returned_acorn_count++;
|
||||||
if (local->returned_acorn_count == 6) {
|
if (local->returned_acorn_count == 6) {
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||||
extern s32 func_8028F31C(f32[3], f32, s32, Actor **);
|
extern s32 player_setCarryObjectPoseInHorizontalRadius(f32[3], f32, s32, Actor **);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
s32 unk0;
|
s32 unk0;
|
||||||
@@ -48,11 +48,19 @@ Struct_FP_3E00 D_80391E80[] ={
|
|||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void func_8038A1F0(Actor **this_ptr, enum marker_e carried_obj_marker_id, enum actor_e actor_id, enum actor_e arg3){
|
void func_8038A1F0(Actor **this_ptr, enum marker_e carried_obj_marker_id, enum actor_e actor_id, enum actor_e arg3){
|
||||||
func_8028F31C((*this_ptr)->position, 600.0f, actor_id, this_ptr);
|
player_setCarryObjectPoseInHorizontalRadius((*this_ptr)->position, 600.0f, actor_id, this_ptr);
|
||||||
|
|
||||||
if(!func_80329530(*this_ptr, 400)) return;
|
if (!func_80329530(*this_ptr, 400)) {
|
||||||
if(bacarry_get_markerId() != carried_obj_marker_id) return;
|
return;
|
||||||
if(!func_8028FC34()) return;
|
}
|
||||||
|
|
||||||
|
if (bacarry_get_markerId() != carried_obj_marker_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!player_throwCarriedObject()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
func_8028FA34(arg3, *this_ptr);
|
func_8028FA34(arg3, *this_ptr);
|
||||||
}
|
}
|
||||||
|
@@ -2,19 +2,28 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
/* external function declarations */
|
||||||
void func_8028E668(f32 *, f32, f32, f32);
|
void func_8028E668(f32 *, f32, f32, f32);
|
||||||
int actor_animationIsAt(Actor *, f32);
|
int actor_animationIsAt(Actor *, f32);
|
||||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||||
void timed_exitStaticCamera(f32);
|
void timed_exitStaticCamera(f32);
|
||||||
void func_80324E38(f32, s32);
|
void func_80324E38(f32, s32);
|
||||||
void timed_setStaticCameraToNode(f32, s32);
|
void timed_setStaticCameraToNode(f32, s32);
|
||||||
s32 func_8028F31C(f32 *, f32, s32, Actor **);
|
s32 player_setCarryObjectPoseInHorizontalRadius(f32 *, f32, s32, Actor **);
|
||||||
|
|
||||||
void func_8028FA34(s32, Actor *);
|
void func_8028FA34(s32, Actor *);
|
||||||
|
|
||||||
|
/* public function declarations */
|
||||||
void chLMonkey_update(Actor *);
|
void chlmonkey_update(Actor *);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
|
enum chlmonkey_state_e {
|
||||||
|
LMONKEY_STATE_1_IDLE = 1,
|
||||||
|
LMONKEY_STATE_2_JUMPING,
|
||||||
|
LMONKEY_STATE_3_WALKING,
|
||||||
|
LMONKEY_STATE_4_LEAVING
|
||||||
|
};
|
||||||
|
|
||||||
ActorAnimationInfo chlmonkeyAnimations[5] = {
|
ActorAnimationInfo chlmonkeyAnimations[5] = {
|
||||||
{0, 0.0f},
|
{0, 0.0f},
|
||||||
{ASSET_5C_ANIM_CHIMPY_IDLE, 2.3f},
|
{ASSET_5C_ANIM_CHIMPY_IDLE, 2.3f},
|
||||||
@@ -26,28 +35,28 @@ ActorAnimationInfo chlmonkeyAnimations[5] = {
|
|||||||
ActorInfo chlmonkeyInfo = {
|
ActorInfo chlmonkeyInfo = {
|
||||||
MARKER_A_CHIMPY, ACTOR_F_CHIMPY, ASSET_35D_MODEL_CHIMPY,
|
MARKER_A_CHIMPY, ACTOR_F_CHIMPY, ASSET_35D_MODEL_CHIMPY,
|
||||||
1, chlmonkeyAnimations,
|
1, chlmonkeyAnimations,
|
||||||
NULL, chLMonkey_update, actor_draw,
|
NULL, chlmonkey_update, actor_draw,
|
||||||
2500, 0, 0.8f, 0
|
2500, 0, 0.8f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void func_80388300(Actor **arg0) {
|
void __chlmonkey_updateBringOrange(Actor **this_ptr) {
|
||||||
func_8028F31C((*arg0)->position, 800.0f, ACTOR_29_ORANGE_COLLECTIBLE, arg0);
|
player_setCarryObjectPoseInHorizontalRadius((*this_ptr)->position, 800.0f, ACTOR_29_ORANGE_COLLECTIBLE, this_ptr);
|
||||||
|
|
||||||
if (func_80329530(*arg0, 345)
|
if (func_80329530(*this_ptr, 345) &&
|
||||||
&& bacarry_get_markerId() == MARKER_36_ORANGE_COLLECTIBLE
|
bacarry_get_markerId() == MARKER_36_ORANGE_COLLECTIBLE &&
|
||||||
&& func_8028FC34()) {
|
player_throwCarriedObject()) {
|
||||||
|
|
||||||
func_8028FA34(0xc6, *arg0);
|
func_8028FA34(0xc6, *this_ptr);
|
||||||
(*arg0)->is_first_encounter = TRUE;
|
(*this_ptr)->is_first_encounter = TRUE;
|
||||||
timed_setStaticCameraToNode(1.2f, 0xF);
|
timed_setStaticCameraToNode(1.2f, 0xF);
|
||||||
func_80324E38(1.2f, 3);
|
func_80324E38(1.2f, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg0);
|
if (this_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chLMonkey_playRandomNoise(Actor *this) {
|
void __chlmonkey_playRandomNoise(Actor *this) {
|
||||||
f32 scaled_noise_volume;
|
f32 scaled_noise_volume;
|
||||||
f32 random_noise;
|
f32 random_noise;
|
||||||
static sNoiseCooldown = 0;
|
static sNoiseCooldown = 0;
|
||||||
@@ -56,85 +65,97 @@ void __chLMonkey_playRandomNoise(Actor *this) {
|
|||||||
random_noise = randf();
|
random_noise = randf();
|
||||||
sNoiseCooldown--;
|
sNoiseCooldown--;
|
||||||
|
|
||||||
if (sNoiseCooldown < 0) {
|
if (sNoiseCooldown < 0 && randf() < 0.2) {
|
||||||
if (randf() < 0.2) {
|
|
||||||
sNoiseCooldown = 6;
|
sNoiseCooldown = 6;
|
||||||
func_8030E6A4(((random_noise < 0.5) ? SFX_58_CHIMPY_NOISE_1 : SFX_59_CHIMPY_NOISE_2), randf() * 0.25 + 0.85, scaled_noise_volume);
|
func_8030E6A4(((random_noise < 0.5) ? SFX_58_CHIMPY_NOISE_1 : SFX_59_CHIMPY_NOISE_2), randf() * 0.25 + 0.85, scaled_noise_volume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __chlmonkey_spawnJiggy(s32 x, s32 y, s32 z) {
|
||||||
|
f32 pos[3];
|
||||||
|
|
||||||
|
TUPLE_ASSIGN(pos, x, y, z)
|
||||||
|
jiggy_spawn(JIGGY_9_MM_CHIMPY, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chLMonkey_spawnJiggy(s32 x, s32 y, s32 z) {
|
void __chlmonkey_complete(ActorMarker *marker, enum asset_e unused_1, s32 unused_2) {
|
||||||
f32 sp1C[3];
|
|
||||||
TUPLE_ASSIGN(sp1C, x, y, z);
|
|
||||||
jiggy_spawn(JIGGY_9_MM_CHIMPY, sp1C);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __chLMonkey_complete(ActorMarker *marker, enum asset_e arg1, s32 arg2) {
|
|
||||||
Actor *actor = marker_getActor(marker);
|
Actor *actor = marker_getActor(marker);
|
||||||
|
|
||||||
mapSpecificFlags_set(MM_SPECIFIC_FLAG_4_SHAKE, TRUE);
|
mapSpecificFlags_set(MM_SPECIFIC_FLAG_4_SHAKE, TRUE);
|
||||||
subaddie_set_state(actor, 3);
|
subaddie_set_state(actor, LMONKEY_STATE_3_WALKING);
|
||||||
timed_setStaticCameraToNode(2.3f, 0x12);
|
timed_setStaticCameraToNode(2.3f, 0x12);
|
||||||
timedFunc_set_3(2.9f, __chLMonkey_spawnJiggy, actor->position_x, actor->position_y + 150.0f, actor->position_z);
|
timedFunc_set_3(2.9f, __chlmonkey_spawnJiggy, actor->position_x, actor->position_y + 150.0f, actor->position_z);
|
||||||
timed_exitStaticCamera(4.3f);
|
timed_exitStaticCamera(4.3f);
|
||||||
func_80324E38(4.3f, 0);
|
func_80324E38(4.3f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void chLMonkey_update(Actor *this){
|
void chlmonkey_update(Actor *this) {
|
||||||
func_8028E668(this->position, 35.0f, 0.0f, 65.0f);
|
func_8028E668(this->position, 35.0f, 0.0f, 65.0f);
|
||||||
actor_collisionOff(this);
|
actor_collisionOff(this);
|
||||||
this->marker->propPtr->unk8_3 = 1;
|
this->marker->propPtr->unk8_3 = 1;
|
||||||
|
|
||||||
if (map_get() != MAP_2_MM_MUMBOS_MOUNTAIN) {
|
if (map_get() != MAP_2_MM_MUMBOS_MOUNTAIN) {
|
||||||
func_80343DEC(this);
|
func_80343DEC(this);
|
||||||
}
|
}
|
||||||
else {//L80388630
|
else {//L80388630
|
||||||
if (func_80329530(this, 700) && !func_803114B0()) {
|
if (func_80329530(this, 700) && !func_803114B0()) {
|
||||||
__chLMonkey_playRandomNoise(this);
|
__chlmonkey_playRandomNoise(this);
|
||||||
}//L8038865C
|
}//L8038865C
|
||||||
|
|
||||||
switch (this->state) {
|
switch (this->state) {
|
||||||
case 1://L80388690
|
case LMONKEY_STATE_1_IDLE://L80388690
|
||||||
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_2_UNKNOWN)) {
|
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED)) {
|
||||||
subaddie_set_state(this, 4);
|
subaddie_set_state(this, LMONKEY_STATE_4_LEAVING);
|
||||||
|
|
||||||
if (!jiggyscore_isCollected(JIGGY_9_MM_CHIMPY)) {
|
if (!jiggyscore_isCollected(JIGGY_9_MM_CHIMPY)) {
|
||||||
gcdialog_showText(ASSET_B40_DIALOG_CHIMPY_COMPLETE, 0xE, this->position, this->marker, __chLMonkey_complete, NULL);
|
gcdialog_showText(ASSET_B40_DIALOG_CHIMPY_COMPLETE, 0xE, this->position, this->marker, __chlmonkey_complete, NULL);
|
||||||
}
|
}
|
||||||
else {//L803886E8
|
else {//L803886E8
|
||||||
__chLMonkey_complete(this->marker, ASSET_B40_DIALOG_CHIMPY_COMPLETE, -1);
|
__chlmonkey_complete(this->marker, ASSET_B40_DIALOG_CHIMPY_COMPLETE, -1);
|
||||||
}//L80388898
|
}//L80388898
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
func_80388300(&this);
|
__chlmonkey_updateBringOrange(&this);
|
||||||
if (func_80329530(this, 345)
|
|
||||||
&& !func_80329530(this, 150)
|
if (func_80329530(this, 345) &&
|
||||||
&& !item_getCount(ITEM_19_ORANGE)
|
!func_80329530(this, 150) &&
|
||||||
&& !this->is_first_encounter
|
!item_getCount(ITEM_19_ORANGE) &&
|
||||||
) {
|
!this->is_first_encounter) {
|
||||||
|
|
||||||
gcdialog_showText(ASSET_B3F_DIALOG_CHIMPY_MEET, 0xe, this->position, NULL, NULL, NULL);
|
gcdialog_showText(ASSET_B3F_DIALOG_CHIMPY_MEET, 0xe, this->position, NULL, NULL, NULL);
|
||||||
this->is_first_encounter = TRUE;
|
this->is_first_encounter = TRUE;
|
||||||
}//L80388774
|
}//L80388774
|
||||||
|
|
||||||
actor_loopAnimation(this);
|
actor_loopAnimation(this);
|
||||||
subaddie_maybe_set_state_position_direction(this, 2, 0.0f, -1, 0.02f);
|
subaddie_maybe_set_state_position_direction(this, LMONKEY_STATE_2_JUMPING, 0.0f, -1, 0.02f);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: //L803887A4
|
|
||||||
func_80388300(&this);
|
case LMONKEY_STATE_2_JUMPING: //L803887A4
|
||||||
|
__chlmonkey_updateBringOrange(&this);
|
||||||
actor_playAnimationOnce(this);
|
actor_playAnimationOnce(this);
|
||||||
|
|
||||||
if (actor_animationIsAt(this, 0.99f)) {
|
if (actor_animationIsAt(this, 0.99f)) {
|
||||||
subaddie_set_state_with_direction(this, 1, 0.0f, -1);
|
subaddie_set_state_with_direction(this, LMONKEY_STATE_1_IDLE, 0.0f, -1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: //L803887E4
|
|
||||||
|
case LMONKEY_STATE_4_LEAVING: //L803887E4
|
||||||
actor_loopAnimation(this);
|
actor_loopAnimation(this);
|
||||||
break;
|
break;
|
||||||
case 3: //L803887F4
|
|
||||||
|
case LMONKEY_STATE_3_WALKING: //L803887F4
|
||||||
func_80343DEC(this);
|
func_80343DEC(this);
|
||||||
actor_loopAnimation(this);
|
actor_loopAnimation(this);
|
||||||
|
|
||||||
if (0.19 <= this->unk48) {
|
if (0.19 <= this->unk48) {
|
||||||
mapSpecificFlags_set(MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED, TRUE);
|
mapSpecificFlags_set(MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0.24 <= this->unk48) {
|
if (0.24 <= this->unk48) {
|
||||||
mapSpecificFlags_set(MM_SPECIFIC_FLAG_3_UNKNOWN, TRUE);
|
mapSpecificFlags_set(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0.99 <= this->unk48) {
|
if (0.99 <= this->unk48) {
|
||||||
marker_despawn(this->marker);
|
marker_despawn(this->marker);
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
//external
|
//external
|
||||||
f32 mapModel_getFloorY(f32*);
|
f32 mapModel_getFloorY(f32*);
|
||||||
void func_802C4218(s32, f32, f32, f32);
|
void func_802C4218(s32, f32, f32, f32);
|
||||||
void func_803252D0(f32, s32);
|
void timed_mapSpecificFlags_setTrue(f32, s32);
|
||||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||||
|
|
||||||
//typedefs
|
//typedefs
|
||||||
@@ -205,7 +205,7 @@ void func_80387C28(Actor * this){
|
|||||||
func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE);
|
func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE);
|
||||||
__spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z));
|
__spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z));
|
||||||
}//L80387D64
|
}//L80387D64
|
||||||
func_803252D0(1.5f, 7);
|
timed_mapSpecificFlags_setTrue(1.5f, 7);
|
||||||
actor_collisionOff(this);
|
actor_collisionOff(this);
|
||||||
if(local->unkC != 3){
|
if(local->unkC != 3){
|
||||||
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
||||||
|
@@ -114,7 +114,7 @@ void func_80387774(Actor **this_ptr){
|
|||||||
func_8028F364(local->throw_target_position, local->throw_target_radius, 100.0f, ACTOR_2A_GOLD_BULLION, this_ptr);
|
func_8028F364(local->throw_target_position, local->throw_target_radius, 100.0f, ACTOR_2A_GOLD_BULLION, this_ptr);
|
||||||
if( func_80329530(*this_ptr, 200)
|
if( func_80329530(*this_ptr, 200)
|
||||||
&& bacarry_get_markerId() == MARKER_37_GOLD_BULLION
|
&& bacarry_get_markerId() == MARKER_37_GOLD_BULLION
|
||||||
&& func_8028FC34()
|
&& player_throwCarriedObject()
|
||||||
){
|
){
|
||||||
func_8028FA34(!mapSpecificFlags_get(0)? 0x149 : 0x14a, *this_ptr);
|
func_8028FA34(!mapSpecificFlags_get(0)? 0x149 : 0x14a, *this_ptr);
|
||||||
(*this_ptr)->is_first_encounter = TRUE;
|
(*this_ptr)->is_first_encounter = TRUE;
|
||||||
|
@@ -6,7 +6,7 @@ extern void func_8028F7D4(f32, f32);
|
|||||||
void chLevelCollectible_update(Actor *this);
|
void chLevelCollectible_update(Actor *this);
|
||||||
extern void func_80329904(ActorMarker *, s32, f32*);
|
extern void func_80329904(ActorMarker *, s32, f32*);
|
||||||
extern ActorMarker *func_8028E86C(void);
|
extern ActorMarker *func_8028E86C(void);
|
||||||
extern void func_803252D0(f32, s32);
|
extern void timed_mapSpecificFlags_setTrue(f32, s32);
|
||||||
extern void func_8035646C(s32);
|
extern void func_8035646C(s32);
|
||||||
|
|
||||||
ActorAnimationInfo D_80367B50[] = {
|
ActorAnimationInfo D_80367B50[] = {
|
||||||
@@ -107,8 +107,10 @@ void __chLevelCollectible_collide(ActorMarker *marker, ActorMarker *other_marker
|
|||||||
sp18[2] = this->position[2];
|
sp18[2] = this->position[2];
|
||||||
switch (marker->id) {
|
switch (marker->id) {
|
||||||
case MARKER_36_ORANGE_COLLECTIBLE:
|
case MARKER_36_ORANGE_COLLECTIBLE:
|
||||||
if (mapSpecificFlags_get(1))
|
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_1_ORANGE_HAS_BEEN_COLLECTED)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
func_8035646C(FILEPROG_8_ORANGE_TEXT);
|
func_8035646C(FILEPROG_8_ORANGE_TEXT);
|
||||||
func_8030E6D4(SFX_B3_ORANGE_TALKING);
|
func_8030E6D4(SFX_B3_ORANGE_TALKING);
|
||||||
dialog_id = 0;
|
dialog_id = 0;
|
||||||
@@ -234,7 +236,7 @@ void __chLevelCollectible_returnObj(Actor *this) {
|
|||||||
case MARKER_37_GOLD_BULLION:
|
case MARKER_37_GOLD_BULLION:
|
||||||
break;
|
break;
|
||||||
case MARKER_36_ORANGE_COLLECTIBLE:
|
case MARKER_36_ORANGE_COLLECTIBLE:
|
||||||
func_803252D0(1.7f, 2);
|
timed_mapSpecificFlags_setTrue(1.7f, MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED);
|
||||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
|
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
|
||||||
break;
|
break;
|
||||||
case MARKER_1FD_BLUE_PRESENT_COLLECTIBLE:
|
case MARKER_1FD_BLUE_PRESENT_COLLECTIBLE:
|
||||||
@@ -363,7 +365,7 @@ void chLevelCollectible_update(Actor *this){
|
|||||||
func_802D83EC(this);
|
func_802D83EC(this);
|
||||||
break;
|
break;
|
||||||
case MARKER_36_ORANGE_COLLECTIBLE: //L802D86DC
|
case MARKER_36_ORANGE_COLLECTIBLE: //L802D86DC
|
||||||
if(mapSpecificFlags_get(3) && map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){
|
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED) && map_get() == MAP_2_MM_MUMBOS_MOUNTAIN) {
|
||||||
marker_despawn(this->marker);
|
marker_despawn(this->marker);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -89,7 +89,7 @@ enum hitbox_e hitbox_getHitboxForActor(ActorMarker *arg0){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// break ?? //
|
// break ?? //
|
||||||
bool func_8028DD60(enum actor_e actor_id, Actor **arg1){
|
bool player_setCarryObjectPose(enum actor_e actor_id, Actor **arg1){
|
||||||
ActorMarker *m1;
|
ActorMarker *m1;
|
||||||
ActorMarker *m2;
|
ActorMarker *m2;
|
||||||
Actor *actor;
|
Actor *actor;
|
||||||
|
@@ -660,9 +660,9 @@ bool func_8028F2FC(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//sets carry actor if player is within a horizantal radius around a point
|
//sets carry actor if player is within a horizantal radius around a point
|
||||||
bool func_8028F31C(f32 position[3], f32 radius, enum actor_e actor_id, Actor **arg3){
|
bool player_setCarryObjectPoseInHorizontalRadius(f32 position[3], f32 radius, enum actor_e actor_id, Actor **arg3){
|
||||||
if (player_isInHorizontalRadius(position, radius)) {
|
if (player_isInHorizontalRadius(position, radius)) {
|
||||||
return func_8028DD60(actor_id, arg3);
|
return player_setCarryObjectPose(actor_id, arg3);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -670,7 +670,7 @@ bool func_8028F31C(f32 position[3], f32 radius, enum actor_e actor_id, Actor **a
|
|||||||
//sets carry actor if player is within a cylinder around a point
|
//sets carry actor if player is within a cylinder around a point
|
||||||
bool func_8028F364(f32 position[3], f32 radius, f32 vert_range, enum actor_e actor_id, Actor **arg4) {
|
bool func_8028F364(f32 position[3], f32 radius, f32 vert_range, enum actor_e actor_id, Actor **arg4) {
|
||||||
if (player_isInVerticalRange(position, vert_range)) {
|
if (player_isInVerticalRange(position, vert_range)) {
|
||||||
return func_8028F31C(position, radius, actor_id, arg4);
|
return player_setCarryObjectPoseInHorizontalRadius(position, radius, actor_id, arg4);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -933,9 +933,11 @@ bool func_8028FBD4(f32 arg0[3]) {
|
|||||||
return bs_checkInterrupt(BS_INTR_8) == 2;
|
return bs_checkInterrupt(BS_INTR_8) == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool func_8028FC34(void){
|
bool player_throwCarriedObject(void){
|
||||||
if (func_8028E86C() && bscarry_inSet(bs_getState()))
|
if (func_8028E86C() && bscarry_inSet(bs_getState())) {
|
||||||
return bs_checkInterrupt(BS_INTR_16_THROW_CARRIED_OBJ) == 2;
|
return bs_checkInterrupt(BS_INTR_16_THROW_CARRIED_OBJ) == 2;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1318,15 +1318,15 @@ void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32
|
|||||||
func_803289EC(this, arg2, direction);
|
func_803289EC(this, arg2, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
int subaddie_maybe_set_state_position_direction(Actor * this, s32 myAnimId, f32 start_position, s32 direction, f32 probability){
|
bool subaddie_maybe_set_state_position_direction(Actor *this, s32 myAnimId, f32 start_position, s32 direction, f32 probability) {
|
||||||
if (randf() < probability) {
|
if (randf() < probability) {
|
||||||
if (__subaddie_set_state(this, myAnimId) && this->animctrl) {
|
if (__subaddie_set_state(this, myAnimId) && this->animctrl) {
|
||||||
func_803285E8(this, start_position, direction);
|
func_803285E8(this, start_position, direction);
|
||||||
animctrl_start(this->animctrl, "subaddie.c", 0x705);
|
animctrl_start(this->animctrl, "subaddie.c", 0x705);
|
||||||
}
|
}
|
||||||
return 1;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void subaddie_set_ideal_yaw(Actor * this, int arg1){
|
void subaddie_set_ideal_yaw(Actor * this, int arg1){
|
||||||
|
@@ -135,16 +135,19 @@ void func_80324AEC(DelayedTextCallback *arg0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80324BA0(s32 arg0){
|
void func_80324BA0(s32 arg0){
|
||||||
if(arg0 == 1)
|
if (arg0 == 1) {
|
||||||
func_8028F918(1);
|
func_8028F918(1);
|
||||||
else if(arg0 == 2)
|
}
|
||||||
|
else if (arg0 == 2) {
|
||||||
func_8028F918(3);
|
func_8028F918(3);
|
||||||
else if(arg0 == 3)
|
}
|
||||||
|
else if (arg0 == 3) {
|
||||||
func_8028F918(2);
|
func_8028F918(2);
|
||||||
else{
|
}
|
||||||
if(arg0 == 0)
|
else if (arg0 == 0) {
|
||||||
func_8028F918(0);
|
func_8028F918(0);
|
||||||
else if (arg0 == 4)
|
}
|
||||||
|
else if (arg0 == 4) {
|
||||||
func_802D6114();
|
func_802D6114();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,10 +322,10 @@ void timedFuncQueue_defrag(void){
|
|||||||
D_80383380.ptr = vector_defrag(D_80383380.ptr);
|
D_80383380.ptr = vector_defrag(D_80383380.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_803252B0(s32 arg0){
|
void mapSpecificFlags_setTrue(s32 flag){
|
||||||
mapSpecificFlags_set(arg0, 1);
|
mapSpecificFlags_set(flag, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_803252D0(f32 time, s32 arg0){
|
void timed_mapSpecificFlags_setTrue(f32 time, s32 flag){
|
||||||
timedFunc_set_1(time, func_803252B0, arg0);
|
timedFunc_set_1(time, mapSpecificFlags_setTrue, flag);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user