summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5713b7db..20a1771c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,7 +84,7 @@ char n_server, n_character;
std::vector<Spriteset *> hairset;
Spriteset *playerset[2];
-Spriteset *equipmentset = NULL;
+Spriteset *equipmentset[2];
Graphics *graphics;
// TODO Anyone knows a good location for this? Or a way to make it non-global?
@@ -250,13 +250,17 @@ void init_engine()
playerset[0] = resman->createSpriteset(
"graphics/sprites/player_male_base.png", 64, 64);
+ if (!playerset[0]) logger->error("Couldn't load male player spriteset!");
playerset[1] = resman->createSpriteset(
"graphics/sprites/player_female_base.png", 64, 64);
- if (!playerset[0]) logger->error("Couldn't load male player spriteset!");
if (!playerset[1]) logger->error("Couldn't load female player spriteset!");
- equipmentset = resman->createSpriteset(
- "graphics/sprites/item1202.png", 64, 64);
- if (!equipmentset) logger->error("Couldn't load player equipmentset!");
+ equipmentset[0] = resman->createSpriteset(
+ "graphics/sprites/item001.png", 64, 64);
+ if (!equipmentset[0]) logger->error("Couldn't load player equipmentset!");
+ equipmentset[1] = resman->createSpriteset(
+ "graphics/sprites/item002.png", 64, 64);
+ if (!equipmentset[1]) logger->error("Couldn't load player equipmentset!");
+
for (int i=0; i < NR_HAIR_STYLES; i++)
{
@@ -298,7 +302,8 @@ void exit_engine()
hairset.clear();
delete playerset[0];
delete playerset[1];
- delete equipmentset;
+ delete equipmentset[0];
+ delete equipmentset[1];
// Shutdown libxml
xmlCleanupParser();