<?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=Mr+spectacals</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=Mr+spectacals"/>
	<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/wiki/Special:Contributions/Mr_spectacals"/>
	<updated>2026-09-21T00:35:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11052</id>
		<title>Jazz Jackrabbit Cutscene Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11052"/>
		<updated>2023-05-25T08:31:16Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: /* Animations and Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cutscene Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | Resolution = 320&amp;amp;times;200&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] cutscenes (.0SC) are the movies played at the end of levels and episodes. They have an exceedingly complex format that has been poorly understood. They contain sound, music, graphics and text. The following snippets of information have been gathered.&lt;br /&gt;
&lt;br /&gt;
== Headers ==&lt;br /&gt;
&lt;br /&gt;
There are three headers, only the first being of a fixed size.&lt;br /&gt;
&lt;br /&gt;
=== File header ===&lt;br /&gt;
&lt;br /&gt;
 0     19     Signature   File signature &#039;Digital Dimensions&#039; + $1A&lt;br /&gt;
 19    4      Img point   Pointer to start of image data header&lt;br /&gt;
 23    4x + 2 Page header Header for pages&lt;br /&gt;
 ?     4y + 2 Img header  Image header&lt;br /&gt;
&lt;br /&gt;
=== Page and Image headers ===&lt;br /&gt;
&lt;br /&gt;
 0     2      Num         Number of entries (Pages or images) in file&lt;br /&gt;
 2     4x     Pointers    Pointers to data&lt;br /&gt;
&lt;br /&gt;
These two headers have almost identical formats. The page header stores the pointers to pages or &#039;scripts&#039; in the cutscene while the graphic header stores the pointers to palettes, still screens and animated screens used by pages. While the length of the page header is always 4 times the number of pages, the graphics header is always much shorter IF there are animated screens. (One pointer to an animated screen can have dozens of animations in it, each counting as one graphic.)&lt;br /&gt;
&lt;br /&gt;
== Pages ==&lt;br /&gt;
&lt;br /&gt;
The page, or script is the basic segment of the cutscene. Each page can display some font and a graphic and can transition to other pages. The page data contains a number of sub-segments of varying length that may or may not be present and in various orders.&lt;br /&gt;
&lt;br /&gt;
 0     1      Sig         Signature &#039;P&#039;&lt;br /&gt;
 2     2      Pagenum     Page number, as value, not string, starts with $0001&lt;br /&gt;
 4     2      Pal         Palette used&lt;br /&gt;
 6     ?      Segs        Optional and vital strings in no particular order&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
       1      End         End of page data &#039;E&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sub segments ===&lt;br /&gt;
&lt;br /&gt;
Page sub-segments are usually in the following order; in some cases this is necessary (You cannot have a text segment without defining what fonts it can use.) in other cases just the way things are.&lt;br /&gt;
&lt;br /&gt;
==== Music ====&lt;br /&gt;
&lt;br /&gt;
Indicates what music file will play during the movie. This is set on the first page only and cannot be changed. Optional, a cutscene may not use music.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $2A; this is a music string&lt;br /&gt;
 1     1      Len         Length of music file name&lt;br /&gt;
 2     len    Name        Name of music file, inc .PSM&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Indicates what fonts will be used in the movie, several allowed. These appear on the first page only and cannot be changed. The value given to each font in this string will be used throughout the movie in font sub-segments. Optional, a cutscene may not use fonts.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $58; this is a font string&lt;br /&gt;
 1     2      Fontnum     What number this font is&lt;br /&gt;
 3     1      Len         Length of font name&lt;br /&gt;
 4     len    Name        Font name, excluding extension (.0FN added automatically)&lt;br /&gt;
&lt;br /&gt;
==== Animations and Images ====&lt;br /&gt;
&lt;br /&gt;
Indicates what graphic is displayed on the page. Vital and each page must have at least one of these. If a page has an animation it will NOT have a text or any image sub-segments&lt;br /&gt;
&lt;br /&gt;
 IMAGE&lt;br /&gt;
 0    1      Img sig     Image signature, $46&lt;br /&gt;
 1    2      h loc       Location of image on screen in pixels. For fullscreen images this is&lt;br /&gt;
 3    2      v loc       usually 0,0; for smaller images (rare) this can be anything&lt;br /&gt;
 5    2      Graphnum    Graphic to use, 0 is black screen, palettes cannot be used.&lt;br /&gt;
&lt;br /&gt;
 ANIMATION&lt;br /&gt;
 0    1      Graph sig   Graphics signature, $A6&lt;br /&gt;
 1    4      Anim loop   For animated screens, loops the animation. If no loop, page must move on&lt;br /&gt;
                         before loop ends or Jazz will crash. Loop value is 1&lt;br /&gt;
 4    2      Anim sp     Animation speed, lower = slower; usually $xx00 (upper byte in word gets you frames per second)&lt;br /&gt;
 6    2      Graphnum    Graphic to use, must be an animated screen graphic&lt;br /&gt;
 8    1      Play sig    Ply animation signature, $A7, optional (See following)&lt;br /&gt;
 9    1      Play        For pages that do NOT loop an animation AND do NOT have a set time before&lt;br /&gt;
                         they move on (Duration.) this plays the animation then goes to the next&lt;br /&gt;
                         page. This can only be 1, otherwise it and its signature are absent&lt;br /&gt;
&lt;br /&gt;
==== Text ====&lt;br /&gt;
&lt;br /&gt;
This is really a collection of related segments and signatures. Generally last on the page, these all relate to text strings written on the page. In general you can expect them to start with a &#039;W&#039; signature, though this is not guaranteed. These do not appear on any page with an animation and are optional.&lt;br /&gt;
&lt;br /&gt;
Signatures can be in any order as long as what they do &#039;makes sense&#039; (For example you cannot write any text until you&#039;ve set the font used, the palette zero color AND the justification, but after you have you can write as many lines as you want. You can can change the font used twice without writing anything. You can start a block, write something then start a new block.)&lt;br /&gt;
&lt;br /&gt;
The signatures change values in the movie (All values start at 0) For example the &#039;F&#039; signature sets the font text is written in. It must be set before text is written and all text following it will use that font until it is reset. Values are not reset when a page is switched, meaning that you can write many pages of text in a font after setting it once.&lt;br /&gt;
&lt;br /&gt;
 ?    1      Write sig    Write signature, &amp;quot;W&amp;quot;; indicates text segment start; there can be more than one&lt;br /&gt;
                          segment of text on a page. The following values affect ALL the text in a&lt;br /&gt;
                          given text block and always appear in a given order. Note that if a new&lt;br /&gt;
                          block starts, ALL values are NOT reset.&lt;br /&gt;
 +1   2      Top margin   The page margins; Text cannot normally appear above or left of this location&lt;br /&gt;
 +3   2      Left margin  unless this is reset or the text wraps around from the right/bottom of the screen&lt;br /&gt;
 +5   2      Pix h        The location of the first line of text, in pixels from the margins. The second&lt;br /&gt;
 +7   2      Pix v        value (v) appears not to be read, just the horizontal one, which can, if larger&lt;br /&gt;
                          than 320, wrap around and move text vertically (640 moves text down 2 lines...)&lt;br /&gt;
                          If this block is not the first block, NEITHER value is read or used!&lt;br /&gt;
&lt;br /&gt;
 ?    1      Shad sig     $DB sets shadows&lt;br /&gt;
 +1   1      Shadow       $01 turns shadows on, $00 turns them off. Default is off&lt;br /&gt;
 +2   1      Shad color   Palette color used for shadows&lt;br /&gt;
&lt;br /&gt;
 ?    1      Font sig     Change font signature, &amp;quot;F&amp;quot;; indicates what font will be used for the&lt;br /&gt;
                          text following&lt;br /&gt;
 +1   2      Font         Font used. Must be a valid font number&lt;br /&gt;
&lt;br /&gt;
 ?    1      Just sig     Justification signature &amp;quot;J&amp;quot;&lt;br /&gt;
 +1   1      Just         Justification. Text is either left(0) or right(1) aligned; this defines&lt;br /&gt;
                          the text start (The position value above reads either left or right.)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Pal sig      Palette zero value signature, &amp;quot;A&amp;quot;&lt;br /&gt;
 +1   2      Pal zero     Palette &#039;zero color&#039;; this value in the palette is set as color 0 for&lt;br /&gt;
                          the font; thus the same font can be several different colors depending&lt;br /&gt;
                          on its zero color. For example a font pixel $0E can be color $1F or $2E&lt;br /&gt;
                          depending on the value (In this case $11 or $20)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Line sig     Sentence signature, &amp;quot;@&amp;quot;&lt;br /&gt;
 +1   1      Length       Sentence length, in letters&lt;br /&gt;
 +2   len    Text         Text, letter displayed is this value&#039;s letter in the font file. The value $7F&lt;br /&gt;
                          is space. Values over $80 move into the next font (Crashes game if there is no&lt;br /&gt;
                          next font.) Thus $81 in font 1 will become $01 in font 2&lt;br /&gt;
&lt;br /&gt;
 ?    1     Pnum sig      Signature for special text, &amp;quot;^&amp;quot; Text that uses this is usually the &#039;Page x of y&#039;&lt;br /&gt;
 +1   len   Length        This is the same as the usual text signature stuff, after this a string of text&lt;br /&gt;
                          follows. The difference is that values over $89 are allowed and can do special&lt;br /&gt;
                          things. $8B is current page number and $8A is the number of pages in the cutscene.&lt;br /&gt;
                          $8C is &#039;000&#039; and higher values seem to be &#039;0&#039; Possibly these refer to values in&lt;br /&gt;
                          memory.&lt;br /&gt;
&lt;br /&gt;
 ?    1     Move sig      Move line signature, &amp;quot;_&amp;quot;&lt;br /&gt;
 +1   2     Line move     Changes the height of all following text lines by this amount, in pixels. Thus if&lt;br /&gt;
                          this value is 5, the first line will be 5 pixels lower, the second 10, the 3rd 15...&lt;br /&gt;
                          As such it is usually reset to 0 after the desired text is done. This is usually used&lt;br /&gt;
                          to position a line of text specially on a background image or relative to other text&lt;br /&gt;
&lt;br /&gt;
===== An example =====&lt;br /&gt;
&lt;br /&gt;
The following is a segment of text taken from &amp;lt;tt&amp;gt;ORDER.0SC&amp;lt;/tt&amp;gt; in Jazz CD, starting at position $8A in the file. It is some of the text for the first page of the Order Info cutscene:&lt;br /&gt;
&lt;br /&gt;
 57          Text block start sig &lt;br /&gt;
 14 00 00 00 Location of text left limit, 20 pixels from left of screen&lt;br /&gt;
 36 01       Font start, 310 pixels&lt;br /&gt;
 BE 01 &lt;br /&gt;
 DB 01 00    Text has shadows of color 0&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 4A 01       Font is aligned right&lt;br /&gt;
 41 00 00    Font zero color is value 0&lt;br /&gt;
 5E 0C       Special text string follows, 12 characters long&lt;br /&gt;
 10 1B 21... Text&lt;br /&gt;
&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 41 00 00    Font zero color = 0&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 02 00    Font used is 2&lt;br /&gt;
 40 00       Text string follows, 0 long (Move down a line)&lt;br /&gt;
 40 1D       Text string follows, 29 long&lt;br /&gt;
 7F 7F...    &#039;Had enough excitement...&#039;&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F... &#039;We didn&#039;t think...&#039;&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F    &#039;You are playing...&#039;&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
&lt;br /&gt;
There are a number of less complex segments that may appear on each page.&lt;br /&gt;
&lt;br /&gt;
 Screen transition segment&lt;br /&gt;
 0    1      Sig         Screen transition signature $3F&lt;br /&gt;
 1    1      Trans       Transition, 0 = none, 1 = speckle 2 = circle&lt;br /&gt;
&lt;br /&gt;
 Page duration segment&lt;br /&gt;
 1    1       Sig         Signature &#039;]&#039;&lt;br /&gt;
 2    1       Duration    How long in seconds page stays before transitioning to next page&lt;br /&gt;
&lt;br /&gt;
 Music transition segment&lt;br /&gt;
 1    1       Sig         Signature, &#039;Q&#039;&lt;br /&gt;
 2    1       Music trans Music transition, $2D stops music on page transition&lt;br /&gt;
&lt;br /&gt;
 Yes/no input segment&lt;br /&gt;
 1    1       Sig         Signature $23, if present page accepts only &amp;quot;y&amp;quot; or &amp;quot;n&amp;quot; as input and will&lt;br /&gt;
                          switch to the next page ONLY if &amp;quot;y&amp;quot; is pressed, otherwise the movie will end&lt;br /&gt;
&lt;br /&gt;
 ???&lt;br /&gt;
 1    1       ???          Signature &#039;&amp;gt;&#039;; apparently does something unknown&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
There are three kinds of graphic, palette, still screen and animated screen. Each has its own unique format.&lt;br /&gt;
&lt;br /&gt;
=== Palette ===&lt;br /&gt;
&lt;br /&gt;
The palette is the 256 colors used by a screen to display graphics and fonts. A page may only use one palette but a cutscene can have several. Palettes are [[Jazz Jackrabbit RLE compression]] compressed and decompress to 768 bytes in length, 256 3-byte RGB values. (The same format as palette blocks in other Jazz files such as [[Jazz Jackrabbit Tile Format]] Palettes are 6-bit stored as 8-bit, so each value must be multiplied by four to get the &#039;true&#039; color for bitmaps.&lt;br /&gt;
&lt;br /&gt;
Palettes are usually the first graphics entries.&lt;br /&gt;
&lt;br /&gt;
=== Static screens ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that fill an entire screen and act as the background to a page. Like palettes they are [[Jazz Jackrabbit RLE compression]] compressed, but decompress to 64&#039;004 bytes in length. Note that while other image sizes are possible, in practice only fullscreen images are seen.&lt;br /&gt;
&lt;br /&gt;
 0     2      Width       Width of following screen&lt;br /&gt;
 2     2      Height      Height of following screen&lt;br /&gt;
 4     hw     Data        Screen data&lt;br /&gt;
&lt;br /&gt;
=== Animation sequences ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that animate. They cannot have font displayed over them and are the traditional &#039;movie&#039; part of Jazz cutscenes. Their format is complex and poorly understood but relies on at least two forms of unique RLE compression. There is a header followed by a start image compressed in one way, followed by a number of &#039;frames&#039; compressed in another manner.&lt;br /&gt;
&lt;br /&gt;
 0     2      Sig1       Signature &#039;AN&#039;&lt;br /&gt;
 2     2      Sig2       $02&lt;br /&gt;
 4     2      Number of frames (excluding frame with end opcode $455F)&lt;br /&gt;
 6     2      Pal sig    Palette signature &#039;PL&#039;&lt;br /&gt;
 8     2      Palsize    Size of following unused palette (Always $300)&lt;br /&gt;
 10    768    Palette    Unused(?) palette, uncompressed&lt;br /&gt;
 778   ?      Anim st    Animation start image&lt;br /&gt;
 ?     ?      Anims      Following animation frames&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ?     4      End	 End of anim sequence, $5F $45 $00 $00 &#039;_E  &#039;&lt;br /&gt;
&lt;br /&gt;
==== Animation Start Image ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first row of data changed from black to pink. showing how columns are colored, not pixels.]]&lt;br /&gt;
&lt;br /&gt;
This image is written onto a &#039;blank&#039; screen when a page is started and the other animations work by overwriting this. In many cases it works like the &#039;background&#039; of a .GIF image. The data will ALWAYS decompress to a 64&#039;000 byte fullscreen image.&lt;br /&gt;
&lt;br /&gt;
The way the image is drawn however is interesting. Instead of drawing each line pixel by pixels as static screens to, when a pixel of a given color is drawn, all the pixels directly beneath it will be colored the same. This is a great space saver; instead of coloring all of the background of an image blue, for example, only the first line must be blue; all the other lines below it will then be this color as well.&lt;br /&gt;
&lt;br /&gt;
An image is built up by lower lines overwriting earlier ones, line by line. In the image left the first row of the image has been changed from black to pink, also changing all the columns under it to pink. Lower lines overwrite this with other colors, thus building up the image.&lt;br /&gt;
&lt;br /&gt;
Color 255 ($FF) is &#039;transparent&#039;; in practice this means &#039;skip over this column, it&#039;s already the right color&#039; In our &#039;blue screen&#039; example above, all the other rows would be colored transparent, since the entire screen would be blue and we wouldn&#039;t want to change that. In the example image above all the pink columns have been skipped over until another color was needed. It is possible to show the exact same image by replacing the transparent pixels with the value of the pixel above them, but this takes up a lot more space and takes longer to draw.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen What to do to the screen before the image is displayed. $3131 is &#039;rle image&#039;&lt;br /&gt;
                         $4c31 means use other form of compression for image&lt;br /&gt;
                         $4646 means &#039;leave as is&#039; This image usually uses &#039;reset&#039;; clearing the&lt;br /&gt;
                         screen and writing the image on it&lt;br /&gt;
 2     2      Anim size  Size of animation data to follow&lt;br /&gt;
 4     ?      data       Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used on the first image can be either normal [[Jazz Jackrabbit RLE compression]] ($3131 tag) or a more complex form of the usual ($4c31 tag), with a wider variety of control bytes. It may be considered to contain elements or RLEW as well. The upshot of this is to allow a large image to be compressed rather more efficiently than standard RLE. The types of control bytes are as follows for this format:&lt;br /&gt;
&lt;br /&gt;
 $0x $...	Next x + 1 bytes are &#039;literals&#039;; each byte colors 1 column (Max val $3F)		&lt;br /&gt;
 $4x $yy        Next x + 1 columns drawn in color yy (Max value $7E)&lt;br /&gt;
 $7F $xxxx $yy	Next xxxx columns colored with color yy&lt;br /&gt;
 $8x		Next x + 1 pixels are skipped, they&#039;re already the right color (Max val $FE)&lt;br /&gt;
 $FF $xxxx	Skip next xxxx pixels of picture, they&#039;re already the right color&lt;br /&gt;
&lt;br /&gt;
==== Animation frames ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage2.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first animation frame in the wrong location.]]&lt;br /&gt;
&lt;br /&gt;
These follow the first image and are usually compressed to much smaller sizes as they involve changes to the previous screen rather than drawing a whole new screen. They are either a fullscreen frame (type $5b5d( ][ )) using the alternative compression mode used in the start image or a modified form of the animation start compression that has not yet been figured out(type $4646(FF) and type $4352(RC)). $0000 can also be used to tell program to not change anything and treat as a still frame for the length of 1 / fps.&lt;br /&gt;
&lt;br /&gt;
The frame is drawn by taking the previous screen and drawing the changes over it. In the example picture right the second animation frame has been moved left by 200 pixels so it is written over a black background. It can bee seen how little of the image has been changed and also how much of it is transparent. (In the middle of the smoke this is most easily seen where black pixels show where the previous screen had the right color grays not to need changing.)&lt;br /&gt;
&lt;br /&gt;
It can also be seen that an animation can erase a previous frame by changing pixels back to what they were previously. In the example image some smoke fragments are visible because they have not been overwritten.&lt;br /&gt;
&lt;br /&gt;
If the animation isn&#039;t &#039;fullscreen&#039; then when decompressed it does not have to be 64&#039;000 long (320x200) While the animation starts drawing at 0,0 it can finish anywhere. In the example above the changes finish about 1/3 way down the screen, so the decompressed data is about 20&#039;000 bytes long. Another thing to note is that unlike still screens, images are filled in row-by-row, without columns being filled.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen Almost always $4646, &#039;leave previous screen&#039;&lt;br /&gt;
 2     2      Anim size	 Size of animation data to follow&lt;br /&gt;
 4     ?      data	 Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used in animation frames is not the same as that of the first image, though it appears similar. The first complication is at the first byte. If this is $FF then it is normal data and the image should be read normally. (That is $FF is a control byte and should be treated as such.) If it is not, then the first byte is the x location to start drawing the image (on the first line, that is it can be said to stand for &#039;x pixels of transparent color&#039;.)&lt;br /&gt;
&lt;br /&gt;
There are 5 types of control byte. The highest bit of control bytes indicates what to set the &#039;transparency flag&#039; to (1 on; 0, off) while the next two define what the control byte does. The fourth bit may not have a function, and the lower four bits are the number of pixels of image to be affected.&lt;br /&gt;
&lt;br /&gt;
There are two &#039;special cases&#039;; $00 and $7F\$FF. The first stops decompression and the second is used for long stretches of transparent pixels.&lt;br /&gt;
&lt;br /&gt;
There are a number of complicated rules that have yet to be worked out. Some control bytes that set the &#039;T-flag&#039; to on must be preceeded by a control byte that does the same thing, it is not known why. Some values ($80, $7F, $Ex) are not used or have not yet been observed&lt;br /&gt;
&lt;br /&gt;
A basic summary of this is as follows; &#039;T-flag&#039; indicates what the transparency flag is set to after the control byte is read. &#039;H-flag&#039; indicates whether the control byte must be preceded by a control byte that has its highest bit set to 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type&lt;br /&gt;
!Function&lt;br /&gt;
!T-flag&lt;br /&gt;
!H-flag&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Output next byte as literal and STOP&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|0x,8x&lt;br /&gt;
|If T-flag ON, x transparent pixels follow. If T-flag OFF, read next x bytes and output&lt;br /&gt;
|FLIPPED&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|2x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Copy xx&amp;amp;0x1f pixels from the line above&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Ax&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|4x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next byte as colour to fill with, repeat 0xvalue&amp;amp;0x1f times&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Cx&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|7F&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next word (add 255 if trans on), output that many bytes of transparent&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|FF&lt;br /&gt;
|OFF&lt;br /&gt;
|NO&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11051</id>
		<title>Jazz Jackrabbit Cutscene Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11051"/>
		<updated>2023-05-25T08:29:05Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: /* Animation frames */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cutscene Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | Resolution = 320&amp;amp;times;200&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] cutscenes (.0SC) are the movies played at the end of levels and episodes. They have an exceedingly complex format that has been poorly understood. They contain sound, music, graphics and text. The following snippets of information have been gathered.&lt;br /&gt;
