summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-07-03 21:05:19 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-07-03 21:05:19 +0000
commite3a2cd1e6f685c921bd73e9cb1f0f8fcf0b6a939 (patch)
tree77afd116346f3e107c80c4126c8e44399ec24f11 /src/main.cpp
parent852626d562a6b40f37a25dc2784492ede80ee78b (diff)
downloadmana-client-e3a2cd1e6f685c921bd73e9cb1f0f8fcf0b6a939.tar.gz
mana-client-e3a2cd1e6f685c921bd73e9cb1f0f8fcf0b6a939.tar.bz2
mana-client-e3a2cd1e6f685c921bd73e9cb1f0f8fcf0b6a939.tar.xz
mana-client-e3a2cd1e6f685c921bd73e9cb1f0f8fcf0b6a939.zip
Fixed visible equipment initialization and hack to see 2 kinds of visible equipments.
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();