Open kichikuou opened 2 weeks ago
If I remember correctly, I had tested the relative Z-ordering on the Shaman's Sanctuary .exe, and based my implementation on that. However, I just ran that game in xsys4dbg and it looks similar to what you found in Rance Quest, with sprites and parts seeming to share one Z-space. So it might not be necessary to implement it that way I did, even if the .exe works that way.
In Shaman's Sanctuary .exe, by inserting the following code at the beginning of 01/プロローグA()
, I was able to create a sprite whose Z-order is between two parts:
int nSp = ChipmunkSpriteEngine.SP_GetUnuseNum(1);
ChipmunkSpriteEngine.SP_Create(nSp, 600, 600, 255, 0, 0, 255);
ChipmunkSpriteEngine.SP_SetPos(nSp, 100, 0);
ChipmunkSpriteEngine.SP_SetZ(nSp, 300); // between 201 (background) and 550 (message window)
So, it is probably the correct behavior for sprites and parts to share one Z-space.
In Rance Quest, after the very first message, "閃きの迷宮" is highlighted on the map.
However, in xsystem4, the frame behind the text is not shown.
Looking at the scene info in xsys4dbg, the background is a normal sprite with Z=8001, the frame is in Parts with Z=8002, and the text is a normal sprite with Z=8004.
Xsystem4 represents PartsEngine as a virtual sprite with Z=0, but this makes me think that the normal sprite and Parts should share one Z-space. @nunuhara have you seen any counter example?