-
Notifications
You must be signed in to change notification settings - Fork 0
/
SWIFv2.bt
64 lines (52 loc) · 1.45 KB
/
SWIFv2.bt
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
53
54
55
56
57
58
59
60
61
62
63
64
//------------------------------------------------
//--- 010 Editor v12.0.1 Binary Template
//
// File: SWIF.bt
// Authors: ĐeäTh
// Version: 1.0.0
// Purpose: Parse Surfride Draw Project files.
// Supported Games:
// - Mario & Sonic at the London 2012 Olympic Games (Nintendo Wii, Nintendo 3DS) - Files with UnknownDate set to 2010-12-07
//------------------------------------------------
#include "include.h"
local int VERSION = 1;
// Info Chunk
SRS_INFO_CHUNK InfoChunk;
// Texture List / Project Chunk
FSeek(InfoChunk.NextChunkOffset);
local uint64 o<hidden=true> = FTell();
local int i;
local int isBigEndian = IsBigEndian();
local uint Signature = ReadUInt(o);
for (i = 0; i < InfoChunk.ChunkCount; i++)
{
while (Signature != 0x52505753 || Signature != 0x4C545753)
{
LittleEndian();
if (Signature == 0x52505753 || Signature == 0x4C545753)
break;
o = FTell();
Signature = ReadUInt(o);
FSkip(4);
}
if (isBigEndian) BigEndian();
if (Signature == 0x4C545753)
{
FSeek(o); SRS_TEXTURELIST_CHUNK TextureListChunk;
}
else if (Signature == 0x52505753)
{
FSeek(o); SRS_PROJECT_CHUNK ProjectChunk;
}
o = FTell();
if (o % 16 != 0)
{
FSkip(16 - (o % 16)); o = FTell();
}
Signature = ReadUInt(o);
}
// Offset Chunk
FSeek(InfoChunk.OffsetChunkOffset);
SRS_OFFSET_CHUNK OffsetChunk;
// End Chunk
SRS_END_CHUNK EndChunk;