mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2025-10-02 21:20:05 +00:00
Add mouse callbacks
This commit is contained in:
@@ -9,9 +9,9 @@ namespace
|
||||
glerminal_load_sprites_file("resources/atlas.png");
|
||||
}
|
||||
|
||||
void mainloop(float dt)
|
||||
void mainloop(double dt)
|
||||
{
|
||||
static float time = 1;
|
||||
static double time = 1;
|
||||
|
||||
time += dt;
|
||||
|
||||
@@ -42,5 +42,5 @@ namespace
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glerminal_run(init, mainloop, nullptr, nullptr);
|
||||
glerminal_run({init, mainloop});
|
||||
}
|
@@ -18,9 +18,9 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void mainloop(float dt)
|
||||
void mainloop(double dt)
|
||||
{
|
||||
static float time = 0;
|
||||
static double time = 0;
|
||||
|
||||
time += dt;
|
||||
time = fmodf(time, 3.1415926f * 2);
|
||||
@@ -39,5 +39,5 @@ namespace
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glerminal_run(init, mainloop, nullptr, nullptr);
|
||||
glerminal_run({init, mainloop});
|
||||
}
|
@@ -43,9 +43,9 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void mainloop(float dt)
|
||||
void mainloop(double dt)
|
||||
{
|
||||
static float time = 0;
|
||||
static double time = 0;
|
||||
time += dt;
|
||||
|
||||
const float cx = GRID_WIDTH / 2.0f * cosf(time / 2) + GRID_WIDTH / 2.0f;
|
||||
@@ -80,5 +80,5 @@ namespace
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glerminal_run(init, mainloop, nullptr, nullptr);
|
||||
glerminal_run({init, mainloop});
|
||||
}
|
@@ -34,9 +34,9 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void mainloop(float dt)
|
||||
void mainloop(double dt)
|
||||
{
|
||||
static float time = 0;
|
||||
static double time = 0;
|
||||
|
||||
time += dt;
|
||||
|
||||
@@ -64,5 +64,5 @@ namespace
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glerminal_run(init, mainloop, nullptr, nullptr);
|
||||
glerminal_run({init, mainloop});
|
||||
}
|
Reference in New Issue
Block a user