lattice top or tapestry changes

Open-source port of PoP that runs natively on Windows, Linux, etc.

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2918
Joined: April 9th, 2009, 10:58 pm
Contact:

lattice top or tapestry changes

Postby Norbert » April 18th, 2017, 7:29 pm

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: 1294
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: lattice top or tapestry changes

Postby David » April 22nd, 2017, 10:43 am

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: 2918
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: lattice top or tapestry changes

Postby Norbert » April 22nd, 2017, 7:31 pm

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.


Return to “SDLPoP”

Who is online

Users browsing this forum: No registered users and 1 guest