wormy 0.95.1914
[wormy.git] / wormy.z80
index 34e5d0b45449c51d9eaeec53289ea700d7296ae7..edb70567e7d1f53e739135f999a81bf4f9f31cfa 100644 (file)
--- a/wormy.z80
+++ b/wormy.z80
@@ -3,8 +3,7 @@
 ; Release Date               : summer 2001
 ; Filename                   : wormy.86p (5kb)
 ; Author(s)                  : Shiar
-; Email Address              : shiar0@hotmail.com
-; ICQ UIN                    : #43840958
+; Email Address              : wormy@shiar.org
 ; Web Page                   : www.shiar.org
 ; Description                : ruling Nibbles-like game 1-4 players
 ; Where to get this game     : www.shiar.org (home of Wormy)
@@ -26,8 +25,9 @@
 ;   * LINK
 ;     * fix first packet loss
 ;  1% * transmit game/level data
+;  1% * 1/3 worms over link
 ;;;1% * get g/o signal (l&l) working
-;  2% * send new peas' positions
+;;;1% * send new peas' positions
 
 ;100% = bugs fixed + levels done
 
@@ -48,7 +48,6 @@
 #define cal call
 #define psh push
 #define dnz djnz
-;#define halt nop
 
 #include "asm86.h"
 #include "ti86asm.inc"
@@ -135,7 +134,8 @@ wormVclient = 193
 start:
   nop
   jp Start
-  .dw 1
+  .db 1
+  nop
   .dw WormTxt
   .dw WormIcon
 
@@ -276,9 +276,8 @@ levelselectmenu:
   ld  hl,txtLevsel
   cal _vputs ;"< SELECT LEVELS >"
   ld  hl,$FC00+(2*16)
-  cal hr
-  ld  hl,$FC00+(10*16)
-  cal hr
+  ld  b,16*9
+  cal menuinvloop
   ld  hl,$FC00+(56*16)
   cal hr
   ld  hl,$0601 ;x=1
@@ -380,18 +379,18 @@ levselectmenu:
   psh bc
   cal ubergetkey
   pop bc ;GET_KEY destr. b
-  cp  K_UP
-  jr  z,levup
-  dec a ;K_DOWN
+  dec a ;cp K_DOWN
   jr  z,levdown
-  cp  K_SECOND-1
-  jr  z,loadlevel
+  sub K_UP-1
+  jr  z,levup
   pop hl
-  cp  K_RIGHT-1
+  inc a ;cp K_RIGHT
   jp  z,levelselectmenu
-  cp  K_EXIT-1
+  cp  K_ENTER-K_RIGHT
+  jr  z,loadlevel
+  sub K_EXIT-K_RIGHT
   jp  z,ExitNoStats
-  cp  K_ENTER-1
+  inc a ;cp K_SECOND
   jr  nz,levselectmenu
 ; jr  z,loadlevel
 
@@ -2873,6 +2872,8 @@ nextbitok:
 timematchscore: ;piece of crap checking whether you've already won in timematch
   ld  a,(nrworms)
   ld  b,a ;# of worms
+  dec a
+  ret z ;singleplayer
   ld  hl,worm1+lives
   ld  de,worm2-worm1
   ld  a,(handledworm)