-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswsnipz.txt
53 lines (47 loc) · 1.49 KB
/
swsnipz.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
to-dos , notes , and code snippets:
[TODO]
parse KEY*
proccess CASt and clut
copy BITD handler from projectorrays
implement methods to check if file is a movie or an external cast
start parsing DCR/CCT formats
[done]
discern purpose of STXT section: Styled Text
[NOTES]
purpose of packages/classes (riff):
File : wrapper and handler of a RIFF-formated binary file
Section : wrapper for an individual chunk/section of a RIFF file
SectionHandler : processor of a section
LinkedSectionHandler : processor of a section that uses the containing File's
processing methods
purpose of packages/classes (earthquake):
containers : actual file structure
ContainerCompressed : handle DCR/CCT
Container : handle DIR/CST
ContainerProtected : handle DXR/CXT
scripting : scripting stuff
Movie : object containing one or more casts, can run stand-alone,
wrapped around one of the three types of file handlers
castlib : casts and cast members
Cast : object containing zero or more cast members, can be stored inside a movie or in own file
CastMember : a cast member, contains all internal assets and source code
[CODE]
var varint = 0;
var result = 0;
do {
varint = ShockwaveChunk.readUint8();
result |= varint & 0x7F;
result = result << 7;
} while(varint & 0x80 >> 7);
result = result >> 7;
var varint = 0;
var result = 0;
while (true) {
varint = ShockwaveChunk.readUint8();
result |= varint & 0x7F;
result = result << 7;
if (!(varint & 0x80 >> 7)) {
break;
}
}
result = result >> 7;