PurePunch Contest #2
@Demivec:
yes i know... it seems to happens only for 24 bit images... i have no idea why does this happens and whats wrong with the code nor how to fix it...
please read the info in the header ^^ anyway thx for feedback
yes i know... it seems to happens only for 24 bit images... i have no idea why does this happens and whats wrong with the code nor how to fix it...
please read the info in the header ^^ anyway thx for feedback

va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
SETI finally finds evidence of ET, planet of the axe apes!
how they built a radio or got hold of axe guitars and overdrives on their amps we'll never know!
Tune in stick cheese in ears!
how they built a radio or got hold of axe guitars and overdrives on their amps we'll never know!
Tune in stick cheese in ears!
Code: Select all
;*****************************************************************************
;*
;* Name :SETI Finally finds evidence of ET
;* Author :idle - andrew ferguson
;* Date :29/06/2009
;* Notes :windows only tested on XP!!!!
;*****************************************************************************
Structure WTF:T.w:c.w:ns.l:ab.l:nb.w:bs.w:cb.w:EndStructure
Global FP,wf.WTF,wh.WAVEHDR,hw.i,sz=44100*300,*w=AllocateMemory(sz),t2.i
Procedure WOP(h,u,d,a,b):If u=#WOM_DONE:FP=1:EndIf:EndProcedure
wf\T=1:wf\C=2:wf\bs=16:wf\nS=44100:wf\nb=2:wf\ab=176400:wh\lpData=*w
wh\dwBufferLength=sz:waveOutOpen_(@hW,-1,wf,@WOP(),0,$30000):FP=0:ft=1000
waveOutPrepareHeader_(hw,wh,SizeOf(wh)):While i<sz/9:v+ft:v%32767:PokeW(*w+i,v)
Ft+Tan(i):i+2:Wend:t1=GetTickCount_():While i<sz-2:t2=GetTickCount_()-t1
t=i%((t2%2700)+700):v=Sin(t)*ft:v%32767:PokeW(*w+i,v):Ft+Tan(i*3)
i+2:Wend:waveOutWrite_(hw,wh,SizeOf(wh)):While Not FP:Delay(10):Wend
waveOutUnprepareHeader_(hw,wh,SizeOf(wh)):waveOutClose_(hw):FreeMemory(*w)
Last edited by idle on Mon Jun 29, 2009 11:53 am, edited 3 times in total.
A late stage entry. An example of an 'art' clock.

Code: Select all
;*****************************************************************************
;*
;* Name : Art Clock
;* Author : rrpl
;* Date : 30 June 09
;* Notes : Well yes it a clock - 'art' is timed to the seconds count
;*
;*****************************************************************************
l=200:m=100:W=OpenWindow(0,200,200,l,m,"Art Clock",$CC0001):InitSprite()
OpenWindowedScreen(W, 0,0, l, m, 1, 0, 0):SetTimer_(W,1,1000,0):Procedure z(v)
v=Random(v):ProcedureReturn v:EndProcedure:Procedure a():g=z(24):h=z(18)
x=z(200-g):y=z(170-h):b=z(255):g=z(255):r=z(255):Ellipse(g,h,x,y,RGB(r,g,b))
EndProcedure:Procedure u(f):For k=0 To f:a():Next:EndProcedure
ClearScreen($bbbbbb):Repeat:n=Date():e=WaitWindowEvent():If e= 16:End
ElseIf e=#WM_TIMER:If EventwParam()=1:d.s=FormatDate("%dd/%mm/%yyyy",n)
t.s=FormatDate("%hh:%ii:%ss",n):StartDrawing(ScreenOutput()):u(1)
Box(40,30, 120, 37 ,$FFFFFF):DrawText(40,30," Date: "+d):
DrawText(40,50," Time: "+t+" "):StopDrawing():EndIf:EndIf:FlipBuffers():ForEver
Results have been published on the first post : http://www.purebasic.fr/english/viewtopic.php?p=287769