summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.cpp3
-rw-r--r--src/engine.cpp10
-rw-r--r--src/engine.h2
-rw-r--r--src/gui/setup.cpp4
4 files changed, 6 insertions, 13 deletions
diff --git a/src/being.cpp b/src/being.cpp
index c63c2bb2..00d06a15 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -47,7 +47,8 @@ void add_node(Being *being)
WFIFOSET(6);
}
// If the being is a monster then load the monsterset
- else if (being->job >= 1002 && monsterset[being->job - 1002] == NULL) {
+ else if (being->job >= 1002 && monsterset.find(
+ being->job - 1002) == monsterset.end()) {
std::stringstream filename;
filename << "graphics/sprites/monster" << (being->job - 1002) << ".png";
logger->log("%s",filename.str().c_str());
diff --git a/src/engine.cpp b/src/engine.cpp
index e189558d..f01a19ed 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -36,8 +36,6 @@
#include "floor_item.h"
#include "gui/requesttrade.h"
-#define MONSTERS_NUMBER 8
-
char itemCurrenyQ[10] = "0";
int map_x, map_y, camera_x, camera_y;
char npc_text[1000] = "";
@@ -69,7 +67,7 @@ TradeWindow *tradeWindow;
RequestTradeDialog *requestTradeDialog;
ConfirmDialog *quitDialog;
BuddyWindow *buddyWindow;
-std::vector<Spriteset*> monsterset;
+std::map<int, Spriteset*> monsterset;
/**
* Listener used for exitting handling.
@@ -252,12 +250,6 @@ Engine::Engine()
emotionset = new Spriteset(emotionbmp, 19, 19);
weaponset = new Spriteset(weaponbitmap, 160, 120);
itemset = new Spriteset(itembitmap, 20, 20);
-
- // Loads all the monsters
- for (int i = 0; i < MONSTERS_NUMBER; i++)
- {
- monsterset.push_back(NULL);
- }
}
Engine::~Engine()
diff --git a/src/engine.h b/src/engine.h
index 4cb90f6f..548a3453 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -76,7 +76,7 @@ extern RequestTradeDialog *requestTradeDialog;
extern TradeWindow *tradeWindow;
extern BuddyWindow *buddyWindow;
extern ConfirmDialog *quitDialog;
-extern std::vector<Spriteset*> monsterset;
+extern std::map<int, Spriteset*> monsterset;
char get_x_offset(char, char);
char get_y_offset(char, char);
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index e6987766..629c0c86 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -52,13 +52,13 @@ ModeListModel::ModeListModel()
}
else{
/* Print valid modes */
- logger->log("Available Modes");
+ /*logger->log("Available Modes");
for (int i = 0; modes[i]; ++i) {
logger->log(" %dx%d", modes[i]->w, modes[i]->h);
std::stringstream mode;
mode << (int)modes[i]->w << "x" << (int)modes[i]->h;
videoModes.push_back(mode.str());
- }
+ }*/
}
}