Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Reading Tribes 1 dts files
# Basic attempt at reading Tribes 1 .dts files
# Appears to be some sort of nested IFF-like block format[0]) do |f|
pos = 0
while !f.eof pos
magic ="L<")[0]
if magic != 0x53524550 # PERS
pos += 1
size, namesize ="L<S<")
name =
puts "BLOCK: #{name} @ #{pos} [#{size} bytes]"
pos += 4+4+2+namesize # Skip this block header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment