<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ceidwad</id>
	<title>ModdingWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://moddingwiki.shikadi.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ceidwad"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Ceidwad"/>
	<updated>2026-05-15T04:31:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=6185</id>
		<title>User:Ceidwad</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=6185"/>
		<updated>2015-06-08T18:37:59Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Longtime hobbyist reverse engineer.&lt;br /&gt;
&lt;br /&gt;
Games I&#039;m contributing info for:&lt;br /&gt;
&amp;lt;br&amp;gt;Captain Comic&lt;br /&gt;
&amp;lt;br&amp;gt;Captain Comic 2: Fractured Reality&lt;br /&gt;
&amp;lt;br&amp;gt;Death Rally&lt;br /&gt;
&amp;lt;br&amp;gt;Lost Files of Sherlock Holmes: Case of the Serrated Scalpel&lt;br /&gt;
&amp;lt;br&amp;gt;The Lion King&lt;br /&gt;
&lt;br /&gt;
I have an extensive archive of info for other games that I will be uploading as time allows. Drop me a line if you have a favourite game for which you&#039;d like file format info and I&#039;ll see what I can do!&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Death_Rally_BPA_Format&amp;diff=6184</id>
		<title>Death Rally BPA Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Death_Rally_BPA_Format&amp;diff=6184"/>
		<updated>2015-06-08T18:36:33Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = 255&lt;br /&gt;
 | FAT = Start&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Death Rally&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The BPA file format is an archive format used by [[Death Rally]].&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]] numFiles||Number of files in the archive&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt;[255] fileRecords||Encrypted FAT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt; is of the form&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[char]][13] encryptedName||See below for filename encryption&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]] compressedSize||Size of the compressed file data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt; table has a fixed size of 255 * 17 bytes, padded with null bytes, and cannot contain more than 255 &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt;s. Compressed file data begins immediately after the table, at offset 0x10F3. Because the header does not store offsets, these must be calculated by accumulating through the table.&lt;br /&gt;
&lt;br /&gt;
== Filename encryption ==&lt;br /&gt;
&lt;br /&gt;
To restore a filename, subtract &amp;lt;tt&amp;gt;117 - 3 * index&amp;lt;/tt&amp;gt; from each byte, where &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt; is the 0-based index of the byte in the filename. This will yield a null-terminated string in uppercase. The encrypted filename is also null-terminated.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Death_Rally_BPA_Format&amp;diff=6183</id>
		<title>Death Rally BPA Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Death_Rally_BPA_Format&amp;diff=6183"/>
		<updated>2015-06-08T18:35:28Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Added.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Archive Infobox&lt;br /&gt;
 | MaxFiles = 255&lt;br /&gt;
 | FAT = Start&lt;br /&gt;
 | Names = Yes, 8.3&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subdirectories = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Encrypted = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Death Rally&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The BPA file format is an archive format used by [[Death Rally]].&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]] numFiles||Number of files in the archive&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt;[255] fileRecords||Encrypted FAT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt; is of the form&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|[[char]][13] encryptedName||See below for filename encryption&lt;br /&gt;
|-&lt;br /&gt;
|[[UINT32LE]] compressedSize||Size of the compressed file data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt; table has a fixed size of 255 * 17 bytes, padded with null bytes, and cannot contain more than 255 &amp;lt;tt&amp;gt;FILEREC&amp;lt;/tt&amp;gt;s. Compressed file data begins immediately after the table, at offset 0x10F3. Because the header does not store offsets, these must be calculated by accumulating through the table.&lt;br /&gt;
&lt;br /&gt;
== Filename encryption ==&lt;br /&gt;
&lt;br /&gt;
To restore a filename, subtract &amp;lt;tt&amp;gt;117 - 3 * index&amp;lt;/tt&amp;gt; from each byte, where &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt; is the 0-based index of the byte in the filename. This will yield a null-terminated string in uppercase.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6182</id>
		<title>Lion King Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6182"/>
		<updated>2015-06-08T02:08:05Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: clarification of extra layers, more to come when I actually play the game&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 6&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 320&amp;amp;times;200&lt;br /&gt;
 | Game1 = The Lion King&lt;br /&gt;
}}&lt;br /&gt;
[[The Lion King]] &#039;&#039;&#039;MAP Format&#039;&#039;&#039; is used to store game levels.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || paletteOffset || Offset of 256-colour VGA palette&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || tilesetOffset || Offset of 8x8 tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundWidth ||rowspan=2|Size of foreground layers in tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || layersOffset || Offset of foreground layer data&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundWidth ||rowspan=2|Size of background layer in tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || background || Offset of first background layer data&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][96] || padding || Set to 0x00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The header is padded by null bytes up to offset 0x80.&lt;br /&gt;
&lt;br /&gt;
Note the different dimensions of the foreground and background layers. The game uses parallax scrolling for the background layer.&lt;br /&gt;
&lt;br /&gt;
Most levels have one (backgroundWidth, backgroundHeight, background) structure, but other numbers are supported. BONUS.MAP has several, using them for both foreground and background, apparently with special case code.&lt;br /&gt;
&lt;br /&gt;
PEOPLE_S.MAP (a list of credits) has none. CREDITS.MAP (studio banners, etc.) has two, which are used to store entirely separate screens.&lt;br /&gt;
&lt;br /&gt;
=== Unknown section ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by a section of 40 unknown bytes, before the VGA palette which always occurs at offset 0xA8.&lt;br /&gt;
&lt;br /&gt;
=== Tileset ===&lt;br /&gt;
&lt;br /&gt;
The tileset is a raw block of 8x8 bitmaps. The end of this block is marked by &amp;lt;tt&amp;gt;layersOffset&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Foreground and background layers ===&lt;br /&gt;
&lt;br /&gt;
All levels have four foreground layers except level four which has one. These layers are arrays of &amp;lt;tt&amp;gt;INT16LE&amp;lt;/tt&amp;gt; indices into the tileset.  To obtain a working index, subtract one from the layer values.  An index of -1 means an undrawn tile.  Bit 15 (i.e. the MSB) indicates horizontal flipping, bit 14 indicates vertical flipping. The purpose of bit 13 is currently unknown.&lt;br /&gt;
&lt;br /&gt;
The first foreground layer defines tiles. The second layer appears to define platforms, the third appears to define impassable lines, and the fourth perhaps powerup and enemy positions.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6181</id>
		<title>Lion King Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6181"/>
		<updated>2015-06-08T01:21:54Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: clarified header fields&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 6&lt;br /&gt;
 | Tile size = 8&amp;amp;times;8&lt;br /&gt;
 | Viewport = 320&amp;amp;times;200&lt;br /&gt;
 | Game1 = The Lion King&lt;br /&gt;
}}&lt;br /&gt;
[[The Lion King]] &#039;&#039;&#039;MAP Format&#039;&#039;&#039; is used to store game levels.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || paletteOffset || Offset of 256-colour VGA palette&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || tilesetOffset || Offset of 8x8 tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundWidth ||rowspan=2|Size of foreground layers in tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || layersOffset || Offset of foreground layer data&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundWidth ||rowspan=2|Size of background layer in tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || background || Offset of background layer data&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][96] || padding || Set to 0x00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The header is padded by null bytes up to offset 0x80. It can include up to four extra backgrounds, used only by BONUS.MAP and CREDITS.MAP.&lt;br /&gt;
&lt;br /&gt;
Note the different dimensions of the foreground and background layers. The game uses parallax scrolling for the background layer.&lt;br /&gt;
&lt;br /&gt;
{{TODO|How do the extra backgrounds work?  Are they all parallaxed at the same time, or are there map codes to switch background image?}}&lt;br /&gt;
&lt;br /&gt;
=== Unknown section ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by a section of 40 unknown bytes, before the VGA palette which always occurs at offset 0xA8.&lt;br /&gt;
&lt;br /&gt;
=== Tileset ===&lt;br /&gt;
&lt;br /&gt;
The tileset is a raw block of 8x8 bitmaps. The end of this block is marked by &amp;lt;tt&amp;gt;layersOffset&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Foreground and background layers ===&lt;br /&gt;
&lt;br /&gt;
All levels have four foreground layers except level four which has one. These layers are arrays of &amp;lt;tt&amp;gt;INT16LE&amp;lt;/tt&amp;gt; indices into the tileset.  To obtain a working index, subtract one from the layer values.  An index of -1 means an undrawn tile.  Bit 15 (i.e. the MSB) indicates horizontal flipping, bit 14 indicates vertical flipping. The purpose of bit 13 is currently unknown.&lt;br /&gt;
&lt;br /&gt;
The first foreground layer defines tiles. The second layer appears to define platforms, the third appears to define impassable lines, and the fourth perhaps powerup and enemy positions.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6178</id>
		<title>Lion King Level Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Lion_King_Level_Format&amp;diff=6178"/>
		<updated>2015-06-07T22:18:23Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[The Lion King]] &#039;&#039;&#039;MAP Format&#039;&#039;&#039; is used to store game levels.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || paletteOffset || Offset of 256-colour VGA palette&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || tilesetOffset || Offset of 8x8 tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundWidth ||rowspan=2|Size of foreground layers&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || foregroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || layersOffset || Offset of foreground layer data&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundWidth ||rowspan=2|Size of background layer&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || backgroundHeight&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || background || Offset of background layer data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The header is padded by null bytes up to offset 0x80. It can include up to four extra backgrounds, used only by BONUS.MAP and CREDITS.MAP.&lt;br /&gt;
