glerminal/tests/basic.cpp
Shylie 1e0be8eca0
All checks were successful
Make PNG / build-app (push) Successful in 23s
Print out CWD on non-windows environments for debug purposes
2024-05-29 07:57:15 -04:00

45 lines
619 B
C++

#include <glerminal.h>
#include <test-common.h>
#include <iostream>
#ifndef _WIN32
#include <unistd.h>
#endif
namespace
{
void init()
{
if (!glerminal_load_sprites_file("resources/image.png"))
{
#ifndef _WIN32
char buffer[257] = {};
getcwd(buffer, 256);
std::cout << buffer << std::endl;
#endif
std::cout << "Failed to load texture" << std::endl;
}
for (int i = 0; i < GRID_HEIGHT; i++)
{
glerminal_set(i, i, 0, 1);
}
glerminal_flush();
glerminal_test_save_image();
glerminal_quit();
}
void mainloop(float) {}
}
int main()
{
glerminal_run(init, mainloop);
return 0;
}