it runs a bit slow in the res i have it...
heres the code for it
heres an updated version of it
Code: Select all
;********************************
;*Name: Fire *
;*By: Dreglor *
;*last updated: 9-20-03 1:26pm *
;********************************
y.w=0
x.w=0
screen_width.w=1024
screen_height.w=768
Dim cool.w(screen_width,screen_height)
Dim buf.w(screen_width,screen_height)
yy.w=0
xx.w=0
For y=1 To screen_height-1
For x=1 To screen_width-1
cool(x,y)=Random(3)
buf(x,y)=0
Next x
Next y
InitSprite()
OpenScreen(screen_width,screen_height,32,"FIRE!")
InitPalette(256)
CreatePalette(0)
Dim color(255)
For i=0 To 84
color(i)=Int(255/84*i)+0<<8+0<<16
color(i+85)=255+Int(255/84*i)<<8+0<<16
color(i+85+85)=255+255<<8+Int(255/84*i)<<16
Next i
InitKeyboard()
Repeat
StartDrawing(ScreenOutput())
For y=1 To screen_height-1
For x=1 To screen_width-1
If buf(x,y) > 0
If buf(x,y) < 0
buf(x,y)=0
Else
buf(x,y)=((buf(x+1,y)+buf(x-1,y)+buf(x,y+1)+buf(x,y-1))/4-cool(x,y))
EndIf
buf(x,y-1)=buf(x,y)
cool(x,y-1)=cool(x,y)
cool(x,y)=Random(3)
If buf(x,y) > 0
Plot(x,y,color(buf(x,y)))
Endif
EndIf
buf(x,screen_height-2)=255
Next x
Next y
StopDrawing()
FlipBuffers()
;ClearScreen(0,0,0) don't need it :o
ExamineKeyboard()
Until KeyboardReleased(#PB_Key_Escape)
CloseScreen()
End


