From dda2166385ee2338bb0874279dec4b7ed84c4cf1 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Fri, 27 Mar 2009 01:07:40 +0000 Subject: [PATCH] Added animated water tops --- data/levels/factory.dat | 8 +++++--- data/levels/platformsinthesand.dat | 8 ++++---- data/levels/undergroundlake.dat | 3 ++- data/newtiles/watertop.png | Bin 145 -> 158 bytes data/newtiles/watertopu1.png | Bin 0 -> 161 bytes data/newtiles/watertopu2.png | Bin 0 -> 170 bytes data/tiledefs.dat | 3 ++- edit.c | 6 +++++- 8 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 data/newtiles/watertopu1.png create mode 100644 data/newtiles/watertopu2.png diff --git a/data/levels/factory.dat b/data/levels/factory.dat index 57f93bb..67dd1d2 100644 --- a/data/levels/factory.dat +++ b/data/levels/factory.dat @@ -45,9 +45,9 @@ exitdir -1 74,98,98,98,74,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,74,74,74,74,74,74, 74,98,98,98,74,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,74,74,74,74,74,74, 74,98,98,98,74,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,98,98,98,98,74,74,74,74,74,74,74,74,74,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,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,75,99,75,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,75,99,75,98,98,98,98,98,74, +74,98,98,98,97,75,99,99,99,75,97,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,97,75,99,99,99,75,97,98,98,98,74, +74,98,98,98,98,98,97,75,97,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,97,75,97,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,75,99,75,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,75,99,75,98,98,98,98,98,74, 74,98,98,98,98,97,99,99,99,97,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,97,97,99,99,99,97,97,98,98,98,74, @@ -99,6 +99,8 @@ layer2 24,3,28 25,3,28 26,3,28 +7,5,82 +32,5,82 1,7,72 2,7,71 3,7,71 diff --git a/data/levels/platformsinthesand.dat b/data/levels/platformsinthesand.dat index 32440b7..726b900 100644 --- a/data/levels/platformsinthesand.dat +++ b/data/levels/platformsinthesand.dat @@ -50,10 +50,10 @@ exitdir 2 44,47,20,20,20,21,21,21,21,21,21,21,21,21,22,44,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,21,21,20,20,20,46,44, 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,44,44,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,44,44,0,0,0,0,0,0,0,0,0,44, -44,47,20,20,20,20,20,0,0,0,0,44,44,15,15,15,15,15,15,15,15,15,15,15,15,15,15,44,44,0,0,0,0,0,0,0,0,0,0,44, -44,0,0,0,0,0,0,0,0,0,0,0,44,44,15,15,15,15,15,15,15,15,15,15,15,15,44,44,0,0,0,0,0,0,0,0,0,0,0,44, -44,0,0,0,0,0,0,0,0,0,0,0,0,44,44,15,15,15,15,15,15,15,15,15,15,44,44,0,0,0,0,0,0,0,0,0,0,0,0,44, -44,47,20,20,20,20,20,0,0,0,0,0,0,0,44,44,44,44,44,44,44,44,44,44,44,44,0,0,0,0,0,0,0,0,0,0,0,0,0,44, +44,47,20,20,20,20,20,0,0,0,50,44,44,15,15,15,15,15,15,15,15,15,15,15,15,15,15,44,44,51,0,0,0,0,0,0,0,0,0,44, +44,0,0,0,0,0,0,0,0,0,0,50,44,44,15,15,15,15,15,15,15,15,15,15,15,15,44,44,51,0,0,0,0,0,0,0,0,0,0,44, +44,0,0,0,0,0,0,0,0,0,0,0,50,44,44,15,15,15,15,15,15,15,15,15,15,44,44,51,0,0,0,0,0,0,0,0,0,0,0,44, +44,47,20,20,20,20,20,0,0,0,0,0,0,50,44,44,44,44,44,44,44,44,44,44,44,44,51,0,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,45,45,45,45,47,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44, 44,45,45,45,45,45,45,45,45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44, diff --git a/data/levels/undergroundlake.dat b/data/levels/undergroundlake.dat index c8f3528..97e2c71 100644 --- a/data/levels/undergroundlake.dat +++ b/data/levels/undergroundlake.dat @@ -61,7 +61,7 @@ exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,4,4,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4, 39,1,1,1,1,1,40,40,1,1,40,40,40,40,40,1,1,16,16,16,16,16,16,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4, -4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,15,15,15,15,15,4,4,15,15,15,15,15,15,15,4,4,4,15,15,15,4, +4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,15,15,15,15,15,4,4,15,15,15,15,15,15,15,4,4,15,15,15,15,4, 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,40,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4, 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4, 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,1,1,40,40,1,1,15,15,15,15,15,15,4, @@ -87,6 +87,7 @@ layer2 23,12,42 26,12,43 32,12,42 +35,12,43 3,19,8 21,22,11 22,23,11 diff --git a/data/newtiles/watertop.png b/data/newtiles/watertop.png index 6bb06704581e1ec0b5e95d316aaeb9c8e9eb370f..d357d6d03e6cc9fa3dd1522e3ca6c52494ff40ef 100644 GIT binary patch delta 34 qcmbQpIFE6H3KwH>kh>GZx^prwCn_3n-DH+#7BcGz6_c76Z3Y0fy9yxy delta 23 fcmbQoIFWIJ%0xq5t{Ys8oZ>n^>}TAWm|+G0R@VpU diff --git a/data/newtiles/watertopu1.png b/data/newtiles/watertopu1.png new file mode 100644 index 0000000000000000000000000000000000000000..701ad90306518306c1ad98fdf5aa55cfd9187f23 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sDEfH31!Z9ZwBAbW|YuPggaW@%;~uJYOV literal 0 HcmV?d00001 diff --git a/data/newtiles/watertopu2.png b/data/newtiles/watertopu2.png new file mode 100644 index 0000000000000000000000000000000000000000..d415f2d3e822d3a6fa2ce7fdf45bc4aa66c37f86 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85sDEfH31!Z9ZwBAbW|YuPggaW@%<2>62Yv`9L8pPZ!4!i_>q< zZxm!O;5d9heR6g24aF@hw);Jc2sU|AJb%$<&5GOH>K2SVA?3`IleH#j0(CKXy85}S Ib4q9e080Zf@c;k- literal 0 HcmV?d00001 diff --git a/data/tiledefs.dat b/data/tiledefs.dat index 64d5ef0..a0cd00e 100644 --- a/data/tiledefs.dat +++ b/data/tiledefs.dat @@ -108,7 +108,8 @@ tile watertop id 15 water 1 solid 0 -file newtiles/watertop.png +file newtiles/watertop.png newtiles/watertop.png newtiles/watertop.png newtiles/watertopu1.png newtiles/watertopu2.png newtiles/watertopu2.png newtiles/watertopu1.png +animspeed 5 end tile trampolineup diff --git a/edit.c b/edit.c index b212f4a..bce7438 100644 --- a/edit.c +++ b/edit.c @@ -1224,7 +1224,11 @@ void draweditortile(SDL_Surface *where, int x, int y) { /* figure out what the layer1 tile is */ offset = y*LEVELW+x; tt = gettile(curlevel->map[offset]); - frame = curlevel->tileframe[offset]; + if (tt->numframes > 1) { + frame = curlevel->tileframe[offset]; + } else { + frame = 0; + } // get greyimnal layer1 image