Passable upper layer tiles with "star" terrain attribute shows player and events character head #333

Closed
fdelapena opened this Issue Sep 7, 2014 · 4 comments

Projects

None yet

3 participants

@fdelapena
Member

Character's head is visible when it is in movement when walking in vertical, from up to down and from down to up when passing below "star" tiles.

Looks like RPG_RT always shows the whole player and charset-based events below star tiles (even when the "invisible" first upper tile is opaque in some tilesets).

Test case download available.

This also happens with events with character graphics moving around these star tiles.

@fdelapena fdelapena added this to the 0.3 milestone Sep 7, 2014
@fdelapena fdelapena changed the title from Passable upper layer tiles with "star" terrain attribute shows player character head to Passable upper layer tiles with "star" terrain attribute shows player and events character head Nov 2, 2014
@fdelapena
Member

Looks like it needs to check terrains with star attribute tiles and return 0 for them at Game_Character::GetScreenZ.

@glynnc
Contributor
glynnc commented Nov 10, 2014

I suspect that the problem is that a player/event sprite at (X,Y) has exactly the same Z value as a raised tlie at (X,Y-1), meaning that the drawing order depends upon the implementation of std::list::sort() and the previous order. That would explain why the drawing order is correct when the player is moving down but not when moving up.

Changing the value assigned to tile.z for Passable::Above tiles from 32 to 64 in TilemapLayer::CreateTileCache() appears to fix it.

This may also require increasing the Z of the last TilemapTile object created in TilemapLayer::TilemapLayer() to allow for "above" tiles at the bottom of the screen.

@Ghabry
Member
Ghabry commented Apr 27, 2015

It's possible that this was fixed by the looping maps stuff merged yesterday. Modified some Z-values.
Needs a retest.

@fdelapena
Member

Tested, works better: now the head is not visible when the character stops, but it is still visible when it is in movement when walking in vertical, from up to down and from down to up.

@fdelapena fdelapena modified the milestone: 0.3.1, 0.3 Apr 29, 2015
@fdelapena fdelapena removed the Emulation label May 19, 2015
@Ghabry Ghabry closed this in #546 Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment