simplify recordings

This commit is contained in:
Sonic Dreamcaster
2025-06-21 01:34:58 -03:00
parent c108cd9012
commit 5a0f13f794
6 changed files with 59 additions and 77 deletions
+2 -3
View File
@@ -14,9 +14,8 @@ typedef struct Record {
u16 frame;
} Record;
extern u8 gCarrierCutsceneRecord[200];
extern Record gCarrierCutsceneRecord[13];
void UpdateVisPerFrameFromRecording(u8* record, s32 maxFrames);
void UpdateVisPerFrameFromRecording2(Record* record, s32 maxFrames);
void UpdateVisPerFrameFromRecording(Record* record, s32 maxFrames);
#endif
+1 -7
View File
@@ -22,13 +22,7 @@
#include "fox_co.h"
#include "fox_record.h"
void UpdateVisPerFrameFromRecording(u8* record, s32 maxFrames) {
if (gCsFrameCount < maxFrames) {
gVIsPerFrame = record[gCsFrameCount];
}
}
void UpdateVisPerFrameFromRecording2(Record* record, s32 maxFrames) {
void UpdateVisPerFrameFromRecording(Record* record, s32 maxFrames) {
int i;
if (gCsFrameCount > record[maxFrames - 1].frame) {
+29 -25
View File
@@ -12,31 +12,37 @@
#include "fox_record.h"
// Carrier destroy cutscene timings recorded from a real N64
u8 gCarrierCutsceneRecord[200] = {
0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x05, 0x05, 0x04, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02
Record gCarrierCutsceneRecord[] = {
{ 2, 0 },
{ 3, 2 },
{ 4, 16 },
{ 3, 50 },
{ 4, 58 },
{ 5, 67 },
{ 4, 68 },
{ 5, 71 },
{ 4, 73 },
{ 5, 74 },
{ 4, 106 },
{ 3, 146 },
{ 2, 194 },
};
// Granga destroy cutscene timings recorded from a real N64
u8 gGrangaCutsceneRecord[161] = {
0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x02, 0x03, 0x03, 0x02
Record gGrangaCutsceneRecord[] = {
{ 2, 0 },
{ 3, 1 },
{ 2, 5 },
{ 3, 7 },
{ 2, 52 },
{ 3, 78 },
{ 4, 103 },
{ 3, 125 },
{ 2, 153 },
{ 3, 155 },
{ 2, 157 },
{ 3, 158 },
{ 2, 160 },
};
u8 sFightCarrier;
@@ -211,9 +217,7 @@ void Corneria_CoGranga_HandleDamage(CoGranga* this) {
this->state = GRANGA_EXPLODE;
this->timer_050 = 100; // original value
// @port: Adjust timing to compensate the lack of lag.
// this->timer_050 = 138; // @port
this->timer_050 = 100;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80);
+4 -13
View File
@@ -9,19 +9,10 @@
#include "fox_record.h"
// MeCrusher destroy cutscene timings recorded from a real N64
u8 gMeCrusherCutsceneRecord[] = {
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02
Record gMeCrusherCutsceneRecord[] = {
{ 2, 0 },
{ 3, 200 },
{ 2, 224 },
};
Vec3f D_i2_80195430[] = {
+19 -19
View File
@@ -61,26 +61,26 @@ Vec3f D_i5_801BE6A0[12];
s32 D_i5_801BE734[4];
// Train cutscene timings recorded from a real N64
Record sf64_virecord_macbeth_records[] = {
Record gMacbethCutsceneRecord[] = {
// Train breaking barriers
{ 0x02, 0x000000 },
{ 0x03, 0x000002 },
{ 0x02, 0x00001F },
{ 0x03, 0x000190 },
{ 0x02, 0x0001A2 },
{ 0x03, 0x0001B1 },
{ 0x04, 0x0001B3 },
{ 0x03, 0x0001BC },
{ 0x02, 0x0001FD },
// { 0x03, 0x00022F },
// { 0x02, 0x000245 },
// { 0x03, 0x00024B },
{ 2, 0 },
{ 3, 2 },
{ 2, 31 },
{ 3, 400 },
{ 2, 418 },
{ 3, 433 },
{ 4, 435 },
{ 3, 444 },
{ 2, 509 },
// { 3, 559 },
// { 2, 581 },
// { 3, 587 },
// Explosions
{ 0x02, 0x00024D },
{ 0x03, 0x0002CA },
{ 0x04, 0x000335 },
{ 0x05, 0x000351 },
{ 0x02, 0x0003AE },
{ 2, 589 },
{ 3, 714 },
{ 4, 821 },
{ 5, 849 },
{ 2, 942 },
};
UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = {
@@ -6509,7 +6509,7 @@ void Macbeth_LevelComplete2(Player* player) {
Vec3f spD8;
f32 zeroVar = 0.0f;
UpdateVisPerFrameFromRecording2(sf64_virecord_macbeth_records, ARRAY_COUNT(sf64_virecord_macbeth_records));
UpdateVisPerFrameFromRecording(gMacbethCutsceneRecord, ARRAY_COUNT(gMacbethCutsceneRecord));
switch (player->csState) {
case 0:
+4 -10
View File
@@ -31,16 +31,10 @@ void SectorY_ActorDebris_Setup(Actor*, f32, f32, f32, f32, f32, f32, s32);
void SectorY_ActorDebris_Spawn(f32, f32, f32, f32, f32, f32, s32);
// SyRobot destroy cutscene timings recorded from a real N64
u8 gSyRobotCutsceneRecord[158] = {
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02
Record gSyRobotCutsceneRecord[] = {
{ 2, 0 },
{ 3, 129 },
{ 2, 230 },
};
f32 D_i6_801A8440[3];