projects
/
vtuts
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b33802
)
almost there
author
John Tsiombikas
<nuclear@member.fsf.org>
Thu, 27 Feb 2020 08:51:18 +0000
(10:51 +0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Thu, 27 Feb 2020 08:51:18 +0000
(10:51 +0200)
dos1/c.asm
patch
|
blob
|
history
diff --git
a/dos1/c.asm
b/dos1/c.asm
index
fb0214f
..
78a0946
100644
(file)
--- a/
dos1/c.asm
+++ b/
dos1/c.asm
@@
-1,4
+1,4
@@
-; Lowest yet: 270
+; Lowest yet: 265
bits 16
%ifdef BOOTSECT
bits 16
%ifdef BOOTSECT
@@
-12,6
+12,7
@@
SHADOW_OFFS equ 5
SIERP_PT equ code_end
RANDVAL equ code_end + 4
SIERP_PT equ code_end
RANDVAL equ code_end + 4
+SIERP_VERTS equ code_end + 8
%macro WAIT_VBLANK 0
%macro WAIT_VBLANK 0
@@
-147,12
+148,12
@@
animate:
mov di, sierp_verts
mov si, sierp_vel
.loop:
mov di, sierp_verts
mov si, sierp_vel
.loop:
- mov ebx, 2
+ mov bx, 4
.xyloop:
mov ax, [di] ; grab vertex X
add ax, [si] ; add velocity X
jl .xout
.xyloop:
mov ax, [di] ; grab vertex X
add ax, [si] ; add velocity X
jl .xout
- cmp ax, [ebx * 2 + bounds - 2]
+ cmp ax, [bx + bounds - 2]
jge .xout
jmp .skip_xflip
.xout:
jge .xout
jmp .skip_xflip
.xout:
@@
-164,7
+165,7
@@
animate:
; to do the same for Y increment edi and esi by 2
add di, 2
add si, 2
; to do the same for Y increment edi and esi by 2
add di, 2
add si, 2
- dec bx
+ sub bx, 2
jnz .xyloop
dec cx
jnz .xyloop
dec cx