Difference between revisions of "Daggerfall"

From XentaxWiki
Jump to: navigation, search
m (Format Specifications)
 
Line 88: Line 88:
 
<!-- Insert programs that open the format here -->
 
<!-- Insert programs that open the format here -->
 
* [[MultiEx_Commander|MultiEx Commander]]
 
* [[MultiEx_Commander|MultiEx Commander]]
 +
 +
 +
[[Category:File Format]]

Latest revision as of 16:09, 3 January 2021

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