projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
auto detect aspect ratio of monitor, so that you don't have to know/use the cryptic...
[supertux.git]
/
src
/
level.cpp
diff --git
a/src/level.cpp
b/src/level.cpp
index
1c740e7
..
4b222bb
100644
(file)
--- a/
src/level.cpp
+++ b/
src/level.cpp
@@
-20,9
+20,9
@@
#include <config.h>
#include <map>
#include <config.h>
#include <map>
-#include <
cstdlib
>
-#include <
cstdio
>
-#include <
cstring
>
+#include <
stdlib.h
>
+#include <
stdio.h
>
+#include <
string.h
>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iostream>
#include <fstream>
#include <sstream>
@@
-71,6
+71,9
@@
Level::load(const std::string& filepath)
return;
}
return;
}
+ contact = "";
+ license = "";
+
lisp::ListIterator iter(level);
while(iter.next()) {
const std::string& token = iter.item();
lisp::ListIterator iter(level);
while(iter.next()) {
const std::string& token = iter.item();
@@
-83,6
+86,10
@@
Level::load(const std::string& filepath)
iter.value()->get(name);
} else if(token == "author") {
iter.value()->get(author);
iter.value()->get(name);
} else if(token == "author") {
iter.value()->get(author);
+ } else if(token == "contact") {
+ iter.value()->get(contact);
+ } else if(token == "license") {
+ iter.value()->get(license);
} else if(token == "on-menukey-script") {
iter.value()->get(on_menukey_script);
} else if(token == "sector") {
} else if(token == "on-menukey-script") {
iter.value()->get(on_menukey_script);
} else if(token == "sector") {
@@
-94,6
+101,8
@@
Level::load(const std::string& filepath)
}
}
}
}
+ if (license == "") log_warning << "The level author did not specify a license for this level. You might not be allowed to share it." << std::endl;
+
} catch(std::exception& e) {
std::stringstream msg;
msg << "Problem when reading level '" << filepath << "': " << e.what();
} catch(std::exception& e) {
std::stringstream msg;
msg << "Problem when reading level '" << filepath << "': " << e.what();