&lt;br /&gt;
== Headers ==&lt;br /&gt;
&lt;br /&gt;
There are three headers, only the first being of a fixed size.&lt;br /&gt;
&lt;br /&gt;
=== File header ===&lt;br /&gt;
&lt;br /&gt;
 0     19     Signature   File signature &#039;Digital Dimensions&#039; + $1A&lt;br /&gt;
 19    4      Img point   Pointer to start of image data header&lt;br /&gt;
 23    4x + 2 Page header Header for pages&lt;br /&gt;
 ?     4y + 2 Img header  Image header&lt;br /&gt;
&lt;br /&gt;
=== Page and Image headers ===&lt;br /&gt;
&lt;br /&gt;
 0     2      Num         Number of entries (Pages or images) in file&lt;br /&gt;
 2     4x     Pointers    Pointers to data&lt;br /&gt;
&lt;br /&gt;
These two headers have almost identical formats. The page header stores the pointers to pages or &#039;scripts&#039; in the cutscene while the graphic header stores the pointers to palettes, still screens and animated screens used by pages. While the length of the page header is always 4 times the number of pages, the graphics header is always much shorter IF there are animated screens. (One pointer to an animated screen can have dozens of animations in it, each counting as one graphic.)&lt;br /&gt;
&lt;br /&gt;
== Pages ==&lt;br /&gt;
&lt;br /&gt;
The page, or script is the basic segment of the cutscene. Each page can display some font and a graphic and can transition to other pages. The page data contains a number of sub-segments of varying length that may or may not be present and in various orders.&lt;br /&gt;
&lt;br /&gt;
 0     1      Sig         Signature &#039;P&#039;&lt;br /&gt;
 2     2      Pagenum     Page number, as value, not string, starts with $0001&lt;br /&gt;
 4     2      Pal         Palette used&lt;br /&gt;
 6     ?      Segs        Optional and vital strings in no particular order&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
       1      End         End of page data &#039;E&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sub segments ===&lt;br /&gt;
