CusPop TODO list

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: CusPop TODO list

Post by David »

Related trivia I found out while I was writing the previous post:

1. In the original game, holding_sword is used only to determine which music to play when the prince dies.
In the Apple II source, this variable is called "heroic"; and the "death in fight" music is called "heroic death".

It might make sense that it's not set to 0 if the prince falls from fighting.
For example, if a guard pushes the prince into a pit and he dies there, it makes sense to play the "death in fight" music.

2. Strangely, holding_sword is set to 0 if I back off the screen to the right from the guard in room 8 of level 5 (to room 7).
That happens in control_with_sword(). At that point, can_guard_see_kid is 1 for some reason.

To find out why is can_guard_see_kid set to 1, I added these debug printouts in check_can_guard_see_kid():

Code: Select all

		printf("left_pos = %d, right_pos = %d\n", left_pos, right_pos);
		if (right_pos >= left_pos) {
[...]
					printf("can_guard_see_kid set to 1, because curr_tile2 = %d\n", curr_tile2);
					printf("Kid.room = %d, Guard.room = %d, drawn_room = %d\n", Kid.room, Guard.room, drawn_room);
					printf("Kid.curr_col = %d, Guard.curr_col = %d\n", Kid.curr_col, Guard.curr_col);
					can_guard_see_kid = 1;
The result is:

Code: Select all

left_pos = 163, right_pos = 205
can_guard_see_kid set to 1, because curr_tile2 = 4
Kid.room = 7, Guard.room = 7, drawn_room = 7
Kid.curr_col = 10, Guard.curr_col = 7
Room 7 is the new room (where I backed off to), but left_pos and right_pos are meant in the old room, room 8 (where I started).
So the game is looking at the top right part of room 7, sees the closed gate, and thinks it's between the prince and the guard.
But this won't cause the prince actually sheathe his sword. I wonder why.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: CusPop TODO list

Post by Norbert »

Spoiler: show
Here's another one, David. :P Is there an easy way (for you) to give tile 0x15 (21; the skeleton) a variant (modifier) 0x01 that displays the blue wall stripe in the palace environment? This isn't all that important, only a nice-to-have, so don't invest too much time if it's tricky to do.
[Edit:]
Never mind, I could do it with PR.
Essentially, I just increased the image size, and added the line manually:
skeleton right.png
skeleton right.png (162 Bytes) Viewed 5058 times
Post Reply