LD14 Basecode
With PlatyGame in hand, I’ve got some simplified basecode ready.
#include <PlatyGame.h>
using namespace PlatyGame;int main (int argc, char* argv[]) {
if (!initialize())
return 1;
atexit(shutdown);
if (!initText())
return 2;
atexit(shutdownText);
if (!initSound())
return 3;
atexit(shutdownSound);bool fullscreen = false;
if(argc > 1) {
if(strcmp(argv[1], “fullscreen”) == 0) {
fullscreen = true;
}
}Screen screen(800, 600, “Game”, fullscreen);
if (!screen.good())
return 4;Sound snd(”snd/platymuus.wav”);
BitmapSprite splash(”gfx/platymuus.png”);
splash_run(screen, splash, snd, 4);return 0;
}
Tags: C++, LD #14 - Advancing Wall of Doom - 2009, PlatyGame, SDL