frosch wrote:
I cannot make any sense of your example sprite
That should be obvious, but let me try again:
Code: Select all
3149 * 0 02 0f 04 42 // number of sprites (ex ground sprite) = 2
9a 0f 00 00 // ground sprite
04 00 00 80 // 1st building sprite
00 00 00 // building sprite bb coordinates
10 10 08 // building sprite bb sizes
00 00 00 80 // 2nd building sprites
02 00 // flags = set sprite offset
00 00 08 // 2nd building sprite bb coordinates
08 08 10 // 2nd building sprite bb sizes
10 // regsiter to be used for 2nd building sprite
frosch wrote:
so I cannot correct it. However, wrt. your other questions:
All entries in the spritelayout - including the primary ground sprite - need a <flags> value. If <flags> is zero, you do not need to specify any registers.
Question was
if a flag
value of zero would be allowed at all, i.e. if a sprite in an advanced sprite layout may be handled as a "normal" sprite (i.e. without using the special adv sprite layout features). This is not documented, but indeed the BNF notation suggest that there must always a <flag> value be set (probably zero). I wanted to know if this interpretation is correct.
In lights of this, is the above code (omitting <flags> for "static" sprites) correct?
For testing puroposes, I´ve added empty <flag>s like this:
Code: Select all
3149 * 0 02 0f 04 42 // number of sprites (ex ground sprite) = 2
9a 0f 00 00 // ground sprite
00 00 // no flags
04 00 00 80 // 1st building sprite
00 00 // no flags
00 00 00 // building sprite bb coordinates
10 10 08 // building sprite bb sizes
00 00 00 80 // 2nd building sprites
02 00 // flags = set sprite offset
00 00 08 // 2nd building sprite bb coordinates
08 08 10 // 2nd building sprite bb sizes
10 // regsiter to be used for 2nd building sprite
This doesn´t generate an error but "it does not work", i.e. the value set in register 0x10 isn´t added to <00 00 00 80>.
Is this code correct?
frosch wrote:
Your other questions are likely answered in the "Register or value in advanced sprite layouts" section in the specs. Some flags take registers, some take none.
That wasn´t the question.
frosch wrote:
The meaning of the "skip" flag is also described there.
Ah yes, found it. Thanks.
regards
Michael