summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--str-util.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/str-util.cpp b/str-util.cpp
index c944508..f735758 100644
--- a/str-util.cpp
+++ b/str-util.cpp
@@ -37,7 +37,7 @@ struct STR_Header {
Uint16 Channels;
} __attribute__((packed));
-
+Byte * video = 0, * audio = 0;
void process_one_sector(FILE * f) {
Byte sector[2336];
@@ -64,6 +64,13 @@ void process_one_sector(FILE * f) {
printm(M_BARE, "Movie HeadM : %08x\n", h->StMOVIE_HEADM);
printm(M_BARE, "Movie HeadV : %08x\n", h->StMOVIE_HEADV);
printm(M_BARE, "Channels : %04x\n", h->Channels);
+ if (h->StSECTOR_OFFSET == 0) {
+ video = (Byte *) malloc(h->StSECTOR_SIZE * 2016);
+ }
+
+ memcpy(video + h->StSECTOR_OFFSET * 2016, sector + 40);
+
+
} else if (sector[2] == 0x64) {
printm(M_BARE, "Audio sector\n");
} else {