&lt;br /&gt;
Note the different dimensions of the foreground and background layers. The game uses parallax scrolling for the background layer.&lt;br /&gt;
&lt;br /&gt;
=== Unknown section ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by a section of 40 unknown bytes, before the VGA palette which always occurs at offset 0xA8.&lt;br /&gt;
&lt;br /&gt;
=== Tileset ===&lt;br /&gt;
&lt;br /&gt;
The tileset is a raw block of 8x8 bitmaps. The end of this block is marked by &amp;lt;tt&amp;gt;layersOffset&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Foreground and background layers ===&lt;br /&gt;
&lt;br /&gt;
All levels have four foreground layers except level four which has one. These layers are arrays of &amp;lt;tt&amp;gt;INT16LE&amp;lt;/tt&amp;gt; indices into the tileset.  To obtain a working index, subtract one from the layer values.  An index of -1 means an undrawn tile.  Bit 15 (i.e. the MSB) indicates horizontal flipping, bit 14 indicates vertical flipping. The purpose of bit 13 is currently unknown.&lt;br /&gt;
&lt;br /&gt;
The first foreground layer defines tiles. The second layer appears to define platforms, the third appears to define impassable lines, and the fourth perhaps powerup and enemy positions.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Map Files]]&lt;br /&gt;
[[Category:The Lion King]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=MCH_Format&amp;diff=6177</id>
		<title>MCH Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=MCH_Format&amp;diff=6177"/>
		<updated>2015-06-07T21:53:09Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;MCH Format&#039;&#039;&#039; is used to store sprite animations, e.g. the image frames of a creature walking.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The file starts with an image count.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE frameCount||Number of frames in the animation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Frame entry ===&lt;br /&gt;
&lt;br /&gt;
After the image count are frame details, repeated &amp;lt;tt&amp;gt;frameCount&amp;lt;/tt&amp;gt; times.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE width||Width in pixels&lt;br /&gt;
|-&lt;br /&gt;
|UINT16LE height||Height in pixels&lt;br /&gt;
|-&lt;br /&gt;
|UINT32LE offset||Offset from start of file where data begins&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each frame&#039;s image data starts at &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; bytes from the start of the file.&lt;br /&gt;
&lt;br /&gt;
=== Frame image data ===&lt;br /&gt;
&lt;br /&gt;
Frame pixel data is stored in chunks representing horizontal runs of pixels. Each chunk has this format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
|BYTE x||rowspan=2|Position to start drawing&lt;br /&gt;
|-&lt;br /&gt;
|BYTE y&lt;br /&gt;
|-&lt;br /&gt;
|BYTE numPixels||Number of pixels in the chunk&lt;br /&gt;
|-&lt;br /&gt;
|BYTE[numPixels] pixels||Pixels using current level palette&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One row&#039;s pixels may be defined by multiple chunks. The data ends when &amp;lt;tt&amp;gt;x == 0xFF&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=image}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| canView = No&lt;br /&gt;
| canExport = No&lt;br /&gt;
| canImport = No&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Malvineous|Malvineous]] and [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;br /&gt;
&lt;br /&gt;
[[Category:Graphics Files]]&lt;br /&gt;
[[Category:The Lion King]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Talk:Captain_Comic_II_Tileset_Format&amp;diff=5916</id>
		<title>Talk:Captain Comic II Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Talk:Captain_Comic_II_Tileset_Format&amp;diff=5916"/>
		<updated>2014-12-27T13:09:18Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How are the zero bytes used during compression?  I tried inserting a zero byte after each tile but the game loads with completely blank (black) tiles then.  It seems the game doesn&#039;t need these zero bytes? -- [[User:Malvineous|Malvineous]] ([[User talk:Malvineous|talk]]) 07:39, 27 December 2014 (UTC)&lt;br /&gt;
&lt;br /&gt;
I believe they aren&#039;t used in the tileset which the game loads as one contiguous block. Putting in a stop code would then prevent the game from loading the rest of the tiles. The zero byte stop code is used in the sprite files which use the same compression/decompression algorithm. With the sprites, the game knows where to seek in the sprite files to read each sprite, and the stop code prevents it from reading to EOF through several other sprites. (That data is in the EXE, which I&#039;ll have a page on soon, as it contains many sprites and the level metadata.) [[User:Ceidwad|Ceidwad]] ([[User talk:Ceidwad|talk]]) 13:09, 27 December 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5915</id>
		<title>Captain Comic II Dialog Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5915"/>
		<updated>2014-12-27T09:35:50Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Solved unknown string prefices.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Text Infobox&lt;br /&gt;
 | Type = Story&lt;br /&gt;
 | Lines = ?&lt;br /&gt;
 | Charset = ?&lt;br /&gt;
 | Game1 = Captain Comic II&lt;br /&gt;
}}&lt;br /&gt;
This format stores the text used in conversation with NPCs in [[Captain Comic II]]. It is found in &amp;lt;tt&amp;gt;FRNNN.3&amp;lt;/tt&amp;gt; dialog files, which are only present for some game levels.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
Before the file can be parsed, it must be decrypted. This can be done by XORing every byte in the file with 0x25.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][...] || offsets || Offsets of each string record.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...][...] || strings || Each string is prefixed with two bytes giving the column and row counts, respectively, in characters, needed to draw the text in a window.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is no count field in the header. To load the offsets array, add new values until the file position equals the first element.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:Captain_Comic_II_Map_Format.png&amp;diff=5886</id>
		<title>File:Captain Comic II Map Format.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:Captain_Comic_II_Map_Format.png&amp;diff=5886"/>
		<updated>2014-12-21T06:49:39Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:Captain_Comic_II_Tileset_Format.png&amp;diff=5885</id>
		<title>File:Captain Comic II Tileset Format.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:Captain_Comic_II_Tileset_Format.png&amp;diff=5885"/>
		<updated>2014-12-21T06:42:36Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Visage_Format&amp;diff=5884</id>
		<title>Visage Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Visage_Format&amp;diff=5884"/>
		<updated>2014-12-21T06:21:02Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Added decompression methods.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Image Infobox&lt;br /&gt;
 | Hardware1       = VGA&lt;br /&gt;
 | Depth           = 8-bit (VGA)&lt;br /&gt;
 | MinSize         = 0&amp;amp;times;0&lt;br /&gt;
 | MaxSize         = 65535&amp;amp;times;65535 &amp;lt;!-- assuming game uses signed values --&amp;gt;&lt;br /&gt;
 | Palette         = Internal/External&lt;br /&gt;
 | NumPlanes       = 1&lt;br /&gt;
 | HasTransparency = Yes&lt;br /&gt;
 | HasHitmap       = No&lt;br /&gt;
 | Game1           = The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel&lt;br /&gt;
 | Game2           = The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Visage Format&#039;&#039;&#039; is a graphic format that can store multiple images and palettes. It is used in [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]] and [[The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo]] to store various backgrounds and sprites. Each block of data can be uncompressed or use RLE. Visage files use the *.vgs extension, though some use *.lbv.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Although the format can contain multiple blocks, there is no header to tell how many data blocks exist. You just need to check for End of File to know when you&#039;re done reading.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Width || Data width.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Height || Data height.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Unknown || 0 usually, disasssembly shows this can control scaling somehow.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Compressed || 0 - Uncompressed, 1 - RLE.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || xOffset || Added to drawing position to offset an image. Works as an anchor to allow sprite&lt;br /&gt;
