Daggerfall

From XentaxWiki
Jump to: navigation, search

Back to index

Choose archive extension:

SND


Format Specifications

// MexCom - Recreation of Daggerfall .SND
// THIS IS AN AUTOMATED SPECIFICATION
// READ WITH CARE
// ----------------------------
// LEGEND
// ----------------------------
// ==> (Jump to offset)
// #DECLARE (Set variable to value)
// $$ CALCULATE (Calculate a new value)
// ** (Section that repeats itself on condition)
// // (Comment)
// uint32{4} (Unsigned 32-bit value, 4 bytes)
// uint16{2} (Unsigned 16-bit value, 2 bytes)
// ubyte{1} (Unsigned 8-bit value, 1 byte)
// char{n} (String value, n bytes in length
// ----------------------------


// Format Specification


uint16{2}		FC

$$ CALCULATE TAIL * 8
#DECLARE END = CURRENT OFFSET
$$ CALCULATE END - TAIL
$$ CALCULATE END + 1


==>END
#DECLARE OFF = 4


** Start Repeated entry (T) {FC}
uint32{4}		FN
uint32{4}		SIZE


// Resources have a name (FN), are located at OFF and have a size of SIZE
$$ CALCULATE OFF + SIZE
** End Repeated entry (T)
// ----------------------------
// MexCom - Recreation complete 

MultiEx BMS

Get FC Int 0 ;
Set TAIL Long FC ;
Math TAIL *= 8 ;
GoTo EOF 0 ;
SavePos END 0 ;
Math END -= TAIL ;
Math END += 1 ;
GoTo END 0 ;
Set OFF Long 4 ;
For T = 1 To FC ;
Get FN Long 0 ;
Get SIZE Long 0 ;
Log FN OFF SIZE 0 0 ;
Math OFF += SIZE ;
Next T ;


Notes and Comments

None


Supported by Programs