aboutsummaryrefslogtreecommitdiff
path: root/lorchatest.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-12-30 04:49:43 -0500
committerB. Watson <yalhcru@gmail.com>2015-12-30 04:49:43 -0500
commitd5c761515bd26f1f2a6b0f91e2b6f6762431566c (patch)
tree2358efc0ce7bfa5c11956193ad67bdcc7468c623 /lorchatest.c
parent2300d2813a524cbfeabac794335e7abe99263df6 (diff)
downloadtaipan-d5c761515bd26f1f2a6b0f91e2b6f6762431566c.tar.gz
Visible damage
Diffstat (limited to 'lorchatest.c')
-rw-r--r--lorchatest.c51
1 files changed, 23 insertions, 28 deletions
diff --git a/lorchatest.c b/lorchatest.c
index bc53d07..31d7f81 100644
--- a/lorchatest.c
+++ b/lorchatest.c
@@ -1,37 +1,32 @@
+#include <conio.h>
#include <peekpoke.h>
-extern void __fastcall__ draw_lorcha(int which, int displacement, int mask);
-
-void jsleep(int jiffies) {
- POKE(20,0);
- while(PEEK(20) < jiffies)
- ;
-}
+extern void __fastcall__ damage_lorcha(int which);
+extern void __fastcall__ draw_lorcha(int which);
+extern void __fastcall__ flash_lorcha(int which);
+extern void __fastcall__ clear_lorcha(int which);
+extern void __fastcall__ sink_lorcha(int which);
int main(void) {
int i, j;
-
- /* draw all 10 ships in normal state */
+ POKE(756, 0xb8);
for(i=0; i<10; i++) {
- draw_lorcha(i, 0, 0);
- }
-
- /* explode and sink all 10 ships */
- for(i=0; i<10; i++) {
- /* blast effect */
- for(j=0; j<8; j++) {
- draw_lorcha(i, 0, 0x80);
- jsleep(2);
- draw_lorcha(i, 0, 0);
- jsleep(2);
- }
-
- /* sinking */
- for(j=0; j<8; j++) {
- draw_lorcha(i, j, 0);
- jsleep(4);
+ // draw_lorcha(i);
+ // cgetc();
+ // clear_lorcha(i);
+ // cgetc();
+ draw_lorcha(i);
+ cgetc();
+ sink_lorcha(i);
+ cgetc();
+ draw_lorcha(i);
+ for(j=0; j<5; j++) {
+ cgetc();
+ flash_lorcha(i);
+ cgetc();
+ flash_lorcha(i);
+ cgetc();
+ damage_lorcha(i);
}
}
-
-hang: goto hang;
}