document the rest of ttc

This commit is contained in:
Bl00D4NGEL
2024-10-10 22:33:07 +02:00
parent 230aa57fb1
commit f8b724f598
10 changed files with 49 additions and 42 deletions

View File

@@ -382,7 +382,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){
func_8031D04C(0x21, 1);
func_8031D04C(MAP_21_CC_WITCH_SWITCH_ROOM, 1);
}
}//L80389260

View File

@@ -137,7 +137,7 @@ void func_803870F8(Actor *this){
sp3C[1] = this->position_y + 100;
sp3C[2] = this->position_z;
if(ml_distance_vec3f(&sp3C, &sp70) < 120.0f){
func_8031D04C(0x22, (local->unk0 == 1)? 7 : 6);
func_8031D04C(MAP_22_CC_INSIDE_CLANKER, (local->unk0 == 1)? 7 : 6);
}
}//L80387500
}

View File

@@ -70,7 +70,7 @@ static void __chLockup_close(Actor *this){
}
static void __chLockup_open(Actor *this){
func_80389468();
code3040_func_80389468();
subaddie_set_state_with_direction(this, CH_LOCKUP_STATE_OPENING, 0.2f, 1);
this->unk38_31 = 1;
FUNC_8030E8B4(SFX_6B_LOCKUP_OPENING, 1.0f, 32000, this->position, 1250, 2500);

View File

@@ -25,11 +25,12 @@ extern ActorInfo gChTreasurehuntRedQuestionMark;
extern ActorInfo gChTreasurehuntRedX;
extern ActorInfo gChTreasure;
void code26D0_genericUpdateFunc(Actor *this);
void code26D0_palmTreeUpdateFunc(Actor *this);
void code26D0_lighthouseAUpdateFunc(Actor *this);
void func_802D3D54(Actor *this);
void code26D0_sharkfoodIslandUpdateFunc(Actor *this);
extern void func_802D3D54(Actor *this);
static void __code26D0_genericUpdateFunc(Actor *this);
static void __code26D0_palmTreeUpdateFunc(Actor *this);
static void __code26D0_lighthouseAUpdateFunc(Actor *this);
static void __code26D0_sharkfoodIslandUpdateFunc(Actor *this);
/* .data */
ActorInfo gBlubberShipTopHatch = {
@@ -49,47 +50,47 @@ ActorInfo gLighthouseDoor = {
ActorInfo gSharkfoodIsland = {
MARKER_167_SHARKFOOD_ISLAND, ACTOR_25C_SHARKFOOD_ISLAND, ASSET_50A_MODEL_SHARKFOOD_ISLAND,
0x1, NULL,
code26D0_sharkfoodIslandUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_sharkfoodIslandUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
ActorInfo gLighthouseA = {
MARKER_267_LIGHTHOUSE_A, ACTOR_2E2_LIGHTHOUSE_A, ASSET_3BD_MODEL_LIGHTHOUSE_A,
0x1, NULL,
code26D0_lighthouseAUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_lighthouseAUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
ActorInfo gLighthouseB = {
MARKER_26A_LIGHTHOUSE_B, ACTOR_2DF_LIGHTHOUSE_B, ASSET_3BE_MODEL_LIGHTHOUSE_B,
0x1, NULL,
code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
ActorInfo gStairs1 = {
MARKER_268_STAIRS_1, ACTOR_2E0_TTC_STAIRS_1, ASSET_3B6_MODEL_TTC_STAIRS_1,
0x1, NULL,
code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
ActorInfo gStairs2 = {
MARKER_269_STAIRS_2, ACTOR_2E1_TTC_STAIRS_2, ASSET_3B7_MODEL_TTC_STAIRS_1,
0x1, NULL,
code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_genericUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
ActorInfo gPalmTree = {
MARKER_1D5_PALM_TREE, ACTOR_31E_PALM_TREE, ASSET_3A9_MODEL_PALM_TREE,
0x1, NULL,
code26D0_palmTreeUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
__code26D0_palmTreeUpdateFunc, actor_update_func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
/* .code */
void TTC_resetSpawnableActors(void)
void code26D0_resetSpawnableActorsForTTC(void)
{
spawnableActorList_add(&gBlubberShipTopHatch, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&gLighthouseDoor, actor_new, ACTOR_FLAG_NONE);
@@ -112,14 +113,14 @@ void TTC_resetSpawnableActors(void)
spawnableActorList_add(&gChClam, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_25);
}
void code26D0_genericUpdateFunc(Actor *this){
static void __code26D0_genericUpdateFunc(Actor *this){
if(!this->initialized){
func_802D3D74(this);
this->initialized = TRUE;
}
}
void code26D0_palmTreeUpdateFunc(Actor *this){
static void __code26D0_palmTreeUpdateFunc(Actor *this){
if(!this->initialized){
func_802D3D74(this);
this->initialized = TRUE;
@@ -127,21 +128,21 @@ void code26D0_palmTreeUpdateFunc(Actor *this){
}
}
void code26D0_spawnLighthouseB(s32 arg0){
static void __code26D0_spawnLighthouseB(s32 arg0){
ActorMarker *marker = reinterpret_cast(ActorMarker *, arg0);
Actor *this = marker_getActor(marker);
spawn_child_actor(ACTOR_2DF_LIGHTHOUSE_B, &this);
}
void code26D0_lighthouseAUpdateFunc(Actor *this){
code26D0_genericUpdateFunc(this);
static void __code26D0_lighthouseAUpdateFunc(Actor *this){
__code26D0_genericUpdateFunc(this);
if(!this->volatile_initialized){
__spawnQueue_add_1((GenFunction_1)code26D0_spawnLighthouseB, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1)__code26D0_spawnLighthouseB, (s32)this->marker);
this->volatile_initialized = TRUE;
}
}
void code26D0_sharkfoodIslandUpdateFunc(Actor *this){
static void __code26D0_sharkfoodIslandUpdateFunc(Actor *this){
f32 player_position[3];
if(!this->initialized){
@@ -160,7 +161,7 @@ void code26D0_sharkfoodIslandUpdateFunc(Actor *this){
else{
this->position_y = -1000.0f;
}
}//L80388E7C
}
if(this->position_y == 700.0f){
player_getPosition(player_position);

View File

@@ -5,8 +5,11 @@
extern s32 D_80276CB0;
/* .data */
// code crc0
s32 D_8038C750 = 0x0016D2FD;
// code crc1
s32 D_8038C754 = 0xFB70B01D;
// data crc
s32 D_8038C758 = 0x0004EFAC;
/* .bss */
@@ -15,17 +18,17 @@ struct {
s32 unk4;
u8 pad8[4];
s32 unkC;
}D_8038D6F0;
} sD_8038D6F0;
/* .code */
void func_80389430(void){
void __code3040_func_80389430(){
if(getGameMode() != GAME_MODE_7_ATTRACT_DEMO){
func_8029CF48(2, 1, 0.0f);
}
}
void func_80389468(void){
if(D_8038D6F0.unk4 != D_8038C754 || D_8038D6F0.unkC != D_80276CB0){
func_80389430();
void code3040_func_80389468(void){
if(sD_8038D6F0.unk4 != D_8038C754 || sD_8038D6F0.unkC != D_80276CB0){
__code3040_func_80389430();
}
}

View File

@@ -196,7 +196,7 @@ static void __code3E30_initFloorTiles(void)
for (i_ptr = sLetterFloorTiles; i_ptr->meshId != 0; i_ptr++)
{
i_ptr->state = 2;
i_ptr->time_delta_sum = 0.0f;
i_ptr->timeDeltaSum = 0.0f;
}
mapSpecificFlags_set(TTC_SPECIFIC_FLAG_1_UNKNOWN, FALSE);
@@ -207,9 +207,9 @@ static void __code3E30_meshCallbackFloorTileState_1(s32 arg0, BKVtxRef *ref, Vtx
LetterFloorTile *ptr = (LetterFloorTile *)arg3;
f32 temp_f2;
if (ptr->time_delta_sum < 0.5)
if (ptr->timeDeltaSum < 0.5)
{
temp_f2 = (ptr->time_delta_sum / 0.5);
temp_f2 = (ptr->timeDeltaSum / 0.5);
dst->v.cn[0] = (ref->v.v.cn[0] - 0xFF) * temp_f2 + 255.0f;
dst->v.cn[1] = ref->v.v.cn[1] * temp_f2;
dst->v.cn[2] = ref->v.v.cn[2] * temp_f2;
@@ -229,7 +229,7 @@ static void __code3E30_setLetterFloorTileState(LetterFloorTile *arg0, s32 arg1)
temp_v0 = arg0->state;
arg0->state = arg1;
arg0->time_delta_sum = 0.0f;
arg0->timeDeltaSum = 0.0f;
if ((arg1 == 1) && (temp_v0 != arg1))
{
func_8025A6EC(COMUSIC_2C_BUZZER, 32000);
@@ -241,14 +241,14 @@ static void __code3E30_meshCallbackFloorTileState_3(s32 arg0, BKVtxRef *ref, Vtx
LetterFloorTile *ptr = (LetterFloorTile *)arg3;
f32 temp_f12;
if (ptr->time_delta_sum <= 0.5)
if (ptr->timeDeltaSum <= 0.5)
{
temp_f12 = (ptr->time_delta_sum / 0.5);
temp_f12 = (ptr->timeDeltaSum / 0.5);
dst->v.cn[0] = ref->v.v.cn[0] * (1.0f - temp_f12);
dst->v.cn[1] = 0xFF;
dst->v.cn[2] = ref->v.v.cn[2] * (1.0f - temp_f12);
}
if (ptr->time_delta_sum >= 0.5)
if (ptr->timeDeltaSum >= 0.5)
{
ptr->state = 4;
}
@@ -259,9 +259,9 @@ static void __code3E30_meshCallbackFloorTileState_5(s32 arg0, BKVtxRef *ref, Vtx
LetterFloorTile *ptr = (LetterFloorTile *)arg3;
f32 temp_f2;
if (ptr->time_delta_sum < 0.5)
if (ptr->timeDeltaSum < 0.5)
{
temp_f2 = (ptr->time_delta_sum / 0.5);
temp_f2 = (ptr->timeDeltaSum / 0.5);
dst->v.cn[0] = (ref->v.v.cn[0] - 0xFF) * temp_f2 + 255.0f;
dst->v.cn[1] = (ref->v.v.cn[1] - 0xFF) * temp_f2 + 255.0f;
dst->v.cn[2] = ref->v.v.cn[2] * temp_f2;
@@ -283,7 +283,7 @@ static void __code3E30_updateTimeDeltaSumForFloorTiles()
time_delta = time_getDelta();
for (floor_tile = sLetterFloorTiles; floor_tile->meshId != 0; floor_tile++)
{
floor_tile->time_delta_sum += time_delta;
floor_tile->timeDeltaSum += time_delta;
if (floor_tile->state == 1)
{
BKModel_transformMesh(sMapState.model1, floor_tile->meshId, __code3E30_meshCallbackFloorTileState_1, (s32)floor_tile);

View File

@@ -361,6 +361,7 @@ void func_802D3CC8(ActorMarker *marker){
func_802D31AC(marker, NULL);
}
// used as init function
void func_802D3CE8(Actor *this){
if(!this->initialized){
marker_setCollisionScripts(this->marker, NULL, func_802D3138, func_802D31AC);
@@ -373,6 +374,7 @@ void func_802D3D54(Actor *this){
func_802D3CE8(this);
}
// used as init function
void func_802D3D74(Actor *this){
this->marker->propPtr->unk8_3 = TRUE;
actor_collisionOff(this);

View File

@@ -231,8 +231,9 @@ void func_8031CE70(f32 *arg0, enum map_e arg1, s32 arg2) {
}
}
void func_8031D04C(enum map_e arg0, s32 arg1) {
func_8031CB50(arg0, arg1, 0);
// set map and exit id?
void func_8031D04C(enum map_e arg0, s32 exit_id) {
func_8031CB50(arg0, exit_id, 0);
}
void func_8031D06C(enum map_e arg0, s32 arg1) {

View File

@@ -374,7 +374,7 @@ void spawnQueue_reset(void){
GV_func_8038F154();
break;
case OVERLAY_5_BEACH:
TTC_resetSpawnableActors();
code26D0_resetSpawnableActorsForTTC();
break;
case OVERLAY_6_JUNGLE:
MM_func_803888B0();