generated from sigonasr2/CPlusPlusProjectTemplate
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
905 B
66 lines
905 B
9 months ago
|
#define OLC_GFX_OPENGL33
|
||
|
#include "pixelGameEngine.h"
|
||
|
|
||
|
using namespace olc;
|
||
|
|
||
|
#define WIDTH 640
|
||
|
#define HEIGHT 480
|
||
|
|
||
|
class Example : public olc::PixelGameEngine
|
||
|
{
|
||
|
|
||
|
|
||
|
public:
|
||
|
Example()
|
||
|
{
|
||
|
sAppName = "Example";
|
||
|
}
|
||
|
|
||
|
public:
|
||
|
olc::Key last;
|
||
|
bool OnUserCreate() override
|
||
|
{
|
||
|
std::cout<<"Test"<<std::endl;
|
||
|
ConsoleShow(olc::Key::A);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
bool OnUserUpdate(float fElapsedTime) override
|
||
|
{
|
||
|
std::cout<<"Test 4"<<std::endl;
|
||
|
ConsoleCaptureStdOut(true);
|
||
|
std::cout<<"Test 2"<<std::endl;
|
||
|
ConsoleCaptureStdOut(false);
|
||
|
std::cout<<"Test 3"<<std::endl;
|
||
|
std::cout<<"A"<<std::endl;
|
||
|
Clear(BLACK);
|
||
|
DrawString({0,0},std::to_string(last));
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
bool OnUserDestroy()override{
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
enum Direction{
|
||
|
RIGHT,
|
||
|
DOWN,
|
||
|
LEFT,
|
||
|
UP
|
||
|
};
|
||
|
|
||
|
struct Data{
|
||
|
int x,y;
|
||
|
};
|
||
|
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
Example demo;
|
||
|
if (demo.Construct(640, 480, 4, 4))
|
||
|
demo.Start();
|
||
|
|
||
|
return 0;
|
||
|
}
|