&lt;br /&gt;
Page sub-segments are usually in the following order; in some cases this is necessary (You cannot have a text segment without defining what fonts it can use.) in other cases just the way things are.&lt;br /&gt;
&lt;br /&gt;
==== Music ====&lt;br /&gt;
&lt;br /&gt;
Indicates what music file will play during the movie. This is set on the first page only and cannot be changed. Optional, a cutscene may not use music.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $2A; this is a music string&lt;br /&gt;
 1     1      Len         Length of music file name&lt;br /&gt;
 2     len    Name        Name of music file, inc .PSM&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Indicates what fonts will be used in the movie, several allowed. These appear on the first page only and cannot be changed. The value given to each font in this string will be used throughout the movie in font sub-segments. Optional, a cutscene may not use fonts.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $58; this is a font string&lt;br /&gt;
 1     2      Fontnum     What number this font is&lt;br /&gt;
 3     1      Len         Length of font name&lt;br /&gt;
 4     len    Name        Font name, excluding extension (.0FN added automatically)&lt;br /&gt;
&lt;br /&gt;
==== Animations and Images ====&lt;br /&gt;
&lt;br /&gt;
Indicates what graphic is displayed on the page. Vital and each page must have at least one of these. If a page has an animation it will NOT have a text or any image sub-segments&lt;br /&gt;
&lt;br /&gt;
 IMAGE&lt;br /&gt;
 0    1      Img sig     Image signature, $46&lt;br /&gt;
 1    2      h loc       Location of image on screen in pixels. For fullscreen images this is&lt;br /&gt;
 3    2      v loc       usually 0,0; for smaller images (rare) this can be anything&lt;br /&gt;
 5    2      Graphnum    Graphic to use, 0 is black screen, palettes cannot be used.&lt;br /&gt;
&lt;br /&gt;
 ANIMATION&lt;br /&gt;
 0    1      Graph sig   Graphics signature, $A6&lt;br /&gt;
 1    4      Anim loop   For animated screens, loops the animation. If no loop, page must move on&lt;br /&gt;
                         before loop ends or Jazz will crash. Loop value is 1&lt;br /&gt;
 4    2      Anim sp     Animation speed, lower = slower; usually $xx00&lt;br /&gt;
 6    2      Graphnum    Graphic to use, must be an animated screen graphic&lt;br /&gt;
 8    1      Play sig    Ply animation signature, $A7, optional (See following)&lt;br /&gt;
 9    1      Play        For pages that do NOT loop an animation AND do NOT have a set time before&lt;br /&gt;
                         they move on (Duration.) this plays the animation then goes to the next&lt;br /&gt;
                         page. This can only be 1, otherwise it and its signature are absent&lt;br /&gt;
&lt;br /&gt;
==== Text ====&lt;br /&gt;
&lt;br /&gt;
This is really a collection of related segments and signatures. Generally last on the page, these all relate to text strings written on the page. In general you can expect them to start with a &#039;W&#039; signature, though this is not guaranteed. These do not appear on any page with an animation and are optional.&lt;br /&gt;
&lt;br /&gt;
Signatures can be in any order as long as what they do &#039;makes sense&#039; (For example you cannot write any text until you&#039;ve set the font used, the palette zero color AND the justification, but after you have you can write as many lines as you want. You can can change the font used twice without writing anything. You can start a block, write something then start a new block.)&lt;br /&gt;
&lt;br /&gt;
The signatures change values in the movie (All values start at 0) For example the &#039;F&#039; signature sets the font text is written in. It must be set before text is written and all text following it will use that font until it is reset. Values are not reset when a page is switched, meaning that you can write many pages of text in a font after setting it once.&lt;br /&gt;
&lt;br /&gt;
 ?    1      Write sig    Write signature, &amp;quot;W&amp;quot;; indicates text segment start; there can be more than one&lt;br /&gt;
                          segment of text on a page. The following values affect ALL the text in a&lt;br /&gt;
                          given text block and always appear in a given order. Note that if a new&lt;br /&gt;
                          block starts, ALL values are NOT reset.&lt;br /&gt;
 +1   2      Top margin   The page margins; Text cannot normally appear above or left of this location&lt;br /&gt;
 +3   2      Left margin  unless this is reset or the text wraps around from the right/bottom of the screen&lt;br /&gt;
 +5   2      Pix h        The location of the first line of text, in pixels from the margins. The second&lt;br /&gt;
 +7   2      Pix v        value (v) appears not to be read, just the horizontal one, which can, if larger&lt;br /&gt;
                          than 320, wrap around and move text vertically (640 moves text down 2 lines...)&lt;br /&gt;
                          If this block is not the first block, NEITHER value is read or used!&lt;br /&gt;
&lt;br /&gt;
 ?    1      Shad sig     $DB sets shadows&lt;br /&gt;
 +1   1      Shadow       $01 turns shadows on, $00 turns them off. Default is off&lt;br /&gt;
 +2   1      Shad color   Palette color used for shadows&lt;br /&gt;
&lt;br /&gt;
 ?    1      Font sig     Change font signature, &amp;quot;F&amp;quot;; indicates what font will be used for the&lt;br /&gt;
                          text following&lt;br /&gt;
 +1   2      Font         Font used. Must be a valid font number&lt;br /&gt;
&lt;br /&gt;
 ?    1      Just sig     Justification signature &amp;quot;J&amp;quot;&lt;br /&gt;
 +1   1      Just         Justification. Text is either left(0) or right(1) aligned; this defines&lt;br /&gt;
                          the text start (The position value above reads either left or right.)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Pal sig      Palette zero value signature, &amp;quot;A&amp;quot;&lt;br /&gt;
 +1   2      Pal zero     Palette &#039;zero color&#039;; this value in the palette is set as color 0 for&lt;br /&gt;
                          the font; thus the same font can be several different colors depending&lt;br /&gt;
                          on its zero color. For example a font pixel $0E can be color $1F or $2E&lt;br /&gt;
                          depending on the value (In this case $11 or $20)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Line sig     Sentence signature, &amp;quot;@&amp;quot;&lt;br /&gt;
 +1   1      Length       Sentence length, in letters&lt;br /&gt;
 +2   len    Text         Text, letter displayed is this value&#039;s letter in the font file. The value $7F&lt;br /&gt;
                          is space. Values over $80 move into the next font (Crashes game if there is no&lt;br /&gt;
                          next font.) Thus $81 in font 1 will become $01 in font 2&lt;br /&gt;
&lt;br /&gt;
 ?    1     Pnum sig      Signature for special text, &amp;quot;^&amp;quot; Text that uses this is usually the &#039;Page x of y&#039;&lt;br /&gt;
 +1   len   Length        This is the same as the usual text signature stuff, after this a string of text&lt;br /&gt;
                          follows. The difference is that values over $89 are allowed and can do special&lt;br /&gt;
                          things. $8B is current page number and $8A is the number of pages in the cutscene.&lt;br /&gt;
                          $8C is &#039;000&#039; and higher values seem to be &#039;0&#039; Possibly these refer to values in&lt;br /&gt;
                          memory.&lt;br /&gt;
