; hsp3dish + fullscreen test ; ; Windows10 x64 22H2 + HSP 3.7beta7 #include "hsp3dish.as" #include "d3m.hsp" #packopt name "fullscreen_hsp3dish" #packopt type 0 #define TEX_FILE "texa2.png" #pack TEX_FILE #define KB_ESC $000080 #define FRAMERATE 60 ; get desktop size dispx = ginfo_dispx dispy = ginfo_dispy ; initialize window without frame bgscr 0, dispx, dispy, 0 ; load image imgid = 3 celload TEX_FILE, imgid ; split image, set orign. celdiv imgid, 512, 512, 256, 256 ; Set the buffer to draw from. Windows ID 0 gsel 0, 1 ; Set screen clear color to be performed when redraw 0 is called. ; 0 or 1, color ($000000 - $ffffff) setcls CLSMODE_SOLID, $4080c0 font "Tahoma", 24, 1 angle = 0.0 time_start = d3timer() *mainloop ; ESC key to exit stick key, 0 if key & KB_ESC : goto *jobend tm = d3timer() - time_start fps = d3getfps() angle += 0.5 redraw 0 ; draw start ; clear screen ; color 64, 128, 192 ; boxf objmax = 64 repeat objmax r = double(dispy) * 0.5 a = angle + (270.0 / double(objmax)) * double(cnt) x = int(r * cos(deg2rad(a))) + (dispx / 2) y = int(r * sin(deg2rad(a))) + (dispy / 2) d = double(cnt) / double(objmax) ; draw image by crlput gmode gmode_rgb0 ; alpha channel enabled. Semi transparency disabled. pos x, y scale = 8.0 - (7.5 * d) idx = (cnt \ 4) rot = deg2rad(angle * 2.0 + 360.0 * d) celput imgid, idx, scale, scale, rot loop color 255, 255, 255 pos 10, 10 mes strf("[%dx%d] %d/%dFPS", dispx, dispy, fps, FRAMERATE) redraw 1 ; draw end. screen refersh await (1000 / FRAMERATE) ; await 12 goto *mainloop *jobend: end