typeof env_ref=Env;; defcom Smain=main S S S S I;; fun cbTimer(trm, p)= let p -> [window bmp x y] in ( _fooS "Blitting bitmap to window"; _BLTbitmap window bmp x y; ); 0;; fun cbClear(trm, p)= let p -> [window] in ( _fooS "Clearing window"; _CLRwindow window; ); 0;; fun cbCaptureRender(trm, p)= let p -> [capture] in ( _fooS "Rendering camera to window"; _AUTORENDERcapture capture; ); 0;; fun blitBmps()= let _LDbitmap _channel _checkpack "logo.bmp" -> bitmap in let _LDalphaBitmap _channel _checkpack "logo.png" -> penege in let _GETalphaBitmaps penege -> [penegebmap penege8] in let _LDjpeg _channel _checkpack "maxresdefault.jpg" -> jepege in let _CRwindow _channel nil 0 0 1 1 0 "nil" -> window in let _GETbitmapSize bitmap -> [w1 h1] in let _GETbitmapSize jepege -> [w2 h2] in ( _rfltimer _starttimer _channel 1000 @cbTimer [window bitmap 0 0]; _rfltimer _starttimer _channel 1200 @cbTimer [window jepege w1 h1]; _rfltimer _starttimer _channel 1400 @cbTimer [window penegebmap w2 + w1 h2 + h1]; _rfltimer _starttimer _channel 2000 @cbClear [window]; ); 0;; fun blitCam()= _fooS "Creating capture device on index 0"; let _CRcapture _channel 0 -> capture in ( _fooS "Initiating reflex to blit camera to window"; if (capture == nil) then nil else _rfltimer _starttimer _channel 50 @cbCaptureRender [capture]; ); 0;; fun main(p)= set env_ref=_envchannel _channel; _fooS "Loading bitmap and creating window"; // blitBmps; blitCam; 0;;