Ecco la mia proposta di modifica
insertEnemy:
lda xActSpeed+4 ; exit if fire is already on
bne exitIE
lda yAct+2 ; skip fire if kong is not climbed
cmp #POS_STY2
beq exitIE2
jsr random
cmp #$40 ; gimme a f*king break! =)
bcc exitIE
bmi exitIE
and #$01 ; give positive or negative velocity at random
tay
lda xActLo+2 ; don't fire at sx if too near at sx
cmp #50
bcs dontforcedx
ldy #1
dontforcedx
lda xActHi+2
and #$01
beq dontforcesx
ldy #0
dontforcesx
lda xacttbl,y
sta xActSpeed+4
;lda #7 ; give a "fire" at screen
;sta 53280
lda #0
sta xActLo+4
sta xActHi+4
lda yAct+2 ; use same y location of kong
sta yAct+4
lda #ACT_FIRE
sta actType+4
rts
exitIE2:
lda #$ff
sta yAct+4
exitIE:
rts
xacttbl byte $04,$fc
e il diff con tutte le mie modifiche all'ultimo sorgente
--- elav.s Mon Jul 31 11:07:28 2006
+++ C:\Q\elav\x\elav12_mod.s Mon Jul 31 11:07:22 2006
@@ -223 +223 @@
- ;stx 53280
+ stx 53280
@@ -428,3 +426,0 @@
- lda yAct+2 ; skip fire if kong is not climbed
- cmp #POS_STY2
- beq exitIE
@@ -434,0 +431,5 @@
+ lda yAct+2 ; skip fire if kong is not climbed
+ cmp #POS_STY2
+ beq exitIE2
+
+
@@ -436,9 +437,3 @@
- and #$01
- bne turn ; give positive or negative velocity at random
- ldy #4
- bne skipTurn
-turn:
- ldy #$fc
-skipTurn:
- cmp #$05
- bcs exitIE
+ cmp #$40 ; gimme a f*king break! =)
+ bcc exitIE
+ bmi exitIE
@@ -445,0 +441,2 @@
+ and #$01 ; give positive or negative velocity at random
+ tay
@@ -449,2 +446,3 @@
- bcs skipInv
-
+ bcs dontforcedx
+ ldy #1
+dontforcedx
@@ -453 +451 @@
- bne skipInv
+ beq dontforcesx
@@ -455,6 +453,6 @@
- ldy #$fc
-skipInv:
- sty xActSpeed+4
-
- lda #7 ; give a "fire" at screen
- sta 53280
+ ldy #0
+dontforcesx
+ lda xacttbl,y
+ sta xActSpeed+4
+ ;lda #7 ; give a "fire" at screen
+ ;sta 53280
@@ -470,0 +469,4 @@
+ rts
+exitIE2:
+ lda #$ff
+ sta yAct+4
@@ -473,0 +476 @@
+xacttbl byte $04,$fc
@@ -782 +785 @@
-=================================
+;=================================
@@ -1429 +1432 @@
- stx 53280 ; use black color
+ ;stx 53280 ; use black color
@@ -2012,0 +2016 @@
+ jsr exitIE2
ho tolto le modifiche a $d020 di debug. Suggerirei inc/dec sul colore dello sprite quando viene colpito, renderebbe di piu'.