Skip to content

Commit

Permalink
Added debug printouts for the timing of feather fall.
Browse files Browse the repository at this point in the history
  • Loading branch information
NagyD committed Dec 27, 2020
1 parent 2934f7a commit ab30d00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/seg000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1747,6 +1747,7 @@ void __pascal far toggle_upside() {

// seg000:15F8
void __pascal far feather_fall() {
printf("slow fall started at: rem_min = %d, rem_tick = %d\n", rem_min, rem_tick);
is_feather_fall = 1;
flash_color = 2; // green
flash_time = 3;
Expand Down
6 changes: 6 additions & 0 deletions src/seg003.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,19 @@ void __pascal far timers() {
if (resurrect_time > 0) {
--resurrect_time;
}

if (is_feather_fall) is_feather_fall++;

if (is_feather_fall && !check_sound_playing()) {
printf("slow fall ended at: rem_min = %d, rem_tick = %d\n", rem_min, rem_tick);
printf("length = %d ticks\n", is_feather_fall);
#ifdef USE_REPLAY
if (recording) special_move = MOVE_EFFECT_END;
if (!replaying) // during replays, feather effect gets cancelled in do_replay_move()
#endif
is_feather_fall = 0;
}

// Special event: mouse
if (current_level == /*8*/ custom->mouse_level && Char.room == /*16*/ custom->mouse_room && leveldoor_open) {
++leveldoor_open;
Expand Down

0 comments on commit ab30d00

Please sign in to comment.