1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| global A as integer
global T(200) as integer
'13 tiles de 32x32 : 208 Tiles en mémoire.
loadtiles Decor6,32,160 '0 Terrain neutre
loadtiles Decor7,32,192 '1 Sac Double
loadtiles decor8,32,224 '2 Sac Simple
loadtiles Decor1,32,240 '3 Barbelé droite
loadtiles decor2,32,256 '4 Barbelé Milieu
loadtiles decor3,32,272 '5 Barbelé gauche
loadtiles decor10,32,288 '6 végétation 1
loadtiles decor11,32,304 '7 végétation 2
loadtiles decor12,32,320 '8 Végétation 3
loadtiles decor4,32,336 '9 rocher 1
loadtiles decor9,32,352 '10 rocher 2
loadtiles decor13,32,368 '11 Sable 1
loadtiles decor5,32,384 '12 Sable 2
Map1:
DATAINT 7,0,0,1,0,0,1,0,6,0 'End
DATAINT 0,2,2,2,0,0,2,2,2,0
DATAINT 0,6,0,0,7,0,0,8,0,0
DATAINT 12,0,0,0,0,0,0,0,0,0
DATAINT 8,0,1,0,3,5,0,1,0,0
DATAINT 0,0,1,0,0,0,0,1,0,0
DATAINT 2,2,2,7,0,0,0,2,2,2
DATAINT 0,0,0,0,0,0,0,0,0,0
DATAINT 0,1,0,0,9,0,0,1,0,0
DATAINT 0,1,6,0,0,0,0,1,0,0
DATAINT 0,3,4,4,4,4,4,4,5,0
DATAINT 10,0,0,0,0,0,0,0,0,6
DATAINT 8,0,0,1,0,0,1,0,11,0
DATAINT 0,2,2,2,0,0,2,2,2,0
DATAINT 0,2,0,0,0,0,0,0,2,0
DATAINT 0,7,0,0,8,0,0,0,0,0 'Start
palettes pallettedata_decor,1,0,16
setgfxplane Scroll_B
setscrollplane Scroll_B
setscrollmode hscroll_overall,vscroll_overall
'Lecture de la Map
reload Map1
for i=1 to 160
readint t(i)
next
'Init Scroll
scroll down,224,scroll_b
'Création de la carte 320 x 512
for i=0 to 15
for j=0 to 9
'Compteur
c++
if t(c)=0 then drawtilesinc 160+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=1 then drawtilesinc 192+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=2 then drawtilesinc 224+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=3 then drawtilesinc 240+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=4 then drawtilesinc 256+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=5 then drawtilesinc 272+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=6 then drawtilesinc 288+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=7 then drawtilesinc 304+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=8 then drawtilesinc 320+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=9 then drawtilesinc 336+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=10 then drawtilesinc 352+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=11 then drawtilesinc 368+palette(1), 0+(j*4), 0+(i*4), 4, 4
if t(c)=12 then drawtilesinc 384+palette(1), 0+(j*4), 0+(i*4), 4, 4
next
next
while 1
if joypad(0).0 then a++
if joypad(0).1 then a--
scroll up,a,scroll_b
sleep 2
wend
pallettedata_decor:
DATAINT $0046,$0046,$0066,$0024,$0068,$0000,$0888,$0ECC
DATAINT $0444,$0222,$06A8,$048C,$02A4,$0262,$04AC,$0026 |
Partager