lattice top or tapestry changes

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5760
Joined: April 9th, 2009, 10:58 pm

lattice top or tapestry changes

Post 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...?)
Attachments
question.png
David
The Prince of Persia
The Prince of Persia
Posts: 2860
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: lattice top or tapestry changes

Post 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?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5760
Joined: April 9th, 2009, 10:58 pm

Re: lattice top or tapestry changes

Post 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.
Post Reply