projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Leere Verzeichnisse in git.
[hackover2013-badge-firmware.git]
/
mock
/
tools
/
level-converter.cc
diff --git
a/mock/tools/level-converter.cc
b/mock/tools/level-converter.cc
index
d99928c
..
922d090
100644
(file)
--- a/
mock/tools/level-converter.cc
+++ b/
mock/tools/level-converter.cc
@@
-21,6
+21,8
@@
enum {
LEVEL_LINE_COUNT = 13
};
LEVEL_LINE_COUNT = 13
};
+#define PATH_PREFIX "../badge/jumpnrun/"
+
namespace jnrcpp {
struct descriptors {
descriptors() {
namespace jnrcpp {
struct descriptors {
descriptors() {
@@
-51,10
+53,10
@@
namespace jnrcpp {
struct level_name_map {
level_name_map() {
struct level_name_map {
level_name_map() {
- std::ifstream in(
"jumpnrun/
levels.txt");
+ std::ifstream in(
PATH_PREFIX "
levels.txt");
if(!in) {
if(!in) {
- throw std::logic_error(
"jumpnrun/
levels.txt konnte nicht geöffnet werden.");
+ throw std::logic_error(
PATH_PREFIX "
levels.txt konnte nicht geöffnet werden.");
}
std::string name;
}
std::string name;
@@
-74,7
+76,7
@@
namespace jnrcpp {
: name(name),
level_lines(LEVEL_LINE_COUNT)
{
: name(name),
level_lines(LEVEL_LINE_COUNT)
{
- std::ifstream in((
"jumpnrun/"
+ name + ".lv").c_str());
+ std::ifstream in((
PATH_PREFIX
+ name + ".lv").c_str());
if(!in) {
throw std::invalid_argument("Could not open file: " + name + ".lv");
if(!in) {
throw std::invalid_argument("Could not open file: " + name + ".lv");
@@
-238,7
+240,7
@@
namespace jnrcpp {
void jumpnrun_level_dump(size_t level) {
std::string name = jnrcpp::level_names.names[level];
jnrcpp::level lv(name);
void jumpnrun_level_dump(size_t level) {
std::string name = jnrcpp::level_names.names[level];
jnrcpp::level lv(name);
- std::ofstream out((
"jumpnrun/"
+ name + ".lvl").c_str());
+ std::ofstream out((
PATH_PREFIX
+ name + ".lvl").c_str());
lv.dump(out);
}
lv.dump(out);
}
This page took
0.021961 seconds
and
4
git commands to generate.