Merge branch 'master' into 'document/lighting'
# Conflicts: # src/core2/code_AC520.c
This commit is contained in:
@@ -147,10 +147,10 @@ void chTiptup_setState(Actor *this, s32 arg1){
|
||||
this->has_met_before = TRUE;
|
||||
|
||||
if (unqPtr->unkA == 0) {
|
||||
gcdialog_showText(ASSET_C72_TEXT_UNKNOWN, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
|
||||
gcdialog_showText(ASSET_C72_DIALOG_UNKNOWN, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
|
||||
}
|
||||
else {
|
||||
gcdialog_showText(ASSET_C74_TEXT_UNKNOWN, 0xf, this->position, this->marker, chTiptup_textEvent, 0);
|
||||
gcdialog_showText(ASSET_C74_DIALOG_UNKNOWN, 0xf, this->position, this->marker, chTiptup_textEvent, 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -235,7 +235,7 @@ void chTiptup_choirHitReaction(ActorMarker *this, s32 arg1){
|
||||
thisActor = marker_getActor(this);
|
||||
unqPtr = (ActorLocal_Tiptup *)&thisActor->local;
|
||||
if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){
|
||||
if(!mapSpecificFlags_get(0) && gcdialog_showText(ASSET_C76_TEXT_UNKNOWN, 0, 0, 0, 0, 0))
|
||||
if(!mapSpecificFlags_get(0) && gcdialog_showText(ASSET_C76_DIALOG_UNKNOWN, 0, 0, 0, 0, 0))
|
||||
mapSpecificFlags_set(0,1);
|
||||
}else{
|
||||
tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0);
|
||||
@@ -321,7 +321,7 @@ void chTiptup_update(Actor *this){
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(ml_distance_vec3f(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){
|
||||
if(ml_vec3f_distance(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){
|
||||
chTiptup_setState(this, 2);
|
||||
}
|
||||
}
|
||||
@@ -335,12 +335,12 @@ void chTiptup_update(Actor *this){
|
||||
}
|
||||
} //L80389370
|
||||
else{
|
||||
if(ml_distance_vec3f(this->position, player_position) >= 300.0f)
|
||||
if(ml_vec3f_distance(this->position, player_position) >= 300.0f)
|
||||
chTiptup_setState(this, 1);
|
||||
}
|
||||
}//L803893A0
|
||||
if(this->state == 6){
|
||||
if(ml_distance_vec3f(this->position, player_position) < 300.0f && !unqPtr->unk8){
|
||||
if(ml_vec3f_distance(this->position, player_position) < 300.0f && !unqPtr->unk8){
|
||||
unqPtr->unk8 = 1;
|
||||
gcdialog_showText(0xc7d, 4, 0, 0, 0, 0);
|
||||
}
|
||||
|
@@ -143,7 +143,7 @@ void func_80387FD4(Actor *this){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000); //TODO ISSUE HERE
|
||||
if (this->unkF4_8 == 1) {
|
||||
func_8028F94C(2, this->position);
|
||||
gcdialog_showText(ASSET_C86_TEXT_UNKNOWN, 0xE, this->position, this->marker, func_80387E68, NULL);
|
||||
gcdialog_showText(ASSET_C86_DIALOG_UNKNOWN, 0xE, this->position, this->marker, func_80387E68, NULL);
|
||||
subaddie_set_state_with_direction(this, 6, 0.79f, 1);
|
||||
} else {
|
||||
timed_playSfx(0.4f, SFX_C9_PAUSEMENU_ENTER, 1.0f, 32000); //0.4f
|
||||
|
@@ -17,7 +17,6 @@ typedef struct{
|
||||
|
||||
|
||||
extern f32 mapModel_getFloorY(f32 *);
|
||||
extern void func_80256E24(f32 [3], f32, f32, f32, f32, f32);
|
||||
|
||||
void chflibbit_update(Actor *this);
|
||||
Actor *chflibbit_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
@@ -373,7 +372,7 @@ void chflibbit_update(Actor *this){
|
||||
sp84[0] = (f32)local->unkE[0];
|
||||
sp84[1] = (f32)local->unkE[1];
|
||||
sp84[2] = (f32)local->unkE[2];
|
||||
if(ml_distance_vec3f(this->position, sp84) < 30.0f){
|
||||
if(ml_vec3f_distance(this->position, sp84) < 30.0f){
|
||||
func_80386AEC(this, 1);
|
||||
}
|
||||
else{
|
||||
|
@@ -260,7 +260,7 @@ bool func_8038C2A8(ActorMarker *marker) {
|
||||
local = (ActorLocal_MrVile *)&this->local;
|
||||
player_getPosition(player_position);
|
||||
if (this->state == 6) {
|
||||
return ml_distance_vec3f(this->position, player_position) < 150.0f;
|
||||
return ml_vec3f_distance(this->position, player_position) < 150.0f;
|
||||
}
|
||||
return local->unk0 == 1;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ void chvile_update(Actor *this) {
|
||||
local->game_marker = actorArray_findClosestActorFromActorId(this->position, 0x138, -1, &sp90)->marker;
|
||||
}
|
||||
player_getPosition(player_position);
|
||||
sp90 = ml_distance_vec3f(this->position, player_position);
|
||||
sp90 = ml_vec3f_distance(this->position, player_position);
|
||||
if (sp90 <= 300.0f) {
|
||||
local->unk0 = (local->unk0 == 0) ? 1 : 2;
|
||||
} else if (sp90 > 300.0f) {
|
||||
@@ -411,7 +411,7 @@ void chvile_update(Actor *this) {
|
||||
if (this->state == 4) {
|
||||
player_getPosition(local->target_position);
|
||||
local->unk10 = 500.0f;
|
||||
if ((local->unkC == 102) && (ml_distance_vec3f(this->position, local->target_position) < 200.0f)) {
|
||||
if ((local->unkC == 102) && (ml_vec3f_distance(this->position, local->target_position) < 200.0f)) {
|
||||
BGS_func_8038BBA0(this, 103);
|
||||
}
|
||||
if ((local->unkC == 103) && (skeletalAnim_getLoopCount(this->unk148) >= 2)) {
|
||||
@@ -420,7 +420,7 @@ void chvile_update(Actor *this) {
|
||||
}
|
||||
if (this->state == 5) {
|
||||
local->unk10 = 200.0f;
|
||||
if (ml_distance_vec3f(this->position, local->target_position) < 100.0f) {
|
||||
if (ml_vec3f_distance(this->position, local->target_position) < 100.0f) {
|
||||
local->target_position[0] = randf2(-500.0f, 500.0f);
|
||||
local->target_position[1] = 0.0f;
|
||||
local->target_position[2] = randf2(-500.0f, 500.0f);
|
||||
@@ -428,12 +428,12 @@ void chvile_update(Actor *this) {
|
||||
}
|
||||
if ((this->state == 6)){
|
||||
local->unk10 = 400.0f;
|
||||
if((ml_distance_vec3f(this->position, local->target_position) < 100.0f) || (ml_distance_vec3f(player_position, local->target_position) < 300.0f)) {
|
||||
if((ml_vec3f_distance(this->position, local->target_position) < 100.0f) || (ml_vec3f_distance(player_position, local->target_position) < 300.0f)) {
|
||||
for(i = 0; i < 10; i++){
|
||||
random_position[0] = randf2(-500.0f, 500.0f);
|
||||
random_position[1] = 0.0f;
|
||||
random_position[2] = randf2(-500.0f, 500.0f);
|
||||
if ((i == 0) || (ml_distance_vec3f(player_position, random_position) > ml_distance_vec3f(player_position, local->target_position))) {
|
||||
if ((i == 0) || (ml_vec3f_distance(player_position, random_position) > ml_vec3f_distance(player_position, local->target_position))) {
|
||||
local->target_position[0] = random_position[0];
|
||||
local->target_position[1] = random_position[1];
|
||||
local->target_position[2] = random_position[2];
|
||||
|
@@ -140,7 +140,7 @@ void func_8038F6A4(Actor *this)
|
||||
player_getPosition(sp48);
|
||||
if (!this->has_met_before)
|
||||
{
|
||||
if ((((ml_distance_vec3f(local->unk18, sp48) < 250.0f) && (ml_distance_vec3f(local->unk18, sp48) > 80.0f)) && (!func_8028ECAC())) && (player_getTransformation() == TRANSFORM_1_BANJO))
|
||||
if ((((ml_vec3f_distance(local->unk18, sp48) < 250.0f) && (ml_vec3f_distance(local->unk18, sp48) > 80.0f)) && (!func_8028ECAC())) && (player_getTransformation() == TRANSFORM_1_BANJO))
|
||||
{
|
||||
gcdialog_showText(0xC7E, 0, 0, 0, 0, 0);
|
||||
this->has_met_before = TRUE;
|
||||
|
@@ -423,7 +423,7 @@ void BGS_func_8038E034(Actor *this) {
|
||||
sp7C[0] = (f32) local->unk10[0];
|
||||
sp7C[1] = (f32) local->unk10[1];
|
||||
sp7C[2] = (f32) local->unk10[2];
|
||||
if (ml_distance_vec3f(this->position, sp7C) < 30.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp7C) < 30.0f) {
|
||||
func_8038D9D0(this, 1);
|
||||
} else {
|
||||
func_8038D9D0(this, 5);
|
||||
|
@@ -3,8 +3,6 @@
|
||||
#include "math.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern f32 func_80256AB4(f32, f32, f32, f32);
|
||||
extern f32 func_8025715C(f32, f32);
|
||||
extern f32 *chVile_getPostion(ActorMarker *);
|
||||
extern void bundle_setRandomVelocity(f32);
|
||||
extern void func_802FDCB8(s32);
|
||||
@@ -47,43 +45,43 @@ ActorInfo D_80390960 = {
|
||||
// Vile Wins
|
||||
enum asset_e D_80390984[] = {
|
||||
0,
|
||||
ASSET_C66_TEXT_MR_VILE_WINS_ROUND_1,
|
||||
ASSET_C68_TEXT_MR_VILE_WINS_ROUND_2,
|
||||
ASSET_C6A_TEXT_MR_VILE_WINS_ROUND_3,
|
||||
ASSET_C92_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_2,
|
||||
ASSET_C93_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_3,
|
||||
ASSET_C94_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_4,
|
||||
ASSET_C66_DIALOG_MR_VILE_WINS_ROUND_1,
|
||||
ASSET_C68_DIALOG_MR_VILE_WINS_ROUND_2,
|
||||
ASSET_C6A_DIALOG_MR_VILE_WINS_ROUND_3,
|
||||
ASSET_C92_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_2,
|
||||
ASSET_C93_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_3,
|
||||
ASSET_C94_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_4,
|
||||
0
|
||||
};
|
||||
|
||||
// Player Wins
|
||||
enum asset_e D_803909A4[] = {
|
||||
0,
|
||||
ASSET_C67_TEXT_MR_VILE_ROUND_2_START,
|
||||
ASSET_C69_TEXT_MR_VILE_ROUND_3_START,
|
||||
ASSET_C67_DIALOG_MR_VILE_ROUND_2_START,
|
||||
ASSET_C69_DIALOG_MR_VILE_ROUND_3_START,
|
||||
0,
|
||||
ASSET_C95_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
|
||||
ASSET_C96_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
|
||||
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3
|
||||
ASSET_C95_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
|
||||
ASSET_C96_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
|
||||
ASSET_C97_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_3
|
||||
};
|
||||
|
||||
// Player Wins Rematch
|
||||
enum asset_e D_803909C0[] = {
|
||||
0,
|
||||
ASSET_C6E_TEXT_MR_VILE_LOSE_ROUND_2_REMATCH,
|
||||
ASSET_C6F_TEXT_MR_VILE_LOSE_ROUND_3_REMATCH,
|
||||
ASSET_C6E_DIALOG_MR_VILE_LOSE_ROUND_2_REMATCH,
|
||||
ASSET_C6F_DIALOG_MR_VILE_LOSE_ROUND_3_REMATCH,
|
||||
0,
|
||||
ASSET_C95_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
|
||||
ASSET_C96_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
|
||||
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3
|
||||
ASSET_C95_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
|
||||
ASSET_C96_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
|
||||
ASSET_C97_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_3
|
||||
};
|
||||
|
||||
// Player Declines
|
||||
enum asset_e D_803909DC[] = {
|
||||
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C8F_TEXT_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE,
|
||||
ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
|
||||
ASSET_C8F_DIALOG_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
@@ -91,10 +89,10 @@ enum asset_e D_803909DC[] = {
|
||||
|
||||
// Round 1 Regular & Extra Challenge
|
||||
enum asset_e BGS_D_803909F8[] = {
|
||||
ASSET_C64_TEXT_MR_VILE_ROUND_1_START,
|
||||
ASSET_C64_DIALOG_MR_VILE_ROUND_1_START,
|
||||
0,
|
||||
0,
|
||||
ASSET_C8E_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_1,
|
||||
ASSET_C8E_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -102,10 +100,10 @@ enum asset_e BGS_D_803909F8[] = {
|
||||
};
|
||||
|
||||
enum asset_e D_80390A18[] = {
|
||||
ASSET_C6D_TEXT_MR_VILE_LOSE_ROUND_1_REMATCH,
|
||||
ASSET_C70_TEXT_MR_VILE_WIN_ROUND_2_REMATCH,
|
||||
ASSET_C71_TEXT_MR_VILE_WIN_ROUND_3_REMATCH,
|
||||
ASSET_C8E_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_1,
|
||||
ASSET_C6D_DIALOG_MR_VILE_LOSE_ROUND_1_REMATCH,
|
||||
ASSET_C70_DIALOG_MR_VILE_WIN_ROUND_2_REMATCH,
|
||||
ASSET_C71_DIALOG_MR_VILE_WIN_ROUND_3_REMATCH,
|
||||
ASSET_C8E_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -171,7 +169,7 @@ void BGS_func_80389850(Actor *this, s32 arg1) {
|
||||
sp7C[2] = 0.0f;
|
||||
sp7C[1] = sp94[1];
|
||||
sp7C[0] = 0.0f;
|
||||
if(ml_distance_vec3f(sp94, sp7C) <= 1000.0f){
|
||||
if(ml_vec3f_distance(sp94, sp7C) <= 1000.0f){
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -430,7 +428,7 @@ void chvilegame_player_consume_piece(Actor *this) {
|
||||
if ((end != begin) && BGS_func_80389810(sp44)){
|
||||
sp44[1] = 0.0f;
|
||||
for(i_ptr = begin; i_ptr < end; i_ptr++){
|
||||
if ((ml_distance_vec3f(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) {
|
||||
if ((ml_vec3f_distance(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) {
|
||||
is_correct_type = ((local->current_type != YUMBLIE) && (i_ptr->type != YUMBLIE)) || (((local->current_type == YUMBLIE) && i_ptr->type == YUMBLIE));
|
||||
if (is_correct_type) {
|
||||
local->player_score++;
|
||||
@@ -468,7 +466,7 @@ bool chvilegame_cpu_consume_piece(ActorMarker *marker, f32 position[3]) {
|
||||
begin = vector_getBegin(local->game_pieces);
|
||||
end = vector_getEnd(local->game_pieces);
|
||||
for(i_ptr = begin; i_ptr < end; i_ptr++){
|
||||
if ((ml_distance_vec3f(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) {
|
||||
if ((ml_vec3f_distance(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) {
|
||||
local->vile_score++;
|
||||
timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
|
||||
timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
|
||||
@@ -547,12 +545,12 @@ bool chvilegame_find_closest_piece(ActorMarker *marker, f32 position[0], f32 yaw
|
||||
piece_direction[0] = i_ptr->position[0] - position[0];
|
||||
piece_direction[1] = i_ptr->position[1] - position[1];
|
||||
piece_direction[2] = i_ptr->position[2] - position[2];
|
||||
distance = ml_distance_vec3f(i_ptr->position, position);
|
||||
distance = ml_vec3f_distance(i_ptr->position, position);
|
||||
angle_diff = func_80256AB4(target_direction[0], target_direction[2], piece_direction[0], piece_direction[2]);
|
||||
if( (distance > 300.0f)
|
||||
|| ((-0.8 < angle_diff) && (angle_diff < 0.8) && ((piece_direction[0]*target_direction[0] + piece_direction[1]*target_direction[1] + piece_direction[2]*target_direction[2]) >= 0.0f))
|
||||
) {
|
||||
if ((closest_piece == NULL) || (distance < ml_distance_vec3f(position, closest_piece->position))){
|
||||
if ((closest_piece == NULL) || (distance < ml_vec3f_distance(position, closest_piece->position))){
|
||||
closest_piece = i_ptr;
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "CC.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/modelRender.h"
|
||||
|
||||
typedef struct{
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
#include "core2/modelRender.h"
|
||||
|
||||
extern BKCollisionTri *func_8028EF48(void);
|
||||
@@ -19,7 +19,6 @@ extern int func_80340020(s32, f32[3], s32, f32, s32, BKVertexList *, f32[3], f32
|
||||
extern void boneTransformList_getBoneScale(s32, s32, f32[3]);
|
||||
extern void boneTransformList_setBoneScale(s32, s32, f32[3]);
|
||||
extern void func_8033A9A8(s32, s32, f32[3]);
|
||||
extern void ml_vec3f_normalize(f32[3]);
|
||||
extern void func_8033A45C(s32, s32);
|
||||
extern void modelRender_setBoneTransformList(s32);
|
||||
extern void func_8028FAB0(f32[3]);
|
||||
@@ -249,7 +248,7 @@ int CC_func_80388CA0(void){
|
||||
void func_80388CB4(void){
|
||||
if(D_80389FA0.unk21){
|
||||
skeletalAnim_free(D_80389FA0.unk0);
|
||||
func_8030DA44(D_80389FA0.sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(D_80389FA0.sfxsourceIdx);
|
||||
func_80340690(D_80389FA0.unk18);
|
||||
func_8034A2A8(D_80389FA0.unk34);
|
||||
if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40)
|
||||
@@ -331,7 +330,7 @@ void CC_func_80388F4C(void){
|
||||
CC_func_80387D4C();
|
||||
if(D_80389FA0.unk21 != 0 && func_80334904() == 2){
|
||||
player_getPosition(sp6C);
|
||||
D_80389FA0.unk20 = (ml_distance_vec3f(sp6C, D_80389FA0.unkC) < 200.0f);
|
||||
D_80389FA0.unk20 = (ml_vec3f_distance(sp6C, D_80389FA0.unkC) < 200.0f);
|
||||
|
||||
D_80389FA0.unk38 += sp68;
|
||||
sp64 = skeletalAnim_getProgress(D_80389FA0.unk0);
|
||||
@@ -362,7 +361,7 @@ void CC_func_80388F4C(void){
|
||||
if(D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){
|
||||
skeletalAnim_set(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f);
|
||||
if(!D_80389FA0.unk48){
|
||||
gcdialog_showText(ASSET_D2B_TEXT_UNKNOWN, 0xE, D_80389FA0.unk28, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_D2B_DIALOG_UNKNOWN, 0xE, D_80389FA0.unk28, NULL, NULL, NULL);
|
||||
D_80389FA0.unk48 = TRUE;
|
||||
}
|
||||
}//L8038918C
|
||||
@@ -381,7 +380,7 @@ void CC_func_80388F4C(void){
|
||||
|
||||
if(D_80389FA0.unk21 == 3){
|
||||
func_8034A174(D_80389FA0.unk34, 6, sp48);
|
||||
if(ml_distance_vec3f(sp48, sp6C) <= 130.0f && sp6C[1] - sp48[1] < 50.0f){
|
||||
if(ml_vec3f_distance(sp48, sp6C) <= 130.0f && sp6C[1] - sp48[1] < 50.0f){
|
||||
func_8031D04C(MAP_21_CC_WITCH_SWITCH_ROOM, 1);
|
||||
}
|
||||
}//L80389260
|
||||
|
@@ -77,7 +77,7 @@ void func_80386AD0(ActorMarker *arg0, s32 arg1) {
|
||||
void func_80386AF8(Actor *arg0) {
|
||||
ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local;
|
||||
CC_func_80386920(arg0, 0);
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
}
|
||||
|
||||
void func_80386B28(Actor *this){
|
||||
|
@@ -136,7 +136,7 @@ void func_803870F8(Actor *this){
|
||||
sp3C[0] = this->position_x;
|
||||
sp3C[1] = this->position_y + 100;
|
||||
sp3C[2] = this->position_z;
|
||||
if(ml_distance_vec3f(&sp3C, &sp70) < 120.0f){
|
||||
if(ml_vec3f_distance(&sp3C, &sp70) < 120.0f){
|
||||
func_8031D04C(MAP_22_CC_INSIDE_CLANKER, (local->unk0 == 1)? 7 : 6);
|
||||
}
|
||||
}//L80387500
|
||||
|
@@ -45,7 +45,7 @@ void func_803878A0(Actor *this, s32 next_state) {
|
||||
local->unkC[0] = randf2(-500.0f, 500.0f);
|
||||
local->unkC[1] = randf2(400.0f, 900.0f);
|
||||
local->unkC[2] = randf2(-400.0f, 700.0f);
|
||||
if(ml_distance_vec3f(this->position, local->unkC) > 800.0f)
|
||||
if(ml_vec3f_distance(this->position, local->unkC) > 800.0f)
|
||||
break;
|
||||
}
|
||||
local->unk8 = randf2(500.0f, 1000.0f);
|
||||
@@ -55,7 +55,7 @@ void func_803878A0(Actor *this, s32 next_state) {
|
||||
|
||||
void CCW_func_80387A20(Actor *this){
|
||||
ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local;
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
}
|
||||
|
||||
void CCW_func_80387A40(Actor *this) {
|
||||
@@ -90,7 +90,7 @@ void CCW_func_80387A40(Actor *this) {
|
||||
sp5C[0] = local->unkC[0] - this->position[0];
|
||||
sp5C[1] = local->unkC[1] - this->position[1];
|
||||
sp5C[2] = local->unkC[2] - this->position[2];
|
||||
if (ml_distance_vec3f(this->position, local->unkC) < 500.0f) {
|
||||
if (ml_vec3f_distance(this->position, local->unkC) < 500.0f) {
|
||||
ml_vec3f_set_length(sp5C, local->unk8 * 8.0f);
|
||||
} else {
|
||||
ml_vec3f_set_length(sp5C, local->unk8 * 2);
|
||||
@@ -106,7 +106,7 @@ void CCW_func_80387A40(Actor *this) {
|
||||
}
|
||||
func_80258A4C(this->position, this->yaw - 90.0f, local->unkC, &sp58, &sp54, &sp50);
|
||||
this->yaw += 140.0f * sp50 * sp68;
|
||||
if (ml_distance_vec3f(this->position, local->unkC) < 100.0f) {
|
||||
if (ml_vec3f_distance(this->position, local->unkC) < 100.0f) {
|
||||
func_803878A0(this, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
typedef struct{
|
||||
@@ -183,10 +183,10 @@ void func_8038687C(Actor *this) {
|
||||
sp4C[1] = -100.0f;
|
||||
sp4C[2] = randf2(-500.0f, 900.0f);
|
||||
|
||||
if(ml_distance_vec3f(this->position, sp4C) < 400.0f)
|
||||
if(ml_vec3f_distance(this->position, sp4C) < 400.0f)
|
||||
continue;
|
||||
|
||||
tmp = ml_distance_vec3f(sp5C, sp4C);
|
||||
tmp = ml_vec3f_distance(sp5C, sp4C);
|
||||
phi_v0 = (phi_s0 < 0xA) ? 500 : 200;
|
||||
if(tmp < (f32) phi_v0)
|
||||
continue;
|
||||
@@ -207,7 +207,7 @@ void func_8038687C(Actor *this) {
|
||||
func_803865F4(this, 3);
|
||||
} else if ((local->unk0 != NULL) && (map_get() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) {
|
||||
player_getPosition(sp40);
|
||||
if ((ml_distance_vec3f(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) {
|
||||
if ((ml_vec3f_distance(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) {
|
||||
func_803865F4(this, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ void chGobiCCW_update(Actor *this) {
|
||||
if(this->state == 1){
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp48);
|
||||
if (ml_distance_vec3f(this->position, sp48) < 600.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp48) < 600.0f) {
|
||||
if (local->unk0->unk2 != 0) {
|
||||
gcdialog_showText((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ void func_803891B0(void* marker) {
|
||||
void func_8038921C(void* marker) {
|
||||
Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker));
|
||||
func_8030E394(actor->unk44_31);
|
||||
func_8030DA44(actor->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(actor->unk44_31);
|
||||
actor->unk44_31 = 0U;
|
||||
FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000);
|
||||
}
|
||||
|
@@ -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])) {
|
||||
player_setCarryObjectPoseInCylinder(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) && (player_throwCarriedObject() != 0)) {
|
||||
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_vec3f_distance(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
|
||||
player_setThrowTargetPosition(D_8038FDE0);
|
||||
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
|
||||
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);
|
||||
|
@@ -111,13 +111,13 @@ void chcaterpillar_update(Actor *this){
|
||||
if(this->state == 1){
|
||||
skeletalAnim_getProgressRange(this->unk148, &sp64, &sp60);
|
||||
player_getPosition(sp74);
|
||||
if(ml_distance_vec3f(this->position, local->unk0) < 10.0f){
|
||||
if(ml_vec3f_distance(this->position, local->unk0) < 10.0f){
|
||||
for(i = 0; i < 10; i++){
|
||||
|
||||
local->unk0[0] = randf2(-300.0f, 300.0f) + this->position_x;
|
||||
local->unk0[1] = this->position_y;
|
||||
local->unk0[2] = randf2(-300.0f, 300.0f) + this->position_z;
|
||||
if( !(ml_distance_vec3f(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0))
|
||||
if( !(ml_vec3f_distance(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0))
|
||||
break;
|
||||
}//L8038A544
|
||||
if(i == 10){
|
||||
@@ -150,10 +150,10 @@ void chcaterpillar_update(Actor *this){
|
||||
}
|
||||
}//L8038A714
|
||||
|
||||
if(ml_distance_vec3f(this->position, sp74) < 50.0f){
|
||||
if(ml_vec3f_distance(this->position, sp74) < 50.0f){
|
||||
func_8028F030(ACTOR_2A2_CATERPILLAR);
|
||||
if(!volatileFlag_get(VOLATILE_FLAG_B2)){
|
||||
gcdialog_showText(ASSET_CC7_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_CC7_DIALOG_UNKNOWN, 4, NULL, NULL, NULL, NULL);
|
||||
volatileFlag_set(VOLATILE_FLAG_B2, TRUE);
|
||||
}
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 0x1f4, 0x9c4);
|
||||
@@ -177,7 +177,7 @@ void chcaterpillar_update(Actor *this){
|
||||
local->unk24 += 3.3333333333333335*sp84;
|
||||
|
||||
local->unk24 = (1.0 < local->unk24) ? 1.0 : local->unk24;
|
||||
ml_interpolate_vec3f(this->position, local->unkC, local->unk18, local->unk24);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unkC, local->unk18, local->unk24);
|
||||
|
||||
this->position[1] += 50.0f*sinf(local->unk24*3.141592654);
|
||||
if(1.0 == local->unk24){
|
||||
|
@@ -101,7 +101,7 @@ void func_8038AA8C(Actor *this) {
|
||||
}
|
||||
|
||||
player_getPosition(sp54);
|
||||
if (ml_distance_vec3f(this->position, sp54) < 850.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp54) < 850.0f) {
|
||||
func_8038A950(this, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -133,7 +133,7 @@ void chnabnut_update(Actor *this) {
|
||||
|
||||
if (this->state == NABNUT_STATE_1_SAD) {
|
||||
player_getPosition(sp30);
|
||||
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp30) < 400.0f)) {
|
||||
if (!this->has_met_before && (ml_vec3f_distance(this->position, sp30) < 400.0f)) {
|
||||
this->has_met_before = TRUE;
|
||||
gcdialog_showText(0xCCA, 0xE, this->position, NULL, NULL, NULL);
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void chnabnut_update(Actor *this) {
|
||||
}
|
||||
if (this->has_met_before && !func_803114B0()) {
|
||||
player_setCarryObjectPoseInCylinder(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
|
||||
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
|
||||
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_vec3f_distance(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
|
||||
player_setThrowTargetPosition(D_8038F350);
|
||||
local->returned_acorn_count++;
|
||||
if (local->returned_acorn_count == 6) {
|
||||
|
@@ -114,7 +114,7 @@ void func_8038C41C(Actor *this) {
|
||||
|
||||
if ((this->marker->id == 0x1CB) && (this->state == 2)) {
|
||||
player_getPosition(sp2C);
|
||||
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) {
|
||||
if (!this->has_met_before && (ml_vec3f_distance(this->position, sp2C) < 400.0f)) {
|
||||
this->has_met_before = TRUE;
|
||||
gcdialog_showText(0xCCD, 0, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ void func_8038C7A8(Actor *this) {
|
||||
|
||||
if (this->state == 1) {
|
||||
player_getPosition(sp38);
|
||||
if (ml_distance_vec3f(this->position, sp38) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp38) < 50.0f) {
|
||||
func_8028F030(0x2A9);
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 500, 2500);
|
||||
CCW_func_8038C6A0(this, 5);
|
||||
@@ -91,7 +91,7 @@ void func_8038C7A8(Actor *this) {
|
||||
if (this->state == 3) {
|
||||
local->unk18 += 3.3333333333333333 * sp44;
|
||||
local->unk18 = (local->unk18 > 1.0) ? 1.0 : local->unk18;
|
||||
ml_interpolate_vec3f(this->position, local->unk0, local->unkC, local->unk18);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk0, local->unkC, local->unk18);
|
||||
this->position[1] += 50.0f * sinf(local->unk18 * BAD_PI);
|
||||
if (local->unk18 == 1.0) {
|
||||
CCW_func_8038C6A0(this, 4);
|
||||
|
@@ -118,7 +118,7 @@ void func_8038CC4C(Actor *this) {
|
||||
}
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp38);
|
||||
if (ml_distance_vec3f(this->position, sp38) < 900.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp38) < 900.0f) {
|
||||
if (local->unk0->map_id != MAP_46_CCW_WINTER || func_8028F2FC()) {
|
||||
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
|
@@ -116,7 +116,7 @@ void func_8038CFB4(Actor *this) {
|
||||
if (this->state == 1) {
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp60);
|
||||
if (ml_distance_vec3f(this->position, sp60) < 900.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp60) < 900.0f) {
|
||||
gcdialog_showText(0xCCF, 4, NULL, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void func_8038D368(Actor *this) {
|
||||
|
||||
if(!this->has_met_before){
|
||||
player_getPosition(plyr_pos);
|
||||
if (ml_distance_vec3f(this->position, plyr_pos) < 600.0f) {
|
||||
if (ml_vec3f_distance(this->position, plyr_pos) < 600.0f) {
|
||||
if (!jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY)) {
|
||||
gcdialog_showText(local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
|
||||
} else {
|
||||
|
@@ -91,7 +91,7 @@ void func_8038717C(Actor *this){
|
||||
ActorLocal_CCW_950 *local;
|
||||
|
||||
local = (ActorLocal_CCW_950 *)&this->local;
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
}
|
||||
|
||||
void chwasp_update(Actor *this) {
|
||||
|
@@ -84,7 +84,7 @@ void func_8038A318(ActorMarker *caller, enum asset_e text_id, s32 arg1){
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 32000);
|
||||
func_8025A6EC(COMUSIC_5B_FP_IGLOO_HAPPY, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,9 +124,9 @@ void func_8038A384(Actor *this){
|
||||
}//L8038A4E4
|
||||
|
||||
sp34 = levelSpecificFlags_get(LEVEL_FLAG_11_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_12_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_13_FP_UNKNOWN);
|
||||
sp38 = (sp34 == 1) ? ASSET_C17_TEXT_UNKNOWN
|
||||
: (sp34 == 2) ? ASSET_C18_TEXT_UNKNOWN
|
||||
: ASSET_C19_TEXT_UNKNOWN;
|
||||
sp38 = (sp34 == 1) ? ASSET_C17_DIALOG_UNKNOWN
|
||||
: (sp34 == 2) ? ASSET_C18_DIALOG_UNKNOWN
|
||||
: ASSET_C19_DIALOG_UNKNOWN;
|
||||
|
||||
this->yaw_ideal = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 2.0f);
|
||||
@@ -140,7 +140,7 @@ void func_8038A384(Actor *this){
|
||||
&& !jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)
|
||||
&& !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)
|
||||
){
|
||||
if (gcdialog_showText(ASSET_C1A_TEXT_UNKNOWN, 0x2a, NULL, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_C1A_DIALOG_UNKNOWN, 0x2a, NULL, NULL, NULL, NULL)) {
|
||||
levelSpecificFlags_set(LEVEL_FLAG_19_FP_UNKNOWN, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ void func_8038A384(Actor *this){
|
||||
}
|
||||
if(levelSpecificFlags_get(D_80391E80[sp3C].unk0)){
|
||||
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
|
||||
if (sp38 == ASSET_C19_TEXT_UNKNOWN) {
|
||||
if (sp38 == ASSET_C19_DIALOG_UNKNOWN) {
|
||||
gcdialog_showText(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL);
|
||||
}
|
||||
else {
|
||||
|
@@ -86,7 +86,7 @@ void func_80387828(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
|
||||
if (text_id == 0xc00) {
|
||||
gcdialog_showText(ASSET_C2B_TEXT_UNKNOWN, 0xf, NULL, this->marker, NULL, func_803877A8);
|
||||
gcdialog_showText(ASSET_C2B_DIALOG_UNKNOWN, 0xf, NULL, this->marker, NULL, func_803877A8);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ void func_8038794C(Actor *this){
|
||||
|
||||
if(!this->has_met_before && func_80329530(this, 0x1f4)){
|
||||
if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){
|
||||
if (gcdialog_showText(ASSET_BFF_TEXT_UNKNOWN, 0x2a, this->position, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_BFF_DIALOG_UNKNOWN, 0x2a, this->position, NULL, NULL, NULL)) {
|
||||
for (i = 0; i < 5; i++) {
|
||||
timedFunc_set_1(D_80391BEC[i], (GenFunction_1) func_8038787C, (s32) this->marker);
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||
extern Actor *func_80328230(enum actor_e id, f32 pos[3], f32 rot[3]);
|
||||
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e, s32[3]);
|
||||
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e, s32[3]);
|
||||
extern f32 func_8038BE20(f32 arg0[3]);
|
||||
|
||||
typedef struct {
|
||||
@@ -124,10 +124,10 @@ void func_80388A50(Actor *this){
|
||||
void func_80388A94(Actor *this){
|
||||
func_80388A50(this);
|
||||
if(mapSpecificFlags_get(6)){
|
||||
gcdialog_showText(ASSET_C0A_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C0A_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{
|
||||
gcdialog_showText(ASSET_C09_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C09_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,15 +136,15 @@ void func_80388B18(Actor *this, u8 arg1){
|
||||
if(player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
func_80388A50(this);
|
||||
if(mapSpecificFlags_get(5)){
|
||||
gcdialog_showText(ASSET_C05_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C05_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{
|
||||
gcdialog_showText(ASSET_C02_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C02_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}
|
||||
else{//L80388BB8
|
||||
if(!volatileFlag_get(VOLATILE_FLAG_B3)){
|
||||
if(gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
if(gcdialog_showText(ASSET_C01_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
volatileFlag_set(VOLATILE_FLAG_B3, TRUE);
|
||||
func_80388A50(this);
|
||||
}
|
||||
@@ -154,7 +154,7 @@ void func_80388B18(Actor *this, u8 arg1){
|
||||
else{//L80388C08
|
||||
if(player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
if(!volatileFlag_get(VOLATILE_FLAG_B4)){
|
||||
if(gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
if(gcdialog_showText(ASSET_C08_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
volatileFlag_set(VOLATILE_FLAG_B4, TRUE);
|
||||
func_80388A50(this);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
case 0xc29://L80388DC4
|
||||
func_8025A6EC(COMUSIC_3A_FP_BOGGY_RACE, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
func_802BE720();
|
||||
local->unk0 = partEmitMgr_newEmitter(16);
|
||||
local->unk4 = partEmitMgr_newEmitter(16);
|
||||
@@ -383,8 +383,8 @@ void func_803895E0(void){
|
||||
|
||||
for (i = 0; i< 7; i++){
|
||||
s0 = (i < 3)
|
||||
? cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DA0)
|
||||
: cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DAC);
|
||||
? cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DA0)
|
||||
: cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DAC);
|
||||
|
||||
nodeprop_getPosition(s0, sp64);
|
||||
f20 = (f32)func_80304DA8(s0);
|
||||
@@ -478,13 +478,13 @@ void func_803896FC(Actor *this){
|
||||
&& player_getTransformation() != TRANSFORM_4_WALRUS
|
||||
&& volatileFlag_get(VOLATILE_FLAG_B3)
|
||||
){
|
||||
gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C01_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else if( local->unk19 == 2){
|
||||
if( player_getTransformation() == TRANSFORM_4_WALRUS
|
||||
&& volatileFlag_get(VOLATILE_FLAG_B4)
|
||||
){
|
||||
gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
gcdialog_showText(ASSET_C08_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else if( player_getTransformation() != TRANSFORM_4_WALRUS){
|
||||
func_80388A94(this);
|
||||
|
@@ -77,14 +77,14 @@ void func_80390388(Actor *this){
|
||||
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
|
||||
){
|
||||
if(0.0f == this->unk1C[0] && func_80390334()){
|
||||
if(gcdialog_showText(ASSET_C1F_TEXT_UNKNOWN, 0xb, this->position, NULL, NULL, NULL)){
|
||||
if(gcdialog_showText(ASSET_C1F_DIALOG_UNKNOWN, 0xb, this->position, NULL, NULL, NULL)){
|
||||
this->has_met_before = TRUE;
|
||||
this->unk1C[0] = 1.0f;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if( !this->has_met_before ){
|
||||
if(gcdialog_showText(ASSET_C1E_TEXT_UNKNOWN, 0x2b, this->position, NULL, NULL, NULL)){
|
||||
if(gcdialog_showText(ASSET_C1E_DIALOG_UNKNOWN, 0x2b, this->position, NULL, NULL, NULL)){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -69,14 +69,14 @@ void func_80390630(Actor *this){
|
||||
if (func_80329530(this, 350)) {
|
||||
if (player_getTransformation() == TRANSFORM_4_WALRUS) {
|
||||
if (!levelSpecificFlags_get(LEVEL_FLAG_31_FP_UNKNOWN)) {
|
||||
if (gcdialog_showText(ASSET_C27_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_C27_DIALOG_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
|
||||
levelSpecificFlags_set(LEVEL_FLAG_31_FP_UNKNOWN, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!levelSpecificFlags_get(LEVEL_FLAG_32_FP_UNKNOWN)) {
|
||||
if (gcdialog_showText(ASSET_C26_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_C26_DIALOG_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
|
||||
levelSpecificFlags_set(LEVEL_FLAG_32_FP_UNKNOWN, TRUE);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "ml/mtx.h"
|
||||
|
||||
void chScarfSled_update(Actor *this);
|
||||
|
||||
|
@@ -199,7 +199,7 @@ void func_8038D3D8(void){
|
||||
comusic_8025AB44(COMUSIC_68_TWINKLY_MINIGAME, 0, 4000);
|
||||
func_8025AABC(COMUSIC_68_TWINKLY_MINIGAME);
|
||||
func_8025A58C(-1, 4000);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
|
||||
void func_8038D41C(ActorMarker *marker){
|
||||
@@ -265,7 +265,7 @@ void func_8038D5C8(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
this->unk1C[1] = 0.0f;
|
||||
func_8025A6EC(COMUSIC_68_TWINKLY_MINIGAME, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
this->unk1C[2] = 428571.0f;
|
||||
func_8025AEA0(0x68, (s32)this->unk1C[2]);
|
||||
subaddie_set_state_with_direction(this, 3, 0.001f, 1);
|
||||
|
@@ -127,7 +127,7 @@ void func_8038E094(Actor *this){
|
||||
if(this->unkF4_8 == 1 && !fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
|
||||
if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){
|
||||
timed_setStaticCameraToNode(0.5f, 0xd);
|
||||
gcdialog_showText(ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
|
||||
gcdialog_showText(ASSET_C15_DIALOG_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
|
||||
this->velocity[0] = 1.0f;
|
||||
subaddie_set_state_with_direction(this, 6, 0.03f, 1);
|
||||
actor_loopAnimation(this);
|
||||
|
@@ -140,7 +140,7 @@ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){
|
||||
}
|
||||
this->actor_specific_1_f = (1.0f- sp24)*arg2;
|
||||
func_80329054(this, 2);
|
||||
if(ml_distance_vec3f(this->position, arg1) <= arg4)
|
||||
if(ml_vec3f_distance(this->position, arg1) <= arg4)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
|
||||
|
@@ -28,7 +28,7 @@ void __chXmasTree_free(Actor *this){
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
tmp_a0 = this->unk44_31;
|
||||
if(tmp_a0){
|
||||
func_8030DA44(tmp_a0);
|
||||
sfxsource_freeSfxsourceByIndex(tmp_a0);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ void chXmasTree_update(Actor *this){
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
tmp_a0 = this->unk44_31;
|
||||
if(tmp_a0){
|
||||
func_8030DA44(tmp_a0);
|
||||
sfxsource_freeSfxsourceByIndex(tmp_a0);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
func_80324E38(0.0f, 3);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
void func_80390EB0(Actor *this);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "prop.h"
|
||||
#include "SnS.h"
|
||||
#include "actor.h"
|
||||
|
||||
extern ActorInfo D_80367FE0;
|
||||
|
@@ -27,7 +27,7 @@ void func_803918C0(void){
|
||||
|
||||
void func_8039195C(void){
|
||||
if(D_803935E0.sfxsourceIdx){
|
||||
func_8030DA44(D_803935E0.sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(D_803935E0.sfxsourceIdx);
|
||||
D_803935E0.sfxsourceIdx = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void func_8038ABDC(void){
|
||||
comusic_8025AB44(COMUSIC_3A_FP_BOGGY_RACE, 0, 4000);
|
||||
func_8025AABC(COMUSIC_3A_FP_BOGGY_RACE);
|
||||
func_8025A58C(-1, 4000);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
|
||||
void func_8038AC20(s32 gate_indx, s32 arg1){
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80244BB0(s32, s32, s32, f32);
|
||||
extern void core1_7090_initSfxSource(s32, s32, s32, f32);
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
@@ -75,13 +75,13 @@ void func_80386620(Actor *this){
|
||||
}
|
||||
|
||||
void func_8038678C(void){
|
||||
func_80244BB0(3, 0x85, 0x7ff8, 1.0f);
|
||||
func_80244BB0(4, 0x85, 0x7ff8, 1.0f);
|
||||
core1_7090_initSfxSource(3, 0x85, 0x7ff8, 1.0f);
|
||||
core1_7090_initSfxSource(4, 0x85, 0x7ff8, 1.0f);
|
||||
}
|
||||
|
||||
void func_803867CC(void){
|
||||
func_80244C78(3);
|
||||
func_80244C78(4);
|
||||
core1_7090_freeSfxSource(3);
|
||||
core1_7090_freeSfxSource(4);
|
||||
}
|
||||
|
||||
void func_803867F4(void){
|
||||
@@ -149,7 +149,7 @@ void chAncientOne_update(Actor *this){
|
||||
mapSpecificFlags_set(sp38, TRUE);
|
||||
if(sp38== 0xB){
|
||||
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
|
||||
gcdialog_showText(ASSET_A80_TEXT_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL);
|
||||
gcdialog_showText(ASSET_A80_DIALOG_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL);
|
||||
}
|
||||
else{
|
||||
func_80386850(this->marker, 0xA80, -1);
|
||||
@@ -158,7 +158,7 @@ void chAncientOne_update(Actor *this){
|
||||
else {
|
||||
if(sp38== 7){
|
||||
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
|
||||
gcdialog_showText(ASSET_A7F_TEXT_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A7F_DIALOG_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ void chAncientOne_update(Actor *this){
|
||||
if(this->unkF4_8 < 5){
|
||||
D_80390C28[this->unkF4_8]->propPtr->unk8_4 = TRUE;
|
||||
func_802BAFE4(GV_D_80390C20[this->unkF4_8 - 1]);
|
||||
func_80244BB0(2, 0x86, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(2, 0x86, 0x7ff8, 0.3f);
|
||||
timedFunc_set_0(0.45f, func_8038678C);
|
||||
|
||||
}//L80386DB0
|
||||
@@ -190,7 +190,7 @@ void chAncientOne_update(Actor *this){
|
||||
}//L80386D80
|
||||
}
|
||||
if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){
|
||||
func_80244C78(2);
|
||||
core1_7090_freeSfxSource(2);
|
||||
timedFunc_set_0(0.5f, func_803867CC);
|
||||
}
|
||||
}//L80386DB0
|
||||
|
@@ -89,8 +89,8 @@ s32 func_80387360(void){
|
||||
void func_8038736C(Actor *this){
|
||||
ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local;
|
||||
chGobi1_setState(this, 0);
|
||||
func_8030DA44(local->unk0[0]);
|
||||
func_8030DA44(local->unk0[1]);
|
||||
sfxsource_freeSfxsourceByIndex(local->unk0[0]);
|
||||
sfxsource_freeSfxsourceByIndex(local->unk0[1]);
|
||||
}
|
||||
|
||||
void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
@@ -158,7 +158,7 @@ void chGobi1_update(Actor *this){
|
||||
timed_playSfx(1.0f, SFX_84_GOBI_CRYING, 1.1f, 30000);
|
||||
timed_playSfx(2.0f, SFX_84_GOBI_CRYING, 1.3f, 30000);
|
||||
timed_playSfx(2.5f, SFX_74_WALKING_NOISE_5, 0.5f, 30000);
|
||||
func_80324DBC(3.0f, ASSET_A74_TEXT_GOBI_HELPED, 0x2a, this->position, NULL, NULL, NULL);
|
||||
func_80324DBC(3.0f, ASSET_A74_DIALOG_GOBI_HELPED, 0x2a, this->position, NULL, NULL, NULL);
|
||||
timed_playSfx(5.0f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);
|
||||
timed_playSfx(5.6f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);
|
||||
timed_playSfx(6.5f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);
|
||||
|
@@ -85,7 +85,7 @@ void chGobi2_setState(Actor *this, s32 next_state){
|
||||
timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000);
|
||||
timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000);
|
||||
timed_playSfx(2.0f, SFX_4B_GULPING, 0.8f, 28000);
|
||||
func_80324DBC(3.0f, ASSET_A72_TEXT_TRUNKER_HELPED, 0x2A, D_80390CEC, this->marker, func_80387A2C, NULL);
|
||||
func_80324DBC(3.0f, ASSET_A72_DIALOG_TRUNKER_HELPED, 0x2A, D_80390CEC, this->marker, func_80387A2C, NULL);
|
||||
}//L80387C94
|
||||
|
||||
if(next_state == 4){
|
||||
@@ -203,7 +203,7 @@ void chGobi2_update(Actor *this){
|
||||
if(!this->has_met_before){
|
||||
if(func_80329530(this, 0xFA) && !func_80329530(this, 0x50)){
|
||||
if(func_8028F2A0()){
|
||||
if(gcdialog_showText(ASSET_A75_TEXT_GOBI2_MEET, 0, this->position, NULL, NULL, NULL))
|
||||
if(gcdialog_showText(ASSET_A75_DIALOG_GOBI2_MEET, 0, this->position, NULL, NULL, NULL))
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ void chGobi3_setState(Actor *this, s32 next_state){
|
||||
|
||||
if(next_state == 5){
|
||||
skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f);
|
||||
gcdialog_showText(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
|
||||
gcdialog_showText(ASSET_A77_DIALOG_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
|
||||
}
|
||||
|
||||
if(next_state == 4){
|
||||
|
@@ -98,7 +98,7 @@ void func_8038DB88(Actor *this){
|
||||
if(func_8030E3FC(tmp)){
|
||||
func_8030E394(this->unk44_31);
|
||||
}
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
|
||||
}
|
||||
|
||||
if (!levelSpecificFlags_get(LEVEL_FLAG_16_GV_UNKNOWN)) {
|
||||
gcdialog_showText(ASSET_A82_TEXT_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A82_DIALOG_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL);
|
||||
levelSpecificFlags_set(LEVEL_FLAG_16_GV_UNKNOWN, TRUE);
|
||||
}
|
||||
}//L8038F794
|
||||
@@ -135,7 +135,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff);
|
||||
|
||||
if(!levelSpecificFlags_get(LEVEL_FLAG_17_GV_UNKNOWN)){
|
||||
gcdialog_showText(ASSET_A83_TEXT_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A83_DIALOG_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL);
|
||||
levelSpecificFlags_set(LEVEL_FLAG_17_GV_UNKNOWN, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void chMazeCtrl_update(Actor *this){
|
||||
|
||||
if (!levelSpecificFlags_get(LEVEL_FLAG_15_GV_UNKNOWN)
|
||||
&& ml_timer_update(&local->unk8, sp34)
|
||||
&& gcdialog_showText(ASSET_A81_TEXT_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL)
|
||||
&& gcdialog_showText(ASSET_A81_DIALOG_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL)
|
||||
) {
|
||||
levelSpecificFlags_set(LEVEL_FLAG_15_GV_UNKNOWN, TRUE);
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ void chTrucker_update(Actor *this){
|
||||
&& !func_80329530(this, 80)
|
||||
&& func_8028F2A0()
|
||||
){
|
||||
gcdialog_showText(ASSET_A71_TEXT_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A71_DIALOG_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}//L80389254
|
||||
|
||||
|
@@ -29,14 +29,14 @@ void func_80389A20(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
}
|
||||
|
||||
void func_80389A60(Actor *this){
|
||||
gcdialog_showText(ASSET_A70_TEXT_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL);
|
||||
gcdialog_showText(ASSET_A70_DIALOG_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
subaddie_set_state(this, 5);
|
||||
}
|
||||
|
||||
void func_80389ABC(Actor *this){
|
||||
if(this->unk138_23){
|
||||
func_80389A20(this->marker, ASSET_A70_TEXT_CHARMER_HELPED, -1);
|
||||
func_80389A20(this->marker, ASSET_A70_DIALOG_CHARMER_HELPED, -1);
|
||||
}
|
||||
else{
|
||||
this->unk138_23 = TRUE;
|
||||
@@ -63,7 +63,7 @@ void func_80389B1C(Actor *this){
|
||||
|
||||
if(this->state == 1 || this->state == 2){
|
||||
if(! this->has_met_before && func_80329530(this, 250) && !func_80329530(this, 0x50)){
|
||||
gcdialog_showText(ASSET_A6F_TEXT_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A6F_DIALOG_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
void GV_func_8038A084(Actor *this);
|
||||
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
f32 func_80257204(f32, f32, f32, f32);
|
||||
void func_8038B124(Actor *this);
|
||||
|
||||
/* .data */
|
||||
|
@@ -63,7 +63,7 @@ void func_8038BA08(Actor *this){
|
||||
if(func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS)
|
||||
player_stateTimer_set(STATE_TIMER_3_TURBO_TALON, 0.0f);
|
||||
|
||||
gcdialog_showText(ASSET_A79_TEXT_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL);
|
||||
gcdialog_showText(ASSET_A79_DIALOG_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL);
|
||||
comusic_8025AB44(COMUSIC_57_TURBO_TRAINERS, 7000, 700);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ void GV_func_8038BEA0(Actor *this){
|
||||
}
|
||||
else{
|
||||
if(!this->has_met_before){
|
||||
if(gcdialog_showText(ASSET_A78_TEXT_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){
|
||||
if(gcdialog_showText(ASSET_A78_DIALOG_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ void GV_func_8038BEA0(Actor *this){
|
||||
}
|
||||
|
||||
if(!this->unk138_23){
|
||||
if(gcdialog_showText(ASSET_A7A_TEXT_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){
|
||||
if(gcdialog_showText(ASSET_A7A_DIALOG_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){
|
||||
this->unk138_23 = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ void func_8038C8A0(Actor *this, s32 next_state){
|
||||
this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE;
|
||||
this->marker->collidable = (next_state == 1) ? FALSE : TRUE;
|
||||
if(this->state == 4 || this->state == 5)
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
|
||||
if(next_state == 4 || next_state == 5){
|
||||
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();
|
||||
|
@@ -38,7 +38,7 @@ void func_8038D47C(Actor *this){
|
||||
this->spawn_position_y = 2997.0f;
|
||||
this->spawn_position_z = 5884.0f;
|
||||
}//L8038D4FC
|
||||
tmp_v0 = func_80304CAC(0x32f, this->spawn_position);
|
||||
tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_32F_UNKNOWN, this->spawn_position);
|
||||
if(!tmp_v0){
|
||||
this->unk1C_x = -1394.0f;
|
||||
this->unk1C_y = 2811.0f;
|
||||
@@ -48,7 +48,7 @@ void func_8038D47C(Actor *this){
|
||||
nodeprop_getPosition(tmp_v0, this->unk1C);
|
||||
}
|
||||
|
||||
tmp_v0 = func_80304CAC(0x330, this->spawn_position);
|
||||
tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_330_UNKNOWN, this->spawn_position);
|
||||
if(!tmp_v0){
|
||||
this->velocity_x = -1424.0f;
|
||||
this->velocity_y = 2811.0f;
|
||||
@@ -72,8 +72,8 @@ void func_8038D47C(Actor *this){
|
||||
if(!mapSpecificFlags_get(0x14)){
|
||||
player_getPosition(sp3C);
|
||||
if(func_8028ECAC() == 0){
|
||||
if( ml_distance_vec3f(sp3C, this->unk1C) < 100.0f || ml_distance_vec3f(sp3C, this->velocity) < 100.0f){
|
||||
if(gcdialog_showText(ASSET_A7B_TEXT_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){
|
||||
if( ml_vec3f_distance(sp3C, this->unk1C) < 100.0f || ml_vec3f_distance(sp3C, this->velocity) < 100.0f){
|
||||
if(gcdialog_showText(ASSET_A7B_DIALOG_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){
|
||||
mapSpecificFlags_set(0x14, 1);
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ void func_8038D47C(Actor *this){
|
||||
}
|
||||
if( actor_animationIsAt(this, 0.99f) ){
|
||||
if(--this->unk38_31 == 0){
|
||||
gcdialog_showText(ASSET_A7C_TEXT_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A7C_DIALOG_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL);
|
||||
mapSpecificFlags_set(0x14, TRUE);
|
||||
subaddie_set_state_forward(this, 1);
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "SnS.h"
|
||||
#include "actor.h"
|
||||
|
||||
extern void func_80244BB0(s32, s32, s32, f32);
|
||||
extern void core1_7090_initSfxSource(s32, s32, s32, f32);
|
||||
extern void func_802D3D54(Actor *this);
|
||||
extern void func_802D3D74(Actor *this);
|
||||
extern Actor *func_80325F2C(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
@@ -177,7 +177,7 @@ void func_8038E460(Actor *this){//banjo_door
|
||||
if(!mapSpecificFlags_get(2)){
|
||||
mapSpecificFlags_set(2, TRUE);
|
||||
func_8028F918(0);
|
||||
func_80324DBC(4.0f, ASSET_A7D_TEXT_JINXY_HELPED, 4, NULL, NULL, NULL, NULL);
|
||||
func_80324DBC(4.0f, ASSET_A7D_DIALOG_JINXY_HELPED, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ void func_8038E648(Actor *this){
|
||||
func_802BAFE4(2);
|
||||
subaddie_set_state(this, 6);
|
||||
this->unk38_31 = 600;
|
||||
func_80244BB0(0, 0x6A, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(0, 0x6A, 0x7ff8, 0.3f);
|
||||
func_802D68F0(25);
|
||||
item_set(ITEM_6_HOURGLASS, 1);
|
||||
}
|
||||
@@ -243,7 +243,7 @@ void func_8038E648(Actor *this){
|
||||
subaddie_set_state(this, 7);
|
||||
this->pitch = 90.0f;
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
func_80244C78(0);
|
||||
core1_7090_freeSfxSource(0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -251,7 +251,7 @@ void func_8038E648(Actor *this){
|
||||
this->unk38_31 -= time_getDelta();
|
||||
if(this->unk38_31 == 0){
|
||||
subaddie_set_state(this, 8);
|
||||
func_80244BB0(0, 0x6A, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(0, 0x6A, 0x7ff8, 0.3f);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -262,7 +262,7 @@ void func_8038E648(Actor *this){
|
||||
this->pitch = 0.0f;
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
mapSpecificFlags_set(5, FALSE);
|
||||
func_80244C78(0);
|
||||
core1_7090_freeSfxSource(0);
|
||||
volatileFlag_setAndTriggerDialog_0(VOLATILE_FLAG_AC_GV_TRAPDOOR_MISSED);
|
||||
}
|
||||
break;
|
||||
@@ -296,7 +296,7 @@ void func_8038E97C(Actor *this){
|
||||
this->position_y += 130.0;
|
||||
this->unk38_31 = 30;
|
||||
subaddie_set_state(this, 8);
|
||||
func_80244BB0(1, 0x6A, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(1, 0x6A, 0x7ff8, 0.3f);
|
||||
}
|
||||
}//L8038EA6C
|
||||
|
||||
@@ -314,7 +314,7 @@ void func_8038E97C(Actor *this){
|
||||
this->unk38_31 -= 1;
|
||||
if(this->unk38_31 == 0){
|
||||
subaddie_set_state(this, 1);
|
||||
func_80244C78(1);
|
||||
core1_7090_freeSfxSource(1);
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ void chKazooieDoor_update(Actor *this){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, -1);
|
||||
func_802BAFE4(3);
|
||||
subaddie_set_state(this, 6);
|
||||
func_80244BB0(1, 0x6a, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(1, 0x6a, 0x7ff8, 0.3f);
|
||||
this->unk1C[1] = this->position_y + 210.0f;
|
||||
this->unk1C[0] = this->position_y;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void chKazooieDoor_update(Actor *this){
|
||||
if(this->unk1C[1] <= this->position_y){
|
||||
subaddie_set_state(this, 7);
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
func_80244C78(1);
|
||||
core1_7090_freeSfxSource(1);
|
||||
this->unk38_31 = 450;
|
||||
}
|
||||
break;
|
||||
@@ -351,7 +351,7 @@ void chKazooieDoor_update(Actor *this){
|
||||
this->unk38_31--;
|
||||
if(this->unk38_31 == 0){
|
||||
subaddie_set_state(this, 8);
|
||||
func_80244BB0(1, 0x6a, 0x7ff8, 0.3f);
|
||||
core1_7090_initSfxSource(1, 0x6a, 0x7ff8, 0.3f);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -362,7 +362,7 @@ void chKazooieDoor_update(Actor *this){
|
||||
this->position_y = this->unk1C[0];
|
||||
subaddie_set_state(this, 1);
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
func_80244C78(1);
|
||||
core1_7090_freeSfxSource(1);
|
||||
mapSpecificFlags_set(6, FALSE);
|
||||
}
|
||||
break;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/* external function declarations */
|
||||
void func_80353064(f32 *, f32);
|
||||
void func_802BB3DC(s32, f32, f32);
|
||||
void func_80244BB0(s32, s32, s32, f32);
|
||||
void core1_7090_initSfxSource(s32, s32, s32, f32);
|
||||
|
||||
/* public function declarations */
|
||||
void chchimpystump_update(Actor *this);
|
||||
@@ -33,7 +33,7 @@ void __chchimpystump_updateShaking(Actor *this) {
|
||||
if (this->unk10_12 == 0) {
|
||||
this->unk10_12 = 1;
|
||||
func_802BB3DC(1, 3.0f, 1.0f);
|
||||
func_80244BB0(0, 0x6A, 0x7FF8, 0.2f);
|
||||
core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.2f);
|
||||
}//L80386D0C
|
||||
|
||||
this->position_x = ((globalTimer_getTime() & 1) * 2) ^ (s32) this->position_x;
|
||||
@@ -67,7 +67,7 @@ void chchimpystump_update(Actor *this) {
|
||||
this->position_y = this->actor_specific_1_f;
|
||||
subaddie_set_state(this, CHIMPY_STUMP_STATE_3_RAISED);
|
||||
func_802BB41C(1);
|
||||
func_80244C78(0);
|
||||
core1_7090_freeSfxSource(0);
|
||||
}
|
||||
|
||||
if ((globalTimer_getTime() & 3) == 2) {
|
||||
|
@@ -140,7 +140,7 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
|
||||
){
|
||||
func_8038708C(actorPtr, 2);
|
||||
if(actorPtr->unk38_31 == 1){
|
||||
gcdialog_showText(ASSET_B39_TEXT_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0);
|
||||
gcdialog_showText(ASSET_B39_DIALOG_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,12 +150,12 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
|
||||
int func_803872EC(void){
|
||||
s32 text_id = func_803114C4();
|
||||
|
||||
return text_id == ASSET_B37_TEXT_CONGA_SAFE_UP_HERE
|
||||
|| text_id == ASSET_B38_TEXT_CONGA_DEFEAT
|
||||
return text_id == ASSET_B37_DIALOG_CONGA_SAFE_UP_HERE
|
||||
|| text_id == ASSET_B38_DIALOG_CONGA_DEFEAT
|
||||
|| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)
|
||||
|| text_id == ASSET_B3B_TEXT_CONGA_ORANGE_PAD_JIGGY
|
||||
|| text_id == ASSET_B45_TEXT_JIGGY_COLLECT_10
|
||||
|| text_id == ASSET_B51_TEXT_BOTTLES_HOW_TO_EXIT_LEVEL;
|
||||
|| text_id == ASSET_B3B_DIALOG_CONGA_ORANGE_PAD_JIGGY
|
||||
|| text_id == ASSET_B45_DIALOG_JIGGY_COLLECT_10
|
||||
|| text_id == ASSET_B51_DIALOG_BOTTLES_HOW_TO_EXIT_LEVEL;
|
||||
}
|
||||
|
||||
void func_80387370(ActorMarker *this, enum asset_e text_id, s32 arg2){
|
||||
@@ -249,14 +249,14 @@ void func_803876D0(Actor *this){
|
||||
sp3C = func_80329530(this, 1000);
|
||||
if( func_8032A9E4(((ActorLocal_Conga *)&this->local)->unk10, ((ActorLocal_Conga *)&this->local)->unk18, ((ActorLocal_Conga *)&this->local)->unk1C)
|
||||
&& !this->unk138_23
|
||||
&& gcdialog_showText(ASSET_B37_TEXT_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0)
|
||||
&& gcdialog_showText(ASSET_B37_DIALOG_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0)
|
||||
){
|
||||
this->unk138_23 = 1;
|
||||
mapSpecificFlags_set(MM_SPECIFIC_FLAG_A_UNKNOWN, TRUE);
|
||||
}//L803878F8
|
||||
|
||||
if( sp3C && !this->has_met_before){
|
||||
if(gcdialog_showText((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_TEXT_CONGA_MEET_AS_TERMITE : ASSET_B3C_TEXT_CONGA_MEET, 0, this->position, 0,0,0)){
|
||||
if(gcdialog_showText((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_DIALOG_CONGA_MEET_AS_TERMITE : ASSET_B3C_DIALOG_CONGA_MEET, 0, this->position, 0,0,0)){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
} //L80387968
|
||||
@@ -348,7 +348,7 @@ void func_803876D0(Actor *this){
|
||||
actor_playAnimationOnce(this);
|
||||
if(actor_animationIsAt(this, 0.99f)){
|
||||
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
|
||||
gcdialog_showText(ASSET_B38_TEXT_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL);
|
||||
gcdialog_showText(ASSET_B38_DIALOG_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -138,7 +138,7 @@ void chjujuhitbox_update(Actor *this) {
|
||||
}
|
||||
|
||||
if (func_80329530(this, 0xfa) && !func_80329530(this, 0x50) && !func_8028ECAC()) {
|
||||
if (!this->has_met_before && gcdialog_showText(ASSET_B44_TEXT_JUJU_MEET, 0, 0, 0, NULL, NULL)) {
|
||||
if (!this->has_met_before && gcdialog_showText(ASSET_B44_DIALOG_JUJU_MEET, 0, 0, 0, NULL, NULL)) {
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ f32 D_80389A00[3] = {0.0f, 0.0f, 0.0f};
|
||||
void __chorange_collisionCallback(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
if (!player_isDead() &&
|
||||
!mapSpecificFlags_get(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE) &&
|
||||
gcdialog_showText(ASSET_B3A_TEXT_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)) {
|
||||
gcdialog_showText(ASSET_B3A_DIALOG_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)) {
|
||||
|
||||
mapSpecificFlags_set(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE, TRUE);
|
||||
}
|
||||
|
@@ -2,9 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* extern functions */
|
||||
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
|
||||
|
||||
/* public functions */
|
||||
void chLoggo_update(Actor *this);
|
||||
|
||||
@@ -44,7 +41,7 @@ void __chLoggo_collide(ActorMarker *this_marker, ActorMarker *other_marker) {
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
|
||||
if ((player_getTransformation() == TRANSFORM_3_PUMPKIN) && !fileProgressFlag_get(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN)) {
|
||||
if (gcdialog_showText(ASSET_ADF_TEXT_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) {
|
||||
if (gcdialog_showText(ASSET_ADF_DIALOG_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) {
|
||||
actor_collisionOff(this);
|
||||
fileProgressFlag_set(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN, TRUE);
|
||||
}
|
||||
@@ -58,7 +55,7 @@ void __chLoggo_collide(ActorMarker *this_marker, ActorMarker *other_marker) {
|
||||
}
|
||||
|
||||
if ((player_getTransformation() == TRANSFORM_1_BANJO) && !fileProgressFlag_get(FILEPROG_88_TRIED_LOGGO_AS_BEAR)) {
|
||||
if (gcdialog_showText(ASSET_ADE_TEXT_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_ADE_DIALOG_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) {
|
||||
fileProgressFlag_set(FILEPROG_88_TRIED_LOGGO_AS_BEAR, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -84,7 +81,7 @@ void chLoggo_update(Actor *this) {
|
||||
this->lifetime_value = 0.0f;
|
||||
|
||||
if (!fileProgressFlag_get(FILEPROG_8A_EXITED_LOGGO) && levelSpecificFlags_get(LEVEL_FLAG_33_MMM_UNKNOWN)) {
|
||||
if (gcdialog_showText(ASSET_AE0_TEXT_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_AE0_DIALOG_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)) {
|
||||
fileProgressFlag_set(FILEPROG_8A_EXITED_LOGGO, TRUE);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
typedef struct{
|
||||
ActorMarker *jiggy_marker;
|
||||
|
@@ -210,7 +210,7 @@ void chChompa_update(Actor *this) {
|
||||
}//L803880B4
|
||||
|
||||
player_getPosition(plyr_position);
|
||||
plyr_dist = ml_distance_vec3f(this->position, plyr_position);
|
||||
plyr_dist = ml_vec3f_distance(this->position, plyr_position);
|
||||
|
||||
if (this->state == CHOMPA_STATE_4_BITING) {
|
||||
actor_collisionOn(this);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "SnS.h"
|
||||
#include "actor.h"
|
||||
|
||||
extern ActorInfo D_8038BC28;
|
||||
@@ -33,7 +33,7 @@ extern ActorInfo D_8038BEFC;
|
||||
extern ActorInfo D_80367E70;
|
||||
extern ActorInfo D_80372C3C;
|
||||
|
||||
extern void func_80244BB0(s32, s32, s32, f32);
|
||||
extern void core1_7090_initSfxSource(s32, s32, s32, f32);
|
||||
extern void func_8025AE0C(s32, f32);
|
||||
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
|
||||
extern void *func_80309B48(f32[3], f32[3], f32[3], u32);
|
||||
@@ -307,7 +307,7 @@ void func_80388BDC(Actor *this) {
|
||||
if(mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN)) {
|
||||
func_802BAFE4(0x21);
|
||||
subaddie_set_state(this, 6);
|
||||
func_80244BB0(0, 0x6A, 0x7FF8, 0.3f);
|
||||
core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.3f);
|
||||
mapSpecificFlags_set(MMM_SPECIFIC_FLAG_2_UNKNOWN, FALSE);
|
||||
func_8025A6EC(COMUSIC_4_MMM_CLOCK_VERSION, -1);
|
||||
func_8025AE0C(2000, 3.0f);
|
||||
@@ -320,7 +320,7 @@ void func_80388BDC(Actor *this) {
|
||||
subaddie_set_state(this, 7U);
|
||||
this->yaw = 270.0f;
|
||||
func_8030E540(0x7F);
|
||||
func_80244C78(0);
|
||||
core1_7090_freeSfxSource(0);
|
||||
func_802D68F0(0xE);
|
||||
item_set(6, 1);
|
||||
}
|
||||
@@ -341,7 +341,7 @@ void func_80388BDC(Actor *this) {
|
||||
func_802BAFE4(0x23);
|
||||
}
|
||||
subaddie_set_state(this, 8);
|
||||
func_80244BB0(0, 0x6A, 0x7FF8, 0.3f);
|
||||
core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.3f);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
@@ -351,7 +351,7 @@ void func_80388BDC(Actor *this) {
|
||||
this->yaw = 0.0f;
|
||||
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
|
||||
mapSpecificFlags_set(MMM_SPECIFIC_FLAG_0_UNKNOWN, FALSE);
|
||||
func_80244C78(0);
|
||||
core1_7090_freeSfxSource(0);
|
||||
if (!this->unk38_31) {
|
||||
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 0x7FF8);
|
||||
func_8025AE0C(0x7D0, 2.5f);
|
||||
|
@@ -177,7 +177,7 @@ void func_803898EC() {
|
||||
}
|
||||
|
||||
void func_80389910() {
|
||||
gcdialog_showText(ASSET_AD5_TEXT_UNKNOWN, 0xE, NULL, NULL, MMM_func_80389810, NULL);
|
||||
gcdialog_showText(ASSET_AD5_DIALOG_UNKNOWN, 0xE, NULL, NULL, MMM_func_80389810, NULL);
|
||||
timedFunc_set_2(0.0f, func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
|
||||
timed_setStaticCameraToNode(2.0f, 0);
|
||||
timedFunc_set_0(2.1f, MMM_func_803898A0);
|
||||
@@ -198,10 +198,10 @@ void organMinigame_setState(s32 next_state){
|
||||
if (next_state == 2) {
|
||||
if (D_8038C4F0.pattern == 0) {
|
||||
D_8038C4F0.pattern = 1;
|
||||
gcdialog_showText(ASSET_AD3_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
gcdialog_showText(ASSET_AD3_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
}
|
||||
else {//L80389A84
|
||||
gcdialog_showText(ASSET_AD6_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
gcdialog_showText(ASSET_AD6_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
}
|
||||
}//L80389A9C
|
||||
|
||||
@@ -218,13 +218,13 @@ void organMinigame_setState(s32 next_state){
|
||||
}//L80389AF4
|
||||
|
||||
if(next_state == 4){
|
||||
gcdialog_showText(ASSET_ADD_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
gcdialog_showText(ASSET_ADD_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
func_80387720(D_8038C4F0.motzhand_marker);
|
||||
}
|
||||
|
||||
if(next_state == 5){
|
||||
D_8038C4F0.pattern++;
|
||||
gcdialog_showText(ASSET_AD4_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
gcdialog_showText(ASSET_AD4_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
|
||||
func_80387720(D_8038C4F0.motzhand_marker);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ void organMinigame_update(void){
|
||||
if(func_8038769C(D_8038C4F0.motzhand_marker)){
|
||||
player_getPosition(plyr_pos);
|
||||
motzhand_2 = marker_getActor(D_8038C4F0.motzhand_marker);
|
||||
if( ml_distance_vec3f(motzhand_2->position, plyr_pos) < 400.0f
|
||||
if( ml_vec3f_distance(motzhand_2->position, plyr_pos) < 400.0f
|
||||
&& motzhand_2->position_y - 50.0f <= plyr_pos[1]
|
||||
){
|
||||
organMinigame_setState(2);
|
||||
|
@@ -1,11 +1,10 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
/* extern functions */
|
||||
extern void sfxsource_setSampleRate(u8, s32);
|
||||
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32[3], f32[3]);
|
||||
|
||||
/* data */
|
||||
enum chTumblar_state_e {
|
||||
@@ -120,7 +119,7 @@ void __chTumblar_congratulationTextCallback(ActorMarker *marker, enum asset_e te
|
||||
}
|
||||
|
||||
void chTumblar_congratulate(Struct_MMM_47D0_0 *arg0, s32 arg1) {
|
||||
gcdialog_showText(ASSET_ADB_TEXT_UNKNOWN, 4, NULL, arg0->jiggy_marker, __chTumblar_congratulationTextCallback, NULL);
|
||||
gcdialog_showText(ASSET_ADB_DIALOG_UNKNOWN, 4, NULL, arg0->jiggy_marker, __chTumblar_congratulationTextCallback, NULL);
|
||||
arg0->state = TUMBLAR_STATE_1_CONGRATULATING;
|
||||
}
|
||||
|
||||
@@ -213,7 +212,7 @@ void chTumblar_update(Struct_MMM_47D0_0 *arg0, Struct68s *arg1, f32 tick) {
|
||||
func_8035179C_copyPosition(arg1, position);
|
||||
|
||||
if (!mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN) && arg0->state == TUMBLAR_STATE_0_IDLE && ml_vec3f_horizontal_distance_zero_likely(position, plyr_pos) < 250.0f) {
|
||||
if (gcdialog_showText(ASSET_ADA_TEXT_UNKNOWN, 0, NULL, NULL, NULL, NULL)) {
|
||||
if (gcdialog_showText(ASSET_ADA_DIALOG_UNKNOWN, 0, NULL, NULL, NULL, NULL)) {
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
}
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ void func_803890BC(Actor *this){
|
||||
local->unk1C += 0.25 * sp38;
|
||||
if(1.0f < local->unk1C)
|
||||
local->unk1C = 1.0f;
|
||||
ml_interpolate_vec3f(sp2C, local->unk4, local->unk10, local->unk1C);
|
||||
ml_vec3f_interpolate_fast(sp2C, local->unk4, local->unk10, local->unk1C);
|
||||
this->pitch = sp2C[0];
|
||||
this->yaw = sp2C[1];
|
||||
this->roll = sp2C[2];
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include "core2/particle.h"
|
||||
|
||||
|
||||
extern void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32);
|
||||
extern void bundle_setYaw(f32);
|
||||
extern int func_80309EB0(f32(*)[3], f32, f32 (*)[3], s32);
|
||||
extern int func_803342AC(f32(*)[3], f32(*)[3],f32);
|
||||
@@ -276,7 +275,7 @@ void func_8038F430(ActorMarker *marker, s32 arg1){
|
||||
|
||||
if(actor->state < 3){
|
||||
player_getPosition(&sp18);
|
||||
if(ml_distance_vec3f(&actor->position, &sp18) < 300.0f)
|
||||
if(ml_vec3f_distance(&actor->position, &sp18) < 300.0f)
|
||||
func_8028F55C(5, actor->marker);
|
||||
func_8038F190(actor, 3);
|
||||
}//L8038F4A4
|
||||
@@ -353,7 +352,7 @@ void func_8038F618(Actor *this){
|
||||
}
|
||||
func_8038E92C(this);
|
||||
if(this->state == 1){
|
||||
if(sp78 && ml_distance_vec3f(&this->position, &sp7C) < 500.0f){
|
||||
if(sp78 && ml_vec3f_distance(&this->position, &sp7C) < 500.0f){
|
||||
func_8038F190(this, 2);
|
||||
}
|
||||
}//L8038F7A0
|
||||
@@ -372,7 +371,7 @@ void func_8038F618(Actor *this){
|
||||
skeletalAnim_getProgressRange(this->unk148, &sp6C, &sp68);
|
||||
|
||||
if(0.1 <= sp68 && sp68 <= 0.6)
|
||||
ml_interpolate_vec3f(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 );
|
||||
ml_vec3f_interpolate_fast(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 );
|
||||
if(sp6C < 0.6 && 0.6 <= sp68)
|
||||
func_8030E878(SFX_6C_LOCKUP_CLOSING, 1.1 + randf2(-0.05f, 0.05f), 20000, this->position, 500.0f, 1000.0f);
|
||||
|
||||
@@ -387,7 +386,7 @@ void func_8038F618(Actor *this){
|
||||
|
||||
this->yaw += (sp44*400.0f)*sp70;
|
||||
if(skeletalAnim_getLoopCount(this->unk148) > 0){
|
||||
if(ml_distance_vec3f(&this->position, &local->unk8) < 10.0f){
|
||||
if(ml_vec3f_distance(&this->position, &local->unk8) < 10.0f){
|
||||
func_8038F190(this, 1);
|
||||
}else{
|
||||
func_8038F190(this, 2);
|
||||
|
@@ -367,7 +367,7 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){
|
||||
}
|
||||
else{//L8038D220
|
||||
timedFunc_set_3(0.0f, (GenFunction_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z);
|
||||
gcdialog_showText(ASSET_B9F_TEXT_UNKNOWN, 4, 0, 0, 0, 0);
|
||||
gcdialog_showText(ASSET_B9F_DIALOG_UNKNOWN, 4, 0, 0, 0, 0);
|
||||
}
|
||||
}//L8038D278
|
||||
}
|
||||
@@ -546,7 +546,7 @@ void func_8038D8BC(Actor *this){
|
||||
}
|
||||
}
|
||||
else{//L8038DAA8
|
||||
if(ml_distance_vec3f(this->position, player_position) < 1200.0f){
|
||||
if(ml_vec3f_distance(this->position, player_position) < 1200.0f){
|
||||
RBB_func_8038CC9C(this, 2);
|
||||
}
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void func_8038D8BC(Actor *this){
|
||||
skeletalAnim_getProgressRange(this->unk148, &sp54, &sp50);
|
||||
if(0.1 <= sp50 && sp50 <= 0.6){
|
||||
sp4C = (sp50 - 0.1)/0.5;
|
||||
ml_interpolate_vec3f(this->position, local->unk8, local->unk14, sp4C);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk8, local->unk14, sp4C);
|
||||
this->yaw = local->unk24 + sp4C*(local->unk28 - local->unk24);
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ void func_8038D8BC(Actor *this){
|
||||
tmp_f2 = tmp_f2/0.3;
|
||||
else
|
||||
tmp_f2 = 1.0f;
|
||||
ml_interpolate_vec3f(this->position, local->unk8, local->unk14, tmp_f2);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk8, local->unk14, tmp_f2);
|
||||
}
|
||||
}//L8038DE10
|
||||
|
||||
|
@@ -38,7 +38,7 @@ void func_80388BD0(Actor *this, s32 arg1){
|
||||
void func_80388BE8(Actor *actor){
|
||||
ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local;
|
||||
if(actor->modelCacheIndex == 0x17b){
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "prop.h"
|
||||
#include "actor.h"
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
extern ActorInfo D_80390D20;
|
||||
|
@@ -101,7 +101,7 @@ void func_80387488(ActorMarker *marker){
|
||||
player_getPosition(&sp1C);
|
||||
if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){
|
||||
sp1C[1] = 0;
|
||||
if(ml_distance_vec3f(&sp1C, &D_80390264) < 500.0f){
|
||||
if(ml_vec3f_distance(&sp1C, &D_80390264) < 500.0f){
|
||||
timedFunc_set_1(1.0f, (GenFunction_1) func_80387488, (s32)actor->marker);
|
||||
return;
|
||||
}
|
||||
|
@@ -2,249 +2,252 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* extern functions */
|
||||
void timed_exitStaticCamera(f32);
|
||||
void func_8028F918(s32);
|
||||
/* chAttackTutorial - controls bottle teaching moves in spiral */
|
||||
|
||||
/* public functions */
|
||||
void chAttackTutorial_talk(ActorMarker *);
|
||||
void chAttackTutorial_setState(Actor *this, s32 state);
|
||||
void chAttackTutorial_update(Actor *);
|
||||
extern void timed_exitStaticCamera(f32 time);
|
||||
extern void func_8028F918(s32);
|
||||
|
||||
/* .data */
|
||||
enum chAttackTutorial_state_e {
|
||||
ATTACK_TUTORIAL_STATE_1_UNKNOWN = 1,
|
||||
ATTACK_TUTORIAL_STATE_2_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_3_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_4_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_5_UNKNOWN
|
||||
enum ch_attack_tutorial_states {
|
||||
CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN = 0x1, // L80387610
|
||||
CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE, // L803873E0
|
||||
CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES, // L8038742C
|
||||
CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED, // L80387454
|
||||
CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG // L80387680
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC20 = {
|
||||
static void __chAttackTutorial_showDialogText(ActorMarker *);
|
||||
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state);
|
||||
static void __chAttackTutorial_update(Actor *);
|
||||
|
||||
/* .data */
|
||||
ActorInfo gChAttackTutorial = {
|
||||
MARKER_12B_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL, NULL,
|
||||
1, NULL,
|
||||
chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
__chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chAttackTutorial_enemy(ActorMarker *marker, enum actor_e enemy_id) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static void __chAttackTutorial_spawnEnemyActorForMarker(ActorMarker* marker, enum actor_e enemy_id) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
s32 pad;
|
||||
Actor *enemy = spawn_child_actor(enemy_id, &actor);
|
||||
Actor *other = spawn_child_actor(enemy_id, &actor);
|
||||
|
||||
actor->unk100 = enemy->marker;
|
||||
enemy->unk100 = actor->marker;
|
||||
|
||||
if (actor->unk10_12 == VEGETABLE_3_COLLY_WOBBLE && actor->unk38_31 == 1) {
|
||||
enemy->unk38_31 = 1;
|
||||
}
|
||||
else {//L803871D4
|
||||
enemy->unk38_31 = 0;
|
||||
actor->unk100 = other->marker;
|
||||
other->unk100 = actor->marker;
|
||||
if (actor->unk10_12 == 3 && actor->unk38_31 == 1) {
|
||||
other->unk38_31 = 1;
|
||||
} else {
|
||||
other->unk38_31 = 0;
|
||||
}
|
||||
|
||||
enemy->unk10_12 = VEGETABLE_1_TOPPER;
|
||||
other->unk10_12 = 1;
|
||||
if (marker);
|
||||
}
|
||||
|
||||
s32 __chAttackTutorial_spawnEnemy(Actor *this, enum vegetable_e vegetable_id) {
|
||||
volatile enum actor_e enemy_id;
|
||||
|
||||
enemy_id = vegetable_id == VEGETABLE_1_TOPPER ? ACTOR_166_TOPPER_A :
|
||||
vegetable_id == VEGETABLE_2_BAWL ? ACTOR_165_BAWL_A : ACTOR_164_COLLYWOBBLE_A;
|
||||
|
||||
__spawnQueue_add_2(__chAttackTutorial_enemy, this->marker, enemy_id);
|
||||
// spawn topper, bawl or collywobble based on already_killed_enemies (actor->unk10_12)
|
||||
static s32 __chAttackTutorial_spawnEnemyActor(Actor *this, s32 already_killed_enemies) {
|
||||
volatile enum actor_e sp1C;
|
||||
s32 tmp_v0;
|
||||
|
||||
if (already_killed_enemies == 1) {
|
||||
sp1C = ACTOR_166_TOPPER_THE_CARROT_A;
|
||||
} else {
|
||||
sp1C = tmp_v0 = (already_killed_enemies == 2)
|
||||
? ACTOR_165_BAWL_THE_ONION_A
|
||||
: ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A;
|
||||
}
|
||||
|
||||
__spawnQueue_add_2(__chAttackTutorial_spawnEnemyActorForMarker, this->marker, sp1C);
|
||||
|
||||
}
|
||||
|
||||
void __chAttackTutorial_learnedTextActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
chAttackTutorial_setState(marker_getActor(marker), ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
static void __chAttackTutorial_advanceMarkToState2(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
__chAttackTutorial_setState(marker_getActor(marker), CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
}
|
||||
|
||||
void __chAttackTutorial_learnedTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static void __chAttackTutorial_learnAbilityBasedOnDialog(ActorMarker *marker, enum asset_e dialog_id, s32 arg2) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
func_8028F918(0);
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_E15_TEXT_UNKNOWN://L803872C8
|
||||
switch(dialog_id) {
|
||||
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
|
||||
case ASSET_E17_TEXT_UNKNOWN://L803872E4
|
||||
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
}//L803872FC
|
||||
|
||||
}
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
void chAttackTutorial_setState(Actor *this, s32 state) {
|
||||
switch (state) {
|
||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN:
|
||||
if (this->unk10_12 == NULL) {
|
||||
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state) {
|
||||
switch (state)
|
||||
{
|
||||
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||
if (this->unk10_12 == 0) {
|
||||
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
||||
gcdialog_showText(ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, __chAttackTutorial_learnedTextActions);
|
||||
gcdialog_showText(ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, __chAttackTutorial_advanceMarkToState2);
|
||||
}
|
||||
else {
|
||||
gcdialog_showText(this->unk10_12 == VEGETABLE_1_TOPPER ? ASSET_E15_TEXT_UNKNOWN : ASSET_E17_TEXT_UNKNOWN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, NULL);
|
||||
else{
|
||||
gcdialog_showText(
|
||||
(this->unk10_12 == VEGETABLE_1_TOPPER) ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
|
||||
0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, NULL
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L803873E0
|
||||
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||
this->unk38_31 = 0;
|
||||
__chAttackTutorial_spawnEnemy(this, ++this->unk10_12);
|
||||
__chAttackTutorial_spawnEnemyActor(this, ++this->unk10_12);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_3_UNKNOWN://L8038742C
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, TRUE);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
||||
case CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES:
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, 1);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||
marker_despawn(this->marker);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_4_UNKNOWN://L80387454
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
||||
|
||||
if (!honeycombscore_get(HONEYCOMB_17_SM_COLIWOBBLE)) {
|
||||
this->unk10_12 = VEGETABLE_3_COLLY_WOBBLE;
|
||||
case CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED:
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||
if (!honeycombscore_get(HONEYCOMB_17_SM_COLLIWOBBLE)) {
|
||||
this->unk10_12 = 3;
|
||||
this->unk38_31 = 1;
|
||||
__chAttackTutorial_spawnEnemy(this, this->unk10_12);
|
||||
__chAttackTutorial_spawnEnemyActor(this, this->unk10_12);
|
||||
}
|
||||
|
||||
break;
|
||||
}//L803874A8
|
||||
}
|
||||
|
||||
subaddie_set_state(this, state);
|
||||
}
|
||||
|
||||
int __chAttackTutorial_isEveryAbilitiesUnlocked(void) {
|
||||
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE) &&
|
||||
ability_isUnlocked(ABILITY_C_ROLL) &&
|
||||
ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
||||
static bool __chAttackTutorial_areLearnableAbilitiesUnlocked() {
|
||||
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
&& ability_isUnlocked(ABILITY_C_ROLL)
|
||||
&& ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
||||
}
|
||||
|
||||
void chAttackTutorial_update(Actor *this) {
|
||||
f32 distance_to_bottles;
|
||||
Actor *bottles_ptr;
|
||||
|
||||
if (!this->initialized) {
|
||||
bottles_ptr = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &distance_to_bottles);
|
||||
|
||||
if (bottles_ptr != NULL) {
|
||||
this->unk1C_x = bottles_ptr->position_x;
|
||||
this->unk1C_y = bottles_ptr->position_y;
|
||||
this->unk1C_z = bottles_ptr->position_z;
|
||||
}
|
||||
else {
|
||||
static void __chAttackTutorial_update(Actor *this) {
|
||||
f32 minimum_distance;
|
||||
Actor *bottles;
|
||||
|
||||
if (!this->initialized) {
|
||||
bottles = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &minimum_distance);
|
||||
if (bottles != NULL) {
|
||||
this->unk1C_x = bottles->position_x;
|
||||
this->unk1C_y = bottles->position_y;
|
||||
this->unk1C_z = bottles->position_z;
|
||||
} else {
|
||||
this->unk1C_x = this->position_x;
|
||||
this->unk1C_y = this->position_y;
|
||||
this->unk1C_z = this->position_z;
|
||||
}
|
||||
|
||||
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL) ? VEGETABLE_2_BAWL :
|
||||
ability_isUnlocked(ABILITY_4_CLAW_SWIPE) ? VEGETABLE_1_TOPPER : NULL;
|
||||
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL)
|
||||
? 2
|
||||
: ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
? 1
|
||||
: 0;
|
||||
|
||||
this->initialized = TRUE;
|
||||
}
|
||||
|
||||
switch (this->state) {
|
||||
case ATTACK_TUTORIAL_STATE_1_UNKNOWN://L80387610
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4)) {
|
||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_5_UNKNOWN);
|
||||
}
|
||||
|
||||
if (__chAttackTutorial_isEveryAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_4_UNKNOWN);
|
||||
}
|
||||
switch(this->state) {
|
||||
case CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4))
|
||||
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG);
|
||||
|
||||
if (__chAttackTutorial_areLearnableAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))
|
||||
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L80387658
|
||||
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) {
|
||||
chAttackTutorial_talk(this->marker);
|
||||
__chAttackTutorial_showDialogText(this->marker);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE);
|
||||
}
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN://L80387680
|
||||
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||
break;
|
||||
}////L80387680
|
||||
}
|
||||
}
|
||||
|
||||
void __chAttackTutorial_attackTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
static void __chAttackTutorial_handleDialog(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN:
|
||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN:
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case ASSET_E14_TEXT_UNKNOWN:
|
||||
case ASSET_E16_TEXT_UNKNOWN:
|
||||
case ASSET_E18_TEXT_UNKNOWN:
|
||||
__chAttackTutorial_spawnEnemy(actor, actor->unk10_12);
|
||||
case ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // WOW...NICE ONE! TRY ANOTHER!
|
||||
case ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // BULLS-EYE! ONE MORE...
|
||||
case ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // MMMM...NOT BAD, FEATHER FACE!
|
||||
__chAttackTutorial_spawnEnemyActor(actor, actor->unk10_12);
|
||||
break;
|
||||
|
||||
case ASSET_E15_TEXT_UNKNOWN:
|
||||
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
|
||||
case ASSET_E17_TEXT_UNKNOWN:
|
||||
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
|
||||
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E19_TEXT_UNKNOWN:
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_3_UNKNOWN);
|
||||
|
||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES:
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES);
|
||||
break;
|
||||
}
|
||||
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
void chAttackTutorial_talk(ActorMarker *marker) {
|
||||
s32 text_id;
|
||||
int try_count;
|
||||
s32 text_flags = 4;
|
||||
|
||||
Actor *actor = marker_getActor(marker);
|
||||
try_count = BOOL(actor->unk38_31);
|
||||
|
||||
if (try_count) {
|
||||
text_flags = 0xE;
|
||||
static void __chAttackTutorial_showDialogText(ActorMarker* marker) {
|
||||
s32 dialog_text;
|
||||
bool has_killed_enemy;
|
||||
s32 dialog_flag = 0x4;
|
||||
|
||||
Actor* actor = marker_getActor(marker);
|
||||
|
||||
has_killed_enemy = actor->unk38_31 ? TRUE : FALSE;
|
||||
if (has_killed_enemy) {
|
||||
dialog_flag = 0xE;
|
||||
}
|
||||
|
||||
switch (actor->unk10_12) {
|
||||
case VEGETABLE_1_TOPPER: //L803877D8
|
||||
text_id = try_count ? ASSET_E15_TEXT_UNKNOWN : ASSET_E14_TEXT_UNKNOWN;
|
||||
case VEGETABLE_1_TOPPER:
|
||||
dialog_text = has_killed_enemy ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
case VEGETABLE_2_BAWL: //L803877F4
|
||||
text_id = try_count ? ASSET_E17_TEXT_UNKNOWN : ASSET_E16_TEXT_UNKNOWN;
|
||||
case VEGETABLE_2_BAWL:
|
||||
dialog_text = has_killed_enemy ? ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP : ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
case VEGETABLE_3_COLLY_WOBBLE: //L80387810
|
||||
text_id = try_count ? ASSET_E19_TEXT_UNKNOWN : ASSET_E18_TEXT_UNKNOWN;
|
||||
case VEGETABLE_3_COLLY_WOBBLE:
|
||||
dialog_text = has_killed_enemy ? ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES : ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
default:
|
||||
//sp34 = actor->unk38_31;
|
||||
break;
|
||||
}//L8038782C
|
||||
}
|
||||
|
||||
if (text_id == ASSET_E19_TEXT_UNKNOWN) {
|
||||
if (dialog_text == ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES) {
|
||||
func_8028F94C(2, actor->unk1C);
|
||||
}//L80387848
|
||||
}
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && try_count) {
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && has_killed_enemy) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
text_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}//L80387898
|
||||
dialog_text = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}
|
||||
|
||||
if (try_count) {
|
||||
if (has_killed_enemy) {
|
||||
timed_setStaticCameraToNode(0.0f, 6);
|
||||
}//L803878B0
|
||||
}
|
||||
|
||||
gcdialog_showText(text_id, text_flags, actor->unk1C, actor->marker, __chAttackTutorial_attackTextCallback, NULL);
|
||||
gcdialog_showText(dialog_text, dialog_flag, actor->unk1C, actor->marker, __chAttackTutorial_handleDialog, NULL);
|
||||
actor->unk38_31++;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ enum chJumpTutorial_state_e {
|
||||
JUMP_TUTORIAL_STATE_3_DISAPPEARED
|
||||
};
|
||||
|
||||
ActorInfo D_8038B0B0 = {
|
||||
ActorInfo gChJumpTutorial = {
|
||||
MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL,
|
||||
1, NULL,
|
||||
chJumpTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
@@ -32,7 +32,7 @@ void __chJumpTutorial_setStaticCameraToNode4(Actor *this) {
|
||||
void __chJumpTutorial_textCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(caller);
|
||||
|
||||
if (text_id == ASSET_DF9_TEXT_BOTTLES_UNKNOWN || text_id == ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES) {
|
||||
if (text_id == ASSET_DF9_DIALOG_BOTTLES_UNKNOWN || text_id == ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES) {
|
||||
chJumpTutorial_setState(actor, JUMP_TUTORIAL_STATE_3_DISAPPEARED);
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ void chJumpTutorial_setState(Actor *this, s32 state) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER);
|
||||
|
||||
gcdialog_showText(ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1A_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1A_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
|
||||
}
|
||||
break;
|
||||
@@ -112,8 +112,8 @@ void chJumpTutorial_update(Actor *this) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_7_FEATHERY_FLAP);
|
||||
|
||||
gcdialog_showText(ASSET_DF7_TEXT_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1B_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF7_DIALOG_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1B_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
|
||||
}//L8038A730
|
||||
|
||||
@@ -121,8 +121,8 @@ void chJumpTutorial_update(Actor *this) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_8_FLAP_FLIP);
|
||||
|
||||
gcdialog_showText(ASSET_DF8_TEXT_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1C_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF8_DIALOG_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1C_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED, FALSE);
|
||||
}//L8038A794
|
||||
|
||||
@@ -132,10 +132,10 @@ void chJumpTutorial_update(Actor *this) {
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
dialog_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
dialog_id = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}
|
||||
else {
|
||||
dialog_id = ASSET_DF9_TEXT_BOTTLES_UNKNOWN;
|
||||
dialog_id = ASSET_DF9_DIALOG_BOTTLES_UNKNOWN;
|
||||
}
|
||||
|
||||
gcdialog_showText(dialog_id, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
Actor *func_802D94B4(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
void func_8028E668(f32 *, f32, f32, f32);
|
||||
void func_80328FB0(Actor *, f32);
|
||||
void func_8030DA44(u8);
|
||||
void sfxsource_freeSfxsourceByIndex(u8);
|
||||
void timed_exitStaticCamera(f32);
|
||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
|
||||
@@ -40,7 +40,7 @@ ActorAnimationInfo chSmBottlesAnimations[6] = {
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
||||
};
|
||||
|
||||
ActorInfo chBottles = {
|
||||
ActorInfo gChBottles = {
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||
1, chSmBottlesAnimations,
|
||||
chSmBottles_update, actor_update_func_80326224, func_802D94B4,
|
||||
@@ -48,14 +48,14 @@ ActorInfo chBottles = {
|
||||
};
|
||||
|
||||
ChSmBottlesDialog chSmBottlesDialogTable[8] = {
|
||||
{ASSET_DF3_TEXT_BOTTLES_INTRODUCTION, ASSET_E08_TEXT_BOTTLES_FIND_ANOTHER_MOLEHILL, 0x1, -1},
|
||||
{ASSET_DF4_TEXT_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_TEXT_BOTTLES_CAMERA_CONTROL_REFRESHER, 0x3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_TEXT_BOTTLES_DIVE_LEARN, ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER, 0x5, ABILITY_F_DIVE},
|
||||
{-1, ASSET_E00_TEXT_BOTTLES_ATTACK_REFRESHER, 0x6, ABILITY_B_RATATAT_RAP},
|
||||
{ASSET_E04_TEXT_BOTTLES_BEAK_BARGE_LEARN, ASSET_E06_TEXT_BOTTLES_BEAK_BARGE_REFRESHER, 0x8, ABILITY_0_BARGE},
|
||||
{-1, ASSET_DFA_TEXT_BOTTLES_JUMP_REFRESHER, 0x4, ABILITY_8_FLAP_FLIP},
|
||||
{ASSET_E01_TEXT_BOTTLES_CLIMB_LEARN, ASSET_E03_TEXT_BOTTLES_CLIMB_REFRESHER, 0x7, ABILITY_5_CLIMB},
|
||||
{ASSET_E10_TEXT_BOTTLES_BRIDGE_BROKEN, ASSET_E11_TEXT_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
{ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION, ASSET_E08_DIALOG_BOTTLES_FIND_ANOTHER_MOLEHILL, 0x1, -1},
|
||||
{ASSET_DF4_DIALOG_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_DIALOG_BOTTLES_CAMERA_CONTROL_REFRESHER, 0x3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_DIALOG_BOTTLES_DIVE_LEARN, ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER, 0x5, ABILITY_F_DIVE},
|
||||
{-1, ASSET_E00_DIALOG_BOTTLES_ATTACK_REFRESHER, 0x6, ABILITY_B_RATATAT_RAP},
|
||||
{ASSET_E04_DIALOG_BOTTLES_BEAK_BARGE_LEARN, ASSET_E06_DIALOG_BOTTLES_BEAK_BARGE_REFRESHER, 0x8, ABILITY_0_BARGE},
|
||||
{-1, ASSET_DFA_DIALOG_BOTTLES_JUMP_REFRESHER, 0x4, ABILITY_8_FLAP_FLIP},
|
||||
{ASSET_E01_DIALOG_BOTTLES_CLIMB_LEARN, ASSET_E03_DIALOG_BOTTLES_CLIMB_REFRESHER, 0x7, ABILITY_5_CLIMB},
|
||||
{ASSET_E10_DIALOG_BOTTLES_BRIDGE_BROKEN, ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
};
|
||||
|
||||
s32 chSmBottlesDialogIndex = 0;
|
||||
@@ -137,7 +137,7 @@ void __chSmBottles_setState(Actor *this, s32 next_state) {
|
||||
this->unk138_23 = 0;
|
||||
|
||||
case SM_BOTTLES_STATE_2_UNKNOWN://L80389004
|
||||
func_8030DA44(this->unk44_31);
|
||||
sfxsource_freeSfxsourceByIndex(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
break;
|
||||
|
||||
@@ -241,43 +241,43 @@ void __chSmBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 a
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
gcdialog_showText(ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, __chSmBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, __chSmBottles_textCallback, NULL);
|
||||
}//L8038933C
|
||||
else {
|
||||
if (!(text_id == ASSET_DF3_TEXT_BOTTLES_INTRODUCTION || text_id == ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER || text_id == ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT)) {
|
||||
if (!(text_id == ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION || text_id == ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER || text_id == ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT)) {
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED:
|
||||
case ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED:
|
||||
break;
|
||||
|
||||
case ASSET_DF3_TEXT_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
case ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
break;
|
||||
|
||||
case ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
case ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
actor->unk38_0 = TRUE;
|
||||
break;
|
||||
|
||||
case ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
|
||||
case ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
|
||||
actor->has_met_before = FALSE;
|
||||
actor->lifetime_value = 0.0f;
|
||||
break;
|
||||
|
||||
case ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
__chSmBottles_setState(actor, SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (actor->state != SM_BOTTLES_STATE_5_UNKNOWN) {
|
||||
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 0x4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED, 0x4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
__chSmBottles_setState(actor, actor->state == SM_BOTTLES_STATE_5_UNKNOWN ? SM_BOTTLES_STATE_1_UNKNOWN : SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
@@ -291,11 +291,11 @@ void __chSmBottles_getRefresherDialog(Actor *this, s32 *text_id, s32 *text_flags
|
||||
// Gives the player the ability if not learned.
|
||||
if (ability_isUnlocked(chSmBottlesDialogTable[this->unkF4_8 - 1].ability)) {
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
*text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
*text_id = chSmBottlesDialogIndex + ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
|
||||
if (*text_id != ASSET_E0E_TEXT_BOTTLES_REFUSE_HELP_5) {
|
||||
if (*text_id != ASSET_E0E_DIALOG_BOTTLES_REFUSE_HELP_5) {
|
||||
*text_flags |= 1;
|
||||
}
|
||||
}
|
||||
@@ -303,8 +303,8 @@ void __chSmBottles_getRefresherDialog(Actor *this, s32 *text_id, s32 *text_flags
|
||||
*text_flags |= 1;
|
||||
*text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].refresher_text_id;
|
||||
|
||||
if (*text_id == ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER && !ability_hasUsed(ABILITY_3_CAMERA_CONTROL)) {
|
||||
*text_id = ASSET_DFD_TEXT_BOTTLES_SWIM_LEARN;
|
||||
if (*text_id == ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER && !ability_hasUsed(ABILITY_3_CAMERA_CONTROL)) {
|
||||
*text_id = ASSET_DFD_DIALOG_BOTTLES_SWIM_LEARN;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,7 +327,7 @@ void __chSmBottles_talk(Actor *this) {
|
||||
text_flags |= 1;
|
||||
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
text_id = chSmBottlesDialogIndex + ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
}
|
||||
@@ -344,11 +344,11 @@ void __chSmBottles_talk(Actor *this) {
|
||||
case 8://L80389720
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED)) {
|
||||
if (fileProgressFlag_get(FILEPROG_A6_FURNACE_FUN_COMPLETE)) {
|
||||
text_id = ASSET_E37_TEXT_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN;
|
||||
text_id = ASSET_E37_DIALOG_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN;
|
||||
text_flags |= 1;
|
||||
}
|
||||
else if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_F)) { //L80389758
|
||||
text_id = ASSET_E0F_TEXT_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
text_id = ASSET_E0F_DIALOG_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
text_flags |= 1;
|
||||
}
|
||||
else {//L80389780
|
||||
@@ -418,7 +418,7 @@ void __chSmBottles_free(Actor *this) {
|
||||
u8 tmp = this->unk44_31;
|
||||
|
||||
if (tmp) {
|
||||
func_8030DA44(tmp);
|
||||
sfxsource_freeSfxsourceByIndex(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ void chSmBottles_update(Actor *this) {
|
||||
(this->unkF4_8 == 8 && !mapSpecificFlags_get(SM_SPECIFIC_FLAG_2)) ||
|
||||
(this->unkF4_8 == 8 && mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && !mapSpecificFlags_get(SM_SPECIFIC_FLAG_F))
|
||||
) {//L80389C50
|
||||
if (((ml_distance_vec3f(plyr_pos, this->unk1C) < this->actor_specific_1_f) && func_8028F20C()) ||
|
||||
if (((ml_vec3f_distance(plyr_pos, this->unk1C) < this->actor_specific_1_f) && func_8028F20C()) ||
|
||||
mapSpecificFlags_get(SM_SPECIFIC_FLAG_10)
|
||||
) {//L80389C8C
|
||||
if (func_80329530(this, 0x96)) {
|
||||
@@ -610,7 +610,7 @@ void chSmBottles_update(Actor *this) {
|
||||
|
||||
if (button_pressed != -1) {
|
||||
fileProgressFlag_set(FILEPROG_DB_SKIPPED_TUTORIAL, button_pressed ? 0 : 1);
|
||||
gcdialog_showText(button_pressed ? ASSET_E07_TEXT_BOTTLES_UNKNOWN : ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL, 0xe, this->position, this->marker, __chSmBottles_textCallback,__chSmBottles_textActions);
|
||||
gcdialog_showText(button_pressed ? ASSET_E07_DIALOG_BOTTLES_UNKNOWN : ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL, 0xe, this->position, this->marker, __chSmBottles_textCallback,__chSmBottles_textActions);
|
||||
|
||||
if (!button_pressed) {
|
||||
__chSmBottles_skipIntroTutorial();
|
||||
@@ -619,7 +619,7 @@ void chSmBottles_update(Actor *this) {
|
||||
this->unk38_0 = FALSE;
|
||||
}
|
||||
else if (!this->has_met_before && 5.0 < this->lifetime_value) {
|
||||
gcdialog_showText(ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT, 0x86, this->position, this->marker, __chSmBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT, 0x86, this->position, this->marker, __chSmBottles_textCallback, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -2,262 +2,252 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* extern functions */
|
||||
f32 mapModel_getFloorY(f32 *);
|
||||
void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
||||
void timed_mapSpecificFlags_setTrue(f32, s32);
|
||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern f32 mapModel_getFloorY(f32*);
|
||||
extern void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
||||
extern void timed_mapSpecificFlags_setTrue(f32 time, enum sm_specific_flags flag);
|
||||
extern void subaddie_set_state_with_direction(Actor* , s32, f32, s32);
|
||||
|
||||
/* typedefs and declarations */
|
||||
enum chVegetables_state_e {
|
||||
VEGETABLES_STATE_1_UNKNOWN = 1,
|
||||
VEGETABLES_STATE_2_UNKNOWN,
|
||||
VEGETABLES_STATE_3_UNKNOWN,
|
||||
VEGETABLES_STATE_4_UNKNOWN
|
||||
enum ch_vegetable_type {
|
||||
CH_VEGETABLE_1_TOPPER = 0x1,
|
||||
CH_VEGETABLE_2_BAWL,
|
||||
CH_VEGETABLE_3_COLLIWOBBLE
|
||||
};
|
||||
|
||||
typedef struct ch_vegetable {
|
||||
TUPLE(f32, unk0);
|
||||
s32 vegetable_id;
|
||||
u32 pad10_31: 19;
|
||||
u32 unk10_12: 4;
|
||||
u32 pad10_8: 9;
|
||||
} ChVeg;
|
||||
enum ch_vegetables_states {
|
||||
CH_VEGETABLES_STATE_1_UNKNOWN = 0x1, //L803882B0
|
||||
CH_VEGETABLES_STATE_2_UNKNOWN, //L803884E4
|
||||
CH_VEGETABLES_STATE_3_UNKNOWN, //L80388BFC
|
||||
CH_VEGETABLES_STATE_4_UNKNOWN //L8038839C
|
||||
};
|
||||
|
||||
/* public functions */
|
||||
Actor *chVegetablesDraw(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
void chVegetablesUpdate(Actor *);
|
||||
typedef struct ch_vegatable {
|
||||
TUPLE(f32, unk0);
|
||||
enum ch_vegetable_type vegetable_type;
|
||||
u32 unk10_12;
|
||||
u32 pad10_31;
|
||||
u32 pad10_8;
|
||||
} sChVegetable;
|
||||
|
||||
static Actor* __chVegetables_draw(ActorMarker*, Gfx**, Mtx**, Vtx **);
|
||||
static void __chVegetables_update(Actor*);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chTopperAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChCarrotAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1000000.0f},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f},
|
||||
{ASSET_224_ANIM_TOPPER_UNKNOWN, 0.75f},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC78 = {
|
||||
MARKER_12A_TOPPER_A, ACTOR_166_TOPPER_A, ASSET_4ED_MODEL_TOPPER,
|
||||
1, chTopperAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesTopperA = {
|
||||
MARKER_12A_TOPPER_THE_CARROT_A, ACTOR_166_TOPPER_THE_CARROT_A, ASSET_4ED_MODEL_TOPPER,
|
||||
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
2000, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC9C = {
|
||||
MARKER_1E6_TOPPER_B, ACTOR_TOPPER_B, ASSET_4ED_MODEL_TOPPER,
|
||||
1, chTopperAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesTopperB = {
|
||||
MARKER_1E6_TOPPER_THE_CARROT_B, ACTOR_TOPPER_THE_CARROT_B, ASSET_4ED_MODEL_TOPPER,
|
||||
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
2000, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorAnimationInfo chBawlAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChOnionAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1000000.0f},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f},
|
||||
{ASSET_227_ANIM_BAWL_UNKNOWN, 0.75f},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038ACE8 = {
|
||||
MARKER_129_BAWL_A, ACTOR_165_BAWL_A, ASSET_4EF_MODEL_BAWL,
|
||||
1, chBawlAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesBawlA = {
|
||||
MARKER_129_BAWL_THE_ONION_A, ACTOR_165_BAWL_THE_ONION_A, ASSET_4EF_MODEL_BAWL,
|
||||
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD0C = {
|
||||
MARKER_1E7_BAWL_B, ACTOR_BAWL_B, ASSET_4EF_MODEL_BAWL,
|
||||
1, chBawlAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesBawlB = {
|
||||
MARKER_1E7_BAWL_THE_ONION_B, ACTOR_BAWL_THE_ONION_B, ASSET_4EF_MODEL_BAWL,
|
||||
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorAnimationInfo chCollywobbleAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChCauliflowerAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD58 = {
|
||||
MARKER_128_COLLYWOBBLE_A, ACTOR_164_COLLYWOBBLE_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, chCollywobbleAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesCollywobbleA = {
|
||||
MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 2.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD7C = {
|
||||
MARKER_1E8_COLLYWOBBLE_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, chCollywobbleAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesCollywobbleB = {
|
||||
MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 2.0f, 0
|
||||
};
|
||||
|
||||
s32 D_8038ADA0[3] = {0xFF, 0xFF, 0xFF};
|
||||
static s32 sChVegetablesParticleRGB[3] = {0xFF, 0xFF, 0xFF};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038ADAC = {
|
||||
{0.1f, 0.5f},
|
||||
{1.5f, 3.0f},
|
||||
{0.0f, 0.01f},
|
||||
{1.0f, 1.5f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038ADAC = {
|
||||
{0.1f, 0.5f},
|
||||
{1.5f, 3.0f},
|
||||
{0.0f, 0.01f},
|
||||
{1.0f, 1.5f},
|
||||
0.0f, 0.01f,
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityPosition D_8038ADD4 = {
|
||||
static ParticleSettingsVelocityPosition sD_8038ADD4 = {
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
{{-40.0f, -40.0f, -40.0f}, {40.0f, 40.0f, 40.0f}}
|
||||
{{-40.0f, -40.0f, -40.0f}, {40.0f, 40.0f, 40.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AE04 = {
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AE04 = {
|
||||
{0.5f, 0.75f},
|
||||
{0.4f, 0.6f},
|
||||
{0.4f, 0.6f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
{4.0f, 4.0f},
|
||||
0.0f, 0.2f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AE2C = {
|
||||
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AE2C = {
|
||||
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AE74 = {
|
||||
{1.0f, 1.0f},
|
||||
{1.0f, 1.0f},
|
||||
{0.0f, 0.01f},
|
||||
{2.0f, 2.0f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AE74 = {
|
||||
{1.0f, 1.0f},
|
||||
{1.0f, 1.0f},
|
||||
{0.0f, 0.01f},
|
||||
{2.0f, 2.0f},
|
||||
0.0f, 0.5f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AE9C = {
|
||||
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}}
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AE9C = {
|
||||
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AEE4 = {
|
||||
{0.6f, 0.8f},
|
||||
{0.5f, 0.7f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AEE4 = {
|
||||
{0.6f, 0.8f},
|
||||
{0.5f, 0.7f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
0.0f, 0.5f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AF0C = {
|
||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
||||
{{ 0.0f, -900.0f, 0.0f}, { 0.0f, -900.0f, 0.0f}},
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AF0C = {
|
||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
||||
{{0.0f, -900.0f, 0.0f}, {0.0f, -900.0f, 0.0f}},
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chVegetables_emitDust(ParticleEmitter *pCtrl, f32 *pos, s32 n) {
|
||||
s32 sp24[3] = D_8038ADA0;
|
||||
particleEmitter_setRGB(pCtrl, sp24);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038ADAC);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038ADD4);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setSpriteDustParticles(ParticleEmitter *emitter, f32 *position, s32 emit_count) {
|
||||
s32 sp24[3] = sChVegetablesParticleRGB;
|
||||
particleEmitter_setRGB(emitter, sp24);
|
||||
particleEmitter_setSprite(emitter, ASSET_700_SPRITE_DUST);
|
||||
particleEmitter_setStartingFrameRange(emitter, 0, 7);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038ADAC);
|
||||
particleEmitter_setPositionAndVelocityRanges(emitter, &sD_8038ADD4);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_803879B8(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 2);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE04);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE2C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForModel(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||
particleEmitter_func_802EFA18(emitter, 2);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE04);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE2C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_80387A80(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 3);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE74);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE9C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForModel2(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||
particleEmitter_func_802EFA18(emitter, 3);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE74);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE9C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_80387B48(ParticleEmitter *pCtrl, f32 pos[3], s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.7f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 4);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
||||
particleEmitter_setSfx(pCtrl, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AEE4);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AF0C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForHittingEnemyModel(ParticleEmitter *emitter, f32 position[3], s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.7f);
|
||||
particleEmitter_func_802EFA18(emitter, 4);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
||||
particleEmitter_setSfx(emitter, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AEE4);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AF0C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void __chVegetables_dieActor(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
f32 pos[3];
|
||||
static void __chVegetables_vegetableDeathParticles(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
f32 particles_position[3];
|
||||
|
||||
FUNC_8030E8B4(SFX_111_WHIPCRACK_DEATH, 1.0f, 32000, this->position, 1000, 2000);
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
||||
pos[0] = this->position_x;
|
||||
pos[1] = this->position_y;
|
||||
pos[2] = this->position_z;
|
||||
pos[1] += 50.0f;
|
||||
|
||||
func_80387B48(partEmitMgr_newEmitter(12), pos, 0xC, ASSET_4F4_MODEL_UNKNOWN);
|
||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F2_MODEL_UNKNOWN);
|
||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F3_MODEL_UNKNOWN);
|
||||
|
||||
pos[1] += 50.0f;
|
||||
__chVegetables_emitDust(partEmitMgr_newEmitter(8), pos, 8);
|
||||
}//L80387D18
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||
particles_position[0] = this->position_x;
|
||||
particles_position[1] = this->position_y;
|
||||
particles_position[2] = this->position_z;
|
||||
particles_position[1] += 50.0f;
|
||||
__chVegetables_setParticlesForHittingEnemyModel(partEmitMgr_newEmitter(0xC), particles_position, 0xC, ASSET_4F4_MODEL_COLLIWOBBLE_STEM_DEATH);
|
||||
__chVegetables_setParticlesForModel(partEmitMgr_newEmitter(4), particles_position, 0x4, ASSET_4F2_MODEL_COLLIWOBBLE_LARGE_DEATH);
|
||||
__chVegetables_setParticlesForModel(partEmitMgr_newEmitter(4), particles_position, 0x4, ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH);
|
||||
particles_position[1] += 50.0f;
|
||||
__chVegetables_setSpriteDustParticles(partEmitMgr_newEmitter(8), particles_position, 8);
|
||||
}
|
||||
|
||||
if (this->unk38_31) {
|
||||
this->position_y += 100.0f;
|
||||
func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE);
|
||||
func_802CA1CC(HONEYCOMB_17_SM_COLLIWOBBLE);
|
||||
__spawnQueue_add_4((GenFunction_4) spawnQueue_bundle_f32, BUNDLE_1F_SM_EMPTY_HONEYCOMB, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z));
|
||||
}//L80387D64
|
||||
}
|
||||
|
||||
timed_mapSpecificFlags_setTrue(1.5f, SM_SPECIFIC_FLAG_7);
|
||||
actor_collisionOff(this);
|
||||
|
||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE) {
|
||||
subaddie_set_state_with_direction(this, VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
||||
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||
subaddie_set_state_with_direction(this, CH_VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
|
||||
void __chVegetables_die(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
__chVegetables_dieActor(marker_getActor(marker));
|
||||
static void __chVegetables_vegetableMarkerDeathParticles(ActorMarker* marker, ActorMarker* other_marker) {
|
||||
__chVegetables_vegetableDeathParticles(marker_getActor(marker));
|
||||
}
|
||||
|
||||
Actor *chVegetablesDraw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static Actor* __chVegetables_draw(ActorMarker* marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
|
||||
if (actor->has_met_before) {
|
||||
if (actor->has_met_before)
|
||||
func_8033A470(3, 7);
|
||||
}
|
||||
else {
|
||||
else
|
||||
func_8033A45C(3, 0);
|
||||
}
|
||||
|
||||
return actor_draw(marker, gdl, mptr, arg3);
|
||||
}
|
||||
|
||||
void func_80387E64(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
static void __chVegetables_moveVegetable(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
|
||||
this->unk1C_x = randf2(-50.0f, 50.0f);
|
||||
this->unk1C_y = randf2(-50.0f, 50.0f);
|
||||
@@ -268,293 +258,257 @@ void func_80387E64(Actor *this) {
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}
|
||||
|
||||
void func_80387F00(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
|
||||
this->position_y += mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 120.0 : 180.0;
|
||||
|
||||
static void __chVegetables_elevateAndMoveVegetable(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
|
||||
this->position_y += (
|
||||
mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) ||
|
||||
volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)
|
||||
) ? 120.0 : 180.0;
|
||||
local->unk0_x = this->position_x;
|
||||
local->unk0_y = this->position_y;
|
||||
local->unk0_z = this->position_z;
|
||||
|
||||
this->velocity_x = 0.0f;
|
||||
this->velocity_y = 0.0f;
|
||||
this->velocity_z = 0.0f;
|
||||
|
||||
func_80387E64(this);
|
||||
__chVegetables_moveVegetable(this);
|
||||
}
|
||||
|
||||
int func_80387FA8(Actor *this, ChVeg *local, s32 yaw, s32 arg3) {
|
||||
// determine some kind of position logic
|
||||
static bool __chVegetables_func_80387FA8(Actor* this, sChVegetable* local, s32 yaw, s32 arg3) {
|
||||
f32 sp24[3];
|
||||
f32 sp18[3];
|
||||
|
||||
|
||||
sp18[0] = arg3;
|
||||
sp18[1] = 0.0f;
|
||||
sp18[2] = 0.0f;
|
||||
|
||||
ml_vec3f_yaw_rotate_copy(sp18, sp18, yaw - 90.0);
|
||||
|
||||
sp24[0] = sp18[0] + local->unk0_x;
|
||||
sp24[1] = sp18[1] + local->unk0_y;
|
||||
sp24[2] = sp18[2] + local->unk0_z;
|
||||
|
||||
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void chVegetablesUpdate(Actor *this) {
|
||||
static void __chVegetables_update(Actor* this) {
|
||||
f32 temp_velZ;
|
||||
f32 temp_velX;
|
||||
f32 temp_f0;
|
||||
f32 tick;
|
||||
f32 sp78;
|
||||
f32 sp6C[3];
|
||||
f32 sp60[3];
|
||||
f32 position[3];
|
||||
ChVeg *local = (ChVeg *) &this->local; //sp38
|
||||
f32 unused;
|
||||
f32 sp54[3];
|
||||
sChVegetable* local = (sChVegetable*)&this->local; //sp38
|
||||
f32 sp30;
|
||||
|
||||
if (!this->initialized) {
|
||||
switch (this->marker->id) {
|
||||
switch(this->marker->id) {
|
||||
default:
|
||||
local->vegetable_id = VEGETABLE_3_COLLY_WOBBLE; //cauliflower
|
||||
local->vegetable_type = CH_VEGETABLE_3_COLLIWOBBLE;
|
||||
break;
|
||||
|
||||
case MARKER_12A_TOPPER_A: //L803880F0
|
||||
case MARKER_1E6_TOPPER_B: //L803880F0
|
||||
local->vegetable_id = VEGETABLE_1_TOPPER; //carrot
|
||||
case MARKER_12A_TOPPER_THE_CARROT_A:
|
||||
case MARKER_1E6_TOPPER_THE_CARROT_B:
|
||||
local->vegetable_type = CH_VEGETABLE_1_TOPPER;
|
||||
break;
|
||||
|
||||
case MARKER_129_BAWL_A: //L80388100
|
||||
case MARKER_1E7_BAWL_B: //L80388100
|
||||
local->vegetable_id = VEGETABLE_2_BAWL; //onion
|
||||
case MARKER_129_BAWL_THE_ONION_A:
|
||||
case MARKER_1E7_BAWL_THE_ONION_B:
|
||||
local->vegetable_type = CH_VEGETABLE_2_BAWL;
|
||||
break;
|
||||
}
|
||||
|
||||
actor_collisionOff(this);
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, __chVegetables_die);
|
||||
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, __chVegetables_vegetableMarkerDeathParticles);
|
||||
this->unk1C_x = this->position_x;
|
||||
this->unk1C_y = this->position_y;
|
||||
this->unk1C_z = this->position_z;
|
||||
this->position_y -= 200.f;
|
||||
|
||||
do {//L80388154
|
||||
// set temp_velX/Z to > 5
|
||||
do{
|
||||
temp_velX = randf2(-10.0f, 10.0f);
|
||||
temp_f0 = 0.0f <= temp_velX ? temp_velX : -temp_velX;
|
||||
temp_f0 = (0.0f <= temp_velX) ? temp_velX : -temp_velX;
|
||||
} while (temp_f0 < 5.0);
|
||||
|
||||
do {//L803881AC
|
||||
do{
|
||||
temp_velZ = randf2(-10.0f, 10.0f);
|
||||
temp_f0 = 0.0f <= temp_velZ ? temp_velZ : -temp_velZ;
|
||||
} while (temp_f0 < 5.0);
|
||||
temp_f0 = (0.0f <= temp_velZ) ? temp_velZ : -temp_velZ;
|
||||
} while(temp_f0 < 5.0);
|
||||
|
||||
this->velocity_x = temp_velX;
|
||||
this->velocity_y = local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 90.0f : 70.0f;
|
||||
this->velocity_y = (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 90.0f : 70.0f;
|
||||
this->velocity_z = temp_velZ;
|
||||
|
||||
this->has_met_before = TRUE;
|
||||
this->unk138_23 = 0;
|
||||
this->unk38_0 = 0;
|
||||
this->initialized = TRUE;
|
||||
this->scale = 0.5;
|
||||
}//L80388278
|
||||
}
|
||||
|
||||
switch (this->state) {
|
||||
case VEGETABLES_STATE_1_UNKNOWN: //L803882B0
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(
|
||||
VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) || this->unk10_12) {//L803882E4
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) { //L8038830C
|
||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 120.0 : 0.0;
|
||||
}
|
||||
else {//L80388350
|
||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 270.0 : 85.0;
|
||||
}
|
||||
//L80388384
|
||||
subaddie_set_state(this, VEGETABLES_STATE_4_UNKNOWN);
|
||||
switch (this->state)
|
||||
{
|
||||
case CH_VEGETABLES_STATE_1_UNKNOWN:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) || this->unk10_12) {
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
||||
this->unk1C_y += (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 120.0 : 0.0;
|
||||
} else {
|
||||
this->unk1C_y += (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 270.0 : 85.0;
|
||||
}
|
||||
break;
|
||||
subaddie_set_state(this, CH_VEGETABLES_STATE_4_UNKNOWN);
|
||||
}
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_4_UNKNOWN:
|
||||
this->position_x = this->velocity_x + this->position_x;
|
||||
this->position_y = this->velocity_y + this->position_y;
|
||||
this->position_z = this->velocity_z + this->position_z;
|
||||
this->velocity_y -= 5.0f;
|
||||
this->scale = MIN(this->scale + 0.05, 1.0);
|
||||
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
||||
this->position_y = mapModel_getFloorY(this->position);
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE)
|
||||
__chVegetables_elevateAndMoveVegetable(this);
|
||||
|
||||
case VEGETABLES_STATE_4_UNKNOWN: //L8038839C
|
||||
this->position_x = this->velocity_x + this->position_x;
|
||||
this->position_y = this->velocity_y + this->position_y;
|
||||
this->position_z = this->velocity_z + this->position_z;
|
||||
actor_collisionOn(this);
|
||||
subaddie_set_state(this, CH_VEGETABLES_STATE_2_UNKNOWN);
|
||||
}
|
||||
|
||||
this->velocity_y -= 5.0f;
|
||||
this->scale = MIN(this->scale + 0.05, 1.0);
|
||||
|
||||
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
||||
this->position_y = mapModel_getFloorY(this->position);
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
||||
func_80387F00(this);
|
||||
}
|
||||
|
||||
actor_collisionOn(this);
|
||||
subaddie_set_state(this, VEGETABLES_STATE_2_UNKNOWN);
|
||||
}//L80388494
|
||||
|
||||
if (!this->unk138_23) {
|
||||
if (0.0f < this->position_y) {
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1000, 2000);
|
||||
this->unk138_23 = 1;
|
||||
this->scale = 1.0f;
|
||||
}
|
||||
if (!this->unk138_23) {
|
||||
if (0.0f < this->position_y) {
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1000, 2000);
|
||||
this->unk138_23 = 1;
|
||||
this->scale = 1.0f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VEGETABLES_STATE_2_UNKNOWN: //L803884E4
|
||||
if (this->unk38_0) {
|
||||
if (func_80329480(this)) {
|
||||
this->unk38_0 = 0;
|
||||
}
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_2_UNKNOWN:
|
||||
if (this->unk38_0) {
|
||||
if (func_80329480(this)) {
|
||||
this->unk38_0 = 0;
|
||||
}
|
||||
else {//L80388520
|
||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
||||
this->actor_specific_1_f = 3.0f;
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {//L80388554
|
||||
if (!func_80329030(this, 0) && func_80329480(this)) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x78, 0xb4);
|
||||
this->unk38_0 = 1;
|
||||
}//L803885A0
|
||||
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L803885CC
|
||||
else if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1E, 0x5A);
|
||||
}//L80388B68
|
||||
}
|
||||
else {//L80388618
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
}
|
||||
else if (local->vegetable_id == VEGETABLE_2_BAWL) {//L80388634
|
||||
this->actor_specific_1_f = 4.0f;
|
||||
|
||||
} else {
|
||||
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER) {
|
||||
this->actor_specific_1_f = 3.0f;
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {//L80388554
|
||||
if (!func_80329030(this, 0) && func_80329480(this)) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x78, 0xB4);
|
||||
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
|
||||
this->unk38_0 = 1;
|
||||
}//L80388698
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(
|
||||
this))) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L803886E4
|
||||
else if (randf() < 0.02) {//D_8038B1D0){
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
else {//L80388730
|
||||
tick = time_getDelta();
|
||||
|
||||
sp6C[0] = this->unk1C_x - this->position_x;
|
||||
sp6C[1] = this->unk1C_y - this->position_y;
|
||||
sp6C[2] = this->unk1C_z - this->position_z;
|
||||
|
||||
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
||||
ml_vec3f_set_length(sp6C, 400.0f);
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
else {
|
||||
ml_vec3f_set_length(sp6C, 100.0f);
|
||||
}
|
||||
|
||||
this->position_x += this->velocity_x * tick + sp6C[0] * tick * tick;
|
||||
this->position_y += this->velocity_y * tick + sp6C[1] * tick * tick;
|
||||
this->position_z += this->velocity_z * tick + sp6C[2] * tick * tick;
|
||||
|
||||
this->velocity_x += sp6C[0] * tick;
|
||||
this->velocity_y += sp6C[1] * tick;
|
||||
this->velocity_z += sp6C[2] * tick;
|
||||
|
||||
if (gu_sqrtf(SQ(this->velocity_z) + (SQ(this->velocity_x) + SQ(this->velocity_y))) > 50.0f) {
|
||||
ml_vec3f_set_length(this->velocity, 50.0f);
|
||||
}
|
||||
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 20.0f) {
|
||||
func_80387E64(this);
|
||||
}
|
||||
|
||||
this->actor_specific_1_f = 5.0f;
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))) { //L8038892C
|
||||
if (!func_80387FA8(this, local, (s32) this->yaw, (s32) this->actor_specific_1_f)) {
|
||||
if (func_80329480(this)) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x78, 0xb4);
|
||||
this->unk38_0 = 1;
|
||||
}//L80388994
|
||||
}
|
||||
else { //L803889A0
|
||||
this->position_x -= local->unk0_x;
|
||||
this->position_y -= local->unk0_y;
|
||||
this->position_z -= local->unk0_z;
|
||||
|
||||
this->unk1C_x -= local->unk0_x;
|
||||
this->unk1C_y -= local->unk0_y;
|
||||
this->unk1C_z -= local->unk0_z;
|
||||
|
||||
TUPLE_ASSIGN(sp60, this->actor_specific_1_f, 0.0f, 0.0f)
|
||||
ml_vec3f_yaw_rotate_copy(sp60, sp60, this->yaw - 90.0);
|
||||
|
||||
local->unk0_x = sp60[0] + local->unk0_x;
|
||||
local->unk0_y = sp60[1] + local->unk0_y;
|
||||
local->unk0_z = sp60[2] + local->unk0_z;
|
||||
|
||||
this->position_x = local->unk0_x + this->position_x;
|
||||
this->position_y = local->unk0_y + this->position_y;
|
||||
this->position_z = local->unk0_z + this->position_z;
|
||||
|
||||
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
||||
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}//L80388AD8
|
||||
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L80388B04
|
||||
else if (randf() < 0.01) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1e, 0x5A);
|
||||
if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
else { //L80388B50
|
||||
}
|
||||
else {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
}
|
||||
else if (local->vegetable_type == CH_VEGETABLE_2_BAWL) {
|
||||
this->actor_specific_1_f = 4.0f;
|
||||
if (!func_80329030(this, 0) && func_80329480(this)) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x78, 0xB4);
|
||||
this->unk38_0 = 1;
|
||||
}
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(this))) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
} else {
|
||||
if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sp78 = time_getDelta();
|
||||
sp6C[0] = this->unk1C_x - this->position_x;
|
||||
sp6C[1] = this->unk1C_y - this->position_y;
|
||||
sp6C[2] = this->unk1C_z - this->position_z;
|
||||
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
||||
ml_vec3f_set_length(sp6C, 400.0f);
|
||||
}
|
||||
else {
|
||||
ml_vec3f_set_length(sp6C, 100.0f);
|
||||
}
|
||||
this->position_x += this->velocity_x*sp78 + sp6C[0]*sp78*sp78;
|
||||
this->position_y += this->velocity_y*sp78 + sp6C[1]*sp78*sp78;
|
||||
this->position_z += this->velocity_z*sp78 + sp6C[2]*sp78*sp78;
|
||||
this->velocity_x += sp6C[0]*sp78;
|
||||
this->velocity_y += sp6C[1]*sp78;
|
||||
this->velocity_z += sp6C[2]*sp78;
|
||||
if (gu_sqrtf(this->velocity_z*this->velocity_z + (this->velocity_x*this->velocity_x + this->velocity_y*this->velocity_y)) > 50.0f) {
|
||||
ml_vec3f_set_length(this->velocity, 50.0f);
|
||||
}
|
||||
if (ml_vec3f_distance(this->position, this->unk1C) < 20.0f) {
|
||||
__chVegetables_moveVegetable(this);
|
||||
}
|
||||
this->actor_specific_1_f = 5.0f;
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))) { //L8038892C
|
||||
if (!__chVegetables_func_80387FA8(this, local, (s32)this->yaw, (s32)this->actor_specific_1_f)) {
|
||||
if (func_80329480(this)) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
|
||||
this->unk38_0 = 1;
|
||||
}
|
||||
} else {
|
||||
this->position_x -= local->unk0_x;
|
||||
this->position_y -= local->unk0_y;
|
||||
this->position_z -= local->unk0_z;
|
||||
this->unk1C_x -= local->unk0_x;
|
||||
this->unk1C_y -= local->unk0_y;
|
||||
this->unk1C_z -= local->unk0_z;
|
||||
TUPLE_ASSIGN(sp60, this->actor_specific_1_f, 0.0f, 0.0f);
|
||||
ml_vec3f_yaw_rotate_copy(sp60, sp60, this->yaw - 90.0);
|
||||
local->unk0_x = sp60[0] + local->unk0_x;
|
||||
local->unk0_y = sp60[1] + local->unk0_y;
|
||||
local->unk0_z = sp60[2] + local->unk0_z;
|
||||
this->position_x = local->unk0_x + this->position_x;
|
||||
this->position_y = local->unk0_y + this->position_y;
|
||||
this->position_z = local->unk0_z + this->position_z;
|
||||
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
||||
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
} else {
|
||||
if (randf() < 0.01) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1e, 0x5A);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//L80388B68
|
||||
|
||||
func_80328FB0(this, 2.0f);
|
||||
|
||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE && actor_animationIsAt(this, 0.3f)) {
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 1.0f, 22000, this->position, 1000, 2000);
|
||||
}
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE && actor_animationIsAt(this, 0.4f)) {
|
||||
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);
|
||||
}
|
||||
break;
|
||||
|
||||
case VEGETABLES_STATE_3_UNKNOWN: //L80388BFC
|
||||
if (actor_animationIsAt(this, local->vegetable_id == VEGETABLE_2_BAWL ? 0.4 : 0.05)) {
|
||||
position[0] = this->position_x;
|
||||
position[1] = this->position_y;
|
||||
position[2] = this->position_z;
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
||||
position[1] += 150.0f;
|
||||
} else {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
|
||||
this->has_met_before = FALSE;
|
||||
func_80387A80(partEmitMgr_newEmitter(3), position, 3,
|
||||
local->vegetable_id == VEGETABLE_1_TOPPER ? ASSET_4F0_MODEL_UNKNOWN : ASSET_4F1_MODEL_UNKNOWN);
|
||||
}//L80388CC4
|
||||
|
||||
if (actor_animationIsAt(this, 0.75f)) {
|
||||
func_80326310(this);
|
||||
}
|
||||
break;
|
||||
}//L80388CE0
|
||||
}//*/
|
||||
}
|
||||
func_80328FB0(this, 2.0f);
|
||||
|
||||
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.3f))
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 1.0f, 22000, this->position, 1000, 2000);
|
||||
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.4f))
|
||||
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);
|
||||
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_3_UNKNOWN:
|
||||
if (actor_animationIsAt(this, (local->vegetable_type == CH_VEGETABLE_2_BAWL) ? 0.4 : 0.05)) {
|
||||
sp54[0] = this->position_x;
|
||||
sp54[1] = this->position_y;
|
||||
sp54[2] = this->position_z;
|
||||
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER)
|
||||
sp54[1] += 150.0f;
|
||||
this->has_met_before = FALSE;
|
||||
__chVegetables_setParticlesForModel2(partEmitMgr_newEmitter(3), sp54, 3, (local->vegetable_type == CH_VEGETABLE_1_TOPPER) ? ASSET_4F0_MODEL_TOPPER_UNKNOWN: ASSET_4F1_MODEL_BAWL_OR_COLLIWOBBLE_UNKNOWN);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.75f))
|
||||
func_80326310(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ void func_8038A8F8(Actor *this){
|
||||
this->volatile_initialized = TRUE;
|
||||
}//L8038A968
|
||||
player_getPosition(this->velocity);
|
||||
sp2C = ml_distance_vec3f(this->velocity, this->position);
|
||||
sp2C = ml_vec3f_distance(this->velocity, this->position);
|
||||
if(sp2C < (f32) this->unkF4_8)
|
||||
func_80388D48();
|
||||
|
||||
@@ -48,7 +48,7 @@ void func_8038A8F8(Actor *this){
|
||||
if( !mapSpecificFlags_get(SM_SPECIFIC_FLAG_2)
|
||||
|| (mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && !mapSpecificFlags_get(SM_SPECIFIC_FLAG_F))
|
||||
){ //L8038AA54
|
||||
this->yaw_ideal = ml_distance_vec3f(this->velocity, this->unk1C) / 150.0;
|
||||
this->yaw_ideal = ml_vec3f_distance(this->velocity, this->unk1C) / 150.0;
|
||||
func_8028F3D8(this->unk1C, this->yaw_ideal, func_8038A8C0, this->marker);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_10, TRUE);
|
||||
}
|
||||
|
@@ -11,15 +11,15 @@ extern s32 D_80275650;
|
||||
|
||||
extern ActorInfo D_8038AB00;
|
||||
extern ActorInfo D_8038ABF0;
|
||||
extern ActorInfo D_8038AC20; //chAttackTutorial
|
||||
extern ActorInfo D_8038AC78; //chCarrot Slave?
|
||||
extern ActorInfo D_8038ACE8; //ch onion A
|
||||
extern ActorInfo D_8038AD58; //ch cauliflower A
|
||||
extern ActorInfo D_8038AC9C; //chCarrot FreeRange?
|
||||
extern ActorInfo D_8038AD0C; //ch onion B
|
||||
extern ActorInfo D_8038AD7C; //ch cauliflower B
|
||||
extern ActorInfo chBottles; //chSmMole bottles
|
||||
extern ActorInfo D_8038B0B0; //chJumpTutorial code_4070
|
||||
extern ActorInfo gChAttackTutorial;
|
||||
extern ActorInfo gChVegetablesTopperA;
|
||||
extern ActorInfo gChVegetablesBawlA;
|
||||
extern ActorInfo gChVegetablesCollywobbleA;
|
||||
extern ActorInfo gChVegetablesTopperB;
|
||||
extern ActorInfo gChVegetablesBawlB;
|
||||
extern ActorInfo gChVegetablesCollywobbleB;
|
||||
extern ActorInfo gChBottles;
|
||||
extern ActorInfo gChJumpTutorial;
|
||||
extern ActorInfo D_8038B0E0;
|
||||
extern ActorInfo D_8038B008; //chBanjosBed
|
||||
extern ActorInfo D_8038B044; //chBanjosChair
|
||||
@@ -142,15 +142,15 @@ void SM_func_80386810(void)
|
||||
{
|
||||
spawnableActorList_add(&D_8038AB00, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038ABF0, actor_new, ACTOR_FLAG_UNKNOWN_7);
|
||||
spawnableActorList_add(&D_8038AC20, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038AC78, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038ACE8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD58, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AC9C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD0C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD7C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&chBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
||||
spawnableActorList_add(&D_8038B0B0, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&gChAttackTutorial, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&gChVegetablesTopperA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesBawlA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesCollywobbleA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesTopperB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesBawlB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesCollywobbleB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
||||
spawnableActorList_add(&gChJumpTutorial, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038B0E0, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038B008, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
|
||||
spawnableActorList_add(&D_8038B044, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
|
||||
|
@@ -37,10 +37,10 @@ ActorAnimationInfo gChBlubberAnimations[6] = {
|
||||
{ASSET_B8_ANIM_BLUBBER_RUN, 0.8f}
|
||||
};
|
||||
|
||||
ActorInfo gChBlubber = {
|
||||
ActorInfo gChBlubber = {
|
||||
MARKER_A3_BLUBBER, ACTOR_115_BLUBBER, ASSET_370_MODEL_BLUBBER,
|
||||
0x1, gChBlubberAnimations,
|
||||
__chBlubber_updateFunc, __chBlubber_update2Func, __chBlubber_drawFunc,
|
||||
0x1, gChBlubberAnimations,
|
||||
__chBlubber_updateFunc, __chBlubber_update2Func, __chBlubber_drawFunc,
|
||||
0, 0x399, 1.8f, 0
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ static void __chBlubber_showTextCallback(ActorMarker *caller, enum asset_e text_
|
||||
Actor *this = marker_getActor(caller);
|
||||
ActorLocal_Blubber *local = (ActorLocal_Blubber*)&this->local;
|
||||
|
||||
if(text_id == ASSET_A0D_TEXT_BLUBBER_COMPLETE || text_id == ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED){
|
||||
if(text_id == ASSET_A0D_DIALOG_BLUBBER_COMPLETE || text_id == ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED){
|
||||
local->unk24 = 0;
|
||||
}
|
||||
else{
|
||||
@@ -89,7 +89,7 @@ static void __chBlubber_showJiggySpawnedText(ActorMarker *marker){
|
||||
this->actor_specific_1_f = 0.0f;
|
||||
|
||||
if(!mapSpecificFlags_get(TTC_SPECIFIC_FLAG_2_BLUBBER_JIGGY_SPAWNED_TEXT_SHOWN)) {
|
||||
text_id = jiggyscore_isCollected(JIGGY_14_TTC_BLUBBER) ? ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED : ASSET_A0D_TEXT_BLUBBER_COMPLETE;
|
||||
text_id = jiggyscore_isCollected(JIGGY_14_TTC_BLUBBER) ? ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED : ASSET_A0D_DIALOG_BLUBBER_COMPLETE;
|
||||
gcdialog_showText(text_id, 0xf, this->position, this->marker, __chBlubber_showTextCallback, __chBlubber_showTextCallback2);
|
||||
mapSpecificFlags_set(TTC_SPECIFIC_FLAG_2_BLUBBER_JIGGY_SPAWNED_TEXT_SHOWN, TRUE);
|
||||
}
|
||||
@@ -157,16 +157,16 @@ static void __chBlubber_updateFunc(Actor *this){
|
||||
&& !this->has_met_before
|
||||
&& item_getCount(ITEM_18_GOLD_BULLIONS) == 0
|
||||
){
|
||||
gcdialog_showText(ASSET_A0B_TEXT_BLUBBER_FIRST_MEET, 0xe, this->position, this->marker, __chBlubber_showTextCallback, NULL);
|
||||
gcdialog_showText(ASSET_A0B_DIALOG_BLUBBER_FIRST_MEET, 0xe, this->position, this->marker, __chBlubber_showTextCallback, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
subaddie_set_state_forward(this, CH_BLUBBER_STATE_3_UNKNOWN);
|
||||
}
|
||||
|
||||
if( mapSpecificFlags_get(TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN)
|
||||
if( mapSpecificFlags_get(TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN)
|
||||
&& !this->unk138_23
|
||||
){
|
||||
if (item_getCount(ITEM_18_GOLD_BULLIONS) == 0) {
|
||||
gcdialog_showText(ASSET_A0C_TEXT_BLUBBER_HALF_GOLD, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A0C_DIALOG_BLUBBER_HALF_GOLD, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
this->unk138_23 = TRUE;
|
||||
@@ -214,7 +214,7 @@ static void __chBlubber_updateFunc(Actor *this){
|
||||
__chBlubber_checkJiggySpawnedTextAndAdvanceState(this);
|
||||
break;
|
||||
|
||||
case CH_BLUBBER_STATE_3_UNKNOWN:
|
||||
case CH_BLUBBER_STATE_3_UNKNOWN:
|
||||
break;
|
||||
|
||||
case CH_BLUBBER_STATE_4_UNKNOWN:
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include "variables.h"
|
||||
|
||||
extern Actor *spawnQueue_bundle_f32(s32, s32, s32, s32);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
extern ActorProp * func_80320EB0(ActorMarker *, f32, s32);
|
||||
|
||||
static void __chClam_updateFunc(Actor *this);
|
||||
@@ -245,7 +244,7 @@ static void __chClam_attackOther(ActorMarker *this_marker, ActorMarker *other_ma
|
||||
|
||||
if(func_80297C6C() == 3) return;
|
||||
|
||||
if( !mapSpecificFlags_get(TTC_SPECIFIC_FLAG_5_CLAM_FIRST_MEET_TEXT_SHOWN) && gcdialog_showText(ASSET_A14_TEXT_CLAM_TAUNT, 0, NULL, NULL, NULL, NULL)){
|
||||
if( !mapSpecificFlags_get(TTC_SPECIFIC_FLAG_5_CLAM_FIRST_MEET_TEXT_SHOWN) && gcdialog_showText(ASSET_A14_DIALOG_CLAM_TAUNT, 0, NULL, NULL, NULL, NULL)){
|
||||
mapSpecificFlags_set(TTC_SPECIFIC_FLAG_5_CLAM_FIRST_MEET_TEXT_SHOWN, TRUE);
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ static void __chLeaky_updateFunc(Actor *this) {
|
||||
&& !this->has_met_before
|
||||
&& func_80329530(this, 250) && !func_80329530(this, 160)
|
||||
&& !func_8028ECAC()
|
||||
&& gcdialog_showText(ASSET_A1A_TEXT_LEAKY_FIRST_MEET, 0, NULL, NULL, NULL, NULL)
|
||||
&& gcdialog_showText(ASSET_A1A_DIALOG_LEAKY_FIRST_MEET, 0, NULL, NULL, NULL, NULL)
|
||||
){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
@@ -118,6 +118,6 @@ bool chLeaky_eggCollision(ActorMarker *marker){
|
||||
|
||||
levelSpecificFlags_set(2, TRUE);
|
||||
levelSpecificFlags_set(5, TRUE);
|
||||
gcdialog_showText(ASSET_A28_TEXT_LEAKY_DONE, 0x2a, this->position, this->marker, __chLeaky_showDoneText, NULL);
|
||||
gcdialog_showText(ASSET_A28_DIALOG_LEAKY_DONE, 0x2a, this->position, this->marker, __chLeaky_showDoneText, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ static void __chLockup_updateFunc(Actor *this){
|
||||
&& func_80329530(this, 320)
|
||||
&& !func_80329530(this, 160)
|
||||
&& !func_8028ECAC()
|
||||
&& gcdialog_showText(ASSET_A15_TEXT_TTC_LOCKUP_SPAWNED, 0, NULL, NULL, NULL, NULL)
|
||||
&& gcdialog_showText(ASSET_A15_DIALOG_TTC_LOCKUP_SPAWNED, 0, NULL, NULL, NULL, NULL)
|
||||
){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
|
@@ -156,7 +156,7 @@ static void __chNipper_dieFunc(ActorMarker *this_marker, ActorMarker *other_mark
|
||||
|
||||
__chNipper_playDeathAnimation(this);
|
||||
this->lifetime_value = 80.0f;
|
||||
gcdialog_showText(ASSET_A10_TEXT_TTC_NIPPER_HURT, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A10_DIALOG_TTC_NIPPER_HURT, 4, NULL, NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -213,13 +213,13 @@ static void __chNipper_updateFunc(Actor *this){
|
||||
if(0.0f == this->velocity_x && xVelocity){
|
||||
comusic_8025AB44(COMUSIC_12_TTC_NIPPER, -1, 5000);
|
||||
func_8032BB88(this, 0, 4000);
|
||||
func_8024BD08(0);
|
||||
core1_ce60_incOrDecCounter(FALSE);
|
||||
}
|
||||
else if(!xVelocity && 0.0f != this->velocity_x){
|
||||
comusic_8025AB44(COMUSIC_12_TTC_NIPPER, 0, 300);
|
||||
func_8025AABC(COMUSIC_12_TTC_NIPPER);
|
||||
func_8032BB88(this, -1, 300);
|
||||
func_8024BD08(1);
|
||||
core1_ce60_incOrDecCounter(TRUE);
|
||||
}
|
||||
this->velocity_x = xVelocity;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ static void __chNipper_updateFunc(Actor *this){
|
||||
&& temp_v0 != 10
|
||||
){
|
||||
subaddie_set_state_with_direction(this, CH_NIPPER_STATE_5_SPAWNED, 0.01f, 1);
|
||||
if(gcdialog_showText(ASSET_A0E_TEXT_NIPPER_SPAWNED, 0xf, this->position, this->marker, __chNipper_spawnedShowTextCallback, NULL)){
|
||||
if(gcdialog_showText(ASSET_A0E_DIALOG_NIPPER_SPAWNED, 0xf, this->position, this->marker, __chNipper_spawnedShowTextCallback, NULL)){
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
comusic_8025AB44(COMUSIC_12_TTC_NIPPER, 5000, 300);
|
||||
|
@@ -116,10 +116,10 @@ static void __chTreasurehunt_spawnActorForNextStep(void) {
|
||||
static void __chTreasurehunt_checkStepProgress(s32 currentStep){
|
||||
if(CH_TREASUREHUNT_PUZZLE_CURRENT_STEP == currentStep && __chTreasurehunt_isActiveHitboxBeakBusterHitbox()){
|
||||
if(currentStep == 0 && !jiggyscore_isCollected(JIGGY_11_TTC_RED_X)){
|
||||
gcdialog_showText(ASSET_A18_TEXT_TREASUREHUNT_FOLLOW_CLUES, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A18_DIALOG_TREASUREHUNT_FOLLOW_CLUES, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else if(currentStep == 4){
|
||||
gcdialog_showText(ASSET_A19_TEXT_TREASUREHUNT_SECOND_STEP, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A19_DIALOG_TREASUREHUNT_SECOND_STEP, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
CH_TREASUREHUNT_PUZZLE_CURRENT_STEP++;
|
||||
@@ -170,7 +170,7 @@ void chTreasurehunt_checkStepProgress5(s16 arg0[3], s32 arg1){
|
||||
gcpausemenu_80314AC8(0);
|
||||
timedFunc_set_2(0.1f, (GenFunction_2) func_8028F45C, 9, (s32)&particleTargetPosition);
|
||||
timedFunc_set_1(0.1f, (GenFunction_1) gcpausemenu_80314AC8, 1);
|
||||
gcdialog_showText(ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_A17_DIALOG_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL);
|
||||
CH_TREASUREHUNT_PUZZLE_CURRENT_STEP++;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "prop.h"
|
||||
#include "SnS.h"
|
||||
#include "actor.h"
|
||||
|
||||
extern ActorInfo gChClam;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "SnS.h"
|
||||
|
||||
/* extern */
|
||||
extern void func_802D6310(f32, enum map_e, s32, s32, enum file_progress_e);
|
||||
@@ -501,13 +501,11 @@ static void __code3E30_resetCheatCodeProgress(void)
|
||||
__code3E30_resetSecretCheatCodeProgress();
|
||||
}
|
||||
|
||||
void code3E30_overlayRelease(void)
|
||||
{
|
||||
if (sMapState.model1)
|
||||
{
|
||||
void code3E30_overlayRelease(void) {
|
||||
if (sMapState.model1) {
|
||||
__code3E30_setupCheatCodeTimer(0);
|
||||
func_8030DA44(sMapState.doorOpeningSfxSourceIdx);
|
||||
func_8030DA44(sMapState.dullCannonShotSfxSourceId);
|
||||
sfxsource_freeSfxsourceByIndex(sMapState.doorOpeningSfxSourceIdx);
|
||||
sfxsource_freeSfxsourceByIndex(sMapState.dullCannonShotSfxSourceId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
@@ -6,10 +7,6 @@
|
||||
|
||||
#define MAIN_THREAD_STACK_SIZE 0x17F0
|
||||
|
||||
|
||||
void setBootMap(enum map_e);
|
||||
void func_8023DFF0(s32);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
extern s32 D_80000300;
|
||||
#endif
|
||||
@@ -17,10 +14,7 @@ void func_8023DFF0(s32);
|
||||
s32 D_80275610 = 0;
|
||||
s32 D_80275614 = 0;
|
||||
u32 gGlobalTimer = 0;
|
||||
u32 sDebugVar_8027561C[] = { // never used
|
||||
0x9, 0x4, 0xA, 0x3, 0xB, 0x2, 0xC, 0x5, 0x0,
|
||||
0x1, 0x6, 0xD, -1
|
||||
};
|
||||
u32 sDebugVar_8027561C[] = { 0x9, 0x4, 0xA, 0x3, 0xB, 0x2, 0xC, 0x5, 0x0, 0x1, 0x6, 0xD, -1 }; // never used
|
||||
u32 D_80275650 = VER_SELECT(0xAD019D3C, 0xA371A8F3, 0, 0); //SM_DATA_CRC_1
|
||||
u32 D_80275654 = VER_SELECT(0xD381B72F, 0xD0709154, 0, 0); //SM_DATA_CRC_2
|
||||
char sDebugVar_80275658[] = VER_SELECT("HjunkDire:218755", "HjunkDire:300875", "HjunkDire:", "HjunkDire:");
|
||||
@@ -33,13 +27,11 @@ u64 sDebugVar_8027A540; // never used
|
||||
u8 sMainThreadStack[MAIN_THREAD_STACK_SIZE]; // The real size of the stack is unclear yet, maybe there are some out-optimized debug variables below the stack
|
||||
OSThread sMainThread;
|
||||
s32 gBootMap;
|
||||
s32 gDisableInput;
|
||||
u64 sDebugVar_8027BEF0; // never used
|
||||
static bool sDisableInput;
|
||||
static u64 sDebugVar_8027BEF0; // never used
|
||||
|
||||
extern u8 core2_TEXT_START[];
|
||||
|
||||
extern u16 D_803A5D00[2][0x1ECC0/2];
|
||||
|
||||
void func_8023DA20(s32 arg0){
|
||||
bzero(&D_8027A130, core2_TEXT_START - (u8*)&D_8027A130);
|
||||
osWriteBackDCacheAll();
|
||||
@@ -55,7 +47,7 @@ void func_8023DA74(void){
|
||||
|
||||
void func_8023DA9C(s32 arg0){
|
||||
func_80254008();
|
||||
func_8024C428();
|
||||
viMgr_clearFramebuffers();
|
||||
if (D_8027A130 == 4){
|
||||
func_802E3580();
|
||||
}
|
||||
@@ -70,7 +62,7 @@ void func_8023DA9C(s32 arg0){
|
||||
if (D_8027A130 == 4){
|
||||
dummy_func_802E35D0();
|
||||
}
|
||||
dummy_func_80255CD8();
|
||||
ucode_stub1();
|
||||
}
|
||||
|
||||
u32 globalTimer_getTimeMasked(u32 mask){
|
||||
@@ -107,10 +99,10 @@ void core1_init(void) {
|
||||
#if VERSION == VERSION_PAL
|
||||
osTvType = 0;
|
||||
#endif
|
||||
func_80255C30();
|
||||
ucode_load();
|
||||
setBootMap(getDefaultBootMap());
|
||||
rarezip_init(); //initialize decompressor's huft table
|
||||
func_8024BE30();
|
||||
viMgr_init();
|
||||
overlayManagerloadCore2();
|
||||
sDebugVar_8027BEF0 = sDebugVar_8027A538;
|
||||
heap_init();
|
||||
@@ -151,14 +143,14 @@ void mainLoop(void){
|
||||
if(D_8027A130 != 3 || getGameMode() != GAME_MODE_4_PAUSED)
|
||||
globalTimer_incTimer();
|
||||
|
||||
if(!gDisableInput)
|
||||
if (!sDisableInput)
|
||||
pfsManager_update();
|
||||
gDisableInput = 0;
|
||||
sDisableInput = FALSE;
|
||||
|
||||
rumbleManager_80250C08();
|
||||
|
||||
if(!mapSpecificFlags_validateCRC1()){
|
||||
write_file_blocks(0, 0, 0x80397AD0, 0x40);
|
||||
eeprom_writeBlocks(0, 0, 0x80397AD0, 0x40);
|
||||
}
|
||||
|
||||
switch(D_8027A130){
|
||||
@@ -185,7 +177,7 @@ void mainLoop(void){
|
||||
){
|
||||
s32 offset;
|
||||
//render weird CRC failure image
|
||||
for(y= 0x1e; y < framebuffer_height - 0x1e; y++){//L8023DEB4
|
||||
for(y= 0x1e; y < gFramebufferHeight - 0x1e; y++){//L8023DEB4
|
||||
for(x = 0x14; x < 0xeb; x++){
|
||||
tmp = ((8 * globalTimer_getTime()) + ((x*x) + (y*y)));
|
||||
|
||||
@@ -196,9 +188,9 @@ void mainLoop(void){
|
||||
|
||||
rgba = b | r | g | a;
|
||||
|
||||
offset = ((framebuffer_width - 0xFF) / 2) + x + (y*framebuffer_width);
|
||||
D_803A5D00[0][offset] = (s32) rgba;
|
||||
D_803A5D00[1][offset] = (s32) rgba;
|
||||
offset = ((gFramebufferWidth - 0xFF) / 2) + x + (y*gFramebufferWidth);
|
||||
gFramebuffers[0][offset] = (s32) rgba;
|
||||
gFramebuffers[1][offset] = (s32) rgba;
|
||||
}
|
||||
}
|
||||
}//L8023DF70
|
||||
@@ -234,5 +226,5 @@ OSThread *mainThread_get(void) {
|
||||
}
|
||||
|
||||
void disableInput_set(void){
|
||||
gDisableInput = 1;
|
||||
sDisableInput = TRUE;
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
@@ -23,7 +24,6 @@ u8 func_8025F4A0(ALCSPlayer *, u8);
|
||||
|
||||
void func_8025F3F0(ALCSPlayer *, f32, f32);
|
||||
u16 func_80250474(s32 arg0);
|
||||
void func_8024AF48(void);
|
||||
void func_8024FB8C(void);
|
||||
|
||||
/* .data */
|
||||
@@ -602,7 +602,7 @@ u16 func_80250474(s32 arg0){
|
||||
D_80282110[i].unk10 = -1.0f;
|
||||
}
|
||||
osSetIntMask(sp1C);
|
||||
func_8024AF48();
|
||||
core1_ce60_func_8024AF48();
|
||||
if(D_802762C0 == -1){
|
||||
D_802762C0 = 0xFFFF;
|
||||
}
|
||||
|
@@ -1,21 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8025108C(s32 arg0);
|
||||
|
||||
/* .bss */
|
||||
s32 D_802827F0;
|
||||
|
||||
/* .code */
|
||||
s32 func_80251060(void){
|
||||
return D_802827F0;
|
||||
}
|
||||
|
||||
void func_8025106C(void){
|
||||
func_8025108C(0);
|
||||
}
|
||||
|
||||
void func_8025108C(s32 arg0){
|
||||
D_802827F0 = arg0;
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
u32 func_802510A0(BKSprite *this){
|
||||
return this->unk8;
|
||||
}
|
||||
|
||||
u32 func_802510A8(BKSprite *this){
|
||||
return this->unkA;
|
||||
}
|
||||
|
||||
u32 func_802510B0(BKSprite *this){
|
||||
return this->unk6;
|
||||
}
|
||||
|
||||
u32 func_802510B8(BKSprite *this){
|
||||
return this->unk4;
|
||||
}
|
||||
|
||||
s32 spriteGetFrameCount(BKSprite *this){
|
||||
return this->frameCnt;
|
||||
}
|
||||
|
||||
BKSpriteFrame *spriteGetFramePtr(BKSprite *this, u32 frame)
|
||||
{
|
||||
BKSpriteFrame * new_var;
|
||||
new_var = this->offsets[frame] + ((s32) ((*this).offsets + this->frameCnt));
|
||||
return new_var;
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
struct {
|
||||
u16 *data;
|
||||
int unk4;
|
||||
} gzBuffer;
|
||||
|
||||
extern u8 D_8000E800;
|
||||
extern u16 D_803A5D00[2][0xF660];
|
||||
|
||||
void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer);
|
||||
|
||||
void func_80253190(Gfx **gdl){
|
||||
func_80253208(gdl, 0, 0, framebuffer_width, framebuffer_height, D_803A5D00[getActiveFramebuffer()]);
|
||||
}
|
||||
|
||||
void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer){
|
||||
if( gzBuffer.data != NULL && (getGameMode() != GAME_MODE_4_PAUSED || func_80335134())){
|
||||
//draw z_buffer
|
||||
gDPPipeSync((*gdl)++);
|
||||
gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(gzBuffer.data));
|
||||
gDPSetCycleType((*gdl)++, G_CYC_FILL);
|
||||
gDPSetRenderMode((*gdl)++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor((*gdl)++, 0xFFFCFFFC);
|
||||
gDPScisFillRectangle((*gdl)++, x, y, x + w - 1, y + h - 1);
|
||||
|
||||
//draw color_buffer
|
||||
gDPPipeSync((*gdl)++);
|
||||
gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(color_buffer));
|
||||
}
|
||||
}
|
||||
|
||||
int func_80253400(void){
|
||||
return gzBuffer.unk4;
|
||||
}
|
||||
|
||||
int func_8025340C(void){
|
||||
return gzBuffer.data != NULL;
|
||||
}
|
||||
|
||||
void dummy_func_80253420(void){}
|
||||
|
||||
void func_80253428(int arg0) {
|
||||
u16 *var_v0;
|
||||
int new_var;
|
||||
if (arg0) {
|
||||
var_v0 = (gzBuffer.data = &D_8000E800);
|
||||
while (((s32) gzBuffer.data) % 0x40) {\
|
||||
var_v0 = (gzBuffer.data = var_v0 + 1);
|
||||
}
|
||||
|
||||
do { } while ((&D_8000E800 && 1) * 0); //remove this
|
||||
}else{
|
||||
gzBuffer.data = 0;
|
||||
}
|
||||
gzBuffer.unk4 = 0;
|
||||
}
|
||||
|
||||
void func_802534A8(int arg0){
|
||||
gzBuffer.unk4 = (gzBuffer.data != NULL && arg0);
|
||||
}
|
||||
|
||||
void zBuffer_set(Gfx **gdl){
|
||||
if(gzBuffer.data && getGameMode() != GAME_MODE_4_PAUSED){
|
||||
gDPPipeSync((*gdl)++);
|
||||
gDPSetDepthImage((*gdl)++, gzBuffer.data);
|
||||
}
|
||||
}
|
||||
|
||||
void *zBuffer_get(void){
|
||||
return gzBuffer.data;
|
||||
}
|
@@ -1,29 +1,13 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core1/core1.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
static Gfx *sGfxStack[2] = { NULL, NULL };
|
||||
s32 gFramebufferWidth = DEFAULT_FRAMEBUFFER_WIDTH;
|
||||
s32 gFramebufferHeight = DEFAULT_FRAMEBUFFER_HEIGHT;
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
Gfx *unk8;
|
||||
Gfx *unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
}Struct_Core1_15B30;
|
||||
|
||||
extern u8 D_803A5D00[2][0x1ecc0];
|
||||
|
||||
/* .data */
|
||||
Gfx *gGfxStack[2] = {NULL, NULL};
|
||||
s32 framebuffer_width = 292;
|
||||
s32 framebuffer_height = 216;
|
||||
|
||||
/* .bss */
|
||||
Mtx *gMtxStack[2];
|
||||
Vtx *gVtxStack[2];
|
||||
s32 gStackSelector;
|
||||
static Mtx *sMtxStack[2];
|
||||
static Vtx *sVtxStack[2];
|
||||
static s32 sStackSelector;
|
||||
s32 gTextureFilterPoint;
|
||||
Struct_Core1_15B30 D_80283008[20];
|
||||
s32 D_802831E8;
|
||||
@@ -35,11 +19,6 @@ u16 gScissorBoxTop;
|
||||
u16 gScissorBoxBottom;
|
||||
Gfx *D_80283214;
|
||||
|
||||
/* .h */
|
||||
void scissorBox_setDefault(void);
|
||||
void dummy_func_80254464(void);
|
||||
|
||||
/* .code */
|
||||
void func_80253550(void){
|
||||
osRecvMesg(&D_802831F0, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
@@ -74,8 +53,8 @@ void func_80253640(Gfx ** gdl, void *arg1){
|
||||
gDPSetAlphaCompare((*gdl)++, G_AC_NONE);
|
||||
gDPSetColorDither((*gdl)++, G_CD_MAGICSQ);
|
||||
gDPSetScissor((*gdl)++, G_SC_NON_INTERLACE, gScissorBoxLeft, gScissorBoxRight, gScissorBoxTop, gScissorBoxBottom);
|
||||
func_80253208(gdl, 0, 0, framebuffer_width, framebuffer_height, arg1);
|
||||
gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(arg1));
|
||||
func_80253208(gdl, 0, 0, gFramebufferWidth, gFramebufferHeight, arg1);
|
||||
gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, OS_K0_TO_PHYSICAL(arg1));
|
||||
gDPSetCycleType((*gdl)++, G_CYC_1CYCLE);
|
||||
gDPSetTextureConvert((*gdl)++, G_TC_FILT);
|
||||
gDPSetTextureDetail((*gdl)++, G_TD_CLAMP);
|
||||
@@ -98,13 +77,13 @@ void scissorBox_SetForGameMode(Gfx **gdl, s32 framebuffer_idx) {
|
||||
}
|
||||
else{
|
||||
scissorBox_setDefault();
|
||||
func_80253640(gdl, D_803A5D00[framebuffer_idx]);
|
||||
func_80253640(gdl, gFramebuffers[framebuffer_idx]);
|
||||
}
|
||||
}
|
||||
|
||||
void setupScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_address){
|
||||
gSPSegment((*gfx)++, 0x00, 0x00000000);
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(framebuffer_address));
|
||||
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gFramebufferWidth, OS_PHYSICAL_TO_K0(framebuffer_address));
|
||||
gSPClearGeometryMode((*gfx)++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
||||
gSPTexture((*gfx)++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
||||
gSPSetGeometryMode((*gfx)++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
@@ -121,7 +100,7 @@ void setupScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_address){
|
||||
|
||||
void setupDefaultScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_idx){
|
||||
scissorBox_setDefault();
|
||||
setupScissorBoxAndFramebuffer(gfx, D_803A5D00[framebuffer_idx]);
|
||||
setupScissorBoxAndFramebuffer(gfx, gFramebuffers[framebuffer_idx]);
|
||||
}
|
||||
|
||||
void func_80253DC0(Gfx **gfx){
|
||||
@@ -184,7 +163,7 @@ void scissorBox_get(u32 *left, u32 *top, u32 *right, u32 *bottom){
|
||||
}
|
||||
|
||||
void func_80253FE8(void){
|
||||
func_8024BFAC();
|
||||
viMgr_func_8024BFAC();
|
||||
}
|
||||
|
||||
void func_80254008(void){
|
||||
@@ -208,29 +187,29 @@ void drawRectangle2D(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b)
|
||||
gDPScisFillRectangle((*gfx)++, x, y, x + w -1, y + h -1);
|
||||
}
|
||||
|
||||
void graphicsCache_release(void){
|
||||
if(gGfxStack[0]){
|
||||
free(gGfxStack[0]);
|
||||
free(gGfxStack[1]);
|
||||
free(gMtxStack[0]);
|
||||
free(gMtxStack[1]);
|
||||
free(gVtxStack[0]);
|
||||
free(gVtxStack[1]);
|
||||
gGfxStack[0] = NULL;
|
||||
void graphicsCache_release(void) {
|
||||
if (sGfxStack[0]) {
|
||||
free(sGfxStack[0]);
|
||||
free(sGfxStack[1]);
|
||||
free(sMtxStack[0]);
|
||||
free(sMtxStack[1]);
|
||||
free(sVtxStack[0]);
|
||||
free(sVtxStack[1]);
|
||||
sGfxStack[0] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void graphicsCache_init(void){
|
||||
if(gGfxStack[0] == NULL){
|
||||
gGfxStack[0] = (Gfx *)malloc(29600); // 3700 dlist commands
|
||||
gGfxStack[1] = (Gfx *)malloc(29600);
|
||||
gMtxStack[0] = (Mtx *)malloc(44800); // 700 matrices
|
||||
gMtxStack[1] = (Mtx *)malloc(44800);
|
||||
gVtxStack[0] = (Vtx *)malloc(6880); // 430 vertices
|
||||
gVtxStack[1] = (Vtx *)malloc(6880);
|
||||
if(sGfxStack[0] == NULL){
|
||||
sGfxStack[0] = (Gfx *)malloc(29600); // 3700 dlist commands
|
||||
sGfxStack[1] = (Gfx *)malloc(29600);
|
||||
sMtxStack[0] = (Mtx *)malloc(44800); // 700 matrices
|
||||
sMtxStack[1] = (Mtx *)malloc(44800);
|
||||
sVtxStack[0] = (Vtx *)malloc(6880); // 430 vertices
|
||||
sVtxStack[1] = (Vtx *)malloc(6880);
|
||||
dummy_func_80254464();
|
||||
}
|
||||
gStackSelector = 0;
|
||||
sStackSelector = 0;
|
||||
gTextureFilterPoint = 0;
|
||||
}
|
||||
|
||||
@@ -239,8 +218,8 @@ void scissorBox_set(s32 left, s32 top, s32 right, s32 bottom) {
|
||||
gScissorBoxTop = top;
|
||||
gScissorBoxRight = right;
|
||||
gScissorBoxBottom = bottom;
|
||||
framebuffer_width = top - left;
|
||||
framebuffer_height = bottom - right;
|
||||
gFramebufferWidth = top - left;
|
||||
gFramebufferHeight = bottom - right;
|
||||
viewport_pushFramebufferExtendsToVpStack();
|
||||
}
|
||||
|
||||
@@ -253,7 +232,7 @@ void func_80254374(s32 arg0) {
|
||||
Struct_Core1_15B30 *sp1C;
|
||||
|
||||
func_80253550();
|
||||
func_8024C2A0(arg0);
|
||||
viMgr_setActiveFramebuffer(arg0);
|
||||
sp1C = &D_80283008[D_802831E8];
|
||||
D_802831E8 = (s32) (D_802831E8 + 1) % 20;
|
||||
func_8025357C();
|
||||
@@ -267,10 +246,10 @@ void toggleTextureFilterPoint(void){
|
||||
}
|
||||
|
||||
void getGraphicsStacks(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
gStackSelector = (1 - gStackSelector);
|
||||
*gfx = gGfxStack[gStackSelector];
|
||||
*mtx = gMtxStack[gStackSelector];
|
||||
*vtx = gVtxStack[gStackSelector];
|
||||
sStackSelector = (1 - sStackSelector);
|
||||
*gfx = sGfxStack[sStackSelector];
|
||||
*mtx = sMtxStack[sStackSelector];
|
||||
*vtx = sVtxStack[sStackSelector];
|
||||
}
|
||||
|
||||
void dummy_func_80254464(void){}
|
||||
void dummy_func_80254464(void) {}
|
||||
|
@@ -1,28 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "save.h"
|
||||
|
||||
#define ROUND_UP_DIVIDE(a, b) (((a) + (b) - 1) / (b))
|
||||
// The round up divide is not technically needed, but will come in handy for modding
|
||||
#define gameFile_NUM_BLOCKS ROUND_UP_DIVIDE(sizeof(SaveData),EEPROM_BLOCK_SIZE)
|
||||
|
||||
s32 write_file_blocks(s32 filenum, s32 blockOffset, u8 *buffer, s32 blockCount) {
|
||||
s32 address = (filenum * gameFile_NUM_BLOCKS) + blockOffset;
|
||||
s32 ret;
|
||||
|
||||
func_8024F35C(3);
|
||||
ret = osEepromLongWrite(pfsManager_getFrameReplyQ(), address, buffer, blockCount * EEPROM_BLOCK_SIZE);
|
||||
func_8024F35C(0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 load_file_blocks(s32 filenum, s32 blockOffset, u8 *buffer, s32 blockCount) {
|
||||
s32 address = (filenum * gameFile_NUM_BLOCKS) + blockOffset;
|
||||
s32 ret;
|
||||
|
||||
func_8024F35C(3);
|
||||
ret = osEepromLongRead(pfsManager_getFrameReplyQ(), address, buffer, blockCount * EEPROM_BLOCK_SIZE);
|
||||
func_8024F35C(0);
|
||||
return ret;
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
u8 D_80283280[0x100];
|
||||
s32 D_80283380;
|
||||
s32 D_80283384;
|
||||
s32 D_80283388;
|
||||
|
||||
void func_80255C30(void) {
|
||||
D_80283384 = *(s32 *)0xA4000000 ^ -1;
|
||||
D_80283388 = (D_80283384) ? 1 :0;
|
||||
D_80283380 = *(s32 *)0xA4001000 ^ 6103;
|
||||
D_80283388 |= (D_80283380) ? 2 :0;
|
||||
if (D_80283388 == 0) {
|
||||
piMgr_read(&D_80283280, 0xB0000B70, 0x100);
|
||||
}
|
||||
}
|
||||
|
||||
void dummy_func_80255CD8(void){}
|
||||
|
||||
void func_80255CE0(void){
|
||||
osPiReadIo(0, NULL);
|
||||
}
|
||||
|
||||
s32 func_80255D04(void){return 0;}
|
||||
|
||||
void func_80255D0C(u64 **ucode_ptr, u32 *ucode_size){
|
||||
*ucode_ptr = &D_80283280;
|
||||
*ucode_size = 0x100;
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
|
@@ -1,15 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void dummy_func_8025AFB0(void) {}
|
||||
|
||||
void dummy_func_8025AFB8(void) {}
|
||||
|
||||
void dummy_func_8025AFC0(Gfx **arg0, Mtx **arg1, Vtx **arg2) {}
|
||||
|
||||
s32 dummy_func_8025AFD0(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "SnS.h"
|
||||
#include "save.h"
|
||||
|
||||
bool snsToRestoreItems = FALSE;
|
||||
|
@@ -1,71 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
s32 D_80275860 = 0;
|
||||
|
||||
void func_802409C0(f32 arg0[3], f32 arg1){
|
||||
f32 vp_rotation[3];
|
||||
f32 sp30[3];
|
||||
f32 sp28[2];
|
||||
f32 dt;
|
||||
|
||||
dt = time_getDelta()*arg1;
|
||||
controller_getJoystick(0, sp28);
|
||||
|
||||
sp30[0] = sp28[0] * dt;
|
||||
sp30[1] = 0.0f;
|
||||
sp30[2] = -(sp28[1] * dt);
|
||||
|
||||
viewport_getRotation_vec3f(vp_rotation);
|
||||
ml_vec3f_yaw_rotate_copy(sp30, sp30, vp_rotation[1]);
|
||||
|
||||
arg0[0] = arg0[0] + sp30[0];
|
||||
arg0[1] = arg0[1] + sp30[1];
|
||||
arg0[2] = arg0[2] + sp30[2];
|
||||
}
|
||||
|
||||
void func_80240A74(f32 arg0[3]){
|
||||
func_802409C0(arg0, 400.0f);
|
||||
}
|
||||
|
||||
f32 func_80240A94(s32 arg0, f32 arg1){
|
||||
if(arg0 >= 0x29){
|
||||
arg0 = 0x28;
|
||||
}
|
||||
return arg1 + (f32)arg0*(arg1)/16 ;
|
||||
}
|
||||
|
||||
void func_80240AC8(f32 arg0[3], f32 arg1){
|
||||
f32 vp_rotation[3];
|
||||
f32 sp30[3];
|
||||
f32 sp28[2];
|
||||
f32 dt;
|
||||
|
||||
dt = time_getDelta()*arg1;
|
||||
controller_getJoystick(0, sp28);
|
||||
|
||||
if(0.0f != sp28[0] || 0.0f != sp28[1]){
|
||||
D_80275860++;
|
||||
if(D_80275860 >= 0x12D)
|
||||
D_80275860 = 0x12C;
|
||||
}
|
||||
else{
|
||||
D_80275860 = 1;
|
||||
}
|
||||
|
||||
dt = func_80240A94(D_80275860, dt);
|
||||
sp30[0] = sp28[0] * dt;
|
||||
sp30[1] = 0.0f;
|
||||
sp30[2] = -(sp28[1] * dt);
|
||||
|
||||
viewport_getRotation_vec3f(vp_rotation);
|
||||
ml_vec3f_yaw_rotate_copy(sp30, sp30, vp_rotation[1]);
|
||||
|
||||
arg0[0] = arg0[0] + sp30[0];
|
||||
arg0[1] = arg0[1] + sp30[1];
|
||||
arg0[2] = arg0[2] + sp30[2];
|
||||
}
|
@@ -1,4 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
|
||||
extern f32 gu_sqrtf(f32);
|
||||
|
||||
static void __guMtxF2L(float mf[4][4], Mtx *m)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "n_libaudio.h"
|
||||
|
@@ -1,7 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core1/rarezip.h"
|
||||
#include "core1/core1.h"
|
||||
|
||||
|
||||
static int _rarezip_uncompress(u8 **arg0, u8 **arg1, struct huft * arg2);
|
||||
|
@@ -1,70 +1,62 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void sfxsource_setSampleRate(u8, s32);
|
||||
extern void func_8030E2C4(u8);
|
||||
s16 *D_802758E0 = NULL;
|
||||
|
||||
|
||||
typedef struct struct_27_s{
|
||||
s16 unk0;
|
||||
u8 pad2[0x12];
|
||||
}struct27s;
|
||||
|
||||
s16 * D_802758E0 = NULL;
|
||||
|
||||
void func_80244C78(int arg0);
|
||||
|
||||
/* .code */
|
||||
void func_80244AB0(void){
|
||||
void core1_7090_alloc(void) {
|
||||
int i;
|
||||
if(D_802758E0)
|
||||
|
||||
if (D_802758E0)
|
||||
return;
|
||||
|
||||
D_802758E0 = (struct16s *) malloc(10*sizeof(s16));
|
||||
for(i = 0; i < 10; i++){
|
||||
D_802758E0 = (s16 *) malloc(10 * sizeof(s16));
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
D_802758E0[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80244B3C(void){
|
||||
void core1_7090_release(void) {
|
||||
int i;
|
||||
|
||||
if(!D_802758E0)
|
||||
if (!D_802758E0)
|
||||
return;
|
||||
|
||||
for(i = 0; i < 10; i++){
|
||||
if(D_802758E0[i])
|
||||
func_8030E394((u8)D_802758E0[i]);
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (D_802758E0[i])
|
||||
func_8030E394(D_802758E0[i]);
|
||||
}
|
||||
|
||||
free(D_802758E0);
|
||||
D_802758E0 = NULL;
|
||||
|
||||
}
|
||||
|
||||
void func_80244BB0(s32 arg0, s32 arg1, s32 arg2, f32 arg3){
|
||||
s32 i;
|
||||
u8 indx;
|
||||
if(func_8030ED70(func_80255D44(arg1))){
|
||||
i = sfxsource_createSfxsourceAndReturnIndex();
|
||||
indx = i;
|
||||
if(i){
|
||||
sfxsource_setSfxId(indx, func_80255D44(arg1));
|
||||
sfxsource_playSfxAtVolume(indx, arg3);
|
||||
sfxsource_setSampleRate(indx, arg2);
|
||||
func_8030E2C4(indx);
|
||||
func_80244C78(arg0);
|
||||
D_802758E0[arg0] = indx;
|
||||
void core1_7090_initSfxSource(s32 idx, s32 lookup_idx, s32 sample_rate, f32 volume) {
|
||||
u8 sfx_source_index;
|
||||
|
||||
if (func_8030ED70(lookup_getSfxId(lookup_idx))) {
|
||||
sfx_source_index = sfxsource_createSfxsourceAndReturnIndex();
|
||||
|
||||
if (sfx_source_index) {
|
||||
sfxsource_setSfxId(sfx_source_index, lookup_getSfxId(lookup_idx));
|
||||
sfxsource_playSfxAtVolume(sfx_source_index, volume);
|
||||
sfxsource_setSampleRate(sfx_source_index, sample_rate);
|
||||
func_8030E2C4(sfx_source_index);
|
||||
core1_7090_freeSfxSource(idx);
|
||||
D_802758E0[idx] = sfx_source_index;
|
||||
}
|
||||
}
|
||||
else{
|
||||
func_8030E6A4(func_80255D44(arg1), arg3, arg2);
|
||||
else {
|
||||
func_8030E6A4(lookup_getSfxId(lookup_idx), volume, sample_rate);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80244C78(int arg0){
|
||||
if(D_802758E0[arg0]){
|
||||
func_8030DA44(D_802758E0[arg0]);
|
||||
void core1_7090_freeSfxSource(int idx) {
|
||||
if (D_802758E0[idx]) {
|
||||
sfxsource_freeSfxsourceByIndex(D_802758E0[idx]);
|
||||
}
|
||||
D_802758E0[arg0] = 0;
|
||||
|
||||
D_802758E0[idx] = 0;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user