mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Formatting, fix presumably broken markdown
@@ -3,7 +3,6 @@ A G1 element is typically a sprite. It is basically an image.
|
||||
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.
|
||||
@@ -28,9 +27,7 @@ Example G1 Element 4x4 pixels.
|
||||
0018: 0x81,0x03,0xa1 ;3 bytes in line 3
|
||||
Total bytes: 27
|
||||
```
|
||||
|
||||
Final image. Note that blank areas will be whatever the current drawing area is.
|
||||
|
||||
```
|
||||
blank, 0xff, 0xa1, 0xff
|
||||
0xff, 0xff, 0xa1, 0xff
|
||||
@@ -38,13 +35,10 @@ blank, blank, blank, 0xff
|
||||
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.
|
||||
|
||||
## 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)
|
||||
Reference in New Issue
Block a user