diff --git a/data/backgrounds/fire4.png b/data/backgrounds/fire4.png new file mode 100644 index 0000000..7455433 Binary files /dev/null and b/data/backgrounds/fire4.png differ diff --git a/data/levels/butterflystomach.dat b/data/levels/butterflystomach.dat new file mode 100644 index 0000000..16a83e4 --- /dev/null +++ b/data/levels/butterflystomach.dat @@ -0,0 +1,61 @@ +bgfile sky1.png +bg 0 +hurryup 30 +help +endhelp +monsters +6 5 11 +6 7 13 +6 9 15 +6 11 17 +6 13 19 +6 25 11 +6 27 12 +6 29 13 +6 31 14 +6 33 15 +7 7 8 +7 34 8 +133 25 22 +133 14 22 +133 19 14 +133 33 23 +133 6 23 +0 7 28 +134 32 28 +7 30 1 +7 11 1 +23 33 6 +endmonsters +exitdir 1 +74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74,74,75,75,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,74,74,74,74,74,74,74,74,75,75,75,75,74,75,98,98,98,98,98,98,75,74,75,75,75,75,74,74,74,74,74,74,74,74,75,75,74, +74,75,75,74,75,75,75,75,75,75,74,74,74,74,74,74,75,97,97,97,97,97,97,75,74,74,74,74,74,74,75,75,75,75,75,75,74,75,75,74, +74,75,75,74,75,75,75,75,75,74,74,74,74,74,74,75,98,97,99,0,0,99,97,98,75,74,74,74,74,74,74,75,75,75,75,75,74,75,75,74, +74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74, +74,75,75,74,75,75,0,0,0,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,0,0,0,75,75,74,75,75,74, +74,75,75,74,75,0,0,0,0,0,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,0,0,0,0,0,75,74,75,75,74, +74,75,75,74,75,0,0,0,0,0,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,0,0,0,0,0,75,74,75,75,74, +74,75,75,74,75,75,0,0,0,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,0,0,0,75,75,74,75,75,74, +74,75,75,74,74,75,75,75,75,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,75,75,75,75,74,74,75,75,74, +74,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,74, +74,75,75,75,75,74,74,75,75,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,75,75,74,74,75,75,75,75,74, +74,75,75,75,75,75,74,75,75,75,75,75,75,75,75,75,98,97,99,0,0,99,97,98,75,75,75,75,75,75,75,75,75,74,75,75,75,75,75,74, +74,75,75,75,75,75,74,75,75,75,75,75,75,75,75,75,75,97,97,97,97,97,97,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,75,74, +74,75,75,75,75,75,74,75,0,0,75,75,75,75,75,75,75,75,97,98,98,97,75,75,75,75,75,75,75,75,0,0,75,74,75,75,75,75,75,74, +74,75,75,74,74,74,75,75,0,0,75,75,75,75,0,0,0,0,0,0,0,0,0,0,0,0,75,75,75,75,0,0,75,75,74,74,74,75,75,74, +74,75,75,74,75,75,0,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,0,0,0,0,75,75,74,75,75,74, +74,75,75,74,75,75,75,0,0,0,75,74,74,74,74,74,74,75,75,75,75,75,75,74,74,74,74,74,74,75,0,0,0,0,75,75,74,75,75,74, +74,75,75,74,75,75,75,75,75,75,75,74,75,75,75,75,74,74,74,74,74,74,74,74,75,75,75,75,74,75,75,75,75,75,75,75,74,75,75,74, +74,75,75,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74,74,74,74,74,74,74,74,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +layer2 diff --git a/data/levels/holeinthehill.dat b/data/levels/holeinthehill.dat index 1dce42a..62c1c1a 100644 --- a/data/levels/holeinthehill.dat +++ b/data/levels/holeinthehill.dat @@ -2,6 +2,9 @@ bgfile bg 0 hurryup 30 help +Kill four enemies at once for a poker card! +Kill FIVE enemies at once for ... ? +FILL ME IN endhelp monsters 0 2 28 @@ -39,6 +42,8 @@ monsters 16 27 8 16 33 16 15 7 16 +14 10 28 +14 15 24 endmonsters exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, diff --git a/data/levels/kingcat.dat b/data/levels/kingcat.dat new file mode 100644 index 0000000..abd36af --- /dev/null +++ b/data/levels/kingcat.dat @@ -0,0 +1,42 @@ +bgfile fire4.png +bg 0 +hurryup 30 +help +endhelp +monsters +0 5 14 +134 34 14 +174 19 18 +endmonsters +exitdir -2 +74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,23,23,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,23,23,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,23,23,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,23,23,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,0,0,0,0,0,0,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74, +74,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,74, +74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +layer2 diff --git a/data/levels/level9.5.dat b/data/levels/level9.5.dat deleted file mode 100644 index 85cb06d..0000000 --- a/data/levels/level9.5.dat +++ /dev/null @@ -1,66 +0,0 @@ -tileset green -bg 0 -hurryup 90 -help -endhelp -monsters -1 9 9 -! 23 15 -s 31 4 -r 36 9 -r 33 12 -r 37 15 -r 34 19 -r 35 23 -a 11 23 -a 5 26 -r 35 28 -a 22 28 -@ 33 9 -@ 37 9 -Y 37 28 -Y 36 28 -Y 35 28 -Y 34 28 -Y 33 28 -P 36 19 -P 35 19 -P 34 19 -Y 15 9 -Y 12 9 -Y 36 15 -Y 34 15 -Y 35 15 -endmonsters -exitdir 1 -4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,14,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,4,1,1,1,1,1,1,1,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,4,0,0,0,0,0,0,0,1, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -layer2 diff --git a/data/levels/penultimatum.dat b/data/levels/penultimatum.dat new file mode 100644 index 0000000..d1c8347 --- /dev/null +++ b/data/levels/penultimatum.dat @@ -0,0 +1,143 @@ +bgfile sky1.png +bg 0 +hurryup 90 +help +endhelp +monsters +0 18 4 +134 21 4 +7 10 1 +7 35 1 +172 37 21 +172 2 21 +12 32 16 +12 7 22 +49 33 22 +49 7 16 +endmonsters +exitdir 1 +74,74,98,98,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,98,98,74,74, +74,98,98,98,98,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,98,98,98,98,74, +74,98,98,98,97,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,97,98,98,98,74, +74,98,98,97,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,97,98,98,74, +74,98,98,97,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,97,98,98,74, +74,98,98,98,97,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,97,98,98,98,74, +74,98,98,98,98,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,74,74,74,74,98,98,98,98,98,98,74,74,74,74,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,98,98,98,97,97,98,98,98,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,97,99,99,97,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,97,97,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,98,98,98,98,98,98,98,98,98,74,74,98,98,98,97,97,98,98,98,74,74,98,98,98,98,98,98,98,98,98,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,97,99,99,97,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,97,97,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,98,98,98,98,74,74,74,74,74,98,98,98,98,74,74,98,98,98,98,98,98,98,98,74,74,98,98,98,98,74,74,74,74,74,98,98,98,98,74, +74,74,98,98,74,74,74,74,74,74,74,98,74,98,74,74,98,98,74,74,74,74,98,98,74,74,98,74,98,74,74,74,74,74,74,74,98,98,74,74, +layer2 +5,11,69 +6,11,68 +7,11,70 +8,11,72 +9,11,73 +30,11,69 +31,11,70 +32,11,72 +33,11,71 +34,11,73 +13,14,69 +14,14,70 +15,14,72 +16,14,73 +23,14,69 +24,14,70 +25,14,72 +26,14,73 +5,15,95,layer3 +6,15,95,layer3 +7,15,95,layer3 +8,15,95,layer3 +9,15,95,layer3 +30,15,95,layer3 +31,15,95,layer3 +32,15,95,layer3 +33,15,95,layer3 +34,15,95,layer3 +5,16,11 +5,16,95,layer3 +6,16,11 +6,16,95,layer3 +7,16,11 +7,16,95,layer3 +8,16,11 +8,16,95,layer3 +9,16,11 +9,16,95,layer3 +30,16,11 +30,16,95,layer3 +31,16,11 +31,16,95,layer3 +32,16,11 +32,16,95,layer3 +33,16,11 +33,16,95,layer3 +34,16,11 +34,16,95,layer3 +19,17,82 +20,17,82 +5,21,95,layer3 +6,21,95,layer3 +7,21,95,layer3 +8,21,95,layer3 +9,21,95,layer3 +30,21,95,layer3 +31,21,95,layer3 +32,21,95,layer3 +33,21,95,layer3 +34,21,95,layer3 +5,22,11 +5,22,95,layer3 +6,22,11 +6,22,95,layer3 +7,22,11 +7,22,95,layer3 +8,22,11 +8,22,95,layer3 +9,22,11 +9,22,95,layer3 +30,22,11 +30,22,95,layer3 +31,22,11 +31,22,95,layer3 +32,22,11 +32,22,95,layer3 +33,22,11 +33,22,95,layer3 +34,22,11 +34,22,95,layer3 +19,23,82 +20,23,82 +1,28,11 +4,28,11 +10,28,11 +12,28,11 +18,28,11 +19,28,11 +20,28,11 +21,28,11 +27,28,11 +29,28,11 +35,28,11 +38,28,11 diff --git a/data/levels/plumbingproblems.dat b/data/levels/plumbingproblems.dat new file mode 100644 index 0000000..8be94be --- /dev/null +++ b/data/levels/plumbingproblems.dat @@ -0,0 +1,215 @@ +bgfile sky1.png +bg 0 +hurryup 30 +help +endhelp +monsters +0 15 25 +134 20 25 +171 24 14 +171 34 14 +171 6 14 +171 9 3 +171 28 7 +171 2 25 +171 13 20 +133 25 11 +133 19 3 +133 2 16 +23 31 25 +60 32 20 +60 22 22 +endmonsters +exitdir 1 +74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74, +74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,75,75,75,74, +74,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,56,75,75,56,74,74,74,74,75,75,74,74,74,74,74,75,75,74,75,75,75,75,75,74, +74,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,74,74,74,74,75,75,74,74,74,74,74,75,75,74,74,75,75,75,75,74, +74,75,75,75,75,74,74,74,74,74,75,75,75,75,75,75,74,75,75,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,74,74,75,75,75,14,75,75,74,75,75,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,74,74,75,75,75,75,75,75,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74, +74,74,74,75,75,75,75,75,74,74,75,75,75,75,75,75,74,75,75,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,74,74,74,75,75,74, +74,75,75,75,75,75,75,75,74,74,75,75,75,75,75,75,74,75,75,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74, +74,75,75,75,75,75,75,75,74,74,75,75,75,75,75,75,74,75,75,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,56,74,74,74,56,75,75,56,74,74,74,74,74,74,74,56,75,75,56,74,74,74,74,74,56,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,74,74,74,75,75,74,74,56,74,74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,56,74,74,74, +74,75,75,75,75,74,74,74,75,75,74,74,74,74,74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +74,75,75,75,75,74,74,74,75,75,74,74,74,74,74,74,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,12,74,74, +74,75,75,75,75,74,74,74,75,75,74,74,74,74,74,74,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,13,74,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74, +74,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74, +74,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74, +74,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,56,75,75,56,74,74,74,74,74,74,74,74,74,74, +74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74, +74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74, +74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,74,74,74,74,74,74,74,74,74,74,74, +layer2 +3,0,56,layer3 +4,0,56,layer3 +27,0,56,layer3 +28,0,56,layer3 +17,5,56,layer3 +18,5,56,layer3 +17,6,56,layer3 +18,6,56,layer3 +18,7,56,layer3 +17,8,56,layer3 +17,9,56,layer3 +18,9,56,layer3 +17,10,56,layer3 +18,10,56,layer3 +17,11,56,layer3 +18,11,56,layer3 +17,12,56,layer3 +18,12,56,layer3 +13,13,56,layer3 +14,13,56,layer3 +15,13,56,layer3 +16,13,56,layer3 +17,13,56,layer3 +19,13,56,layer3 +20,13,56,layer3 +21,13,56,layer3 +22,13,56,layer3 +23,13,56,layer3 +25,13,56,layer3 +26,13,56,layer3 +27,13,56,layer3 +28,13,56,layer3 +29,13,56,layer3 +30,13,56,layer3 +31,13,56,layer3 +32,13,56,layer3 +34,13,56,layer3 +35,13,56,layer3 +13,14,56,layer3 +14,14,56,layer3 +15,14,56,layer3 +16,14,56,layer3 +18,14,56,layer3 +19,14,56,layer3 +20,14,56,layer3 +21,14,56,layer3 +22,14,56,layer3 +23,14,56,layer3 +24,14,56,layer3 +26,14,56,layer3 +27,14,56,layer3 +28,14,56,layer3 +29,14,56,layer3 +30,14,56,layer3 +31,14,56,layer3 +33,14,56,layer3 +34,14,56,layer3 +35,14,56,layer3 +17,15,56,layer3 +18,15,56,layer3 +17,16,56,layer3 +18,16,56,layer3 +17,17,56,layer3 +18,17,56,layer3 +17,18,56,layer3 +18,18,56,layer3 +18,19,56,layer3 +20,19,16 +21,19,16 +22,19,16 +23,19,16 +24,19,16 +25,19,16 +26,19,16 +27,19,16 +28,19,16 +29,19,16 +30,19,16 +31,19,16 +32,19,16 +33,19,16 +34,19,16 +35,19,16 +36,19,16 +37,19,16 +17,20,56,layer3 +20,20,15 +21,20,15 +22,20,15 +23,20,15 +24,20,15 +25,20,15 +26,20,15 +27,20,15 +28,20,15 +29,20,15 +30,20,15 +31,20,15 +32,20,15 +33,20,15 +34,20,15 +35,20,15 +36,20,15 +37,20,15 +11,21,8 +17,21,56,layer3 +18,21,56,layer3 +20,21,15 +21,21,15 +22,21,15 +23,21,15 +24,21,15 +25,21,15 +26,21,15 +27,21,15 +28,21,15 +29,21,15 +30,21,15 +31,21,15 +32,21,15 +33,21,15 +34,21,15 +35,21,15 +36,21,15 +37,21,15 +11,22,7 +17,22,56,layer3 +18,22,56,layer3 +20,22,15 +21,22,15 +22,22,15 +23,22,15 +24,22,15 +25,22,15 +26,22,15 +27,22,15 +28,22,15 +29,22,15 +30,22,15 +31,22,15 +32,22,15 +33,22,15 +34,22,15 +35,22,15 +36,22,15 +37,22,15 +11,23,7 +11,24,7 +11,25,7 +3,27,56,layer3 +4,27,56,layer3 +27,27,56,layer3 +28,27,56,layer3 +3,28,56,layer3 +4,28,56,layer3 +27,28,56,layer3 +28,28,56,layer3 +3,29,56,layer3 +4,29,56,layer3 +27,29,56,layer3 +28,29,56,layer3 diff --git a/data/levels/survivaltest.dat b/data/levels/survivaltest.dat new file mode 100644 index 0000000..59038c2 --- /dev/null +++ b/data/levels/survivaltest.dat @@ -0,0 +1,301 @@ +bgfile sky1.png +bg 0 +hurryup 30 +help +endhelp +monsters +157 3 28 +157 3 28 +157 3 28 +157 3 28 +157 3 28 +157 3 28 +157 3 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +157 35 28 +172 35 1 +172 31 1 +171 35 23 +171 3 23 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 9 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 30 28 +171 5 4 +171 5 7 +171 34 4 +171 34 7 +0 16 19 +134 26 19 +23 20 28 +endmonsters +exitdir 1 +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +layer2 +5,2,28 +6,2,28 +7,2,28 +8,2,28 +9,2,28 +10,2,28 +11,2,28 +12,2,28 +13,2,28 +14,2,28 +15,2,28 +16,2,28 +17,2,28 +18,2,28 +19,2,28 +20,2,28 +21,2,28 +22,2,28 +23,2,28 +24,2,28 +25,2,28 +26,2,28 +27,2,28 +28,2,28 +29,2,28 +30,2,28 +31,2,28 +32,2,28 +33,2,28 +34,2,28 +35,2,28 +36,2,28 +37,2,28 +38,2,28 +1,5,28 +2,5,28 +3,5,28 +4,5,28 +5,5,28 +6,5,28 +7,5,28 +8,5,28 +9,5,28 +10,5,28 +11,5,28 +12,5,28 +13,5,28 +14,5,28 +15,5,28 +16,5,28 +17,5,28 +18,5,28 +19,5,28 +20,5,28 +21,5,28 +22,5,28 +23,5,28 +24,5,28 +25,5,28 +26,5,28 +27,5,28 +28,5,28 +29,5,28 +30,5,28 +31,5,28 +32,5,28 +33,5,28 +34,5,28 +5,8,28 +6,8,28 +7,8,28 +8,8,28 +9,8,28 +10,8,28 +11,8,28 +12,8,28 +13,8,28 +14,8,28 +15,8,28 +16,8,28 +17,8,28 +18,8,28 +19,8,28 +20,8,28 +21,8,28 +22,8,28 +23,8,28 +24,8,28 +25,8,28 +26,8,28 +27,8,28 +28,8,28 +29,8,28 +30,8,28 +31,8,28 +32,8,28 +33,8,28 +34,8,28 +35,8,28 +36,8,28 +37,8,28 +38,8,28 +1,11,28 +2,11,28 +3,11,28 +4,11,28 +5,11,28 +6,11,28 +7,11,28 +8,11,28 +9,11,28 +10,11,28 +11,11,28 +12,11,28 +13,11,28 +14,11,28 +15,11,28 +16,11,28 +17,11,28 +18,11,28 +19,11,28 +20,11,28 +21,11,28 +22,11,28 +23,11,28 +24,11,28 +25,11,28 +26,11,28 +27,11,28 +28,11,28 +29,11,28 +30,11,28 +31,11,28 +32,11,28 +33,11,28 +34,11,28 +14,19,55 +28,19,54 +1,24,28 +2,24,28 +3,24,28 +4,24,28 +5,24,28 +6,24,28 +7,24,28 +8,24,28 +9,24,28 +10,24,28 +11,24,28 +12,24,28 +13,24,28 +14,24,28 +15,24,28 +16,24,28 +17,24,28 +18,24,28 +19,24,28 +20,24,28 +21,24,28 +22,24,28 +23,24,28 +24,24,28 +25,24,28 +26,24,28 +27,24,28 +28,24,28 +29,24,28 +30,24,28 +31,24,28 +32,24,28 +33,24,28 +34,24,28 +35,24,28 +36,24,28 +37,24,28 +38,24,28 +1,29,28 +2,29,28 +3,29,28 +4,29,28 +5,29,28 +6,29,28 +7,29,28 +8,29,28 +9,29,28 +10,29,28 +11,29,28 +12,29,28 +13,29,28 +14,29,28 +15,29,28 +16,29,28 +17,29,28 +18,29,28 +19,29,28 +20,29,28 +21,29,28 +22,29,28 +23,29,28 +24,29,28 +25,29,28 +26,29,28 +27,29,28 +28,29,28 +29,29,28 +30,29,28 +31,29,28 +32,29,28 +33,29,28 +34,29,28 +35,29,28 +36,29,28 +37,29,28 +38,29,28 diff --git a/data/levels/theasylum.dat b/data/levels/theasylum.dat new file mode 100644 index 0000000..ee062a7 --- /dev/null +++ b/data/levels/theasylum.dat @@ -0,0 +1,63 @@ +bgfile sky1.png +bg 0 +hurryup 30 +help +endhelp +monsters +132 37 28 +132 37 28 +132 37 28 +132 37 28 +132 37 28 +132 37 28 +132 37 28 45 463 45 462 45 462 45 462 45 462 45 462 45 462 45 462 +132 31 4 504 423 502 423 502 423 502 423 502 423 502 423 502 423 +132 7 26 120 71 121 71 121 71 121 71 121 71 +132 28 7 165 128 165 129 165 129 165 129 165 129 165 129 165 129 +132 10 23 454 384 454 383 454 383 454 383 454 383 454 383 454 383 454 383 +132 2 2 596 48 596 48 596 48 596 48 596 48 596 48 596 48 596 48 596 48 +6 34 11 +6 5 21 +6 37 22 +6 6 1 +133 27 15 +133 18 5 +133 17 26 +133 4 8 +0 17 11 +134 22 11 +172 36 1 +23 19 14 +endmonsters +exitdir 1 +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,0,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,0,0,0,0,0,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,0,0,0,0,0,0,0,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,69,68,68,68,70,72,71,71,71,73,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74,74,74,74,74,74,74,74,74,74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +74,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,74, +layer2 diff --git a/data/map.dat b/data/map.dat index e0e54b8..47d950a 100644 --- a/data/map.dat +++ b/data/map.dat @@ -92,6 +92,12 @@ 92,dontjump.dat,Don't jump! 93,crazyarchitect.dat,Crazy Architecture 94,batsinthebelfry.dat,Bats in the Belfry -98,theendsofar.dat,THE END SO FAR +95,survivaltest.dat,Survival Test +96,plumbingproblems.dat,Plumbing Problems +97,theasylum.dat,The Asylum +98,butterflystomach.dat,Butterfly Stomach +99,penultimatum.dat,Penultimatum +100,kingcat.dat,King Cat +101,theendsofar.dat,THE END SO FAR 102,testlevel.dat,TEST LEVEL 101,intro.dat,INTRO diff --git a/data/sprites/bigchest.png b/data/sprites/bigchest.png new file mode 100644 index 0000000..63314fc Binary files /dev/null and b/data/sprites/bigchest.png differ diff --git a/data/sprites/cattemp.png b/data/sprites/cattemp.png new file mode 100644 index 0000000..da615ac Binary files /dev/null and b/data/sprites/cattemp.png differ diff --git a/data/sprites/fallingbrick.png b/data/sprites/fallingbrick.png new file mode 100644 index 0000000..7f591bb Binary files /dev/null and b/data/sprites/fallingbrick.png differ diff --git a/data/sprites/kingcat.png b/data/sprites/kingcat.png new file mode 100644 index 0000000..df5bedd Binary files /dev/null and b/data/sprites/kingcat.png differ diff --git a/data/sprites/kingcatcaught.png b/data/sprites/kingcatcaught.png new file mode 100644 index 0000000..23054a2 Binary files /dev/null and b/data/sprites/kingcatcaught.png differ diff --git a/data/sprites/kingcatclimg1.png b/data/sprites/kingcatclimg1.png new file mode 100644 index 0000000..38f7a67 Binary files /dev/null and b/data/sprites/kingcatclimg1.png differ diff --git a/data/sprites/kingcatdead.png b/data/sprites/kingcatdead.png new file mode 100644 index 0000000..f909186 Binary files /dev/null and b/data/sprites/kingcatdead.png differ diff --git a/data/sprites/kingcatshoot.png b/data/sprites/kingcatshoot.png new file mode 100644 index 0000000..b239a41 Binary files /dev/null and b/data/sprites/kingcatshoot.png differ diff --git a/data/sprites/kingcatshoot2.png b/data/sprites/kingcatshoot2.png new file mode 100644 index 0000000..253623e Binary files /dev/null and b/data/sprites/kingcatshoot2.png differ diff --git a/data/sprites/kingcatwalk.png b/data/sprites/kingcatwalk.png new file mode 100644 index 0000000..e2b26d5 Binary files /dev/null and b/data/sprites/kingcatwalk.png differ diff --git a/data/sprites/leaf.png b/data/sprites/leaf.png new file mode 100644 index 0000000..5cfcfda Binary files /dev/null and b/data/sprites/leaf.png differ diff --git a/defs.h b/defs.h index 5cc61e1..d66056f 100644 --- a/defs.h +++ b/defs.h @@ -83,6 +83,7 @@ #define TEXTSIZE_PAUSED 50 #define TEXTSIZE_GAMEOVER 50 #define TEXTSIZE_HISCORE 16 +#define TEXTSIZE_ENDING 16 // text tuypes @@ -91,6 +92,7 @@ #define TT_HELPSHADOW 2 #define TT_INTROTEXT 3 #define TT_GAMEOVER 4 +#define TT_ENDING 5 // intro states @@ -126,11 +128,22 @@ #define DIEDELAY 80 #define HELPDELAY 80 #define LEVELDELAY 100 + +//#define ENDTEXTTIME 200 +#define ENDTEXTTIME 200 + // TODO: put back! #define GAMEOVERDELAY 200 //#define GAMEOVERDELAY 20 #define POKERDELAY 170 +enum ENDGAMETYPE { + EG_FRUITFALL = 1, + EG_FADEPAUSE, + EG_FADETOWHITE, + EG_FADETOBLACK, + EG_FINAL, +}; // Sizes #define TILEH 16 // tile width (in pixels) @@ -174,6 +187,8 @@ #define SHIELDTIME 600 // how long a shield lasts #define FALLSPEED 4 // terminal velocity of falling sprites #define UMBFALLSPEED 1 // terminal velocity of falling sprites with umbrella +#define ENDGAMEFALLSPEED 6 // terminal velocity of falling fruit + // at end of game #define SMALLNETSPEED 6 // how fast the player's net moves with skull #define NETSPEED 9 // how fast the player's net moves #define BIGNETSPEED 12 // how fast the player's net moves with bignet @@ -289,6 +304,33 @@ #define KAS_WALK2 6 #define KAS_JUMP2 7 + +// king cat +#define KC_WALKTIME 100 +#define KC_SPELLPAUSETIME 100 +#define KC_SPELLCASTTIME 102 +#define KC_TELETIME 75 +#define KC_BRICKTIME 10 +// king cat states +#define KCS_WALK 0 +#define KCS_SPELLPAUSE 1 +#define KCS_SPELLCAST 2 +#define KCS_STUN 3 + +// king cat spells +enum SPELL { + SPL_NONE = -1, + SPL_TELEPORT = 0, + SPL_SUMMON, + SPL_FIREBALLS, + SPL_WIND, + SPL_BRICKS, + SPL_LAST, +}; +#define MAXSPELLS 5 + + + // moth #define BAT_PAUSE 20 #define BAT_FIRESPACE 3 // space between shots @@ -307,7 +349,7 @@ // Limits -#define MAXLEVELS 102 +#define MAXLEVELS 103 #define MAXMAPPINGS 50 #define MAXMONSTERSPERLEVEL 150 #define MAXLETTERHEIGHT 100 @@ -339,6 +381,10 @@ #define B_TRUE -1 #define B_FALSE 0 +#define ALL -1 + +#define FOREVER -23 + // reasons for not being able to move #define NM_SIDE -1 #define NM_BELOW -2 @@ -454,7 +500,7 @@ #define S_SLOPE 2 // Sprite types -#define MAXPTYPES 174 +#define MAXPTYPES 178 #define P_PLAYER 0 #define P_RAT 1 #define P_CHEESE 2 @@ -634,6 +680,10 @@ #define P_WSPIDER 171 #define P_BAT 172 #define P_SONAR 173 +#define P_KINGCAT 174 +#define P_LEAF 175 +#define P_FALLINGBRICK 176 +#define P_BIGCHEST 177 #define FLY_FLYTIME 150 @@ -706,6 +756,11 @@ // "virtual" powerup for bosses #define PW_RATSHAKE 50 // shake screen horizontally #define PW_SNAILSHAKE 51 // shake screen vertically +#define PW_CATWIND 52 // blow players left/right +#define PW_CATBRICKS 53 // falling bricks from top +// end of game +#define PW_ENDGAME 54 + #define GUNNERSPEED 2.5 // speed crosshair moves in gunner mode #define GUNNERDELAY 10 // how fast gunner powerup shoots @@ -1060,6 +1115,8 @@ typedef struct sprite_s { int timer2; // int timer3; // int timer4; // + int timer5; // + int newx,newy; // for bosses int watertimer; // double dbltimer; @@ -1141,6 +1198,9 @@ extern int forcegoodcard; extern int nextforcegoodcard; extern int globpowerup; +extern int globtimer; + +extern int endgame; extern int curlevelnum; diff --git a/edit.c b/edit.c index bce7438..be8cb32 100644 --- a/edit.c +++ b/edit.c @@ -28,6 +28,7 @@ int modified = B_FALSE; // has the current level been modified since last save? int allowfruits = B_FALSE; +int globtimer = 0; int curlevelnum; diff --git a/rc.c b/rc.c index 93895ea..53d68cb 100644 --- a/rc.c +++ b/rc.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #ifdef WINDOWS @@ -34,11 +35,13 @@ SDL_Surface *temps; SDL_Surface *screen; SDL_Surface *credittext; +SDL_Surface *endgamebox; int lockcredits = B_FALSE; int globtimer; +int endgame = B_FALSE; int autoshot = B_FALSE; int shottaken = B_FALSE; @@ -149,6 +152,7 @@ int poweruptypes[] = { -1 }; + int fruittime = -1; int curfruittype = 0; int curpoweruptype[2]; @@ -186,10 +190,36 @@ SDL_Color white = {255, 255, 255, 0}; SDL_Color grey = {210, 210, 210, 0}; SDL_Color grey2 = {90, 90, 90, 0}; SDL_Color green = {0, 255, 0, 0}; +SDL_Color green1 = {0, 200, 0, 0}; SDL_Color green2 = {0, 150, 0, 0}; SDL_Color yellow = {255, 255, 0, 0}; SDL_Color greenish = {82, 125, 74, 0}; +char *endtext[] = { + "As the chest opens, a great light bursts forth...", + "A feast of purloined food rains from the sky!", + "The dwarven couple eagerly gather their spoils", + "and return in triumph to their castle", + "where a grand banquet awaits.", + " ", + "CONGRATULATIONS!", + NULL +}; + +SDL_Color *endtextcol[] = { + &green1, + &green1, + &green1, + &green1, + &green1, + &green1, + &green, + NULL +}; + +int endtextid = 0; +int endtexttimer = 0; +int endtexty = 0; int vidargs = 0; @@ -212,6 +242,10 @@ int main (int argc, char **argv) { sprintf(hiscoreserver, "ratcatcher.nethack.net"); hiscoreport = 80; + gamemode = GM_NORM; // default + showhelp = B_FALSE; // default + + // set program name (including version string) sprintf(progname, "Rat Catcher v0.%d", REV); @@ -237,6 +271,9 @@ int main (int argc, char **argv) { } else if (!strcmp(argv[i], "-as")) { printf("Automatic screenshot mode activated.\n"); autoshot = B_TRUE; + } else if (!strcmp(argv[i], "-t")) { + printf("Tutorial mode activated.\n"); + showhelp = B_TRUE; } else if (!strcmp(argv[i], "-l")) { if (++i >= argc) { printf("Missing level number.\n"); @@ -411,9 +448,12 @@ int main (int argc, char **argv) { paused = B_FALSE; - gamemode = GM_NORM; // default - showhelp = B_FALSE; // default - + endgamebox = SDL_CreateRGBSurface(SDL_SWSURFACE, + screen->w, + screen->h, + screen->format->BitsPerPixel, screen->format->Rmask, + screen->format->Gmask,screen->format->Bmask, 0); + SDL_FillRect(endgamebox, NULL, SDL_MapRGB(screen->format,white.r,white.g,white.b)); // try to get hiscores printf("Attepting to download hiscores from %s:%d...\n",hiscoreserver,hiscoreport); fflush(stdout); @@ -444,8 +484,6 @@ int main (int argc, char **argv) { // shuffle cards shufflecards(); - - startgame(); // main loop @@ -728,6 +766,23 @@ int main (int argc, char **argv) { } + + // endgame flash + if (globpowerup == PW_ENDGAME) { + int val; + SDL_Rect area; + area.x = 0; + area.y = 0; + area.w = 640; + area.h = 480; + + // screen fades from white to black + val = 255 - globtimer; + if (val < 0) val = 0; + + SDL_FillRect(screen, &area, SDL_MapRGB(screen->format, val, val, val)); + } + // camera flash if ((globpowerup == PW_CAMERA) && (cameraalpha)) { @@ -986,8 +1041,159 @@ int main (int argc, char **argv) { if (--globtimer == 0) { globpowerup = -1; } - } + } else if (globpowerup == PW_CATWIND) { + if (boss) { + // move players + if (player) { + movex(player, (double)boss->dir*1.5, B_FALSE); + } + if (player2) { + movex(player2, (double)boss->dir*1.5, B_FALSE); + } + if (countsprites(P_LEAF) < 10) { + int xx,yy,xs; + sprite_t *ss; + // add a leaf + if (boss->dir > 0) { + xx = TILEW/2; + xs = 10 + (rand() % 7); + } else { + xx = (LEVELW * TILEW) + (TILEW/2); + xs = -(10 + (rand() % 7)); + } + yy = rand() % (LEVELH * TILEH); + ss = addsprite(P_LEAF,xx, yy, "leaf" ); + ss->ys = 0; + ss->xs = xs; + ss->dir = boss->dir; + } + } else { + globpowerup = -1; + } + } else if (globpowerup == PW_CATBRICKS) { + if (boss) { + // shake screen + if (timer % 5 == 0) { + int amt; + SDL_Rect area; + + amt = (rand() % 20)+1; + + // offset screen upwards + area.x = 0; + area.y = amt; + area.w = 640; + area.h = 480-amt; + SDL_BlitSurface(screen, &area, screen, NULL); + + // fill in empty bit + area.x = 0; + area.y = 480-amt; + area.w = 640; + area.h = amt; + SDL_FillRect(screen, &area, SDL_MapRGB(screen->format,black.r,black.g,black.b)); + } + // drop bricks + if ((timer % KC_BRICKTIME) == 0) { + int i,tx,poss[LEVELW],nposs = 0; + tiletype_t *tt; +printf("timer = %d\n",timer); + // select a random top tile + for (i = 0; i < LEVELW; i++) { + tt = gettileat(i*TILEW,0, NULL, NULL); + if (tt && tt->solid) { + poss[nposs++] = i; + } + } + if (nposs) { + sprite_t *ss; + tx = poss[rand() % nposs]; + // destroy the tile + melttile(tx,0,REGROWTIMER_SHORT); + // add a falling brick + ss = addsprite(P_FALLINGBRICK, + (tx*TILEW) + (TILEW/2), TILEH,"fallingbrick"); + ss->ys = 1; + ss->xs = 0; + ss->dir = 1; // doesn't really matter + } else { + globpowerup = -1; + } + } + } else { + globpowerup = -1; + } + } else if (globpowerup == PW_ENDGAME) { + // timer will control background fade + if (globtimer < 1024) { + globtimer++; + } + + if (countfruits() < 10) { + sprite_t *ss; + int x,y; + // spawn a new fruit + x = (rand() % (640-(TILEW*2))) + TILEW; + y = 0; + ss = addsprite(fruittypes[curfruittype], x,y, "fruit_endgame"); + incfruittype(); + ss->xs = 0; + ss->ys = rand() % 2; + } + + if (endgame == EG_FADETOBLACK) { + int val; + + // screen fades out to black + SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, black.r, black.g, black.b)); + + val = 255 - globtimer; + if (val < 0) val = 0; + + + SDL_SetAlpha(endgamebox, SDL_SRCALPHA, val); + SDL_BlitSurface(endgamebox,NULL,screen,NULL); + if (val <= 0) { + // really finished now - back to title screen + gameover = B_TRUE; + // turn off cheat, for testing + skipto = -1; + } + } else if (endgame == EG_FADETOWHITE) { + int val; + // screen fades out to white + val = globtimer; + if (val > 255) val = 255; + + SDL_SetAlpha(endgamebox, SDL_SRCALPHA, val); + SDL_BlitSurface(endgamebox,NULL,screen,NULL); + if (val >= 255) { + endgame = EG_FADETOBLACK; + globtimer = 0; + } + } else if (endgame == EG_FRUITFALL) { + if (++endtexttimer >= ENDTEXTTIME) { + endtexttimer = 0; + + // display next ending text + if (endtext[endtextid]) { + addoutlinetext(320,endtexty,TEXTSIZE_ENDING, endtext[endtextid], + endtextcol[endtextid],&black,FOREVER,TT_ENDING); + endtextid++; + + endtexty += TTF_FontHeight(font[TEXTSIZE_ENDING]); + endtexty += 2; + } else { + // trigger very end of game + levelcomplete = LV_FINAL; + levelcompletetime = gtime; + endgame = EG_FADEPAUSE; + //gtime += 10; + } + } + } + } } /********************************************** @@ -1263,7 +1469,16 @@ void tick(void) { /* 5 seconds after level completion */ if (levelcomplete == LV_FINAL) { if (gtime - levelcompletetime >= 5) { - if (playersalive()) { + if (endgame == EG_FRUITFALL) { + // ... do nothing + } else if (endgame == EG_FADEPAUSE) { + endgame = EG_FADETOWHITE; + globtimer = 0; + } else if ((endgame == EG_FADETOWHITE) || (endgame == EG_FADETOBLACK)) { + // ... do nothing + } else if (endgame == EG_FINAL) { + // ... do nothing + } else if (playersalive()) { sprite_t *newsp; int x,y; levelcomplete = LV_CLOUD; @@ -1390,8 +1605,6 @@ void nextlevel(void) { // do the moving to next level transition (ie. scroll the screen) drawlevel(); - - // now the player gets invincibility if (!inintro()) { if (!cheat) { @@ -1521,7 +1734,10 @@ void nextlevel(void) { } if (cheat) { - if (player) player->speed = 2; + if (player) { + player->speed = 2; + player->netmax = 4; + } if (player2) player2->speed = 2; } @@ -1822,7 +2038,6 @@ void die(sprite_t *s) { } // reset powerup types - curpoweruptype[0] = 0; curpoweruptype[1] = 0; @@ -1891,6 +2106,9 @@ void die(sprite_t *s) { case P_KINGANT: addsprite(P_BIGHELMET, (640/2), 0, "bighelmet"); break; + case P_KINGCAT: + addsprite(P_BIGCHEST, (640/2), 0, "bigchest"); + break; } } else if ((s->id == P_SNAIL) && (s->lives > 0)) { // snails can't die but turn into slugs instead sprite_t *newsp; @@ -2007,6 +2225,21 @@ void checklevelend(void) { } } +int countfruits(void) { + sprite_t *s2; + int mcount; + mcount = 0; + for (s2 = sprite; s2 ; s2 = s2->next) { + if (!s2->dead) { + if (isfruit(s2->id)) { + mcount++; + } + } + } + + return mcount; +} + // count monsters of a given type (-1 for all) on level int countmonsters(int montype) { sprite_t *s2; @@ -2026,6 +2259,34 @@ int countmonsters(int montype) { return mcount; } +int counttextoftype(int wanttype) { + text_t *t; + int count = 0; + for (t = text ; t ; t = t->next) { + if (t->type == wanttype) { + count++; + } + } + return count; +} + +int countsprites(int montype) { + sprite_t *s2; + int mcount; + mcount = 0; + for (s2 = sprite; s2 ; s2 = s2->next) { + if (!s2->dead) { + if (s2->id != P_BLACKCLOUD) { + if ((montype == -1) || (s2->id == montype)) { + mcount++; + } + } + } + } + + return mcount; +} + // count of monsters left alive and uncaught int uncaughtmonsters(void) { sprite_t *s2; @@ -2046,6 +2307,7 @@ int uncaughtmonsters(void) { void cleanup(void) { int i; printf("commencing cleanup routine....\n"); + SDL_FreeSurface(endgamebox); SDL_FreeSurface(pausedtext); SDL_FreeSurface(pausedshadow); Mix_HaltMusic(); @@ -2058,6 +2320,16 @@ void cleanup(void) { printf("complete.\n"); } +sprite_t *getrandomaliveplayer() { + if (!playersalive()) return NULL; + if (player2 && (rand() & 2)) { + return player2; + } else if (player) { + return player; + } + return NULL; +} + int isonplatform(double x, double y) { sprite_t *s2; for (s2 = sprite ; s2 ; s2 = s2->next) { @@ -2140,10 +2412,7 @@ void checkfruitcollide (sprite_t *s) { setdefaults(s2); /* increment fruit type */ - curfruittype++; - if (fruittypes[curfruittype] == -1) { - curfruittype = 0; - } + incfruittype(); // fruit time fruittime = gtime; @@ -2338,26 +2607,33 @@ void checkcollide(sprite_t *s) { s2->willbecome = P_DIAMOND; die(s2); } else if (!s->invuln) { - // player dies (unless it was the initial black cloud) - if (s2->id != P_BLACKCLOUD) { - if ((s2->id == P_SNAIL) && (s2->invuln)) { - // snail shell doesn't hurt us - } else if (s->caughtby) { - // can't die while being slammed - if (!s->caughtby->slamming) { + if (s->umbrella && s->umbrellaup && isbullet(s2->id) && + (s2->id != P_BIGFIREBALL) && + (s2->y <= s->y - s->img->h) ) { + // umbrella will block most bullets, + // if they are above you + } else { + // player dies (unless it was the initial black cloud) + if (s2->id != P_BLACKCLOUD) { + if ((s2->id == P_SNAIL) && (s2->invuln)) { + // snail shell doesn't hurt us + } else if (s->caughtby) { + // can't die while being slammed + if (!s->caughtby->slamming) { + die(s); + } + } else { + printf("DB: player killed by %s\n",s2->name); fflush(stdout); die(s); } - } else { - printf("DB: player killed by %s\n",s2->name); fflush(stdout); - die(s); - } - } else { - // initial flashing black cloud doesn't kill player; - if ((s2->id == P_BLACKCLOUD) && (!s2->invuln)) { - die(s); - printf("DB: player killed by blackclodu\n"); fflush(stdout); - // play sound - playfx(FX_EVILLAUGH); + } else { + // initial flashing black cloud doesn't kill player; + if ((s2->id == P_BLACKCLOUD) && (!s2->invuln)) { + die(s); + printf("DB: player killed by blackclodu\n"); fflush(stdout); + // play sound + playfx(FX_EVILLAUGH); + } } } // add puffs if this was the cloud @@ -2966,6 +3242,7 @@ int movesprite(sprite_t *s) { case P_KINGSNAIL: case P_KINGFLY: case P_KINGANT: + case P_KINGCAT: boss = newsp; } @@ -3055,7 +3332,6 @@ int movesprite(sprite_t *s) { s->timer2 = -1; //this means we are counting down s->timer1 = POKERWAITTIME; - // hide non-used cards cardimg = imageset[P_FIRSTCARD].img[F_WALK1]; @@ -3174,19 +3450,24 @@ int movesprite(sprite_t *s) { // die s->dead = D_FINAL; } - } else if (s->id == P_METEOR) { // meteor + } else if ((s->id == P_METEOR) || (s->id == P_FALLINGBRICK)) { // meteor double oldy; - oldy = s->y; // fall to bottom of screen then die s->y = s->y + s->ys; - // if just appeared onscreen - if ((oldy < 0) && (s->y >= 0)) { - playfx(FX_METEOR); + if (s->id == P_FALLINGBRICK) { + // increase speed + s->ys += 0.2; } + // if just appeared onscreen + if (s->id == P_METEOR) { + if ((oldy < 0) && (s->y >= 0)) { + playfx(FX_METEOR); + } + } // if off screen if (s->y >= (480 + s->img->h)) { @@ -4709,6 +4990,251 @@ int movesprite(sprite_t *s) { s->timer3 = KA_SHOOTTIME; } } + } else if (s->id == P_KINGCAT) { + /* timer1 is state + + 0 == walk back and forth + timer2 counts down, at zero we change state + 1 == spell + + + */ + if (s->timer1 == KCS_WALK) { + + if (!s->falling) { + int move = B_FALSE; + int xdiff ,absxdiff; + tiletype_t *tunder; + + /* distance to closest player */ + xdiff = getxdisttoplayer(s, NULL); + absxdiff = abs(xdiff); + + // tile in front and below + tt = gettileat(s->x + s->dir*getspeed(s) + (s->dir * (s->img->w/2)),s->y + (TILEH/2),NULL,NULL); + // tile below + tunder = gettileat(s->x ,s->y + 1,NULL,NULL); + /* if there's a hole in front of us and below*/ + if (tt->solid == S_NOTSOLID) { + // we're on a slope + if (tunder->solid == S_SLOPE) { + move = B_TRUE; + } else { + if ((player && (player->y > s->y)) || (player2 && (player2->y > s->y))) { + /* if player is below, fall off */ + if (xdiff <= (TILEW*8)) { + move = B_TRUE; + } + } else if ((player && (player->y == s->y)) || (player2 && player2->y == s->y)) { + /* if player is at same level and close, jump */ + if ((s->dir == D_RIGHT) && (xdiff > 0) && (xdiff <= (TILEW*10))) { + jump(s,D_RIGHT); + } else if ((s->dir == D_LEFT) && (xdiff < 0) && (xdiff >= -(TILEW*10))) { + jump(s,D_LEFT); + } + } else if (level->bottomopen && (s->y >= (480 - 100)) && isplayerabove(s)) { + // if near bottom of the screen and can fall through... + move = B_TRUE; + } + } + } else { + move = B_TRUE; + } + + if (globpowerup == PW_CAMERA) { + move = B_TRUE; + } + + /* either move or turn around */ + if (move) { + rv = movex(s, s->dir*getspeed(s), B_TRUE); + if (rv) { + /* if we couldn't move (hit a wall), turn */ + s->dir = -s->dir; + } + } else { + s->dir = -s->dir; + } + + if ((!s->jumping) && (!s->jumptimer)) { + /* if player is above us, jump */ + if ( (player && (!player->dead) && (player->y < s->y)) || + (player2 && (!player2->dead) && (player2->y < s->y))) { + if ((xdiff >= (TILEW*2)) && (xdiff <= (TILEW*7))) { + /* jump right */ + jump(s, 1); + } else if ((xdiff <= -(TILEW*2)) && (xdiff >= -(TILEW*7))) { + /* jump left */ + jump(s, -1); + } else if ((player && (s->y - player->y <= (TILEH*6))) || + (player2 && (s->y - player2->y <= (TILEH*6)))) { + if ((xdiff >= 0) && (xdiff < (TILEW*4))) { + /* jump up */ + jump(s, 0); + } else if ((xdiff <= 0) && (xdiff > -(TILEW*4))) { + /* jump up */ + jump(s, 0); + } + } else { + /* jump whichever way we're facing */ + /* + s->jumpdir = s->dir; + s->jumping = 1; + s->jumpspeed = 5; + */ + } + } + } + } else { // falling + tiletype_t *tunder, *t2under; + + // tile below + tunder = gettileat(s->x ,s->y,NULL,NULL); + t2under = gettileat(s->x ,s->y+s->img->h,NULL,NULL); + if ((tunder->solid == S_SLOPE) || (t2under->solid == S_SLOPE)) { + movex(s, s->dir*getspeed(s), B_TRUE); + } else if (s->jumpdir) { + movex(s, s->jumpdir*getspeed(s), B_TRUE); + } + } + + // inc timer + if (s->timer2 == KC_WALKTIME) { + if (!playersalive()) { + // reset timer + s->timer2 = 0; + } else if (!s->jumping && !s->falling) { + // cast a spell + //TODO: sfx + s->timer1 = KCS_SPELLPAUSE; + s->timer2 = KC_SPELLPAUSETIME; + } + // otherwise wait until we're not jumping/falling + } else { + s->timer2++; + } + } else if (s->timer1 == KCS_SPELLPAUSE) { + // go to pause frame... + if (timer % 2 == 0) { + // add puffs above + puffin(-1, s->x + (rand() % (s->img->w)) - (s->img->w/2), + s->y - (s->img->h) + (rand() % TILEH) - (TILEH/2), "nothing", rand() % 5); + } + + s->timer2--; + if (s->timer2 <= 0) { + //CHARGE + selectspell(s); + } + + } else if (s->timer1 == KCS_SPELLCAST) { + if (s->timer3 == SPL_TELEPORT) { + // move to player + if (s->timer4 < KC_TELETIME) { + // add random puff at destination + puffin(-1, s->newx + (rand() % s->img->w) - (s->img->w/2), + s->newy - (rand() % s->img->h), "nothing", rand() % 5); + s->timer4++; + } else { + int x,y; + // cover destination with puffs + for (y = s->newy - s->img->h; y < s->newy; y += TILEH) { + for (x = s->newx - (s->img->w/2); x < s->newx + (s->img->w/2); x += TILEW) { + puffin(-1, x, y, "nothing", 0); + } + } + // teleport! + s->x = s->newx; + s->y = s->newy; + // finished + s->timer2 = 0; + } + } else if (s->timer3 == SPL_SUMMON) { + // summon monsters + int numsummon = 5,i; + if (s->timer2 == KC_SPELLCASTTIME) { // ie. once only. + for (i = 0; i < numsummon; i++) { + tiletype_t *tt = NULL; + int x = -1,y = -1; + int tooclose = B_TRUE; + while ((x == -1) || (y == -1) || !tt || tt->solid || tooclose) { + sprite_t *closeplayer = NULL; + tooclose = B_FALSE; + x = ((rand() % (LEVELW-1)) * TILEW) + (TILEW/2); + y = ((rand() % (LEVELH-1)) * TILEH) + (TILEH/2); + tt = gettileat(x, y, NULL, NULL); + closeplayer = getclosestplayerxy(x, y); + if (closeplayer) { + double dist; + dist = getdistance(x, y, closeplayer->x, closeplayer->y); + if (dist <= (5*TILEW)) { + // too close + tooclose = B_TRUE; + } + } + } + + puffin(randommonster(), x, y, "randmonster", 0); + } + } + + + // delay before finishing. + if (s->timer2) s->timer2--; + } else if (s->timer3 == SPL_FIREBALLS) { + if (s->timer2 == KC_SPELLCASTTIME) { // ie. once only. + int dir; + playfx(FX_METEOR); + for (dir = -1; dir <= 1; dir += 2) { + sprite_t *ss; + // horz + ss = addsprite(P_BIGFIREBALL,s->x,s->y - (s->img->h / 2) ,"horzfireball" ); + ss->ys = 0; + ss->xs = dir * 4; + ss->dir = dir; + // up + ss = addsprite(P_BIGFIREBALL,s->x,s->y - (s->img->h / 2) ,"up_horzfireball" ); + ss->ys = -2; + ss->xs = dir * 4; + ss->dir = dir; + // down + ss = addsprite(P_BIGFIREBALL,s->x,s->y - (s->img->h / 2) ,"down_horzfireball" ); + ss->ys = 2; + ss->xs = dir * 4; + ss->dir = dir; + } + } + s->timer2--; + } else if (s->timer3 == SPL_WIND) { + globpowerup = PW_CATWIND; + s->timer2--; + } else if (s->timer3 == SPL_BRICKS) { + globpowerup = PW_CATBRICKS; + s->timer2--; + } + + + // timer2 will become 0 once spell is finished. + if (s->timer2 <= 0) { + // turn off spell effects + + switch (s->timer3) { + case SPL_WIND: + case SPL_BRICKS: + globpowerup = -1; + break; + default: break; + } + + // back to walking. + s->timer1 = KCS_WALK; + s->timer2 = 0; + s->timer3 = 0; + s->timer4 = 0; + } + } + + } else if (s->id == P_PLATFORM) { // moving platform // timer1 tells whether we are at top speed double dstx,dsty; @@ -5764,6 +6290,7 @@ int movesprite(sprite_t *s) { int yyy,tx,ty; // move s->x += s->xs; + s->y += s->ys; // melt any ice bridges it touches for (yyy = s->y - s->img->h ; yyy < s->y ; yyy += 4) { @@ -5779,6 +6306,16 @@ int movesprite(sprite_t *s) { } else if (s->x <= TILEW) { s->dead = D_FINAL; } + } else if (s->id == P_LEAF) { // blowing leaf + s->x = s->x + s->xs; + s->y = s->y + s->ys; + + // if off screen + if ((s->xs > 0) && (s->x >= (640 - s->img->w))) { + s->dead = D_FINAL; + } else if ((s->xs < 0) && (s->x <= (s->img->w))) { + s->dead = D_FINAL; + } } else if (s->id == P_SONAR) { // timer1 = frame // update frame @@ -6117,6 +6654,21 @@ int movesprite(sprite_t *s) { } } + // at endgame, fruits fall down + if (isfruit(s->id) && endgame) { + s->y = s->y + s->ys; + + // increase speed + s->ys += 0.2; + if (s->ys > ENDGAMEFALLSPEED) s->ys = ENDGAMEFALLSPEED; + + // if off screen + if (s->y >= (480 + s->img->h)) { + // die + s->dead = D_FINAL; + } + } + return B_FALSE; } @@ -6234,7 +6786,7 @@ void dotileeffects(sprite_t *s) { } else if (tt->spikes) { if (!isfruit(s->id) ) { if (!s->invuln) { - if ((s->id != P_BLACKCLOUD) && (s->id != P_KINGSNAIL)) { + if ((s->id != P_BLACKCLOUD) && (s->id != P_KINGSNAIL) && (s->id != P_KINGCAT)) { die(s); printf("DB: killed by spikes\n"); fflush(stdout); } @@ -6398,7 +6950,6 @@ void drawlevel(void) { } } - // initialise values so we don't accidentally use them // uninitialied... for (i = 0; i < 2; i++) { @@ -6946,6 +7497,8 @@ double getspeed(sprite_t *s ) { speed = 1.5; } else if (id == P_KINGFLY) { speed = 2; + } else if (id == P_KINGCAT) { + speed = 2; } else if (id == P_PLATFORM) { speed = PLATFORM_MAXSPEED; } @@ -7004,7 +7557,6 @@ int addtext(int x, int y, int size, char *string, SDL_Color *c, int delay, int t fflush(stdout); } - t->next = NULL; lasttext = t; @@ -7597,6 +8149,15 @@ void removenetting(sprite_t *s) { } } +int randommonster(void) { + switch (rand() % 4) { + case 0: return P_RAT; + case 1: return P_BEE; + case 2: return P_ANT2; + case 3: return P_WSPIDER; + } + return P_RAT; +} void removesprite(sprite_t *s) { int startx,starty,endx,endy; @@ -7758,6 +8319,7 @@ int isroofnabove(sprite_t *s, int howfar) { int ypos; ypos = s->y - s->img->h - TILEH*(howfar-1); + if (ypos < 0) return B_TRUE; /* get tile above sprite's head */ tt = gettileat(s->x, ypos,NULL,NULL); @@ -7800,12 +8362,12 @@ int isonground(sprite_t *s) { //if (s->falling && s->id == P_KINGRAT) { if (s->id == P_KINGRAT) { - if (isongroundpoint(s, s->x + s->img->w/2, s->y)) { - return B_TRUE; - } - if (isongroundpoint(s, s->x - s->img->w/2, s->y)) { - return B_TRUE; - } + if (isongroundpoint(s, s->x + s->img->w/2, s->y)) { + return B_TRUE; + } + if (isongroundpoint(s, s->x - s->img->w/2, s->y)) { + return B_TRUE; + } } return B_FALSE; @@ -7926,8 +8488,6 @@ void dogravity(sprite_t *s) { } - - if (s->dead) return; // update flashing bosses @@ -8031,7 +8591,6 @@ void dogravity(sprite_t *s) { attop = B_TRUE; } - //if (isonground(s)) { if (isongroundpoint(s, s->x, s->y)) { if (!isongroundpoint(s, s->x, s->y-1)) { attop = B_TRUE; @@ -8148,7 +8707,6 @@ void dogravity(sprite_t *s) { } if (ontheground) { - // reset doublejump if (s->doublejump) { s->useddoublejump = B_FALSE; @@ -8244,7 +8802,9 @@ void dogravity(sprite_t *s) { } } - if (s->id == P_FLY) { + if (endgame && isplayer(s)) { + // don't fall + } else if (s->id == P_FLY) { // constant speed - we are flying down, not falling s->y += getspeed(s); } else { @@ -8452,10 +9012,8 @@ void dogravity(sprite_t *s) { } else { s2->willbecome = fruittypes[curfruittype]; /* increment fruit type */ - curfruittype++; - if (fruittypes[curfruittype] == -1) { - curfruittype = 0; - } + incfruittype(); + // fruit time fruittime = gtime; } @@ -8580,7 +9138,7 @@ void dogravity(sprite_t *s) { // if anyone is alive and not fast isn't fast, give a speed. if (forcespeed) { s2->willbecome = P_SPEED; - } else if (!gotcard & (gotsomething >= 4)) { // card for killing 5 at once + } else if (!gotcard & (gotsomething >= 4)) { // card for killing 4 at once s2->willbecome = getrandomcard(); gotcard = B_TRUE; } else if (!gotcard && (rand() % 5 == 0)) { // random chance of a card @@ -8609,10 +9167,7 @@ void dogravity(sprite_t *s) { } else { /* will become a fruit when it finishes dying */ s2->willbecome = fruittypes[curfruittype]; - /* increment fruit type */ - if (fruittypes[++curfruittype] == -1) { - curfruittype = 0; - } + incfruittype(); fruittime = gtime; } } @@ -8946,6 +9501,40 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) { player2->id = P_ARMOUR; // change how the player looks } return B_TRUE; + } else if (s->id == P_BIGCHEST) { // trigger endgame! + int tx,ty; + sprite_t *s2,*nexts; + endgame = EG_FRUITFALL; + endtexttimer = 0; + endtexty = 120; + + // kill all monsters + for (s2 = sprite; s2 ; s2 = nexts) { + nexts = s2->next; + if (isbullet(s2->id) || ismonster(s2->id)) { + s2->dead = D_FINAL; + } + } + globpowerup = PW_ENDGAME; + globtimer = 0; + // all tiles become fruit + for (ty = 0 ; ty < LEVELH; ty++) { + for (tx = 0 ; tx < LEVELW; tx++) { + tiletype_t *tt; + tt = gettileat(tx*TILEW,ty*TILEH, NULL, NULL); + if (tt->id != T_BLANK) { + sprite_t *sp; + melttile(tx, ty, FOREVER); + sp = addsprite(fruittypes[curfruittype], + tx * TILEW + (TILEW/2), + ty * TILEH + (TILEH/2), "end_fruit"); + incfruittype(); + + sp->xs = 0; + sp->ys = (rand() % 2); + } + } + } } else if (s->id == P_NUMNETS) { playfx(FX_POWERUP); if (pp->netmax < 4) { @@ -10400,6 +10989,8 @@ int getmonjumpspeed(sprite_t *s ) { } case P_KINGSNAIL: return 3; + case P_KINGCAT: + return 7; default: return MONJUMPSPEED; } @@ -10575,12 +11166,16 @@ void getfruit(sprite_t *giveto, sprite_t *fruit, int multiplier) { if (multiplier <= 1) { addcommas(tempm, modscore); //sprintf(tempm, "%d", modscore); - addoutlinetext(fruit->x,fruit->y - fruit->img->h/2, TEXTSIZE_POINTS, tempm, col,bgcol,POINTSDELAY,TT_NORM); + if (modscore > 0) { + addoutlinetext(fruit->x,fruit->y - fruit->img->h/2, TEXTSIZE_POINTS, tempm, col,bgcol,POINTSDELAY,TT_NORM); + } } else { addcommas(tempm, modscore); sprintf(tempm2, "%s x %d" , tempm,multiplier); - addoutlinetext(fruit->x,fruit->y - fruit->img->h/2, TEXTSIZE_POINTS + 2*multiplier, tempm2, col,bgcol,POINTSDELAY,TT_NORM); + if (modscore > 0) { + addoutlinetext(fruit->x,fruit->y - fruit->img->h/2, TEXTSIZE_POINTS + 2*multiplier, tempm2, col,bgcol,POINTSDELAY,TT_NORM); + } } // last goin coin is special... @@ -11494,6 +12089,7 @@ if (cheat) { } if (keydown(0, SDLK_v)) { // cheat if (toggletimer == 0) { + addsprite(P_BIGCHEST, (640/2), 0, "bigchest"); // all powerups playfx(FX_POWERUP); sprintf(tempm, "Cheat!"); @@ -11691,8 +12287,6 @@ if (cheat) { /* ************************************************************ Player movement ************************************************************/ - - if ((!inintro()) && !paused && (!levelcomplete != LV_DOPOKER) ) { // is cloud touching the player? if (levelcomplete == LV_CLOUD) { @@ -11772,7 +12366,6 @@ void swimup(sprite_t *pl) { } void swimdown(sprite_t *pl) { - if (pl->moved & MV_SWIM) { return; } @@ -12472,6 +13065,8 @@ void startgame(void) { forcegold = B_FALSE; forcegoldlev = -1; + endgame = B_FALSE; + curfruittype = 0; curpoweruptype[0] = 0; curpoweruptype[1] = 0; @@ -13520,7 +14115,7 @@ void doplayermovement(sprite_t *pl) { if (pl->caughtby) return; - + if (pl->powerup == PW_GUNNER) { // move crosshairs if (keydown(pnum,KEY_RIGHT)) { @@ -13586,7 +14181,14 @@ void doplayermovement(sprite_t *pl) { } if (keydown(pnum,KEY_UP)) { - if ((pl->swimming) && (pl->hasmask)) { + if (endgame) { + int spd; + spd = getspeed(pl)/2; + if (spd < 1) spd = 1; + // drift upwards + if (!isroofabove(pl)) pl->y -= spd; + pl->moved = MV_FLY; + } else if ((pl->swimming) && (pl->hasmask)) { // swimming swimup(pl); } else if (!pl->netting && !pl->slamming && !pl->jumping) { @@ -13626,7 +14228,14 @@ void doplayermovement(sprite_t *pl) { if (pl->umbrella) pl->umbrellaup = B_FALSE; } if (keydown(pnum,KEY_DOWN)) { - if ((pl->swimming) && (pl->hasmask)) { + if (endgame) { + int spd; + spd = getspeed(pl)/2; + if (spd < 1) spd = 1; + // drift downwards + if (pl->y < 480-spd) pl->y += spd; + pl->moved = MV_FLY; + } else if ((pl->swimming) && (pl->hasmask)) { // swimming swimdown(pl); } else if (!pl->netting && !pl->slamming && !pl->jumping) { @@ -13702,6 +14311,31 @@ sprite_t *getclosestplayer(sprite_t *s) { return closest; } +sprite_t *getclosestplayerxy(int x, int y) { + double xdiff1,xdiff2,ydiff1,ydiff2,diff1,diff2; + sprite_t *closest = NULL; + // closest player + if (player && !player->dead) { + xdiff1 = abs(player->x - x); + ydiff1 = abs(player->y - y); + diff1 = xdiff1 + ydiff1; + closest = player; + } else { + diff1 = 9999; + } + + if (player2 && !player2->dead) { + xdiff2 = abs(player2->x - x); + ydiff2 = abs(player2->y - y); + diff2 = xdiff2 + ydiff2; + if (closest == NULL) closest = player2; + else if (closest == player) { + if (diff2 > diff1) closest = player2; + } + } + return closest; +} + double getxdisttoplayer(sprite_t *s, sprite_t **pl) { double xdiff1,xdiff2,xdiff = 9999; if (globpowerup == PW_CAMERA) return 9999; @@ -14160,18 +14794,93 @@ int savebmp(SDL_Surface *which) { } void melttile(int tx, int ty,int howlong) { - if (numregrow >= (MAXREGROW-1)) { return; } - regrow[numregrow].tx = tx; - regrow[numregrow].ty = ty; - regrow[numregrow].origid = curlevel->map[ty * LEVELW + tx ]; - regrow[numregrow].timer = howlong; - numregrow++; + if (howlong != FOREVER) { + regrow[numregrow].tx = tx; + regrow[numregrow].ty = ty; + regrow[numregrow].origid = curlevel->map[ty * LEVELW + tx ]; + regrow[numregrow].timer = howlong; + numregrow++; + } curlevel->map[ty * LEVELW + tx ] = getuniq(T_BLANK); drawtile(temps, tx,ty); puffin(-1, tx*TILEW+(TILEW/2), ty*TILEH+TILEH, "nothing", 0); } + + +// select a random spell for king cat +void selectspell(sprite_t *s) { + // select spell + s->timer1 = KCS_SPELLCAST; + + // defaults + s->timer2 = KC_SPELLCASTTIME; + s->timer4 = 0; // for spell effects + + if (s->timer5 >= 2) { + s->timer3 = SPL_TELEPORT; + } else if (countmonsters(ALL) <= 2) { + // if there aren't anough monsters, summon + // some more. + s->timer3 = SPL_SUMMON; + } else { // random spell + enum SPELL poss[SPL_LAST]; + int nposs = 0; + + ///////////////////////////////////// + // add all possible spells to a list + ///////////////////////////////////// + + // only possible if a player is alive + if (getrandomaliveplayer()) { + poss[nposs++] = SPL_TELEPORT; + } + // always possible + poss[nposs++] = SPL_WIND; + poss[nposs++] = SPL_FIREBALLS; + poss[nposs++] = SPL_BRICKS; + + // select one of them + if (!nposs) { + s->timer3 = SPL_NONE; + } else { + s->timer3 = poss[rand() % nposs]; + } + } + + // test... + //s->timer3 = SPL_BRICKS; + + // fill in characteristics for spell + if (s->timer3 == SPL_TELEPORT) { + sprite_t *who = NULL; + who = getrandomaliveplayer(); + if (who) { + s->newx = who->x; + s->newy = who->y; + } else { + // abort spell. back to walking. + s->timer1 = KCS_WALK; + s->timer2 = 0; + } + } else if (s->timer3 == SPL_WIND) { + s->timer2 = KC_SPELLCASTTIME*3; + } else if (s->timer3 == SPL_BRICKS) { + s->timer2 = KC_SPELLCASTTIME*3; + } + + // inc teleport timer - when this reaches 2 we + // will do a teleport. + s->timer5++; +} + +void incfruittype(void) { + curfruittype++; + if (fruittypes[curfruittype] == -1) { + curfruittype = 0; + } +} diff --git a/rc.h b/rc.h index 2213007..15bd624 100644 --- a/rc.h +++ b/rc.h @@ -7,6 +7,7 @@ void drawtext(void); void movetext(void); void removeall(void); void drawlevel(void); +int randommonster(void); void removesprite(sprite_t *s); void removenetting(sprite_t *s); void drawnetting(sprite_t *s); @@ -47,7 +48,10 @@ void channeldone(int channel); int moveto(sprite_t *p, int dstx, int dsty, double xspeed,double yspeed); SDL_Surface *grabbehind(sprite_t *s, SDL_Surface *surf); void dumpsprites(void); +int countfruits(void); int countmonsters(int montype); +int countsprites(int montype); +int counttextoftype(int wanttype); int getpoints(int id); int isladder(int tid); char *addcommas(char *buffer, long num); @@ -114,6 +118,7 @@ void swimdown(sprite_t *pl); double getdistance(double x1, double y1, double x2, double y2); void doplayermovement(sprite_t *pl); sprite_t *getclosestplayer(sprite_t *s); +sprite_t *getclosestplayerxy(int x, int y); double getxdisttoplayer(sprite_t *s, sprite_t **pl); double getydisttoplayer(sprite_t *s); int playersalive(void); @@ -132,6 +137,7 @@ SDL_Color *getbgcolour(int id); void dointroseq(void); int addcredit(void); int getpnum(sprite_t *s); +sprite_t *getrandomaliveplayer(void); int isonplatform(double x, double y); int countbabies(sprite_t *s, int babytype); int isice(int id); @@ -139,3 +145,5 @@ int isconveyor(int id); int isbridge(int id); int savebmp(SDL_Surface *which); void melttile(int tx,int ty, int howlong); +void selectspell(sprite_t *s); +void incfruittype(void); diff --git a/shared.c b/shared.c index b68a09a..fdd7a2c 100644 --- a/shared.c +++ b/shared.c @@ -820,6 +820,7 @@ void setdefaults(sprite_t *s) { s->timer2 = 0; s->timer3 = 0; s->timer4 = 0; + s->timer5 = 0; s->dbltimer = -1; s->dropping = 0; @@ -883,6 +884,14 @@ void setdefaults(sprite_t *s) { s->timer1 = KAS_WALK1; s->timer2 = KA_WALKTIME; s->timer3 = KA_SHOOTTIME; + } else if (s->id == P_KINGCAT) { + s->timer1 = KCS_WALK; // state + s->timer2 = 0; // timer between states + s->timer3 = 0; // selected spell + s->timer4 = 0; // spell timer + s->timer5 = 0; // used to control teleporting every 3 spells + s->newx = -1; + s->newy = -1; } else if (s->id == P_BAT) { s->timer1 = BS_FLY; s->timer2 = D_NONE; @@ -959,7 +968,6 @@ sprite_t *addsprite(int id, int x, int y, char *name ) { } } - if (s->id == P_BLACKCLOUD) { s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,0.1,0.1,0); } else if (s->id == P_PINKCLOUD) { @@ -1478,6 +1486,7 @@ int loadimagesets(void) { loadspriteimage(P_WSPIDER,F_CLIMB2, "sprites/whitespiderclimb1.png"); imageset[P_WSPIDER].numimages = 10; + loadspriteimage(P_BAT,F_WALK1, "sprites/bat.png"); loadspriteimage(P_BAT,F_JUMP, "sprites/bat1.png"); loadspriteimage(P_BAT,F_FALL, "sprites/bat1.png"); @@ -1580,6 +1589,17 @@ int loadimagesets(void) { /* next 3 are auto generated */ imageset[P_SLUG].numimages = 8; + loadspriteimage(P_KINGCAT,F_WALK1, "sprites/kingcat.png"); + loadspriteimage(P_KINGCAT,F_JUMP, "sprites/kingcatwalk.png"); + loadspriteimage(P_KINGCAT,F_FALL, "sprites/kingcatwalk.png"); + loadspriteimage(P_KINGCAT,F_CAUGHT, "sprites/kingcatcaught.png"); + loadspriteimage(P_KINGCAT,F_DEAD, "sprites/kingcatdead.png"); + /* next 3 are auto generated */ + loadspriteimage(P_KINGCAT,F_CLIMB1, "sprites/kingcatshoot.png"); + loadspriteimage(P_KINGCAT,F_CLIMB2, "sprites/kingcatshoot2.png"); + imageset[P_KINGCAT].numimages = 10; + + /* fruits / powerups */ loadspriteimage(P_CHEESE,F_WALK1, "sprites/cheese.png"); imageset[P_CHEESE].numimages = 1; @@ -1823,6 +1843,15 @@ int loadimagesets(void) { loadspriteimage(P_ZAPPOWERUP,F_WALK1, "sprites/zapper.png"); imageset[P_ZAPPOWERUP].numimages = 1; + loadspriteimage(P_LEAF,F_WALK1, "sprites/leaf.png"); + imageset[P_LEAF].numimages = 1; + + loadspriteimage(P_FALLINGBRICK,F_WALK1, "sprites/fallingbrick.png"); + imageset[P_FALLINGBRICK].numimages = 1; + + loadspriteimage(P_BIGCHEST,F_WALK1, "sprites/bigchest.png"); + imageset[P_BIGCHEST].numimages = 1; + // moving platforms loadspriteimage(P_PLATFORM,F_WALK1, "sprites/platform.png"); imageset[P_PLATFORM].numimages = 1; @@ -1909,7 +1938,8 @@ int loadimagesets(void) { // HEARTS loadspriteimage(P_FIRSTHEART+i-1, F_WALK1, "sprites/cardh.png"); - sprintf(str, "%s",getcardletter(i)); + //sprintf(str, "%s",getcardletter(i)); + strcpy(str, getcardletter(i)); letter = TTF_RenderText_Blended(cardfont, str, red ); area.x = CARDFONTX; area.y = CARDFONTY; area.w = 0; area.h = 0; if (i == 10) area.x -= 3; @@ -1918,7 +1948,8 @@ int loadimagesets(void) { SDL_FreeSurface(letter); // DIAMONDS loadspriteimage(P_FIRSTDIAMOND+i-1, F_WALK1, "sprites/cardd.png"); - sprintf(str, "%s",getcardletter(i)); + //sprintf(str, "%s",getcardletter(i)); + strcpy(str, getcardletter(i)); letter = TTF_RenderText_Blended(cardfont, str, red ); area.x = CARDFONTX; area.y = CARDFONTY; area.w = 0; area.h = 0; if (i == 10) area.x -= 3; @@ -1927,7 +1958,8 @@ int loadimagesets(void) { SDL_FreeSurface(letter); // SPADES loadspriteimage(P_FIRSTSPADE+i-1, F_WALK1, "sprites/cards.png"); - sprintf(str, "%s",getcardletter(i)); + //sprintf(str, "%s",getcardletter(i)); + strcpy(str, getcardletter(i)); letter = TTF_RenderText_Blended(cardfont, str, black ); area.x = CARDFONTX; area.y = CARDFONTY; area.w = 0; area.h = 0; if (i == 10) area.x -= 3; @@ -1936,7 +1968,8 @@ int loadimagesets(void) { SDL_FreeSurface(letter); // CLUBS loadspriteimage(P_FIRSTCLUB+i-1, F_WALK1, "sprites/cardc.png"); - sprintf(str, "%s",getcardletter(i)); + //sprintf(str, "%s",getcardletter(i)); + strcpy(str, getcardletter(i)); letter = TTF_RenderText_Blended(cardfont, str, black ); area.x = CARDFONTX; area.y = CARDFONTY; area.w = 0; area.h = 0; if (i == 10) area.x -= 3; @@ -2151,6 +2184,9 @@ void drawsprite(sprite_t *s) { } else if (isbullet(s->id)) { if (s->id == P_SONAR) { frame = s->timer1; + } else if (s->id == P_FALLINGBRICK) { + // only 1 frame + frame = F_WALK1; } else { if ((timer/6) % 2 == 0) { frame = F_WALK1; @@ -2251,6 +2287,24 @@ void drawsprite(sprite_t *s) { frame = F_JUMP; break; } + } else if (s->id == P_KINGCAT) { + // frame based on state + switch (s->timer1) { + case KCS_WALK: + default: + if ((timer/12) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } + break; + case KCS_SPELLPAUSE: + frame = F_CLIMB1; + break; + case KCS_SPELLCAST: + frame = F_CLIMB2; + break; + } } else if (s->caughtby) { frame = F_CAUGHT; } else if (s->climbing) { @@ -2796,6 +2850,7 @@ int isfruit(int id) { case P_BIGSCUBA: case P_SUPERUMBRELLA: case P_BIGHELMET: + case P_BIGCHEST: return FT_SUPER; /* permenant powerups */ case P_SPEED: @@ -2875,6 +2930,7 @@ int isbullet(int id) { if (id == P_FIREBALL) return B_TRUE; if (id == P_BIGFIREBALL) return B_TRUE; if (id == P_SONAR) return B_TRUE; + if (id == P_FALLINGBRICK) return B_TRUE; return B_FALSE; } @@ -2909,6 +2965,7 @@ int iseffect(int id) { case P_FIVECARDS: case P_PLATFORM: case P_RAYGUNBULLET: + case P_LEAF: // these last ones aren't REALLY effects since they never have a sprite allocated case P_WINGLEFT: case P_WINGRIGHT: @@ -3219,6 +3276,8 @@ void drawtile(SDL_Surface *where, int x, int y) { area.h = TILEH; /* draw blank tile first */ tt = gettile(curlevel->bgtileid); + + // use level background SDL_BlitSurface(levelbg, &area, where, &area); /* now draw layer 1 tile */ @@ -3248,7 +3307,6 @@ void drawtile(SDL_Surface *where, int x, int y) { } } - } @@ -3352,6 +3410,7 @@ int ismonster(int id) { case P_KINGSNAIL: case P_KINGFLY: case P_KINGANT: + case P_KINGCAT: return MT_BOSS; } @@ -3707,6 +3766,7 @@ int isbosslevel(int lev) { int isboss(int monid) { switch (monid) { + case P_KINGCAT: case P_KINGRAT: case P_KINGSNAIL: case P_KINGFLY: @@ -3725,6 +3785,7 @@ int isnettable(sprite_t *s) { case P_KINGRAT: case P_KINGSNAIL: case P_KINGFLY: + case P_KINGCAT: case P_KINGANT: return B_FALSE; default: @@ -3740,6 +3801,7 @@ int isnettable(sprite_t *s) { // return starting health for a given boss type int getbosshealth(int mid) { + if (cheat) return 1; switch (mid) { case P_KINGRAT: return 8; @@ -3749,6 +3811,8 @@ int getbosshealth(int mid) { return 8; case P_KINGANT: return 8; + case P_KINGCAT: + return 10; } return 0; } @@ -3887,6 +3951,7 @@ void setfruitinfo(void) { setinfo(P_KINGFLY, "King Fly", "King Fly is quite literally the lord of the flies. Far from the timid garden-variety fly, King Fly will roam around with its entourage of underlings in tow, running down anything in its path!", "kingfly.png"); setinfo(P_KINGANT, "King Ant", "All ants bow down to King Ant, the ultimate ant overlord. King Ant is an enormous fire ant, endlessly covered in flames and able to create ant sustenance from its body. Its flames are so intense that they can instantly melt through solid ice!", "kingant.png"); + setinfo(P_KINGCAT, "King Cat", "The mastermind of the great food heist, the elusive King Cat is rumoured to weild powerful arcane powers.", "kingcat.png"); setinfo(P_SNAIL, "Snail", "Snails are slow moving but tough. When attacked normally they will not die, but simply lose their shell and become a slug. The safest way to take them out is to slam another monster into them, thus killing them instantly.", "snail.png"); setinfo(P_SLUG, "Slug", "Slugs are faster moving than snails and capable of launching themselves through the air at their prey!", "slug.png"); @@ -4605,7 +4670,7 @@ void drawplayer(sprite_t *s, SDL_Rect *where) { // draw umbrella - if (s->umbrella && s->umbrellaup) { + if ((s->umbrella && s->umbrellaup) || (isplayer(s) && endgame)) { if ((levelcomplete != LV_CLOUD) && (levelcomplete != LV_CLOUDLOOP)) { if (!s->swimming && !s->climbing) { SDL_Rect umarea;