diff --git a/ai.asm b/ai.asm index 8043da9..9c96bf6 100644 --- a/ai.asm +++ b/ai.asm @@ -155,7 +155,7 @@ endo ; choose the best weapon - ldy #32 ;the last weapon + ldy #last_offensive_____ ;the last weapon loop dey lda (temp),y ; this is set up before calling the routine, has address of TanksWeaponsTable @@ -1043,7 +1043,7 @@ SorryNoPurchase :4 asl ;*16 sta tempXroller ; perform this many purchase attempts @ - randomize ind_Missile________ ind_Plasma_Blast___ + randomize first_offensive____ last_offensive_____ jsr TryToPurchaseOnePiece2 dec tempXroller bne @- diff --git a/constants.asm b/constants.asm index ff56333..7a4dd52 100644 --- a/constants.asm +++ b/constants.asm @@ -261,36 +261,16 @@ WeaponPriceH ; weapons prices (tables with prices of weapons) .by >price_Liquid_Dirt____ .by >price_Dirt_Charge____ .by >price_Buy_me_________ - .by >price_Plasma_Blast___ .by >price_Laser__________ -; .by >price______________33 -; .by >price______________34 -; .by >price______________35 -; .by >price______________36 -; .by >price______________37 -; .by >price______________38 -; .by >price______________39 -; .by >price______________40 -; .by >price______________41 -; .by >price______________42 -; .by >price______________43 -; .by >price______________44 -; .by >price______________45 -; .by >price______________46 -; .by >price______________47 .by >price_White_Flag_____ .by >price_Battery________ - .by >price_Bal_Guidance___ - .by >price_Horz_Guidance__ - .by >price_Floating_Tank__ - .by >price_Lazy_Boy_______ + .by >price_Hovercraft_____ .by >price_Parachute______ .by >price_StrongParachute .by >price_Mag_Deflector__ .by >price_Shield_________ .by >price_Heavy_Shield___ .by >price_Force_Shield___ - .by >price_Super_Mag______ .by >price_Bouncy_Castle__ .by >price_Long_Barrel____ .by >price_Nuclear_Winter_ @@ -327,36 +307,16 @@ WeaponPriceL .by ListOfWeapons - sta xbyte+1 - stx xbyte - txa ; now there is zero here + adw xbyte #ListOfWeapons + ldy #0 ClearList1 + tya sta (xbyte),y - iny - bne DoNotIncHigher1 - inc xbyte+1 -DoNotIncHigher1 - cpy #ListOfWeapons1End + inw xbyte + cpw xbyte #ListOfWeapons1End bne ClearList1 ; And the same we do with the second list @@ -955,14 +943,14 @@ DefActivationEnd .proc PutLitteChar ; first let's clear both lists from little chars mwa #ListOfWeapons xbyte - ldx #last_defensive_____ ; there are 52 lines total + ldx #last_defensive_____ ; there are xx lines total ldy #$00 EraseLoop tya ; lda #$00 sta (xbyte),y adw xbyte #32 ; narrow screen dex - bpl EraseLoop + bne EraseLoop ; now let's check which list is active now bit WhichList @@ -979,8 +967,7 @@ AddLoop2 SelectList2 lda #$7f ; little char (tab) - this is the pointer sta (xbyte),y - ; now we clear flags of presence of list "out of screen" - ; unfortunately I am now sure what it means... :( + ; now we clear up and down arrows indicating more content below or above screen ldx #EmptyLine stx MoreUpdl diff --git a/variables.asm b/variables.asm index b965f0b..6573a2a 100644 --- a/variables.asm +++ b/variables.asm @@ -273,9 +273,9 @@ temptankNr .DS 1 ; tables with indexes of weapons on the right lists ; OK (2022) so, L1 is list of offensive weapons, L2 - defensive IndexesOfWeaponsL1 - .ds (last_offensive_____ - first_offensive____) + .ds (last_offensive_____ - first_offensive____+1) IndexesOfWeaponsL2 - .ds (last_defensive_____ - first_defensive____) + .ds (last_defensive_____ - first_defensive____+1) ;---------------------------------------------------- ; variables storing amount of weapons on the first and second @@ -329,17 +329,17 @@ LaserCoordinate .DS 8 ; 2,2,2,2 ; from $30 the defensive weapons begin TanksWeapons TanksWeapon1 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] TanksWeapon2 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] TanksWeapon3 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] TanksWeapon4 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] TanksWeapon5 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] TanksWeapon6 - .DS [64] + .DS [last_defensive_____ - first_offensive____ +1] mountaintable ;table of mountains (size=screenwidth) .DS [screenwidth] diff --git a/weapons.asm b/weapons.asm index 51fc624..7f6b356 100644 --- a/weapons.asm +++ b/weapons.asm @@ -19,39 +19,38 @@ pha rts ExplosionRoutines - .word babymissile-1 - .word missile-1 - .word babynuke-1 - .word nuke-1 - .word leapfrog-1 - .word funkybomb-1 - .word mirv-1 - .word deathshead-1 - .word napalm-1 ;napalm - .word hotnapalm-1 ;hotnapalm - .word tracer-1 - .word tracer-1 ;smoketracer - .word babyroller-1 - .word roller-1 - .word heavyroller-1 - .word riotcharge-1 - .word riotblast-1 - .word riotbomb-1 - .word heavyriotbomb-1 - .word babydigger-1 - .word digger-1 - .word heavydigger-1 - .word babysandhog-1 - .word sandhog-1 - .word heavysandhog-1 - .word dirtclod-1 - .word dirtball-1 - .word tonofdirt-1 - .word liquiddirt-1 - .word dirtcharge-1 - .word VOID-1 ;earthdisrupter - .word VOID-1 ;plasmablast - .word laser-1 + .word babymissile-1 ;Baby_Missile___;_00 + .word missile-1 ;Missile________;_01 + .word babynuke-1 ;Baby_Nuke______;_02 + .word nuke-1 ;Nuke___________;_03 + .word leapfrog-1 ;LeapFrog_______;_04 + .word funkybomb-1 ;Funky_Bomb_____;_05 + .word mirv-1 ;MIRV___________;_06 + .word deathshead-1 ;Death_s_Head___;_07 + .word napalm-1 ;Napalm_________;_08 + .word hotnapalm-1 ;Hot_Napalm_____;_09 + .word tracer-1 ;Tracer_________;_10 + .word tracer-1 ;Smoke_Tracer___;_11 + .word babyroller-1 ;Baby_Roller____;_12 + .word roller-1 ;Roller_________;_13 + .word heavyroller-1 ;Heavy_Roller___;_14 + .word riotcharge-1 ;Riot_Charge____;_15 + .word riotblast-1 ;Riot_Blast_____;_16 + .word riotbomb-1 ;Riot_Bomb______;_17 + .word heavyriotbomb-1 ;Heavy_Riot_Bomb;_18 + .word babydigger-1 ;Baby_Digger____;_19 + .word digger-1 ;Digger_________;_20 + .word heavydigger-1 ;Heavy_Digger___;_21 + .word babysandhog-1 ;Baby_Sandhog___;_22 + .word sandhog-1 ;Sandhog________;_23 + .word heavysandhog-1 ;Heavy_Sandhog__;_24 + .word dirtclod-1 ;Dirt_Clod______;_25 + .word dirtball-1 ;Dirt_Ball______;_26 + .word tonofdirt-1 ;Ton_of_Dirt____;_27 + .word liquiddirt-1 ;Liquid_Dirt____;_28 + .word dirtcharge-1 ;Dirt_Charge____;_29 + .word VOID-1 ;Buy_me_________;_30 + .word laser-1 ;Laser__________;_31 VOID tracer @@ -670,21 +669,6 @@ DiggerCharacter mva EndOfTheBarrelY ybyte mva #0 ybyte+1 - ;clc - ;lda xtankstableL,x - ;adc EndOfTheBarrelX,y ; correction of the end of the barrel point (X) - ;sta xbyte - ;lda xtankstableH,x - ;adc #0 - ;sta xbyte+1 - ;sec - ;lda ytankstable,x - ;sbc EndOfTheBarrelY,y ; correction of the end of the barrel point (Y) - ;sta ybyte - ;lda #$00 - ;sbc #$00 - ;sta ybyte+1 - mwa xdraw LaserCoordinate mwa ydraw LaserCoordinate+2 mwa xbyte LaserCoordinate+4 @@ -3028,7 +3012,8 @@ RangesChecked .endp ;-------------------------------------------------- .proc ClearScreenSoilRange -; cleanup of the soil fall down ranges (left and right) ;-------------------------------------------------- +; cleanup of the soil fall down ranges (left and right) +;-------------------------------------------------- mwa #screenwidth RangeLeft lda #0 sta RangeRight @@ -3043,17 +3028,6 @@ RangesChecked jsr DecreaseWeapon ; and here we have amount of possessed ammo for given weapon sta WeaponDepleted -; ;cmp #0 -; bne AmmunitionDecreased -; ;lda #0 ;if ammo for given weapon ends -; sta ActiveWeapon,x ;then set to default weapon (baby missile) -;AmmunitionDecreased -; lda #99 -; ldy #0 -; sta (weaponPointer),y ;baby missile - always 99 pieces -; -; ;there is a good value in weaponPointer after jsr DecreaseWeapon -; rts .endp