unit kolPortalDatConsts; interface type pdFileGroup = packed record GID : Byte; Name : String; end; const { ======================================================================== Internal. ======================================================================== } AC1RootDir : LongWord = $148; AC2RootDir : LongWord = $14C; AC3RootDir : LongWord = $160; ACIDLoc : LongWord = $12C; AC1MaxFile : LongWord = 64; AC2MaxFile : LongWord = 48; // DB is DirBlock DBFileCount = 63; // PortalDat version. pdverID = $00005442; pdverOne = 1; pdverTwo = 2; pdverThree = 3; { ======================================================================== Error codes. ======================================================================== } pderrSuccess = 0; pderrInvalidPortalDat = 1; pderrUnknownPortalDat = 2; pderrUnknown = $10; pderrNotParsed = $100; pderrBadFileID = $110; pderrBadPDVers = $111; pderrExtractFailed = $800; pderrDestNotInitialized = $900; pderrSourceNotInitialized = $901; pderrBadInjectSourceSize = $1000; pderrInvalidImageFileID = $1100; type PAC2KeyTable = ^TAC2KeyTable; TAC2KeyTable = Array[0..15] of LongWord; { ======================================================================== String Key Table used in AC2 Strings. ======================================================================== } (* StringKeyTable : Array[0..15] of LongWord = ( $E5849238, $EB2D767D, $FC0FDD03, $CB45A6A6, $7F21E6BB, $F5A6CDC8, $22D9AD12, $B2A3D4DE, $3B834DB7, $C406C91C, $8392305E, $0A9F0099, $0943B90C, $A66D953C, $0D929E1F, $0E2E9AD4 ); *) function StringKeyTable: TAC2KeyTable; { ======================================================================== AC Filegroups. ======================================================================== } function AC1FileGroupName(FileID: LongWord): String; function AC2FileGroupName(FileID: LongWord): String; implementation function StringKeyTable: TAC2KeyTable; begin Result[0] := $E5849238; Result[1] := $EB2D767D; Result[2] := $FC0FDD03; Result[3] := $CB45A6A6; Result[4] := $7F21E6BB; Result[5] := $F5A6CDC8; Result[6] := $22D9AD12; Result[7] := $B2A3D4DE; Result[8] := $3B834DB7; Result[9] := $C406C91C; Result[10] := $8392305E; Result[11] := $0A9F0099; Result[12] := $0943B90C; Result[13] := $A66D953C; Result[14] := $0D929E1F; Result[15] := $0E2E9AD4; end; function AC1FileGroupName(FileID: LongWord): String; begin case (FileID shr 24) of $01 : result := 'Simple objects'; $02 : result := 'Complex objects'; $03 : result := 'Animations'; $04 : result := 'Color lookup tables'; $05 : result := 'Textures'; $06 : result := 'UI graphics'; $07 : result := 'Texture info'; $08 : result := 'Animation strips'; $0A : result := 'Sounds'; $0D : result := 'Dungeon blocks'; $0E : result := 'Tables'; $0F : result := 'CLUT lists'; $10 : result := 'Complex object lists'; $11 : result := 'Simple object quaternions'; $31 : result := 'UI text'; else result := 'Unknown'; end; end; function AC2FileGroupName(FileID: LongWord): String; begin case (FileID shr 24) of $01 : result := 'Cellmesh'; $02 : result := 'Scene'; $03 : result := 'Animation map'; $04 : result := 'Setup'; $05 : result := 'Animation'; $06 : result := 'Mesh'; $0A : result := 'Weenie filter'; $0C : result := 'Sound (WAV)'; $0E : result := 'Weenie'; $0F : result := 'Landscape'; $10 : result := 'Landscape'; $11 : result := 'Landscape'; $12 : result := 'Landscape'; $13 : result := 'Landscape'; $14 : result := 'Landscape'; $15 : result := 'Landscape'; $16 : result := 'Landscape'; $17 : result := 'Landscape'; $18 : result := 'Landscape'; $19 : result := 'Landscape'; $1A : result := 'Landscape'; $1D : result := 'Keymap'; $1E : result := 'FXTable'; $1F : result := 'VDesc'; $20 : result := 'Appearance'; $21 : result := 'UI Scene'; $22 : result := 'UI Layout'; $23 : result := 'Emp'; $24 : result := 'Sound (MID)'; $25 : result := 'Stringtable'; $26 : result := 'Stringtable'; $27 : result := 'Fmt'; $28 : result := 'Emp IDMap'; $29 : result := 'Sound EnvInfo'; $2A : result := 'Sound (SIF)'; $2B : result := 'Materials'; $2C : result := 'Sound (MIF)'; $2F : result := 'Animation system'; $30 : result := 'Materials (MM)'; $31 : result := 'Materials (MI)'; $32 : result := 'Animation system'; $34 : result := 'Emp property'; $35 : result := 'Landscape'; $36 : result := 'Landscape'; $37 : result := 'Pmat'; $38 : result := 'Obstacle Description'; $39 : result := 'Particles'; $40 : result := 'Textures'; $41 : result := 'Surfaces'; $42 : result := 'Fonts'; $44 : result := 'Behaviortable'; $46 : result := 'Entitygroup'; $47 : result := 'Entity'; $51 : result := 'Actionmap'; $52 : result := 'Emp contentor & perfmon'; $54 : result := 'Animation System'; $55 : result := 'Animation'; $56 : result := 'Weenie wsl'; $57 : result := 'FXScript'; $58 : result := 'Stringtable'; $59 : result := 'Landscape detail & notes'; $60 : result := 'Conversation'; $61 : result := 'Sound (MP3)'; $62 : result := 'Emp DB categories'; else result := 'Unknown'; end; end; end.