Skip to content

Commit 2d5c1d2

Browse files
committed
added regions for harry death / respawn to appear correctly
1 parent 353d9f6 commit 2d5c1d2

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

pitfall.PRG

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -550,15 +550,20 @@ begin
550550

551551
playsound(fx.death);
552552

553-
while(t<fpsec*2)
554-
t++;
555-
frame;
553+
frame(fps*200);
556554

557-
end
558555
lives--;
559556
if(lives>=0)
560557
harryid=harry();
561558
son.y=y-30;
559+
if(y>160)
560+
define_region(2,18,167,26,32);
561+
else
562+
define_region(2,24,73,35,95);
563+
end
564+
565+
harryid.region=2;
566+
562567
else
563568
loop
564569
frame;
@@ -584,15 +589,19 @@ begin
584589
region=2;
585590
playsound(fx.death);
586591

587-
while(y<150)
592+
while(y<160)
588593
y++;
589-
frame(200);
590-
594+
frame;
591595
end
596+
597+
frame(fps*25);
598+
592599
lives--;
593600
if(lives>=0)
594601
harryid=harry();
595602
end
603+
define_region(2,24,73,35,95);
604+
harryid.region=2;
596605

597606
end
598607

@@ -735,7 +744,7 @@ loop
735744
end
736745

737746
if(y==groundy)
738-
747+
region=0;
739748
if(key(_space) && yx!=-4 && !lastspace)
740749
yx=-4;
741750
playsound(fx.jump);
@@ -830,6 +839,8 @@ loop
830839
if(alive==1)
831840
if(yx<8)
832841
yx++;
842+
else
843+
833844
end
834845
end
835846
end
@@ -958,12 +969,14 @@ loop
958969

959970
while(y<boty)
960971
y++;
961-
962972
if(y>groundy-24)
963973
graph=11;
964974
end
965975

966976
frame;
977+
978+
//region=0;
979+
967980
end
968981

969982
end

0 commit comments

Comments
 (0)