mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-10 13:11:50 +09:00
movie format changes
This commit is contained in:
@@ -130,6 +130,8 @@ let height = readShort()
|
|||||||
let fps = readShort(); if (fps == 0) fps = 9999
|
let fps = readShort(); if (fps == 0) fps = 9999
|
||||||
let frameTime = 1.0 / fps
|
let frameTime = 1.0 / fps
|
||||||
let frameCount = readInt() % 16777216
|
let frameCount = readInt() % 16777216
|
||||||
|
let type = readShort()
|
||||||
|
sys.free(readBytes(12)) // skip 12 bytes
|
||||||
let akku = frameTime
|
let akku = frameTime
|
||||||
let framesRendered = 0
|
let framesRendered = 0
|
||||||
//serial.println(readCount) // must say 18
|
//serial.println(readCount) // must say 18
|
||||||
|
|||||||
@@ -21,11 +21,13 @@ function appendToOutfilePtr(ptr, len) {
|
|||||||
|
|
||||||
// write header to the file
|
// write header to the file
|
||||||
let headerBytes = [
|
let headerBytes = [
|
||||||
0x1F, 0x54, 0x53, 0x56, 0x4D, 0x4D, 0x4F, 0x56,
|
0x1F, 0x54, 0x53, 0x56, 0x4D, 0x4D, 0x4F, 0x56, // magic
|
||||||
0x30, 0x02,
|
0x30, 0x02, // width (560)
|
||||||
0xC0, 0x01,
|
0xC0, 0x01, // height (448)
|
||||||
0x1E, 0x00,
|
0x1E, 0x00, // FPS (30)
|
||||||
0x34, 0x00, 0x00, 0x7C
|
0x34, 0x00, 0x00, 0x00, // frame count (52)
|
||||||
|
0x00, 0x00, // type 0 frames
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // reserved
|
||||||
]
|
]
|
||||||
|
|
||||||
filesystem.open("A", outfilename, "W")
|
filesystem.open("A", outfilename, "W")
|
||||||
|
|||||||
@@ -292,10 +292,26 @@ METADATA -
|
|||||||
uint16 WIDTH
|
uint16 WIDTH
|
||||||
uint16 HEIGHT
|
uint16 HEIGHT
|
||||||
uint16 FPS (0: play as fast as can)
|
uint16 FPS (0: play as fast as can)
|
||||||
uint24 NUMBER OF FRAMES
|
uint32 NUMBER OF FRAMES
|
||||||
\x7C
|
uint16 TYPE
|
||||||
|
byte[12] RESERVED
|
||||||
|
|
||||||
FRAME -
|
Type:
|
||||||
|
0: 256-Colour frame
|
||||||
|
1: 256-Colour frame with palette data
|
||||||
|
2: 4096-Colour frame (stored as two byte-planes)
|
||||||
|
|
||||||
|
TYPE 0 FRAME -
|
||||||
uint32 SIZE OF FRAMEDATA
|
uint32 SIZE OF FRAMEDATA
|
||||||
* FRAMEDATA COMPRESSED IN GZIP
|
* FRAMEDATA COMPRESSED IN GZIP
|
||||||
|
|
||||||
|
TYPE 1 FRAME -
|
||||||
|
byte[512] Palette Data
|
||||||
|
uint32 SIZE OF FRAMEDATA
|
||||||
|
* FRAMEDATA COMPRESSED IN GZIP
|
||||||
|
|
||||||
|
TYPE 2 FRAME -
|
||||||
|
uint32 SIZE OF FRAMEDATA BYTE-PLANE 1
|
||||||
|
* FRAMEDATA COMPRESSED IN GZIP
|
||||||
|
uint32 SIZE OF FRAMEDATA BYTE-PLANE 2
|
||||||
|
* FRAMEDATA COMPRESSED IN GZIP
|
||||||
Reference in New Issue
Block a user