Z Order of background tiles.

  • Thread starter Thread starter Akari
  • Start date Start date
Status
Not open for further replies.
bge0_2.jpg


Cool, looks like we were right about depth. This one is del3's ocean, layer 3, set to 0xE0 rather than its original scripting, at 0x100. As you can see, at the point I'm standing is the part where Cloud comes "in front of" the ocean layer - you can just see his chest and head which is infront of the layer, and the rest of the model, which is behind it. If you walk further down (to the bottom of the screen), Cloud is drawn totally infront of the ocean. If you move up, he is underneath the ocean.  :-)

[Edit] Just as I'm updating the Wiki; is it possible they meant BGDPH, as in DePtH, rather than PDH? So either it was a spelling mistake for whoever wrote the opcode names (found in the PS version), or for whoever ripped the list from it? Not sure what else PDH could stand for  :lol:
 
Last edited:
I think the original scripters desired to use it the way you are using now. However the reason they didn't is the results didn't look good and had unexpected results.  So they used another method and used an opcode to shade the vertices a different color (KAWAI  code). He is normally on top (which before I was changing the response but really it made no sense to even put anything else at all LOL).


Cyb
 
So are we saying now that this new layer (3 in del3's case) can have both BGPDH/BGSCR applied to it, and be assigned scripted areas to be used with BGON/BGOFF? This must be the case, since del3's "wave" entity uses both BGPDH to (presumably) set its depth, as well as BGON/OFFs to animate it. I had kind of assumed that the BGON/OFF only applied to the foreground layer (layer one, in your analogy) but then I guess it must work on all layers; perhaps even layer 0 if it had the right area ID assigned to it? (though this wouldn't really make sense on the very back layer as it would be blank if you turned it off).
I dont think this could be even called layer now, cause the second one have many layers itself =)

1st background - always rendered first. It doesn't have animation or depth. (maybe depth could be set with opcodes?)

Info in dat files are X position, Y position, texture X, texture Y, clut, texture flags.


2nd background - contains fixed depth tiles. It can have animation.

Info in dat files are X position, Y position, texture X, texture Y, clut, texture flags, depth info, animation info.


3rd and 4th background - contains movable tiles. It has no depth by itself (it needs to be specify by opcodes), but can have animation. there only two of them.

Info in dat files are X position, Y position, texture X, texture Y, clut, texture flags, animation info.

As I can see 3rd and 4th background contains 4bpp textures and have size 32x32. This needs to be implemented =)


Now we (think we) know what the layer argument deals with, I'll have a look at BGPDH, and also at that field with both layer 2 and 3. It's ztruck that has both 2 and 3, btw, I seem to recall you asking; that might be a good place to test.
Mmm I looked at this... nothing unusual. 2 movable layers with animation. 32x32 size tiles. Now I need to implement new tile size first =)
 
It seems that layer 3 and 4 always have 32x32 sprites. I add support to them. But I need to check all others backgrounds.

2 Synergy Blades: could you tell me names of location that uses BGPDH?

ps: It seems that animation index used in BGON and BGOFF is not the index itself but offset to byte. Animated tile have one byte mask. If some bits set to one - tile will be enabled with BGON seted to this bit.

Tile with animask 0x20 will be activated with BGON (00,01,05) as 1 << 5 == 0x20.
This may be used to set one tile shown in different frame of animation.

q-gears.0.11b_3.jpg

q-gears.0.11b_4.jpg
 
Last edited:
Looks like I arrived in the thread too late to have saved you the effort of having to guess all of that the hard way.
Ah well.
 
Looks like I arrived in the thread too late to have saved you the effort of having to guess all of that the hard way.
Ah well.
There are two things left that I don't understand.

1) As you can see on my picture of DEL3 (beach on Costa Del Sol) the 4th layer are 16 pixels higher than bottom of picture. Why? There are no BGSCR in DEL3... maybe background 4 always 16 pixels lower than others?

2) There one byte left in animation set that I don't understand. There is byte that define animation group.... BUT! sometimes it has 1st bit set.... sometimes not. I don't inderstand what this bit do. (0x02 and 0x82 seems the same animation to me)

Maybe you can help =)

q-gears.0.11b_4.jpg
 
Last edited:
Looks like I arrived in the thread too late to have saved you the effort of having to guess all of that the hard way.
Ah well.
But isn't life about the journey?  :-)

2 Synergy Blades: could you tell me names of location that uses BGPDH?
crater_1: (crater,32)

del3: (wave,32)

hill: (sky,32)

hill2: (sky,32)

junair: (hw,32) (hw_lg,32)

junonl2: (smoke0,1) (lift,1)

junonr2: (door,2) (door,32) (smoke0,1) (lift,1)

las1_1: (blue,32) (green,32) (orange,32)

loslake1: (CASCADE,1)

trnad_3: (wind,32)

trnad_4: (steam1,1)

ujunon2: (waves,32)

ujunon3: (wave,32)

woa_1: (try,32)

woa_2: (try,32) (try,32)

woa_3: (try,32) (try,32)

zcoal_1: (bridge,32)

zcoal_3: (mount,32)

ztruck: (vier,32) (vier,32)

32 just means it's the last script in that entity.
 
Status
Not open for further replies.
Back
Top