&lt;br /&gt;
 ?    1     Move sig      Move line signature, &amp;quot;_&amp;quot;&lt;br /&gt;
 +1   2     Line move     Changes the height of all following text lines by this amount, in pixels. Thus if&lt;br /&gt;
                          this value is 5, the first line will be 5 pixels lower, the second 10, the 3rd 15...&lt;br /&gt;
                          As such it is usually reset to 0 after the desired text is done. This is usually used&lt;br /&gt;
                          to position a line of text specially on a background image or relative to other text&lt;br /&gt;
&lt;br /&gt;
===== An example =====&lt;br /&gt;
&lt;br /&gt;
The following is a segment of text taken from &amp;lt;tt&amp;gt;ORDER.0SC&amp;lt;/tt&amp;gt; in Jazz CD, starting at position $8A in the file. It is some of the text for the first page of the Order Info cutscene:&lt;br /&gt;
&lt;br /&gt;
 57          Text block start sig &lt;br /&gt;
 14 00 00 00 Location of text left limit, 20 pixels from left of screen&lt;br /&gt;
 36 01       Font start, 310 pixels&lt;br /&gt;
 BE 01 &lt;br /&gt;
 DB 01 00    Text has shadows of color 0&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 4A 01       Font is aligned right&lt;br /&gt;
 41 00 00    Font zero color is value 0&lt;br /&gt;
 5E 0C       Special text string follows, 12 characters long&lt;br /&gt;
 10 1B 21... Text&lt;br /&gt;
&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 41 00 00    Font zero color = 0&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 02 00    Font used is 2&lt;br /&gt;
 40 00       Text string follows, 0 long (Move down a line)&lt;br /&gt;
 40 1D       Text string follows, 29 long&lt;br /&gt;
 7F 7F...    &#039;Had enough excitement...&#039;&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F... &#039;We didn&#039;t think...&#039;&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F    &#039;You are playing...&#039;&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
&lt;br /&gt;
There are a number of less complex segments that may appear on each page.&lt;br /&gt;
&lt;br /&gt;
 Screen transition segment&lt;br /&gt;
 0    1      Sig         Screen transition signature $3F&lt;br /&gt;
 1    1      Trans       Transition, 0 = none, 1 = speckle 2 = circle&lt;br /&gt;
&lt;br /&gt;
 Page duration segment&lt;br /&gt;
 1    1       Sig         Signature &#039;]&#039;&lt;br /&gt;
 2    1       Duration    How long in seconds page stays before transitioning to next page&lt;br /&gt;
&lt;br /&gt;
 Music transition segment&lt;br /&gt;
 1    1       Sig         Signature, &#039;Q&#039;&lt;br /&gt;
 2    1       Music trans Music transition, $2D stops music on page transition&lt;br /&gt;
&lt;br /&gt;
 Yes/no input segment&lt;br /&gt;
 1    1       Sig         Signature $23, if present page accepts only &amp;quot;y&amp;quot; or &amp;quot;n&amp;quot; as input and will&lt;br /&gt;
                          switch to the next page ONLY if &amp;quot;y&amp;quot; is pressed, otherwise the movie will end&lt;br /&gt;
&lt;br /&gt;
 ???&lt;br /&gt;
 1    1       ???          Signature &#039;&amp;gt;&#039;; apparently does something unknown&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
There are three kinds of graphic, palette, still screen and animated screen. Each has its own unique format.&lt;br /&gt;
&lt;br /&gt;
=== Palette ===&lt;br /&gt;
&lt;br /&gt;
The palette is the 256 colors used by a screen to display graphics and fonts. A page may only use one palette but a cutscene can have several. Palettes are [[Jazz Jackrabbit RLE compression]] compressed and decompress to 768 bytes in length, 256 3-byte RGB values. (The same format as palette blocks in other Jazz files such as [[Jazz Jackrabbit Tile Format]] Palettes are 6-bit stored as 8-bit, so each value must be multiplied by four to get the &#039;true&#039; color for bitmaps.&lt;br /&gt;
&lt;br /&gt;
Palettes are usually the first graphics entries.&lt;br /&gt;
&lt;br /&gt;
=== Static screens ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that fill an entire screen and act as the background to a page. Like palettes they are [[Jazz Jackrabbit RLE compression]] compressed, but decompress to 64&#039;004 bytes in length. Note that while other image sizes are possible, in practice only fullscreen images are seen.&lt;br /&gt;
&lt;br /&gt;
 0     2      Width       Width of following screen&lt;br /&gt;
 2     2      Height      Height of following screen&lt;br /&gt;
 4     hw     Data        Screen data&lt;br /&gt;
&lt;br /&gt;
=== Animation sequences ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that animate. They cannot have font displayed over them and are the traditional &#039;movie&#039; part of Jazz cutscenes. Their format is complex and poorly understood but relies on at least two forms of unique RLE compression. There is a header followed by a start image compressed in one way, followed by a number of &#039;frames&#039; compressed in another manner.&lt;br /&gt;
&lt;br /&gt;
 0     2      Sig1       Signature &#039;AN&#039;&lt;br /&gt;
 2     2      Sig2       $02&lt;br /&gt;
 4     2      Number of frames (excluding frame with end opcode $455F)&lt;br /&gt;
 6     2      Pal sig    Palette signature &#039;PL&#039;&lt;br /&gt;
 8     2      Palsize    Size of following unused palette (Always $300)&lt;br /&gt;
 10    768    Palette    Unused(?) palette, uncompressed&lt;br /&gt;
 778   ?      Anim st    Animation start image&lt;br /&gt;
 ?     ?      Anims      Following animation frames&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ?     4      End	 End of anim sequence, $5F $45 $00 $00 &#039;_E  &#039;&lt;br /&gt;
&lt;br /&gt;
==== Animation Start Image ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first row of data changed from black to pink. showing how columns are colored, not pixels.]]&lt;br /&gt;
&lt;br /&gt;
This image is written onto a &#039;blank&#039; screen when a page is started and the other animations work by overwriting this. In many cases it works like the &#039;background&#039; of a .GIF image. The data will ALWAYS decompress to a 64&#039;000 byte fullscreen image.&lt;br /&gt;
&lt;br /&gt;
The way the image is drawn however is interesting. Instead of drawing each line pixel by pixels as static screens to, when a pixel of a given color is drawn, all the pixels directly beneath it will be colored the same. This is a great space saver; instead of coloring all of the background of an image blue, for example, only the first line must be blue; all the other lines below it will then be this color as well.&lt;br /&gt;
&lt;br /&gt;
An image is built up by lower lines overwriting earlier ones, line by line. In the image left the first row of the image has been changed from black to pink, also changing all the columns under it to pink. Lower lines overwrite this with other colors, thus building up the image.&lt;br /&gt;
&lt;br /&gt;
Color 255 ($FF) is &#039;transparent&#039;; in practice this means &#039;skip over this column, it&#039;s already the right color&#039; In our &#039;blue screen&#039; example above, all the other rows would be colored transparent, since the entire screen would be blue and we wouldn&#039;t want to change that. In the example image above all the pink columns have been skipped over until another color was needed. It is possible to show the exact same image by replacing the transparent pixels with the value of the pixel above them, but this takes up a lot more space and takes longer to draw.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen What to do to the screen before the image is displayed. $3131 is &#039;rle image&#039;&lt;br /&gt;
                         $4c31 means use other form of compression for image&lt;br /&gt;
                         $4646 means &#039;leave as is&#039; This image usually uses &#039;reset&#039;; clearing the&lt;br /&gt;
                         screen and writing the image on it&lt;br /&gt;
 2     2      Anim size  Size of animation data to follow&lt;br /&gt;
 4     ?      data       Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used on the first image can be either normal [[Jazz Jackrabbit RLE compression]] ($3131 tag) or a more complex form of the usual ($4c31 tag), with a wider variety of control bytes. It may be considered to contain elements or RLEW as well. The upshot of this is to allow a large image to be compressed rather more efficiently than standard RLE. The types of control bytes are as follows for this format:&lt;br /&gt;
&lt;br /&gt;
 $0x $...	Next x + 1 bytes are &#039;literals&#039;; each byte colors 1 column (Max val $3F)		&lt;br /&gt;
 $4x $yy        Next x + 1 columns drawn in color yy (Max value $7E)&lt;br /&gt;
 $7F $xxxx $yy	Next xxxx columns colored with color yy&lt;br /&gt;
 $8x		Next x + 1 pixels are skipped, they&#039;re already the right color (Max val $FE)&lt;br /&gt;
 $FF $xxxx	Skip next xxxx pixels of picture, they&#039;re already the right color&lt;br /&gt;
