]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
chests?, custom controls
authorClyne Sullivan <tullivan99@gmail.com>
Wed, 29 Jun 2016 01:32:04 +0000 (21:32 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Wed, 29 Jun 2016 01:32:04 +0000 (21:32 -0400)
21 files changed:
Makefile
assets/chest.png [new file with mode: 0644]
assets/style/classic/bg/bgFarMountain.png
assets/style/classic/house1.png
brice.dat
include/entities.hpp
include/mob.hpp
include/ui.hpp
include/ui_menu.hpp
include/world.hpp
src/entities.cpp
src/mob.cpp
src/ui.cpp
src/ui_menu.cpp
src/world.cpp
xcf/chest.xcf [new file with mode: 0644]
xcf/goodmtns.xcf
xcf/house1.xcf
xml/playerSpawnHill1.xml
xml/playerSpawnHill1_Building1.xml
xml/town.xml

index 31899a51c8815a19adc7b022862c5b3f736bff3e..7743e6885ea04151047eb679f1f811c8f86cce8b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ endif
 
 CXXFLAGS = -g -m$(TARGET_BITS) -std=c++14 -fext-numeric-literals
 CXXINC   = -Iinclude -Iinclude/freetype
-CXXWARN  = -Wall -Wextra -Werror #-pedantic-errors
+CXXWARN  = -Wall -Wextra -Werror
 
 CXXSRCDIR = src
 CXXOUTDIR = out
diff --git a/assets/chest.png b/assets/chest.png
new file mode 100644 (file)
index 0000000..11fdedb
Binary files /dev/null and b/assets/chest.png differ
index 382f8d606790955e390d7feded9e5dfd53a52e48..2ec7dae746b7022fc7a5634a42e54531228a77bf 100644 (file)
Binary files a/assets/style/classic/bg/bgFarMountain.png and b/assets/style/classic/bg/bgFarMountain.png differ
index 73cbf74dec8b9eb87ff1cf1a340e317b6aecf83e..025b169a978bc3326633fd54c1c36f352a9ae649 100644 (file)
Binary files a/assets/style/classic/house1.png and b/assets/style/classic/house1.png differ
index 4dad7115c21edf220ed1e407b1d7f9f20b430ea0..2033bae64b8c312af83dfe1243c6508df9c542aa 100644 (file)
--- a/brice.dat
+++ b/brice.dat
@@ -1,7 +1,7 @@
 3
-Slow
-0
-canJump
-0
 canSprint
 1
+canJump
+0
+Slow
+0
index 76b6fa810cb35e715378a21b26fc646886fb227e..4abb3cbef3b1154acddfaf17bb91789868a32b4f 100644 (file)
@@ -107,6 +107,7 @@ extern const unsigned int NPC_INV_SIZE;
 
 // a prototype of the world class, necessary for some function prototypes
 class World;
+class IndoorWorld;
 
 /**
  * The light structure, used to store light coordinates and color.
@@ -325,7 +326,8 @@ public:
 class Structures : public Entity {
 public:
        BUILD_SUB bsubtype;
-       World *inWorld, *insideWorld;
+       World *inWorld;
+       IndoorWorld *insideWorld;
        std::string inside;
        std::string textureLoc;
 
index 7ef4ff98b52bed53b3c14d38db411d6cb6b3721d..24b8ed978c9a004e1b98f80229da2862080122f2 100644 (file)
@@ -126,4 +126,15 @@ public:
        void saveToXML(void) final;
 };
 
+class Chest : public Mob {
+public:
+       Chest(void);
+
+       void act(void);
+       void onHit(unsigned int);
+       bool bindTex(void);
+       void createFromXML(XMLElement *e, World *w) final;
+       void saveToXML(void) final;
+};
+
 #endif // MOB_H_
index 507a21128535349ef15677744f3d35a5aab99f18..25fbd3c58b3835007aec693aa3a5ffe107228270 100644 (file)
@@ -40,6 +40,8 @@
 ** The UI namespace
 ** --------------------------------------------------------------------------*/
 
+void setControl(unsigned int index, SDL_Keycode key);
+
 namespace ui {
 
        // the pixel-coordinates of the mouse
index f7b665e365a62b4ab8948efc58cee55fc31d9bba..3ed9fa574aea8020cd87b518853519f276296cf8 100644 (file)
@@ -7,9 +7,12 @@
 
 typedef void (*menuFunc)(void);
 
+class Menu;
+
 class menuItem {
 public:
        int member;
+       Menu *child;
        union {
                struct {
                        vec2 loc;
@@ -46,25 +49,21 @@ public:
 class Menu {
 public:
        std::vector<menuItem> items;
-       Menu *parent, *child;
+       Menu *parent;
 
        ~Menu()
        {
                items.clear();
-               //delete child;
-               //delete parent;
-               child = NULL;
                parent = NULL;
        }
 
-       void gotoChild(void);
        void gotoParent(void);
 };
 
 namespace ui {
     namespace menu {
         menuItem createButton(vec2 l, dim2 d, Color c, const char* t, menuFunc f);
-        menuItem createChildButton(vec2 l, dim2 d, Color c, const char* t);
+        menuItem createChildButton(vec2 l, dim2 d, Color c, const char* ti, Menu *_child);
         menuItem createParentButton(vec2 l, dim2 d, Color c, const char* t);
         menuItem createSlider(vec2 l, dim2 d, Color c, float min, float max, const char* t, float* v);
 
index 6a97daa85da7d8246b03e6cde88a133059532fe6..a2de048baeed6b5bdb0e9c78444f3eb4a737f6da 100644 (file)
@@ -495,6 +495,8 @@ private:
 
 public:
 
+       World *outside;
+
        // creates an IndoorWorld object
        IndoorWorld(void);
 
index e156ee2d122c05e45a5f6ad6fb00bc37f01812ec..0c312e2c462208e43ebbcd901c66d657a4ef8bd0 100644 (file)
@@ -336,7 +336,8 @@ void Structures::createFromXML(XMLElement *e, World *w)
 
        // edge
        if (!inside.empty()) {
-               insideWorld = loadWorldFromXMLNoTakeover(inside);
+               insideWorld = dynamic_cast<IndoorWorld *>(loadWorldFromXMLNoTakeover(inside));
+               insideWorld->outside = inWorld;
        }
 
        textureLoc = e->StrAttribute("texture");
index eba970ee40df41a57f1fc7d2193e2d1265f38cd3..20273d6d6b190abd63130dcdf5cff88bfa60c737 100644 (file)
@@ -424,6 +424,48 @@ void Trigger::createFromXML(XMLElement *e, World *w=nullptr)
 void Trigger::saveToXML(void)
 {}
 
+Chest::Chest(void) : Mob()
+{
+    ridable = false;
+    aggressive = false;
+    maxHealth = health = 100;
+    width = HLINES(10);
+    height = HLINES(5);
+    tex = TextureIterator({"assets/chest.png"});
+}
+
+void Chest::act(void)
+{
+       //die();
+}
+
+void Chest::onHit(unsigned int _health)
+{
+       (void)_health;
+       die();
+}
+
+bool Chest::bindTex(void)
+{
+    glActiveTexture(GL_TEXTURE0);
+    tex(0);
+    return true;
+}
+
+void Chest::createFromXML(XMLElement *e, World *w)
+{
+       (void)w;
+       loc = vec2 { 0, 100 };
+       xmle = e;
+}
+
+void Chest::saveToXML(void)
+{
+       xmle->SetAttribute("alive", alive);
+}
+
+
+
 Mob::~Mob()
 {
        delete inv;
index 037ba896fb5afd1c1fb92e8b84a8b502f86446b1..d7f6e19053fcd179ede5aa9a2b34222b30b5ac21 100644 (file)
@@ -28,6 +28,16 @@ extern std::vector<NPC *> aipreload;
  */
 extern bool gameRunning;
 
+
+static SDL_Keycode controlMap[] = {
+       SDLK_w, SDLK_s, SDLK_a, SDLK_d
+};
+
+void setControl(unsigned int index, SDL_Keycode key)
+{
+       controlMap[index] = key;
+}
+
 /**
  *     Freetype variables
  */
@@ -1402,46 +1412,7 @@ EXIT:
 
                                // only let other keys be handled if dialog allows it
                                } else if (!dialogBoxExists || dialogPassive) {
-                                       switch(SDL_KEY) {
-                                       case SDLK_DELETE:
-                                               gameRunning = false;
-                                               break;
-                                       case SDLK_t:
-                                               game::time::tick(50);
-                                               break;
-                                       case SDLK_a:
-                                               if (fadeEnable)
-                                                       break;
-                                               player->vel.x = -PLAYER_SPEED_CONSTANT;
-                                               if (std::stoi(game::getValue("Slow")) == 1)
-                                                       player->vel.x /= 2.0f;
-                                               player->left = left = true;
-                                               player->right = right = false;
-                                               if (currentWorldToLeft) {
-                                                       std::thread([&](void){
-                                                               auto thing = currentWorld->goWorldLeft(player);
-                                                               if (thing.first != currentWorld)
-                                                                       worldSwitch(thing);
-                                                       }).detach();
-                                               }
-                                               break;
-                                       case SDLK_d:
-                                               if (fadeEnable)
-                                                       break;
-                                               player->vel.x = PLAYER_SPEED_CONSTANT;
-                                               if (std::stoi(game::getValue("Slow")) == 1)
-                                                       player->vel.x /= 2.0f;
-                                               player->right = right = true;
-                                               player->left = left = false;
-                                               if (currentWorldToRight) {
-                                                       std::thread([&](void){
-                                                               auto thing = currentWorld->goWorldRight(player);
-                                                               if (thing.first != currentWorld)
-                                                                       worldSwitch(thing);
-                                                       }).detach();
-                                               }
-                                               break;
-                                       case SDLK_w:
+                                       if (SDL_KEY == controlMap[0]) {
                                                if (inBattle) {
                                                        std::thread([&](void){
                                                                auto thing = dynamic_cast<Arena *>(currentWorld)->exitArena(player);
@@ -1455,6 +1426,43 @@ EXIT:
                                                                        worldSwitch(thing);
                                                        }).detach();
                                                }
+                                       } else if (SDL_KEY == controlMap[1]) {
+                                       } else if (SDL_KEY == controlMap[2]) {
+                                               if (!fadeEnable) {
+                                                       player->vel.x = -PLAYER_SPEED_CONSTANT;
+                                                       if (std::stoi(game::getValue("Slow")) == 1)
+                                                               player->vel.x /= 2.0f;
+                                                       player->left = left = true;
+                                                       player->right = right = false;
+                                                       if (currentWorldToLeft) {
+                                                               std::thread([&](void){
+                                                                       auto thing = currentWorld->goWorldLeft(player);
+                                                                       if (thing.first != currentWorld)
+                                                                               worldSwitch(thing);
+                                                               }).detach();
+                                                       }
+                                               }
+                                       } else if (SDL_KEY == controlMap[3]) {
+                                               if (!fadeEnable) {
+                                                       player->vel.x = PLAYER_SPEED_CONSTANT;
+                                                       if (std::stoi(game::getValue("Slow")) == 1)
+                                                               player->vel.x /= 2.0f;
+                                                       player->right = right = true;
+                                                       player->left = left = false;
+                                                       if (currentWorldToRight) {
+                                                               std::thread([&](void){
+                                                                       auto thing = currentWorld->goWorldRight(player);
+                                                                       if (thing.first != currentWorld)
+                                                                               worldSwitch(thing);
+                                                               }).detach();
+                                                       }
+                                               }
+                                       } else switch(SDL_KEY) {
+                                       case SDLK_DELETE:
+                                               gameRunning = false;
+                                               break;
+                                       case SDLK_t:
+                                               game::time::tick(50);
                                                break;
                                        case SDLK_LSHIFT:
                                                if (game::canSprint) {
@@ -1501,8 +1509,11 @@ EXIT:
                                        ui::menu::toggle();
                                        player->save();
                                        return;
-                               }
-                               switch (SDL_KEY) {
+                               } else if (SDL_KEY == controlMap[2]) {
+                                       left = false;
+                               } else if (SDL_KEY == controlMap[3]) {
+                                       right = false;
+                               } else switch (SDL_KEY) {
                                case SDLK_F3:
                                        debug ^= true;
                                        break;
@@ -1526,12 +1537,6 @@ EXIT:
                                                player->ground = false;
                                        }
                                        break;
-                               case SDLK_a:
-                                       left = false;
-                                       break;
-                               case SDLK_d:
-                                       right = false;
-                                       break;
                                case SDLK_LSHIFT:
                                        if (player->speed == 4)
                                                Mix_FadeOutChannel(1,2000);
index 5faf8a2b3fcee2753da3c21ab2da8e3a36338988..581e7fc9b87eafe499697fb805631ec9166ba276 100644 (file)
@@ -6,6 +6,7 @@ extern Menu *currentMenu;
 
 static Menu pauseMenu;
 static Menu optionsMenu;
+static Menu controlsMenu;
 
 void Menu::gotoParent(void)
 {
@@ -17,13 +18,27 @@ void Menu::gotoParent(void)
        }
 }
 
-void Menu::gotoChild(void)
+inline void segFault() {
+       (*((int *)NULL))++;
+}
+
+void setControlF(unsigned int index)
 {
-       currentMenu = child;
+       SDL_Event e;
+       do SDL_WaitEvent(&e);
+       while (e.type != SDL_KEYDOWN);
+       setControl(index, e.key.keysym.sym);
 }
 
-inline void segFault() {
-       (*((int *)NULL))++;
+void setLeftKey(void) {
+       SDL_Event e;
+
+       std::cout << "Waiting...\n";
+       do SDL_WaitEvent(&e);
+       while (e.type != SDL_KEYDOWN);
+       std::cout << "Good.\n";
+
+       setControl(2, e.key.keysym.sym);
 }
 
 namespace ui {
@@ -37,11 +52,12 @@ namespace ui {
             temp.button.color = c;
             temp.button.text = t;
             temp.button.func = f;
+                       temp.child = nullptr;
 
             return temp;
         }
 
-        menuItem createChildButton(vec2 l, dim2 d, Color c, const char* t) {
+        menuItem createChildButton(vec2 l, dim2 d, Color c, const char* t, Menu *_child) {
             menuItem temp;
 
             temp.member = -1;
@@ -50,6 +66,7 @@ namespace ui {
             temp.button.color = c;
             temp.button.text = t;
             temp.button.func = NULL;
+                       temp.child = _child;
 
             return temp;
         }
@@ -63,6 +80,7 @@ namespace ui {
             temp.button.color = c;
             temp.button.text = t;
             temp.button.func = NULL;
+                       temp.child = nullptr;
 
             return temp;
         }
@@ -79,21 +97,29 @@ namespace ui {
             temp.slider.text = t;
             temp.slider.var = v;
             temp.slider.sliderLoc = *v;
+                       temp.child = nullptr;
 
             return temp;
         }
 
                void init(void) {
-                       pauseMenu.items.push_back(ui::menu::createParentButton({-256/2,0},{256,75},{0.0f,0.0f,0.0f}, "Resume"));
-                       pauseMenu.items.push_back(ui::menu::createChildButton({-256/2,-100},{256,75},{0.0f,0.0f,0.0f}, "Options"));
-                       pauseMenu.items.push_back(ui::menu::createButton({-256/2,-200},{256,75},{0.0f,0.0f,0.0f}, "Save and Quit", ui::quitGame));
-                       pauseMenu.items.push_back(ui::menu::createButton({-256/2,-300},{256,75},{0.0f,0.0f,0.0f}, "Segfault", segFault));
-                       pauseMenu.child = &optionsMenu;
-
+                       // Create the main pause menu
+                       pauseMenu.items.push_back(ui::menu::createParentButton({-128,0},{256,75},{0.0f,0.0f,0.0f}, "Resume"));
+                       pauseMenu.items.push_back(ui::menu::createChildButton({-128,-100},{256,75},{0.0f,0.0f,0.0f}, "Options", &optionsMenu));
+                       pauseMenu.items.push_back(ui::menu::createChildButton({-128,-200},{256,75},{0.0f,0.0f,0.0f}, "Controls", &controlsMenu));
+                       pauseMenu.items.push_back(ui::menu::createButton({-128,-300},{256,75},{0.0f,0.0f,0.0f}, "Save and Quit", ui::quitGame));
+                       pauseMenu.items.push_back(ui::menu::createButton({-128,-400},{256,75},{0.0f,0.0f,0.0f}, "Segfault", segFault));
+
+                       // Create the options (sound) menu
                        optionsMenu.items.push_back(ui::menu::createSlider({0-static_cast<float>(game::SCREEN_WIDTH)/4,0-(512/2)}, {50,512}, {0.0f, 0.0f, 0.0f}, 0, 100, "Master", &game::config::VOLUME_MASTER));
                        optionsMenu.items.push_back(ui::menu::createSlider({-200,100}, {512,50}, {0.0f, 0.0f, 0.0f}, 0, 100, "Music", &game::config::VOLUME_MUSIC));
                        optionsMenu.items.push_back(ui::menu::createSlider({-200,000}, {512,50}, {0.0f, 0.0f, 0.0f}, 0, 100, "SFX", &game::config::VOLUME_SFX));
                        optionsMenu.parent = &pauseMenu;
+
+                       // Create the controls menu
+                       controlsMenu.items.push_back(ui::menu::createButton({-300,200}, {-200, 100}, {0.0f, 0.0f, 0.0f}, "Left", [](){ setControlF(2);}));
+                       controlsMenu.items.push_back(ui::menu::createButton({-300,50}, {-200, 100}, {0.0f, 0.0f, 0.0f}, "Right", [](){ setControlF(3);}));
+                       controlsMenu.parent = &pauseMenu;
                }
 
                void toggle(void) {
@@ -208,7 +234,7 @@ namespace ui {
                                         m.button.func();
                                         break;
                                     case -1:
-                                        currentMenu->gotoChild();
+                                        currentMenu = m.child;
                                         break;
                                     case -2:
                                         currentMenu->gotoParent();
index 8969fb9bbd6a1c1e8c6c413641a23724a31fa705..7294fdaf0cf170895eb3281003229f6c1299b9d7 100644 (file)
@@ -1314,7 +1314,7 @@ WorldSwitchInfo World::goInsideStructure(Player *p)
 
         // +size cuts folder prefix
                inside.push_back(&currentXML[xmlFolder.size()]);
-               tmp = loadWorldFromXML((*d)->inside);
+               tmp = (*d)->insideWorld;
 
                return std::make_pair(tmp, vec2 {0, 100});
        }
@@ -1322,7 +1322,7 @@ WorldSwitchInfo World::goInsideStructure(Player *p)
        // exit the building
        else {
         std::string current = &currentXML[xmlFolder.size()];
-               tmp = loadWorldFromXML(inside.back());
+               tmp = dynamic_cast<IndoorWorld *>(currentWorld)->outside; //loadWorldFromXML(inside.back());
         inside.clear();
 
         Structures *b = nullptr;
@@ -1646,56 +1646,59 @@ draw(Player *p)
        // TODO make floor texture
 
        static GLuint floorTex = Texture::genColor(Color(150, 100, 50));
-
-       glUseProgram(worldShader);
        glBindTexture(GL_TEXTURE_2D, floorTex);
 
-       std::vector<GLfloat>f;
+       std::vector<GLfloat> fc;
+       std::vector<GLfloat> ft;
 
        for (fl = 0; fl < floor.size(); fl++) {
         i = 0;
        for (const auto &h : floor[fl]) {
-               x = worldStart + fstart[fl] * HLINE + HLINES(i);
-
-                       f.emplace_back(x);
-               f.emplace_back(h);
-                       f.emplace_back(-3);
-                       f.emplace_back(0);
-                       f.emplace_back(0);
-
-                       f.emplace_back(x + HLINE);
-                       f.emplace_back(h);
-                       f.emplace_back(-3);
-                       f.emplace_back(1);
-                       f.emplace_back(0);
-
-                       f.emplace_back(x + HLINE);
-                       f.emplace_back(h - INDOOR_FLOOR_THICKNESS);
-                       f.emplace_back(-3);
-                       f.emplace_back(1);
-                       f.emplace_back(1);
-
-                       f.emplace_back(x + HLINE);
-                       f.emplace_back(h - INDOOR_FLOOR_THICKNESS);
-                       f.emplace_back(-3);
-                       f.emplace_back(1);
-                       f.emplace_back(1);
-
-                       f.emplace_back(-3);
-                       f.emplace_back(0);
-                       f.emplace_back(1);
-
-                       f.emplace_back(x);
-               f.emplace_back(h);
-                       f.emplace_back(-3);
-                       f.emplace_back(0);
-                       f.emplace_back(0);
+               x = worldStart + HLINES(fstart[fl] + i);
+
+                       fc.emplace_back(x);
+               fc.emplace_back(h);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(0);
+                       ft.emplace_back(0);
+
+                       fc.emplace_back(x + HLINE);
+                       fc.emplace_back(h);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(1);
+                       ft.emplace_back(0);
+
+                       fc.emplace_back(x + HLINE);
+                       fc.emplace_back(h - INDOOR_FLOOR_THICKNESS);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(1);
+                       ft.emplace_back(1);
+
+                       fc.emplace_back(x + HLINE);
+                       fc.emplace_back(h - INDOOR_FLOOR_THICKNESS);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(1);
+                       ft.emplace_back(1);
+
+                       fc.emplace_back(x);
+                       fc.emplace_back(h - INDOOR_FLOOR_THICKNESS);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(0);
+                       ft.emplace_back(1);
+
+                       fc.emplace_back(x);
+               fc.emplace_back(h);
+                       fc.emplace_back(-3);
+                       ft.emplace_back(0);
+                       ft.emplace_back(0);
 
                        i++;
        }
     }
 
-       makeWorldDrawingSimplerEvenThoughAndyDoesntThinkWeCanMakeItIntoFunctions_JustDrawThis(5 * sizeof(GLfloat), &f[0], &f[3], floor.size() * 6);
+       glUseProgram(worldShader);
+
+       makeWorldDrawingSimplerEvenThoughAndyDoesntThinkWeCanMakeItIntoFunctions_JustDrawThis(0, &fc[0], &ft[0], floor.size() * 6);
 
        glUseProgram(0);
 
@@ -1889,12 +1892,15 @@ loadWorldFromXMLNoSave(std::string path) {
                        }
 
                        // tells what world is outside, if in a structure
-                       else if (Indoor && (ptr = wxml->Attribute("outside")))
-                               inside.push_back(ptr);
+                       else if (Indoor && (ptr = wxml->Attribute("outside"))) {
+//                             if (!loadedLeft && !loadedRight)
+//                                     inside.push_back(ptr);
+                       }
 
             // error, invalid link tag
-            else
+            else {
                 UserError("XML Error: Invalid <link> tag in " + _currentXML + "!");
+                       }
 
                }
 
@@ -1949,7 +1955,9 @@ loadWorldFromXMLNoSave(std::string path) {
             newEntity = new Page();
         } else if (name == "cat") {
             newEntity = new Cat();
-        }
+        } else if (name == "chest") {
+                       newEntity = new Chest();
+               }
 
         // npc creation
         else if (name == "npc") {
@@ -2001,7 +2009,6 @@ loadWorldFromXMLNoSave(std::string path) {
                                newEntity->createFromXML(wxml, tmp);
                                std::swap(currentXML, _currentXML);
                                std::swap(currentXMLRaw, _currentXMLRaw);
-                               std::cout << currentXML << '\n';
                        //}
                }
 
diff --git a/xcf/chest.xcf b/xcf/chest.xcf
new file mode 100644 (file)
index 0000000..3a50751
Binary files /dev/null and b/xcf/chest.xcf differ
index c6492d5becf6d64b074003a3f30051a092035eb9..b350b23c58c1cdffdba8031f01b85ffe79343b81 100644 (file)
Binary files a/xcf/goodmtns.xcf and b/xcf/goodmtns.xcf differ
index 4c40d29e6c48a78862fd4419bf48689c28276036..3b462f839335996fbdca6037e086de4adfb9770e 100644 (file)
Binary files a/xcf/house1.xcf and b/xcf/house1.xcf differ
index 0566efb91904c1f7b99838a3ea94f9b45475f112..92e4c875c50206617c8bbfa727da8bd7b22e80d1 100644 (file)
 <Dialog name="Guy">
     <text id="0" nextid="1">
                Hello there! My name is Ralph.
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <gotox>300</gotox>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <gotox>300</gotox>
     </text>
     <text id="1">
                ...
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <gotox>1000</gotox>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <gotox>1000</gotox>
         <set id="Slow" value="0"/>
         <set id="canSprint" value="1"/>
     </text>
@@ -33,5 +33,5 @@
     <text id="0" stop="true">
                Hey friend! It's dangerous out there, here take these!
                Wait, promise you'll stop by my stand in the local market!
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <give id="Wood Sword" count="1"/>        <give id="Hunters Bow" count="1"/>        <give id="Crude Arrow" count="110"/>        <give id="Fried Chicken" count="1"/>        <give id="Mossy Torch" count="1"/></text>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <give id="Wood Sword" count="1"/>        <give id="Hunters Bow" count="1"/>        <give id="Crude Arrow" count="110"/>        <give id="Fried Chicken" count="1"/>        <give id="Mossy Torch" count="1"/></text>
 </Dialog>
index 78dbb54a85b7321d5152949f5ed2ffb8d94967ec..74eec7619cfefe56eb574ab68558c4fdfb1884f5 100644 (file)
 <Dialog name="Bob">
     <text id="0" nextid="1" pause="true">
        Hey. Have a Dank MayMay :)
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <give id="Dank MayMay" count="1"/></text>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <give id="Dank MayMay" count="1"/></text>
     <text id="1" nextid="2">
        What? You want another Dank MayMay?
     </text>
     <text id="2" nextid="3" pause="true">
                K.
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   <give id="Dank MayMay" count="1"/></text>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           <give id="Dank MayMay" count="1"/></text>
     <text id="3" nextid="4">
                Well... I'm out of Dank MayMays.
        </text>
     <text id="4">
                Have a sword though.
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <give id="Wood Sword" count="1"/></text>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <give id="Wood Sword" count="1"/></text>
 </Dialog>
index f6750373cc0cabae4ad9f216c92007e61bd273ca..4e535d9e397214fb857a80dd99a532649311006b 100644 (file)
@@ -4,10 +4,11 @@
     <generation type="Random" width="1600"/>
     <time>6000</time>
     <spawnx>-300</spawnx>
-    <npc name="Sanc" hasDialog="true" health="1" x="21.680096" y="63.399021" dindex="0"/>
-    <npc name="Bob" hasDialog="true" spawnx="30" health="1" x="30" y="62.99902" dindex="0"/>
+    <npc name="Sanc" hasDialog="true" health="1" x="122.07431" y="66.698975" dindex="0"/>
+    <npc name="Bob" hasDialog="true" spawnx="30" health="1" x="637.40271" y="63.396015" dindex="0"/>
     <structure type="1" spawnx="300" alive="1"/>
     <structure inside="bobshouse.xml" type="1" spawnx="10" alive="1"/>
+    <chest alive="1"/>
 </World>
 
 <Dialog name="Bob">
                </content>
     </text>
     <text id="1" pause="true" alive="1">
-        <quest assign="Check out m&apos;swag, man!" health="1" x="-0.20029223" y="62.099083" dindex="0">
+        <quest assign="Check out m&apos;swag, man!" health="1" x="-197.83293" y="71.963989" dindex="0">
                        No description
                </quest>
-        <content health="1" x="176.35571" y="61.999001" dindex="0">
+        <content health="1" x="-206.1515" y="70.798996" dindex="0">
                        Looks like you've got yourself pretty empty handed... you know, I have a simple solution for that. Come on inside, I have somethin' to show you.
                </content>
     </text>