brice.dat\r
config/settings.xml\r
setup.mk\r
+TODOS\r
/**
* Causes the entity to hop around.
*/
-struct Hop {}; // TODO require wander, for range?
+struct Hop {
+ Hop(float r = 0)
+ : hopRatio(r) {}
+
+ float hopRatio;
+};
/**
* Causes the entity to wander about.
fl = (direction.x < 0);
}
+ // make the entity wander
+ // TODO initialX and range?
if (entity.has_component<Wander>()) {
auto& countdown = entity.component<Wander>()->countdown;
} while((qxml = qxml->NextSiblingElement()));
}
+ auto xxml = exml->FirstChildElement("option");
+ std::string options;
+ std::vector<int> optionNexts;
+ if (xxml != nullptr) {
+ do {
+ options += '\"' + xxml->StrAttribute("name");
+ optionNexts.emplace_back(xxml->IntAttribute("value"));
+ xxml = xxml->NextSiblingElement();
+ } while (xxml != nullptr);
+ }
+
auto cxml = exml->FirstChildElement("content");
const char *content;
if (cxml == nullptr) {
while (*++content && isspace(*content));
}
- ui::dialogBox(name.name, "", false, content);
+ ui::dialogBox(name.name, options, false, content);
ui::waitForDialog();
if (!questAssignedText.empty())
entity.assign<Grounded>();
} else if (tname == "Wander") {
entity.assign<Wander>();
+ } else if (tname == "Hop" ) {
+ entity.assign<Hop>();
} else if (tname == "Animation") {
auto entan = entity.assign<Animate>();
auto animx = abcd->FirstChildElement();
--- /dev/null
+#!/bin/bash
+
+#
+# Searches for all TODOs and tosses them in a file.
+#
+TODO_COUNT=0
+rm -f TODOS
+touch TODOS
+for file in include/*.hpp
+do
+ echo "########################################" >> TODOS
+ echo $file >> TODOS
+ echo "========================================" >> TODOS
+ grep -n -B 5 -A 5 "TODO" $file | sed s/--/========================================/g >> TODOS
+ TODO_COUNT=$((TODO_COUNT+$(grep -c "TODO" $file)))
+done
+
+for file in src/*.cpp
+do
+ echo "########################################" >> TODOS
+ echo $file >> TODOS
+ echo "========================================" >> TODOS
+ grep -n -B 5 -A 5 "TODO" $file | sed s/--/========================================/g >> TODOS
+ TODO_COUNT=$((TODO_COUNT+$(grep -c "TODO" $file)))
+done
+
+echo "Found" $TODO_COUNT "TODOs."