mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Merge branch 'master' into doc_pause_menu
This commit is contained in:
commit
a49731dd06
292 changed files with 8390 additions and 7913 deletions
|
@ -1,33 +1,33 @@
|
|||
#include "global.h"
|
||||
|
||||
void Flags_UnsetAllEnv(PlayState* play) {
|
||||
void CutsceneFlags_UnsetAll(PlayState* play) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(play->envFlags); i++) {
|
||||
play->envFlags[i] = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(play->cutsceneFlags); i++) {
|
||||
play->cutsceneFlags[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Flags_SetEnv(PlayState* play, s16 flag) {
|
||||
void CutsceneFlags_Set(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = 1 << bit;
|
||||
|
||||
play->envFlags[index] |= mask;
|
||||
play->cutsceneFlags[index] |= mask;
|
||||
}
|
||||
|
||||
void Flags_UnsetEnv(PlayState* play, s16 flag) {
|
||||
void CutsceneFlags_Unset(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = (1 << bit) ^ 0xFFFF;
|
||||
|
||||
play->envFlags[index] &= mask;
|
||||
play->cutsceneFlags[index] &= mask;
|
||||
}
|
||||
|
||||
s32 Flags_GetEnv(PlayState* play, s16 flag) {
|
||||
s32 CutsceneFlags_Get(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = 1 << bit;
|
||||
|
||||
return play->envFlags[index] & mask;
|
||||
return play->cutsceneFlags[index] & mask;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s
|
|||
progress = 0.0f;
|
||||
}
|
||||
|
||||
if ((point[key].continueFlag == -1) || (point[key + 1].continueFlag == -1) || (point[key + 2].continueFlag == -1)) {
|
||||
if ((point[key].continueFlag == CS_CAM_STOP) || (point[key + 1].continueFlag == CS_CAM_STOP) ||
|
||||
(point[key + 2].continueFlag == CS_CAM_STOP)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2259,7 +2259,7 @@ void AudioOcarina_Update(void) {
|
|||
AudioOcarina_UpdateRecordingStaff();
|
||||
}
|
||||
|
||||
void AudioOcarina_PlayLongScarecrowAfterCredits(void) {
|
||||
void AudioOcarina_PlayLongScarecrowSong(void) {
|
||||
static u8 sScarecrowAfterCreditsState = 0;
|
||||
static u8 sScarecrowAfterCreditsIntrumentId = OCARINA_INSTRUMENT_DEFAULT;
|
||||
static u16 sScarecrowAfterCreditsTimer = 1200;
|
||||
|
|
|
@ -252,7 +252,7 @@ s32 func_800B4088(DbCamera* dbCamera, Camera* cam) {
|
|||
position = &dbCamera->sub.position[dbCamera->sub.unkIdx];
|
||||
lookAt = &dbCamera->sub.lookAt[dbCamera->sub.unkIdx];
|
||||
|
||||
position->continueFlag = -1;
|
||||
position->continueFlag = CS_CAM_STOP;
|
||||
lookAt->continueFlag = position->continueFlag;
|
||||
position->nextPointFrame = 0;
|
||||
lookAt->nextPointFrame = 30;
|
||||
|
@ -268,10 +268,10 @@ s32 func_800B4088(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
|
||||
for (i = 0; i < (dbCamera->sub.nPoints - 2); i++) {
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = 0;
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = CS_CAM_CONTINUE;
|
||||
}
|
||||
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = -1;
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = CS_CAM_STOP;
|
||||
|
||||
return dbCamera->sub.unkIdx;
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ s32 func_800B42C0(DbCamera* dbCamera, Camera* cameraPtr) {
|
|||
CutsceneCameraPoint* position = &dbCamera->sub.position[dbCamera->sub.unkIdx];
|
||||
CutsceneCameraPoint* lookAt = &dbCamera->sub.lookAt[dbCamera->sub.unkIdx];
|
||||
|
||||
position->continueFlag = lookAt->continueFlag = 0;
|
||||
position->continueFlag = lookAt->continueFlag = CS_CAM_CONTINUE;
|
||||
|
||||
if (dbCamera->sub.mode != 1) {
|
||||
DbCamera_Vec3FToS(&dbCamera->eye, &position->pos);
|
||||
|
@ -352,10 +352,10 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
|
|||
sDbCamAnim.unk_04 = 0;
|
||||
|
||||
for (i = 0; i < (dbCamera->sub.nPoints - 2); i++) {
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = 0;
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = CS_CAM_CONTINUE;
|
||||
}
|
||||
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = -1;
|
||||
dbCamera->sub.position[i].continueFlag = dbCamera->sub.lookAt[i].continueFlag = CS_CAM_STOP;
|
||||
}
|
||||
|
||||
if (dbCamera->sub.nPoints < 6) {
|
||||
|
@ -2155,7 +2155,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[1].press.button, BTN_CRIGHT)) {
|
||||
D_8015FCC8 = 0;
|
||||
gUseCutsceneCam = false;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
sDbCamAnim.curFrame = 0.0f;
|
||||
|
|
|
@ -850,8 +850,8 @@ void func_8002D7EC(Actor* actor) {
|
|||
}
|
||||
|
||||
void func_8002D868(Actor* actor) {
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speed;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speed;
|
||||
|
||||
actor->velocity.y += actor->gravity;
|
||||
if (actor->velocity.y < actor->minVelocityY) {
|
||||
|
@ -865,11 +865,11 @@ void Actor_MoveForward(Actor* actor) {
|
|||
}
|
||||
|
||||
void func_8002D908(Actor* actor) {
|
||||
f32 sp24 = Math_CosS(actor->world.rot.x) * actor->speedXZ;
|
||||
f32 speedXZ = Math_CosS(actor->world.rot.x) * actor->speed;
|
||||
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * sp24;
|
||||
actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * sp24;
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * speedXZ;
|
||||
actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speed;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * speedXZ;
|
||||
}
|
||||
|
||||
void func_8002D97C(Actor* actor) {
|
||||
|
@ -878,7 +878,7 @@ void func_8002D97C(Actor* actor) {
|
|||
}
|
||||
|
||||
void func_8002D9A4(Actor* actor, f32 arg1) {
|
||||
actor->speedXZ = Math_CosS(actor->world.rot.x) * arg1;
|
||||
actor->speed = Math_CosS(actor->world.rot.x) * arg1;
|
||||
actor->velocity.y = -Math_SinS(actor->world.rot.x) * arg1;
|
||||
}
|
||||
|
||||
|
@ -3350,9 +3350,9 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
|
|||
(((ArmsHook*)actor)->timer == 0)) {
|
||||
actor = actor->next;
|
||||
} else {
|
||||
deltaX = Math_SinS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
|
||||
deltaX = Math_SinS(actor->world.rot.y) * (actor->speed * 10.0f);
|
||||
deltaY = actor->velocity.y + (actor->gravity * 10.0f);
|
||||
deltaZ = Math_CosS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
|
||||
deltaZ = Math_CosS(actor->world.rot.y) * (actor->speed * 10.0f);
|
||||
|
||||
spA8.x = actor->world.pos.x + deltaX;
|
||||
spA8.y = actor->world.pos.y + deltaY;
|
||||
|
@ -4091,7 +4091,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
|
|||
actor->params = 1;
|
||||
} else if (!(actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Actor_MoveForward(actor);
|
||||
Math_SmoothStepToF(&actor->speedXZ, 0.0f, 1.0f, 0.1f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->speed, 0.0f, 1.0f, 0.1f, 0.0f);
|
||||
} else if ((actor->bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (actor->velocity.y < -4.0f)) {
|
||||
ret = 1;
|
||||
} else {
|
||||
|
@ -4299,7 +4299,7 @@ Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3,
|
|||
spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params);
|
||||
if (spawnedEnPart != NULL) {
|
||||
spawnedEnPart->actor.scale = actor->scale;
|
||||
spawnedEnPart->actor.speedXZ = arg3[0];
|
||||
spawnedEnPart->actor.speed = arg3[0];
|
||||
spawnedEnPart->displayList = dList;
|
||||
spawnedEnPart->action = 2;
|
||||
spawnedEnPart->timer = timer;
|
||||
|
|
|
@ -7716,7 +7716,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
if (gDbgCamEnabled) {
|
||||
DbgCamera_Enable(&D_8015BD80, camera);
|
||||
} else if (camera->play->csCtx.state != CS_STATE_IDLE) {
|
||||
func_80064534(camera->play, &camera->play->csCtx);
|
||||
Cutscene_StopManual(camera->play, &camera->play->csCtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
1769
src/code/z_demo.c
1769
src/code/z_demo.c
File diff suppressed because it is too large
Load diff
|
@ -265,11 +265,11 @@ void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type) {
|
|||
}
|
||||
|
||||
void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 1.0f, 1.0f, 0.5f, 0.0f);
|
||||
Math_SmoothStepToF(&this->dyna.actor.speed, 1.0f, 1.0f, 0.5f, 0.0f);
|
||||
this->dyna.actor.shape.rot.x += this->dyna.actor.world.rot.x >> 1;
|
||||
this->dyna.actor.shape.rot.z += this->dyna.actor.world.rot.z >> 1;
|
||||
|
||||
if (this->dyna.actor.speedXZ != 0.0f && this->dyna.actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->dyna.actor.speed != 0.0f && this->dyna.actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->dyna.actor.world.rot.y =
|
||||
this->dyna.actor.wallYaw - this->dyna.actor.world.rot.y + this->dyna.actor.wallYaw - 0x8000;
|
||||
if (1) {}
|
||||
|
@ -279,7 +279,7 @@ void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
|
|||
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (this->dyna.actor.velocity.y < -8.0f) {
|
||||
this->dyna.actor.velocity.y *= -0.6f;
|
||||
this->dyna.actor.speedXZ *= 0.6f;
|
||||
this->dyna.actor.speed *= 0.6f;
|
||||
this->dyna.actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
|
||||
} else {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
@ -294,13 +294,13 @@ void EnAObj_SetupBlock(EnAObj* this, s16 type) {
|
|||
}
|
||||
|
||||
void EnAObj_Block(EnAObj* this, PlayState* play) {
|
||||
this->dyna.actor.speedXZ += this->dyna.unk_150;
|
||||
this->dyna.actor.speed += this->dyna.unk_150;
|
||||
this->dyna.actor.world.rot.y = this->dyna.unk_158;
|
||||
this->dyna.actor.speedXZ = CLAMP(this->dyna.actor.speedXZ, -2.5f, 2.5f);
|
||||
this->dyna.actor.speed = CLAMP(this->dyna.actor.speed, -2.5f, 2.5f);
|
||||
|
||||
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->dyna.actor.speed, 0.0f, 1.0f, 1.0f, 0.0f);
|
||||
|
||||
if (this->dyna.actor.speedXZ != 0.0f) {
|
||||
if (this->dyna.actor.speed != 0.0f) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
this->despawnTimer = 15;
|
||||
this->unk_154 = 35;
|
||||
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
|
||||
|
@ -390,7 +390,7 @@ void func_8001DFC8(EnItem00* this, PlayState* play) {
|
|||
this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 150.0f + 850.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
|
||||
if (this->unk_154 == 0) {
|
||||
if ((this->actor.params != ITEM00_SMALL_KEY) && (this->actor.params != ITEM00_HEART_PIECE) &&
|
||||
|
@ -448,7 +448,7 @@ void func_8001E304(EnItem00* this, PlayState* play) {
|
|||
|
||||
if (this->actor.params == ITEM00_RECOVERY_HEART) {
|
||||
if (this->actor.velocity.y < 0.0f) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actor.gravity = -0.4f;
|
||||
if (this->actor.velocity.y < -1.5f) {
|
||||
this->actor.velocity.y = -1.5f;
|
||||
|
@ -489,7 +489,7 @@ void func_8001E304(EnItem00* this, PlayState* play) {
|
|||
EnItem00_SetupAction(this, func_8001DFC8);
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -733,7 +733,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
this->despawnTimer = 15;
|
||||
this->unk_154 = 35;
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->actor.speedXZ = 0;
|
||||
this->actor.speed = 0;
|
||||
this->actor.velocity.y = 0;
|
||||
this->actor.gravity = 0;
|
||||
|
||||
|
@ -969,7 +969,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
|
|||
spawnPos->z, 0, 0, 0, params | param8000 | param3F00);
|
||||
if ((spawnedActor != NULL) && !param8000) {
|
||||
spawnedActor->actor.velocity.y = !param4000 ? 8.0f : -2.0f;
|
||||
spawnedActor->actor.speedXZ = 2.0f;
|
||||
spawnedActor->actor.speed = 2.0f;
|
||||
spawnedActor->actor.gravity = -0.9f;
|
||||
spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f);
|
||||
Actor_SetScale(&spawnedActor->actor, 0.0f);
|
||||
|
@ -1009,7 +1009,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
|
|||
spawnPos->z, 0, 0, 0, params | param8000 | param3F00);
|
||||
if ((spawnedActor != NULL) && !param8000) {
|
||||
spawnedActor->actor.velocity.y = 0.0f;
|
||||
spawnedActor->actor.speedXZ = 0.0f;
|
||||
spawnedActor->actor.speed = 0.0f;
|
||||
spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f;
|
||||
spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f);
|
||||
spawnedActor->actor.flags |= ACTOR_FLAG_4;
|
||||
|
@ -1119,7 +1119,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||
spawnPos->y, spawnPos->z, 0, 0, 0, dropId);
|
||||
if ((spawnedActor != NULL) && (dropId != ITEM00_NONE)) {
|
||||
spawnedActor->actor.velocity.y = 8.0f;
|
||||
spawnedActor->actor.speedXZ = 2.0f;
|
||||
spawnedActor->actor.speed = 2.0f;
|
||||
spawnedActor->actor.gravity = -0.9f;
|
||||
spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f;
|
||||
Actor_SetScale(&spawnedActor->actor, 0.0f);
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
#include "global.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TRANS_CIRCLE_DIR_IN,
|
||||
/* 1 */ TRANS_CIRCLE_DIR_OUT
|
||||
} TransitionCircleDirection;
|
||||
|
||||
// unused
|
||||
Gfx sCircleEmptyDList[] = {
|
||||
Gfx sTransCircleEmptyDL[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#include "assets/code/fbdemo_circle/z_fbdemo_circle.c"
|
||||
|
||||
Gfx sCircleDList[] = {
|
||||
Gfx sTransCircleDL[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
|
@ -20,7 +25,7 @@ Gfx sCircleDList[] = {
|
|||
gsDPLoadTextureBlock(0x08000000, G_IM_FMT_I, G_IM_SIZ_8b, 16, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 4, 6, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsSPDisplayList(0x09000000),
|
||||
gsSPVertex(sCircleWipeVtx, 32, 0),
|
||||
gsSPVertex(sTransCircleVtx, 32, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0),
|
||||
gsSP2Triangles(3, 5, 6, 0, 5, 7, 8, 0),
|
||||
gsSP2Triangles(7, 9, 10, 0, 9, 11, 12, 0),
|
||||
|
@ -29,7 +34,7 @@ Gfx sCircleDList[] = {
|
|||
gsSP2Triangles(19, 21, 22, 0, 21, 23, 24, 0),
|
||||
gsSP2Triangles(23, 25, 26, 0, 25, 27, 28, 0),
|
||||
gsSP1Triangle(27, 29, 30, 0),
|
||||
gsSPVertex(&sCircleWipeVtx[31], 3, 0),
|
||||
gsSPVertex(&sTransCircleVtx[31], 3, 0),
|
||||
gsSP1Triangle(0, 1, 2, 0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
@ -43,12 +48,15 @@ void TransitionCircle_Start(void* thisx) {
|
|||
case TCA_WAVE:
|
||||
this->texture = sTransCircleWaveTex;
|
||||
break;
|
||||
|
||||
case TCA_RIPPLE:
|
||||
this->texture = sTransCircleRippleTex;
|
||||
break;
|
||||
|
||||
case TCA_STARBURST:
|
||||
this->texture = sTransCircleStarburstTex;
|
||||
break;
|
||||
|
||||
default:
|
||||
this->texture = sTransCircleNormalTex;
|
||||
break;
|
||||
|
@ -71,20 +79,22 @@ void TransitionCircle_Start(void* thisx) {
|
|||
this->color.a = 255;
|
||||
} else {
|
||||
this->speed = 40;
|
||||
this->color.rgba = this->appearanceType == TCA_WAVE ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
|
||||
this->color.rgba = (this->appearanceType == TCA_WAVE) ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
|
||||
}
|
||||
if (this->direction != 0) {
|
||||
this->texY = (s32)(0.0 * (1 << 2));
|
||||
|
||||
if (this->direction != TRANS_CIRCLE_DIR_IN) {
|
||||
this->texY = (s32)(0.0f * (1 << 2));
|
||||
if (this->colorType == TCC_SPECIAL) {
|
||||
this->texY = (s32)(62.5 * (1 << 2));
|
||||
this->texY = (s32)(62.5f * (1 << 2));
|
||||
}
|
||||
} else {
|
||||
this->texY = (s32)(125.0 * (1 << 2));
|
||||
this->texY = (s32)(125.0f * (1 << 2));
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
|
||||
guLookAt(&this->lookAt, 0.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
@ -92,7 +102,7 @@ void TransitionCircle_Start(void* thisx) {
|
|||
void* TransitionCircle_Init(void* thisx) {
|
||||
TransitionCircle* this = (TransitionCircle*)thisx;
|
||||
|
||||
bzero(this, sizeof(*this));
|
||||
bzero(this, sizeof(TransitionCircle));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -101,10 +111,8 @@ void TransitionCircle_Destroy(void* thisx) {
|
|||
|
||||
void TransitionCircle_Update(void* thisx, s32 updateRate) {
|
||||
TransitionCircle* this = (TransitionCircle*)thisx;
|
||||
s32 temp_t2;
|
||||
s32 temp_t3;
|
||||
|
||||
if (this->direction != 0) {
|
||||
if (this->direction != TRANS_CIRCLE_DIR_IN) {
|
||||
if (this->texY == 0) {
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
@ -112,20 +120,20 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
|
|||
}
|
||||
}
|
||||
this->texY += this->speed * 3 / updateRate;
|
||||
if (this->texY >= (s32)(125.0 * (1 << 2))) {
|
||||
this->texY = (s32)(125.0 * (1 << 2));
|
||||
if (this->texY >= (s32)(125.0f * (1 << 2))) {
|
||||
this->texY = (s32)(125.0f * (1 << 2));
|
||||
this->isDone = true;
|
||||
}
|
||||
} else {
|
||||
this->texY -= this->speed * 3 / updateRate;
|
||||
if (this->colorType != TCC_SPECIAL) {
|
||||
if (this->texY <= (s32)(0.0 * (1 << 2))) {
|
||||
this->texY = (s32)(0.0 * (1 << 2));
|
||||
if (this->texY <= (s32)(0.0f * (1 << 2))) {
|
||||
this->texY = (s32)(0.0f * (1 << 2));
|
||||
this->isDone = true;
|
||||
}
|
||||
} else {
|
||||
if (this->texY <= (s32)(62.5 * (1 << 2))) {
|
||||
this->texY = (s32)(62.5 * (1 << 2));
|
||||
if (this->texY <= (s32)(62.5f * (1 << 2))) {
|
||||
this->texY = (s32)(62.5f * (1 << 2));
|
||||
this->isDone = true;
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +177,7 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) {
|
|||
guTranslate(&modelView[2], tPos, tPos, 0.0f);
|
||||
gSPMatrix(gfx++, &modelView[2], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
}
|
||||
gSPDisplayList(gfx++, sCircleDList);
|
||||
gSPDisplayList(gfx++, sTransCircleDL);
|
||||
gDPPipeSync(gfx++);
|
||||
*gfxP = gfx;
|
||||
}
|
||||
|
@ -186,15 +194,15 @@ void TransitionCircle_SetType(void* thisx, s32 type) {
|
|||
if (type & TC_SET_PARAMS) {
|
||||
// SetType is called twice for circles, the actual direction value will be set on the second call.
|
||||
// The direction set here will be overwritten on that second call.
|
||||
this->direction = (type >> 5) & 0x1;
|
||||
this->direction = (type >> 5) & 1;
|
||||
|
||||
this->colorType = (type >> 3) & 0x3;
|
||||
this->speedType = type & 0x1;
|
||||
this->appearanceType = (type >> 1) & 0x3;
|
||||
} else if (type == 1) {
|
||||
this->direction = 1;
|
||||
this->colorType = (type >> 3) & 3;
|
||||
this->speedType = type & 1;
|
||||
this->appearanceType = (type >> 1) & 3;
|
||||
} else if (type == TRANS_INSTANCE_TYPE_FILL_OUT) {
|
||||
this->direction = TRANS_CIRCLE_DIR_OUT;
|
||||
} else {
|
||||
this->direction = 0;
|
||||
this->direction = TRANS_CIRCLE_DIR_IN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,8 +212,8 @@ void TransitionCircle_SetColor(void* thisx, u32 color) {
|
|||
this->color.rgba = color;
|
||||
}
|
||||
|
||||
void TransitionCircle_SetUnkColor(void* thisx, u32 unkColor) {
|
||||
void TransitionCircle_SetUnkColor(void* thisx, u32 color) {
|
||||
TransitionCircle* this = (TransitionCircle*)thisx;
|
||||
|
||||
this->unkColor.rgba = unkColor;
|
||||
this->unkColor.rgba = color;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
#include "global.h"
|
||||
#include "terminal.h"
|
||||
|
||||
static Gfx sRCPSetupFade[] = {
|
||||
typedef enum {
|
||||
/* 0 */ TRANS_FADE_DIR_IN,
|
||||
/* 1 */ TRANS_FADE_DIR_OUT
|
||||
} TransitionFadeDirection;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TRANS_FADE_TYPE_NONE,
|
||||
/* 1 */ TRANS_FADE_TYPE_ONE_WAY,
|
||||
/* 2 */ TRANS_FADE_TYPE_FLASH
|
||||
} TransitionFadeType;
|
||||
|
||||
static Gfx sTransFadeSetupDL[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
|
@ -15,15 +26,17 @@ static Gfx sRCPSetupFade[] = {
|
|||
void TransitionFade_Start(void* thisx) {
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
|
||||
switch (this->fadeType) {
|
||||
case 0:
|
||||
switch (this->type) {
|
||||
case TRANS_FADE_TYPE_NONE:
|
||||
break;
|
||||
case 1:
|
||||
this->fadeTimer = 0;
|
||||
this->fadeColor.a = this->fadeDirection != 0 ? 0xFF : 0;
|
||||
|
||||
case TRANS_FADE_TYPE_ONE_WAY:
|
||||
this->timer = 0;
|
||||
this->color.a = (this->direction != TRANS_FADE_DIR_IN) ? 255 : 0;
|
||||
break;
|
||||
case 2:
|
||||
this->fadeColor.a = 0;
|
||||
|
||||
case TRANS_FADE_TYPE_FLASH:
|
||||
this->color.a = 0;
|
||||
break;
|
||||
}
|
||||
this->isDone = false;
|
||||
|
@ -32,7 +45,7 @@ void TransitionFade_Start(void* thisx) {
|
|||
void* TransitionFade_Init(void* thisx) {
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
|
||||
bzero(this, sizeof(*this));
|
||||
bzero(this, sizeof(TransitionFade));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -44,39 +57,41 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
|
|||
s16 newAlpha;
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
|
||||
switch (this->fadeType) {
|
||||
case 0:
|
||||
switch (this->type) {
|
||||
case TRANS_FADE_TYPE_NONE:
|
||||
break;
|
||||
case 1:
|
||||
this->fadeTimer += updateRate;
|
||||
if (this->fadeTimer >= gSaveContext.transFadeDuration) {
|
||||
this->fadeTimer = gSaveContext.transFadeDuration;
|
||||
|
||||
case TRANS_FADE_TYPE_ONE_WAY:
|
||||
this->timer += updateRate;
|
||||
if (this->timer >= gSaveContext.transFadeDuration) {
|
||||
this->timer = gSaveContext.transFadeDuration;
|
||||
this->isDone = true;
|
||||
}
|
||||
if (!gSaveContext.transFadeDuration) {
|
||||
if ((u32)gSaveContext.transFadeDuration == 0) {
|
||||
// "Divide by 0! Zero is included in ZCommonGet fade_speed"
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST);
|
||||
}
|
||||
|
||||
alpha = (255.0f * this->fadeTimer) / ((void)0, gSaveContext.transFadeDuration);
|
||||
this->fadeColor.a = (this->fadeDirection != 0) ? 255 - alpha : alpha;
|
||||
alpha = (255.0f * this->timer) / ((void)0, gSaveContext.transFadeDuration);
|
||||
this->color.a = (this->direction != TRANS_FADE_DIR_IN) ? 255 - alpha : alpha;
|
||||
break;
|
||||
case 2:
|
||||
newAlpha = this->fadeColor.a;
|
||||
if (iREG(50) != 0) {
|
||||
if (iREG(50) < 0) {
|
||||
|
||||
case TRANS_FADE_TYPE_FLASH:
|
||||
newAlpha = this->color.a;
|
||||
if (R_TRANS_FADE_FLASH_ALPHA_STEP != 0) {
|
||||
if (R_TRANS_FADE_FLASH_ALPHA_STEP < 0) {
|
||||
if (Math_StepToS(&newAlpha, 255, 255)) {
|
||||
iREG(50) = 150;
|
||||
R_TRANS_FADE_FLASH_ALPHA_STEP = 150;
|
||||
}
|
||||
} else {
|
||||
Math_StepToS(&iREG(50), 20, 60);
|
||||
if (Math_StepToS(&newAlpha, 0, iREG(50))) {
|
||||
iREG(50) = 0;
|
||||
Math_StepToS(&R_TRANS_FADE_FLASH_ALPHA_STEP, 20, 60);
|
||||
if (Math_StepToS(&newAlpha, 0, R_TRANS_FADE_FLASH_ALPHA_STEP)) {
|
||||
R_TRANS_FADE_FLASH_ALPHA_STEP = 0;
|
||||
this->isDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
this->fadeColor.a = newAlpha;
|
||||
this->color.a = newAlpha;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -84,11 +99,11 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
|
|||
void TransitionFade_Draw(void* thisx, Gfx** gfxP) {
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
Gfx* gfx;
|
||||
Color_RGBA8_u32* color = &this->fadeColor;
|
||||
Color_RGBA8_u32* color = &this->color;
|
||||
|
||||
if (color->a > 0) {
|
||||
gfx = *gfxP;
|
||||
gSPDisplayList(gfx++, sRCPSetupFade);
|
||||
gSPDisplayList(gfx++, sTransFadeSetupDL);
|
||||
gDPSetPrimColor(gfx++, 0, 0, color->r, color->g, color->b, color->a);
|
||||
gDPFillRectangle(gfx++, 0, 0, gScreenWidth - 1, gScreenHeight - 1);
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -105,21 +120,21 @@ s32 TransitionFade_IsDone(void* thisx) {
|
|||
void TransitionFade_SetColor(void* thisx, u32 color) {
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
|
||||
this->fadeColor.rgba = color;
|
||||
this->color.rgba = color;
|
||||
}
|
||||
|
||||
void TransitionFade_SetType(void* thisx, s32 type) {
|
||||
TransitionFade* this = (TransitionFade*)thisx;
|
||||
|
||||
if (type == 1) {
|
||||
this->fadeType = 1;
|
||||
this->fadeDirection = 1;
|
||||
} else if (type == 2) {
|
||||
this->fadeType = 1;
|
||||
this->fadeDirection = 0;
|
||||
} else if (type == 3) {
|
||||
this->fadeType = 2;
|
||||
if (type == TRANS_INSTANCE_TYPE_FILL_OUT) {
|
||||
this->type = TRANS_FADE_TYPE_ONE_WAY;
|
||||
this->direction = TRANS_FADE_DIR_OUT;
|
||||
} else if (type == TRANS_INSTANCE_TYPE_FILL_IN) {
|
||||
this->type = TRANS_FADE_TYPE_ONE_WAY;
|
||||
this->direction = TRANS_FADE_DIR_IN;
|
||||
} else if (type == TRANS_INSTANCE_TYPE_FADE_FLASH) {
|
||||
this->type = TRANS_FADE_TYPE_FLASH;
|
||||
} else {
|
||||
this->fadeType = 0;
|
||||
this->type = TRANS_FADE_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,23 @@ void TransitionTriforce_Start(void* thisx) {
|
|||
case 2:
|
||||
this->transPos = 1.0f;
|
||||
return;
|
||||
|
||||
default:
|
||||
this->transPos = 0.03f;
|
||||
return;
|
||||
}
|
||||
this->transPos = 0.03f;
|
||||
}
|
||||
|
||||
void* TransitionTriforce_Init(void* thisx) {
|
||||
TransitionTriforce* this = (TransitionTriforce*)thisx;
|
||||
|
||||
bzero(this, sizeof(*this));
|
||||
bzero(this, sizeof(TransitionTriforce));
|
||||
guOrtho(&this->projection, -160.0f, 160.0f, -120.0f, 120.0f, -1000.0f, 1000.0f, 1.0f);
|
||||
this->transPos = 1.0f;
|
||||
this->state = 2;
|
||||
this->step = 0.015f;
|
||||
this->fadeDirection = 1;
|
||||
this->type = TRANS_INSTANCE_TYPE_FILL_OUT;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -31,7 +35,6 @@ void TransitionTriforce_Destroy(void* thisx) {
|
|||
|
||||
void TransitionTriforce_Update(void* thisx, s32 updateRate) {
|
||||
TransitionTriforce* this = (TransitionTriforce*)thisx;
|
||||
f32 temp_f0;
|
||||
s32 i;
|
||||
|
||||
for (i = updateRate; i > 0; i--) {
|
||||
|
@ -56,7 +59,7 @@ void TransitionTriforce_SetColor(void* thisx, u32 color) {
|
|||
void TransitionTriforce_SetType(void* thisx, s32 type) {
|
||||
TransitionTriforce* this = (TransitionTriforce*)thisx;
|
||||
|
||||
this->fadeDirection = type;
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
// unused
|
||||
|
@ -82,21 +85,23 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) {
|
|||
guRotate(&modelView[1], rotation, 0.0f, 0.0f, 1.0f);
|
||||
guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f);
|
||||
gDPPipeSync(gfx++);
|
||||
gSPDisplayList(gfx++, sTriforceWipeDL);
|
||||
gSPDisplayList(gfx++, sTransTriforceDL);
|
||||
gDPSetColor(gfx++, G_SETPRIMCOLOR, this->color.rgba);
|
||||
gDPSetCombineMode(gfx++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gfx++, &modelView[0], G_MTX_LOAD);
|
||||
gSPMatrix(gfx++, &modelView[1], G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_MUL);
|
||||
gSPMatrix(gfx++, &modelView[2], G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_MUL);
|
||||
gSPVertex(gfx++, sTriforceWipeVtx, 10, 0);
|
||||
gSPVertex(gfx++, sTransTriforceVtx, 10, 0);
|
||||
|
||||
if (!TransitionTriforce_IsDone(this)) {
|
||||
switch (this->fadeDirection) {
|
||||
case 1:
|
||||
switch (this->type) {
|
||||
case TRANS_INSTANCE_TYPE_FILL_OUT:
|
||||
gSP2Triangles(gfx++, 0, 4, 5, 0, 4, 1, 3, 0);
|
||||
gSP1Triangle(gfx++, 5, 3, 2, 0);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
case TRANS_INSTANCE_TYPE_FILL_IN:
|
||||
gSP2Triangles(gfx++, 3, 4, 5, 0, 0, 2, 6, 0);
|
||||
gSP2Triangles(gfx++, 0, 6, 7, 0, 1, 0, 7, 0);
|
||||
gSP2Triangles(gfx++, 1, 7, 8, 0, 1, 8, 9, 0);
|
||||
|
@ -104,10 +109,11 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
switch (this->fadeDirection) {
|
||||
case 1:
|
||||
switch (this->type) {
|
||||
case TRANS_INSTANCE_TYPE_FILL_OUT:
|
||||
break;
|
||||
case 2:
|
||||
|
||||
case TRANS_INSTANCE_TYPE_FILL_IN:
|
||||
gSP1Quadrangle(gfx++, 6, 7, 8, 9, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -119,13 +125,11 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) {
|
|||
s32 TransitionTriforce_IsDone(void* thisx) {
|
||||
TransitionTriforce* this = (TransitionTriforce*)thisx;
|
||||
|
||||
s32 ret = 0;
|
||||
|
||||
if (this->state == 1 || this->state == 2) {
|
||||
return this->transPos <= 0.03f;
|
||||
|
||||
} else if (this->state == 3 || this->state == 4) {
|
||||
return this->transPos >= 1.0f;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#include "global.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TRANS_WIPE_DIR_IN,
|
||||
/* 1 */ TRANS_WIPE_DIR_OUT
|
||||
} TransitionWipeDirection;
|
||||
|
||||
#include "assets/code/fbdemo_wipe1/z_fbdemo_wipe1.c"
|
||||
|
||||
Gfx sWipeDList[] = {
|
||||
Gfx sTransWipeDL[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
|
||||
|
@ -13,14 +18,14 @@ Gfx sWipeDList[] = {
|
|||
gsDPSetCombineLERP(TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, COMBINED, 0,
|
||||
PRIMITIVE, 0, COMBINED, 0, PRIMITIVE, 0),
|
||||
gsDPSetPrimDepth(0, 0),
|
||||
gsDPLoadTextureBlock_4b(sWipe1Tex, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6, 6,
|
||||
11, G_TX_NOLOD),
|
||||
gsDPLoadMultiBlock_4b(sWipe1Tex, 0x0100, 1, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
gsDPLoadTextureBlock_4b(sTransWipeTex, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6,
|
||||
6, 11, G_TX_NOLOD),
|
||||
gsDPLoadMultiBlock_4b(sTransWipeTex, 0x0100, 1, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_MIRROR | G_TX_WRAP, 6, 6, 11, 1),
|
||||
gsDPSetTextureLUT(G_TT_NONE),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsSPDisplayList(0x08000000),
|
||||
gsSPVertex(sWipe1Vtx, 25, 0),
|
||||
gsSPVertex(sTransWipeVtx, 25, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0),
|
||||
gsSP2Triangles(5, 6, 7, 0, 6, 8, 9, 0),
|
||||
gsSP2Triangles(8, 10, 11, 0, 10, 12, 13, 0),
|
||||
|
@ -31,7 +36,7 @@ Gfx sWipeDList[] = {
|
|||
};
|
||||
|
||||
// unused.
|
||||
Gfx sWipeSyncDList[] = {
|
||||
Gfx sTransWipeSyncDL[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
@ -41,20 +46,20 @@ void TransitionWipe_Start(void* thisx) {
|
|||
|
||||
this->isDone = false;
|
||||
|
||||
if (this->direction) {
|
||||
this->texY = (s32)(83.25 * (1 << 2));
|
||||
if (this->direction != TRANS_WIPE_DIR_IN) {
|
||||
this->texY = (s32)(83.25f * (1 << 2));
|
||||
} else {
|
||||
this->texY = (s32)(153.0 * (1 << 2));
|
||||
this->texY = (s32)(153.0f * (1 << 2));
|
||||
}
|
||||
|
||||
guPerspective(&this->projection, &this->normal, 60.0f, 4.0 / 3.0f, 10.0f, 12800.0f, 1.0f);
|
||||
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
|
||||
guLookAt(&this->lookAt, 0.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
void* TransitionWipe_Init(void* thisx) {
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
|
||||
bzero(this, sizeof(*this));
|
||||
bzero(this, sizeof(TransitionWipe));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -64,16 +69,16 @@ void TransitionWipe_Destroy(void* thisx) {
|
|||
void TransitionWipe_Update(void* thisx, s32 updateRate) {
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
|
||||
if (this->direction != 0) {
|
||||
if (this->direction != TRANS_WIPE_DIR_IN) {
|
||||
this->texY += (((void)0, gSaveContext.transWipeSpeed) * 3) / updateRate;
|
||||
if (this->texY >= (s32)(153.0 * (1 << 2))) {
|
||||
this->texY = (s32)(153.0 * (1 << 2));
|
||||
if (this->texY >= (s32)(153.0f * (1 << 2))) {
|
||||
this->texY = (s32)(153.0f * (1 << 2));
|
||||
this->isDone = true;
|
||||
}
|
||||
} else {
|
||||
this->texY -= (((void)0, gSaveContext.transWipeSpeed) * 3) / updateRate;
|
||||
if (this->texY <= (s32)(83.25 * (1 << 2))) {
|
||||
this->texY = (s32)(83.25 * (1 << 2));
|
||||
if (this->texY <= (s32)(83.25f * (1 << 2))) {
|
||||
this->texY = (s32)(83.25f * (1 << 2));
|
||||
this->isDone = true;
|
||||
}
|
||||
}
|
||||
|
@ -84,17 +89,17 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
|
|||
Mtx* modelView;
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
s32 pad[4];
|
||||
Gfx* tex;
|
||||
Gfx* texScroll;
|
||||
|
||||
modelView = this->modelView[this->frame];
|
||||
|
||||
this->frame ^= 1;
|
||||
|
||||
guScale(&modelView[0], 0.56f, 0.56f, 1.0f);
|
||||
guRotate(&modelView[1], 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f);
|
||||
gDPPipeSync(gfx++);
|
||||
tex = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0);
|
||||
gSPSegment(gfx++, 8, tex);
|
||||
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0);
|
||||
gSPSegment(gfx++, 8, texScroll);
|
||||
gDPSetPrimColor(gfx++, 0, 0x80, this->color.r, this->color.g, this->color.b, 255);
|
||||
gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPPerspNormalize(gfx++, this->normal);
|
||||
|
@ -102,7 +107,7 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
|
|||
gSPMatrix(gfx++, &modelView[0], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(gfx++, &modelView[1], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPMatrix(gfx++, &modelView[2], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfx++, sWipeDList);
|
||||
gSPDisplayList(gfx++, sTransWipeDL);
|
||||
gDPPipeSync(gfx++);
|
||||
*gfxP = gfx;
|
||||
}
|
||||
|
@ -116,16 +121,16 @@ s32 TransitionWipe_IsDone(void* thisx) {
|
|||
void TransitionWipe_SetType(void* thisx, s32 type) {
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
|
||||
if (type == 1) {
|
||||
this->direction = 1;
|
||||
if (type == TRANS_INSTANCE_TYPE_FILL_OUT) {
|
||||
this->direction = TRANS_WIPE_DIR_OUT;
|
||||
} else {
|
||||
this->direction = 0;
|
||||
this->direction = TRANS_WIPE_DIR_IN;
|
||||
}
|
||||
|
||||
if (this->direction != 0) {
|
||||
this->texY = (s32)(83.25 * (1 << 2));
|
||||
if (this->direction != TRANS_WIPE_DIR_IN) {
|
||||
this->texY = (s32)(83.25f * (1 << 2));
|
||||
} else {
|
||||
this->texY = (s32)(153.0 * (1 << 2));
|
||||
this->texY = (s32)(153.0f * (1 << 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,8 +140,8 @@ void TransitionWipe_SetColor(void* thisx, u32 color) {
|
|||
this->color.rgba = color;
|
||||
}
|
||||
|
||||
void TransitionWipe_SetEnvColor(void* thisx, u32 color) {
|
||||
void TransitionWipe_SetUnkColor(void* thisx, u32 color) {
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
|
||||
this->envColor.rgba = color;
|
||||
this->unkColor.rgba = color;
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
|
|||
cREG(12) = 0;
|
||||
cREG(13) = 0;
|
||||
cREG(14) = 0;
|
||||
D_8015FCC8 = 1;
|
||||
gUseCutsceneCam = true;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sLightningBolts); i++) {
|
||||
sLightningBolts[i].state = LIGHTNING_BOLT_INACTIVE;
|
||||
|
@ -426,8 +426,8 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
|
|||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.unk_74[1] = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(play->csCtx.npcActions); i++) {
|
||||
play->csCtx.npcActions[i] = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(play->csCtx.actorCues); i++) {
|
||||
play->csCtx.actorCues[i] = NULL;
|
||||
}
|
||||
|
||||
if (Object_GetIndex(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP) < 0 && !play->envCtx.sunMoonDisabled) {
|
||||
|
|
|
@ -1735,7 +1735,7 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) {
|
|||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
}
|
||||
|
||||
void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
|
||||
static u16 sOcarinaSongFlagsMap[] = {
|
||||
(1 << OCARINA_SONG_MINUET),
|
||||
(1 << OCARINA_SONG_BOLERO),
|
||||
|
@ -1873,14 +1873,14 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8010BD58(PlayState* play, u16 ocarinaActionId) {
|
||||
play->msgCtx.unk_E40E = 0;
|
||||
Message_StartOcarina(play, ocarinaActionId);
|
||||
void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
play->msgCtx.disableSunsSong = false;
|
||||
Message_StartOcarinaImpl(play, ocarinaActionId);
|
||||
}
|
||||
|
||||
void func_8010BD88(PlayState* play, u16 ocarinaActionId) {
|
||||
play->msgCtx.unk_E40E = 1;
|
||||
Message_StartOcarina(play, ocarinaActionId);
|
||||
void Message_StartOcarinaSunsSongDisabled(PlayState* play, u16 ocarinaActionId) {
|
||||
play->msgCtx.disableSunsSong = true;
|
||||
Message_StartOcarinaImpl(play, ocarinaActionId);
|
||||
}
|
||||
|
||||
u8 Message_GetState(MessageContext* msgCtx) {
|
||||
|
@ -2577,7 +2577,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
case MSGMODE_OCARINA_AWAIT_INPUT:
|
||||
Message_DrawText(play, &gfx);
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
func_8010BD58(play, msgCtx->ocarinaAction);
|
||||
Message_StartOcarina(play, msgCtx->ocarinaAction);
|
||||
}
|
||||
break;
|
||||
case MSGMODE_SCARECROW_LONG_RECORDING_START:
|
||||
|
|
|
@ -1,118 +1,118 @@
|
|||
#include "global.h"
|
||||
|
||||
static CutsceneCameraPoint D_8012013C[14] = {
|
||||
{ CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } },
|
||||
{ CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } },
|
||||
{ CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } },
|
||||
{ CS_CMD_CONTINUE, 5, 25, 60.0f, { -1817, 218, -1270 } },
|
||||
{ CS_CMD_CONTINUE, 3, 20, 60.0f, { -1836, 168, -1243 } },
|
||||
{ CS_CMD_CONTINUE, 0, 20, 60.0f, { -1905, 115, -1193 } },
|
||||
{ CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 58, -1212 } },
|
||||
{ CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 31, -1164 } },
|
||||
{ CS_CMD_CONTINUE, 0, 30, 60.0f, { -1969, 54, -1209 } },
|
||||
{ CS_CMD_CONTINUE, 0, 30, 60.0f, { -1973, 35, -1206 } },
|
||||
{ CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CAM_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } },
|
||||
{ CS_CAM_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } },
|
||||
{ CS_CAM_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } },
|
||||
{ CS_CAM_CONTINUE, 5, 25, 60.0f, { -1817, 218, -1270 } },
|
||||
{ CS_CAM_CONTINUE, 3, 20, 60.0f, { -1836, 168, -1243 } },
|
||||
{ CS_CAM_CONTINUE, 0, 20, 60.0f, { -1905, 115, -1193 } },
|
||||
{ CS_CAM_CONTINUE, 0, 30, 55.0f, { -1969, 58, -1212 } },
|
||||
{ CS_CAM_CONTINUE, 0, 30, 55.0f, { -1969, 31, -1164 } },
|
||||
{ CS_CAM_CONTINUE, 0, 30, 60.0f, { -1969, 54, -1209 } },
|
||||
{ CS_CAM_CONTINUE, 0, 30, 60.0f, { -1973, 35, -1206 } },
|
||||
{ CS_CAM_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CAM_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CAM_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } },
|
||||
{ CS_CAM_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } },
|
||||
};
|
||||
static CutsceneCameraPoint D_8012021C[14] = {
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 72, -1077 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 7, -1048 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 1, -1030 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1987, 17, -1076 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } },
|
||||
{ CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -1969, 72, -1077 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -1969, 7, -1048 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -1969, 1, -1030 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -1987, 17, -1076 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } },
|
||||
{ CS_CAM_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CAM_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } },
|
||||
};
|
||||
static s16 D_801202FC = 13;
|
||||
static s16 D_80120300 = 210;
|
||||
static s16 D_80120304 = 0;
|
||||
|
||||
static CutsceneCameraPoint sCrawlspaceAtPoints[9] = {
|
||||
{ CS_CMD_CONTINUE, 0, 10, 40.0f, { 0, 4, 0 } }, { CS_CMD_CONTINUE, 0, 10, 40.000004f, { 0, 4, 0 } },
|
||||
{ CS_CMD_CONTINUE, 0, 10, 50.0f, { 0, 9, 0 } }, { CS_CMD_CONTINUE, 0, 12, 55.0f, { 0, 12, 0 } },
|
||||
{ CS_CMD_CONTINUE, 0, 15, 61.0f, { 0, 18, 0 } }, { CS_CMD_CONTINUE, 0, 20, 65.0f, { 0, 29, 0 } },
|
||||
{ CS_CMD_CONTINUE, 0, 40, 60.0f, { 0, 34, 0 } }, { CS_CMD_STOP, 0, 40, 60.0f, { 0, 34, 0 } },
|
||||
{ CS_CMD_STOP, 0, 10, 60.0f, { 0, 34, 0 } },
|
||||
{ CS_CAM_CONTINUE, 0, 10, 40.0f, { 0, 4, 0 } }, { CS_CAM_CONTINUE, 0, 10, 40.000004f, { 0, 4, 0 } },
|
||||
{ CS_CAM_CONTINUE, 0, 10, 50.0f, { 0, 9, 0 } }, { CS_CAM_CONTINUE, 0, 12, 55.0f, { 0, 12, 0 } },
|
||||
{ CS_CAM_CONTINUE, 0, 15, 61.0f, { 0, 18, 0 } }, { CS_CAM_CONTINUE, 0, 20, 65.0f, { 0, 29, 0 } },
|
||||
{ CS_CAM_CONTINUE, 0, 40, 60.0f, { 0, 34, 0 } }, { CS_CAM_STOP, 0, 40, 60.0f, { 0, 34, 0 } },
|
||||
{ CS_CAM_STOP, 0, 10, 60.0f, { 0, 34, 0 } },
|
||||
};
|
||||
static CutsceneCameraPoint sCrawlspaceForwardsEyePoints[9] = {
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, 45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, 50 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, 58 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, 78 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, 109 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, 118 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
|
||||
{ CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 9, 45 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 8, 50 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 17, 58 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 21, 78 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 46, 109 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 58, 118 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
|
||||
{ CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
|
||||
};
|
||||
static s16 sCrawlspaceUnused = 9;
|
||||
static s16 sCrawlspaceTimer = 90;
|
||||
static s16 sCrawlspaceActionParam = 1;
|
||||
static CutsceneCameraPoint sCrawlspaceBackwardsEyePoints[10] = {
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, -50 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, -58 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, -78 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, -109 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, -118 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, -119 } },
|
||||
{ CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 8, -50 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 17, -58 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 21, -78 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 46, -109 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 58, -118 } }, { CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 63, -119 } },
|
||||
{ CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, -119 } },
|
||||
};
|
||||
|
||||
static CutsceneCameraPoint D_801204D4[14] = {
|
||||
{ CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } },
|
||||
{ CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } },
|
||||
{ CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } },
|
||||
{ CS_CMD_CONTINUE, -18, 32, 80.600006f, { -80, 251, -8 } },
|
||||
{ CS_CMD_CONTINUE, -12, 28, 80.600006f, { -64, 259, -28 } },
|
||||
{ CS_CMD_CONTINUE, -8, 22, 80.600006f, { -79, 200, -342 } },
|
||||
{ CS_CMD_CONTINUE, -5, 10, 65.80005f, { -110, 140, -549 } },
|
||||
{ CS_CMD_CONTINUE, -2, 8, 65.2f, { -74, 109, -507 } },
|
||||
{ CS_CMD_CONTINUE, 0, 10, 65.80002f, { -32, 78, -680 } },
|
||||
{ CS_CMD_CONTINUE, 0, 20, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CMD_CONTINUE, 0, 30, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CMD_CONTINUE, 0, 40, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CAM_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } },
|
||||
{ CS_CAM_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } },
|
||||
{ CS_CAM_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } },
|
||||
{ CS_CAM_CONTINUE, -18, 32, 80.600006f, { -80, 251, -8 } },
|
||||
{ CS_CAM_CONTINUE, -12, 28, 80.600006f, { -64, 259, -28 } },
|
||||
{ CS_CAM_CONTINUE, -8, 22, 80.600006f, { -79, 200, -342 } },
|
||||
{ CS_CAM_CONTINUE, -5, 10, 65.80005f, { -110, 140, -549 } },
|
||||
{ CS_CAM_CONTINUE, -2, 8, 65.2f, { -74, 109, -507 } },
|
||||
{ CS_CAM_CONTINUE, 0, 10, 65.80002f, { -32, 78, -680 } },
|
||||
{ CS_CAM_CONTINUE, 0, 20, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CAM_CONTINUE, 0, 30, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CAM_CONTINUE, 0, 40, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CAM_STOP, 6, 30, 85.199936f, { 25, 127, -950 } },
|
||||
{ CS_CAM_STOP, 0, 30, 85.199936f, { 25, 127, -950 } },
|
||||
};
|
||||
static CutsceneCameraPoint D_801205B4[14] = {
|
||||
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -250, 244, -442 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -163, 21, -415 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -98, 86, -520 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -86, 31, -816 } },
|
||||
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -74, 18, -931 } },
|
||||
{ CS_CMD_CONTINUE, 1, 0, 80.600006f, { -91, 80, -1220 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 14, 153, -1340 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 28, 125, -1340 } },
|
||||
{ CS_CMD_CONTINUE, 0, 0, 85.199936f, { 48, 124, -1340 } },
|
||||
{ CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1502 } },
|
||||
{ CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1262 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -250, 244, -442 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -163, 21, -415 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -98, 86, -520 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -86, 31, -816 } },
|
||||
{ CS_CAM_CONTINUE, -21, 0, 80.600006f, { -74, 18, -931 } },
|
||||
{ CS_CAM_CONTINUE, 1, 0, 80.600006f, { -91, 80, -1220 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 85.199936f, { 14, 153, -1340 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 85.199936f, { 28, 125, -1340 } },
|
||||
{ CS_CAM_CONTINUE, 0, 0, 85.199936f, { 48, 124, -1340 } },
|
||||
{ CS_CAM_STOP, 0, 0, 85.199936f, { 48, 124, -1502 } },
|
||||
{ CS_CAM_STOP, 0, 0, 85.199936f, { 48, 124, -1262 } },
|
||||
};
|
||||
static s16 D_80120694 = 14;
|
||||
static s16 D_80120698 = 190;
|
||||
static s16 D_8012069C = 8;
|
||||
|
||||
static CutsceneCameraPoint D_801206A0[12] = {
|
||||
{ CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } },
|
||||
{ CS_CMD_CONTINUE, 6, 20, 70.0f, { -70, 35, 150 } }, { CS_CMD_CONTINUE, 5, 10, 60.0f, { -57, 34, 133 } },
|
||||
{ CS_CMD_CONTINUE, 4, 25, 65.0f, { -22, 32, 110 } }, { CS_CMD_CONTINUE, 3, 12, 60.0f, { -9, 33, 98 } },
|
||||
{ CS_CMD_CONTINUE, 3, 5, 65.0f, { -3, 29, 87 } }, { CS_CMD_CONTINUE, 2, 10, 65.0f, { -1, 15, 84 } },
|
||||
{ CS_CMD_CONTINUE, 1, 200, 65.0f, { 0, 17, 82 } }, { CS_CMD_CONTINUE, 1, 500, 65.0f, { 0, 18, 82 } },
|
||||
{ CS_CMD_STOP, 8, 50, 65.0f, { 0, 18, 82 } }, { CS_CMD_STOP, 11, 60, 65.0f, { 0, 18, 82 } },
|
||||
{ CS_CAM_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, { CS_CAM_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } },
|
||||
{ CS_CAM_CONTINUE, 6, 20, 70.0f, { -70, 35, 150 } }, { CS_CAM_CONTINUE, 5, 10, 60.0f, { -57, 34, 133 } },
|
||||
{ CS_CAM_CONTINUE, 4, 25, 65.0f, { -22, 32, 110 } }, { CS_CAM_CONTINUE, 3, 12, 60.0f, { -9, 33, 98 } },
|
||||
{ CS_CAM_CONTINUE, 3, 5, 65.0f, { -3, 29, 87 } }, { CS_CAM_CONTINUE, 2, 10, 65.0f, { -1, 15, 84 } },
|
||||
{ CS_CAM_CONTINUE, 1, 200, 65.0f, { 0, 17, 82 } }, { CS_CAM_CONTINUE, 1, 500, 65.0f, { 0, 18, 82 } },
|
||||
{ CS_CAM_STOP, 8, 50, 65.0f, { 0, 18, 82 } }, { CS_CAM_STOP, 11, 60, 65.0f, { 0, 18, 82 } },
|
||||
};
|
||||
static CutsceneCameraPoint D_80120760[12] = {
|
||||
{ CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 10, 180 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 20, 180 } },
|
||||
{ CS_CMD_CONTINUE, 6, 0, 70.0f, { -40, 30, 177 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 0, 35, 172 } },
|
||||
{ CS_CMD_CONTINUE, 4, 0, 65.0f, { 34, 35, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 61, 32, 147 } },
|
||||
{ CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 30, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
|
||||
{ CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
|
||||
{ CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
|
||||
{ CS_CAM_CONTINUE, 6, 0, 80.0f, { -50, 10, 180 } }, { CS_CAM_CONTINUE, 6, 0, 80.0f, { -50, 20, 180 } },
|
||||
{ CS_CAM_CONTINUE, 6, 0, 70.0f, { -40, 30, 177 } }, { CS_CAM_CONTINUE, 5, 0, 65.0f, { 0, 35, 172 } },
|
||||
{ CS_CAM_CONTINUE, 4, 0, 65.0f, { 34, 35, 162 } }, { CS_CAM_CONTINUE, 3, 0, 65.0f, { 61, 32, 147 } },
|
||||
{ CS_CAM_CONTINUE, 3, 0, 65.0f, { 72, 30, 128 } }, { CS_CAM_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
|
||||
{ CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
|
||||
{ CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
|
||||
};
|
||||
static CutsceneCameraPoint D_80120820[12] = {
|
||||
{ CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 5, 170 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 10, 170 } },
|
||||
{ CS_CMD_CONTINUE, 6, 0, 70.0f, { 80, 20, 167 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 74, 25, 165 } },
|
||||
{ CS_CMD_CONTINUE, 4, 0, 65.0f, { 63, 30, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 66, 34, 147 } },
|
||||
{ CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 34, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
|
||||
{ CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
|
||||
{ CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
|
||||
{ CS_CAM_CONTINUE, 6, 0, 80.0f, { 85, 5, 170 } }, { CS_CAM_CONTINUE, 6, 0, 80.0f, { 85, 10, 170 } },
|
||||
{ CS_CAM_CONTINUE, 6, 0, 70.0f, { 80, 20, 167 } }, { CS_CAM_CONTINUE, 5, 0, 65.0f, { 74, 25, 165 } },
|
||||
{ CS_CAM_CONTINUE, 4, 0, 65.0f, { 63, 30, 162 } }, { CS_CAM_CONTINUE, 3, 0, 65.0f, { 66, 34, 147 } },
|
||||
{ CS_CAM_CONTINUE, 3, 0, 65.0f, { 72, 34, 128 } }, { CS_CAM_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
|
||||
{ CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
|
||||
{ CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
|
||||
};
|
||||
static s16 D_801208E0 = 12;
|
||||
static s16 D_801208E4 = 90;
|
||||
|
|
|
@ -4302,12 +4302,12 @@ void Interface_Update(PlayState* play) {
|
|||
gSaveContext.nextDayTime = NEXT_TIME_NIGHT;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
play->unk_11DE9 = true;
|
||||
play->haltAllActors = true;
|
||||
} else {
|
||||
gSaveContext.nextDayTime = NEXT_TIME_DAY;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
play->unk_11DE9 = true;
|
||||
play->haltAllActors = true;
|
||||
}
|
||||
|
||||
if (play->sceneId == SCENE_HAUNTED_WASTELAND) {
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
#include "quake.h"
|
||||
#include "terminal.h"
|
||||
|
||||
void* D_8012D1F0 = NULL;
|
||||
void* gDebugCutsceneScript = NULL;
|
||||
UNK_TYPE D_8012D1F4 = 0; // unused
|
||||
Input* D_8012D1F8 = NULL;
|
||||
|
||||
TransitionUnk sTrnsnUnk;
|
||||
s32 gTrnsnUnkState;
|
||||
VisMono D_80161498;
|
||||
Color_RGBA8_u32 D_801614B0;
|
||||
Color_RGBA8_u32 gVisMonoColor;
|
||||
FaultClient D_801614B8;
|
||||
s16 sTransitionFillTimer;
|
||||
u64 D_801614D0[0xA00];
|
||||
u64 sDebugCutsceneScriptBuf[0xA00];
|
||||
|
||||
void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn);
|
||||
|
||||
|
@ -198,7 +198,7 @@ void Play_Destroy(GameState* thisx) {
|
|||
}
|
||||
|
||||
Letterbox_Destroy();
|
||||
TransitionFade_Destroy(&this->transitionFade);
|
||||
TransitionFade_Destroy(&this->transitionFadeFlash);
|
||||
VisMono_Destroy(&D_80161498);
|
||||
|
||||
if (gSaveContext.linkAge != this->linkAgeOnLoad) {
|
||||
|
@ -266,7 +266,7 @@ void Play_Init(GameState* thisx) {
|
|||
EffectSs_InitInfo(this, 0x55);
|
||||
CollisionCheck_InitContext(this, &this->colChkCtx);
|
||||
AnimationContext_Reset(&this->animationCtx);
|
||||
func_8006450C(this, &this->csCtx);
|
||||
Cutscene_InitContext(this, &this->csCtx);
|
||||
|
||||
if (gSaveContext.nextCutsceneIndex != 0xFFEF) {
|
||||
gSaveContext.cutsceneIndex = gSaveContext.nextCutsceneIndex;
|
||||
|
@ -371,7 +371,7 @@ void Play_Init(GameState* thisx) {
|
|||
this->transitionTrigger = TRANS_TRIGGER_END;
|
||||
this->unk_11E16 = 0xFF;
|
||||
this->unk_11E18 = 0;
|
||||
this->unk_11DE9 = false;
|
||||
this->haltAllActors = false;
|
||||
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
|
@ -386,13 +386,13 @@ void Play_Init(GameState* thisx) {
|
|||
}
|
||||
|
||||
Letterbox_Init();
|
||||
TransitionFade_Init(&this->transitionFade);
|
||||
TransitionFade_SetType(&this->transitionFade, 3);
|
||||
TransitionFade_SetColor(&this->transitionFade, RGBA8(160, 160, 160, 255));
|
||||
TransitionFade_Start(&this->transitionFade);
|
||||
TransitionFade_Init(&this->transitionFadeFlash);
|
||||
TransitionFade_SetType(&this->transitionFadeFlash, TRANS_INSTANCE_TYPE_FADE_FLASH);
|
||||
TransitionFade_SetColor(&this->transitionFadeFlash, RGBA8(160, 160, 160, 255));
|
||||
TransitionFade_Start(&this->transitionFadeFlash);
|
||||
VisMono_Init(&D_80161498);
|
||||
D_801614B0.a = 0;
|
||||
Flags_UnsetAllEnv(this);
|
||||
gVisMonoColor.a = 0;
|
||||
CutsceneFlags_UnsetAll(this);
|
||||
|
||||
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetRemaining(&this->state.tha));
|
||||
zAllocSize = THA_GetRemaining(&this->state.tha);
|
||||
|
@ -436,10 +436,13 @@ void Play_Init(GameState* thisx) {
|
|||
AnimationContext_Update(this, &this->animationCtx);
|
||||
gSaveContext.respawnFlag = 0;
|
||||
|
||||
if (dREG(95) != 0) {
|
||||
D_8012D1F0 = D_801614D0;
|
||||
osSyncPrintf("\nkawauso_data=[%x]", D_8012D1F0);
|
||||
DmaMgr_DmaRomToRam(0x03FEB000, D_8012D1F0, sizeof(D_801614D0));
|
||||
if (R_USE_DEBUG_CUTSCENE) {
|
||||
gDebugCutsceneScript = sDebugCutsceneScriptBuf;
|
||||
osSyncPrintf("\nkawauso_data=[%x]", gDebugCutsceneScript);
|
||||
|
||||
// This hardcoded ROM address extends past the end of the ROM file.
|
||||
// Presumably the ROM was larger at a previous point in development when this debug feature was used.
|
||||
DmaMgr_DmaRomToRam(0x03FEB000, gDebugCutsceneScript, sizeof(sDebugCutsceneScriptBuf));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -609,9 +612,9 @@ void Play_Update(PlayState* this) {
|
|||
}
|
||||
|
||||
if (this->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
this->transitionCtx.setType(&this->transitionCtx.instanceData, 1);
|
||||
this->transitionCtx.setType(&this->transitionCtx.instanceData, TRANS_INSTANCE_TYPE_FILL_OUT);
|
||||
} else {
|
||||
this->transitionCtx.setType(&this->transitionCtx.instanceData, 2);
|
||||
this->transitionCtx.setType(&this->transitionCtx.instanceData, TRANS_INSTANCE_TYPE_FILL_IN);
|
||||
}
|
||||
|
||||
this->transitionCtx.start(&this->transitionCtx.instanceData);
|
||||
|
@ -888,15 +891,15 @@ void Play_Update(PlayState* this) {
|
|||
|
||||
PLAY_LOG(3637);
|
||||
|
||||
if (!this->unk_11DE9) {
|
||||
if (!this->haltAllActors) {
|
||||
Actor_UpdateAll(this, &this->actorCtx);
|
||||
}
|
||||
|
||||
PLAY_LOG(3643);
|
||||
func_80064558(this, &this->csCtx);
|
||||
Cutscene_UpdateManual(this, &this->csCtx);
|
||||
|
||||
PLAY_LOG(3648);
|
||||
func_800645A0(this, &this->csCtx);
|
||||
Cutscene_UpdateScripted(this, &this->csCtx);
|
||||
|
||||
PLAY_LOG(3651);
|
||||
Effect_UpdateAll(this);
|
||||
|
@ -970,7 +973,7 @@ void Play_Update(PlayState* this) {
|
|||
Letterbox_Update(R_UPDATE_RATE);
|
||||
|
||||
PLAY_LOG(3783);
|
||||
TransitionFade_Update(&this->transitionFade, R_UPDATE_RATE);
|
||||
TransitionFade_Update(&this->transitionFadeFlash, R_UPDATE_RATE);
|
||||
} else {
|
||||
goto skip;
|
||||
}
|
||||
|
@ -1094,10 +1097,10 @@ void Play_Draw(PlayState* this) {
|
|||
this->transitionCtx.draw(&this->transitionCtx.instanceData, &gfxP);
|
||||
}
|
||||
|
||||
TransitionFade_Draw(&this->transitionFade, &gfxP);
|
||||
TransitionFade_Draw(&this->transitionFadeFlash, &gfxP);
|
||||
|
||||
if (D_801614B0.a > 0) {
|
||||
D_80161498.primColor.rgba = D_801614B0.rgba;
|
||||
if (gVisMonoColor.a > 0) {
|
||||
D_80161498.primColor.rgba = gVisMonoColor.rgba;
|
||||
VisMono_Draw(&D_80161498, &gfxP);
|
||||
}
|
||||
|
||||
|
|
|
@ -1130,7 +1130,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
|||
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_25)) {
|
||||
dLists = gPlayerLeftHandOpenDLs + gSaveContext.linkAge;
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_OPEN;
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) &&
|
||||
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speed > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
dLists = gPlayerLeftHandClosedDLs + gSaveContext.linkAge;
|
||||
sLeftHandType = PLAYER_MODELTYPE_LH_CLOSED;
|
||||
|
@ -1142,7 +1142,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
|||
|
||||
if (sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) {
|
||||
dLists += this->currentShield * 4;
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speedXZ > 2.0f) &&
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_OPEN) && (this->actor.speed > 2.0f) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
dLists = sPlayerRightHandClosedDLs + gSaveContext.linkAge;
|
||||
sRightHandType = PLAYER_MODELTYPE_RH_CLOSED;
|
||||
|
|
|
@ -443,8 +443,8 @@ void Scene_CommandAlternateHeaderList(PlayState* play, SceneCmd* cmd) {
|
|||
}
|
||||
|
||||
void Scene_CommandCutsceneData(PlayState* play, SceneCmd* cmd) {
|
||||
osSyncPrintf("\ngame_play->demo_play.data=[%x]", play->csCtx.segment);
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(cmd->cutsceneData.data);
|
||||
osSyncPrintf("\ngame_play->demo_play.data=[%x]", play->csCtx.script);
|
||||
play->csCtx.script = SEGMENTED_TO_VIRTUAL(cmd->cutsceneData.data);
|
||||
}
|
||||
|
||||
// Camera & World Map Area
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue