Home | Planet Ludum | Rules Wiki | Mailing List| Sign In/Create Account | Write a Post| #ludumdare on irc.afternet.org

Ludum Dare 16 :: December 2009 :: Theme: Exploration

LD16 Results: Top 20 | Categories | View All 121

Theme Voting: Round 1 | Round 2 | Round 3 | Round 4

LD14 Basecode

Posted by SpaceManiac
April 17th, 2009 2:11 pm

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: , , ,

Leave a Reply

You must be logged in to post a comment.


All posts, images, and comments are owned by their creators.