Page 1 of 1

lattice top or tapestry changes

Posted: April 18th, 2017, 7:29 pm
by Norbert
Similar to how PoP2 closes all tunnels when entering a level, it looks like PoP1 changes either the lattice top or tapestry when the former is to the left of the latter. See the attached image. Question for someone who's familiar with the SDLPoP code base (probably David, maybe Falcury): which of the two changes and what is the exact check that takes place? (If 0x0C is to the right of 0x1A? Then...?)

Re: lattice top or tapestry changes

Posted: April 22nd, 2017, 10:43 am
by David
Norbert wrote: it looks like PoP1 changes either the lattice top or tapestry when the former is to the left of the latter.
[...] which of the two changes and what is the exact check that takes place? (If 0x0C is to the right of 0x1A? Then...?)
It's here in seg008.c:

Code: Select all

void __pascal far draw_tile_base() {
	word ybottom;
	word id;
	ybottom = draw_main_y;
	if (tile_left == tiles_26_lattice_down && curr_tile == tiles_12_doortop) {
		id = 6; // Lattice + door A
		ybottom += 3;
	} else if (curr_tile == tiles_11_loose) {
The referenced image (id = 6) is: data/VPALACE/res206.png
Norbert wrote:Similar to how PoP2 closes all tunnels when entering a level,
Not exactly:
With PoP2 tunnels, the level data is changed (similarly to load_alter_mod() of SDLPoP).
But in PoP1 this merging of lattice and tapestry is purely a graphical thing.

What are you trying to do, by the way?
Maybe you want to update apoplexy so it shows this case correctly?

Re: lattice top or tapestry changes

Posted: April 22nd, 2017, 7:31 pm
by Norbert
Thanks.
David wrote:What are you trying to do, by the way?
Maybe you want to update apoplexy so it shows this case correctly?
Mostly I was just curious.
But I'm also creating TODO text files for all my software.
I noticed I could no longer keep track of it all in my head.