// IDE Version: 16.793
// SETCURRENTDIR("Media") // go to media files
ALLOWESCAPE TRUE
GLOBAL fps_time% = 0,fps_temp% = 0
GLOBAL frametime% = 10000 // millisecs
SETSCREEN 800,600,0
GLOBAL dip1% = TRUE, dip2% = TRUE
//--------------------------------------------------------------
SETLOOPSUB "MainLoop"
SUB MainLoop:
fps_time = GETTIMERALL()
IF (fps_time-fps_temp)> 1000 AND frametime > 0
frametime = frametime - 1000
fps_temp = fps_time
ENDIF
IF frametime = 0 THEN dip1 = FALSE
IF dip1 = TRUE
DRAWRECT 100,100,100,100,RGB(0x00, 0x80, 0x00)
PRINT frametime/1000,110,110
ENDIF
IF MOUSEAXIS(3)
frametime = 10000
dip1 = TRUE
ENDIF
PRINT getfps()+" FPS",10,10
PRINT "left mousebutton reset", 10,40
SHOWSCREEN
ENDSUB
//-------------------------------------------------------------
FUNCTION getfps:
STATIC fps_time%,fps_counter%,fps%,fps_temp%
fps_time = GETTIMERALL()
fps_counter = fps_counter + 1
IF (fps_time-fps_temp)>1000
fps_temp = fps_time
fps = fps_counter
fps_counter = 0
ENDIF
RETURN fps
ENDFUNCTION
Quote from: spacefractal on 2023-Dec-28Happy Xmas.
etc im today finally got my Spectrum Next issue 2 machine. Currectly working a that remake named "Head Over Heels" to that as one of the strect issue 2 kickstarter. Im guess all/most speccy games know that game. hihi.