tickk = tickCount + tadv;
ret += str[linc];
+ if (!isspace(str[linc]))
+ Mix_PlayChannel(0, dialogClick, 0);
+
if (linc < size) {
switch (str[++linc]) {
case '!':
va_start(args, s);
dialogText += ui::uisprintf(s.c_str(), args);
va_end(args);
+
+ ui::ret.clear();
}
void UISystem::dialogAddOption(const std::string& o)
void UISystem::dialogImportant(const std::string& s)
{
importantText = s;
+ ui::ret.clear();
}
void UISystem::waitForDialog(void)
** Functions section
** --------------------------------------------------------------------------*/
+/*int generateString(const std::string& s)
+{
+ int mag = 0;
+ std::stringstream ss;
+ ss.str(s);
+
+ ss >> mag >> ':';
+}*/
+
void WorldSystem::generate(int width)
{
float geninc = 0;
entity.assign<Animate>(wxml, abcd);
else if (tname == "Trigger")
entity.assign<Trigger>(wxml, abcd);
+ else if (tname == "Drop")
+ entity.assign<Drop>(wxml, abcd);
abcd = abcd->NextSiblingElement();
}
static const float stardim = 24;
GLfloat* star_coord = new GLfloat[stars.size() * 5 * 6 + 1];
- auto si = &star_coord;
+ auto si = star_coord;
auto xcoord = offset.x * 0.9f;
for (auto &s : stars) {
game::entities.each<Health>(
[](entityx::Entity e, Health& h) {
if (h.health <= 0) {
+ if (e.has_component<Drop>()) {
+ for (auto& d : e.component<Drop>()->items) {
+ auto& pos = *e.component<Position>();
+ InventorySystem::makeDrop(vec2(pos.x, pos.y), d.first, d.second);
+ }
+ }
+
e.kill();
//e.destroy();
}