stratgame

view 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
line source
1 #include <stdio.h>
2 #include <string.h>
3 #include "level.h"
5 Level::Level()
6 {
7 }
9 Level::~Level()
10 {
11 }
13 bool Level::load(const char *fname)
14 {
15 if(!xml.loadFile(fname)) {
16 fprintf(stderr, "failed to load level: %s\n", fname);
17 return false;
18 }
20 if(strcmp(xml.RootElement().Name(), "level") != 0) {
21 fprintf(stderr, "invalid level file: %s\n", fname);
22 return false;
23 }
24 }