Meerca and negg

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2, Sig, Sigo 2 years ago
parent c806774ad2
commit 070f99c4b0
  1. 43
      MeercaChase.cpp
  2. BIN
      MeercaChase.data
  3. 1
      MeercaChase.html
  4. 1
      MeercaChase.js
  5. BIN
      MeercaChase.wasm
  6. BIN
      assets/meerca.png
  7. BIN
      assets/negg.png
  8. 46
      main.cpp
  9. 2
      sig

@ -0,0 +1,43 @@
#define OLC_PGE_APPLICATION
#include "pixelGameEngine.h"
using namespace std;
class MeercaChase : public olc::PixelGameEngine
{
public:
olc::Decal*meerca;
olc::Decal*negg;
MeercaChase()
{
sAppName = "Meerca Chase";
}
bool OnUserCreate() override
{
meerca = new olc::Decal(new olc::Sprite("assets/meerca.png"));
negg = new olc::Decal(new olc::Sprite("assets/negg.png"));
SetPixelMode(olc::Pixel::ALPHA);
ConsoleCaptureStdOut(true);
// Called once at the start, so create things here
return true;
}
bool OnUserUpdate(float fElapsedTime) override
{
// called once per frame
DrawDecal({32,32},meerca);
DrawDecal({64,32},meerca);
DrawDecal({32,64},negg,{1,1},olc::YELLOW);
return true;
}
};
int main()
{
MeercaChase game;
if (game.Construct(256, 240, 4, 4))
game.Start();
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

@ -1,46 +0,0 @@
#define OLC_PGE_APPLICATION
#include "pixelGameEngine.h"
using namespace std;
class Example : public olc::PixelGameEngine
{
public:
Example()
{
sAppName = "Example";
}
public:
bool OnUserCreate() override
{
SetPixelMode(olc::Pixel::ALPHA);
ConsoleCaptureStdOut(true);
// Called once at the start, so create things here
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
for (int x=0;x<50;x++) {
for (int y=0;y<50;y++) {
Draw(x, y, olc::Pixel(255, 0, 0, 128));
}
}
return true;
}
bool OnUserUpdate(float fElapsedTime) override
{
// called once per frame
return true;
}
};
int main()
{
Example demo;
if (demo.Construct(256, 240, 4, 4))
demo.Start();
return 0;
}

2
sig

@ -2,7 +2,7 @@ export AUTO_UPDATE=true
source utils/define.sh
define PROJECT_NAME "C++ProjectTemplate"
define PROJECT_NAME "MeercaChase"
define CUSTOM_PARAMS "-lpng -lGL -lX11"
define LANGUAGE "C++"

Loading…
Cancel
Save