stratgame

annotate level/src/level.cc @ 0:86b53f76899f

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 21 May 2012 19:07:40 +0300
parents
children 55a43e27339a
rev   line source
nuclear@0 1 #include <stdio.h>
nuclear@0 2 #include <string.h>
nuclear@0 3 #include "level.h"
nuclear@0 4
nuclear@0 5 Level::Level()
nuclear@0 6 {
nuclear@0 7 }
nuclear@0 8
nuclear@0 9 Level::~Level()
nuclear@0 10 {
nuclear@0 11 }
nuclear@0 12
nuclear@0 13 bool Level::load(const char *fname)
nuclear@0 14 {
nuclear@0 15 if(!xml.loadFile(fname)) {
nuclear@0 16 fprintf(stderr, "failed to load level: %s\n", fname);
nuclear@0 17 return false;
nuclear@0 18 }
nuclear@0 19
nuclear@0 20 if(strcmp(xml.RootElement().Name(), "level") != 0) {
nuclear@0 21 fprintf(stderr, "invalid level file: %s\n", fname);
nuclear@0 22 return false;
nuclear@0 23 }
nuclear@0 24 }