stratgame
view level/src/level.cc @ 1:55a43e27339a
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 22 May 2012 05:02:00 +0300 |
parents | 86b53f76899f |
children | 369b51c9e4a8 |
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 return true;
25 }