1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 17:42:29 +01:00

Updated G1 Elements Layout (markdown)

Duncan
2014-05-23 05:02:42 -07:00
parent 773fd405bf
commit 5d7d457e49

@@ -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.
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)