1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-01-12 03:30:09 +00:00
millfork/examples/a8/landscape.mfk

45 lines
792 B
Plaintext
Raw Normal View History

2020-09-25 03:08:33 +02:00
// idea @ilmenit
// https://demozoo.org/productions/280623/
alias prev_x = os_OLDCOL
alias cursor_x = os_COLCRS
alias prev_y = os_OLDROW
alias cursor_y = os_ROWCRS
alias color = os_ATACHR
2020-09-25 11:20:16 +02:00
byte i
2020-09-25 03:08:33 +02:00
array(byte) color_height = [
170,150,144,144,122,122,110,110,94,94,86,86,82,80
]
asm void openmode(byte register(a) m) @ $ef9c extern
asm void drawto() @ $f9c2 extern
void main(){
openmode(9)
os_COLOR4 = $b0
for i,0,to,79 {
cursor_x = i
prev_x = i
2020-09-25 09:45:48 +02:00
color = 13
prev_y = 1
2020-09-25 03:08:33 +02:00
while color != $ff {
cursor_y = color_height[color]
if (pokey_random & 1) != 0 {
2020-09-25 11:20:16 +02:00
color_height[color] += 1
2020-09-25 03:08:33 +02:00
} else {
if (pokey_random & 1) != 0 {
2020-09-25 11:20:16 +02:00
color_height[color] -= 1
2020-09-25 03:08:33 +02:00
}
}
drawto()
color -= 1
}
}
while true {}
}