summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-06-21 17:06:57 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-06-21 17:06:57 +0000
commite87c165b31b3bdb784f23fd7d1e6a795859aa24c (patch)
tree913263b303ff1019d8be92ade326a028c012db16 /src/main.cpp
parent46cf032fc0eea43743b86d9e05950dd7a65728b7 (diff)
downloadmana-e87c165b31b3bdb784f23fd7d1e6a795859aa24c.tar.gz
mana-e87c165b31b3bdb784f23fd7d1e6a795859aa24c.tar.bz2
mana-e87c165b31b3bdb784f23fd7d1e6a795859aa24c.tar.xz
mana-e87c165b31b3bdb784f23fd7d1e6a795859aa24c.zip
Added female players.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f7c36b18..5713b7db 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -83,7 +83,7 @@
char n_server, n_character;
std::vector<Spriteset *> hairset;
-Spriteset *playerset = NULL;
+Spriteset *playerset[2];
Spriteset *equipmentset = NULL;
Graphics *graphics;
@@ -248,9 +248,12 @@ void init_engine()
// Initialize for drawing
graphics->_beginDraw();
- playerset = resman->createSpriteset(
+ playerset[0] = resman->createSpriteset(
"graphics/sprites/player_male_base.png", 64, 64);
- if (!playerset) logger->error("Couldn't load 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!");
@@ -293,7 +296,8 @@ void exit_engine()
delete graphics;
for_each(hairset.begin(), hairset.end(), make_dtor(hairset));
hairset.clear();
- delete playerset;
+ delete playerset[0];
+ delete playerset[1];
delete equipmentset;
// Shutdown libxml
@@ -620,7 +624,8 @@ int main(int argc, char *argv[])
case CHAR_SELECT_STATE:
logger->log("State: CHAR_SELECT");
- currentDialog = new CharSelectDialog(network, &charInfo);
+ currentDialog = new CharSelectDialog(network, &charInfo,
+ 1 - loginData.sex);
if (options.chooseDefault) {
((CharSelectDialog*)currentDialog)->action("ok");
}