PGEIDE/main.cpp

48 lines
737 B
C++
Raw Normal View History

2023-06-01 11:29:48 -05:00
#include "pixelGameEngine.h"
using namespace olc;
class Example : public olc::PixelGameEngine
{
public:
Example()
{
sAppName = "PGEIDE";
2023-06-01 11:29:48 -05:00
}
public:
bool OnUserCreate() override
{
std::cout<<"Created: "<<ScreenWidth()<<"x"<<ScreenHeight()<<std::endl;
2023-06-01 11:29:48 -05:00
return true;
}
bool OnUserUpdate(float fElapsedTime) override
{
return true;
}
bool OnUserDestroy()override{
return true;
}
void GetAnyKeyPress(olc::Key pressed)override{
}
};
int main(int argc, char** argv)
2023-06-01 11:29:48 -05:00
{
Example demo;
rcode code;
if (argc==3){
code=demo.Construct(std::stoi(argv[1]), std::stoi(argv[2]), 1, 1);
} else {
code=demo.Construct(1920, 1080, 1, 1);
}
if (code!=FAIL){
std::cout<<"Run"<<std::endl;
2023-06-01 11:29:48 -05:00
demo.Start();
}
2023-06-01 11:29:48 -05:00
return 0;
}