#define PRAGMA_POINTER
#include <acknex.h>
void main()
{
//d3d_triplebuffer = 1; // doesn't affect the stuttering
byte UseFullscreen = false;
//
wait(1);
if(UseFullscreen)
{
video_set(sys_metrics(0), sys_metrics(1), 0, 1);
}
else
{
video_set(1280, 720, 0, 2);
}
fps_max = 60;
vec_set(&screen_color, vector(40, 32, 30));
draw_textmode("Segoe UI Light", 0, 30, 100);
//
var width = 1;
var height = screen_size.y;
var speed = 4;
VECTOR Pos;
Pos.x = -width;
Pos.y = 0;
Pos.z = 0;
while(!key_esc)
{
draw_quad(NULL, &Pos, NULL, vector(width, height, 0), NULL, vector(230, 225, 30), 100, 0);
draw_quad(NULL, vector(cycle(Pos.x - speed, 0, screen_size.x), Pos.y, 0), NULL, vector(width, height, 0), NULL, COLOR_BLACK, 100, 0);
draw_text("frametime in milliseconds:", 10, 10, vector(232, 205, 159));
draw_text(str_for_float(NULL, dtimer() / 1000.0), 10, 40, vector(232, 205, 159));
// move to the right at constant rate
Pos.x += speed;
while(Pos.x > screen_size.x)
Pos.x -= screen_size.x;
wait(1);
}
//
sys_exit(NULL);
}