mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Updated G1 Elements Layout (markdown)
@@ -1 +1,14 @@
|
||||
# G1 Elements
|
||||
A G1 element is typically a sprite. It is basically an image.
|
||||
It appears as though the G1 elements bits pointer has the following layout.
|
||||
|
||||
The first y dwords 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.
|
||||
|
||||
`[line 0 offset][line 1 offset] ...`
|
||||
|
||||
`[dword][dword] ...`
|
||||
|
||||
When you have jumped to the correct line there are 2 words that inform you of the number of bytes in the next data section and the gap length after it. To draw the correct image you have to do each section and remember to jump over each gap on the drawing surface. The next line will start immediately at the end of the previous line. If there are no bytes in the gap then the line has ended.
|
||||
|
||||
`line0:[no. bytes in data 1][gap length 1][data 1 of no. bytes length][no. bytes in gap 2]...line1:...`
|
||||
|
||||
`[word][word][bytes*no.bytes][word]...`
|
||||
Reference in New Issue
Block a user