&lt;br /&gt;
==== Animation frames ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage2.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first animation frame in the wrong location.]]&lt;br /&gt;
&lt;br /&gt;
These follow the first image and are usually compressed to much smaller sizes as they involve changes to the previous screen rather than drawing a whole new screen. They are either a fullscreen frame (type $5b5d( ][ )) using the alternative compression mode used in the start image or a modified form of the animation start compression that has not yet been figured out(type $4646(FF) and type $4352(RC)). $0000 can also be used to tell program to not change anything and treat as a still frame for the length of 1 / fps.&lt;br /&gt;
&lt;br /&gt;
The frame is drawn by taking the previous screen and drawing the changes over it. In the example picture right the second animation frame has been moved left by 200 pixels so it is written over a black background. It can bee seen how little of the image has been changed and also how much of it is transparent. (In the middle of the smoke this is most easily seen where black pixels show where the previous screen had the right color grays not to need changing.)&lt;br /&gt;
&lt;br /&gt;
It can also be seen that an animation can erase a previous frame by changing pixels back to what they were previously. In the example image some smoke fragments are visible because they have not been overwritten.&lt;br /&gt;
&lt;br /&gt;
If the animation isn&#039;t &#039;fullscreen&#039; then when decompressed it does not have to be 64&#039;000 long (320x200) While the animation starts drawing at 0,0 it can finish anywhere. In the example above the changes finish about 1/3 way down the screen, so the decompressed data is about 20&#039;000 bytes long. Another thing to note is that unlike still screens, images are filled in row-by-row, without columns being filled.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen Almost always $4646, &#039;leave previous screen&#039;&lt;br /&gt;
 2     2      Anim size	 Size of animation data to follow&lt;br /&gt;
 4     ?      data	 Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used in animation frames is not the same as that of the first image, though it appears similar. The first complication is at the first byte. If this is $FF then it is normal data and the image should be read normally. (That is $FF is a control byte and should be treated as such.) If it is not, then the first byte is the x location to start drawing the image (on the first line, that is it can be said to stand for &#039;x pixels of transparent color&#039;.)&lt;br /&gt;
&lt;br /&gt;
There are 5 types of control byte. The highest bit of control bytes indicates what to set the &#039;transparency flag&#039; to (1 on; 0, off) while the next two define what the control byte does. The fourth bit may not have a function, and the lower four bits are the number of pixels of image to be affected.&lt;br /&gt;
&lt;br /&gt;
There are two &#039;special cases&#039;; $00 and $7F\$FF. The first stops decompression and the second is used for long stretches of transparent pixels.&lt;br /&gt;
&lt;br /&gt;
There are a number of complicated rules that have yet to be worked out. Some control bytes that set the &#039;T-flag&#039; to on must be preceeded by a control byte that does the same thing, it is not known why. Some values ($80, $7F, $Ex) are not used or have not yet been observed&lt;br /&gt;
&lt;br /&gt;
A basic summary of this is as follows; &#039;T-flag&#039; indicates what the transparency flag is set to after the control byte is read. &#039;H-flag&#039; indicates whether the control byte must be preceded by a control byte that has its highest bit set to 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type&lt;br /&gt;
!Function&lt;br /&gt;
!T-flag&lt;br /&gt;
!H-flag&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Output next byte as literal and STOP&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|0x,8x&lt;br /&gt;
|If T-flag ON, x transparent pixels follow. If T-flag OFF, read next x bytes and output&lt;br /&gt;
|FLIPPED&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|2x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Copy xx&amp;amp;0x1f pixels from the line above&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Ax&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|4x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next byte as colour to fill with, repeat 0xvalue&amp;amp;0x1f times&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Cx&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|7F&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next word (add 255 if trans on), output that many bytes of transparent&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|FF&lt;br /&gt;
|OFF&lt;br /&gt;
|NO&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11050</id>
		<title>Jazz Jackrabbit Cutscene Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Cutscene_Format&amp;diff=11050"/>
		<updated>2023-05-25T08:26:26Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: /* Animation sequences */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cutscene Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | Resolution = 320&amp;amp;times;200&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] cutscenes (.0SC) are the movies played at the end of levels and episodes. They have an exceedingly complex format that has been poorly understood. They contain sound, music, graphics and text. The following snippets of information have been gathered.&lt;br /&gt;
&lt;br /&gt;
== Headers ==&lt;br /&gt;
&lt;br /&gt;
There are three headers, only the first being of a fixed size.&lt;br /&gt;
&lt;br /&gt;
=== File header ===&lt;br /&gt;
&lt;br /&gt;
 0     19     Signature   File signature &#039;Digital Dimensions&#039; + $1A&lt;br /&gt;
 19    4      Img point   Pointer to start of image data header&lt;br /&gt;
 23    4x + 2 Page header Header for pages&lt;br /&gt;
 ?     4y + 2 Img header  Image header&lt;br /&gt;
&lt;br /&gt;
=== Page and Image headers ===&lt;br /&gt;
&lt;br /&gt;
 0     2      Num         Number of entries (Pages or images) in file&lt;br /&gt;
 2     4x     Pointers    Pointers to data&lt;br /&gt;
&lt;br /&gt;
These two headers have almost identical formats. The page header stores the pointers to pages or &#039;scripts&#039; in the cutscene while the graphic header stores the pointers to palettes, still screens and animated screens used by pages. While the length of the page header is always 4 times the number of pages, the graphics header is always much shorter IF there are animated screens. (One pointer to an animated screen can have dozens of animations in it, each counting as one graphic.)&lt;br /&gt;
&lt;br /&gt;
== Pages ==&lt;br /&gt;
&lt;br /&gt;
The page, or script is the basic segment of the cutscene. Each page can display some font and a graphic and can transition to other pages. The page data contains a number of sub-segments of varying length that may or may not be present and in various orders.&lt;br /&gt;
&lt;br /&gt;
 0     1      Sig         Signature &#039;P&#039;&lt;br /&gt;
 2     2      Pagenum     Page number, as value, not string, starts with $0001&lt;br /&gt;
 4     2      Pal         Palette used&lt;br /&gt;
 6     ?      Segs        Optional and vital strings in no particular order&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
       1      End         End of page data &#039;E&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sub segments ===&lt;br /&gt;
&lt;br /&gt;
Page sub-segments are usually in the following order; in some cases this is necessary (You cannot have a text segment without defining what fonts it can use.) in other cases just the way things are.&lt;br /&gt;
&lt;br /&gt;
==== Music ====&lt;br /&gt;
&lt;br /&gt;
Indicates what music file will play during the movie. This is set on the first page only and cannot be changed. Optional, a cutscene may not use music.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $2A; this is a music string&lt;br /&gt;
 1     1      Len         Length of music file name&lt;br /&gt;
 2     len    Name        Name of music file, inc .PSM&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Indicates what fonts will be used in the movie, several allowed. These appear on the first page only and cannot be changed. The value given to each font in this string will be used throughout the movie in font sub-segments. Optional, a cutscene may not use fonts.&lt;br /&gt;
&lt;br /&gt;
 0     1      ID          Id $58; this is a font string&lt;br /&gt;
 1     2      Fontnum     What number this font is&lt;br /&gt;
 3     1      Len         Length of font name&lt;br /&gt;
 4     len    Name        Font name, excluding extension (.0FN added automatically)&lt;br /&gt;
&lt;br /&gt;
==== Animations and Images ====&lt;br /&gt;
&lt;br /&gt;
Indicates what graphic is displayed on the page. Vital and each page must have at least one of these. If a page has an animation it will NOT have a text or any image sub-segments&lt;br /&gt;
&lt;br /&gt;
 IMAGE&lt;br /&gt;
 0    1      Img sig     Image signature, $46&lt;br /&gt;
 1    2      h loc       Location of image on screen in pixels. For fullscreen images this is&lt;br /&gt;
 3    2      v loc       usually 0,0; for smaller images (rare) this can be anything&lt;br /&gt;
 5    2      Graphnum    Graphic to use, 0 is black screen, palettes cannot be used.&lt;br /&gt;
&lt;br /&gt;
 ANIMATION&lt;br /&gt;
 0    1      Graph sig   Graphics signature, $A6&lt;br /&gt;
 1    4      Anim loop   For animated screens, loops the animation. If no loop, page must move on&lt;br /&gt;
                         before loop ends or Jazz will crash. Loop value is 1&lt;br /&gt;
 4    2      Anim sp     Animation speed, lower = slower; usually $xx00&lt;br /&gt;
 6    2      Graphnum    Graphic to use, must be an animated screen graphic&lt;br /&gt;
 8    1      Play sig    Ply animation signature, $A7, optional (See following)&lt;br /&gt;
 9    1      Play        For pages that do NOT loop an animation AND do NOT have a set time before&lt;br /&gt;
                         they move on (Duration.) this plays the animation then goes to the next&lt;br /&gt;
                         page. This can only be 1, otherwise it and its signature are absent&lt;br /&gt;
&lt;br /&gt;
==== Text ====&lt;br /&gt;
&lt;br /&gt;
This is really a collection of related segments and signatures. Generally last on the page, these all relate to text strings written on the page. In general you can expect them to start with a &#039;W&#039; signature, though this is not guaranteed. These do not appear on any page with an animation and are optional.&lt;br /&gt;
&lt;br /&gt;
Signatures can be in any order as long as what they do &#039;makes sense&#039; (For example you cannot write any text until you&#039;ve set the font used, the palette zero color AND the justification, but after you have you can write as many lines as you want. You can can change the font used twice without writing anything. You can start a block, write something then start a new block.)&lt;br /&gt;
&lt;br /&gt;
The signatures change values in the movie (All values start at 0) For example the &#039;F&#039; signature sets the font text is written in. It must be set before text is written and all text following it will use that font until it is reset. Values are not reset when a page is switched, meaning that you can write many pages of text in a font after setting it once.&lt;br /&gt;
&lt;br /&gt;
 ?    1      Write sig    Write signature, &amp;quot;W&amp;quot;; indicates text segment start; there can be more than one&lt;br /&gt;
                          segment of text on a page. The following values affect ALL the text in a&lt;br /&gt;
                          given text block and always appear in a given order. Note that if a new&lt;br /&gt;
                          block starts, ALL values are NOT reset.&lt;br /&gt;
 +1   2      Top margin   The page margins; Text cannot normally appear above or left of this location&lt;br /&gt;
 +3   2      Left margin  unless this is reset or the text wraps around from the right/bottom of the screen&lt;br /&gt;
 +5   2      Pix h        The location of the first line of text, in pixels from the margins. The second&lt;br /&gt;
 +7   2      Pix v        value (v) appears not to be read, just the horizontal one, which can, if larger&lt;br /&gt;
                          than 320, wrap around and move text vertically (640 moves text down 2 lines...)&lt;br /&gt;
                          If this block is not the first block, NEITHER value is read or used!&lt;br /&gt;
&lt;br /&gt;
 ?    1      Shad sig     $DB sets shadows&lt;br /&gt;
 +1   1      Shadow       $01 turns shadows on, $00 turns them off. Default is off&lt;br /&gt;
 +2   1      Shad color   Palette color used for shadows&lt;br /&gt;
&lt;br /&gt;
 ?    1      Font sig     Change font signature, &amp;quot;F&amp;quot;; indicates what font will be used for the&lt;br /&gt;
                          text following&lt;br /&gt;
 +1   2      Font         Font used. Must be a valid font number&lt;br /&gt;
&lt;br /&gt;
 ?    1      Just sig     Justification signature &amp;quot;J&amp;quot;&lt;br /&gt;
 +1   1      Just         Justification. Text is either left(0) or right(1) aligned; this defines&lt;br /&gt;
                          the text start (The position value above reads either left or right.)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Pal sig      Palette zero value signature, &amp;quot;A&amp;quot;&lt;br /&gt;
 +1   2      Pal zero     Palette &#039;zero color&#039;; this value in the palette is set as color 0 for&lt;br /&gt;
                          the font; thus the same font can be several different colors depending&lt;br /&gt;
                          on its zero color. For example a font pixel $0E can be color $1F or $2E&lt;br /&gt;
                          depending on the value (In this case $11 or $20)&lt;br /&gt;
&lt;br /&gt;
 ?    1      Line sig     Sentence signature, &amp;quot;@&amp;quot;&lt;br /&gt;
 +1   1      Length       Sentence length, in letters&lt;br /&gt;
 +2   len    Text         Text, letter displayed is this value&#039;s letter in the font file. The value $7F&lt;br /&gt;
                          is space. Values over $80 move into the next font (Crashes game if there is no&lt;br /&gt;
                          next font.) Thus $81 in font 1 will become $01 in font 2&lt;br /&gt;
