; --------------------------------------------------------
; Tile Studio Definition for use with DelphiX (see
; http://www.ingjapan.ne.jp/hori/).
;
; Version 1.0 - October 12, 2000
; Mike Wiering (mike.wiering@cs.kun.nl)
; --------------------------------------------------------

; --- bitmap file ----------------------------------------

; Bitmaps are saved in a subdirectory named "gfx\".

#tileset
#tilebitmap gfx\\<TileSetIdentifier>.bmp 320
#end tilebitmap
#end tileset

; --- GFX unit -------------------------------------------

#file <ProjectName>GFX.pas
unit <ProjectName>GFX;

  { Generated by Tile Studio - do not edit! }

interface

  type
    SmallIntArray = array of SmallInt;
    SmallIntArrayPtr = ^SmallIntArray;

  type
    GfxBitmapData =
      record
        BitmapIdentifier: string;
        BitmapWidth, BitmapHeight: Integer;
        TileWidth, TileHeight: Integer;
        TileCountX, TileCountY: Integer;
        TransparentX, TransparentY: Integer;
        SequenceCount: SmallInt;
      end;

#tileset
#map
  const
    <TileSetIdentifier><MapIdentifier>MapData: array [0..<MapHeight> - 1, 0..<MapWidth> - 1] of SmallInt =
#mapdata  "\n     (("  ","  ",\n       "  "),\n      ("  "));"
<TileNumber:"%2d">
#end mapdata

  const
    <TileSetIdentifier><MapIdentifier>BoundMapData: array [0..<MapHeight> - 1, 0..<MapWidth> - 1] of Word =
#mapdata  "\n     (("  ","  ",\n       "  "),\n      ("  "));"
<BoundMapValue>
#end mapdata

#end map

  { tile sequences }
#sequence
  const
    <TileSetIdentifier>Seq<SequenceNumber>: array [0..2 * <SequenceLength>] of SmallInt =
#sequencedata  "\n     ("  ",\n      "  ",\n      -1);"
<TileNumber>, <FrameCount>
#end sequencedata
#end sequence

  const
    <TileSetIdentifier>Sequences: array[0..<SequenceCount>] of SmallIntArrayPtr =
    (
#sequence
      @<TileSetIdentifier>Seq<SequenceNumber>,
#end sequence
      Nil
    );

  const
    <TileSetIdentifier>SeqLength: array[0..<SequenceCount>] of SmallInt =
    (
#sequence
      <SequenceLength>,
#end sequence
      -1
    );

  const
    Gfx<TileSetIdentifier>BitmapData: GfxBitmapData = 
      ( BitmapIdentifier: '<TileSetIdentifier>';
        BitmapWidth: <TileSetBitmapWidth>; BitmapHeight: <TileSetBitmapHeight>;
        TileWidth: <TileWidth>; TileHeight: <TileHeight>;
        TileCountX: <HorizontalTileCount>;  TileCountY: <VerticalTileCount>;
        TransparentX: <TransparentPosX>; TransparentY: <TransparentPosY>;
        SequenceCount: <SequenceCount>;
      );

#end tileset 

  function GetBitmapFileName (s: string): string;

implementation

  function GetBitmapFileName (s: string): string;
  begin
#tileset
    if s = '<TileSetIdentifier>' then s := 'Gfx\\<TileSetIdentifier>.bmp';
#end tileset
    GetBitmapFileName := s;
  end;

end.
#end file

; --------------------------------------------------------
