Syndicate Wars DAT
From XentaxWiki
Revision as of 17:14, 21 January 2021 by Ikskoks (talk | contribs) (Ikskoks moved page Syndicate Wars to Syndicate Wars DAT)
Choose archive extension:
Contents
DAT
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// MexCom - Recreation of formats\Syndicate Wars (SOUND\DAT.bms // 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 ==> End Of File #DECLARE TE = CURRENT OFFSET $$ CALCULATE TE - 3 ==>TE uint32{4} TEND $$ CALCULATE TE - 52 ==>TE uint32{4} TS $$ CALCULATE TEND - TS $$ CALCULATE TEND + 32 $$ CALCULATE FN / 32 $$ CALCULATE FN - 1 ==>TEND #DECLARE FST = CURRENT OFFSET ** Start Repeated entry (T) {FN} char{} FNAME $$ CALCULATE FST + 18 ==>FST #DECLARE FOO = CURRENT OFFSET uint32{4} FOFF uint32{4} D #DECLARE FSO = CURRENT OFFSET uint32{4} FSIZE #DECLARE FST = CURRENT OFFSET $$ CALCULATE FST + 2 ==>FST // Resources have a name (FNAME), are located at FOFF and have a size of FSIZE ** End Repeated entry (T) // ---------------------------- // MexCom - Recreation complete
MultiEx BMS
ImpType StandardTail ; GoTo EOF 0 ; SavePos TE 0 ; Math TE -= 3 ; GoTo TE 0 ; Get TEND Long 0 ; Math TE -= 52 ; GoTo TE 0 ; Get TS Long 0 ; Math TEND -= TS ; Math TEND += 32 ; Set FN Long TS ; Math FN /= 32 ; Math FN -= 1 ; GoTo TEND 0 ; SavePos FST 0 ; For T = 1 To FN ; Get FNAME String 0 ; Math FST += 18 ; GoTo FST 0 ; SavePos FOO 0 ; Get FOFF Long 0 ; Get D Long 0 ; SavePos FSO 0 ; Get FSIZE Long 0 ; SavePos FST 0 ; Math FST += 2 ; GoTo FST 0 ; Log FNAME FOFF FSIZE FOO FSO ; Next T ;
Notes and Comments
None