Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
OGL-Demo: analoge Uhr (1)
proc __xpse__endofprogram__
REM {{SOMEEXTRAENDCOMMAND}}
end
endproc
WindowTitle OGL-Demo: Analog-Uhr
WindowStyle 56 + 512
CLS
OGL(init,%HWND,1,1,1,0)
var TME$=
var H!=0
var M!=0
var S!=0
var CLOCKBODY%=OGL(startlist)
OGL(posmode,1)
WHILELOOP 60
OGL(rotate,0,0,&LOOP*6)
OGL(move,2.2,0,0)
IF MOD(&LOOP,5)
OGL(color,1,1,1,1)
ELSE
OGL(color,1,0,0,1)
ENDIF
OGL(sphere,0.1,9,9)
OGL(move,-2.2,0,0)
OGL(rotate,0,0,&LOOP*-6)
ENDWHILE
OGL(color,0,0,0,0)
OGL(disk,0,2.4,60)
OGL(texture,0,0)
OGL(posmode,0)
OGL(move,0,-0.2,0)
OGL(color,1,1,1,1)
OGL(sphere,0.2,15,15)
OGL(endlist)
SETTIMER 1000
WHILE 1
TME$=TIME$(0)+:+SUBSTR$(TIME$(1),1,.)
M!=SS(2)
H!=MOD(SS(1),12)+(M!/60)
S!=SS(3)
OGL(clear)
OGL(origin,0,0,-7)
PAINTCLOCK
OGL(show)
WAITINPUT
case %Key = 2 : break
ENDWHILE
KILLTIMER
WAITINPUT
__xpse__endofprogram__
proc SS
PARAMETERS I%
RETURN VAL(SUBSTR$(TME$,I%,:))
endproc
proc PAINTCLOCK
OGL(push)
OGL(color,1,1,1,1)
OGL(rotate,0,0,S!*-6)
OGL(tube,0.03,0.02,1.7,4)
OGL(rotate,0,0,S!*6)
OGL(rotate,0,0,M!*-6)
OGL(tube,0.1,0.03,2,4)
OGL(rotate,0,0,M!*6)
OGL(rotate,0,0,H!*-30)
OGL(tube,0.1,0.03,1.3,4)
OGL(rotate,0,0,H!*30)
OGL(drawlist,CLOCKBODY%)
OGL(pop)
endproc
s4 href='./../../references-fonction/XProfan/xpseendofprogram/'>__xpse__endofprogram__