Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeletons that are not in the original level 3 room start falling from the wrong room. #284

Open
dstarosta opened this issue Jun 26, 2022 · 4 comments

Comments

@dstarosta
Copy link
Contributor

The Guard (skeleton) room gets pointed to the room below even if the room below does not match the "skeleton reappear room".

The code should probably be changed to

	} else if (Guard.charid == charid_4_skeleton &&
                // should the level number be checked too?
		level.roomlinks[Guard.room - 1].down == /*3*/ custom->skeleton_reappear_room) {
           Guard.room = custom->skeleton_reappear_room;
           ...
         }

(Guard.room = level.roomlinks[Guard.room - 1].down) == /*3*/ custom->skeleton_reappear_room) {

NagyD added a commit that referenced this issue Jun 26, 2022
@NagyD
Copy link
Owner

NagyD commented Jun 26, 2022

Done: 8c85a54
Is there any specific glitch caused by the old code?

@dstarosta
Copy link
Contributor Author

dstarosta commented Jun 27, 2022

Yeah, skeletons in different locations than the original room could start hanging in the air in another room as they get re-positioned to the room below after they fall out. The game does not process guards in rooms other than the drawn room. Sometimes if you visit the room, you start seeing weird skeleton frames for the hung skeleton which is probably caused by some issue with the assigned sequence.

Also, if the mod supports drawing fallen guards the room changes causes problems especially if the room ends up being 0.

@dstarosta
Copy link
Contributor Author

dstarosta commented Jan 26, 2023

I noticed another skeleton strangeness that causes loose tiles to shake (sometimes fall in my mod).

The "enter_guard" assigns sequence 63 when entering the room.

seqtbl_offset_char(seq_63_guard_stand_active); // stand active (when entering room) (skeleton)

But that sequence enum is misnamed. It is almost the same as sequence 90 but also causes the tiles on the guard's row to shake. It is really designed for a guard falling down and immediately stand engarde. It should be called something like "seq_63_guard_stand_after_fall".

seq_id = seq_63_guard_stand_active; // stand active after landing

Sequence 90 (seq_90_en_garde which is really the guard_stand_active sequence) is almost the same but does not shake the floors and should be used in the "enter_guard" instead. It is used correctly in the "draw_sword()" method.

It seems like a bug from the original PoP.
https://github.com/jmechner/Prince-of-Persia-Apple-II/blob/a9e276ce886f2200985e968b6cb5bda7edf5a2bb/01%20POP%20Source/Source/AUTO.S#L1873

@NagyD
Copy link
Owner

NagyD commented Jan 28, 2023

I noticed another skeleton strangeness that causes loose tiles to shake (sometimes fall in my mod).
The "enter_guard" assigns sequence 63 when entering the room.
But that sequence enum is misnamed. It is almost the same as sequence 90 but also causes the tiles on the guard's row to shake.

In my test, the loose tiles in the prince's row shake:
(The prince has just climbed up from the room below.)
284_skeleton_shake_floor

Now that I think of it, every time a guard lands, the loose floors in the prince's row shake.

It is really designed for a guard falling down and immediately stand engarde. It should be called something like "seq_63_guard_stand_after_fall".

Renamed: 834ebf3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants