diff --git a/artwork/weapons_AW4.fnt b/artwork/weapons_AW4.fnt new file mode 100644 index 0000000..4b6ec5e Binary files /dev/null and b/artwork/weapons_AW4.fnt differ diff --git a/constants.asm b/constants.asm index eeee2cb..6addc74 100644 --- a/constants.asm +++ b/constants.asm @@ -42,11 +42,6 @@ LineBottom LineEmpty dta d"# #" .byte $ff -LineHeader1 - dta d"# ROUND: " -RoundNrDisplay - dta d" #" - .byte $ff LineHeader2 dta d"# RESULTS #" .byte $ff @@ -288,9 +283,9 @@ costable .by 0 linetableL - :screenheight .by <(display+screenBytes*#) + :screenheight+1 .by <(display+screenBytes*#) linetableH - :screenheight .by >(display+screenBytes*#) + :screenheight+1 .by >(display+screenBytes*#) ;---------------------------- bittable .by $80,$40,$20,$10,$08,$04,$02,$01 @@ -638,72 +633,6 @@ TanksNamesDefault dta d"5th.Tank" dta d"6th.Tank" -;Weapon prices (*10 on screen) -price_Baby_Missile___ = 0 ;_0 -price_Missile________ = 96 ;_1 -price_Baby_Nuke______ = 111 ;_2 -price_Nuke___________ = 144 ;_3 -price_LeapFrog_______ = 192 ;_4 -price_Funky_Bomb_____ = 293 ;_5 -price_MIRV___________ = 456 ;_6 -price_Death_s_Head___ = 337 ;_7 -price_Napalm_________ = 0 ;496 ;_8 -price_Hot_Napalm_____ = 0 ;511 ;_9 -price_Tracer_________ = 102 ;_10 -price_Smoke_Tracer___ = 291 ;_11 -price_Baby_Roller____ = 689 ;_12 -price_Roller_________ = 600 ;_13 -price_Heavy_Roller___ = 592 ;_14 -price_Riot_Charge____ = 0 ;330 ;_15 -price_Riot_Blast_____ = 0 ;341 ;_16 -price_Riot_Bomb______ = 369 ;_17 -price_Heavy_Riot_Bomb = 322 ;_18 -price_Baby_Digger____ = 336 ;_19 -price_Digger_________ = 276 ;_20 -price_Heavy_Digger___ = 253 ;_21 -price_Baby_Sandhog___ = 218 ;_22 -price_Sandhog________ = 191 ;_23 -price_Heavy_Sandhog__ = 305 ;_24 -price_Dirt_Clod______ = 104 ;_25 -price_Dirt_Ball______ = 130 ;_26 -price_Ton_of_Dirt____ = 171 ;_27 -price_Liquid_Dirt____ = 0 ;530 ;_28 -price_Dirt_Charge____ = 581 ;_29 -price_Earth_Disrupter = 0 ;430 ;_30 -price_Plasma_Blast___ = 0 ;274 ;_31 -price_Laser__________ = 577 ;_32 -price______________33 = 0 -price______________34 = 0 -price______________35 = 0 -price______________36 = 0 -price______________37 = 0 -price______________38 = 0 -price______________39 = 0 -price______________40 = 0 -price______________41 = 0 -price______________42 = 0 -price______________43 = 0 -price______________44 = 0 -price______________45 = 0 -price______________46 = 0 -price______________47 = 0 -price_Heat_Guidance__ = 0 ;_48_($30) -price_Bal_Guidance___ = 0 ;_49 -price_Horz_Guidance__ = 0 ;_50 -price_Vert_Guidance__ = 0 ;_51 -price_Lazy_Boy_______ = 0 ;_52 -price_Parachute______ = 1100 ;_53 -price_Battery________ = 0 ;_54 -price_Mag_Deflector__ = 0 ;_55 -price_Shield_________ = 0 ;_56 -price_Force_Shield___ = 0 ;_57 -price_Heavy_Shield___ = 0 ;_58 -price_Super_Mag______ = 0 ;_59 -price_Auto_Defense___ = 0 ;_60 -price_Fuel_Tank______ = 0 ;_61 -price_Contact_Trigger = 0 ;_62 -price______________63 = 0 - WeaponPriceH ; weapons prices (tables with prices of weapons) .by >price_Baby_Missile___ .by >price_Missile________ diff --git a/definitions.asm b/definitions.asm new file mode 100644 index 0000000..5d796f2 --- /dev/null +++ b/definitions.asm @@ -0,0 +1,77 @@ +; @com.wudsn.ide.asm.mainsourcefile=scorch.asm + +screenheight = 200 +screenBytes = 40 +screenwidth = screenBytes*8 ; Max screenwidth = 512!!! +margin = 48 ;mountain drawing Y variable margin +display = $1010 ;screen takes $2K due to clearing routine +MaxPlayers = 6 +maxOptions = 7 ;number of all options +PMOffset = $23 ; P/M to graphics offset + + +;Weapon prices (*10 on screen) +price_Baby_Missile___ = 0 ;_0 +price_Missile________ = 96 ;_1 +price_Baby_Nuke______ = 111 ;_2 +price_Nuke___________ = 144 ;_3 +price_LeapFrog_______ = 192 ;_4 +price_Funky_Bomb_____ = 293 ;_5 +price_MIRV___________ = 456 ;_6 +price_Death_s_Head___ = 337 ;_7 +price_Napalm_________ = 0 ;496 ;_8 +price_Hot_Napalm_____ = 0 ;511 ;_9 +price_Tracer_________ = 102 ;_10 +price_Smoke_Tracer___ = 291 ;_11 +price_Baby_Roller____ = 689 ;_12 +price_Roller_________ = 600 ;_13 +price_Heavy_Roller___ = 592 ;_14 +price_Riot_Charge____ = 0 ;330 ;_15 +price_Riot_Blast_____ = 0 ;341 ;_16 +price_Riot_Bomb______ = 369 ;_17 +price_Heavy_Riot_Bomb = 322 ;_18 +price_Baby_Digger____ = 336 ;_19 +price_Digger_________ = 276 ;_20 +price_Heavy_Digger___ = 253 ;_21 +price_Baby_Sandhog___ = 218 ;_22 +price_Sandhog________ = 191 ;_23 +price_Heavy_Sandhog__ = 305 ;_24 +price_Dirt_Clod______ = 104 ;_25 +price_Dirt_Ball______ = 130 ;_26 +price_Ton_of_Dirt____ = 171 ;_27 +price_Liquid_Dirt____ = 0 ;530 ;_28 +price_Dirt_Charge____ = 581 ;_29 +price_Earth_Disrupter = 0 ;430 ;_30 +price_Plasma_Blast___ = 0 ;274 ;_31 +price_Laser__________ = 577 ;_32 +price______________33 = 0 +price______________34 = 0 +price______________35 = 0 +price______________36 = 0 +price______________37 = 0 +price______________38 = 0 +price______________39 = 0 +price______________40 = 0 +price______________41 = 0 +price______________42 = 0 +price______________43 = 0 +price______________44 = 0 +price______________45 = 0 +price______________46 = 0 +price______________47 = 0 +price_Heat_Guidance__ = 0 ;_48_($30) +price_Bal_Guidance___ = 0 ;_49 +price_Horz_Guidance__ = 0 ;_50 +price_Vert_Guidance__ = 0 ;_51 +price_Lazy_Boy_______ = 0 ;_52 +price_Parachute______ = 1100 ;_53 +price_Battery________ = 0 ;_54 +price_Mag_Deflector__ = 0 ;_55 +price_Shield_________ = 0 ;_56 +price_Force_Shield___ = 0 ;_57 +price_Heavy_Shield___ = 0 ;_58 +price_Super_Mag______ = 0 ;_59 +price_Auto_Defense___ = 0 ;_60 +price_Fuel_Tank______ = 0 ;_61 +price_Contact_Trigger = 0 ;_62 +price______________63 = 0 diff --git a/scorch.asm b/scorch.asm index 23a1a25..25f36f7 100644 --- a/scorch.asm +++ b/scorch.asm @@ -35,6 +35,9 @@ ;and due to being always short of time/energy (to finish the game) ;we decided it must go in 'English' to let other people work on it + icl 'definitions.asm' + + .zpvar xdraw .word = $80 ;variable X for plot .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar xbyte .word @@ -72,15 +75,6 @@ displayposition = modify ;------------------------------- -;constants -screenheight = 200 -screenBytes = 40 -screenwidth = screenBytes*8 ; Max screenwidth = 512!!! -margin = 48 ;mountain drawing Y variable margin -display = $1010 ;screen takes $2K due to clearing routine -MaxPlayers = 6 -maxOptions = 7 ;number of all options -PMOffset = $23 ; P/M to graphics offset icl 'lib/atari.hea' icl 'lib/macro.hea' @@ -92,6 +86,12 @@ PMOffset = $23 ; P/M to graphics offset ;Screen displays go first to avoid crossing 4kb barrier ;----------------------------------------------- icl 'display.asm' + ;---------------------------------------------- + .ALIGN $400 +WeaponFont + ins 'artwork/weapons_AW4.fnt' ; 'artwork/weapons.fnt' + + ;-------------------------------------------------- ; Game Code ;-------------------------------------------------- @@ -590,7 +590,7 @@ PlayerXdeath .proc jsr DisplayOffensiveTextNr - ; calculate position of the explosion (the post-death one?) + ; calculate position of the explosion (the post-death one) ldx TankTempY clc lda xtankstableL,x @@ -604,7 +604,7 @@ PlayerXdeath .proc sbc #4 sta ydraw lda #0 - sta ydraw+1 ; there is 0 left in A, so... + sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit when transitioning ydraw to byte ;cleanup of the soil fall down ranges (left and right) sta RangeRight @@ -616,14 +616,12 @@ PlayerXdeath .proc ; We are randomizing the weapon now. - ; As we are jumping into the middle of the weapon - ; routine we are preparing the number *2 - - ; - to make it easier and because we are using only - ; first 32 weapons we are doing this with just one AND + ; jumping into the middle of the explosion + ; routine lda random - and #$3e ; range (0-31 number multiplied by 2) - jsr Explosion2 + and #%00011111 ; range 0-31 + jsr ExplosionDirect ; jump to after explosion routines (soil fallout, etc.) ; After going through these routines we are back @@ -1115,9 +1113,7 @@ WaitForKeyRelease .proc rts .endp -;---------------------------------------------- -OffensiveTexts - icl 'artwork/talk.asm' + ;---------------------------------------------- icl 'weapons.asm' ;---------------------------------------------- @@ -1129,35 +1125,26 @@ OffensiveTexts ;---------------------------------------------- icl 'constants.asm' ;---------------------------------------------- - icl 'variables.asm' - - + icl 'artwork/talk.asm' +;---------------------------------------------- font4x4 ins 'artwork/font4x4s.bmp',+62 ;---------------------------------------------- TankFont ins 'artwork/tanks.fnt' -TankFontend - .if TankFontEnd>$9800 +;---------------------------------------------- + icl 'variables.asm' +;---------------------------------------------- +TheEnd + .if TheEnd > PMGraph + $300 .error memory conflict - ;this is to warn if code and P/M graphics - ;overlap! + .endif ;---------------------------------------------- ; Player/missile memory - ORG $9800 -pmgraph + org $b800 +PMGraph -;---------------------------------------------- - ORG $a400 -WeaponFont - ins 'artwork/weapons.fnt' -;---------------------------------------------- -TheEnd - .if TheEnd>$c000 - .error memory conflict - - .endif run START diff --git a/scorch.xex b/scorch.xex index db52fce..6754486 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/variables.asm b/variables.asm index f324376..63a418f 100755 --- a/variables.asm +++ b/variables.asm @@ -26,7 +26,11 @@ skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning ResultLineBuffer dta d" " .byte $ff - +LineHeader1 + dta d"# ROUND: " +RoundNrDisplay + dta d" #" + .byte $ff variablesStart ; zeroing starts here ;-------------- diff --git a/weapons.asm b/weapons.asm index de096dc..97c043b 100755 --- a/weapons.asm +++ b/weapons.asm @@ -12,14 +12,14 @@ Explosion .proc ldx TankNr lda ActiveWeapon,x - asl .endp -Explosion2 .proc +ExplosionDirect .proc + asl tax lda ExplosionRoutines+1,x - pha - lda ExplosionRoutines,x - pha + pha + lda ExplosionRoutines,x + pha rts ExplosionRoutines .word babymissile-1 @@ -115,10 +115,19 @@ VOID pla sta TankNr + + ; this is to fix bug MIRV loops #6 + ; the issue was that after MIRV the flight routine called here + ; was mirving. This happened when a tank dies by MIRV and then + ; leapfrogs + tax + lda #4 ; leapfrog + sta ActiveWeapon,x + + ; it looks like force is divided by 4 here BUT" ; in Flight routine force is multiplied by 2 and left ; so, we have Force divided by 2 here (not accurately) - lsr Force+1 ror Force ;lsr Force+1 @@ -195,6 +204,13 @@ EndOfLeapping pla sta TankNr + ; this is to fix bug MIRV loops #6 + ; the issue was that after MIRV the flight routine called here + ; was mirving. This happened when a tank dies by MIRV and then + ; leapfrogs + tax + lda #5 ; fynkybomb + sta ActiveWeapon,x mva #5 FunkyBombCounter FunkyBombLoop mva #1 tracerflag @@ -677,7 +693,7 @@ rbombLoop PositiveVelocity ; first we look for the left slope ; then righ slope and set the flag - ; $FF - we are in a hole (flighting in missile direction) + ; $FF - we are in a hole (flying in missile direction) ; 1 - right, 2 - left mva #$ff HowMuchToFall mva ydraw HeightRol