castleraider

changeset 288:559bd41dc09b

Fixed vertical collision checking, compensating for a check at the top of the character when checking a collision with the bottom of the character.
author David Boddie <david@boddie.org.uk>
date Mon Mar 24 00:14:25 2014 +0100
parents 3da06320a2cf
children 2cfa1c17205f
files levels/default.txt monsters.oph
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line diff
     1.1 --- a/levels/default.txt	Sun Mar 23 13:16:43 2014 +0100
     1.2 +++ b/levels/default.txt	Mon Mar 24 00:14:25 2014 +0100
     1.3 @@ -47,7 +47,7 @@
     1.4  ..................I.............................................++++++++++++................................................................................................................................@@@@--------------------------@@@@.................@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@/.\@@@@@@@@@@..............2............@@@@@@@@@@@@@@......
     1.5  ..................I..........................................+++############++++..........................................................................................................................@@@@@@..........................@@@@@@........................................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@...........................2..........n.@@@@@@@@@@@@@@@@....
     1.6  ..................I.......................................+++###################++........................+++++.....................+++++++.............................................................@@@@@@@@..........................@@@@@@@@..................................ZZZZ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........................2............@@@@@@@@@@@@@@@@@@..
     1.7 -.................@@@@@@@@@@@@..................>.....+++++########################++++............>.....++#####++......>.......+++++#######+++++@@........>.........@@++++++++++++++++++++++++++++++++@@@@@@@@@@..........................@@@@@@@@@@..................>.............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@SSS.......................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     1.8 +.................@@@@@@@@@@@@..................>.....+++++########################++++............>.....++#####++.>............+++++#######+++++@@........>.........@@++++++++++++++++++++++++++++++++@@@@@@@@@@..........................@@@@@@@@@@..................>.............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@SSS.......................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     1.9  +++@@------------@@@@@@@@@@@@++++++++++++++++++++++++#################################++++++++++++++++++#########++++++++++++++#################@@@@@@@@@@@@@@@@@@@@@@################################@@@@@@@@@@..........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    1.10  
    1.11  Basement
    1.12 @@ -58,7 +58,7 @@
    1.13  ..................@YYY...........................................................................................]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.14  ..................@@@@...........................................................................................]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.15  .....................]]]..................................................................l...................UUU]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.16 -.......................]]]..............................]]]]]]]]]]]]]]]]]]............]].............>.......]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.17 +.......................]]]..............................]]]]]]]]]]]]]]]]]]............]]................>...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.18  .........................]]]]]..........................]]]]]]]]]]]]]]]]]]............]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.19  ..........................]].......................]]]]]]]]]]]]]]]]]]]]]]]]]]]].......]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    1.20  ..........................]]........................|...]]]]]]]]]]]]]]]]]]...|.........3....................................................]
    1.21 @@ -92,7 +92,7 @@
    1.22  ...............................==............................{.......====...........................................................................................................................................
    1.23  ................................{.OOO............<.=====...............{............==..............====...............................................===..........................................................
    1.24  ..................................=====..............{........................==..........=====.......{.................................................{........................====...............................
    1.25 -....................................{......====............................................{{......................................===......................====..................{........===......................
    1.26 +....................................{......====............................................{{......................................===......................====...........<......{........===......................
    1.27  .............................................{......................................................................................{...........====.........{.........=====................{..................@@@@@
    1.28  ...................................................................................................................====........<.........===..............................{........V...........................@/.\@
    1.29  ................................................................................V..........................................===..........................V..........................................................=
    1.30 @@ -107,8 +107,8 @@
    1.31  Wasteland
    1.32  .........................................................................@@..@@..@@............................................................................................................@@..@@..@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@...................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........<........--..............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.......................................................................................................................+++++++++++..................................................................................
    1.33  .........................................................................@@@@@@@@@@...............................................@@..@@.......................................................@@@@@@@@@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@.......--..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.............--..........--........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.................................................................................................................++++++###########+++++.............................................................................
    1.34 -.........................................................................@@@@@@@@@@...............................................@@@@@@.......................................................@@@@@@@@@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....................................3.............................................@@@@@@@@@.............................................................................................................++++######################+++..........................................................................
    1.35 -.........................................................................@@..@@..@@...............................................@@@@@@.......................................................@@..@@..@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@......................o.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.m..................................3.............................................@@@@@@@@@.........................................................................................................++++#############################++........................................................................
    1.36 +.........................................................................@@@@@@@@@@...............................................@@@@@@@@.....................................................@@@@@@@@@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....................................3.............................................@@@@@@@@@.............................................................................................................++++######################+++..........................................................................
    1.37 +.........................................................................@@..@@..@@...............................................@@@@@@@@.....................................................@@..@@..@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@......................o.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.m..................................3.............................................@@@@@@@@@.........................................................................................................++++#############################++........................................................................
    1.38  .........................................................................@@@@@@@@@@............................................................................................................@@@@@@@@@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@@@.......<..............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........--.......................3................................................4...........................................................................................................+++###################################+.......................................................................
    1.39  .........................................................................@@@....@@@............................................................................................................@@@@@@@@@@....................................................................................................@@@@@@@@@@@@@@@@@@@@@@................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@......................4.........................................................................................................++#######################################++.....................................................................
    1.40  ...............................................................................................................................................................................................@@......@@....................................................................................................@@@@................3........---.........@@@@@@@@@@@@@@@....@@@@@@@@@@@@@@@@@@@@@@@@@...........--................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...............V......4.......................................................................++++++++++++....................++###########################################++...................................................................
    1.41 @@ -117,7 +117,7 @@
    1.42  .....................................@@..@@............................................................................................................................................................1.....................................................................................................@@@@@@@@@@@@@@@@@@@@@@...................@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@....................................@@@@@@@@@@@@@@@@@@@@@@@@@@@@.............@@@@@@@@@@@....................................................++++##############################++++++############################################################++++........................................................
    1.43  .....................................@@@@@@..............................@@......@@.............................................@@@@@@@@@@@@..............<....................................@@@@@@@@@@................................................................................@@@@................@@@@@@@@@@@@@@@@@@@@@@@@@................@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@..............................JJJ@@@@@@@@@@@@@@@@@@@@@@@@@@@@.............@@@@@@@@@@@............................................++++++++########################################################################################################+++.....................................................
    1.44  .....................................@/..\@...........................XXXXXX@@@@@@@.................................<......XXXXXXXXXX@@@@@@@................XXXXXXX..........................@@@@@@@@@@@@@........>.........>.....++++++++.............................................../..\................@@@@@@@@@@@@@@@@@@@@@@...................@@@@@@@@@@@@..........@@@/.\@@@@@@@@@@@@@@@@@@@..........--............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........@@@@@@@@@@@@@.......................................+++++###################################################################################################################++++.................................................
    1.45 -.....................................@..............................XXXXXXXXXX@@@@@............XXXXXXXX.................XXXXXXXXXXXXXXXX@@@@.............XXXXXXXXXXXXXXX...>.........XXXXXXXXXXXXXXXXXXXXX------------------------########+++...>.....++......XXXX...........................................@@@@@@@@@@@@@@@@@@@@@@...................................V...........@@@@@@@@@@@@@@@@@@@..........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........@@@@@@@@@@@@@..................................+++++############################################################################################################################+++++............................................
    1.46 +.....................................@..............................XXXXXXXXXX@@@@@.............XXXXXXX.................XXXXXXXXXXXXXXXX@@@@.............XXXXXXXXXXXXXXX...>.........XXXXXXXXXXXXXXXXXXXXX------------------------########+++...>.....++......XXXX...........................................@@@@@@@@@@@@@@@@@@@@@@...................................V...........@@@@@@@@@@@@@@@@@@@..........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........@@@@@@@@@@@@@..................................+++++############################################################################################################################+++++............................................
    1.47  .....................................@...........................XXXXXXXXXXXXXXX@@@.....>.....XXXXXXXXX...............XXXXXXXXXXXXXXXXXXXXXX....>.....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................############+++++++++##.......XXX........<......====........................@@@@@@@@@@@@@@@@@@@@@@...............................................@@@@@@@@@@@@@@@@@@@..........................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........@@@@@@@@@@@@@............................++++++######################################################################################################################################+++.........................................
    1.48  .....................................@KKKK..........>.....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....>.....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................######################........XX.....XXXX.....=======...QQQQ................@@@@@@@@@@@@@@@@@@@@@@......----..................................NNN@@@@@@@@@@@@@@@@@@@.......>..................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..>......@@@@@@@@@@@@@..>........+++++++++++++++++###############################################################################################################################################++++++++++...............................
    1.49  ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................######################........XX......XX.......==============...............@@@@@@@@@@@@@@@@@@@@@@...............@@@@@@@@@@@@@@@@@@......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##########################################################################################################################################################################+++++++++++++++++++++++++++++++
     2.1 --- a/monsters.oph	Sun Mar 23 13:16:43 2014 +0100
     2.2 +++ b/monsters.oph	Mon Mar 24 00:14:25 2014 +0100
     2.3 @@ -736,7 +736,7 @@
     2.4      iny
     2.5      adc ($86),y                     ; Add it to the monster's ys value.
     2.6  
     2.7 -    adc #1                          ; Add haly the monster's height to the
     2.8 +    adc #1                          ; Add half the monster's height to the
     2.9                                      ; offset to help with comparison using
    2.10                                      ; its bottom edge.
    2.11  
    2.12 @@ -745,9 +745,9 @@
    2.13                                      ; that the bottom edge could be aligned
    2.14                                      ; with the character's top edge.
    2.15  
    2.16 -    sbc #8                          ; Check for the character's bottom edge.
    2.17 -    clc
    2.18 -    cmp $81
    2.19 +    sbc #7                          ; Check for the character's bottom edge
    2.20 +    clc                             ; (six half rows plus the half row already
    2.21 +    cmp $81                         ; added above).
    2.22      bcs check_monster_common_exit
    2.23  
    2.24      jmp player_demise               ; Decrease the number of lives and exit.