From 5d7d457e49495ca01e14da77ccaaa6bc1dbd3a7d Mon Sep 17 00:00:00 2001 From: Duncan Date: Fri, 23 May 2014 05:02:42 -0700 Subject: [PATCH] Updated G1 Elements Layout (markdown) --- G1-Elements-Layout.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/G1-Elements-Layout.md b/G1-Elements-Layout.md index 6205594..44df346 100644 --- a/G1-Elements-Layout.md +++ b/G1-Elements-Layout.md @@ -1,6 +1,10 @@ A G1 element is typically a sprite. It is basically an image. -There would appear to be multiple image formats that the G1 element can be this describes one of them. I will update this as I decipher the other formats. +There would appear to be two image formats that the G1 element can be. + +## RLE Compressed G1 Element + +Run length encoded element. The first y words are offsets to the corresponding y line. You use this to jump to the correct line if you do not require info from the first line. @@ -35,4 +39,12 @@ blank, blank, blank, 0xa1 Total bytes of info: 32 (Assumes 1 byte for if blank or not) ``` -Note that the final image has more bytes than the original image. For larger images with more blank areas this saving is bigger. We can therefore conclude that this technique was probably used to save on file size. \ No newline at end of file +Note that the final image has more bytes than the original image. For larger images with more blank areas this saving is bigger. We can therefore conclude that this technique was probably used to save on file size. + +##Non Compressed Bitmap G1 Element + +The second type is not compressed and it is a simple one to one relationship. + +##Palettes + +The drawing code also uses palettes to translate some of the colours. This is used for example with security guards to change their top colour. There are two palettes that are not loaded and are modified throughout the code (0x9ABE0C and 0x9ABF0C) \ No newline at end of file