Weird optimization :)

This commit is contained in:
Pecusx
2022-11-26 18:45:03 +01:00
parent 091335dbc9
commit 42cc896ec5
3 changed files with 5 additions and 4 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -4
View File
@@ -928,10 +928,10 @@ SeekLeft
.nowarn dew tempXROLLER .nowarn dew tempXROLLER
lda (tempXROLLER),y ;fukk! beware of Y value lda (tempXROLLER),y ;fukk! beware of Y value
cmp HeightRol cmp HeightRol
bne HowMuchToFallLeft ;bne HowMuchToFallLeft
HowMuchToFallLeft HowMuchToFallLeft
bcs GoRightNow bcs GoRightNow
mva #1 HowMuchToFall mva #1 HowMuchToFall
GoRightNow GoRightNow
adw xdraw #mountaintable tempXROLLER adw xdraw #mountaintable tempXROLLER
SeekRight SeekRight
@@ -940,7 +940,7 @@ SeekRight
inw tempXROLLER inw tempXROLLER
lda (tempXROLLER),y lda (tempXROLLER),y
cmp HeightRol cmp HeightRol
bne HowMuchToFallRight ;bne HowMuchToFallRight
HowMuchToFallRight HowMuchToFallRight
; check if up or down ; check if up or down
bcs HowMuchToFallKnown bcs HowMuchToFallKnown
@@ -1051,6 +1051,7 @@ UpNotYet2
lda xdraw lda xdraw
and xdraw+1 and xdraw+1
cmp #$ff ; like cpw xdraw #$ffff cmp #$ff ; like cpw xdraw #$ffff
;ora xdraw+1 ; like cpw xdraw #$0000
jne RollinContinuesLiquid jne RollinContinuesLiquid
beq FillNow beq FillNow
HowMuchToFallRight3 HowMuchToFallRight3
@@ -1062,7 +1063,7 @@ FillNow
ldy #0 ldy #0
lda HowMuchToFall lda HowMuchToFall
bmi FillHole bmi FillHole
cmp#1 cmp #1
beq FillLeft beq FillLeft
inw xdraw inw xdraw
inw xdraw ; tricky but we must rollback xdraw in proper direction inw xdraw ; tricky but we must rollback xdraw in proper direction