2023-06-01 11:29:48 -05:00
|
|
|
#include "pixelGameEngine.h"
|
|
|
|
|
|
|
|
using namespace olc;
|
|
|
|
|
|
|
|
class Example : public olc::PixelGameEngine
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Example()
|
|
|
|
{
|
2023-06-01 17:45:07 +00:00
|
|
|
sAppName = "PGEIDE";
|
2023-06-01 11:29:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool OnUserCreate() override
|
|
|
|
{
|
2023-06-01 17:45:07 +00:00
|
|
|
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{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-06-01 17:45:07 +00:00
|
|
|
int main(int argc, char** argv)
|
2023-06-01 11:29:48 -05:00
|
|
|
{
|
|
|
|
Example demo;
|
2023-06-01 17:45:07 +00:00
|
|
|
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 17:45:07 +00:00
|
|
|
}
|
2023-06-01 11:29:48 -05:00
|
|
|
return 0;
|
|
|
|
}
|