Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
; Player/Missile Graphics
; Demo program for ATALAN programming language
;(c) 2010 Rudla Kudla
use atari
const smiley:array =
%00000000
%00111100
%01000010
%10000001
%10100101
%10000001
%10000001
%10000001
%10100101
%10011001
%10000001
%01000010
%00111100
%00000000
;This is minimal initialization code for PMG
init'pmgbase
DMACTL = playfield + dl + players + missiles + hires_sprites
GRACTL = players + missiles
;Set the player 0 properties and define it's shape
player(0).scolor = Medium'green
player(0).x = 100
player(0).bitmap(50) = smiley
; Player/Missile Graphics
; Demo program for ATALAN programming language
;(c) 2010 Rudla Kudla
use atari
const smiley:array =
%00000000
%00111100
%01111110
%11111111
%11011011
%11111111
%11111111
%11111111
%11011011
%11100111
%11111111
%01111110
%00111100
%00000000
;This is minimal initialization code for PMG
init'pmgbase
DMACTL = playfield + dl + players + missiles + hires_sprites
GRACTL = players + missiles
;Set the player 0 properties and define it's shape
player(0).scolor = red
player(0).x = 100
player(0).bitmap(50) = smiley
player(1).scolor = red
player(1).x = 150
player(1).bitmap(80) = smiley
player(2).scolor = red
player(2).x = 80
player(2).bitmap(125) = smiley
player(3).scolor = red
player(3).x = 65
player(3).bitmap(55) = smiley
out GPRIOR@$26F:byte
GPRIOR = 1
use atari
s@$8000:array(0..39,0..23) of byte
;24 lines of text, 4th line will execute DLI
const gr0:array of dl_command = (
3 times BLANK8,
CHR0+LMS, s,
2 times CHR0,
CHR0+DLI,
20 times CHR0,
NEXT, gr0
)
const smiley:array =
%00000000
%00111100
%01111110
%11111111
%11011011
%11111111
%11111111
%11111111
%11011011
%11100111
%11111111
%01111110
%00111100
%00000000
;Here we define the Display List Interrupt (DLI) procedure.
;It is special procedure of type dli.
;dli is procedure type based on interrupt type.
set_col:dli =
wait'line
COLPF(2) = white
player(0).bitmap(150) = smiley
player(0).x = 50
player(0).scolor = red
;Initialize graphics.
sdlstl = gr0
COLOR0(2) = red+8
;This is minimal initialization code for PMG
init'pmgbase
DMACTL = playfield + dl + players + missiles + hires_sprites
GRACTL = players + missiles
out GPRIOR@$26F:byte
GPRIOR = 1
;Set the player 0 properties and define it's shape
player(0).scolor = Orange'green
player(0).x = 100
player(0).bitmap(50) = smiley
;Set the inerrupts.
on'dli set_col
use atari
s@$8000:array(0..39,0..23) of byte
;24 lines of text, 4th line will execute DLI
const gr0:array of dl_command = (
3 times BLANK8,
CHR0+LMS, s,
2 times CHR0,
CHR0+DLI,
20 times CHR0,
NEXT, gr0
)
const smiley:array =
%00000000
%00111100
%01111110
%11111111
%11011011
%11111111
%11111111
%11111111
%11011011
%11100111
%11111111
%01111110
%00111100
%00000000
%00000000
%00111100
%01111110
%11111111
%11011011
%11111111
%11111111
%11111111
%11011011
%11100111
%11111111
%01111110
%00111100
%00000000
;Here we define the Display List Interrupt (DLI) procedure.
;It is special procedure of type dli.
;dli is procedure type based on interrupt type.
set_col:dli =
wait'line
player(0).x = 50
player(0).color = Orange
COLPF(2) = white
cycle:vbi =
player(0).x = 100
player(0).scolor = Olive'green
;Initialize graphics.
sdlstl = gr0
COLOR0(2) = red+8
;This is minimal initialization code for PMG
init'pmgbase
DMACTL = playfield + dl + players + missiles + hires_sprites
GRACTL = players + missiles
out GPRIOR@$26F:byte
GPRIOR = 1
;Set the player 0 properties and define it's shape
player(0).scolor = Olive'green
player(0).x = 100
player(0).bitmap(50) = smiley
;Set the inerrupts.
on'vbi cycle
on'dli set_col