&lt;br /&gt;
 ?    1     Pnum sig      Signature for special text, &amp;quot;^&amp;quot; Text that uses this is usually the &#039;Page x of y&#039;&lt;br /&gt;
 +1   len   Length        This is the same as the usual text signature stuff, after this a string of text&lt;br /&gt;
                          follows. The difference is that values over $89 are allowed and can do special&lt;br /&gt;
                          things. $8B is current page number and $8A is the number of pages in the cutscene.&lt;br /&gt;
                          $8C is &#039;000&#039; and higher values seem to be &#039;0&#039; Possibly these refer to values in&lt;br /&gt;
                          memory.&lt;br /&gt;
&lt;br /&gt;
 ?    1     Move sig      Move line signature, &amp;quot;_&amp;quot;&lt;br /&gt;
 +1   2     Line move     Changes the height of all following text lines by this amount, in pixels. Thus if&lt;br /&gt;
                          this value is 5, the first line will be 5 pixels lower, the second 10, the 3rd 15...&lt;br /&gt;
                          As such it is usually reset to 0 after the desired text is done. This is usually used&lt;br /&gt;
                          to position a line of text specially on a background image or relative to other text&lt;br /&gt;
&lt;br /&gt;
===== An example =====&lt;br /&gt;
&lt;br /&gt;
The following is a segment of text taken from &amp;lt;tt&amp;gt;ORDER.0SC&amp;lt;/tt&amp;gt; in Jazz CD, starting at position $8A in the file. It is some of the text for the first page of the Order Info cutscene:&lt;br /&gt;
&lt;br /&gt;
 57          Text block start sig &lt;br /&gt;
 14 00 00 00 Location of text left limit, 20 pixels from left of screen&lt;br /&gt;
 36 01       Font start, 310 pixels&lt;br /&gt;
 BE 01 &lt;br /&gt;
 DB 01 00    Text has shadows of color 0&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 4A 01       Font is aligned right&lt;br /&gt;
 41 00 00    Font zero color is value 0&lt;br /&gt;
 5E 0C       Special text string follows, 12 characters long&lt;br /&gt;
 10 1B 21... Text&lt;br /&gt;
&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 41 00 00    Font zero color = 0&lt;br /&gt;
 4A 00       Font aligned left&lt;br /&gt;
 46 02 00    Font used is 2&lt;br /&gt;
 40 00       Text string follows, 0 long (Move down a line)&lt;br /&gt;
 40 1D       Text string follows, 29 long&lt;br /&gt;
 7F 7F...    &#039;Had enough excitement...&#039;&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F... &#039;We didn&#039;t think...&#039;&lt;br /&gt;
&lt;br /&gt;
 46 01 00    Font used is font 1&lt;br /&gt;
 40 00       Move down a line&lt;br /&gt;
 40 1D 7F    &#039;You are playing...&#039;&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
&lt;br /&gt;
There are a number of less complex segments that may appear on each page.&lt;br /&gt;
&lt;br /&gt;
 Screen transition segment&lt;br /&gt;
 0    1      Sig         Screen transition signature $3F&lt;br /&gt;
 1    1      Trans       Transition, 0 = none, 1 = speckle 2 = circle&lt;br /&gt;
&lt;br /&gt;
 Page duration segment&lt;br /&gt;
 1    1       Sig         Signature &#039;]&#039;&lt;br /&gt;
 2    1       Duration    How long in seconds page stays before transitioning to next page&lt;br /&gt;
&lt;br /&gt;
 Music transition segment&lt;br /&gt;
 1    1       Sig         Signature, &#039;Q&#039;&lt;br /&gt;
 2    1       Music trans Music transition, $2D stops music on page transition&lt;br /&gt;
&lt;br /&gt;
 Yes/no input segment&lt;br /&gt;
 1    1       Sig         Signature $23, if present page accepts only &amp;quot;y&amp;quot; or &amp;quot;n&amp;quot; as input and will&lt;br /&gt;
                          switch to the next page ONLY if &amp;quot;y&amp;quot; is pressed, otherwise the movie will end&lt;br /&gt;
&lt;br /&gt;
 ???&lt;br /&gt;
 1    1       ???          Signature &#039;&amp;gt;&#039;; apparently does something unknown&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
There are three kinds of graphic, palette, still screen and animated screen. Each has its own unique format.&lt;br /&gt;
&lt;br /&gt;
=== Palette ===&lt;br /&gt;
&lt;br /&gt;
The palette is the 256 colors used by a screen to display graphics and fonts. A page may only use one palette but a cutscene can have several. Palettes are [[Jazz Jackrabbit RLE compression]] compressed and decompress to 768 bytes in length, 256 3-byte RGB values. (The same format as palette blocks in other Jazz files such as [[Jazz Jackrabbit Tile Format]] Palettes are 6-bit stored as 8-bit, so each value must be multiplied by four to get the &#039;true&#039; color for bitmaps.&lt;br /&gt;
&lt;br /&gt;
Palettes are usually the first graphics entries.&lt;br /&gt;
&lt;br /&gt;
=== Static screens ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that fill an entire screen and act as the background to a page. Like palettes they are [[Jazz Jackrabbit RLE compression]] compressed, but decompress to 64&#039;004 bytes in length. Note that while other image sizes are possible, in practice only fullscreen images are seen.&lt;br /&gt;
&lt;br /&gt;
 0     2      Width       Width of following screen&lt;br /&gt;
 2     2      Height      Height of following screen&lt;br /&gt;
 4     hw     Data        Screen data&lt;br /&gt;
&lt;br /&gt;
=== Animation sequences ===&lt;br /&gt;
&lt;br /&gt;
These are 320x200 images that animate. They cannot have font displayed over them and are the traditional &#039;movie&#039; part of Jazz cutscenes. Their format is complex and poorly understood but relies on at least two forms of unique RLE compression. There is a header followed by a start image compressed in one way, followed by a number of &#039;frames&#039; compressed in another manner.&lt;br /&gt;
&lt;br /&gt;
 0     2      Sig1       Signature &#039;AN&#039;&lt;br /&gt;
 2     2      Sig2       $02&lt;br /&gt;
 4     2      Number of frames (excluding frame with end opcode $455F)&lt;br /&gt;
 6     2      Pal sig    Palette signature &#039;PL&#039;&lt;br /&gt;
 8     2      Palsize    Size of following unused palette (Always $300)&lt;br /&gt;
 10    768    Palette    Unused(?) palette, uncompressed&lt;br /&gt;
 778   ?      Anim st    Animation start image&lt;br /&gt;
 ?     ?      Anims      Following animation frames&lt;br /&gt;
 ...&lt;br /&gt;
 ..&lt;br /&gt;
 .&lt;br /&gt;
 ?     4      End	 End of anim sequence, $5F $45 $00 $00 &#039;_E  &#039;&lt;br /&gt;
&lt;br /&gt;
==== Animation Start Image ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first row of data changed from black to pink. showing how columns are colored, not pixels.]]&lt;br /&gt;
&lt;br /&gt;
This image is written onto a &#039;blank&#039; screen when a page is started and the other animations work by overwriting this. In many cases it works like the &#039;background&#039; of a .GIF image. The data will ALWAYS decompress to a 64&#039;000 byte fullscreen image.&lt;br /&gt;
&lt;br /&gt;
The way the image is drawn however is interesting. Instead of drawing each line pixel by pixels as static screens to, when a pixel of a given color is drawn, all the pixels directly beneath it will be colored the same. This is a great space saver; instead of coloring all of the background of an image blue, for example, only the first line must be blue; all the other lines below it will then be this color as well.&lt;br /&gt;
&lt;br /&gt;
An image is built up by lower lines overwriting earlier ones, line by line. In the image left the first row of the image has been changed from black to pink, also changing all the columns under it to pink. Lower lines overwrite this with other colors, thus building up the image.&lt;br /&gt;
&lt;br /&gt;
Color 255 ($FF) is &#039;transparent&#039;; in practice this means &#039;skip over this column, it&#039;s already the right color&#039; In our &#039;blue screen&#039; example above, all the other rows would be colored transparent, since the entire screen would be blue and we wouldn&#039;t want to change that. In the example image above all the pink columns have been skipped over until another color was needed. It is possible to show the exact same image by replacing the transparent pixels with the value of the pixel above them, but this takes up a lot more space and takes longer to draw.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen What to do to the screen before the image is displayed. $3131 is &#039;rle image&#039;&lt;br /&gt;
                         $4c31 means use other form of compression for image&lt;br /&gt;
                         $4646 means &#039;leave as is&#039; This image usually uses &#039;reset&#039;; clearing the&lt;br /&gt;
                         screen and writing the image on it&lt;br /&gt;
 2     2      Anim size  Size of animation data to follow&lt;br /&gt;
 4     ?      data       Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used on the first image can be either normal [[Jazz Jackrabbit RLE compression]] ($3131 tag) or a more complex form of the usual ($4c31 tag), with a wider variety of control bytes. It may be considered to contain elements or RLEW as well. The upshot of this is to allow a large image to be compressed rather more efficiently than standard RLE. The types of control bytes are as follows for this format:&lt;br /&gt;
&lt;br /&gt;
 $0x $...	Next x + 1 bytes are &#039;literals&#039;; each byte colors 1 column (Max val $3F)		&lt;br /&gt;
 $4x $yy        Next x + 1 columns drawn in color yy (Max value $7E)&lt;br /&gt;
 $7F $xxxx $yy	Next xxxx columns colored with color yy&lt;br /&gt;
 $8x		Next x + 1 pixels are skipped, they&#039;re already the right color (Max val $FE)&lt;br /&gt;
 $FF $xxxx	Skip next xxxx pixels of picture, they&#039;re already the right color&lt;br /&gt;
