Author Topic: Snow & wind With Forerunner  (Read 2210 times)

0 Members and 2 Guests are viewing this topic.

Peter

  • Guest
Snow & wind With Forerunner
« on: December 21, 2015, 09:15:24 AM »
Hello, :o
Code: [Select]
include "asm.inc"
window  800,600,1
setframes (20)
loadimage "bmp/snowball.bmp"
loadimage "bmp/xmas.bmp"

type rain
    single x,y
    int fs, angle
end type
rain drop[1000]

h = scrH
w = ScrW
int drops

while key(27)=0
drawimage 2,0,0
if drops =0 then
   for i=1 to 1000
       drop[i].x  = rand(0,w)
       drop[i].y  = 0
       drop[i].fs = rand(14,16)
       drop[i].angle = rand(100,110)
   next
   drops=1
endif

for i=1 to 1000
    drop[i].x = drop[i].x + cos(drop[i].angle)*drop[i].fs
    drop[i].y = drop[i].y + sin(drop[i].angle)*drop[i].fs
    drawimage 1, drop[i].x+cos(drop[i].angle)*drop[i].fs, drop[i].y+drop[i].y+sin(drop[i].angle)*drop[i].fs         
    if drop[i].y > rand(400,600)
       drop[i].x = rand(0,w)
       drop[i].y = -10
    endif
    if drop[i].x < 0 then drop[i].x = w
    if drop[i].x > w then drop[i].x = 0
next
sync()
wend         
winEnd

.

Mike Lobanovsky

  • Guest
Re: Snow & wind With Forerunner
« Reply #1 on: December 21, 2015, 10:00:42 PM »
Thanks Peter,

That one's been added to my FBSL collection too. :)

.

Aurel

  • Guest
Re: Snow & wind With Forerunner
« Reply #2 on: December 22, 2015, 04:06:27 AM »
 I don't have such a powerful tools just my old crappy AB  :'( :'( :'( :'(
but here is the moment:


Code: [Select]
test gif image
DEFNUM img xpos ypos wpos hpos
DEFSTR imgname
'set window with Vscrollbar
WIN 0 0 640 480 # "Gif Logo"
MainColor 220 220 230
'set image name as string
LET imgname = "xmas2.gif"
xpos=0
ypos=0
LoadImage@STARTPATH img <BITMAP> imgname
ShowImage img <BITMAP> xpos ypos
' wait for subs
WAIT

/ it looks that i must create simple image viewer in Oxygen /
 :)

.

Peter

  • Guest
Re: Snow & wind With Forerunner
« Reply #3 on: December 22, 2015, 07:39:57 AM »
Quote
it looks that i must create simple image viewer in Oxygen

Hi Aurel,

something is wrong!
it  shows no tga files or png files's.  :o