mirror of
https://github.com/irmen/prog8.git
synced 2024-12-27 05:29:38 +00:00
slightly optimize loop
This commit is contained in:
parent
144199730f
commit
2e2b8c498e
@ -57,22 +57,22 @@ main {
|
|||||||
ubyte @zp x
|
ubyte @zp x
|
||||||
ubyte @zp y
|
ubyte @zp y
|
||||||
|
|
||||||
for y in 0 to 24 {
|
for y in 24 downto 0 {
|
||||||
ybuf[y] = sin8u(c1a) + sin8u(c1b)
|
ybuf[y] = sin8u(c1a) + sin8u(c1b)
|
||||||
c1a += 4
|
c1a += 4
|
||||||
c1b += 9
|
c1b += 9
|
||||||
}
|
}
|
||||||
c1A += 3
|
c1A += 3
|
||||||
c1B -= 5
|
c1B -= 5
|
||||||
for x in 0 to 39 {
|
for x in 39 downto 0 {
|
||||||
xbuf[x] = sin8u(c2a) + sin8u(c2b)
|
xbuf[x] = sin8u(c2a) + sin8u(c2b)
|
||||||
c2a += 3
|
c2a += 3
|
||||||
c2b += 7
|
c2b += 7
|
||||||
}
|
}
|
||||||
c2A += 2
|
c2A += 2
|
||||||
c2B -= 3
|
c2B -= 3
|
||||||
for y in 0 to 24 {
|
for y in 24 downto 0 {
|
||||||
for x in 0 to 39 {
|
for x in 39 downto 0 {
|
||||||
@(screen) = xbuf[x] + ybuf[y]
|
@(screen) = xbuf[x] + ybuf[y]
|
||||||
screen++
|
screen++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user