&lt;br /&gt;
==== Animation frames ====&lt;br /&gt;
&lt;br /&gt;
[[File:Jazz0SCimage2.PNG|200px|thumb|right|An image from ENDLEVEL.0SC with the first animation frame in the wrong location.]]&lt;br /&gt;
&lt;br /&gt;
These follow the first image and are usually compressed to much smaller sizes as they involve changes to the previous screen rather than drawing a whole new screen. They are either a fullscreen frame (type $5b5d( ][ )) using the alternative compression mode used in the start image or a modified form of the animation start compression that has not yet been figured out(type $4646(FF) and type $4352(RC)).&lt;br /&gt;
&lt;br /&gt;
The frame is drawn by taking the previous screen and drawing the changes over it. In the example picture right the second animation frame has been moved left by 200 pixels so it is written over a black background. It can bee seen how little of the image has been changed and also how much of it is transparent. (In the middle of the smoke this is most easily seen where black pixels show where the previous screen had the right color grays not to need changing.)&lt;br /&gt;
&lt;br /&gt;
It can also be seen that an animation can erase a previous frame by changing pixels back to what they were previously. In the example image some smoke fragments are visible because they have not been overwritten.&lt;br /&gt;
&lt;br /&gt;
If the animation isn&#039;t &#039;fullscreen&#039; then when decompressed it does not have to be 64&#039;000 long (320x200) While the animation starts drawing at 0,0 it can finish anywhere. In the example above the changes finish about 1/3 way down the screen, so the decompressed data is about 20&#039;000 bytes long. Another thing to note is that unlike still screens, images are filled in row-by-row, without columns being filled.&lt;br /&gt;
&lt;br /&gt;
 Format:&lt;br /&gt;
 0     2      Set screen Almost always $4646, &#039;leave previous screen&#039;&lt;br /&gt;
 2     2      Anim size	 Size of animation data to follow&lt;br /&gt;
 4     ?      data	 Image data&lt;br /&gt;
&lt;br /&gt;
===== Compression =====&lt;br /&gt;
&lt;br /&gt;
The compression used in animation frames is not the same as that of the first image, though it appears similar. The first complication is at the first byte. If this is $FF then it is normal data and the image should be read normally. (That is $FF is a control byte and should be treated as such.) If it is not, then the first byte is the x location to start drawing the image (on the first line, that is it can be said to stand for &#039;x pixels of transparent color&#039;.)&lt;br /&gt;
&lt;br /&gt;
There are 5 types of control byte. The highest bit of control bytes indicates what to set the &#039;transparency flag&#039; to (1 on; 0, off) while the next two define what the control byte does. The fourth bit may not have a function, and the lower four bits are the number of pixels of image to be affected.&lt;br /&gt;
&lt;br /&gt;
There are two &#039;special cases&#039;; $00 and $7F\$FF. The first stops decompression and the second is used for long stretches of transparent pixels.&lt;br /&gt;
&lt;br /&gt;
There are a number of complicated rules that have yet to be worked out. Some control bytes that set the &#039;T-flag&#039; to on must be preceeded by a control byte that does the same thing, it is not known why. Some values ($80, $7F, $Ex) are not used or have not yet been observed&lt;br /&gt;
&lt;br /&gt;
A basic summary of this is as follows; &#039;T-flag&#039; indicates what the transparency flag is set to after the control byte is read. &#039;H-flag&#039; indicates whether the control byte must be preceded by a control byte that has its highest bit set to 1.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type&lt;br /&gt;
!Function&lt;br /&gt;
!T-flag&lt;br /&gt;
!H-flag&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Output next byte as literal and STOP&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|0x,8x&lt;br /&gt;
|If T-flag ON, x transparent pixels follow. If T-flag OFF, read next x bytes and output&lt;br /&gt;
|FLIPPED&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|2x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Copy xx&amp;amp;0x1f pixels from the line above&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Ax&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|4x&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next byte as colour to fill with, repeat 0xvalue&amp;amp;0x1f times&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|Cx&lt;br /&gt;
|OFF&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|7F&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Read next word (add 255 if trans on), output that many bytes of transparent&lt;br /&gt;
|ON&lt;br /&gt;
|NO&lt;br /&gt;
|-&lt;br /&gt;
|FF&lt;br /&gt;
|OFF&lt;br /&gt;
|NO&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11049</id>
		<title>Jazz Jackrabbit Tile Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11049"/>
		<updated>2023-05-21T14:02:10Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: fixed tileminsize and tilemaxsize&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | MaxTiles = 240&lt;br /&gt;
 | Palette = Internal&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 32x32&lt;br /&gt;
 | TileMaxSize = 32x32&lt;br /&gt;
 | NumPlanes = 1&lt;br /&gt;
 | PlaneArrangement = Linear&lt;br /&gt;
 | HasTransparency = Y&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;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] has two sort of tiles:&lt;br /&gt;
&lt;br /&gt;
* Tiles for regular levels are stored in &amp;lt;tt&amp;gt;BLOCKS.xxx&amp;lt;/tt&amp;gt; files. This file is used in all levels with filename &amp;lt;tt&amp;gt;LEVELy.xxx&amp;lt;/tt&amp;gt; where xxx is the same.&lt;br /&gt;
* Tiles for bonus levels are stored in &amp;lt;tt&amp;gt;BONUSy.000&amp;lt;/tt&amp;gt; files. The bonus levels contain a string that determines what tile file to use.&lt;br /&gt;
&lt;br /&gt;
== Regular tiles ==&lt;br /&gt;
&lt;br /&gt;
The file starts with an [[Jazz Jackrabbit RLE compression|RLE-compressed]] palette, which is used for all the tiles. This is followed by two other RLE palettes used for the sky (Each block of sky is 256 pixels high and stretched across the level. There are two alternating sky blocks stacked in the level.) For a total of 768 possible colors for each level.&lt;br /&gt;
&lt;br /&gt;
Tile data consists of 4 tile sets containing 60 32x32 tile blocks each (No more than 240 tiles total.). Each tile set block starts with &#039;ok&#039;.&lt;br /&gt;
&lt;br /&gt;
If a block has data in it it start with &#039;ok&#039; it will be RLE compressed using [[Jazz Jackrabbit RLE compression]], if it is empty, it will consist simply of the byte $20. (These can be seen at the end of the default files.)&lt;br /&gt;
&lt;br /&gt;
Some tiles do contain transparency with the pixel value 0x7F (127).&lt;br /&gt;
&lt;br /&gt;
== Bonus tiles ==&lt;br /&gt;
&lt;br /&gt;
The file consists of three blocks, all RLE compressed. The first is the sky used in the bonus level, the second is the palette used for the graphics and the third is tile data.&lt;br /&gt;
&lt;br /&gt;
The tile block is identical to that found in regular tiles, but without the &#039;ok&#039; text. There are only 60 tiles in a bonus tileset.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The format for regular tiles was deciphered from the source of OpenJazz.  The format for bonus tiles was deciphered by [[User:Spinal|Zander Zoftware]].  Some corrections were made by [[User:Levellass|Levellass]].  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>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Planet_Format&amp;diff=11048</id>
		<title>Jazz Jackrabbit Planet Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Planet_Format&amp;diff=11048"/>
		<updated>2023-05-21T13:59:51Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: Updated unknown data&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 = 64&amp;amp;times;55&lt;br /&gt;
 | MaxSize = 64&amp;amp;times;55&lt;br /&gt;
 | Palette = Internal&lt;br /&gt;
 | NumPlanes = 1&lt;br /&gt;
 | HasTransparency = No&lt;br /&gt;
 | HasHitmap = No&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Planets for [[Jazz Jackrabbit]] are stored in &amp;lt;tt&amp;gt;PLANET.xxx&amp;lt;/tt&amp;gt; files, and are essentially 64&amp;amp;times;55 pixel images.  They are used when Jazz first visits a world and are played before the level starts.&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]] || num || Planet number (closely corresponds to the file extension number)&lt;br /&gt;
|-&lt;br /&gt;
| [[UINT8]] || len || Length of the planet name, in bytes&lt;br /&gt;
|-&lt;br /&gt;
| [[char]][len] || name || Planet name, not null-terminated&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][768] || pal || 6-bit [[VGA Palette]]&lt;br /&gt;
|-&lt;br /&gt;
| [[BYTE]][3520] || img || [[Raw VGA Image]] data.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Sound_Format&amp;diff=11047</id>
		<title>Jazz Jackrabbit Sound Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Sound_Format&amp;diff=11047"/>
		<updated>2023-05-21T13:31:07Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: Changed pitch to sample rate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sound Infobox&lt;br /&gt;
 | Type = PCM&lt;br /&gt;
 | Count = 32&lt;br /&gt;
 | NumChannels = 1&lt;br /&gt;
 | BitsPerSample = 8&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Tags = Name&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] sounds are stored in the SOUNDS.00X files. SOUNDS.000 is used by the game as a &#039;base&#039; file, when Jazz is playing levels the sounds in SOUNDS.00X are added to this. This is done by the header in SOUNDS.00X pointing to sounds in SOUNDS.000 (by using a special pointer) as well as having references to their own sounds. Thus SOUNDS.000 is the largest file, with other sound files often being little more than empty headers.&lt;br /&gt;
&lt;br /&gt;
Sound files consist of a header (&#039;sfx&#039; + $1A) followed by raw sound data. The end of the file contains a list of the sound names and properties, with the final four bytes being the sound list location in the file. The game reads the file by checking the header, taking the last four bytes, finding the list and reading it.&lt;br /&gt;
&lt;br /&gt;
Raw sound data: This is exactly like a wave file, being composed of &#039;samples&#039; much like those used in [[ProTracker Studio Module]] (PSM) music files. The data consists of 1-byte signed entries and also sometimes contains a sample header for the samples to be extracted back to the original files, but this is treated as sound data by Jazz and is unimportant. The header though is as follows:&lt;br /&gt;
&lt;br /&gt;
  1    1   $01, start of header&lt;br /&gt;
  2   13   Sample name&lt;br /&gt;
 14    2   Word, $0005&lt;br /&gt;
 16    2   Size of sample after header&lt;br /&gt;
 18   10   Blank&lt;br /&gt;
 28    4   Sample volume&lt;br /&gt;
 32    4   Sample rate (in Hz)&lt;br /&gt;
 36   40   Blank&lt;br /&gt;
 76    4   header end &#039;SCRS&#039;&lt;br /&gt;
&lt;br /&gt;
Sound list: The sound list consists of a varying number of entries, read until 4 bytes from the end of the file. It has a maximum length of 32 18-byte entries.&lt;br /&gt;
&lt;br /&gt;
 0    12   Sound name, this is the name of the sound, used by levels and such to play the sound,&lt;br /&gt;
           padded with nulls.&lt;br /&gt;
 12    4   Sound location in sound file, data is read from here. If this value is larger than $7FFFFFFF&lt;br /&gt;
           then is the &#039;negative&#039; of the value and refers to the location of a sound in SOUNDS.000&lt;br /&gt;
           (Thus the first entry in most SOUNDS.00X is $FFFFFFFC, pointing to 4 in the .000 file.)&lt;br /&gt;
 16    2   Sound length, in bytes.&lt;br /&gt;
&lt;br /&gt;
Oddly, for SOUNDS.001 and onwards (2,3,...) any sound over 15 that refers to SOUNDS.000 refers to it&lt;br /&gt;
346 bytes further along than it should. This appears to relate to the header structure somehow, but I don&#039;t&lt;br /&gt;
know exactly. Also sound 15, if it refers to SOUNDS.000 will have the reference value of SOUNDS.000&lt;br /&gt;
sound 15, no matter what value it has for the location.&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Sound_Format&amp;diff=11046</id>
		<title>Jazz Jackrabbit Sound Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Sound_Format&amp;diff=11046"/>
		<updated>2023-05-21T12:49:50Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: Minor correction to header end &amp;#039;SCRS&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sound Infobox&lt;br /&gt;
 | Type = PCM&lt;br /&gt;
 | Count = 32&lt;br /&gt;
 | NumChannels = 1&lt;br /&gt;
 | BitsPerSample = 8&lt;br /&gt;
 | Compressed = N&lt;br /&gt;
 | Tags = Name&lt;br /&gt;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] sounds are stored in the SOUNDS.00X files. SOUNDS.000 is used by the game as a &#039;base&#039; file, when Jazz is playing levels the sounds in SOUNDS.00X are added to this. This is done by the header in SOUNDS.00X pointing to sounds in SOUNDS.000 (by using a special pointer) as well as having references to their own sounds. Thus SOUNDS.000 is the largest file, with other sound files often being little more than empty headers.&lt;br /&gt;
