From 6f13e748c526576198d197ad194f4c1d8fdadec0 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 2 Jul 2016 09:58:12 -0400 Subject: new xml, wip quest menu --- src/entities.cpp | 3 ++- src/ui.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/entities.cpp b/src/entities.cpp index e49d0ca..53d3aca 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -711,7 +711,7 @@ COMMONAIFUNC: goto COMMONAIFUNC; } } - } while((oxml = oxml->NextSiblingElement())); + } while((oxml = oxml->NextSiblingElement("quest"))); } // handle give tags @@ -743,6 +743,7 @@ COMMONAIFUNC: } // asdlfkj + auto txml = exml->FirstChildElement("content"); if (txml == nullptr) goto OTHERSTUFF; diff --git a/src/ui.cpp b/src/ui.cpp index d5fc2ad..098f650 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -909,6 +910,9 @@ namespace ui { // will return if not toggled action::draw(vec2 {player->loc.x + player->width / 2, player->loc.y + player->height + game::HLINE}); + // will return if not toggled + quest::draw(); + if (pageTexReady) { GLfloat page_loc[] = {offset.x - 300, SCREEN_HEIGHT - 100, -6.0, @@ -1540,6 +1544,8 @@ EXIT: currentWorld->addObject(item->name, "o shit waddup", player->loc.x + player->width / 2, player->loc.y + player->height / 2); } + } else if (SDL_KEY == SDLK_h) { + quest::toggle(); } else switch (SDL_KEY) { case SDLK_F3: debug ^= true; -- cgit v1.2.3