frames with varying dimensions to &#039;line up&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || yOffset || See X Offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][Width&amp;amp;times;height] || Data || Palette or graphic data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With the header loaded, you know to read width&amp;amp;times;height bytes of data which can either be palette or graphic data.&lt;br /&gt;
&lt;br /&gt;
=== Palettes ===&lt;br /&gt;
Palette data can be identified because it begins with &amp;quot;VGS palette&amp;quot; followed by a standard 256 index, 6-bit color depth [[VGA Palette]]. For some reason the palette data is given a height of 1 (2 rows), so you have to concatenate the data to read the values properly.&lt;br /&gt;
&lt;br /&gt;
=== Graphics ===&lt;br /&gt;
Graphic data is implied if the data block isn&#039;t a palette. The graphic data is 8-bit VGA data, but, depending on the compression flag, can be either linear VGA data or use a type of RLE as described below.&lt;br /&gt;
&lt;br /&gt;
== RLE Compression ==&lt;br /&gt;
&lt;br /&gt;
The compressed data in both [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]] and the sequel [[The Lost Files of Sherlock Holmes: The Case of the Rose Tattoo]] uses the following header:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || size || Size of the compressed data.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || repeatMarker || Signals a repeated byte. Only used in the first game.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first game, decompress as follows:&lt;br /&gt;
&lt;br /&gt;
# Read a [[BYTE]] as &amp;lt;tt&amp;gt;testByte&amp;lt;/tt&amp;gt;.&lt;br /&gt;
#* If &amp;lt;tt&amp;gt;testByte&amp;lt;/tt&amp;gt; == &amp;lt;tt&amp;gt;repeatMarker&amp;lt;/tt&amp;gt;, read a [[BYTE]] as &amp;lt;tt&amp;gt;val&amp;lt;/tt&amp;gt;, read a [[UINT8]] as &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt;, and copy &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;val&amp;lt;/tt&amp;gt;s to output.&lt;br /&gt;
#* Else add &amp;lt;tt&amp;gt;testByte&amp;lt;/tt&amp;gt; to output.&lt;br /&gt;
# Loop until out of data.&lt;br /&gt;
&lt;br /&gt;
The second game&#039;s compression scheme divides each row into alternating chunks of transparent and opaque pixels. The decompression of each row follows this logic:&lt;br /&gt;
&lt;br /&gt;
For each row:&lt;br /&gt;
# Read a [[UINT8]] as &amp;lt;tt&amp;gt;skipSize&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Add &amp;lt;tt&amp;gt;skipSize&amp;lt;/tt&amp;gt; &amp;amp;times; 0xff to output. 0xff is the transparent colour index.&lt;br /&gt;
# Read a [[UINT8]] as &amp;lt;tt&amp;gt;chunkSize&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Copy &amp;lt;tt&amp;gt;chunkSize&amp;lt;/tt&amp;gt; bytes from input to output.&lt;br /&gt;
# Loop until the end of the row is reached.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
The following FreeBASIC code will load through each block of a Visage file and display the palette or graphic data. It doesn&#039;t yet properly decode the RLE compressed graphics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
&#039; Visage File Viewer.&lt;br /&gt;
&lt;br /&gt;
&#039; Visage files contain 1 or more blocks of data that can include either palette or graphic data.&lt;br /&gt;
&#039; Each block begins with a header of four 16-bit integers: width, height, RLE compression, and unknown.&lt;br /&gt;
&#039; Blocks containing palette data begin with &amp;quot;VGA palette&amp;quot;, all other blocks are graphic data.&lt;br /&gt;
&#039; Palette blocks are typical 8-bit VGA palettes, 256 indexes, each with three 6-bit color values.&lt;br /&gt;
&#039; Graphic blocks are raw 8-bit indexed VGA pixel data.&lt;br /&gt;
&lt;br /&gt;
&#039; The file path to the palette file you want to open.&lt;br /&gt;
Dim As String VGSFile = &amp;quot;H:\Programs\LIB Extractor\vgs\bigmap.vgs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039; Open the Visage file.&lt;br /&gt;
If Open(VGSFile For Binary Access Read As #1) &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
    Print &amp;quot;File: &amp;quot; + VGSFile + &amp;quot; not found!&amp;quot;&lt;br /&gt;
    Sleep&lt;br /&gt;
    End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
Dim Y As Integer, X As Integer&lt;br /&gt;
Dim Index As UByte, Length As UByte&lt;br /&gt;
Dim XSize As UShort, YSize As UShort&lt;br /&gt;
Dim RLEFlag As UShort, Unknown As UShort&lt;br /&gt;
Dim BlockSize As UInteger&lt;br /&gt;
Dim As String PaletteCheck = &amp;quot;&amp;quot;&lt;br /&gt;
Dim ColorIndex As UShort, ColorOffset As UShort&lt;br /&gt;
Dim Red As UByte, Green As UByte, Blue As UByte&lt;br /&gt;
Dim As UByte Block = 0&lt;br /&gt;
Dim Offset As UInteger, Delta As UShort, I As UShort, FullLength As UInteger&lt;br /&gt;
&lt;br /&gt;
Screen 13&lt;br /&gt;
Do&lt;br /&gt;
    CLS&lt;br /&gt;
    &lt;br /&gt;
    &#039; Load the block header.&lt;br /&gt;
    Get #1, , XSize&lt;br /&gt;
    Get #1, , YSize&lt;br /&gt;
    Get #1, , RLEFlag&lt;br /&gt;
    Get #1, , Unknown&lt;br /&gt;
&lt;br /&gt;
    &#039;If XSize = 389 And YSize = 1 Then&lt;br /&gt;
    &#039;    &#039; Trap for palette which doesn&#039;t store the correct size to load.&lt;br /&gt;
    &#039;    XSize = 780&lt;br /&gt;
    &#039;End If&lt;br /&gt;
    &lt;br /&gt;
    BlockSize = (XSize + 1) * (YSize + 1)&lt;br /&gt;
&lt;br /&gt;
    Print &amp;quot;    Block #: &amp;quot; + Str(Block)&lt;br /&gt;
    Print &amp;quot;X, Y (Size): &amp;quot; + Str(XSize) + &amp;quot;, &amp;quot; + Str(YSize) + &amp;quot; (&amp;quot; + Str(BlockSize) + &amp;quot; bytes)&amp;quot;&lt;br /&gt;
    Print &amp;quot; Compressed: &amp;quot; + Str(RLEFlag)&lt;br /&gt;
    Print &amp;quot;    Unknown: &amp;quot; + Str(Unknown)&lt;br /&gt;
&lt;br /&gt;
    &#039; Create an array for the block data.&lt;br /&gt;
    ReDim VGSData(0 To Blocksize) As UByte&lt;br /&gt;
&lt;br /&gt;
    &#039; Load this block&#039;s data into the array.&lt;br /&gt;
    For Y = 0 To YSize&lt;br /&gt;
        For X = 0 To XSize&lt;br /&gt;
            Get #1, , VGSData(Y * XSize + X)&lt;br /&gt;
        Next X&lt;br /&gt;
    Next Y&lt;br /&gt;
&lt;br /&gt;
    &#039; Check for palette.&lt;br /&gt;
    PaletteCheck = &amp;quot;&amp;quot;&lt;br /&gt;
    For X = 0 To 11&lt;br /&gt;
        PaletteCheck = PaletteCheck + Chr(VGSData(X))&lt;br /&gt;
    Next X&lt;br /&gt;
    If PaletteCheck = &amp;quot;VGA palette&amp;quot; + Chr(26) Then&lt;br /&gt;
        Print &amp;quot;       Type: Palette Data&amp;quot;&lt;br /&gt;
        Sleep&lt;br /&gt;
        Cls&lt;br /&gt;
&lt;br /&gt;
        &#039; Loop through all of the colors.&lt;br /&gt;
        ColorOffset = 12&lt;br /&gt;
        ColorIndex = 0&lt;br /&gt;
        Do&lt;br /&gt;
            &#039; Read the color attributes from the file.&lt;br /&gt;
            Red   = VGSData(ColorOffset)&lt;br /&gt;
            Green = VGSData(ColorOffset + 1)&lt;br /&gt;
            Blue  = VGSData(ColorOffset + 2)&lt;br /&gt;
            &lt;br /&gt;
            Red   = Red   * 4&lt;br /&gt;
            Green = Green * 4&lt;br /&gt;
            Blue  = Blue  * 4&lt;br /&gt;
            &lt;br /&gt;
            &#039; Change the palette.&lt;br /&gt;
            Palette ColorIndex, Red, Green, Blue&lt;br /&gt;
            &lt;br /&gt;
            Line(ColorIndex, 0)-(ColorIndex, 199), ColorIndex&lt;br /&gt;
            ColorIndex = ColorIndex + 1&lt;br /&gt;
            ColorOffset = ColorOffset + 3&lt;br /&gt;
        Loop Until ColorOffset &amp;gt;= BlockSize&lt;br /&gt;
    Else&lt;br /&gt;
        Print &amp;quot;       Type: Graphic Data&amp;quot;&lt;br /&gt;
        Sleep&lt;br /&gt;
        Cls&lt;br /&gt;
&lt;br /&gt;
        &#039; If it&#039;s not a palette, it&#039;s graphic data.&lt;br /&gt;
        If RLEFlag = 0 Then&lt;br /&gt;
            &#039; Uncompressed image.&lt;br /&gt;
            For Y = 0 To YSize&lt;br /&gt;
                For X = 0 To XSize&lt;br /&gt;
                    PSet(X, Y), VGSData(Y * XSize + X)&lt;br /&gt;
                Next X&lt;br /&gt;
            Next Y&lt;br /&gt;
        Else&lt;br /&gt;
            &#039; Compressed image.&lt;br /&gt;
            Y = 0&lt;br /&gt;
            X = 0&lt;br /&gt;
            FullLength = VGSData(1) * 256 + VGSData(0)      &#039; Data Stream Length&lt;br /&gt;
            &#039; Unknown: Always FE FE.&lt;br /&gt;
            Offset = 4&lt;br /&gt;
            &#039; To Do: Decode RLE.&lt;br /&gt;
        End If&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    Sleep&lt;br /&gt;
    Block = Block + 1&lt;br /&gt;
Loop While Not EOF(1)&lt;br /&gt;
&lt;br /&gt;
Close #1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. The RLE compression was reverse engineered by [[User:Ceidwad|Ceidwad]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5883</id>
		<title>Captain Comic II Dialog Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5883"/>
		<updated>2014-12-21T03:54:34Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Captain Comic 2 Dialog Format&#039;&#039;&#039; stores the text used in conversation with NPCs in [[Captain Comic 2 Fractured Reality]]. It is found in &amp;lt;tt&amp;gt;FRNNN.3&amp;lt;/tt&amp;gt; dialog files, which are only present for some game levels.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
Before the file can be parsed, it must be decrypted. This can be done by XORing every byte in the file with 0x25.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][...] || offsets || Offsets of each string record.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...][...] || strings || {{TODO|Each string is prefixed with two unknown bytes.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is no count field in the header. To load the offsets array, add new values until the file position equals the first element.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5882</id>
		<title>Captain Comic II Dialog Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Dialog_Format&amp;diff=5882"/>
		<updated>2014-12-21T03:53:32Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;Captain Comic 2 Dialog Format&amp;#039;&amp;#039;&amp;#039; stores the text used in conversation with NPCs. It is found in &amp;lt;tt&amp;gt;FRNNN.3&amp;lt;/tt&amp;gt; dialog files, which are only present for some game leve...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Captain Comic 2 Dialog Format&#039;&#039;&#039; stores the text used in conversation with NPCs. It is found in &amp;lt;tt&amp;gt;FRNNN.3&amp;lt;/tt&amp;gt; dialog files, which are only present for some game levels.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
Before the file can be parsed, it must be decrypted. This can be done by XORing every byte in the file with 0x25.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]][...] || offsets || Offsets of each string record.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][...][...] || strings || {{TODO|Each string is prefixed with two unknown bytes.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is no count field in the header. To load the offsets array, add new values until the file position equals the first element.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5880</id>
		<title>Captain Comic II</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5880"/>
		<updated>2014-12-21T03:40:22Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
&lt;br /&gt;
[[Captain Comic 2 Fractured Reality]] is the sequel to [[Captain Comic]], offering a larger gameworld and more flexible engine.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.0&lt;br /&gt;
 | Format = [[Captain Comic 2 Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.1&lt;br /&gt;
 | Format = [[Captain Comic 2 Map Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.2&amp;lt;br&amp;gt;frdata.N&amp;lt;br&amp;gt;frdemo.N&lt;br /&gt;
 | Format = [[Captain Comic 2 Sprite Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Enemy sprites&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.3&lt;br /&gt;
 | Format = [[Captain Comic 2 Dialog Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Dialog text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frpak.NNN&lt;br /&gt;
 | Format = [[Captain Comic Image Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen EGA images (title screen, story, high scores, etc.)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Sprite_Format&amp;diff=5879</id>
		<title>Captain Comic II Sprite Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Sprite_Format&amp;diff=5879"/>
		<updated>2014-12-21T03:34:46Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;{{Tileset Infobox  | Hardware1 = EGA  | MaxTiles = &amp;#039;&amp;#039;Unlimited&amp;#039;&amp;#039;  | Palette = Default EGA  | Names = N  | TileMinSize = 1&amp;amp;times;1  | TileMaxSize = 320&amp;amp;times;200  | NumPlanes =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 1&amp;amp;times;1&lt;br /&gt;
 | TileMaxSize = 320&amp;amp;times;200&lt;br /&gt;
 | NumPlanes = 4/5&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = Y&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Sprite Format&#039;&#039;&#039; stores the images used for drawing animated creatures and objects in &amp;lt;tt&amp;gt;FRNNN.2&amp;lt;/tt&amp;gt; level sprite files, &amp;lt;tt&amp;gt;FRDEMO.N&amp;lt;/tt&amp;gt; introduction sequence files, and &amp;lt;tt&amp;gt;FRDATA.1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
The file has no header - the first frame&#039;s data starts right at the beginning of the file.  Each frame has a header of 4 or 6 bytes.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || width ||rowspan=2| Size of the frame in pixels&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || height&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || planeSize || Size in bytes of one plane. This is equal to width &amp;amp;times; height / 8, but see following note.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The frames are 16-colour images, split into four or five planes (see [[Raw_EGA_data#Planar_EGA_data]]).  Each image is stored one after the other, each image having the above header. The planes within each image are ordered with opacity first, if present, then blue, green, red, and intensity.&lt;br /&gt;
&lt;br /&gt;
In reading these files, &amp;lt;tt&amp;gt;planeSize&amp;lt;/tt&amp;gt; should always be checked against &amp;lt;tt&amp;gt;width &amp;amp;times; height / 8&amp;lt;/tt&amp;gt; for every image. If it is equal, this signals that an opacity plane is present. If it is not equal, that signals that there is no opacity plane, and the &amp;lt;tt&amp;gt;planeSize&amp;lt;/tt&amp;gt; field should be treated as absent: the input stream should be backtracked two bytes (i.e. &amp;lt;tt&amp;gt;sizeof(planeSize)&amp;lt;/tt&amp;gt;) before reading the four colour planes.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5878</id>
		<title>Captain Comic II</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5878"/>
		<updated>2014-12-21T02:13:59Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
&lt;br /&gt;
[[Captain Comic 2 Fractured Reality]] is the sequel to [[Captain Comic]], offering a larger gameworld and more flexible engine.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.0&lt;br /&gt;
 | Format = [[Captain Comic 2 Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.1&lt;br /&gt;
 | Format = [[Captain Comic 2 Map Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.2&amp;lt;br&amp;gt;frdata.1&amp;lt;br&amp;gt;frdemo.N&lt;br /&gt;
 | Format = [[Captain Comic 2 Sprite Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Enemy sprites&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.3&lt;br /&gt;
 | Format = [[Captain Comic 2 Dialog Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Dialog text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frpak.NNN&lt;br /&gt;
 | Format = [[Captain Comic Image Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen EGA images (title screen, story, high scores, etc.)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Map_Format&amp;diff=5877</id>
		<title>Captain Comic II Map Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Map_Format&amp;diff=5877"/>
		<updated>2014-12-21T02:00:39Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 208&amp;amp;times;160&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Map Format&#039;&#039;&#039; stores the playable game levels.  Each level is stored in a separate file in the game directory, using the &amp;lt;tt&amp;gt;FRNNN.1&amp;lt;/tt&amp;gt; filename pattern, where NNN ranges from 000 to 014.&lt;br /&gt;
&lt;br /&gt;
The files only store the map background layer.  It is currently unknown how to change the player start position.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
The file format differs from [[Captain Comic Map Format]]. In the former game, each &#039;level&#039; (or game region using a specific tileset) contained three different maps or &#039;parts&#039; stored in &amp;lt;tt&amp;gt;.PT&amp;lt;/tt&amp;gt; files. All those parts were a fixed 128x10 tiles. In the new format, the map file is a container for a variable number of &#039;parts&#039;, each with a variable tile dimension.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
Each file begins with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || numParts || Number of maps in the file&lt;br /&gt;
|-&lt;br /&gt;
| MAPDEF[numParts] || mapdefs || see below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MAPDEF&amp;lt;/tt&amp;gt; is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || width || Width in tiles of the map&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || height || Height in tiles of the map&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || offset || Offset in this file of the compressed map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each map data chunk is compressed with the same algorithm described in [[Captain Comic 2 Tileset Format]]. Once uncompressed, the data has the same format as in [[Captain Comic Map Format]], with one byte for each tile, left-to-right and top-to-bottom.  The total size of this section is the map width multiplied by the map height.&lt;br /&gt;
&lt;br /&gt;
=== Map codes ===&lt;br /&gt;
&lt;br /&gt;
Map codes are direct indices into the tileset.  So a map code of 0x01 means the second tile in the tileset should be drawn at that location.  The tileset to use is matched up by filename (&amp;lt;tt&amp;gt;FR002.0&amp;lt;/tt&amp;gt; provides the tiles for the maps in &amp;lt;tt&amp;gt;FR002.1&amp;lt;/tt&amp;gt;, for example.)&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Map_Format&amp;diff=5876</id>
		<title>Captain Comic II Map Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Map_Format&amp;diff=5876"/>
		<updated>2014-12-21T02:00:05Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;{{Map Infobox  | Type = 2D tile-based  | Layers = 1  | Tile size = 16&amp;amp;times;16  | Viewport = 208&amp;amp;times;160  | Game1 = Captain Comic }}  The &amp;#039;&amp;#039;&amp;#039;Captain Comic 2 Map Format&amp;#039;&amp;#039;&amp;#039; st...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 208&amp;amp;times;160&lt;br /&gt;
 | Game1 = Captain Comic&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Map Format&#039;&#039;&#039; stores the playable game levels.  Each level is stored in a separate file in the game directory, using the &amp;lt;tt&amp;gt;FRNNN.1&amp;lt;/tt&amp;gt; filename pattern, where NNN ranges from 000 to 014.&lt;br /&gt;
&lt;br /&gt;
The files only store the map background layer.  It is currently unknown how to change the player start position.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
The file format differs from [[Captain Comic Map Format]]. In the former game, each &#039;level&#039; (or game region using a specific tileset) contained three different maps or &#039;parts&#039; stored in &amp;lt;tt&amp;gt;.PT&amp;lt;/tt&amp;gt; files. All those parts were a fixed 128x10 tiles. In the new format, the map file is a container for a variable number of &#039;parts&#039;, each with a variable tile dimension.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
Each file begins with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || numParts || Number of maps in the file&lt;br /&gt;
|-&lt;br /&gt;
| MAPDEF[numParts] || mapdefs || see below&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MAPDEF&amp;lt;/tt&amp;gt; is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || width || Width in tiles of the map&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || height || Height in tiles of the map&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || offset || Offset in this file of the compressed map data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each map data chunk is compressed with the same algorithm described in [[Captain Comic 2 Tileset Format]]. Once uncompressed, the data has the same format as in [[Captain Comic Map Format]], with one byte for each tile, left-to-right and top-to-bottom.  The total size of this section is the map width multiplied by the map height.&lt;br /&gt;
&lt;br /&gt;
=== Map codes ===&lt;br /&gt;
&lt;br /&gt;
Map codes are direct indices into the tileset.  So a map code of 0x01 means the second tile in the tileset should be drawn at that location.  The tileset to use is matched up by filename (&amp;lt;tt&amp;gt;FR002.0&amp;lt;/tt&amp;gt; provides the tiles for the maps in &amp;lt;tt&amp;gt;FR002.1&amp;lt;/tt&amp;gt;, for example.)&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5874</id>
		<title>Captain Comic II Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5874"/>
		<updated>2014-12-21T01:46:14Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 16&amp;amp;times;16&lt;br /&gt;
 | TileMaxSize = 16&amp;amp;times;16&lt;br /&gt;
 | NumPlanes = 4&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Tileset Format&#039;&#039;&#039; stores the images used for drawing the game levels.  All tiles are fixed as 16&amp;amp;times;16 pixels in size.  The format is similar to the [[Captain Comic Tileset Format]], but extends the header and adds RLE compression.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || {{TODO|Unknown - a tile index}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastBlockingTile || index of the last blocking tile&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastWaterTile || index of the last underwater tile in the tileset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tiles must be in the order blocking, underwater, other. &amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; is always &amp;lt;= &amp;lt;tt&amp;gt;lastBlockingTile&amp;lt;/tt&amp;gt;. If there are no underwater tiles, &amp;lt;tt&amp;gt;lastWaterTile = 0xffff&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The tile data follows this header, in blocks of 128 bytes per tile. See [[Captain Comic Tileset Format]] for an explanation. However, first the data must be decompressed, as follows.&lt;br /&gt;
&lt;br /&gt;
# Read one byte&lt;br /&gt;
#* If the high bit is NOT set (&amp;lt;= 127) then copy this many bytes unchanged&lt;br /&gt;
#* If the high bit is set (&amp;gt;= 128) then repeat the next byte.  The repeat count is 256 - the first byte&lt;br /&gt;
#* If the byte is 0, break&lt;br /&gt;
# Repeat until EOF&lt;br /&gt;
&lt;br /&gt;
Note the stop code (0). This means that a partial block can be decompressed instead of waiting for EOF.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5873</id>
		<title>Captain Comic II Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5873"/>
		<updated>2014-12-21T01:35:32Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 16&amp;amp;times;16&lt;br /&gt;
 | TileMaxSize = 16&amp;amp;times;16&lt;br /&gt;
 | NumPlanes = 4&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Tileset Format&#039;&#039;&#039; stores the images used for drawing the game levels.  All tiles are fixed as 16&amp;amp;times;16 pixels in size.  The format is similar to the [[Captain Comic Tileset Format]], but extends the header and adds RLE compression..&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || {{TODO|Unknown - a tile index}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastBlockingTile || index of the last blocking tile&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastWaterTile || index of the last underwater tile in the tileset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tiles must be in the order blocking, underwater, other. &amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; is always &amp;lt;= &amp;lt;tt&amp;gt;lastBlockingTile&amp;lt;/tt&amp;gt;. If there are no underwater tiles, &amp;lt;tt&amp;gt;lastWaterTile = 0xffff&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The tile data follows this header, in blocks of 128 bytes per tile. See [[Captain Comic Tileset Format]] for an explanation. However, first the data must be decompressed, as follows.&lt;br /&gt;
&lt;br /&gt;
# Read one byte&lt;br /&gt;
#* If the high bit is NOT set (&amp;lt;= 127) then copy this many bytes unchanged&lt;br /&gt;
#* If the high bit is set (&amp;gt;= 128) then repeat the next byte.  The repeat count is 256 - the first byte&lt;br /&gt;
#* If the byte is 0, break&lt;br /&gt;
# Repeat until EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5872</id>
		<title>Captain Comic II Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5872"/>
		<updated>2014-12-21T01:32:36Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 16&amp;amp;times;16&lt;br /&gt;
 | TileMaxSize = 16&amp;amp;times;16&lt;br /&gt;
 | NumPlanes = 4&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Tileset Format&#039;&#039;&#039; stores the images used for drawing the game levels.  All tiles are fixed as 16&amp;amp;times;16 pixels in size.  The format is similar to the [[Captain Comic Tileset Format]], but extends the header and adds RLE compression..&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || {{TODO|Unknown - a tile index}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastBlockingTile || index of the last blocking tile&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastWaterTile || index of the last underwater tile in the tileset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tiles must be in the order blocking, underwater, other. unknown0 and unknown1 are equal in some tilesets. &amp;lt;tt&amp;gt;unknown&amp;lt;/tt&amp;gt; is always &amp;lt;= &amp;lt;tt&amp;gt;lastBlockingTile&amp;lt;/tt&amp;gt;. If there are no underwater tiles, &amp;lt;tt&amp;gt;lastWaterTile = 0xffff&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The tile data follows this header, in blocks of 128 bytes per tile. See [[Captain Comic Tileset Format]] for an explanation. However, first the data must be decompressed, as follows.&lt;br /&gt;
&lt;br /&gt;
# Read one byte&lt;br /&gt;
#* If the high bit is NOT set (&amp;lt;= 127) then copy this many bytes unchanged&lt;br /&gt;
#* If the high bit is set (&amp;gt;= 128) then repeat the next byte.  The repeat count is 256 - the first byte&lt;br /&gt;
#* If the byte is 0, break&lt;br /&gt;
# Repeat until EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5871</id>
		<title>Captain Comic II Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II_Tileset_Format&amp;diff=5871"/>
		<updated>2014-12-21T01:30:06Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;{{Tileset Infobox  | Hardware1 = EGA  | MaxTiles = &amp;#039;&amp;#039;Unlimited&amp;#039;&amp;#039;  | Palette = Default EGA  | Names = N  | TileMinSize = 16&amp;amp;times;16  | TileMaxSize = 16&amp;amp;times;16  | NumPlanes =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 16&amp;amp;times;16&lt;br /&gt;
 | TileMaxSize = 16&amp;amp;times;16&lt;br /&gt;
 | NumPlanes = 4&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = Y&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic 2 Fractured Reality&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic 2 Tileset Format&#039;&#039;&#039; stores the images used for drawing the game levels.  All tiles are fixed as 16&amp;amp;times;16 pixels in size.  The format is similar to the [[Captain Comic Tileset Format]], but extends the header and adds RLE compression..&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown0 || {{TODO|Unknown - a tile index, related to blocking somehow; always &amp;lt;= }}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastBlockingTile || index of the last blocking tile&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || lastWaterTile || index of the last underwater tile in the tileset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tiles must be in the order blocking, underwater, other. unknown0 and unknown1 are equal in some tilesets. If there are no underwater tiles, lastWaterTile = 0xffff.&lt;br /&gt;
&lt;br /&gt;
The tile data follows this header, in blocks of 128 bytes per tile. See [[Captain Comic Tileset Format]] for an explanation. However, first the data must be decompressed, as follows.&lt;br /&gt;
&lt;br /&gt;
# Read one byte&lt;br /&gt;
#* If the high bit is NOT set (&amp;lt;= 127) then copy this many bytes unchanged&lt;br /&gt;
#* If the high bit is set (&amp;gt;= 128) then repeat the next byte.  The repeat count is 256 - the first byte&lt;br /&gt;
#* If the byte is 0, break&lt;br /&gt;
# Repeat until EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5870</id>
		<title>Captain Comic II</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_II&amp;diff=5870"/>
		<updated>2014-12-21T01:03:20Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;{{NeedMoreInfo}}  Captain Comic 2 Fractured Reality is the sequel to Captain Comic, offering a larger gameworld and more flexible engine.  {{BeginGameFileList}} {{Game...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
&lt;br /&gt;
[[Captain Comic 2 Fractured Reality]] is the sequel to [[Captain Comic]], offering a larger gameworld and more flexible engine.&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.0&lt;br /&gt;
 | Format = [[Captain Comic 2 Tileset Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Background tiles&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.1&lt;br /&gt;
 | Format = [[Captain Comic 2 Map Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Game levels&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.2&amp;lt;br&amp;gt;frdata.N&amp;lt;br&amp;gt;frdemo.N&lt;br /&gt;
 | Format = [[Captain Comic 2 Sprite Format]]&lt;br /&gt;
 | KnownFormat = Partial&lt;br /&gt;
 | Desc = Enemy sprites&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frNNN.3&lt;br /&gt;
 | Format = [[Captain Comic 2 Dialog Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Dialog text&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = frpak.NNN&lt;br /&gt;
 | Format = [[Captain Comic Image Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Full-screen EGA images (title screen, story, high scores, etc.)&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Sidescroller]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=5869</id>
		<title>User:Ceidwad</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=5869"/>
		<updated>2014-12-21T00:46:49Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Longtime hobbyist reverse engineer.&lt;br /&gt;
&lt;br /&gt;
Games I&#039;m contributing info for:&lt;br /&gt;
&amp;lt;br&amp;gt;Captain Comic&lt;br /&gt;
&amp;lt;br&amp;gt;Captain Comic 2: Fractured Reality&lt;br /&gt;
&amp;lt;br&amp;gt;Lost Files of Sherlock Holmes: Case of the Serrated Scalpel&lt;br /&gt;
&lt;br /&gt;
I have an extensive archive of info for other games that I will be uploading as time allows. Drop me a line if you have a favourite game for which you&#039;d like file format info and I&#039;ll see what I can do!&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5868</id>
		<title>RRM Format (Mythos Software)</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5868"/>
		<updated>2014-12-21T00:43:10Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Added object structure definition.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;RRM Format (Mythos Software)&#039;&#039;&#039; is a container for room-specific data in [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]].&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The header has this format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || magicText || &amp;quot;\r\n\nHOLMES RESOURCE FILE V2.1\r\n\n\x1A&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][7] || magicBytes || The same in all files: 00 14 9C 0E 74 50 05. Unknown meaning.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || isPacked || 09 = unpacked, 0A = packed.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || dirOffset || Offset of the directory, described below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by zero or more animation offsets and data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]][nAnims] || animOffsets || Offsets to VGS data for animations.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nAnims] || anims || Animations in the Visage format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
nAnims is found in the directory that follows. RRM files are not parsed sequentially.&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
&lt;br /&gt;
The directory gives total numbers or sizes of various resources.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nObjects || Number of logical room objects, defined below.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nSprites || Number of VGS chunks associated with room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nAnims || Number of VGS chunks in the previous section.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || textSize || Size of the text block below, containing object descriptions.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || sequencesSize || Size of the sequence block below, defining sprite frame orders.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always zero.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sprites are persistent graphics for room objects, typically lasting the duration of play in the room. Animations are typically used for one-off events.&lt;br /&gt;
&lt;br /&gt;
=== Sprite Definitions ===&lt;br /&gt;
&lt;br /&gt;
Next comes a table defining the sprites:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SPRITEDEF[nObjects] || spriteDefs || See below for SPRITEDEF definition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that there are nObjects SPRITEDEFs not nSprites. There are always at least as many objects as there are sprites, and the table is null-padded.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || spriteSize || Size of the VGS chunk for this sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || numFrames || Number of frames in the sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][9] || spriteName || Internal name of the sprite.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Object Data ===&lt;br /&gt;
&lt;br /&gt;
Objects are the game&#039;s most complex data structure and will be defined later on this page. For now, they will be viewed simply as 569-byte chunks. They and their remaining associated data follow:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| OBJECTDEF[nObjects] || objects || Logical room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][textSize] || objectText || ASCIIZ descriptions used when looking at an object.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][sequencesSize] || sequenceBlock || Object sequences, defined later on this page.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nSprites] || sprites || VGS chunks for sprites defined in the SPRITEDEFs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VGS chunks for sprites can be read sequentially using the size field in the SPRITEDEFs.&lt;br /&gt;
&lt;br /&gt;
=== Animation Structures ===&lt;br /&gt;
&lt;br /&gt;
Next come structures defining the behaviour of animations:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIMDEF[nAnims] || animDefs || See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][12] || name || Name of the animation structure.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][30] || sequence || Sequence defining frame order, etc. Sequences are defined later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Topleft coordinate for first animation frame.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || size || Size of VGS chunk in the block near the top of the file.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || state || Related to state field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || drawOptions || Related to drawOptions field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; standing position when the animation begins.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || endPos || Holmes&#039; standing position when the animation ends.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
HPOS is a type also used elsewhere in this file. It defines a &#039;stance&#039; for Holmes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Screen coordinate * 100&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y &lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || loopNum || Index into Holmes&#039; list of lists of frames, to be added here later. Essentially, the direction he is facing and whether he is walking or standing still.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The game does coordinate calculations internally in multiples of 100, for example the centre of the screen would be 16000x10000. This was presumably done to avoid floating point in diagonal move deltas.&lt;br /&gt;
&lt;br /&gt;
=== Pathing Data ===&lt;br /&gt;
&lt;br /&gt;
Next comes a number of data structures defining how Holmes moves around the room.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT16LE]] || boxBlockSize || Size of the following block of BOXDEFs. Let nBoxes = boxBlockSize / 10.&lt;br /&gt;
|-&lt;br /&gt;
| BOXDEF[nBoxes] || boxDefs || Boxes as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
BOXDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || flags || Unknown purpose.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A magic byte 0xFE follows, and then a lookup table and waypoints data chunk:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][nBoxes][nBoxes] || lookup || See below for explanation.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || waypointsSize || Size of following waypoints data chunk.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][waypointsSize] || waypoints || Waypoints data chunk.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data is used when Holmes tries to walk from one box to another. The boxes may not be connected and require travel through other boxes.  Let &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; be the index of the box he is in, and &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt; be the index of the destination box. lookup[&amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;][&amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;] where &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; is a column in the table will yield an index into the waypoints chunk. A waypoints entry looks like this:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nWaypoints || Number of waypoints that follow.&lt;br /&gt;
|-&lt;br /&gt;
| WAYPOINT[nWaypoints] || waypoints || List of screen coordinates that Holmes should walk towards on his path from &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;. Each coordinate is UINT16LE x, UINT8 y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that all entries on the main diagonal of the lookup matrix are 0, and at offset 0 in the waypoints block is a set of 0 waypoints, because there is no path needed from a box to itself. Additionally, all entries below the main diagonal are -1, indicating a redundant entry. This is because paths are reversible and the upper half contains all data needed.&lt;br /&gt;
&lt;br /&gt;
Next come the exit boxes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT8]] || nExitDefs || Number of following EXITDEFs.&lt;br /&gt;
|-&lt;br /&gt;
| EXITDEF[nExitDefs] || exitDefs || Exits as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
EXITDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || roomNum || Destination room number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always 1.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destX ||rowspan=2| Holmes&#039; position on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destY&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destLoop || Holmes&#039; animation loop on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Walking on an EXITDEF area causes Holmes to leave the room.&lt;br /&gt;
&lt;br /&gt;
Concluding the pathing data, Holmes&#039; starting position in the room:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; starting position on entering the current room.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
A list of sound effects follows.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nSoundDefs || Number of sound effect names that follow.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][nSoundDefs][9] || soundDefs || 8-byte sound effect name, padded with nulls, followed by byte 09. The sound effect is found in the LIB archive SND.SND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Room object sequences, defined later on this page, can cause a sound effect to be played by index into this list.&lt;br /&gt;
&lt;br /&gt;
=== Palette and Background ===&lt;br /&gt;
&lt;br /&gt;
The remainder of the &amp;lt;tt&amp;gt;.RRM&amp;lt;/tt&amp;gt; consists of a 768-byte [[VGA Palette]] and a 320x138 background image.&lt;br /&gt;
&lt;br /&gt;
The palette is required to construct the animations and sprites earlier in the file. The programmer may choose between parsing through the file and constructing the animations and sprites later, or seeking to the end of the file immediately, since the palette is always at the fixed offset of EOF - (320 * 138 + 768).&lt;br /&gt;
&lt;br /&gt;
== Object Structure ==&lt;br /&gt;
&lt;br /&gt;
Objects are logical entities in a room that affect gameplay. They may have an associated sprite, or they may have not and function as an invisible trigger area. Still other objects may have no spatial meaning and represent state transitions.&lt;br /&gt;
&lt;br /&gt;
Objects always occupy 569 bytes. Many fields only have meaning at runtime.&lt;br /&gt;
&lt;br /&gt;
FARPTR in the DataType column refers to a 32-bit memory location composed of UINT16LE offset, UINT16LE segment. These runtime fields are included for completeness.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Offset || DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[char]][12] || name || Internal ASCIIZ object name.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[char]][41] || hoverText || ASCIIZ text shown on the status line when the player hovers over the object.&lt;br /&gt;
|-&lt;br /&gt;
| 53 || FARPTR || textPtr || runtime: pointer to ASCIIZ text description.&lt;br /&gt;
|-&lt;br /&gt;
| 57 || FARPTR || seqPtr || Initially, the first UINT16LE in this field holds the offset of this object&#039;s sequence data in the room sequenceBlock.&amp;lt;br&amp;gt;runtime: afterwards, the field is used as a FARPTR to the sequence.&lt;br /&gt;
|-&lt;br /&gt;
| 61 || FARPTR || spritePtr || runtime: pointer to VGS sprite for the object.&lt;br /&gt;
|-&lt;br /&gt;
| 65 || FARPTR || framePtr || runtime: pointer to current sprite frame.&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [[BYTE]] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [[BYTE]] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [[UINT16LE]] || seqIndex || runtime: current position in the object&#039;s sequence.&lt;br /&gt;
|-&lt;br /&gt;
| 73 || [[UINT16LE]] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 75 || [[UINT16LE]] || x ||rowspan=2|Topleft screen coordinate of the object.&lt;br /&gt;
|-&lt;br /&gt;
| 77 || [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| 79 || [[INT16LE]] || deltaX ||rowspan=2|runtime: position delta for moving object.&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [[INT16LE]] || deltaY&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [[UINT16LE]] || state || These values occur in the &amp;lt;tt&amp;gt;.RRM&amp;lt;/tt&amp;gt;:&amp;lt;br&amp;gt;4: active, with sprite&amp;lt;br&amp;gt;6: active, without sprite&amp;lt;br&amp;gt;7: inactive&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [[UINT16LE]] || frameX ||rowspan=4| runtime: dimensions of the current sprite frame.&lt;br /&gt;
|-&lt;br /&gt;
| 87 || [[UINT16LE]] || frameY&lt;br /&gt;
|-&lt;br /&gt;
| 89 || [[UINT16LE]] || frameWidth&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [[UINT16LE]] || frameHeight&lt;br /&gt;
|-&lt;br /&gt;
| 93 || [[BYTE]][4] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [[UINT8]] || intBehave || encodes various things that happen when the user interacts with the object.&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [[UINT8]] || defBehave || default interaction, as an index into the menu commands (1=Look, 2=Talk, 3=Move, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [[INT16LE]][3] || flags || story progress flags, to be described elsewhere.&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [[UINT16LE]] || hoverX ||rowspan=2| Area occupied by an object with no sprite. 0,0 for objects with sprites.&lt;br /&gt;
|-&lt;br /&gt;
| 107 || [[UINT16LE]] || hoverY&lt;br /&gt;
|-&lt;br /&gt;
| 109 || [[UINT16LE]] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [[UINT8]] || spriteNum || If 0, the object has no sprite. If &amp;gt; 0, subtract 1 and use as index into room sprite list.&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [[UINT16LE]] || spriteFrames || Number of frames in the object&#039;s sprite.&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [[BYTE]] || drawOptions || Bitfield controlling drawing of the object&#039;s sprite. The following bits are known so far:&amp;lt;br&amp;gt;0 and 2: OR these bits together and interpret as a number from 0..3 representing drawing layer, with 0 as backmost and 3 as frontmost.&amp;lt;br&amp;gt;1: if 1, the sprite is mirrored.&lt;br /&gt;
|-&lt;br /&gt;
| 115 || ACTIONDEF || openAction || Behaviour when opening the object. See below for ACTIONDEF.&lt;br /&gt;
|-&lt;br /&gt;
| 165 || [[BYTE]] || onCollision || Unknown value encoding what to do when Holmes collides with the object.&lt;br /&gt;
|-&lt;br /&gt;
| 166 || [[BYTE]] || unknown || unknown purpose&lt;br /&gt;
|-&lt;br /&gt;
| 167 || [[BYTE]] || seqRepCounter || runtime: counts how many times the object&#039;s sequence&#039;s current loop has repeated.&lt;br /&gt;
|-&lt;br /&gt;
| 168 || [[UINT16LE]] || approachX ||rowspan=3| Holmes walks to this position when approaching an object to interact with it.&lt;br /&gt;
|-&lt;br /&gt;
| 170 || [[UINT8]] || approachY&lt;br /&gt;
|-&lt;br /&gt;
| 171 || [[UINT8]] || approachLoop&lt;br /&gt;
|-&lt;br /&gt;
| 172 || [[BYTE]] || unknown || unknown purpose&lt;br /&gt;
|-&lt;br /&gt;
| 173 || ACTIONDEF || closeAction || Behaviour when closing the object. See below for ACTIONDEF.&lt;br /&gt;
|-&lt;br /&gt;
| 223 || [[UINT8]] || seqPrevIndex || runtime: previous sequence loop position, saved by sequence call command.&lt;br /&gt;
|-&lt;br /&gt;
| 224 || [[UINT8]] || seqFinalFrame || runtime: final frame of sequence shorthand iterator, to be defined later in sequence section.&lt;br /&gt;
|-&lt;br /&gt;
| 225 || [[UINT16LE]] || textOffset || Offset of object&#039;s ASCIIZ description text in room textBlock, used when Holmes uses Look interaction on the object.&lt;br /&gt;
|-&lt;br /&gt;
| 227 || [[UINT8]] || seqLoopCounter || runtime: number of times a called sequence loop has repeated.&lt;br /&gt;
|-&lt;br /&gt;
| 228 || [[UINT16LE]] || seqSize || Size of object&#039;s sequence data in the room sequenceBlock.&lt;br /&gt;
|-&lt;br /&gt;
| 230 || [[BYTE]] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 231 || ACTIONDEF || moveAction || Behaviour when moving the object. See below for ACTIONDEF.&lt;br /&gt;
|-&lt;br /&gt;
| 281 || [[BYTE]][8] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| 289 || ACTIONDEF2[4] || extraActions || See below for ACTIONDEF2.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ACTIONDEF&amp;lt;/tt&amp;gt; handles open, close, move actions. It is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || animNum || Animation number to play when interacting. 99 means a TLK script is to be loaded.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || unknown || unknown purpose&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4][12] || names || Names of other room objects to toggle or TLK scripts to load.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ACTIONDEF2&amp;lt;/tt&amp;gt; handles other actions like pickup. It is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || animNum || Animation number to play when interacting. 99 means a TLK script is to be loaded.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || unknown || unknown purpose&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][4][12] || names || Names of other room objects to toggle or TLK scripts to load.&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]] || flag || story progress flag, either a prerequisite for or result of the action.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][6] || unknown || always 0&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][12] || lastName || Always contains either a TLK script name, or special tags like *SELF*, *PICKUP*.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sequence Structure ==&lt;br /&gt;
&lt;br /&gt;
Coming soon.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5839</id>
		<title>RRM Format (Mythos Software)</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5839"/>
		<updated>2014-12-19T11:31:29Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;RRM Format (Mythos Software)&#039;&#039;&#039; is a container for room-specific data in [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]].&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The header has this format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || magicText || &amp;quot;\r\n\nHOLMES RESOURCE FILE V2.1\r\n\n\x1A&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][7] || magicBytes || The same in all files: 00 14 9C 0E 74 50 05. Unknown meaning.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || isPacked || 09 = unpacked, 0A = packed.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || dirOffset || Offset of the directory, described below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by zero or more animation offsets and data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]][nAnims] || animOffsets || Offsets to VGS data for animations.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nAnims] || anims || Animations in the Visage format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
nAnims is found in the directory that follows. RRM files are not parsed sequentially.&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
&lt;br /&gt;
The directory gives total numbers or sizes of various resources.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nObjects || Number of logical room objects, defined below.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nSprites || Number of VGS chunks associated with room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nAnims || Number of VGS chunks in the previous section.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || textSize || Size of the text block below, containing object descriptions.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || sequencesSize || Size of the sequence block below, defining sprite frame orders.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always zero.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sprites are persistent graphics for room objects, typically lasting the duration of play in the room. Animations are typically used for one-off events.&lt;br /&gt;
&lt;br /&gt;
=== Sprite Definitions ===&lt;br /&gt;
&lt;br /&gt;
Next comes a table defining the sprites:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SPRITEDEF[nObjects] || spriteDefs || See below for SPRITEDEF definition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that there are nObjects SPRITEDEFs not nSprites. There are always at least as many objects as there are sprites, and the table is null-padded.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || spriteSize || Size of the VGS chunk for this sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || numFrames || Number of frames in the sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][9] || spriteName || Internal name of the sprite.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Object Data ===&lt;br /&gt;
&lt;br /&gt;
Objects are the game&#039;s most complex data structure and will be defined later on this page. For now, they will be viewed simply as 569-byte chunks. They and their remaining associated data follow:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| OBJECTDEF[nObjects] || objects || Logical room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][textSize] || objectText || ASCIIZ descriptions used when looking at an object.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][sequencesSize] || sequenceBlock || Object sequences, defined later on this page.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nSprites] || sprites || VGS chunks for sprites defined in the SPRITEDEFs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VGS chunks for sprites can be read sequentially using the size field in the SPRITEDEFs.&lt;br /&gt;
&lt;br /&gt;
=== Animation Structures ===&lt;br /&gt;
&lt;br /&gt;
Next come structures defining the behaviour of animations:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIMDEF[nAnims] || animDefs || See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][12] || name || Name of the animation structure.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][30] || sequence || Sequence defining frame order, etc. Sequences are defined later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Topleft coordinate for first animation frame.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || size || Size of VGS chunk in the block near the top of the file.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || state || Related to state field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || drawOptions || Related to drawOptions field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; standing position when the animation begins.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || endPos || Holmes&#039; standing position when the animation ends.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
HPOS is a type also used elsewhere in this file. It defines a &#039;stance&#039; for Holmes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Screen coordinate * 100&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y &lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || loopNum || Index into Holmes&#039; list of lists of frames, to be added here later. Essentially, the direction he is facing and whether he is walking or standing still.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The game does coordinate calculations internally in multiples of 100, for example the centre of the screen would be 16000x10000. This was presumably done to avoid floating point in diagonal move deltas.&lt;br /&gt;
&lt;br /&gt;
=== Pathing Data ===&lt;br /&gt;
&lt;br /&gt;
Next comes a number of data structures defining how Holmes moves around the room.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT16LE]] || boxBlockSize || Size of the following block of BOXDEFs. Let nBoxes = boxBlockSize / 10.&lt;br /&gt;
|-&lt;br /&gt;
| BOXDEF[nBoxes] || boxDefs || Boxes as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
BOXDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || flags || Unknown purpose.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A magic byte 0xFE follows, and then a lookup table and waypoints data chunk:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][nBoxes][nBoxes] || lookup || See below for explanation.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || waypointsSize || Size of following waypoints data chunk.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][waypointsSize] || waypoints || Waypoints data chunk.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data is used when Holmes tries to walk from one box to another. The boxes may not be connected and require travel through other boxes.  Let &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; be the index of the box he is in, and &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt; be the index of the destination box. lookup[&amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;][&amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;] where &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; is a column in the table will yield an index into the waypoints chunk. A waypoints entry looks like this:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nWaypoints || Number of waypoints that follow.&lt;br /&gt;
|-&lt;br /&gt;
| WAYPOINT[nWaypoints] || waypoints || List of screen coordinates that Holmes should walk towards on his path from &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;. Each coordinate is UINT16LE x, UINT8 y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that all entries on the main diagonal of the lookup matrix are 0, and at offset 0 in the waypoints block is a set of 0 waypoints, because there is no path needed from a box to itself. Additionally, all entries below the main diagonal are -1, indicating a redundant entry. This is because paths are reversible and the upper half contains all data needed.&lt;br /&gt;
&lt;br /&gt;
Next come the exit boxes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT8]] || nExitDefs || Number of following EXITDEFs.&lt;br /&gt;
|-&lt;br /&gt;
| EXITDEF[nExitDefs] || exitDefs || Exits as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
EXITDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || roomNum || Destination room number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always 1.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destX ||rowspan=2| Holmes&#039; position on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destY&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destLoop || Holmes&#039; animation loop on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Walking on an EXITDEF area causes Holmes to leave the room.&lt;br /&gt;
&lt;br /&gt;
Concluding the pathing data, Holmes&#039; starting position in the room:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; starting position on entering the current room.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
A list of sound effects follows.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nSoundDefs || Number of sound effect names that follow.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][nSoundDefs][9] || soundDefs || 8-byte sound effect name, padded with nulls, followed by byte 09. The sound effect is found in the LIB archive SND.SND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Room object sequences, defined later on this page, can cause a sound effect to be played by index into this list.&lt;br /&gt;
&lt;br /&gt;
=== Palette and Background ===&lt;br /&gt;
&lt;br /&gt;
The remainder of the &amp;lt;tt&amp;gt;.RRM&amp;lt;/tt&amp;gt; consists of a 768-byte VGA palette and a 320x138 background image.&lt;br /&gt;
&lt;br /&gt;
The palette is required to construct the animations and sprites earlier in the file. The programmer may choose between parsing through the file and constructing the animations and sprites later, or seeking to the end of the file immediately, since the palette is always at the fixed offset of EOF - (320 * 138 + 768).&lt;br /&gt;
&lt;br /&gt;
== Object and Sequence Definitions ==&lt;br /&gt;
&lt;br /&gt;
Coming soon.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5837</id>
		<title>RRM Format (Mythos Software)</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=RRM_Format_(Mythos_Software)&amp;diff=5837"/>
		<updated>2014-12-19T11:09:51Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;RRM Format (Mythos Software)&#039;&#039;&#039; is a container for room-specific data in The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
The header has this format:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][32] || magicText || &amp;quot;\r\n\nHOLMES RESOURCE FILE V2.1\r\n\n\x1A&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][7] || magicBytes || The same in all files: 00 14 9C 0E 74 50 05. Unknown meaning.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || isPacked || 09 = unpacked, 0A = packed.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || dirOffset || Offset of the directory, described below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Animations ===&lt;br /&gt;
&lt;br /&gt;
The header is followed by zero or more animation offsets and data:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]][nAnims] || animOffsets || Offsets to VGS data for animations.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nAnims] || anims || Animations in the Visage format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
nAnims is found in the directory that follows. RRM files are not parsed sequentially.&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
&lt;br /&gt;
The directory gives total numbers or sizes of various resources.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nObjects || Number of logical room objects, defined below.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nSprites || Number of VGS chunks associated with room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || nAnims || Number of VGS chunks in the previous section.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || textSize || Size of the text block below, containing object descriptions.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || sequencesSize || Size of the sequence block below, defining sprite frame orders.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always zero.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sprites are persistent graphics for room objects, typically lasting the duration of play in the room. Animations are typically used for one-off events.&lt;br /&gt;
&lt;br /&gt;
=== Sprite Definitions ===&lt;br /&gt;
&lt;br /&gt;
Next comes a table defining the sprites:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data Type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SPRITEDEF[nObjects] || spriteDefs || See below for SPRITEDEF definition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that there are nObjects SPRITEDEFs not nSprites. There are always at least as many objects as there are sprites, and the table is null-padded.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || spriteSize || Size of the VGS chunk for this sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || numFrames || Number of frames in the sprite.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][9] || spriteName || Internal name of the sprite.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Object Data ===&lt;br /&gt;
&lt;br /&gt;
Objects are the game&#039;s most complex data structure and will be defined later on this page. For now, they will be viewed simply as 569-byte chunks. They and their remaining associated data follow:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| OBJECTDEF[nObjects] || objects || Logical room objects.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][textSize] || objectText || ASCIIZ descriptions used when looking at an object.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][sequencesSize] || sequenceBlock || Object sequences, defined later on this page.&lt;br /&gt;
|-&lt;br /&gt;
| VGSChunk[nSprites] || sprites || VGS chunks for sprites defined in the SPRITEDEFs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VGS chunks for sprites can be read sequentially using the size field in the SPRITEDEFs.&lt;br /&gt;
&lt;br /&gt;
=== Animation Structures ===&lt;br /&gt;
&lt;br /&gt;
Next come structures defining the behaviour of animations:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| ANIMDEF[nAnims] || animDefs || See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][12] || name || Name of the animation structure.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][30] || sequence || Sequence defining frame order, etc. Sequences are defined later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Topleft coordinate for first animation frame.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT32LE]] || size || Size of VGS chunk in the block near the top of the file.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || state || Related to state field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || drawOptions || Related to drawOptions field of objects, explained later.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; standing position when the animation begins.&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || endPos || Holmes&#039; standing position when the animation ends.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
HPOS is a type also used elsewhere in this file. It defines a &#039;stance&#039; for Holmes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=2| Screen coordinate * 100&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y &lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || loopNum || Index into Holmes&#039; list of lists of frames, to be added here later. Essentially, the direction he is facing and whether he is walking or standing still.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The game does coordinate calculations internally in multiples of 100, for example the centre of the screen would be 16000x10000. This was presumably done to avoid floating point in diagonal move deltas.&lt;br /&gt;
&lt;br /&gt;
=== Pathing Data ===&lt;br /&gt;
&lt;br /&gt;
Next comes a number of data structures defining how Holmes moves around the room.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT16LE]] || boxBlockSize || Size of the following block of BOXDEFs. Let nBoxes = boxBlockSize / 10.&lt;br /&gt;
|-&lt;br /&gt;
| BOXDEF[nBoxes] || boxDefs || Boxes as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
BOXDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || flags || Unknown purpose.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A magic byte 0xFE follows, and then a lookup table and waypoints data chunk:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[INT16LE]][nBoxes][nBoxes] || lookup || See below for explanation.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || waypointsSize || Size of following waypoints data chunk.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][waypointsSize] || waypoints || Waypoints data chunk.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This data is used when Holmes tries to walk from one box to another. The boxes may not be connected and require travel through other boxes.  Let &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; be the index of the box he is in, and &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt; be the index of the destination box. lookup[&amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;][&amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;] where &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; is a column in the table will yield an index into the waypoints chunk. A waypoints entry looks like this:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nWaypoints || Number of waypoints that follow.&lt;br /&gt;
|-&lt;br /&gt;
| WAYPOINT[nWaypoints] || waypoints || List of screen coordinates that Holmes should walk towards on his path from &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;dest&amp;lt;/tt&amp;gt;. Each coordinate is UINT16LE x, UINT8 y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that all entries on the main diagonal of the lookup matrix are 0, and at offset 0 in the waypoints block is a set of 0 waypoints, because there is no path needed from a box to itself. Additionally, all entries below the main diagonal are -1, indicating a redundant entry. This is because paths are reversible and the upper half contains all data needed.&lt;br /&gt;
&lt;br /&gt;
Next come the exit boxes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|- &lt;br /&gt;
| [[UINT8]] || nExitDefs || Number of following EXITDEFs.&lt;br /&gt;
|-&lt;br /&gt;
| EXITDEF[nExitDefs] || exitDefs || Exits as defined below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
EXITDEF is defined as follows:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || x ||rowspan=4| Coordinates defining a walkable area on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || y&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || w&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || h&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || roomNum || Destination room number.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || unknown || Always 1.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destX ||rowspan=2| Holmes&#039; position on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destY&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || destLoop || Holmes&#039; animation loop on entering the new room.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Walking on an EXITDEF area causes Holmes to leave the room.&lt;br /&gt;
&lt;br /&gt;
Concluding the pathing data, Holmes&#039; starting position in the room:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| HPOS || startPos || Holmes&#039; starting position on entering the current room.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
A list of sound effects follows.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| DataType || Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || nSoundDefs || Number of sound effect names that follow.&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][nSoundDefs][9] || soundDefs || 8-byte sound effect name, padded with nulls, followed by byte 09. The sound effect is found in the LIB archive SND.SND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Room object sequences, defined later on this page, can cause a sound effect to be played by index into this list.&lt;br /&gt;
&lt;br /&gt;
=== Palette and Background ===&lt;br /&gt;
&lt;br /&gt;
The remainder of the &amp;lt;tt&amp;gt;.RRM&amp;lt;/tt&amp;gt; consists of a 768-byte VGA palette and a 320x138 background image.&lt;br /&gt;
&lt;br /&gt;
The palette is required to construct the animations and sprites earlier in the file. The programmer may choose between parsing through the file and constructing the animations and sprites later, or seeking to the end of the file immediately, since the palette is always at the fixed offset of EOF - (320 * 138 + 768).&lt;br /&gt;
&lt;br /&gt;
== Object and Sequence Definitions ==&lt;br /&gt;
&lt;br /&gt;
Coming soon.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Talk:Visage_Format&amp;diff=5836</id>
		<title>Talk:Visage Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Talk:Visage_Format&amp;diff=5836"/>
		<updated>2014-12-19T09:19:56Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Created page with &amp;quot;BASIC isn&amp;#039;t my cup of tea so I&amp;#039;ll leave it to you to add this, but here&amp;#039;s how the RLE works. After the 8-byte header, there are 3 compression header bytes: UINT16LE chunk_size...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BASIC isn&#039;t my cup of tea so I&#039;ll leave it to you to add this, but here&#039;s how the RLE works. After the 8-byte header, there are 3 compression header bytes: UINT16LE chunk_size, BYTE repeat_marker. Now loop until out of data: read a BYTE as val; if it&#039;s the repeat_marker, read another BYTE as val2, read another BYTE as num, and add num val2s to output. If val wasn&#039;t the repeat marker, add it to output. Loop. Finally, output size should match width * height from the header. [[User:Ceidwad|Ceidwad]] ([[User talk:Ceidwad|talk]]) 09:19, 19 December 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=The_Lost_Files_of_Sherlock_Holmes:_The_Case_of_the_Serrated_Scalpel&amp;diff=5831</id>
		<title>The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=The_Lost_Files_of_Sherlock_Holmes:_The_Case_of_the_Serrated_Scalpel&amp;diff=5831"/>
		<updated>2014-12-19T08:51:19Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Added link to RRM format page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedMoreInfo}}&lt;br /&gt;
{{Game Infobox&lt;br /&gt;
 | Title = The Lost Files of Sherlock Holmes- The Case of the Serrated Scalpel.png &amp;lt;!-- Only because of the colon --&amp;gt;&lt;br /&gt;
 | Levels = No&lt;br /&gt;
 | Tiles = No&lt;br /&gt;
 | Sprites = No&lt;br /&gt;
 | Fullscreen = No&lt;br /&gt;
 | Sound = No&lt;br /&gt;
 | Music = No&lt;br /&gt;
 | Text = No&lt;br /&gt;
 | Story = No&lt;br /&gt;
 | Interface = No&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=game}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| grp = Edit&lt;br /&gt;
| map = No&lt;br /&gt;
| gfx = No&lt;br /&gt;
| mus = No&lt;br /&gt;
| sfx = No&lt;br /&gt;
| txt = No&lt;br /&gt;
| sav = No&lt;br /&gt;
| exe = No&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
{{BeginGameFileList}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.lib&amp;lt;br/&amp;gt;*.snd&lt;br /&gt;
 | Format = [[LIB Format (Mythos Software)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Archive files containing game data&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.mus&lt;br /&gt;
 | Format = [[MUS Format (Mythos Software)]]&lt;br /&gt;
 | KnownFormat = No&lt;br /&gt;
 | Desc = Music.  Appears to be standard MIDI data with a custom header.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.rrm&lt;br /&gt;
 | Format = [[RRM Format (Mythos Software)]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Room container: background, sprites, objects, pathing, etc.&lt;br /&gt;
}}&lt;br /&gt;
{{GameFile&lt;br /&gt;
 | Name = *.vgs&amp;lt;br/&amp;gt;*.lbv&lt;br /&gt;
 | Format = [[Visage Format]]&lt;br /&gt;
 | KnownFormat = Yes&lt;br /&gt;
 | Desc = Palette, backgrounds, and sprites.&lt;br /&gt;
}}&lt;br /&gt;
{{EndGameFileList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Point and Click]]&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=5830</id>
		<title>User:Ceidwad</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=User:Ceidwad&amp;diff=5830"/>
		<updated>2014-12-19T08:39:23Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Longtime hobbyist reverse engineer.&lt;br /&gt;
&lt;br /&gt;
Games I&#039;m contributing info for:&lt;br /&gt;
&amp;lt;br&amp;gt;Captain Comic&lt;br /&gt;
&amp;lt;br&amp;gt;Lost Files of Sherlock Holmes: Case of the Serrated Scalpel&lt;br /&gt;
&lt;br /&gt;
I have an extensive archive of info for other games that I will be uploading as time allows. Drop me a line if you have a favourite game for which you&#039;d like file format info and I&#039;ll see what I can do!&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Visage_Format&amp;diff=5829</id>
		<title>Visage Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Visage_Format&amp;diff=5829"/>
		<updated>2014-12-19T08:37:30Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Minor corrections to header description.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Image Infobox&lt;br /&gt;
 | Hardware1       = VGA&lt;br /&gt;
 | Depth           = 8-bit (VGA)&lt;br /&gt;
 | MinSize         = 0&amp;amp;times;0&lt;br /&gt;
 | MaxSize         = 65535&amp;amp;times;65535 &amp;lt;!-- assuming game uses signed values --&amp;gt;&lt;br /&gt;
 | Palette         = Internal/External&lt;br /&gt;
 | NumPlanes       = 1&lt;br /&gt;
 | HasTransparency = Yes&lt;br /&gt;
 | HasHitmap       = No&lt;br /&gt;
 | Game1           = The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Visage Format&#039;&#039;&#039; is a graphic format that can store multiple images and palettes. It is used in [[The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel]] to store various backgrounds and sprites. Each block of data can be uncompressed or use RLE. Visage files use the *.vgs extension, though some use *.lbv.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Although the format can contain multiple blocks, there is no header to tell how many data blocks exist. You just need to check for End of File to know when you&#039;re done reading.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Width || Data width.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] || Height || Data height.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Unknown || 0 usually, disasssembly shows this can control scaling somehow.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || Compressed || 0 - Uncompressed, 1 - RLE.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || xOffset || Added to drawing position to offset an image. Works as an anchor to allow sprite&lt;br /&gt;
frames with varying dimensions to &#039;line up&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]] || yOffset || See X Offset.&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][Width&amp;amp;times;height] || Data || Palette or graphic data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With the header loaded, you know to read width&amp;amp;times;height bytes of data which can either be palette or graphic data.&lt;br /&gt;
&lt;br /&gt;
=== Palettes ===&lt;br /&gt;
Palette data can be identified because it begins with &amp;quot;VGS palette&amp;quot; followed by a standard 256 index, 6-bit color depth [[VGA Palette]]. For some reason the palette data is given a height of 1 (2 rows), so you have to concatenate the data to read the values properly.&lt;br /&gt;
&lt;br /&gt;
=== Graphics ===&lt;br /&gt;
Graphic data is implied if the data block isn&#039;t a palette. The graphic data is 8-bit VGA data, but, depending on the compression flag, can be either linear VGA data or use a type of RLE that has yet to be determined.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
The following FreeBASIC code will load through each block of a Visage file and display the palette or graphic data. It doesn&#039;t yet properly decode the RLE compressed graphics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;freebasic&amp;quot;&amp;gt;&lt;br /&gt;
&#039; Visage File Viewer.&lt;br /&gt;
&lt;br /&gt;
&#039; Visage files contain 1 or more blocks of data that can include either palette or graphic data.&lt;br /&gt;
&#039; Each block begins with a header of four 16-bit integers: width, height, RLE compression, and unknown.&lt;br /&gt;
&#039; Blocks containing palette data begin with &amp;quot;VGA palette&amp;quot;, all other blocks are graphic data.&lt;br /&gt;
&#039; Palette blocks are typical 8-bit VGA palettes, 256 indexes, each with three 6-bit color values.&lt;br /&gt;
&#039; Graphic blocks are raw 8-bit indexed VGA pixel data.&lt;br /&gt;
&lt;br /&gt;
&#039; The file path to the palette file you want to open.&lt;br /&gt;
Dim As String VGSFile = &amp;quot;H:\Programs\LIB Extractor\vgs\bigmap.vgs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039; Open the Visage file.&lt;br /&gt;
If Open(VGSFile For Binary Access Read As #1) &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
    Print &amp;quot;File: &amp;quot; + VGSFile + &amp;quot; not found!&amp;quot;&lt;br /&gt;
    Sleep&lt;br /&gt;
    End&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
Dim Y As Integer, X As Integer&lt;br /&gt;
Dim Index As UByte, Length As UByte&lt;br /&gt;
Dim XSize As UShort, YSize As UShort&lt;br /&gt;
Dim RLEFlag As UShort, Unknown As UShort&lt;br /&gt;
Dim BlockSize As UInteger&lt;br /&gt;
Dim As String PaletteCheck = &amp;quot;&amp;quot;&lt;br /&gt;
Dim ColorIndex As UShort, ColorOffset As UShort&lt;br /&gt;
Dim Red As UByte, Green As UByte, Blue As UByte&lt;br /&gt;
Dim As UByte Block = 0&lt;br /&gt;
Dim Offset As UInteger, Delta As UShort, I As UShort, FullLength As UInteger&lt;br /&gt;
&lt;br /&gt;
Screen 13&lt;br /&gt;
Do&lt;br /&gt;
    CLS&lt;br /&gt;
    &lt;br /&gt;
    &#039; Load the block header.&lt;br /&gt;
    Get #1, , XSize&lt;br /&gt;
    Get #1, , YSize&lt;br /&gt;
    Get #1, , RLEFlag&lt;br /&gt;
    Get #1, , Unknown&lt;br /&gt;
&lt;br /&gt;
    &#039;If XSize = 389 And YSize = 1 Then&lt;br /&gt;
    &#039;    &#039; Trap for palette which doesn&#039;t store the correct size to load.&lt;br /&gt;
    &#039;    XSize = 780&lt;br /&gt;
    &#039;End If&lt;br /&gt;
    &lt;br /&gt;
    BlockSize = (XSize + 1) * (YSize + 1)&lt;br /&gt;
&lt;br /&gt;
    Print &amp;quot;    Block #: &amp;quot; + Str(Block)&lt;br /&gt;
    Print &amp;quot;X, Y (Size): &amp;quot; + Str(XSize) + &amp;quot;, &amp;quot; + Str(YSize) + &amp;quot; (&amp;quot; + Str(BlockSize) + &amp;quot; bytes)&amp;quot;&lt;br /&gt;
    Print &amp;quot; Compressed: &amp;quot; + Str(RLEFlag)&lt;br /&gt;
    Print &amp;quot;    Unknown: &amp;quot; + Str(Unknown)&lt;br /&gt;
&lt;br /&gt;
    &#039; Create an array for the block data.&lt;br /&gt;
    ReDim VGSData(0 To Blocksize) As UByte&lt;br /&gt;
&lt;br /&gt;
    &#039; Load this block&#039;s data into the array.&lt;br /&gt;
    For Y = 0 To YSize&lt;br /&gt;
        For X = 0 To XSize&lt;br /&gt;
            Get #1, , VGSData(Y * XSize + X)&lt;br /&gt;
        Next X&lt;br /&gt;
    Next Y&lt;br /&gt;
&lt;br /&gt;
    &#039; Check for palette.&lt;br /&gt;
    PaletteCheck = &amp;quot;&amp;quot;&lt;br /&gt;
    For X = 0 To 11&lt;br /&gt;
        PaletteCheck = PaletteCheck + Chr(VGSData(X))&lt;br /&gt;
    Next X&lt;br /&gt;
    If PaletteCheck = &amp;quot;VGA palette&amp;quot; + Chr(26) Then&lt;br /&gt;
        Print &amp;quot;       Type: Palette Data&amp;quot;&lt;br /&gt;
        Sleep&lt;br /&gt;
        Cls&lt;br /&gt;
&lt;br /&gt;
        &#039; Loop through all of the colors.&lt;br /&gt;
        ColorOffset = 12&lt;br /&gt;
        ColorIndex = 0&lt;br /&gt;
        Do&lt;br /&gt;
            &#039; Read the color attributes from the file.&lt;br /&gt;
            Red   = VGSData(ColorOffset)&lt;br /&gt;
            Green = VGSData(ColorOffset + 1)&lt;br /&gt;
            Blue  = VGSData(ColorOffset + 2)&lt;br /&gt;
            &lt;br /&gt;
            Red   = Red   * 4&lt;br /&gt;
            Green = Green * 4&lt;br /&gt;
            Blue  = Blue  * 4&lt;br /&gt;
            &lt;br /&gt;
            &#039; Change the palette.&lt;br /&gt;
            Palette ColorIndex, Red, Green, Blue&lt;br /&gt;
            &lt;br /&gt;
            Line(ColorIndex, 0)-(ColorIndex, 199), ColorIndex&lt;br /&gt;
            ColorIndex = ColorIndex + 1&lt;br /&gt;
            ColorOffset = ColorOffset + 3&lt;br /&gt;
        Loop Until ColorOffset &amp;gt;= BlockSize&lt;br /&gt;
    Else&lt;br /&gt;
        Print &amp;quot;       Type: Graphic Data&amp;quot;&lt;br /&gt;
        Sleep&lt;br /&gt;
        Cls&lt;br /&gt;
&lt;br /&gt;
        &#039; If it&#039;s not a palette, it&#039;s graphic data.&lt;br /&gt;
        If RLEFlag = 0 Then&lt;br /&gt;
            &#039; Uncompressed image.&lt;br /&gt;
            For Y = 0 To YSize&lt;br /&gt;
                For X = 0 To XSize&lt;br /&gt;
                    PSet(X, Y), VGSData(Y * XSize + X)&lt;br /&gt;
                Next X&lt;br /&gt;
            Next Y&lt;br /&gt;
        Else&lt;br /&gt;
            &#039; Compressed image.&lt;br /&gt;
            Y = 0&lt;br /&gt;
            X = 0&lt;br /&gt;
            FullLength = VGSData(1) * 256 + VGSData(0)      &#039; Data Stream Length&lt;br /&gt;
            &#039; Unknown: Always FE FE.&lt;br /&gt;
            Offset = 4&lt;br /&gt;
            &#039; To Do: Decode RLE.&lt;br /&gt;
        End If&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    Sleep&lt;br /&gt;
    Block = Block + 1&lt;br /&gt;
Loop While Not EOF(1)&lt;br /&gt;
&lt;br /&gt;
Close #1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:TheAlmightyGuru|TheAlmightyGuru]]. If you find this information helpful in a project you&#039;re working on, please give credit where credit is due. (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_Map_Format&amp;diff=5826</id>
		<title>Captain Comic Map Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_Map_Format&amp;diff=5826"/>
		<updated>2014-12-19T08:22:58Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: Several corrections to EXE description. Added player start position info.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Map Infobox&lt;br /&gt;
 | Type = 2D tile-based&lt;br /&gt;
 | Layers = 1&lt;br /&gt;
 | Tile size = 16&amp;amp;times;16&lt;br /&gt;
 | Viewport = 192&amp;amp;times;160&lt;br /&gt;
 | Game1 = Captain Comic&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic Map Format&#039;&#039;&#039; stores the playable game levels.  Each level is stored in a separate file in the game directory, using the &amp;lt;tt&amp;gt;.PT&amp;lt;/tt&amp;gt; filename extension.&lt;br /&gt;
&lt;br /&gt;
The files only store the map background layer.  The player start position can be changed by editing the executable file.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
The file consists of a width, height and then a list of tiles.&lt;br /&gt;
&lt;br /&gt;
=== Signature ===&lt;br /&gt;
&lt;br /&gt;
There is no signature, however careful processing of the header can be used to check whether the width and height correctly describe the file size.  This could be confused with an image file however, so some other checks will be required (such as the absence of certain unused byte values, perhaps.)&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
Each file begins with the following header.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Data type!!Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] width || Width of map, in number of tiles&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT16LE]] height || Height of map, in number of tiles&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The map data follows immediately, with one byte for each tile, left-to-right and top-to-bottom.  The total size of this section is the map width multiplied by the map height.&lt;br /&gt;
&lt;br /&gt;
All maps are 128x10 tiles. Although the header uses UINT16LEs to store width and height, internally the game engine uses UINT8s, and the maximum width and height are hardcoded, so maps of different dimensions will not work properly.&lt;br /&gt;
&lt;br /&gt;
=== Map codes ===&lt;br /&gt;
&lt;br /&gt;
Map codes are direct indices into the tileset.  So a map code of 0x01 means the second tile in the tileset should be drawn at that location.  The tileset to use is matched up by filename (&amp;lt;tt&amp;gt;FOREST.TT2&amp;lt;/tt&amp;gt; provides the tiles for &amp;lt;tt&amp;gt;FOREST[0-2].PT&amp;lt;/tt&amp;gt;, for example.)&lt;br /&gt;
&lt;br /&gt;
== Executable file ==&lt;br /&gt;
&lt;br /&gt;
There is additional map data hard-coded in the game&#039;s main .exe file.  The .exe file is lightly compressed with [[Microsoft_ EXEPACK]]. Working with an unpacked .exe is necessary for full control over the map data. The size of unpacked .exe assumed here is 82672.&lt;br /&gt;
&lt;br /&gt;
At offset 63456 (0xF7E0) is a block of 1664 bytes containing the remaining level-related data. There are 8 blocks of 208 bytes, one for each level, &#039;level&#039; meaning the complete regions - forest, lake, etc., and &#039;PT&#039; for the three separate parts comprising the level.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][14] || tilesetFilename || &amp;lt;tt&amp;gt;.tt2&amp;lt;/tt&amp;gt; filename&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][14] || pt1Filename || First &amp;lt;tt&amp;gt;.pt&amp;lt;/tt&amp;gt; filename&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][14] || pt2Filename || Second &amp;lt;tt&amp;gt;.pt&amp;lt;/tt&amp;gt; filename&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][14] || pt3Filename || Third &amp;lt;tt&amp;gt;.pt&amp;lt;/tt&amp;gt; filename&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]][4] || doorTiles || Tileset indices of the four tiles used for drawing doors: top left, top right,&lt;br /&gt;
bottom left, bottom right. These are used to animate the doors.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All filenames are 13 bytes long, padded with spaces, followed by a null terminator byte.&lt;br /&gt;
&lt;br /&gt;
After this are four entries for the SHP files associated with the level. Each entry is of this form:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || frameCount || Number of frames in the SHP file&#039;s animation&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || spriteCount || Number of sprites (e.g. facing left, facing right, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || unknown || {{TODO|Unknown; always 0 or 1}}&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][14] || shapeFilename || SHP filename, null-terminated&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that multiplying number of frames by number of sprites by 160 (the number of bytes per frame), you do indeed get the total size of the shape file.&lt;br /&gt;
&lt;br /&gt;
Finally there are three blocks of 25 bytes, one corresponding to each PT:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || itemType || Item type. 0=corkscrew, 1=key, 2=boots, 3=lantern, 4=teleport wand, 5=gems, 6=crown, 7=gold, 8=cola, 14=shield&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || itemY || Item coordinate (max 18)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || itemX || Item coordinate (max 255; the PT is 128 tiles wide, but the player can stand halfway between tiles)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || exitL ||rowspan=2| Exit behaviour.  &amp;lt;tt&amp;gt;exitL&amp;lt;/tt&amp;gt; controls what happens on walking off the left side of the PT, &amp;lt;tt&amp;gt;exitR&amp;lt;/tt&amp;gt; controls the right. The values can be 0, 1, 2, giving the PT to load, or 255, meaning no PT change occurs.&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || exitR&lt;br /&gt;
|-&lt;br /&gt;
| DOOR[3] || door || Door data for up to three doors in the level (see below)&lt;br /&gt;
|-&lt;br /&gt;
| ENEMY[4] || enemy || Enemy data for up to four enemies (see below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This means there can be only one item or powerup per PT.  The &amp;lt;tt&amp;gt;itemType&amp;lt;/tt&amp;gt; is an index into the bitmaps found earlier in the EXE. (Not offsets; they just follow the same sequence.) (Slots between cola and shield (9-13) are for the five stages of the cola powerup display.) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;DOOR&amp;lt;/tt&amp;gt; is described as:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || doorY || Y-coordinate of the door&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || doorX || X-coordinate of the door&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || targetLevel || Target level (0-7, as an index into the overall dataset described on this page)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || targetPT || The target PT (0-2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Empty/unused door slots are FF FF 00 00.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ENEMY&amp;lt;/tt&amp;gt; is described as:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || shape || Enemy&#039;s sprite, as an index into the level&#039;s SHP data (see above)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || behaviour || Enemy behaviour. behaviour &amp;amp; 0x7f has these effects:&amp;lt;br/&amp;gt;1=enemy bounces around the walls&amp;lt;br/&amp;gt;2=the enemy approaches then bounces side to side&amp;lt;br/&amp;gt;3=the enemy chases along the ground&amp;lt;br/&amp;gt;4=the enemy dives to head height then chases&amp;lt;br/&amp;gt;5=the enemy sporadically dives to head height&amp;lt;br/&amp;gt;127=no enemy spawns in this slot (this restricts the maximum simultaneous enemies)&amp;lt;br/&amp;gt;If the high bit (=128) is set, the enemy moves at high speed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After a padding of five null bytes, data for the next level begins.&lt;br /&gt;
&lt;br /&gt;
To control the player&#039;s position when the game loads, two separate edits of the unpacked .exe are needed: two bytes at 0x265E give the starting level (0..7) and starting PT (0..2), with default values 01 00. The player&#039;s starting coordinates are given by two bytes at 0x96C3: y (0..17), x (0..255), default values 0C 0E.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
{{BeginFileFormatTools|Type=map}}&lt;br /&gt;
{{FileFormatTool&lt;br /&gt;
| Name = [[Camoto]]&lt;br /&gt;
| Platform = Linux/Windows&lt;br /&gt;
| canView = Yes&lt;br /&gt;
| canCreate = Yes&lt;br /&gt;
| canModify = Yes&lt;br /&gt;
| editHidden = N/A&lt;br /&gt;
| editMetadata = N/A&lt;br /&gt;
}}&lt;br /&gt;
{{EndFileFormatTools}}&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Malvineous|Malvineous]].  The .exe file data was reverse-engineered by [[User:Ceidwad|Ceidwad]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_Tileset_Format&amp;diff=5813</id>
		<title>Captain Comic Tileset Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Captain_Comic_Tileset_Format&amp;diff=5813"/>
		<updated>2014-12-19T07:40:51Z</updated>

		<summary type="html">&lt;p&gt;Ceidwad: clarified purpose of first header byte&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = EGA&lt;br /&gt;
 | MaxTiles = &#039;&#039;Unlimited&#039;&#039;&lt;br /&gt;
 | Palette = Default EGA&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 16&amp;amp;times;16&lt;br /&gt;
 | TileMaxSize = 16&amp;amp;times;16&lt;br /&gt;
 | NumPlanes = 4&lt;br /&gt;
 | PlaneArrangement = [[Raw_EGA_data#Planar_EGA_data|Tile-planar]]&lt;br /&gt;
 | HasTransparency = N&lt;br /&gt;
 | HasHitmap = N&lt;br /&gt;
 | Metadata = None&lt;br /&gt;
 | Subtilesets = N&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Hidden = N&lt;br /&gt;
 | Game1 = Captain Comic&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Captain Comic Tileset Format&#039;&#039;&#039; stores the images used for drawing the game levels.  All tiles are fixed as 16&amp;amp;times;16 pixels in size.  The format is very similar to the [[Captain Comic Sprite Format]].&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Data type !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || lastPassable || index of last non-blocking tile, tiles of a higher index block the player (walls, ledges, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || unknown1 || {{TODO|Unknown - always 0x00}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || unknown2 || {{TODO|Unknown - always 0x00}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || flags || 0=default, 4=unknown, only used in CASTLE.TT2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The tile data follows this header, in blocks of 128 bytes per tile.&lt;br /&gt;
&lt;br /&gt;
The tiles are 16-colour images, split into four planes (see [[Raw_EGA_data#Planar_EGA_data]]).  Each image is stored one after the other (no header.)  The planes within each image are ordered with blue first, followed by green, red and intensity last.  32 bytes per plane multipled by four planes gives 128 bytes per tile.&lt;br /&gt;
&lt;br /&gt;
As each image is entirely contained within the 128 bytes, the offset of a given tile can be calculated as&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;offset&#039;&#039; = 4 + &#039;&#039;tile&#039;&#039; * 128&lt;br /&gt;
&lt;br /&gt;
The filenames for each tileset match the levels, so &amp;lt;tt&amp;gt;FOREST.TT2&amp;lt;/tt&amp;gt; contains the tiles for the three map files &amp;lt;tt&amp;gt;FOREST[0-2].PT&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This file format was reverse engineered by [[User:Malvineous|Malvineous]].  If you find this information helpful in a project you&#039;re working on, please give credit where credit is due.  (A link back to this wiki would be nice too!)&lt;/div&gt;</summary>
		<author><name>Ceidwad</name></author>
	</entry>
</feed>