&lt;br /&gt;
Sound files consist of a header (&#039;sfx&#039; + $1A) followed by raw sound data. The end of the file contains a list of the sound names and properties, with the final four bytes being the sound list location in the file. The game reads the file by checking the header, taking the last four bytes, finding the list and reading it.&lt;br /&gt;
&lt;br /&gt;
Raw sound data: This is exactly like a wave file, being composed of &#039;samples&#039; much like those used in [[ProTracker Studio Module]] (PSM) music files. The data consists of 1-byte signed entries and also sometimes contains a sample header for the samples to be extracted back to the original files, but this is treated as sound data by Jazz and is unimportant. The header though is as follows:&lt;br /&gt;
&lt;br /&gt;
  1    1   $01, start of header&lt;br /&gt;
  2   13   Sample name&lt;br /&gt;
 14    2   Word, $0005&lt;br /&gt;
 16    2   Size of sample after header&lt;br /&gt;
 18   10   Blank&lt;br /&gt;
 28    4   Sample volume&lt;br /&gt;
 32    4   Pitch&lt;br /&gt;
 36   40   Blank&lt;br /&gt;
 76    4   header end &#039;SCRS&#039;&lt;br /&gt;
&lt;br /&gt;
Sound list: The sound list consists of a varying number of entries, read until 4 bytes from the end of the file. It has a maximum length of 32 18-byte entries.&lt;br /&gt;
&lt;br /&gt;
 0    12   Sound name, this is the name of the sound, used by levels and such to play the sound,&lt;br /&gt;
           padded with nulls.&lt;br /&gt;
 12    4   Sound location in sound file, data is read from here. If this value is larger than $7FFFFFFF&lt;br /&gt;
           then is the &#039;negative&#039; of the value and refers to the location of a sound in SOUNDS.000&lt;br /&gt;
           (Thus the first entry in most SOUNDS.00X is $FFFFFFFC, pointing to 4 in the .000 file.)&lt;br /&gt;
 16    2   Sound length, in bytes.&lt;br /&gt;
&lt;br /&gt;
Oddly, for SOUNDS.001 and onwards (2,3,...) any sound over 15 that refers to SOUNDS.000 refers to it&lt;br /&gt;
346 bytes further along than it should. This appears to relate to the header structure somehow, but I don&#039;t&lt;br /&gt;
know exactly. Also sound 15, if it refers to SOUNDS.000 will have the reference value of SOUNDS.000&lt;br /&gt;
sound 15, no matter what value it has for the location.&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11045</id>
		<title>Jazz Jackrabbit Tile Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11045"/>
		<updated>2023-05-21T08:06:50Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: /* Regular tiles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | MaxTiles = 240&lt;br /&gt;
 | Palette = Internal&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 32&lt;br /&gt;
 | TileMaxSize = 32&lt;br /&gt;
 | NumPlanes = 1&lt;br /&gt;
 | PlaneArrangement = Linear&lt;br /&gt;
 | HasTransparency = Y&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;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] has two sort of tiles:&lt;br /&gt;
&lt;br /&gt;
* Tiles for regular levels are stored in &amp;lt;tt&amp;gt;BLOCKS.xxx&amp;lt;/tt&amp;gt; files. This file is used in all levels with filename &amp;lt;tt&amp;gt;LEVELy.xxx&amp;lt;/tt&amp;gt; where xxx is the same.&lt;br /&gt;
* Tiles for bonus levels are stored in &amp;lt;tt&amp;gt;BONUSy.000&amp;lt;/tt&amp;gt; files. The bonus levels contain a string that determines what tile file to use.&lt;br /&gt;
&lt;br /&gt;
== Regular tiles ==&lt;br /&gt;
&lt;br /&gt;
The file starts with an [[Jazz Jackrabbit RLE compression|RLE-compressed]] palette, which is used for all the tiles. This is followed by two other RLE palettes used for the sky (Each block of sky is 256 pixels high and stretched across the level. There are two alternating sky blocks stacked in the level.) For a total of 768 possible colors for each level.&lt;br /&gt;
&lt;br /&gt;
Tile data consists of 4 tile sets containing 60 32x32 tile blocks each (No more than 240 tiles total.). Each tile set block starts with &#039;ok&#039;.&lt;br /&gt;
&lt;br /&gt;
If a block has data in it it start with &#039;ok&#039; it will be RLE compressed using [[Jazz Jackrabbit RLE compression]], if it is empty, it will consist simply of the byte $20. (These can be seen at the end of the default files.)&lt;br /&gt;
&lt;br /&gt;
Some tiles do contain transparency with the pixel value 0x7F (127).&lt;br /&gt;
&lt;br /&gt;
== Bonus tiles ==&lt;br /&gt;
&lt;br /&gt;
The file consists of three blocks, all RLE compressed. The first is the sky used in the bonus level, the second is the palette used for the graphics and the third is tile data.&lt;br /&gt;
&lt;br /&gt;
The tile block is identical to that found in regular tiles, but without the &#039;ok&#039; text. There are only 60 tiles in a bonus tileset.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The format for regular tiles was deciphered from the source of OpenJazz.  The format for bonus tiles was deciphered by [[User:Spinal|Zander Zoftware]].  Some corrections were made by [[User:Levellass|Levellass]].  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>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11044</id>
		<title>Jazz Jackrabbit Tile Format</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=Jazz_Jackrabbit_Tile_Format&amp;diff=11044"/>
		<updated>2023-05-21T08:00:09Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: Added tile-set as main image and info about pixel transparency.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tileset Infobox&lt;br /&gt;
 | Hardware1 = VGA&lt;br /&gt;
 | MaxTiles = 240&lt;br /&gt;
 | Palette = Internal&lt;br /&gt;
 | Names = N&lt;br /&gt;
 | TileMinSize = 32&lt;br /&gt;
 | TileMaxSize = 32&lt;br /&gt;
 | NumPlanes = 1&lt;br /&gt;
 | PlaneArrangement = Linear&lt;br /&gt;
 | HasTransparency = Y&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;
 | Games =&lt;br /&gt;
   {{Game|Jazz Jackrabbit}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Jazz Jackrabbit]] has two sort of tiles:&lt;br /&gt;
&lt;br /&gt;
* Tiles for regular levels are stored in &amp;lt;tt&amp;gt;BLOCKS.xxx&amp;lt;/tt&amp;gt; files. This file is used in all levels with filename &amp;lt;tt&amp;gt;LEVELy.xxx&amp;lt;/tt&amp;gt; where xxx is the same.&lt;br /&gt;
* Tiles for bonus levels are stored in &amp;lt;tt&amp;gt;BONUSy.000&amp;lt;/tt&amp;gt; files. The bonus levels contain a string that determines what tile file to use.&lt;br /&gt;
&lt;br /&gt;
== Regular tiles ==&lt;br /&gt;
&lt;br /&gt;
The file starts with an [[Jazz Jackrabbit RLE compression|RLE-compressed]] palette, which is used for all the tiles. This is followed by two other RLE palettes used for the sky (Each block of sky is 256 pixels high and stretched across the level. There are two alternating sky blocks stacked in the level.) For a total 0f 768 possible colors for each level.&lt;br /&gt;
&lt;br /&gt;
Tile data consists of 4, 60 tile blocks (No more than 240 tiles total.) If a block has data in it it start with &#039;ok&#039; and it will be RLE compressed using [[Jazz Jackrabbit RLE compression]], if it is empty, it will consist simply of the byte $20. (These can be seen at the end of the default files.)&lt;br /&gt;
&lt;br /&gt;
Some tiles do contain transparency with the pixel value 0x7F (127).&lt;br /&gt;
&lt;br /&gt;
== Bonus tiles ==&lt;br /&gt;
&lt;br /&gt;
The file consists of three blocks, all RLE compressed. The first is the sky used in the bonus level, the second is the palette used for the graphics and the third is tile data.&lt;br /&gt;
&lt;br /&gt;
The tile block is identical to that found in regular tiles, but without the &#039;ok&#039; text. There are only 60 tiles in a bonus tileset.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
The format for regular tiles was deciphered from the source of OpenJazz.  The format for bonus tiles was deciphered by [[User:Spinal|Zander Zoftware]].  Some corrections were made by [[User:Levellass|Levellass]].  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>Mr spectacals</name></author>
	</entry>
	<entry>
		<id>https://moddingwiki.shikadi.net/w/index.php?title=File:Jazz_Jackrabbit_Tile_Format.png&amp;diff=11043</id>
		<title>File:Jazz Jackrabbit Tile Format.png</title>
		<link rel="alternate" type="text/html" href="https://moddingwiki.shikadi.net/w/index.php?title=File:Jazz_Jackrabbit_Tile_Format.png&amp;diff=11043"/>
		<updated>2023-05-21T07:55:09Z</updated>

		<summary type="html">&lt;p&gt;Mr spectacals: One of the tile sets extracted from the file BLOCKS.000&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
One of the tile sets extracted from the file BLOCKS.000&lt;/div&gt;</summary>
		<author><name>Mr spectacals</name></author>
	</entry>
</feed>