//::///////////////////////////////////////////////
//:: NeverPas - Generic Types
//:: nw_generic.pas
//:: Copyright (c) 2003 Errant Logic.
//:://////////////////////////////////////////////
{
  Generic data types shared across the whole
  NeverPas library.
}
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:   October 08, 2003
//:://////////////////////////////////////////////



unit nw_generic;

interface
uses
  SysUtils;

type
  DWORD = Longword;
  Float = Double;
  TStrRef = Longword;
  TResRef = array[0..15] of Char;

  function GetFileTypeByID(ID: WORD): String;
  function GetVerboseFileTypeByID(ID: WORD): String;

implementation

function GetFileTypeByID(ID: WORD): String;
begin
  case ID of
    1:  Result := 'bmp';
    3:  Result := 'tga';
    4:  Result := 'wav';
    6:  Result := 'plt';
    7:  Result := 'ini';
    10:  Result := 'txt';
    2002:  Result := 'mdl';
    2009:  Result := 'nss';
    2010:  Result := 'ncs';
    2012:  Result := 'are';
    2013:  Result := 'set';
    2014:  Result := 'ifo';
    2015:  Result := 'bic';
    2016:  Result := 'wok';
    2017:  Result := '2da';
    2022:  Result := 'txi';
    2023:  Result := 'git';
    2025:  Result := 'uti';
    2027:  Result := 'utc';
    2029:  Result := 'dlg';
    2030:  Result := 'itp';
    2032:  Result := 'utt';
    2033:  Result := 'dds';
    2035:  Result := 'uts';
    2036:  Result := 'ltr';
    2037:  Result := 'gff';
    2038:  Result := 'fac';
    2040:  Result := 'ute';
    2042:  Result := 'utd';
    2044:  Result := 'utp';
    2045:  Result := 'dft';
    2046:  Result := 'gic';
    2047:  Result := 'gui';
    2051:  Result := 'utm';
    2052:  Result := 'dwk';
    2053:  Result := 'pwk';
    2056:  Result := 'jrl';
    2058:  Result := 'utw';
    2060:  Result := 'ssf';
    2064:  Result := 'ndb';
    2065:  Result := 'ptm';
    2066:  Result := 'ptt';
  else
    Result := 'unk';
  end;
end;

function GetVerboseFileTypeByID(ID: WORD): String;
begin
  case ID of
    1:  Result := 'Windows Bitmap';
    3:  Result := 'Targa Image File';
    4:  Result := 'Wave File';
    6:  Result := 'BioWare Packed Layered Texture';
    7:  Result := 'Windows INI File';
    10:  Result := 'Text File';
    2002:  Result := 'BioWare Aurora Engine Model';
    2009:  Result := 'NWScript Source';
    2010:  Result := 'NWScript Compiled Script';
    2012:  Result := 'BioWare Aurora Engine Area';
    2013:  Result := 'BioWare Aurora Engine Tileset';
    2014:  Result := 'Module Information';
    2015:  Result := 'Character / Creature';
    2016:  Result := 'Walkmesh';
    2017:  Result := '2D Array';
    2022:  Result := 'Texture Information';
    2023:  Result := 'Game Instance Information';
    2025:  Result := 'Item Blueprint';
    2027:  Result := 'Creature Blueprint';
    2029:  Result := 'Conversation';
    2030:  Result := 'Tile / Blueprint Palette';
    2032:  Result := 'Trigger Blueprint';
    2033:  Result := 'Compressed Texture';
    2035:  Result := 'Sound Blueprint';
    2036:  Result := 'Letter-Combination Probability';
    2037:  Result := 'Generic File Format';
    2038:  Result := 'Faction';
    2040:  Result := 'Encounter Blueprint';
    2042:  Result := 'Door Blueprint';
    2044:  Result := 'Placeable Object Blueprint';
    2045:  Result := 'Default Values';
    2046:  Result := 'Game Instance Comments';
    2047:  Result := 'Graphical User Interface Layout';
    2051:  Result := 'Store / Merchant Blueprint';
    2052:  Result := 'Door Walkmesh';
    2053:  Result := 'Placeable Object Walkmesh';
    2056:  Result := 'Journal';
    2058:  Result := 'Waypoint Blueprint';
    2060:  Result := 'Sound Set';
    2064:  Result := 'Script Debug Information';
    2065:  Result := 'Plot Manager / Plot Instance';
    2066:  Result := 'Plot Wizard Blueprint';
  else
    Result := 'Unknown File Type';
  end;
end;

end.
