8)
won't look like 8)
include "asm.inc"
window 640,480,1
LoadImage "gfx/greentoy.bmp",1
! GetDC Lib "user32.dll" (sys hdc) as sys
! BitBlt Lib "gdi32.dll" (sys hdc,xscr,yscr,width,height,dsthdc,xdst,ydest,rob)
! StretchBlt Lib "gdi32.dll" (sys DstHdc,xDst,yDst,wDst,hDst,ScrHdc,xScr,yScr,wScr,hScr,rop) as sys
! SetStretchBltMode Lib "gdi32.dll" (sys hdc,mode) as sys
w = ScreenW
h = ScreenH
hwnd = GetHwnd()
bHdc = GetBufferDC()
hdc = GetDC(hwnd)
Image 1,0,0
WinText "AN EASY DEMO"
while KeyDown(27)=0
DoEvents() 'important!
StretchBlt(hdc,0,0,w,h,bHdc,0,0,imageW(1),imageH(1),0xCC0020)
Wait 10
wend
WinEnd()
some particlesinclude "asm.inc"
window 800,400,1
ShowMouse (off)
CenterMousePos()
single particle0[1000]
single particle1[1000]
single particle2[1000]
single particle3[1000]
single particle4[1000]
single particle5[1000]
single degree1[360]
single degree2[360]
int max=1000
for i=0 to 359
degree1[i]=sin(i)
degree2[i]=cos(i)
next
for i=0 to max-1
particle4[i]=0
next
while KeyDown(VK_ESCAPE)=0
Color 200,200,200
FillCircle xMouse()-36,yMouse()-32,20
FillCircle xMouse()+18,yMouse()-32,20
color 255,100,50
FillCircle xMouse()-20,yMouse()-32,40
Color 0,220,0
DrawPoint xMouse()-10,yMouse()-22,4
DrawPoint xMouse()+04,yMouse()-22,4
for k=1 to 7
spawni=Rand(1,max)-1
if particle4[spawni] = 0
particle0[spawni] = xMouse()
particle1[spawni] = yMouse()-5
particle2[spawni] = degree1[Rand(1,359)]/2
particle3[spawni] = degree2[Rand(1,359)]/2
particle4[spawni] = Rand(100,249)
particle5[spawni] = particle4[spawni]/5
end if
next
for i=0 to max-1
if particle4[i] >0
particle0[i] = particle0[i] + particle2[i]
particle1[i] = particle1[i] + particle3[i]
particle3[i] = particle3[i] + Rand(1,10)/100
particle4[i] = particle4[i]-1
if particle1[i] >399
particle3[i] = -particle3[i]*(Rand(1,10)/20)
end if
end if
next
for i=0 to max-1
Color 0,0,0
if particle4[i] > 0 then
if particle4[i]< particle5[i]
Color 128,128,128
end if
if particle4[i]> (particle5[i])
color 255,255,255
end if
if particle4[i]> (particle5[i]*2)
Color 196,196,196
end if
if particle4[i]> (particle5[i]*3)
Color 96,96,96
end if
if particle4[i]> (particle5[i]*4)
color 82,82,82
end if
fillcircle particle0[i],particle1[i],6
end if
next
Color 255,255,255
text 260,16,16,"PARTICLE APE"
Flip()
Wait (10)
Cls 5,20,255
wend
WinEnd
mutationinclude "asm.inc"
window 640,480,1
SetFrames (60)
Sub Draw(single x,y)
sx = x-40
sy = y-40
fillcircle sx, sy, 80
End Sub
single i,a
while key(27)=0
cls 128,128,28
for i=1 to 6.4 step .1
x = sin(i) * 100 + 200
y = cos(i) * 100 + 200
Color mod(i*70,255),mod(i*60,255),mod(i*50,255)
Draw( x+100+sin(a*i)*70,y+20+cos(a*i)*50 )
next
a +=.01
if a >=360 then a =-a
Color 255,255,255
Text 220,8,14,"WHAT IS THAT!"
Flip()
wend
winEnd
Fun gameclick on all stars.
is only a joke.
include "asm.inc"
window 640,480,1
SetFrames 60
sys x,y,a,zx,zy,co,w
sys Area [300]
sys xBang[32]
sys yBang[32]
sys zBang[32]
LoadTile ("gfx/stars32.bmp",16,2) 'returns 1
LoadImage("gfx/spark18.bmp",18) 'returns 1
LoadImage("gfx/space.bmp",1) 'returns 2
LoadWav("gfx/magic.wav") 'returns 1
LoadWav("gfx/laugh.wav") 'returns 2
for y=1 to 14
for x=1 to 19
z = y*20+x
a = Rnd(11)
if a=1
Area[z]=1
co +=1
end if
next
next
Sub ShowArea()
for y=0 to 14
for x=0 to 19
z = y*20+x
if Area[z]=1 then DrawTile(1,x*32,y*32,zx,zy)
next
next
zx +=1
if zx=16
zx=0
zy +=1
if zy=2 then zy=0
end if
End Sub
Sub Buffer(sys bx,by)
for c=0 to 31
if yBang[c] = 0
yBang[c] = by
xBang[c] = bx
Return 0
end if
next
End Sub
Sub Mouse()
mx = trunc(xMouse()/32)
my = trunc(yMouse()/32)
z = my*20+mx
if MouseButton()=1 and Area[z]=1
Buffer mx*32,my*32
Area[z]=0
co -=1
Playwav 1
end if
End Sub
Sub Bang()
for x=0 to 31
if yBang[x] >0
for b=0 to 3
ScaleImage 1,xBang[x]-16,yBang[x]-16,64,64,zBang[x]
next
zBang[x] +=1
if zBang[x] = 18
zBang[x] = 0
yBang[x] = 0
xBang[x] = 0
end if
end if
next
End Sub
while KeyDown(VK_ESCAPE)=0
Image 2,0,0
ShowArea()
Mouse()
Bang()
Color 254,197,32
Text(8,8,24,"STARS " & co)
if co=0
Color 255,255,255
Text 200,200,24,"YOU HAVE WON"
Text 200,230,26,"PRESS ESCAPE"
if w=0
PlayWav 2
w=1
end if
end if
Flip()
wend
WinEnd
It is indeed very nice to see Oxygen's error reports becoming more and more precise and intelligent and thus more helpful in isolating the bugs. :)
To err is human, to forgive is divine.