glerminal/examples/basic.cpp
2024-05-14 17:16:06 -05:00

39 lines
735 B
C++

#include <glerminal.h>
namespace
{
void init()
{
glerminal_update_palette(0, 0x00000000);
glerminal_update_palette(1, 0xFF00001F);
glerminal_update_palette(2, 0x00FF001F);
glerminal_update_sprite(1, {
2, 2, 2, 2, 2, 2, 2, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 1, 1, 1, 1, 1, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2
});
glerminal_set(0, 0, 0, 1);
glerminal_set(1, 0, 0, 1);
glerminal_set(1, 0, 1, 1);
glerminal_set(2, 0, 0, 1);
glerminal_set(2, 0, 1, 1);
glerminal_set(2, 0, 2, 1);
}
void mainloop(float dt)
{
glerminal_flush();
}
}
int main(int argc, char** argv)
{
glerminal_run(init, mainloop);
}