home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Falcon 030 Power 2
/
F030_POWER2.iso
/
ST_STE
/
MAGS
/
TOXIC_13.ARJ
/
TOXIC_13.MSA
/
PROGRAMS
/
CODING.LZH
/
FEU.S
< prev
Wrap
Text File
|
1997-08-11
|
5KB
|
280 lines
LIST
*****************************
* ROUTINE DE FLAME *
* SUPERNOVA/SUPREMACY SOFT. *
* POUR TOXIC MAG. *
*****************************
NOLIST
larg=16
haut=32
rapport=haut/20+1
wide=larg/16
opt o+
pea 0.w
move #$20,-(sp)
trap #1
addq.l #6,sp
tst.b $ffff8260.w
beq.s dejabas
move.b #1,reso
dejabas
pea 0.w
pea -1.w
pea -1.w
move #5,-(sp)
trap #14
adda #14,sp
move.l #pal,$45a.w
* On effectue les precalculs pour avoir les offset des X et des Y dans la mémoire écran
bsr calc_big_table
bsr make_line_table
lea line_table,a5 Buffer contenant les precalculs en Y
move.l $44e.w,a3
repeat
move #larg/8,d7 d7=nombre de barettes à dessiner à la base
for_i
move #17,-(sp)
trap #14
addq.l #2,sp
and.l #$000000ff,d0 random(255)
cmp.w #larg,d0 on ne doit pas dépasser la largeur voulue
bgt.s for_i
lea matrice,a0 a0=écran virtuel
add.l #larg*(haut-1)*2,a0 a0 pointe sur la dernière ligne de l'écran virtuel (foyer)
add d0,d0 d0=d0*2 (recherche de MOTS) d0=case x du tableau
move #wide,d6 d6=largeur d'une barette
base move #rapport*16,0(a0,d0) on met la couleur maximum
addq #2,d0 on allume le pixel d'à coté
dbf d6,base pixel suivant
dbf d7,for_i barette suivante
loop
moveq #0,d7 d7=y on commence en haut
for_y
moveq #0,d6 d6=x on commence à gauche
for_x
move d6,d5 on ne modifie pas d6
add d5,d5 colone
move d7,d4 on ne modifie pas d7
addq #1,d4 ligne suivante
mulu #larg,d4
add d4,d4
lea matrice,a0 écran virtuel
add.l d4,a0 on pointe la bonne ligne
add.l d5,a0 et la bonne colonne
move.l a0,a1 sauve position x,y
sub #larg*2-2,a1 pour allumer la case avec la couleur calculée après
moveq #0,d4 d4=couleur calculée
add (a0),d4 x-1,y+1
add 2(a0),d4 x,y+1
add 4(a0),d4 x+1,y+1
add.l #larg*2,a0 ligne suivante
add 2(a0),d4 x,y+1
p divu #4,d4 moyenne
move d4,(a1) stocke la nouvelle couleur
next_x
lea color,a0 buffer des couleur "étalée"
add d4,d4
move 0(a0,d4),d2 on cherche la correspondance avec un vrai No de couleur
lea big_table,a6 precalculs en X
move d6,d0 d0=x
move d7,d1 d1=y
add.w d0,d0
add.w d0,d0
add d1,d1 d1=d1*2 pour la recherche des MOTS dans le tableaux
move (a5,d1.w),d1 d1=160*d1
adda.w d0,a6
add (a6)+,d1 position du pixel dans la ligne
move (a6),d0 motif du pixel
move d0,d4
not d4 éteind l'ancien pixel
and d4,0(a3,d1.w) plan0
and d4,2(a3,d1.w) plan1
and d4,4(a3,d1.w) plan2
and d4,6(a3,d1.w) plan3
ror #1,d2 routine d'affichage du pixel 4 plans
bcc.s a test un à un les 4 bits de la couleur correspondant
or d0,0(a3,d1.w) à chaque plans et met à 1 le bit correspondant
a ror #1,d2 dans le motif
bcc.s b
or d0,2(a3,d1.w)
b ror #1,d2
bcc.s c
or d0,4(a3,d1.w)
c ror #1,d2
bcc.s d
or d0,6(a3,d1.w)
d
addq #1,d6 pixel suivant
cmp #larg,d6 fin de ligne?
bne for_x
next_y
addq #1,d7 ligne suivante
cmp #haut,d7
bne for_y
lea matrice,a0 on efface la derniere ligne de l'ecran virtuel
add.l #larg*(haut-1)*2,a0
rept larg
move #0*rapport,(a0)+ clear avec la couleur 0
endr
cmp.b #$39,$fffffc02.w
bne repeat one again...
;---------------------------
tst.b reso
beq.s bas
move #1,-(sp)
pea -1.w
pea -1.w
move #5,-(sp)
trap #14
adda #14,sp
bas
move #$555,$ffff8246.w
pea 0.w adieu monde cruel
trap #1
calc_big_table
lea big_table,a0
moveq #0,d0
moveq #19,d1
make_big_table
lea p1,a1
move #15,d2
one_line
move d0,(a0)+
move (a1)+,(a0)+
dbf d2,one_line
addq.l #8,d0
dbf d1,make_big_table
rts
calc_point
make_line_table
lea line_table,a0
moveq #0,d0
move #199,d1
m_l_t
move d0,(a0)+
add.w #160,d0
dbf d1,m_l_t
rts
x dc.w 0
y dc.w 0
big_table
ds.w 2*20*16
nop
line_table
ds.w 200
pal dc.w 0,$100,$110,$200,$210,$310,$320,$420,$430,$530,$540,$640,$650,$750,$760,$770
*dc.w 0,$770,$760,$750,$650,$640,$540,$530,$430,$420,$320,$310,$300,$210,$200,$100
p1 dc %1000000000000000
dc %0100000000000000
dc %0010000000000000
dc %0001000000000000
dc %0000100000000000
dc %0000010000000000
dc %0000001000000000
dc %0000000100000000
dc %0000000010000000
dc %0000000001000000
dc %0000000000100000
dc %0000000000010000
dc %0000000000001000
dc %0000000000000100
dc %0000000000000010
dc %0000000000000001
color
rept rapport
dc.w 0
endr
rept rapport
dc.w 1
endr
rept rapport
dc.w 2
endr
rept rapport
dc.w 3
endr
rept rapport
dc.w 4
endr
rept rapport
dc.w 5
endr
rept rapport
dc.w 6
endr
rept rapport
dc.w 7
endr
rept rapport
dc.w 8
endr
rept rapport
dc.w 9
endr
rept rapport
dc.w 10
endr
rept rapport
dc.w 11
endr
rept rapport
dc.w 12
endr
rept rapport
dc.w 13
endr
rept rapport
dc.w 14
endr
rept rapport
dc.w 15
endr
reso ds.b 1
matrice ds.w larg*haut
ds.w larg
end