From 7860a36410010733f828ed5fd4a39b702f692acf Mon Sep 17 00:00:00 2001 From: Pecusx Date: Wed, 31 May 2023 20:06:12 +0200 Subject: [PATCH] Code cleanup --- constants.asm | 6 +++--- variables.asm | 16 +++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/constants.asm b/constants.asm index 4aef9f0..3680155 100644 --- a/constants.asm +++ b/constants.asm @@ -530,10 +530,10 @@ NamesOfWeapons ;the comment is an index in the tables dta d"Auto Defense " ; 46 dta d"Spy Hard " ; 47 -DefensiveEnergy = *-(last_offensive - first_offensive +1) ; to fake the table for ALL weapons +DefensiveEnergy = *-number_of_offensives ; to fake the table for ALL weapons .by 00 ; White Flag - .by 00 ; Heat Guidance - .by 98 ; Let's go! + .by 00 ; Battery + .by 98 ; Hovercraft .by 00 ; Parachute .by 99 ; Strong Parachute .by 99 ; Mag Deflector diff --git a/variables.asm b/variables.asm index 9038e5d..616eca7 100644 --- a/variables.asm +++ b/variables.asm @@ -102,8 +102,6 @@ ResultsTable ;the results in the gameeeeee .DS MaxPlayers TempResults .DS MaxPlayers -;DirectHitsH ; one byte enough -; .DS MaxPlayers DirectHits .DS MaxPlayers EarnedMoneyH @@ -287,9 +285,9 @@ AfterBFGflag .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 +1) + .ds (number_of_offensives) IndexesOfWeaponsL2 - .ds (last_defensive - first_defensive +1) + .ds (number_of_defensives) ;---------------------------------------------------- ; variables storing amount of weapons on the first and second @@ -409,15 +407,11 @@ CharCode4x4 .DS 1 ;plot4x4color .DS 1 ;1-white, 0-background ; This is moved from display.asm to be easier to relocate ListOfWeapons - ; 0123456789012345678901234567890123456789 -; :number_of_offensives dta d" " - ;:32 dta d" " - .ds 32*32 + ; 01234567890123456789012345678901 + .ds number_of_offensives*32 ListOfWeapons1End ListOfDefensiveWeapons -; :number_of_defensives dta d" " - ;:16 dta d" " - .ds 16*32 + .ds number_of_defensives*32 ListOfDefensiveWeaponsEnd ;constant useful when clearing track_variables trackn_db .ds TRACKS