diff options
| author | comex <comexk@gmail.com> | 2009-01-30 19:42:57 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2009-01-30 19:42:57 -0500 |
| commit | 8976f791687bfeaea196bbe945333f43cd17a630 (patch) | |
| tree | 960628c5b380f362506e946ff626a43550881ed8 /ethyl.py | |
| parent | 704a47ab196c4e28f217be125454c35091493302 (diff) | |
temp stuff
Diffstat (limited to 'ethyl.py')
| -rw-r--r-- | ethyl.py | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -59,6 +59,20 @@ formats = { float width float height ''', + 'material': ''' + char name[0x14] // 0 + s16 tev_color[4] // 14 + s16 unkx // 1c + s16 unk5 // 20 + s16 unk6 // 22 + s16 unk7 // 24 + s16 unk8 // 26 + s16 unk9 // 28 + s16 unka // 2a + u32 tev_kcolor[4] // 2c + u32 flags // 3c - 814fee68 - see doc + etc! + ''', } @@ -228,4 +242,10 @@ def iff_to_chunks(z): data = z[pos+8:pos+length] pos += length chunks.append((cc, data)) - return chunks
\ No newline at end of file + return chunks +def bit_extract(num, start, end): + mask = (2**(31 - start + 1) - 1) - (2**(31 - end) - 1) + ret = (num & mask) >> (31 - end) + + return ret + |
