glerminal/examples/basic.cpp

31 lines
517 B
C++

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