From 07b6070c25faedd78c2e26825bd700dc294f00cf Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sat, 26 Aug 2006 17:24:43 +0000 Subject: Made the Network class a purely static interface, as there is only one instance. --- src/npc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/npc.h') diff --git a/src/npc.h b/src/npc.h index b08c315c..bbc86d9c 100644 --- a/src/npc.h +++ b/src/npc.h @@ -26,12 +26,10 @@ #include "being.h" -class Network; - class NPC : public Being { public: - NPC(Uint32 id, Uint16 job, Map *map, Network *network); + NPC(Uint32 id, Uint16 job, Map *map); virtual Type getType() const; @@ -41,9 +39,6 @@ class NPC : public Being void buy(); void sell(); - - protected: - Network *mNetwork; }; extern NPC *current_npc; -- cgit v1.2.3-70-g09d2 From 2b322bf18d80acb464a9dc1820e581e7204cca1e Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sat, 2 Sep 2006 11:58:35 +0000 Subject: Switched to short IDs for beings. --- ChangeLog | 8 ++++++++ src/being.cpp | 2 +- src/being.h | 8 ++++---- src/beingmanager.cpp | 4 ++-- src/beingmanager.h | 4 ++-- src/localplayer.cpp | 4 ++-- src/localplayer.h | 2 +- src/monster.cpp | 2 +- src/monster.h | 2 +- src/net/beinghandler.cpp | 9 ++++----- src/net/charserverhandler.cpp | 2 +- src/net/chathandler.cpp | 6 ++++-- src/net/protocol.h | 9 +++++---- src/npc.cpp | 2 +- src/npc.h | 2 +- src/player.cpp | 2 +- src/player.h | 2 +- 17 files changed, 40 insertions(+), 30 deletions(-) (limited to 'src/npc.h') diff --git a/ChangeLog b/ChangeLog index 28f87459..492fc2b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-09-02 Guillaume Melquiond + + * src/localplayer.cpp, src/beingmanager.h, src/beingmanager.cpp, + src/npc.cpp, src/player.cpp, src/monster.h, src/being.cpp, src/npc.h, + src/monster.cpp, src/player.h, src/net/beinghandler.cpp, src/being.h, + src/net/charserverhandler.cpp, src/net/protocol.h, src/localplayer.h, + src/net/chathandler.cpp: Switched to short IDs for beings. + 2006-09-01 Eugenio Favalli * src/gui/serverdialog.cpp, src/gui/serverdialog.h, src/net/network.h: diff --git a/src/being.cpp b/src/being.cpp index b497d58f..a4bee426 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -46,7 +46,7 @@ PATH_NODE::PATH_NODE(Uint16 iX, Uint16 iY): { } -Being::Being(Uint32 id, Uint16 job, Map *map): +Being::Being(Uint16 id, Uint16 job, Map *map): mJob(job), mX(0), mY(0), mDirection(DOWN), mAction(STAND), diff --git a/src/being.h b/src/being.h index 7c08ab81..b2495a29 100644 --- a/src/being.h +++ b/src/being.h @@ -112,7 +112,7 @@ class Being : public Sprite /** * Constructor. */ - Being(Uint32 id, Uint16 job, Map *map); + Being(Uint16 id, Uint16 job, Map *map); /** * Destructor. @@ -274,14 +274,14 @@ class Being : public Sprite /** * Gets the sprite id. */ - Uint32 + Uint16 getId() const { return mId; } /** * Sets the sprite id. */ void - setId(Uint32 id) { mId = id; } + setId(Uint16 id) { mId = id; } /** * Sets the map the being is on @@ -348,7 +348,7 @@ class Being : public Sprite SpriteDirection getSpriteDirection() const; - Uint32 mId; /**< Unique sprite id */ + Uint16 mId; /**< Unique being id */ Uint8 mSex; /**< Character's gender */ Uint16 mWeapon; /**< Weapon picture id */ Uint16 mWalkSpeed; /**< Walking speed */ diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 0156ce33..d2db055a 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -62,7 +62,7 @@ void BeingManager::setPlayer(LocalPlayer *player) mBeings.push_back(player); } -Being* BeingManager::createBeing(Uint32 id, Uint16 job) +Being* BeingManager::createBeing(Uint16 id, Uint16 job) { Being *being; @@ -90,7 +90,7 @@ void BeingManager::destroyBeing(Being *being) delete being; } -Being* BeingManager::findBeing(Uint32 id) +Being* BeingManager::findBeing(Uint16 id) { for (BeingIterator i = mBeings.begin(); i != mBeings.end(); i++) { diff --git a/src/beingmanager.h b/src/beingmanager.h index 0dbafcc6..c32884a0 100644 --- a/src/beingmanager.h +++ b/src/beingmanager.h @@ -48,7 +48,7 @@ class BeingManager /** * Create a being and add it to the list of beings */ - Being* createBeing(Uint32 id, Uint16 job); + Being* createBeing(Uint16 id, Uint16 job); /** * Remove a Being @@ -58,7 +58,7 @@ class BeingManager /** * Return a specific id Being */ - Being* findBeing(Uint32 id); + Being* findBeing(Uint16 id); /** * Return a being at specific coordinates diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 9df3ac3f..87a55744 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -37,8 +37,8 @@ LocalPlayer *player_node = NULL; -LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map): - Player(id, job, map), +LocalPlayer::LocalPlayer(): + Player(65535, 0, NULL), mLevel(1), mInventory(new Inventory()), mTarget(NULL), mPickUpTarget(NULL), diff --git a/src/localplayer.h b/src/localplayer.h index 613f196a..886c3d11 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -42,7 +42,7 @@ class LocalPlayer : public Player STR = 0, AGI, VIT, INT, DEX, LUK }; - LocalPlayer(Uint32 id, Uint16 job, Map *map); + LocalPlayer(); virtual ~LocalPlayer(); diff --git a/src/monster.cpp b/src/monster.cpp index aba242b6..a4317e5e 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -29,7 +29,7 @@ #include "utils/tostring.h" -Monster::Monster(Uint32 id, Uint16 job, Map *map): +Monster::Monster(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { mSprites[BASE_SPRITE] = new AnimatedSprite("graphics/sprites/monster" + toString(job - 1002) + ".xml", 0); diff --git a/src/monster.h b/src/monster.h index 6ce0d69d..0314a035 100644 --- a/src/monster.h +++ b/src/monster.h @@ -29,7 +29,7 @@ class Monster : public Being { public: - Monster(Uint32 id, Uint16 job, Map *map); + Monster(Uint16 id, Uint16 job, Map *map); virtual Type getType() const; }; diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index e3eb6eba..8ccd3dd6 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -398,7 +398,7 @@ void BeingHandler::handleBeingEnterMessage(MessageIn &msg) { int type = msg.readByte(); // type - int id = msg.readLong(); + int id = msg.readShort(); switch (type) { case OBJECT_PLAYER: @@ -431,8 +431,7 @@ BeingHandler::handleBeingEnterMessage(MessageIn &msg) void BeingHandler::handleBeingLeaveMessage(MessageIn &msg) { - msg.readByte(); // type, assume player for now, TODO - Being *being = beingManager->findBeing(msg.readLong()); + Being *being = beingManager->findBeing(msg.readShort()); if (!being) return; if (being == player_node->getTarget()) { @@ -443,9 +442,9 @@ void BeingHandler::handleBeingLeaveMessage(MessageIn &msg) void BeingHandler::handleBeingsMoveMessage(MessageIn &msg) { - for (int nb = (msg.getLength() - 2) / (4 + 4 * 2); nb > 0; --nb) + for (int nb = (msg.getLength() - 2) / (2 + 4 * 2); nb > 0; --nb) { - Uint32 id = msg.readLong(); + Uint16 id = msg.readShort(); Being *being = beingManager->findBeing(id); if (!being) continue; int sx = msg.readShort(), sy = msg.readShort(), diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index d67949cc..4e251524 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -195,7 +195,7 @@ CharServerHandler::handleCharSelectResponse(MessageIn &msg) LocalPlayer* CharServerHandler::readPlayerData(MessageIn &msg, int &slot) { - LocalPlayer *tempPlayer = new LocalPlayer(mLoginData->account_ID, 0, NULL); + LocalPlayer *tempPlayer = new LocalPlayer; slot = msg.readByte(); // character slot tempPlayer->mName = msg.readString(); tempPlayer->setSex(msg.readByte()); diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index 02f99c41..f765f0f4 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -59,12 +59,12 @@ void ChatHandler::handleMessage(MessageIn &msg) { Being *being; std::string chatMsg; - Sint16 chatMsgLength; + //Sint16 chatMsgLength; switch (msg.getId()) { case GPMSG_SAY: - being = beingManager->findBeing(msg.readLong()); + being = beingManager->findBeing(msg.readShort()); chatMsg = msg.readString(); if (being) { @@ -77,6 +77,7 @@ void ChatHandler::handleMessage(MessageIn &msg) } break; + /* // Received speech from being case SMSG_BEING_CHAT: chatMsgLength = msg.readShort() - 8; @@ -131,5 +132,6 @@ void ChatHandler::handleMessage(MessageIn &msg) msg.readLong(); // id chatWindow->chatLog("MVP player", BY_SERVER); break; + */ } } diff --git a/src/net/protocol.h b/src/net/protocol.h index 6feee9d4..f056f003 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -152,13 +152,14 @@ enum { // [, S32 token, S server, W port] PGMSG_PICKUP = 0x0110, GPMSG_PICKUP_RESPONSE = 0x0111, - GPMSG_BEING_ENTER = 0x0200, // B type, L being id + GPMSG_BEING_ENTER = 0x0200, // B type, W being id // player: S name, B hair style, B hair color, B gender - GPMSG_BEING_LEAVE = 0x0201, // B type, L being id + // monster: W type id + GPMSG_BEING_LEAVE = 0x0201, // W being id PGMSG_WALK = 0x0260, // W*2 destination - GPMSG_BEINGS_MOVE = 0x0280, // { L being id, W*2 position, W*2 destination }* + GPMSG_BEINGS_MOVE = 0x0280, // { W being id, W*2 position, W*2 destination }* PGMSG_SAY = 0x02A0, // S text - GPMSG_SAY = 0x02A1, // L being id, S text + GPMSG_SAY = 0x02A1, // W being id, S text PGMSG_USE_ITEM = 0x0300, // L item id GPMSG_USE_RESPONSE = 0x0301, // B error PGMSG_EQUIP = 0x0302, // L item id, B slot diff --git a/src/npc.cpp b/src/npc.cpp index 13025469..b2b426dd 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -33,7 +33,7 @@ extern Spriteset *npcset; NPC *current_npc = 0; -NPC::NPC(Uint32 id, Uint16 job, Map *map): +NPC::NPC(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { mSprites[BASE_SPRITE] = new AnimatedSprite("graphics/sprites/npc.xml", job-100); diff --git a/src/npc.h b/src/npc.h index bbc86d9c..3b61123b 100644 --- a/src/npc.h +++ b/src/npc.h @@ -29,7 +29,7 @@ class NPC : public Being { public: - NPC(Uint32 id, Uint16 job, Map *map); + NPC(Uint16 id, Uint16 job, Map *map); virtual Type getType() const; diff --git a/src/player.cpp b/src/player.cpp index af9a3344..f5f42e9f 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -32,7 +32,7 @@ #include "gui/gui.h" -Player::Player(Uint32 id, Uint16 job, Map *map): +Player::Player(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { /* Load the weapon sprite. When there are more different weapons this diff --git a/src/player.h b/src/player.h index 65b0303d..6ff4babe 100644 --- a/src/player.h +++ b/src/player.h @@ -38,7 +38,7 @@ class Player : public Being /** * Constructor. */ - Player(Uint32 id, Uint16 job, Map *map); + Player(Uint16 id, Uint16 job, Map *map); virtual Type getType() const; -- cgit v1.2.3-70-g09d2 From 8da32105732949b4b0273c718d118bcfae70a1c9 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 11 Dec 2006 15:47:35 +0000 Subject: Merged 0.0 changes from revision 2825 to 2898 to trunk. --- ChangeLog | 292 +++++++++++++++++++++++- NEWS | 11 + data/CMakeLists.txt | 3 +- data/Makefile.am | 3 +- data/graphics/images/CMakeLists.txt | 1 + data/graphics/images/Makefile.am | 1 + data/graphics/images/error.png | Bin 0 -> 314 bytes src/CMakeLists.txt | 19 +- src/Makefile.am | 19 +- src/action.cpp | 66 ++++++ src/action.h | 61 +++++ src/animatedsprite.cpp | 430 +++++++++--------------------------- src/animatedsprite.h | 131 +++-------- src/animation.cpp | 127 +---------- src/animation.h | 97 ++------ src/base64.cpp | 63 +++--- src/base64.h | 11 +- src/being.cpp | 87 ++++---- src/being.h | 36 +-- src/beingmanager.cpp | 24 +- src/engine.cpp | 147 +----------- src/engine.h | 14 -- src/floor_item.cpp | 4 +- src/floor_item.h | 10 +- src/game.cpp | 94 ++++---- src/graphics.cpp | 3 + src/gui/buy.cpp | 4 +- src/gui/char_select.cpp | 51 +++-- src/gui/char_select.h | 11 +- src/gui/confirm_dialog.cpp | 1 + src/gui/confirm_dialog.h | 2 +- src/gui/debugwindow.cpp | 10 +- src/gui/gui.cpp | 152 +------------ src/gui/gui.h | 38 +--- src/gui/inventorywindow.cpp | 3 +- src/gui/item_amount.cpp | 3 +- src/gui/login.cpp | 1 + src/gui/ok_dialog.cpp | 1 + src/gui/ok_dialog.h | 2 +- src/gui/passwordfield.h | 4 +- src/gui/playerbox.cpp | 37 +--- src/gui/playerbox.h | 24 +- src/gui/popupmenu.cpp | 4 +- src/gui/register.cpp | 1 + src/gui/sell.cpp | 5 +- src/gui/serverdialog.cpp | 1 + src/gui/serverdialog.h | 2 +- src/gui/setup_joystick.cpp | 2 +- src/gui/shop.cpp | 6 +- src/gui/textfield.h | 1 - src/gui/trade.cpp | 36 +-- src/gui/updatewindow.cpp | 2 +- src/gui/viewport.cpp | 392 ++++++++++++++++++++++++++++++++ src/gui/viewport.h | 145 ++++++++++++ src/gui/window.cpp | 3 + src/gui/window.h | 3 +- src/gui/windowcontainer.h | 3 +- src/item.h | 4 +- src/localplayer.cpp | 36 ++- src/localplayer.h | 10 +- src/log.cpp | 23 +- src/main.cpp | 51 ++--- src/map.cpp | 53 +++-- src/map.h | 12 +- src/monster.cpp | 39 +++- src/monster.h | 2 + src/net/beinghandler.cpp | 83 ++++--- src/net/inventoryhandler.cpp | 2 +- src/net/npchandler.cpp | 10 +- src/net/playerhandler.cpp | 18 +- src/net/skillhandler.cpp | 4 +- src/npc.cpp | 17 +- src/npc.h | 8 +- src/openglgraphics.cpp | 3 + src/player.cpp | 109 +++++---- src/player.h | 18 +- src/resources/equipmentdb.cpp | 158 +++++++++++++ src/resources/equipmentdb.h | 52 +++++ src/resources/equipmentinfo.h | 52 +++++ src/resources/image.cpp | 10 +- src/resources/itemdb.cpp | 170 ++++++++++++++ src/resources/itemdb.h | 53 +++++ src/resources/iteminfo.h | 12 +- src/resources/itemmanager.cpp | 173 --------------- src/resources/itemmanager.h | 59 ----- src/resources/mapreader.cpp | 32 +-- src/resources/monsterdb.cpp | 151 +++++++++++++ src/resources/monsterdb.h | 45 ++++ src/resources/monsterinfo.cpp | 70 ++++++ src/resources/monsterinfo.h | 74 +++++++ src/resources/resourcemanager.cpp | 61 +++-- src/resources/resourcemanager.h | 17 +- src/resources/soundeffect.cpp | 19 +- src/resources/spritedef.cpp | 381 ++++++++++++++++++++++++++++++++ src/resources/spritedef.h | 158 +++++++++++++ src/resources/spriteset.h | 6 +- src/sound.cpp | 6 +- src/sound.h | 4 +- src/sprite.h | 2 +- src/utils/wingettimeofday.h | 111 ++++++++++ src/utils/xml.cpp | 54 +++++ src/utils/xml.h | 46 ++++ tmw.cbp | 102 +++++++-- 103 files changed, 3532 insertions(+), 1752 deletions(-) create mode 100644 data/graphics/images/error.png create mode 100644 src/action.cpp create mode 100644 src/action.h create mode 100644 src/gui/viewport.cpp create mode 100644 src/gui/viewport.h create mode 100644 src/resources/equipmentdb.cpp create mode 100644 src/resources/equipmentdb.h create mode 100644 src/resources/equipmentinfo.h create mode 100644 src/resources/itemdb.cpp create mode 100644 src/resources/itemdb.h delete mode 100644 src/resources/itemmanager.cpp delete mode 100644 src/resources/itemmanager.h create mode 100644 src/resources/monsterdb.cpp create mode 100644 src/resources/monsterdb.h create mode 100644 src/resources/monsterinfo.cpp create mode 100644 src/resources/monsterinfo.h create mode 100644 src/resources/spritedef.cpp create mode 100644 src/resources/spritedef.h create mode 100644 src/utils/wingettimeofday.h create mode 100644 src/utils/xml.cpp create mode 100644 src/utils/xml.h (limited to 'src/npc.h') diff --git a/ChangeLog b/ChangeLog index 807de694..c67d6cd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,305 @@ +2006-12-09 Eugenio Favalli + + * data/graphics/sprites/npcs.png: Added pirate NPC. + +2006-12-09 Bjørn Lindeijer + + * src/sprite.h, src/gui/playerbox.h, src/gui/char_select.cpp, + src/gui/playerbox.cpp, src/gui/passwordfield.h,src/gui/char_select.h, + src/gui/textfield.h, src/main.cpp, src/being.cpp, src/player.h, + src/floor_item.h, src/being.h: Use new animation system in character + selection/creation. Shows equipment and allowed for some cleanup. Had + a bit of help from the patch by VictorSan. + +2006-12-08 Bjørn Lindeijer + + * src/base64.cpp, src/base64.h, src/resources/mapreader.cpp: + Downgraded to base64 codec from PHP 3 to resolve licensing issues. + +2006-12-06 Eugenio Favalli + + * The Mana World.dev, tmw.cbp: Updated project files. + +2006-12-06 Philipp Sehmisch + + * src/net/beinghandler.cpp: Fixed crashs when changing equipment. + * data/graphics/tiles/desert1.png, data/graphics/tiles/desert2.png: + More tiling related fixes at the cliffs. + +2006-12-06 Bjørn Lindeijer + + * src/gui/item_amount.cpp: Fixed visibility of item amount window. + +2006-12-05 Philipp Sehmisch + + * data/graphics/tiles/desert1.png: Improved the tiling behavior + of the cliffs (still not gridless but at least the edges fit + together in the most common situations) + +2006-12-04 Bjørn Lindeijer + + * src/game.cpp, src/engine.h, src/gui/windowcontainer.h, + src/gui/viewport.cpp, src/gui/gui.cpp, src/gui/gui.h, + src/gui/debugwindow.cpp, src/gui/inventorywindow.cpp, + src/gui/viewport.h, src/engine.cpp, src/CMakeLists.txt, + src/Makefile.am: Introduced a new class Viewport which combines the + drawing code from Engine with the (rather misplaced) input handling + from the Gui class. Also, it's a Container itself which should allow + for extending it to show Guichan widgets on map coordinates. + +2006-12-03 Bjørn Lindeijer + + * src/sound.cpp, src/monster.cpp, src/sound.h, + src/resources/soundeffect.cpp, src/resources/resourcemanager.cpp: + Don't try to play empty strings as sounds, and don't return a + SoundEffect instance when Mix_Chunk loading failed. + * src/beingmanager.cpp, src/npc.cpp, src/npc.h: Show NPC names. + * src/game.cpp, src/gui/char_server.cpp, src/gui/window.cpp, + src/gui/login.cpp, src/gui/char_select.cpp, src/gui/ok_dialog.cpp, + src/gui/confirm_dialog.cpp, src/gui/ok_dialog.h, src/gui/window.h, + src/gui/confirm_dialog.h, src/gui/register.cpp: Windows now default + to invisible, since this seems the most common case. + +2006-12-02 Philipp Sehmisch + + * data/graphics/sprites/chest-leather-female.png: A little correction + at the female leather shirt by mangamaniac. + +2006-12-01 Philipp Sehmisch + + * src/net/beinghandler.cpp, src/being.h, src/being.cpp, src/monster.h, + src/gui/gui.cpp: Visible equipment slot numbers are now converted by + the beinghandler from eAthena to our system. No more distinction + between monster attacking and player attacking between beinghandler + and the being classes. + * src/being.cpp, src/monster.cpp, src/being.h, src/monster.h: Moved + the monster specific action handling into the monster class. + * monster.cpp, mosterinfo.cpp, monsterinfo.h: Monsters now make sounds + when they attack, gett hurt or die. + * src/being.cpp: Delayed the damage numbers a bit to synchronize them + better with the hurt sounds. + * data/monsters.xml, data/sfx//bat-dying1.ogg, data/sfx/bat-hit1.ogg, + data/sfx/bow_shoot_1.ogg, data/sfx/fire-goblin-hit1.ogg, + data/sfx/fire-goblin-hit2.ogg, data/sfx/fire-goblin-miss1.ogg, + data/sfx/fist-swish.ogg, data/sfx/flower-hit1.ogg, + data/sfx/flower-hit2.ogg, data/sfx/flower-miss1.ogg, + data/sfx/fluffy-hit1.ogg, data/sfx/fluffy-hit2.ogg, + data/sfx/fluffy-hit3.ogg, data/sfx/fluffy-hurt1.ogg, + data/sfx/fluffy-miss1.ogg, data/sfx/knife-hit1.ogg, + data/sfx/knife-miss1.ogg, data/sfx/levelup.ogg, + data/sfx/scorpion-hit1.ogg, data/sfx/scorpion-hit2.ogg, + data/sfx/scorpion-hit3.ogg, data/sfx/scorpion-hit4.ogg, + data/sfx/scorpion-miss1.ogg, data/sfx/short-sword-hit1.ogg, + data/sfx/short-sword-miss1.ogg, data/sfx/shroom-hit1.ogg, + data/sfx/slime-hit1.ogg, data/sfx/Makefile.AM, + data/sfx/CMakeLists.txt: Added a lot of sound effects by Cosmostrator. + +2006-11-30 Bjørn Lindeijer + + * data/maps/Makefile.am: Fixed small trailing slash issue. + * src/player.cpp: Optimized setSex and setWeapon by first loading the + new sprite and then deleting the old one (prevents potentially + unnecessary reload). + * src/net/beinghandler.cpp: Optimized handling of player walk + messages, by first setting the gender right and then setting the + equipment. Gets rid of reload of complete equipment in the case of + female. + +2006-11-30 Eugenio Favalli + + * The Mana World.dev, tmw.cbp: Updated project files. + +2006-11-29 Bjørn Lindeijer + + * src/monster.cpp: Small fix to resource path. + +2006-11-29 Philipp Sehmisch + + * src/resources/equipment.h: Made getSprite return a constant + reference. + * src/resources/monsterdb.cpp, src/resources/monsterdb.h, + src/resources/monsterinfo.cpp, src/resources/monsterinfo.h, + src/Makefile.AM, src/CMakeLists.txt, src/main.cpp: + Added the MonsterDB namespace that reads the monsters.xml + and maps monster IDs to names, sprite definitions and sound effects. + * src/monster.cpp: Get sprite definition filenames from MonsterDB. + * src/engine.cpp: Show monster name when targeting a monster. + * data/monsters.xml, data/graphics/sprites/Makefile.AM, + data/graphics/sprites/CMakeLists.txt, data/graphics/sprites/monster*: + Renamed all monster sprites to more associative names (whew, we got to + train some monkeys for tasks like that). + +2006-11-27 Bjørn Lindeijer + + * tmw.cbp: Updated Code::Blocks project file. + +2006-11-27 Philipp Sehmisch + + * src/log.cpp, src/util/wingettimeofday.h: Added implementation of + gettimeofday() for windows machines. + +2006-11-26 Bjørn Lindeijer + + * src/log.cpp: Higher precision log timestamps. + * src/graphics.cpp, src/gui/gui.cpp, src/openglgraphics.cpp, + src/main.cpp, src/resources/equipmentdb.cpp, + src/resources/resourcemanager.cpp: Added some additional log + statements. + * src/resources/itemdb.cpp: Removed usage of READ_PROP in favour of + XML::getProperty and updated log statements. + * src/resources/image.cpp: Added support for loading TGA images. + +2006-11-26 Björn Steinbrink + + * src/resources/resourcemanager.cpp: Remove unnecessary check for + file existance, loading will just fail with the correct error message. + +2006-11-26 Bjørn Lindeijer + + * src/game.cpp, src/being.cpp, src/net/beinghandler.cpp, src/being.h: + Made Being::mDirection protected, forcing the use of setDirection. + * src/npc.cpp, src/player.cpp, src/animatedsprite.h, src/monster.cpp, + src/resources/resourcemanager.h: Defaulted variant argument to 0 since + this is the most common situation. + * src/resources/spritedef.cpp, src/resources/spritedef.h: Some + refactoring, splitting up the loading into several methods, in + preparation of adding support for including other sprites. + * src/main.cpp: ItemDB needs to be unloaded before deleting the + resource manager instance, since ItemInfo refers to an Image. + +2006-11-26 Philipp Sehmisch + + * src/being.cpp, src/being.h, src/engine.cpp, src/main.cpp, + src/player.cpp, src/player.h, src/resources/equipmentdb.h, + src/resources/equipmentdb.cpp, src/resources/equipmentinfo.h, + src/resources/itemdb.cpp, src/resources/itemdb.h, + data/graphics/images/error.png, data/graphics/sprites/error.xml: + Added the EquipmentDB namespace that reads the equipment.xml, maps + equipment IDs to sprite definition files and thus allows gender + specific equipment sprites. + * data/graphics/sprites/chest-leather-female.png, + data/graphics/sprites/chest-leather-male.png, + data/graphics/sprites/chest-leather-female.xml, + data/graphics/sprites/chest-leather-male.xml, + data/equipment.xml: Added and defined male and female leather shirt as + proof of concept of the gender specific equipment. + * data/graphics/images/Makefile.am, data/graphics/sprites/Makefile.am, + data/Makefile.am, src/Makefile.am, + data/graphics/images/CMakeLists.txt, + data/graphics/sprites/CMakeLists.txt, data/CMakeLists.txt, + src/CMakeLists.txt: Updated Makefiles and CMake Lists. + +2006-11-24 Philipp Sehmisch + + * src/engine.cpp, src/floor_item.cpp, src/item.h, src/main.cpp, + src/gui/buy.cpp, src/gui/popupmenu.cpp, src/gui/sell.cpp, + src/gui/shop.cpp, src/net/inventoryhandler.cpp, + src/resources/itemdb.cpp, src/resources/itemdb.h, + src/resources/iteminfo.h, src/resources/itemmanager.cpp, + src/resources/itemmanager.h: Refactored the Itemmanager class to an + ItemDB namespace. + +2006-11-23 Eugenio Favalli + + * The Mana World.dev, tmw.cbp: Updated project files. + +2006-11-19 Bjørn Lindeijer + + * src/gui/setup_joystick.cpp: Fixed joystick option to show enabled + when the joystick is enabled. + * src/localplayer.cpp, src/game.cpp, src/action.h, src/action.cpp, + src/player.cpp, src/animatedsprite.h, src/being.cpp, src/animation.h, + src/monster.cpp, src/CMakeLists.txt, src/player.h, + src/animatedsprite.cpp, src/localplayer.h, src/animation.cpp, + src/Makefile.am, src/being.h, src/resources/resourcemanager.cpp, + src/resources/spritedef.cpp, src/resources/resourcemanager.h, + src/resources/spriteset.h, src/resources/spritedef.cpp: Separated + sprite definition from playback. + 2006-11-17 Björn Steinbrink * data/graphics/sprites/CMakeLists.txt: Fixed some filenames. +2006-11-17 Wai Ling Tsang + + * src/gui/gui.cpp: Added mouse following ability/feature under + logic(). + * src/gui/gui.h: Added mouseMotion(), mouseRelease() and private + variables for mouse following. + +2006-11-15 Philipp Sehmisch + + * data/graphics/tiles/Woodland_village.png, + data/graphics/tiles/Woodland_village_x2.png, + data/graphics/tiles/Woodland_x2.png, + data/graphics/tiles/Makefile.AM, + data/graphics/tiles/CMakeList.txt, + data/maps/new_9-1.tmx.gz, data/maps/new_14-1.tmx.gz, + data/maps/new_15-1.tmx.gz, data/maps/new_16-1.tmx.gz, + data/maps/new_17-1.tmx.gz, data/maps/new_18-1.tmx.gz, + data/maps/new_19-1.tmx.gz, data/maps/CMakeList.txt, + data/maps/Makefile.AM: + Added woodland village outdoor tileset and maps. Modified gates on + the nearby maps. + +2006-11-15 Bjørn Lindeijer + + * src/animatedsprite.h, src/CMakeLists.txt, src/animatedsprite.cpp, + src/utils/xml.cpp, src/utils/xml.h, src/Makefile.am, + src/resources/mapreader.cpp: Separated getProperty method to an XML + utility namespace. + +2006-11-15 Eugenio Favalli + + * The Mana World.dev, tmw.cbp: Updated project files. + * The Mana World.dev, tmw.cbp: Fixed dynamic linking of libcurl. + +2006-11-14 Bjørn Lindeijer + + * src/action.h, src/action.cpp, src/animation.h, src/CMakeLists.txt, + src/animatedsprite.cpp, src/animation.cpp, src/Makefile.am: Separated + Action class to its own module. + * src/action.h, src/action.cpp, src/animatedsprite.h, src/animation.h, + src/animatedsprite.cpp, src/animation.cpp: Resolve Image* of animation + phase at load time instead of storing just the spriteset index and + looking it up later (checking validity should still be added). Also + calculate animation length during loading instead of summing it up + each time it is requested. + +2006-11-12 Bjørn Lindeijer + + * src/map.cpp, src/map.h: Made pathfinding algorithm cope better with + beings blocking the road. This is done by allowing walking over other + beings, but at an additional cost so that it is preferable to walk + around them. + * src/game.cpp: Worked around a Guichan exception thrown for mice with + many buttons (patch by Roel van Dijk). + 2006-11-11 Björn Steinbrink * src/Makefile.am: Fixed autotools configuration. +2006-11-09 Eugenio Favalli + + * src/main.cpp, src/net/network.cpp, src/net/network.h, + The Mana World.dev, tmw.cbp: Fixed a conflict with Windows headers and + updated project files. + 2006-11-05 Eugenio Favalli * The Mana World.dev, tmw.cbp: Updated project files. Warning: Dev-Cpp will now build objects in the source folder. +2006-11-05 Bjørn Lindeijer + + * src/gui/trade.cpp: Fixed money field to no longer hide below the + bottom of the window. + * src/CMakeLists.txt: Added shoplistbox.h/cpp files. + * src/gui/updatewindow.cpp: Fixed percentage indicator of update + window. + * src/main.cpp, src/net/beinghandler.cpp, src/net/skillhandler.cpp, + src/net/network.cpp: Changed some printf statements to log statements. + 2006-11-05 Bjørn Lindeijer * data/graphics/images/login_wallpaper.png: Reverted to standard @@ -37,6 +326,7 @@ precisions about the total money in it. * src/gui/shop.h, src/gui/shop.cpp, src/gui/sell.cpp: Fixes to Sell dialog. + * src/gui/sell.cpp: Fixes the money value after selling something. 2006-11-05 Björn Steinbrink @@ -78,7 +368,7 @@ 2006-11-04 Philipp Sehmisch - * data/maps/new_17-1.tmx.gz, + * data/maps/new_17-1.tmx.gz, data/graphics/images/minimap_new_17-1.png, data/graphics/images/Makefile.am, data/graphics/images/CMakeLists.txt: diff --git a/NEWS b/NEWS index 4633c39b..f3b586f8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ +0.0.22 (...) +- Added support for female-specific equipment graphics +- Added support for monster sounds +- Changed to new update host (http://updates.themanaworld.org) +- Worked around a Guichan exception thrown for mice with many buttons +- Changed mouse walk to keep following mouse while button is held down +- Extended font support for å and Å. +- Fixed joystick setting not to show disabled when it's actually enabled +- Fixed money field to no longer hide below the bottom of the window +- Fixed pathfinding to allow walking through beings when they block your path + 0.0.21.1 (30 October 2006) - Reload wallpaper after loading updates - Added support for gzip compressed map layer data diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 36259082..e60bfe30 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -7,7 +7,8 @@ ADD_SUBDIRECTORY(maps) ADD_SUBDIRECTORY(sfx) SET(FILES + equipment.xml items.xml ) -INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}) +INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}) \ No newline at end of file diff --git a/data/Makefile.am b/data/Makefile.am index 7d16a1fc..ed080d08 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -4,7 +4,8 @@ SUBDIRS = graphics help icons maps sfx tmwdatadir = $(pkgdatadir)/data tmwdata_DATA = \ + equipment.xml \ items.xml EXTRA_DIST = \ - $(tmwdata_DATA) + $(tmwdata_DATA) \ No newline at end of file diff --git a/data/graphics/images/CMakeLists.txt b/data/graphics/images/CMakeLists.txt index 53f8b3a7..f02cd2ea 100644 --- a/data/graphics/images/CMakeLists.txt +++ b/data/graphics/images/CMakeLists.txt @@ -1,6 +1,7 @@ ADD_SUBDIRECTORY(ambient) SET(FILES + error.png login_wallpaper.png minimap_new_1-1.png minimap_new_14-1.png diff --git a/data/graphics/images/Makefile.am b/data/graphics/images/Makefile.am index cc71b18a..00d9ed7e 100644 --- a/data/graphics/images/Makefile.am +++ b/data/graphics/images/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = ambient imagesdir = $(pkgdatadir)/data/graphics/images images_DATA = \ + error.png \ login_wallpaper.png \ minimap_new_1-1.png \ minimap_new_2-1.png \ diff --git a/data/graphics/images/error.png b/data/graphics/images/error.png new file mode 100644 index 00000000..6fd7c1a8 Binary files /dev/null and b/data/graphics/images/error.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4fd8d880..e0b93382 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,6 +155,8 @@ SET(SRCS gui/vbox.h gui/windowcontainer.cpp gui/windowcontainer.h + gui/viewport.cpp + gui/viewport.h gui/window.cpp gui/window.h gui/widgets/dropdown.cpp @@ -216,17 +218,24 @@ SET(SRCS resources/ambientoverlay.h resources/buddylist.cpp resources/buddylist.h + resources/equipmentdb.cpp + resources/equipmentdb.h + resources/equipmentinfo.h resources/image.cpp resources/image.h resources/imagewriter.cpp resources/imagewriter.h resources/iteminfo.cpp + resources/itemdb.cpp + resources/itemdb.h resources/iteminfo.h - resources/itemmanager.cpp - resources/itemmanager.h resources/mapreader.cpp resources/mapreader.h resources/music.cpp + resources/monsterdb.h + resources/monsterdb.cpp + resources/monsterinfo.h + resources/monsterinfo.cpp resources/music.h resources/openglsdlimageloader.cpp resources/openglsdlimageloader.h @@ -239,9 +248,15 @@ SET(SRCS resources/soundeffect.cpp resources/soundeffect.h resources/spriteset.cpp + resources/spritedef.h + resources/spritedef.cpp resources/spriteset.h utils/dtor.h utils/tostring.h + utils/xml.cpp + utils/xml.h + action.cpp + action.h animatedsprite.cpp animatedsprite.h animation.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 23c57922..1628df18 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,6 +110,8 @@ tmw_SOURCES = gui/widgets/dropdown.cpp \ gui/textfield.h \ gui/trade.cpp \ gui/trade.h \ + gui/viewport.cpp \ + gui/viewport.h \ gui/window.cpp \ gui/window.h \ gui/windowcontainer.cpp \ @@ -179,16 +181,23 @@ tmw_SOURCES = gui/widgets/dropdown.cpp \ net/gameserver/player.h \ resources/ambientoverlay.cpp \ resources/ambientoverlay.h \ + resources/equipmentdb.cpp \ + resources/equipmentdb.h \ + resources/equipmentinfo.h \ resources/image.cpp \ resources/image.h \ resources/imagewriter.cpp \ resources/imagewriter.h \ + resources/itemdb.cpp \ + resources/itemdb.h \ resources/iteminfo.h \ resources/iteminfo.cpp \ - resources/itemmanager.cpp \ - resources/itemmanager.h \ resources/mapreader.cpp \ resources/mapreader.h \ + resources/monsterdb.h \ + resources/monsterdb.cpp \ + resources/monsterinfo.h \ + resources/monsterinfo.cpp \ resources/music.h \ resources/music.cpp \ resources/openglsdlimageloader.h \ @@ -201,12 +210,18 @@ tmw_SOURCES = gui/widgets/dropdown.cpp \ resources/sdlimageloader.cpp \ resources/soundeffect.h \ resources/soundeffect.cpp \ + resources/spritedef.h \ + resources/spritedef.cpp \ resources/spriteset.h \ resources/spriteset.cpp \ resources/buddylist.h \ resources/buddylist.cpp \ utils/dtor.h \ utils/tostring.h \ + utils/xml.cpp \ + utils/xml.h \ + action.cpp \ + action.h \ animatedsprite.cpp \ animatedsprite.h \ animation.cpp \ diff --git a/src/action.cpp b/src/action.cpp new file mode 100644 index 00000000..148ea105 --- /dev/null +++ b/src/action.cpp @@ -0,0 +1,66 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#include "action.h" + +#include + +#include "animation.h" +#include "utils/dtor.h" + + +Action::Action() +{ +} + +Action::~Action() +{ + std::for_each(mAnimations.begin(), mAnimations.end(), + make_dtor(mAnimations)); +} + +Animation* +Action::getAnimation(int direction) const +{ + Animations::const_iterator i = mAnimations.find(direction); + + // When the direction isn't defined, try the default + if (i == mAnimations.end()) + { + i = mAnimations.find(0); + } + + return (i == mAnimations.end()) ? NULL : i->second; +} + +void +Action::setAnimation(int direction, Animation *animation) +{ + // Set first direction as default direction + if (mAnimations.empty()) + { + mAnimations[0] = animation; + } + + mAnimations[direction] = animation; +} diff --git a/src/action.h b/src/action.h new file mode 100644 index 00000000..8d5e8d11 --- /dev/null +++ b/src/action.h @@ -0,0 +1,61 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#ifndef _TMW_ACTION_H +#define _TMW_ACTION_H + +#include + +#include + +class Animation; + +/** + * An action consists of several animations, one for each direction. + */ +class Action +{ + public: + /** + * Constructor. + */ + Action(); + + /** + * Destructor. + */ + ~Action(); + + void + setAnimation(int direction, Animation *animation); + + Animation* + getAnimation(int direction) const; + + protected: + typedef std::map Animations; + typedef Animations::iterator AnimationIterator; + Animations mAnimations; +}; + +#endif diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 3815f04a..46369c80 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -24,401 +24,177 @@ #include "animatedsprite.h" #include "animation.h" +#include "action.h" #include "graphics.h" #include "log.h" #include "resources/resourcemanager.h" #include "resources/spriteset.h" +#include "resources/image.h" -AnimatedSprite::AnimatedSprite(const std::string& animationFile, int variant): - mAction(NULL), +#include "utils/xml.h" + +#include + +AnimatedSprite::AnimatedSprite(SpriteDef *sprite): mDirection(DIRECTION_DOWN), mLastTime(0), - mSpeed(1.0f), - mAnimationFile(animationFile) + mFrameIndex(0), + mFrameTime(0), + mSprite(sprite), + mAction(0), + mAnimation(0), + mFrame(0) { - int size; - ResourceManager *resman = ResourceManager::getInstance(); - char *data = (char*)resman->loadFile(animationFile.c_str(), size); - - if (!data) { - logger->error("Animation: Could not find " + animationFile + "!"); - } - - xmlDocPtr doc = xmlParseMemory(data, size); - free(data); - - if (!doc) { - logger->error( - "Animation: Error while parsing animation definition file!"); - } - - xmlNodePtr node = xmlDocGetRootElement(doc); - if (!node || !xmlStrEqual(node->name, BAD_CAST "sprite")) { - logger->error( - "Animation: this is not a valid animation definition file!"); - } - - // Get the variant - int variant_num = getProperty(node, "variants", 0); - int variant_offset = getProperty(node, "variant_offset", 0); - - if (variant_num > 0 && variant < variant_num ) { - variant_offset *= variant; - } else { - variant_offset = 0; - } + assert(mSprite); - for (node = node->xmlChildrenNode; node != NULL; node = node->next) - { - if (xmlStrEqual(node->name, BAD_CAST "imageset")) - { - int width = getProperty(node, "width", 0); - int height = getProperty(node, "height", 0); - std::string name = getProperty(node, "name", ""); - std::string imageSrc = getProperty(node, "src", ""); - - Spriteset *spriteset = - resman->getSpriteset(imageSrc, width, height); - - if (!spriteset) { - logger->error("Couldn't load spriteset!"); - } - - mSpritesets[name] = spriteset; - } - // get action - else if (xmlStrEqual(node->name, BAD_CAST "action")) - { - std::string actionName = getProperty(node, "name", ""); - std::string imageset = getProperty(node, "imageset", ""); - - if (mSpritesets.find(imageset) == mSpritesets.end()) { - logger->log("Warning: imageset \"%s\" not defined in %s", - imageset.c_str(), - animationFile.c_str()); - - // skip loading animations - continue; - } - - - SpriteAction actionType = makeSpriteAction(actionName); - if (actionType == ACTION_INVALID) - { - logger->log("Warning: Unknown action \"%s\" defined in %s", - actionName.c_str(), - animationFile.c_str()); - continue; - } - Action *action = new Action(); - action->setSpriteset(mSpritesets[imageset]); - mActions[actionType] = action; - - // When first action set it as default direction - if (mActions.empty()) - { - mActions[ACTION_DEFAULT] = action; - } - - - // get animations - for (xmlNodePtr animationNode = node->xmlChildrenNode; - animationNode != NULL; - animationNode = animationNode->next) - { - // We're only interested in animations - if (!xmlStrEqual(animationNode->name, BAD_CAST "animation")) - continue; - - std::string directionName = getProperty(animationNode, "direction", ""); - - SpriteDirection directionType = makeSpriteDirection(directionName); - if (directionType == DIRECTION_INVALID) - { - logger->log("Warning: Unknown direction \"%s\" defined for action %s in %s", - directionName.c_str(), - actionName.c_str(), - animationFile.c_str()); - continue; - } - - Animation *animation = new Animation(); - action->setAnimation(directionType, animation); - - // Get animation phases - for (xmlNodePtr phaseNode = animationNode->xmlChildrenNode; - phaseNode != NULL; - phaseNode = phaseNode->next) - { - int delay = getProperty(phaseNode, "delay", 0); - - if (xmlStrEqual(phaseNode->name, BAD_CAST "frame")) - { - int index = getProperty(phaseNode, "index", -1); - int offsetX = getProperty(phaseNode, "offsetX", 0); - int offsetY = getProperty(phaseNode, "offsetY", 0); - - offsetY -= mSpritesets[imageset]->getHeight() - 32; - offsetX -= mSpritesets[imageset]->getWidth() / 2 - 16; - animation->addPhase(index + variant_offset, delay, - offsetX, offsetY); - } - else if (xmlStrEqual(phaseNode->name, BAD_CAST "sequence")) - { - int start = getProperty(phaseNode, "start", 0); - int end = getProperty(phaseNode, "end", 0); - int offsetY = -mSpritesets[imageset]->getHeight() + 32; - int offsetX = -mSpritesets[imageset]->getWidth() / 2 + 16; - while (end >= start) - { - animation->addPhase(start + variant_offset, - delay, offsetX, offsetY); - start++; - } - } - else if (xmlStrEqual(phaseNode->name, BAD_CAST "end")) - { - animation->addTerminator(); - }; - } // for phaseNode - } // for animationNode - } // if "" else if "" - } // for node - - // Complete missing actions - substituteAction(ACTION_STAND, ACTION_DEFAULT); - substituteAction(ACTION_WALK, ACTION_STAND); - substituteAction(ACTION_WALK, ACTION_RUN); - substituteAction(ACTION_ATTACK, ACTION_STAND); - substituteAction(ACTION_ATTACK_SWING, ACTION_ATTACK); - substituteAction(ACTION_ATTACK_STAB, ACTION_ATTACK_SWING); - substituteAction(ACTION_ATTACK_BOW, ACTION_ATTACK_STAB); - substituteAction(ACTION_ATTACK_THROW, ACTION_ATTACK_SWING); - substituteAction(ACTION_CAST_MAGIC, ACTION_ATTACK_SWING); - substituteAction(ACTION_USE_ITEM, ACTION_CAST_MAGIC); - substituteAction(ACTION_SIT, ACTION_STAND); - substituteAction(ACTION_SLEEP, ACTION_SIT); - substituteAction(ACTION_HURT, ACTION_STAND); - substituteAction(ACTION_DEAD, ACTION_HURT); + // Take possession of the sprite + mSprite->incRef(); // Play the stand animation by default play(ACTION_STAND); - - xmlFreeDoc(doc); -} - -int -AnimatedSprite::getProperty(xmlNodePtr node, const char* name, int def) -{ - int &ret = def; - - xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { - ret = atoi((char*)prop); - xmlFree(prop); - } - - return ret; } -std::string -AnimatedSprite::getProperty(xmlNodePtr node, const char* name, - const std::string& def) +AnimatedSprite::AnimatedSprite(const std::string& filename, int variant): + mDirection(DIRECTION_DOWN), + mLastTime(0), + mFrameIndex(0), + mFrameTime(0), + mAnimation(0), + mFrame(0) { - xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { - std::string val = (char*)prop; - xmlFree(prop); - return val; - } - - return def; -} + ResourceManager *resman = ResourceManager::getInstance(); + mSprite = resman->getSprite(filename, variant); + assert(mSprite); -void -AnimatedSprite::substituteAction(SpriteAction complete, - SpriteAction with) -{ - if (mActions.find(complete) == mActions.end()) - { - ActionIterator i = mActions.find(with); - if (i != mActions.end()) { - mActions[complete] = i->second; - } - } + // Play the stand animation by default + play(ACTION_STAND); } AnimatedSprite::~AnimatedSprite() { - for (SpritesetIterator i = mSpritesets.begin(); i != mSpritesets.end(); ++i) - { - i->second->decRef(); - } - mSpritesets.clear(); + mSprite->decRef(); } void AnimatedSprite::reset() { - // Reset all defined actions (because of aliases some will be resetted - // multiple times, but this doesn't matter) - for (ActionIterator i = mActions.begin(); i != mActions.end(); ++i) - { - if (i->second) - { - i->second->reset(); - } - } + mFrameIndex = 0; + mFrameTime = 0; + mLastTime = 0; } void -AnimatedSprite::play(SpriteAction action) +AnimatedSprite::play(SpriteAction spriteAction) { - ActionIterator i = mActions.find(action); - - if (i == mActions.end()) + Action *action = mSprite->getAction(spriteAction); + if (!action) { - //logger->log("Warning: no action %u defined for \"%s\"!", - // action, mAnimationFile.c_str()); - mAction = NULL; return; } - if (mAction != i->second) + mAction = action; + Animation *animation = mAction->getAnimation(mDirection); + + if (animation && animation != mAnimation && animation->getLength() > 0) { - mAction = i->second; - //mAction->reset(); + mAnimation = animation; + mFrame = mAnimation->getFrame(0); + + reset(); } } void AnimatedSprite::update(int time) { - bool notFinished = true; // Avoid freaking out at first frame or when tick_time overflows if (time < mLastTime || mLastTime == 0) + { mLastTime = time; + } // If not enough time has passed yet, do nothing - if (time > mLastTime && mAction) + if (time <= mLastTime || !mAnimation) { - Animation *animation = mAction->getAnimation(mDirection); - if (animation != NULL) { - notFinished = animation->update((unsigned int)(time - mLastTime));} - mLastTime = time; + return; } - if (!notFinished) + unsigned int dt = time - mLastTime; + mLastTime = time; + + if (!updateCurrentAnimation(dt)) { + // Animation finished, reset to default play(ACTION_STAND); } } bool -AnimatedSprite::draw(Graphics* graphics, Sint32 posX, Sint32 posY) const +AnimatedSprite::updateCurrentAnimation(unsigned int time) { - if (!mAction) + if (!mFrame || Animation::isTerminator(*mFrame)) + { return false; + } - Animation *animation = mAction->getAnimation(mDirection); - if (animation == NULL) return false; + mFrameTime += time; - int phase = animation->getCurrentPhase(); - if (phase < 0) - return false; + while (mFrameTime > mFrame->delay && mFrame->delay > 0) + { + mFrameTime -= mFrame->delay; + mFrameIndex++; - Spriteset *spriteset = mAction->getSpriteset(); - Image *image = spriteset->get(phase); - Sint32 offsetX = animation->getOffsetX(); - Sint32 offsetY = animation->getOffsetY(); - return graphics->drawImage(image, posX + offsetX, posY + offsetY); -} + if (mFrameIndex == mAnimation->getLength()) + { + mFrameIndex = 0; + } -int -AnimatedSprite::getWidth() const -{ - return mAction ? mAction->getSpriteset()->getWidth() : 0; -} + mFrame = mAnimation->getFrame(mFrameIndex); -int -AnimatedSprite::getHeight() const -{ - return mAction ? mAction->getSpriteset()->getHeight() : 0; + if (Animation::isTerminator(*mFrame)) + { + mAnimation = 0; + mFrame = 0; + return false; + } + } + + return true; } -SpriteAction -AnimatedSprite::makeSpriteAction(const std::string& action) +bool +AnimatedSprite::draw(Graphics* graphics, int posX, int posY) const { - if (action == "" || action == "default") { - return ACTION_DEFAULT; - } - if (action == "stand") { - return ACTION_STAND; - } - else if (action == "walk") { - return ACTION_WALK; - } - else if (action == "run") { - return ACTION_RUN; - } - else if (action == "attack") { - return ACTION_ATTACK; - } - else if (action == "attack_swing") { - return ACTION_ATTACK_SWING; - } - else if (action == "attack_stab") { - return ACTION_ATTACK_STAB; - } - else if (action == "attack_bow") { - return ACTION_ATTACK_BOW; - } - else if (action == "attack_throw") { - return ACTION_ATTACK_THROW; - } - else if (action == "cast_magic") { - return ACTION_CAST_MAGIC; - } - else if (action == "use_item") { - return ACTION_USE_ITEM; - } - else if (action == "sit") { - return ACTION_SIT; - } - else if (action == "sleep") { - return ACTION_SLEEP; - } - else if (action == "hurt") { - return ACTION_HURT; - } - else if (action == "dead") { - return ACTION_DEAD; - } - else { - return ACTION_INVALID; + if (!mFrame || !mFrame->image) + { + return false; } + + return graphics->drawImage(mFrame->image, + posX + mFrame->offsetX, + posY + mFrame->offsetY); } -SpriteDirection -AnimatedSprite::makeSpriteDirection(const std::string& direction) +void +AnimatedSprite::setDirection(SpriteDirection direction) { - if (direction == "" || direction == "default") { - return DIRECTION_DEFAULT; - } - else if (direction == "up") { - return DIRECTION_UP; - } - else if (direction == "left") { - return DIRECTION_LEFT; - } - else if (direction == "right") { - return DIRECTION_RIGHT; - } - else if (direction == "down") { - return DIRECTION_DOWN; + if (mDirection != direction) + { + mDirection = direction; + + if (!mAction) + { + return; + } + + Animation *animation = mAction->getAnimation(mDirection); + + if (animation && animation != mAnimation && animation->getLength() > 0) + { + mAnimation = animation; + mFrame = mAnimation->getFrame(0); + reset(); + } } - else { - return DIRECTION_INVALID; - }; } diff --git a/src/animatedsprite.h b/src/animatedsprite.h index bda612ab..4e485f14 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -24,56 +24,34 @@ #ifndef _TMW_ANIMATEDSPRITE_H #define _TMW_ANIMATEDSPRITE_H +#include "resources/spritedef.h" + #include #include -#include - -#include -class Action; class Graphics; -class Spriteset; - -enum SpriteAction -{ - ACTION_DEFAULT = 0, - ACTION_STAND, - ACTION_WALK, - ACTION_RUN, - ACTION_ATTACK, - ACTION_ATTACK_SWING, - ACTION_ATTACK_STAB, - ACTION_ATTACK_BOW, - ACTION_ATTACK_THROW, - ACTION_CAST_MAGIC, - ACTION_USE_ITEM, - ACTION_SIT, - ACTION_SLEEP, - ACTION_HURT, - ACTION_DEAD, - ACTION_INVALID -}; - -enum SpriteDirection -{ - DIRECTION_DEFAULT = 0, - DIRECTION_DOWN, - DIRECTION_UP, - DIRECTION_LEFT, - DIRECTION_RIGHT, - DIRECTION_INVALID -}; +struct AnimationPhase; /** - * Defines a class to load an animation. + * Animates a sprite by adding playback state. */ class AnimatedSprite { public: /** * Constructor. + * @param sprite the sprite to animate */ - AnimatedSprite(const std::string& animationFile, int variant); + AnimatedSprite(SpriteDef *sprite); + + /** + * A convenience constructor, which will request the sprite to animate + * from the resource manager. + * + * @param filename the file of the sprite to animate + * @param variant the sprite variant + */ + AnimatedSprite(const std::string& filename, int variant = 0); /** * Destructor. @@ -81,8 +59,7 @@ class AnimatedSprite ~AnimatedSprite(); /** - * Resets the animated sprite. This is used to synchronize several - * animated sprites. + * Resets the animated sprite. */ void reset(); @@ -97,84 +74,36 @@ class AnimatedSprite * Inform the animation of the passed time so that it can output the * correct animation phase. */ - void update(int time); + void + update(int time); /** * Draw the current animation phase at the coordinates given in screen * pixels. */ bool - draw(Graphics* graphics, Sint32 posX, Sint32 posY) const; - - /** - * gets the width in pixels of the current animation phase. - */ - int - getWidth() const; - - /** - * gets the height in pixels of the current animation phase. - */ - int - getHeight() const; + draw(Graphics* graphics, int posX, int posY) const; /** * Sets the direction. */ void - setDirection(SpriteDirection direction) - { - mDirection = direction; - } + setDirection(SpriteDirection direction); private: - /** - * When there are no animations defined for the action "complete", its - * animations become a copy of those of the action "with". - */ - void - substituteAction(SpriteAction complete, SpriteAction with); - - /** - * Gets an integer property from an xmlNodePtr. - * - * TODO: Same function is present in MapReader. Should probably be - * TODO: shared in a static utility class. - */ - static int - getProperty(xmlNodePtr node, const char *name, int def); - - /** - * Gets a string property from an xmlNodePtr. - */ - static std::string - getProperty(xmlNodePtr node, const char *name, const std::string &def); - - /** - * Converts a string into a SpriteAction enum. - */ - static SpriteAction - makeSpriteAction(const std::string &action); - - /** - * Converts a string into a SpriteDirection enum. - */ - static SpriteDirection - makeSpriteDirection(const std::string &direction); - + bool + updateCurrentAnimation(unsigned int dt); - typedef std::map Spritesets; - typedef Spritesets::iterator SpritesetIterator; + SpriteDirection mDirection; /**< The sprite direction. */ + int mLastTime; /**< The last time update was called. */ - typedef std::map Actions; - typedef Actions::iterator ActionIterator; + unsigned int mFrameIndex; /**< The index of the current frame. */ + unsigned int mFrameTime; /**< The time since start of frame. */ - Spritesets mSpritesets; - Actions mActions; - Action *mAction; - SpriteDirection mDirection; - int mLastTime; - float mSpeed; + SpriteDef *mSprite; /**< The sprite definition. */ + Action *mAction; /**< The currently active action. */ + Animation *mAnimation; /**< The currently active animation. */ + AnimationPhase *mFrame; /**< The currently active frame. */ std::string mAnimationFile; }; diff --git a/src/animation.cpp b/src/animation.cpp index 98a4abb8..67fdae11 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -27,138 +27,29 @@ #include "utils/dtor.h" -Animation::Animation() +Animation::Animation(): + mDuration(0) { - reset(); } void -Animation::reset() +Animation::addPhase(Image *image, unsigned int delay, int offsetX, int offsetY) { - mTime = 0; - iCurrentPhase = mAnimationPhases.begin(); -} - - -bool -Animation::update(unsigned int time) -{ - mTime += time; - if (mAnimationPhases.empty()) - return true; - if (isTerminator(*iCurrentPhase)) - return false; - - unsigned int delay = iCurrentPhase->delay; - - while (mTime > delay) - { - if (!delay) - return true; - mTime -= delay; - iCurrentPhase++; - if (iCurrentPhase == mAnimationPhases.end()) - { - iCurrentPhase = mAnimationPhases.begin(); - } - if (isTerminator(*iCurrentPhase)) - return false; - delay = iCurrentPhase->delay; - } - return true; -} - - -int -Animation::getCurrentPhase() const -{ - return mAnimationPhases.empty() ? -1 : iCurrentPhase->image; -} - - -void -Animation::addPhase(int image, unsigned int delay, int offsetX, int offsetY) -{ - //add new phase to animation list - AnimationPhase newPhase = { image, delay, offsetX, offsetY}; + // Add new phase to animation list + AnimationPhase newPhase = { image, delay, offsetX, offsetY }; mAnimationPhases.push_back(newPhase); - //reset animation circle - iCurrentPhase = mAnimationPhases.begin(); + mDuration += delay; } void Animation::addTerminator() { - AnimationPhase terminator = { -1, 0, 0, 0}; - mAnimationPhases.push_back(terminator); - iCurrentPhase = mAnimationPhases.begin(); + addPhase(NULL, 0, 0, 0); } bool -Animation::isTerminator(AnimationPhase candidate) -{ - return (candidate.image < 0); -} - -int -Animation::getLength() -{ - if (mAnimationPhases.empty()) - return 0; - - std::list::iterator i; - int length = 0; - for (i = mAnimationPhases.begin(); i != mAnimationPhases.end(); i++) - { - length += i->delay; - } - return length; -} - -Action::Action(): - mSpriteset(NULL) -{ -} - -Action::~Action() -{ - std::for_each(mAnimations.begin(), mAnimations.end(), make_dtor(mAnimations)); - mAnimations.clear(); -} - -Animation* -Action::getAnimation(int direction) const -{ - Animations::const_iterator i = mAnimations.find(direction); - - // When the direction isn't defined, try the default - if (i == mAnimations.end()) - { - i = mAnimations.find(0); - } - - return (i == mAnimations.end()) ? NULL : i->second; -} - -void -Action::setAnimation(int direction, Animation *animation) -{ - // Set first direction as default direction - if (mAnimations.empty()) - { - mAnimations[0] = animation; - } - - mAnimations[direction] = animation; -} - -void -Action::reset() +Animation::isTerminator(const AnimationPhase candidate) { - for (AnimationIterator i = mAnimations.begin(); - i != mAnimations.end(); ++i) - { - i->second->reset(); - } + return (candidate.image == NULL); } diff --git a/src/animation.h b/src/animation.h index 605d8cb1..85e950d7 100644 --- a/src/animation.h +++ b/src/animation.h @@ -24,8 +24,7 @@ #ifndef _TMW_ANIMATION_H #define _TMW_ANIMATION_H -#include -#include +#include #include @@ -34,10 +33,12 @@ class Spriteset; /** * A single frame in an animation, with a delay and an offset. + * + * TODO: Rename this struct to Frame */ struct AnimationPhase { - int image; + Image *image; unsigned int delay; int offsetX; int offsetY; @@ -55,106 +56,46 @@ class Animation */ Animation(); - /** - * Restarts the animation from the first frame. - */ - void - reset(); - /** * Appends a new animation at the end of the sequence */ void - addPhase(int image, unsigned int delay, int offsetX, int offsetY); + addPhase(Image *image, unsigned int delay, int offsetX, int offsetY); /** * Appends an animation terminator that states that the animation - * should not loop + * should not loop. */ void addTerminator(); /** - * Updates animation phase. - * true indicates a still running animation while false indicates a - * finished animation + * Returns the frame at the specified index. */ - bool - update(unsigned int time); - - int - getCurrentPhase() const; + AnimationPhase* + getFrame(int index) { return &(mAnimationPhases[index]); } /** - * Returns the x offset of the current frame. + * Returns the length of this animation in frames. */ - int - getOffsetX() const { return iCurrentPhase->offsetX; }; + unsigned int + getLength() const { return mAnimationPhases.size(); } /** - * Returns the y offset of the current frame. + * Returns the duration of this animation. */ int - getOffsetY() const { return iCurrentPhase->offsetY; }; + getDuration() const { return mDuration; } /** - * Returns the length of this animation. + * Determines whether the given animation frame is a terminator. */ - int - getLength(); - - protected: - static bool isTerminator(AnimationPhase); - std::list mAnimationPhases; - std::list::iterator iCurrentPhase; - unsigned int mTime; -}; - -/** - * An action consists of several animations, one for each direction. - */ -class Action -{ - public: - /** - * Constructor. - */ - Action(); - - /** - * Destructor. - */ - ~Action(); - - /** - * Sets the spriteset used by this action. - */ - void - setSpriteset(Spriteset *spriteset) { mSpriteset = spriteset; } - - /** - * Returns the spriteset used by this action. - */ - Spriteset* - getSpriteset() const { return mSpriteset; } - - void - setAnimation(int direction, Animation *animation); - - /** - * Resets all animations associated with this action. - */ - void - reset(); - - Animation* - getAnimation(int direction) const; + static bool + isTerminator(const AnimationPhase phase); protected: - Spriteset *mSpriteset; - typedef std::map Animations; - typedef Animations::iterator AnimationIterator; - Animations mAnimations; + std::vector mAnimationPhases; + int mDuration; }; #endif diff --git a/src/base64.cpp b/src/base64.cpp index 6d503a53..9a8f6356 100644 --- a/src/base64.cpp +++ b/src/base64.cpp @@ -1,16 +1,27 @@ /* +----------------------------------------------------------------------+ - | PHP version 4.0 | + | PHP HTML Embedded Scripting Language Version 3.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | + | Copyright (c) 1997-2000 PHP Development Team (See Credits file) | +----------------------------------------------------------------------+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | + | This program is free software; you can redistribute it and/or modify | + | it under the terms of one of the following licenses: | + | | + | A) the GNU General Public License as published by the Free Software | + | Foundation; either version 2 of the License, or (at your option) | + | any later version. | + | | + | B) the PHP License as published by the PHP Development Team and | + | included in the distribution in the file: LICENSE | + | | + | This program is distributed in the hope that it will be useful, | + | but WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | + | GNU General Public License for more details. | + | | + | You should have received a copy of both licenses referred to here. | + | If you did not, or have any questions about PHP licensing, please | + | contact core@php.net. | +----------------------------------------------------------------------+ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ @@ -32,8 +43,8 @@ static char base64_table[] = }; static char base64_pad = '='; -unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length) { - const unsigned char *current = str; +unsigned char *php3_base64_encode(const unsigned char *string, int length, int *ret_length) { + const unsigned char *current = string; int i = 0; unsigned char *result = (unsigned char *)malloc(((length + 3 - length % 3) * 4 / 3 + 1) * sizeof(char)); @@ -69,27 +80,13 @@ unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_ } /* as above, but backwards. :) */ -unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_length) { - const unsigned char *current = str; +unsigned char *php3_base64_decode(const unsigned char *string, int length, int *ret_length) { + const unsigned char *current = string; int ch, i = 0, j = 0, k; - /* this sucks for threaded environments */ - static short reverse_table[256]; - static int table_built; - unsigned char *result; - - if (++table_built == 1) { - char *chp; - for(ch = 0; ch < 256; ch++) { - chp = strchr(base64_table, ch); - if(chp) { - reverse_table[ch] = chp - base64_table; - } else { - reverse_table[ch] = -1; - } - } - } + char *chp; + + unsigned char *result = (unsigned char *)malloc(length + 1); - result = (unsigned char *)malloc(length + 1); if (result == NULL) { return NULL; } @@ -107,8 +104,9 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_ if (ch == ' ') ch = '+'; - ch = reverse_table[ch]; - if (ch < 0) continue; + chp = strchr(base64_table, ch); + if (chp == NULL) continue; + ch = chp - base64_table; switch(i % 4) { case 0: @@ -149,4 +147,3 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_ result[k] = '\0'; return result; } - diff --git a/src/base64.h b/src/base64.h index 5b275c45..ff20ac53 100644 --- a/src/base64.h +++ b/src/base64.h @@ -31,14 +31,7 @@ #ifndef _TMW_BASE64_H #define _TMW_BASE64_H -extern unsigned char *php_base64_encode(const unsigned char *, int, int *); -extern unsigned char *php_base64_decode(const unsigned char *, int, int *); +extern unsigned char *php3_base64_encode(const unsigned char *, int, int *); +extern unsigned char *php3_base64_decode(const unsigned char *, int, int *); #endif /* _TMW_BASE64_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/src/being.cpp b/src/being.cpp index 50a2dc35..9cd0af0d 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -49,7 +49,7 @@ PATH_NODE::PATH_NODE(Uint16 iX, Uint16 iY): Being::Being(Uint16 id, Uint16 job, Map *map): mJob(job), - mX(0), mY(0), mDirection(DOWN), + mX(0), mY(0), mAction(STAND), mWalkTime(0), mEmotion(0), mEmotionTime(0), @@ -60,12 +60,15 @@ Being::Being(Uint16 id, Uint16 job, Map *map): mWeapon(0), mWalkSpeed(150), mSpeedModifier(1024), + mDirection(DOWN), mMap(NULL), mHairStyle(0), mHairColor(0), mSpeechTime(0), mDamageTime(0), mShowSpeech(false), mShowDamage(false), - mSprites(VECTOREND_SPRITE, NULL) + mPx(0), mPy(0), + mSprites(VECTOREND_SPRITE, NULL), + mEquipmentSpriteIDs(VECTOREND_SPRITE, 0) { setMap(map); } @@ -110,9 +113,7 @@ void Being::adjustCourse(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY) p1 = mMap->findPath(srcX / 32, srcY / 32, dstX / 32, dstY / 32); if (p1.empty()) { - // No path? Better teleport. - mX = dstX; - mY = dstY; + // No path, but don't teleport since it could be user input. setPath(p1); return; } @@ -189,9 +190,8 @@ void Being::adjustCourse(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY) if (bestRating < 0) { - // Unable to reach the path? Better teleport. - mX = srcX; - mY = srcY; + // Unable to reach the path? Still, don't teleport since it could be + // user input instead of server command. setPath(p1); delete[] p1_dist; return; @@ -263,8 +263,9 @@ Being::setHairStyle(Uint16 style) } void -Being::setVisibleEquipment(Uint8 slot, Uint8 id) +Being::setVisibleEquipment(Uint8 slot, int id) { + mEquipmentSpriteIDs[slot] = id; } void @@ -304,7 +305,7 @@ Being::setMap(Map *map) void Being::setAction(Uint8 action) { - SpriteAction currentAction = ACTION_STAND; + SpriteAction currentAction = ACTION_INVALID; switch (action) { case WALK: @@ -314,37 +315,21 @@ Being::setAction(Uint8 action) currentAction = ACTION_SIT; break; case ATTACK: - if (getType() == MONSTER) + switch (getWeapon()) { - currentAction = ACTION_DEAD; + case 3: + currentAction = ACTION_ATTACK; + break; + case 2: + currentAction = ACTION_ATTACK_BOW; + break; + case 1: + currentAction = ACTION_ATTACK_STAB; + break; + case 0: + currentAction = ACTION_ATTACK; + break; } - else { - switch (getWeapon()) - { - case 3: - currentAction = ACTION_ATTACK; - break; - case 2: - currentAction = ACTION_ATTACK_BOW; - break; - case 1: - currentAction = ACTION_ATTACK_STAB; - break; - case 0: - currentAction = ACTION_ATTACK; - break; - } - for (int i = 0; i < VECTOREND_SPRITE; i++) - { - if (mSprites[i]) - { - mSprites[i]->reset(); - } - } - }; - break; - case MONSTER_ATTACK: - currentAction = ACTION_ATTACK; for (int i = 0; i < VECTOREND_SPRITE; i++) { if (mSprites[i]) @@ -353,25 +338,33 @@ Being::setAction(Uint8 action) } } break; + case HURT: + //currentAction = ACTION_HURT; // Buggy: makes the player stop + // attacking and unable to attack + // again until he moves + break; case DEAD: currentAction = ACTION_DEAD; break; - default: + case STAND: currentAction = ACTION_STAND; break; } - for (int i = 0; i < VECTOREND_SPRITE; i++) + if (currentAction != ACTION_INVALID) { - if (mSprites[i]) + for (int i = 0; i < VECTOREND_SPRITE; i++) { - mSprites[i]->play(currentAction); + if (mSprites[i]) + { + mSprites[i]->play(currentAction); + } } + mAction = action; } - - mAction = action; } + void Being::setDirection(Uint8 direction) { @@ -487,7 +480,7 @@ Being::logic() } void -Being::draw(Graphics *graphics, int offsetX, int offsetY) +Being::draw(Graphics *graphics, int offsetX, int offsetY) const { int px = mPx + offsetX; int py = mPy + offsetY; @@ -528,7 +521,7 @@ Being::drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) } // Draw damage above this being - if (mShowDamage) + if (mShowDamage && get_elapsed_time(mDamageTime) > 250) { // Selecting the right color if (mDamage == "miss") diff --git a/src/being.h b/src/being.h index 2804b20b..c95cd191 100644 --- a/src/being.h +++ b/src/being.h @@ -68,14 +68,12 @@ class Being : public Sprite }; enum Action { - STAND = 0, - WALK = 1, - MONSTER_ATTACK = 5, - SIT = 7, - DEAD = 8, - ATTACK = 9, - MONSTER_DEAD = 9, - HIT = 17 + STAND, + WALK, + ATTACK, + SIT, + DEAD, + HURT }; enum Sprite { @@ -101,7 +99,6 @@ class Being : public Sprite std::string mName; /**< Name of character */ Uint16 mJob; /**< Job (player job, npc, monster, ) */ Uint16 mX, mY; /**< Pixel coordinates (tile center) */ - Uint8 mDirection; /**< Facing direction */ Uint8 mAction; /**< Action the being is performing */ Uint16 mWalkTime; Uint8 mEmotion; /**< Currently showing emotion */ @@ -199,7 +196,7 @@ class Being : public Sprite * Sets visible equipments for this being. */ virtual void - setVisibleEquipment(Uint8 slot, Uint8 id); + setVisibleEquipment(Uint8 slot, int id); /** * Sets the sex for this being. @@ -216,7 +213,7 @@ class Being : public Sprite /** * Makes this being take the next step of his path. */ - void + virtual void nextStep(); /** @@ -301,7 +298,13 @@ class Being : public Sprite /** * Sets the current action. */ - void setAction(Uint8 action); + virtual void + setAction(Uint8 action); + + /** + * Returns the current direction. + */ + Uint8 getDirection() const { return mDirection; } /** * Sets the current direction. @@ -314,7 +317,7 @@ class Being : public Sprite * @see Sprite::draw(Graphics, int, int) */ virtual void - draw(Graphics *graphics, Sint32 offsetX, Sint32 offsetY); + draw(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) const; /** * Returns the pixel X coordinate. @@ -343,7 +346,6 @@ class Being : public Sprite getYOffset() const { return getOffset(mStepY); } std::auto_ptr mEquipment; - int mVisibleEquipment[6]; /**< Visible equipments */ protected: /** @@ -363,6 +365,7 @@ class Being : public Sprite Uint16 mWeapon; /**< Weapon picture id */ Uint16 mWalkSpeed; /**< Walking speed */ Uint16 mSpeedModifier; /**< Modifier to keep course on sync (1024 = normal speed) */ + Uint8 mDirection; /**< Facing direction */ Map *mMap; /**< Map on which this being resides */ SpriteIterator mSpriteIterator; @@ -376,11 +379,14 @@ class Being : public Sprite Sint32 mPx, mPy; /**< Pixel coordinates */ std::vector mSprites; + std::vector mEquipmentSpriteIDs; private: + int + getOffset(int step) const; + Sint16 mStepX, mStepY; Uint16 mStepTime; - int getOffset(int) const; }; #endif diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 923283b5..14b4ea7e 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -38,7 +38,7 @@ class FindBeingFunctor Uint16 other_y = y + ((being->getType() == Being::NPC) ? 1 : 0); return (being->mX / 32 == x && (being->mY / 32 == y || being->mY / 32 == other_y) && - being->mAction != Being::MONSTER_DEAD && + being->mAction != Being::DEAD && (type == Being::UNKNOWN || being->getType() == type)); } @@ -64,14 +64,7 @@ Being* BeingManager::createBeing(Uint16 id, Uint16 job) Being *being; if (job < 10) - { being = new Player(id, job, mMap); - // XXX Convert for new server - /* - MessageOut outMsg(0x0094); - outMsg.writeLong(id); - */ - } else if (job >= 100 & job < 200) being = new NPC(id, job, mMap); else if (job >= 1000 && job < 1200) @@ -79,6 +72,17 @@ Being* BeingManager::createBeing(Uint16 id, Uint16 job) else being = new Being(id, job, mMap); + // Player or NPC + if (job < 200) + { + // XXX Convert for new server + /* + MessageOut outMsg(mNetwork); + outMsg.writeInt16(0x0094); + outMsg.writeInt32(id);//readLong(2)); + */ + } + mBeings.push_back(being); return being; @@ -127,7 +131,8 @@ void BeingManager::logic() being->logic(); - /*if (being->mAction == Being::MONSTER_DEAD && being->mFrame >= 20) + /* + if (being->mAction == Being::DEAD && being->mFrame >= 20) { delete being; i = mBeings.erase(i); @@ -168,7 +173,6 @@ Being* BeingManager::findNearestLivingBeing(Uint16 x, Uint16 y, int maxdist, if ((being->getType() == type || type == Being::UNKNOWN) && (d < dist || closestBeing == NULL) // it is closer && being->mAction != Being::DEAD // no dead beings - && being->mAction != Being::MONSTER_DEAD ) { dist = d; diff --git a/src/engine.cpp b/src/engine.cpp index 231313c4..30f0097e 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -39,9 +39,10 @@ #include "gui/gui.h" #include "gui/minimap.h" +#include "gui/viewport.h" -#include "resources/itemmanager.h" #include "resources/mapreader.h" +#include "resources/monsterdb.h" #include "resources/resourcemanager.h" #include "resources/spriteset.h" @@ -51,16 +52,12 @@ extern Minimap *minimap; char itemCurrenyQ[10] = "0"; -int camera_x, camera_y; - -ItemManager *itemDb; /**< Item database object */ Spriteset *emotionset; Spriteset *npcset; std::vector weaponset; Engine::Engine(): - mShowDebugPath(false), mCurrentMap(NULL) { // Load the sprite sets @@ -82,9 +79,6 @@ Engine::Engine(): if (!npcset) logger->error("Unable to load NPC spriteset!"); if (!emotionset) logger->error("Unable to load emotions spriteset!"); - - // Initialize item manager - itemDb = new ItemManager(); } Engine::~Engine() @@ -96,8 +90,6 @@ Engine::~Engine() std::for_each(weaponset.begin(), weaponset.end(), std::mem_fun(&Spriteset::decRef)); weaponset.clear(); - - delete itemDb; } void Engine::changeMap(const std::string &mapPath) @@ -125,6 +117,7 @@ void Engine::changeMap(const std::string &mapPath) } minimap->setMapImage(mapImage); beingManager->setMap(newMap); + viewport->setMap(newMap); // Start playing new music file when necessary std::string oldMusic = ""; @@ -152,139 +145,5 @@ void Engine::logic() void Engine::draw(Graphics *graphics) { - int midTileX = graphics->getWidth() / 2; - int midTileY = graphics->getHeight() / 2; - static int lastTick = tick_time; - - int player_x = player_node->mX - midTileX + player_node->getXOffset(); - int player_y = player_node->mY - midTileY + player_node->getYOffset(); - - scrollLaziness = (int)config.getValue("ScrollLaziness", 32); - scrollRadius = (int)config.getValue("ScrollRadius", 32); - - if (scrollLaziness < 1) - scrollLaziness = 1; //avoids division by zero - - //apply lazy scrolling - int nbTicks = get_elapsed_time(lastTick) / 10; - lastTick += nbTicks; - for (; nbTicks > 0; --nbTicks) - { - if (player_x > view_x + scrollRadius) - { - view_x += (player_x - view_x - scrollRadius) / scrollLaziness; - } - if (player_x < view_x - scrollRadius) - { - view_x += (player_x - view_x + scrollRadius) / scrollLaziness; - } - if (player_y > view_y + scrollRadius) - { - view_y += (player_y - view_y - scrollRadius) / scrollLaziness; - } - if (player_y < view_y - scrollRadius) - { - view_y += (player_y - view_y + scrollRadius) / scrollLaziness; - } - } - - //auto center when player is off screen - if ( player_x - view_x > graphics->getWidth() / 2 - || view_x - player_x > graphics->getWidth() / 2 - || view_y - player_y > graphics->getHeight() / 2 - || player_y - view_y > graphics->getHeight() / 2 - ) - { - view_x = player_x; - view_y = player_y; - }; - - if (mCurrentMap) { - if (view_x < 0) { - view_x = 0; - } - if (view_y < 0) { - view_y = 0; - } - if (view_x > mCurrentMap->getWidth() * 32 - midTileX) { - view_x = mCurrentMap->getWidth() * 32 - midTileX; - } - if (view_y > mCurrentMap->getHeight() * 32 - midTileY) { - view_y = mCurrentMap->getHeight() * 32 - midTileY; - } - } - - camera_x = (int)view_x; - camera_y = (int)view_y; - - // Draw tiles and sprites - if (mCurrentMap != NULL) - { - mCurrentMap->draw(graphics, camera_x, camera_y, 0); - mCurrentMap->draw(graphics, camera_x, camera_y, 1); - mCurrentMap->draw(graphics, camera_x, camera_y, 2); - mCurrentMap->drawOverlay( graphics, - view_x, - view_y, - (int)config.getValue("OverlayDetail", 2) - ); - } - else - { - // When no map is loaded, draw a replacement background - graphics->setColor(gcn::Color(128, 128, 128)); - graphics->fillRectangle(gcn::Rectangle(0, 0, - graphics->getWidth(), graphics->getHeight())); - } - - // Find a path from the player to the mouse, and draw it. This is for debug - // purposes. - if (mShowDebugPath && mCurrentMap != NULL) - { - // Get the current mouse position - int mouseX, mouseY; - SDL_GetMouseState(&mouseX, &mouseY); - - int mouseTileX = (mouseX + camera_x) / 32; - int mouseTileY = (mouseY + camera_y) / 32; - - Path debugPath = mCurrentMap->findPath( - player_node->mX / 32, player_node->mY / 32, - mouseTileX, mouseTileY); - - graphics->setColor(gcn::Color(255, 0, 0)); - for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++) - { - int squareX = i->x * 32 - camera_x + 12; - int squareY = i->y * 32 - camera_y + 12; - - graphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); - graphics->drawText( - toString(mCurrentMap->getMetaTile(i->x, i->y)->Gcost), - squareX + 4, squareY + 12, gcn::Graphics::CENTER); - } - } - - // Draw player nickname, speech, and emotion sprite as needed - Beings &beings = beingManager->getAll(); - for (BeingIterator i = beings.begin(); i != beings.end(); i++) - { - (*i)->drawSpeech(graphics, -camera_x, -camera_y); - (*i)->drawName(graphics, -camera_x, -camera_y); - (*i)->drawEmotion(graphics, -camera_x, -camera_y); - } - - // Draw target marker if needed - Being *target; - if ((target = player_node->getTarget())) - { - graphics->setFont(speechFont); - graphics->setColor(gcn::Color(255, 255, 255)); - int dy = (target->getType() == Being::PLAYER) ? 90 : 52; - - graphics->drawText("[TARGET]", target->getPixelX() - camera_x + 15, - target->getPixelY() - camera_y - dy, gcn::Graphics::CENTER); - } - gui->draw(); } diff --git a/src/engine.h b/src/engine.h index e8ef7e33..62e82a49 100644 --- a/src/engine.h +++ b/src/engine.h @@ -26,8 +26,6 @@ #include -extern int camera_x, camera_y; - class Graphics; class Map; @@ -67,20 +65,8 @@ class Engine */ void draw(Graphics *graphics); - /** - * Toggles whether the path debug graphics are shown - */ - void toggleDebugPath() { mShowDebugPath = !mShowDebugPath; }; - private: - bool mShowDebugPath; - Map *mCurrentMap; - - int scrollRadius; - int scrollLaziness; - float view_x; // current viewpoint in pixels - float view_y; // current viewpoint in pixels }; extern Engine *engine; diff --git a/src/floor_item.cpp b/src/floor_item.cpp index 9a179a21..f33f7eb4 100644 --- a/src/floor_item.cpp +++ b/src/floor_item.cpp @@ -25,7 +25,7 @@ #include "map.h" -#include "resources/itemmanager.h" +#include "resources/itemdb.h" #include "resources/iteminfo.h" #include "resources/spriteset.h" @@ -42,7 +42,7 @@ FloorItem::FloorItem(unsigned int id, mMap(map) { // Retrieve item image from item info - mImage = itemDb->getItemInfo(itemId).getImage(); + mImage = ItemDB::get(itemId).getImage(); // Add ourselves to the map mSpriteIterator = mMap->addSprite(this); diff --git a/src/floor_item.h b/src/floor_item.h index 386d0759..36f81585 100644 --- a/src/floor_item.h +++ b/src/floor_item.h @@ -53,25 +53,25 @@ class FloorItem : public Sprite * Returns instance id of this item. */ unsigned int - getId() { return mId; } + getId() const { return mId; } /** * Returns the item id. */ unsigned int - getItemId() { return mItemId; } + getItemId() const { return mItemId; } /** * Returns the x coordinate. */ unsigned short - getX() { return mX; } + getX() const { return mX; } /** * Returns the y coordinate. */ unsigned short - getY() { return mY; } + getY() const { return mY; } /** * Returns the pixel y coordinate. @@ -87,7 +87,7 @@ class FloorItem : public Sprite * @see Sprite::draw(Graphics, int, int) */ void - draw(Graphics *graphics, int offsetX, int offsetY) + draw(Graphics *graphics, int offsetX, int offsetY) const { graphics->drawImage(mImage, mX * 32 + offsetX, diff --git a/src/game.cpp b/src/game.cpp index 5052f2ce..15298ec6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "beingmanager.h" #include "configuration.h" @@ -42,23 +43,25 @@ #include "gui/buy.h" #include "gui/buysell.h" -#include "gui/chargedialog.h" +//#include "gui/chargedialog.h" #include "gui/chat.h" #include "gui/confirm_dialog.h" +#include "gui/debugwindow.h" #include "gui/equipmentwindow.h" +#include "gui/gui.h" #include "gui/help.h" #include "gui/inventorywindow.h" +#include "gui/menuwindow.h" #include "gui/minimap.h" +#include "gui/ministatus.h" #include "gui/npclistdialog.h" #include "gui/npc_text.h" #include "gui/sell.h" #include "gui/setup.h" #include "gui/skill.h" -#include "gui/menuwindow.h" #include "gui/status.h" -#include "gui/ministatus.h" #include "gui/trade.h" -#include "gui/debugwindow.h" +#include "gui/viewport.h" #include "net/beinghandler.h" #include "net/buysellhandler.h" @@ -85,7 +88,7 @@ bool done = false; volatile int tick_time; volatile int fps = 0, frame = 0; Engine *engine = NULL; -Joystick *joystick; +Joystick *joystick = NULL; extern Window *weightNotice; extern Window *deathNotice; @@ -106,7 +109,7 @@ SkillDialog *skillDialog; Setup* setupWindow; Minimap *minimap; EquipmentWindow *equipmentWindow; -ChargeDialog *chargeDialog; +//ChargeDialog *chargeDialog; TradeWindow *tradeWindow; //BuddyWindow *buddyWindow; HelpWindow *helpWindow; @@ -182,47 +185,23 @@ void createGuiWindows() setupWindow = new Setup(); minimap = new Minimap(); equipmentWindow = new EquipmentWindow(player_node->mEquipment.get()); - chargeDialog = new ChargeDialog(); + //chargeDialog = new ChargeDialog(); tradeWindow = new TradeWindow; //buddyWindow = new BuddyWindow(); helpWindow = new HelpWindow(); debugWindow = new DebugWindow(); // Initialize window positions - int screenW = graphics->getWidth(); - int screenH = graphics->getHeight(); - - chargeDialog->setPosition( - screenW - 5 - chargeDialog->getWidth(), - screenH - chargeDialog->getHeight() - 15); + //chargeDialog->setPosition( + // graphics->getWidth() - 5 - chargeDialog->getWidth(), + // graphics->getHeight() - chargeDialog->getHeight() - 15); - /*buddyWindow->setPosition(10, - minimap->getHeight() + 30);*/ + //buddyWindow->setPosition(10, minimap->getHeight() + 30); // Set initial window visibility -// chatWindow->setSticky(true); -// miniStatusWindow->setSticky(true); -// menuWindow->setSticky(true); - chatWindow->setVisible(true); miniStatusWindow->setVisible(true); - statusWindow->setVisible(false); menuWindow->setVisible(true); - buyDialog->setVisible(false); - sellDialog->setVisible(false); - buySellDialog->setVisible(false); - inventoryWindow->setVisible(false); - npcTextDialog->setVisible(false); - npcListDialog->setVisible(false); - skillDialog->setVisible(false); - //newSkillWindow->setVisible(false); - setupWindow->setVisible(false); - equipmentWindow->setVisible(false); - chargeDialog->setVisible(false); - tradeWindow->setVisible(false); - //buddyWindow->setVisible(false); - helpWindow->setVisible(false); - debugWindow->setVisible(false); } /** @@ -244,7 +223,7 @@ void destroyGuiWindows() delete setupWindow; delete minimap; delete equipmentWindow; - delete chargeDialog; + //delete chargeDialog; //delete newSkillWindow; delete tradeWindow; //delete buddyWindow; @@ -511,13 +490,13 @@ void Game::handleInput() // If none below the player, try the tile in front of // the player if (!item) { - if (player_node->mDirection & Being::UP) + if (player_node->getDirection() & Being::UP) y--; - if (player_node->mDirection & Being::DOWN) + if (player_node->getDirection() & Being::DOWN) y++; - if (player_node->mDirection & Being::LEFT) + if (player_node->getDirection() & Being::LEFT) x--; - if (player_node->mDirection & Being::RIGHT) + if (player_node->getDirection() & Being::RIGHT) x++; item = floorItemManager->findByCoordinates(x, y); @@ -584,7 +563,7 @@ void Game::handleInput() case SDLK_f: // Find path to mouse (debug purpose) - engine->toggleDebugPath(); + viewport->toggleDebugPath(); used = true; break; } @@ -621,8 +600,17 @@ void Game::handleInput() } // Push input to GUI when not used - if (!used) { - guiInput->pushInput(event); + if (!used) + { + try + { + guiInput->pushInput(event); + } + catch (gcn::Exception e) + { + const char* err = e.getMessage().c_str(); + logger->log("Warning: guichan input exception: %s", err); + } } } // End while @@ -633,35 +621,35 @@ void Game::handleInput() !chatWindow->isFocused()) { Uint16 x = player_node->mX / 32, y = player_node->mY / 32; - unsigned char Direction = 0; + unsigned char direction = 0; // Translate pressed keys to movement and direction if (keys[SDLK_UP] || keys[SDLK_KP8] || keys[SDLK_KP7] || keys[SDLK_KP9] || joystick && joystick->isUp()) { - Direction |= Being::UP; + direction |= Being::UP; } else if (keys[SDLK_DOWN] || keys[SDLK_KP2] || keys[SDLK_KP1] || keys[SDLK_KP3] || joystick && joystick->isDown()) { - Direction |= Being::DOWN; + direction |= Being::DOWN; } if (keys[SDLK_LEFT] || keys[SDLK_KP4] || keys[SDLK_KP1] || keys[SDLK_KP7] || joystick && joystick->isLeft()) { - Direction |= Being::LEFT; + direction |= Being::LEFT; } else if (keys[SDLK_RIGHT] || keys[SDLK_KP6] || keys[SDLK_KP3] || keys[SDLK_KP9] || joystick && joystick->isRight()) { - Direction |= Being::RIGHT; + direction |= Being::RIGHT; } - player_node->walk(Direction); + player_node->walk(direction); // Attacking monsters if (keys[SDLK_LCTRL] || keys[SDLK_RCTRL] || @@ -675,13 +663,13 @@ void Game::handleInput() { Uint16 targetX = x, targetY = y; - if (player_node->mDirection & Being::UP) + if (player_node->getDirection() & Being::UP) targetY--; - if (player_node->mDirection & Being::DOWN) + if (player_node->getDirection() & Being::DOWN) targetY++; - if (player_node->mDirection & Being::LEFT) + if (player_node->getDirection() & Being::LEFT) targetX--; - if (player_node->mDirection & Being::RIGHT) + if (player_node->getDirection() & Being::RIGHT) targetX++; // Attack priority is: Monster, Player, auto target diff --git a/src/graphics.cpp b/src/graphics.cpp index 065c0a46..f007470a 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -39,6 +39,9 @@ Graphics::~Graphics() bool Graphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel) { + logger->log("Setting video mode %dx%d %s", + w, h, fs ? "fullscreen" : "windowed"); + int displayFlags = SDL_ANYFORMAT; mFullscreen = fs; diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index b681b683..9fcf752b 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -32,7 +32,7 @@ #include "../npc.h" -#include "../resources/itemmanager.h" +#include "../resources/itemdb.h" #include "../utils/tostring.h" @@ -266,7 +266,7 @@ void BuyDialog::selectionChanged(const SelectionEvent &event) if (selectedItem > -1) { const ItemInfo &info = - itemDb->getItemInfo(mShopItems->at(selectedItem).id); + ItemDB::get(mShopItems->at(selectedItem).id); mItemDescLabel->setCaption("Description: " + info.getDescription()); mItemEffectLabel->setCaption("Effect: " + info.getEffect()); diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index d825db31..3cb42078 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -83,7 +83,7 @@ CharSelectDialog::CharSelectDialog(LockedArray *charInfo): mNameLabel = new gcn::Label("Name"); mLevelLabel = new gcn::Label("Level"); mMoneyLabel = new gcn::Label("Money"); - mPlayerBox = new PlayerBox(0); + mPlayerBox = new PlayerBox(); int w = 195; int h = 220; @@ -116,8 +116,9 @@ CharSelectDialog::CharSelectDialog(LockedArray *charInfo): add(mLevelLabel); add(mMoneyLabel); - mSelectButton->requestFocus(); setLocationRelativeTo(getParent()); + setVisible(true); + mSelectButton->requestFocus(); updatePlayerInfo(); } @@ -171,7 +172,8 @@ void CharSelectDialog::updatePlayerInfo() { LocalPlayer *pi = mCharInfo->getEntry(); - if (pi) { + if (pi) + { mNameLabel->setCaption(pi->getName()); mLevelLabel->setCaption("Lvl: " + toString(pi->mLevel)); mMoneyLabel->setCaption("Money: " + toString(pi->mMoney)); @@ -181,22 +183,17 @@ void CharSelectDialog::updatePlayerInfo() mDelCharButton->setEnabled(true); mSelectButton->setEnabled(true); } - mPlayerBox->mHairStyle = pi->getHairStyle(); - mPlayerBox->mHairColor = pi->getHairColor(); - mPlayerBox->mSex = pi->getSex(); - mPlayerBox->mShowPlayer = true; - } else { + } + else { mNameLabel->setCaption("Name"); mLevelLabel->setCaption("Level"); mMoneyLabel->setCaption("Money"); mNewCharButton->setEnabled(true); mDelCharButton->setEnabled(false); mSelectButton->setEnabled(false); - - mPlayerBox->mHairStyle = 0; - mPlayerBox->mHairColor = 0; - mPlayerBox->mShowPlayer = false; } + + mPlayerBox->setPlayer(pi); } void CharSelectDialog::attemptCharDelete() @@ -240,6 +237,10 @@ std::string CharSelectDialog::getName() CharCreateDialog::CharCreateDialog(Window *parent, int slot): Window("Create Character", true, parent), mSlot(slot) { + mPlayer = new Player(0, 0, NULL); + mPlayer->setHairStyle(rand() % NR_HAIR_STYLES + 1); + mPlayer->setHairColor(rand() % NR_HAIR_COLORS + 1); + mNameField = new TextField(""); mNameLabel = new gcn::Label("Name:"); mNextHairColorButton = new Button(">", "nextcolor", this); @@ -250,8 +251,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): mHairStyleLabel = new gcn::Label("Hair Style:"); mCreateButton = new Button("Create", "create", this); mCancelButton = new Button("Cancel", "cancel", this); - mPlayerBox = new PlayerBox(0); - mPlayerBox->mShowPlayer = true; + mPlayerBox = new PlayerBox(mPlayer); mNameField->setEventId("create"); @@ -290,6 +290,12 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): add(mCancelButton); setLocationRelativeTo(getParent()); + setVisible(true); +} + +CharCreateDialog::~CharCreateDialog() +{ + delete mPlayer; } void CharCreateDialog::action(const std::string &eventId, gcn::Widget *widget) @@ -299,7 +305,9 @@ void CharCreateDialog::action(const std::string &eventId, gcn::Widget *widget) // Attempt to create the character mCreateButton->setEnabled(false); Net::AccountServer::Account::createCharacter( - getName(), mPlayerBox->mHairStyle, mPlayerBox->mHairColor, + getName(), + mPlayer->getHairStyle(), + mPlayer->getHairColor(), 0, // gender 10, // STR 10, // AGI @@ -318,20 +326,19 @@ void CharCreateDialog::action(const std::string &eventId, gcn::Widget *widget) scheduleDelete(); } else if (eventId == "nextcolor") { - mPlayerBox->mHairColor++; + mPlayer->setHairColor(mPlayer->getHairColor() % NR_HAIR_COLORS + 1); } else if (eventId == "prevcolor") { - mPlayerBox->mHairColor += NR_HAIR_COLORS - 1; + int prevColor = mPlayer->getHairColor() + NR_HAIR_COLORS - 2; + mPlayer->setHairColor(prevColor % NR_HAIR_COLORS + 1); } else if (eventId == "nextstyle") { - mPlayerBox->mHairStyle++; + mPlayer->setHairStyle(mPlayer->getHairStyle() % NR_HAIR_STYLES + 1); } else if (eventId == "prevstyle") { - mPlayerBox->mHairStyle += NR_HAIR_STYLES - 1; + int prevStyle = mPlayer->getHairStyle() + NR_HAIR_STYLES - 2; + mPlayer->setHairStyle(prevStyle % NR_HAIR_STYLES + 1); } - - mPlayerBox->mHairColor %= NR_HAIR_COLORS; - mPlayerBox->mHairStyle %= NR_HAIR_STYLES; } std::string CharCreateDialog::getName() diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 6d9d1a83..9d2d77da 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -31,6 +31,7 @@ #include +class Player; class LocalPlayer; class PlayerBox; @@ -48,7 +49,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener */ CharSelectDialog(LockedArray *charInfo); - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); void updatePlayerInfo(); @@ -103,7 +104,12 @@ class CharCreateDialog : public Window, public gcn::ActionListener */ CharCreateDialog(Window *parent, int slot); - void action(const std::string& eventId, gcn::Widget* widget); + /** + * Destructor. + */ + ~CharCreateDialog(); + + void action(const std::string &eventId, gcn::Widget *widget); std::string getName(); @@ -119,6 +125,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener gcn::Button *mCreateButton; gcn::Button *mCancelButton; + Player *mPlayer; PlayerBox *mPlayerBox; int mSlot; diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp index ed2f8680..5a70544f 100644 --- a/src/gui/confirm_dialog.cpp +++ b/src/gui/confirm_dialog.cpp @@ -61,6 +61,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg, setLocationRelativeTo(getParent()); getParent()->moveToTop(this); } + setVisible(true); yesButton->requestFocus(); } diff --git a/src/gui/confirm_dialog.h b/src/gui/confirm_dialog.h index 1c206b03..771ecc36 100644 --- a/src/gui/confirm_dialog.h +++ b/src/gui/confirm_dialog.h @@ -47,7 +47,7 @@ class ConfirmDialog : public Window, public gcn::ActionListener { /** * Called when receiving actions from the widgets. */ - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); }; #endif diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index d467d4d3..f8a4154e 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -72,15 +72,15 @@ DebugWindow::logic() // Get the current mouse position int mouseX, mouseY; SDL_GetMouseState(&mouseX, &mouseY); - int mouseTileX = mouseX / 32 + camera_x; - int mouseTileY = mouseY / 32 + camera_y; + //int mouseTileX = mouseX / 32 + camera_x; + //int mouseTileY = mouseY / 32 + camera_y; mFPSLabel->setCaption("[" + toString(fps) + " FPS"); mFPSLabel->adjustSize(); - mTileMouseLabel->setCaption("[Mouse: " + - toString(mouseTileX) + ", " + toString(mouseTileY) + "]"); - mTileMouseLabel->adjustSize(); + //mTileMouseLabel->setCaption("[Mouse: " + + // toString(mouseTileX) + ", " + toString(mouseTileY) + "]"); + //mTileMouseLabel->adjustSize(); Map *currentMap = engine->getCurrentMap(); if (currentMap != NULL) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 38b17781..fb7144a1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -35,22 +35,14 @@ #endif #include "focushandler.h" -#include "popupmenu.h" #include "window.h" #include "windowcontainer.h" +#include "viewport.h" -#include "../being.h" -#include "../beingmanager.h" #include "../configlistener.h" #include "../configuration.h" -#include "../engine.h" -#include "../flooritemmanager.h" #include "../graphics.h" -#include "../localplayer.h" #include "../log.h" -#include "../main.h" -#include "../map.h" -#include "../npc.h" #include "../resources/image.h" #include "../resources/resourcemanager.h" @@ -61,7 +53,8 @@ // Guichan stuff Gui *gui; -gcn::SDLInput *guiInput; // GUI input +Viewport *viewport; /**< Viewport on the map. */ +gcn::SDLInput *guiInput; /**< GUI input. */ // Fonts used in showing hits gcn::Font *hitRedFont; @@ -91,9 +84,9 @@ class GuiConfigListener : public ConfigListener Gui::Gui(Graphics *graphics): mHostImageLoader(NULL), mMouseCursor(NULL), - mCustomCursor(false), - mPopupActive(false) + mCustomCursor(false) { + logger->log("Initializing GUI..."); // Set graphics setGraphics(graphics); @@ -122,7 +115,6 @@ Gui::Gui(Graphics *graphics): guiTop->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(), graphics->getHeight())); guiTop->setOpaque(false); - guiTop->addMouseListener(this); Window::setWindowContainer(guiTop); setTop(guiTop); @@ -172,13 +164,15 @@ Gui::Gui(Graphics *graphics): mConfigListener = new GuiConfigListener(this); config.addListener("customcursor", mConfigListener); - mPopup = new PopupMenu(); + // Create the viewport + viewport = new Viewport(); + viewport->setDimension(gcn::Rectangle(0, 0, + graphics->getWidth(), graphics->getHeight())); + guiTop->add(viewport); } Gui::~Gui() { - delete mPopup; - config.removeListener("customcursor", mConfigListener); delete mConfigListener; @@ -193,6 +187,7 @@ Gui::~Gui() delete mGuiFont; delete speechFont; + delete viewport; delete mTop; delete mImageLoader; delete mHostImageLoader; @@ -230,113 +225,6 @@ Gui::draw() mGraphics->popClipArea(); } -void -Gui::mousePress(int mx, int my, int button) -{ - // Mouse pressed on window container (basically, the map) - - // Are we in-game yet? - if (state != STATE_GAME) - return; - - // Check if we are alive and kickin' - if (!player_node || player_node->mAction == Being::DEAD) - return; - - // Check if we are busy - if (current_npc) - return; - - int tilex = (mx + camera_x) / 32; - int tiley = (my + camera_y) / 32; - - // Right click might open a popup - if (button == gcn::MouseInput::RIGHT) - { - Being *being; - FloorItem *floorItem; - - if ((being = beingManager->findBeing(tilex, tiley)) && - being->getType() != Being::LOCALPLAYER) - { - showPopup(mx, my, being); - return; - } - else if((floorItem = floorItemManager->findByCoordinates(tilex, tiley))) - { - showPopup(mx, my, floorItem); - return; - } - } - - // If a popup is active, just remove it - if (mPopupActive) - { - mPopup->setVisible(false); - mPopupActive = false; - return; - } - - // Left click can cause different actions - if (button == gcn::MouseInput::LEFT) - { - Being *being; - FloorItem *item; - - // Interact with some being - if ((being = beingManager->findBeing(tilex, tiley))) - { - switch (being->getType()) - { - case Being::NPC: - dynamic_cast(being)->talk(); - break; - - case Being::MONSTER: - case Being::PLAYER: - if (being->mAction == Being::MONSTER_DEAD) - break; - - player_node->attack(being, true); - break; - - default: - break; - } - } - // Pick up some item - else if ((item = floorItemManager->findByCoordinates(tilex, tiley))) - { - player_node->pickUp(item); - } - // Just walk around - else if (engine->getCurrentMap() && - engine->getCurrentMap()->getWalk(tilex, tiley)) - { - // XXX XXX XXX REALLY UGLY! - Uint8 *keys = SDL_GetKeyState(NULL); - if (!(keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT])) - { - player_node->setDestination(mx + camera_x, my + camera_y); - player_node->stopAttack(); - } - } - } - - if (button == gcn::MouseInput::MIDDLE) - { - // Find the being nearest to the clicked position - Being *target = beingManager->findNearestLivingBeing( - tilex, tiley, - 20, Being::MONSTER); - - if (target) - { - player_node->setTarget(target); - } - } -} - void Gui::setUseCustomCursor(bool customCursor) { @@ -369,21 +257,3 @@ Gui::setUseCustomCursor(bool customCursor) } } } - -void Gui::showPopup(int x, int y, Item *item) -{ - mPopup->showPopup(x, y, item); - mPopupActive = true; -} - -void Gui::showPopup(int x, int y, FloorItem *floorItem) -{ - mPopup->showPopup(x, y, floorItem); - mPopupActive = true; -} - -void Gui::showPopup(int x, int y, Being *being) -{ - mPopup->showPopup(x, y, being); - mPopupActive = true; -} diff --git a/src/gui/gui.h b/src/gui/gui.h index c4c47a88..caf27744 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -25,17 +25,13 @@ #define _TMW_GUI #include -#include #include "../guichanfwd.h" -class Being; -class FloorItem; class GuiConfigListener; class Graphics; class Image; -class Item; -class PopupMenu; +class Viewport; /** * \defgroup GUI Core GUI related classes (widgets) @@ -50,7 +46,7 @@ class PopupMenu; * * \ingroup GUI */ -class Gui : public gcn::Gui, public gcn::MouseListener +class Gui : public gcn::Gui { public: /** @@ -76,12 +72,6 @@ class Gui : public gcn::Gui, public gcn::MouseListener void draw(); - /** - * Handles mouse press on map. - */ - void - mousePress(int mx, int my, int button); - /** * Return game font */ @@ -94,37 +84,17 @@ class Gui : public gcn::Gui, public gcn::MouseListener void setUseCustomCursor(bool customCursor); - /** - * Shows a popup for an item - * TODO Find some way to get rid of Item here - */ - void showPopup(int x, int y, Item *item); - - /** - * Shows a popup for a floor item - * TODO Find some way to get rid of FloorItem here - */ - void showPopup(int x, int y, FloorItem *floorItem); - - /** - * Shows a popup for a being - * TODO Find some way to get rid of Being here - */ - void showPopup(int x, int y, Being *being); - private: GuiConfigListener *mConfigListener; gcn::ImageLoader *mHostImageLoader; /**< For loading images in GL */ gcn::ImageLoader *mImageLoader; /**< For loading images */ - gcn::Font *mGuiFont; /**< The global GUI font */ + gcn::Font *mGuiFont; /**< The global GUI font */ Image *mMouseCursor; /**< Mouse cursor image */ bool mCustomCursor; /**< Show custom cursor */ - - PopupMenu *mPopup; /**< Popup window */ - bool mPopupActive; }; extern Gui *gui; /**< The GUI system */ +extern Viewport *viewport; /**< The viewport */ extern gcn::SDLInput *guiInput; /**< GUI input */ /** diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 452b7c16..7f9ba3b9 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -34,6 +34,7 @@ #include "item_amount.h" #include "itemcontainer.h" #include "scrollarea.h" +#include "viewport.h" #include "../item.h" #include "../localplayer.h" @@ -169,7 +170,7 @@ void InventoryWindow::mouseClick(int x, int y, int button, int count) */ int mx = x + getX(); int my = y + getY(); - gui->showPopup(mx, my, item); + viewport->showPopup(mx, my, item); } } diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp index 30c899a8..5ebc0213 100644 --- a/src/gui/item_amount.cpp +++ b/src/gui/item_amount.cpp @@ -18,7 +18,7 @@ * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id $ + * $Id$ */ #include "item_amount.h" @@ -87,6 +87,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item): setContentSize(200, 80); setLocationRelativeTo(getParentWindow()); + setVisible(true); } void ItemAmountWindow::resetAmount() diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 1d9b6e1e..b8d4df2b 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -102,6 +102,7 @@ LoginDialog::LoginDialog(LoginData *loginData): add(mRegisterButton); setLocationRelativeTo(getParent()); + setVisible(true); if (mUserField->getText().empty()) { mUserField->requestFocus(); diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index 906fd61f..4f9623d7 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -51,6 +51,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, add(okButton); setLocationRelativeTo(getParent()); + setVisible(true); okButton->requestFocus(); } diff --git a/src/gui/ok_dialog.h b/src/gui/ok_dialog.h index 06f703cc..8ae08955 100644 --- a/src/gui/ok_dialog.h +++ b/src/gui/ok_dialog.h @@ -46,7 +46,7 @@ class OkDialog : public Window, public gcn::ActionListener { /** * Called when receiving actions from the widgets. */ - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); }; #endif diff --git a/src/gui/passwordfield.h b/src/gui/passwordfield.h index 15ca85c9..cae1f92e 100644 --- a/src/gui/passwordfield.h +++ b/src/gui/passwordfield.h @@ -21,8 +21,8 @@ * $Id$ */ -#ifndef __PASSWORDFIELD_H__ -#define __PASSWORDFIELD_H__ +#ifndef _TMW_PASSWORDFIELD_H_ +#define _TMW_PASSWORDFIELD_H_ #include "textfield.h" diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp index 568c3350..5fbe79b7 100644 --- a/src/gui/playerbox.cpp +++ b/src/gui/playerbox.cpp @@ -23,7 +23,7 @@ #include "playerbox.h" -#include "../being.h" +#include "../player.h" #include "../graphics.h" #include "../resources/image.h" @@ -32,17 +32,11 @@ #include "../utils/dtor.h" -extern std::vector hairset; -extern Spriteset *playerset[2]; - int PlayerBox::instances = 0; ImageRect PlayerBox::background; -PlayerBox::PlayerBox(unsigned char sex): - mHairColor(0), - mHairStyle(0), - mSex(sex), - mShowPlayer(false) +PlayerBox::PlayerBox(const Player *player): + mPlayer(player) { setBorderSize(2); @@ -81,29 +75,18 @@ PlayerBox::~PlayerBox() } } -void PlayerBox::draw(gcn::Graphics *graphics) +void +PlayerBox::draw(gcn::Graphics *graphics) { - if (!mShowPlayer) { - return; - } - - // Draw character - dynamic_cast(graphics)->drawImage( - playerset[mSex]->get(0), 23, 12); - - // Draw his hair - if (mHairStyle > 0 && mHairColor < NR_HAIR_COLORS && - mHairStyle < NR_HAIR_STYLES) + if (mPlayer) { - int hf = 5 * mHairColor; - if (hf >= 0 && hf < (int)hairset[mHairStyle]->size()) { - dynamic_cast(graphics)->drawImage( - hairset[mHairStyle - 1]->get(hf), 35, 7); - } + // Draw character + mPlayer->draw(dynamic_cast(graphics), 40, 42); } } -void PlayerBox::drawBorder(gcn::Graphics *graphics) +void +PlayerBox::drawBorder(gcn::Graphics *graphics) { int w, h, bs; bs = getBorderSize(); diff --git a/src/gui/playerbox.h b/src/gui/playerbox.h index ec04eaf6..6bba1b51 100644 --- a/src/gui/playerbox.h +++ b/src/gui/playerbox.h @@ -27,10 +27,10 @@ #include class ImageRect; +class Player; /** - * A box showing a player. Draws the various hair styles a player can have - * currently. + * A box showing a player character. * * \ingroup GUI */ @@ -38,15 +38,24 @@ class PlayerBox : public gcn::ScrollArea { public: /** - * Constructor. + * Constructor. Takes the initial player character that this box should + * display, which defaults to NULL. */ - PlayerBox(unsigned char sex); + PlayerBox(const Player *player = NULL); /** * Destructor. */ ~PlayerBox(); + /** + * Sets a new player character to be displayed by this box. Setting the + * player to NULL causes the box not to draw any + * character. + */ + void + setPlayer(const Player *player) { mPlayer = player; } + /** * Draws the scroll area. */ @@ -57,12 +66,9 @@ class PlayerBox : public gcn::ScrollArea */ void drawBorder(gcn::Graphics *graphics); - unsigned char mHairColor; /**< The hair color index */ - unsigned char mHairStyle; /**< The hair style index */ - unsigned char mSex; /**< Sex */ - bool mShowPlayer; /**< Wether to show the player or not */ - private: + const Player *mPlayer; /**< The character used for display */ + static int instances; static ImageRect background; }; diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index ab81f7d0..c2959e1d 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -40,7 +40,7 @@ #include "../npc.h" #include "../resources/iteminfo.h" -#include "../resources/itemmanager.h" +#include "../resources/itemdb.h" extern std::string tradePartnerName; @@ -106,7 +106,7 @@ void PopupMenu::showPopup(int x, int y, FloorItem *floorItem) mBrowserBox->clearRows(); // Floor item can be picked up (single option, candidate for removal) - std::string name = itemDb->getItemInfo(mFloorItem->getItemId()).getName(); + std::string name = ItemDB::get(mFloorItem->getItemId()).getName(); mBrowserBox->addRow("@@pickup|Pick Up " + name + "@@"); //browserBox->addRow("@@look|Look To@@"); diff --git a/src/gui/register.cpp b/src/gui/register.cpp index 7cef62a2..70cd6dc4 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -97,6 +97,7 @@ RegisterDialog::RegisterDialog(LoginData *loginData): add(mCancelButton); setLocationRelativeTo(getParent()); + setVisible(true); mUserField->requestFocus(); mUserField->setCaretPosition(mUserField->getText().length()); } diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index fd63633c..499bbd05 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -37,7 +37,7 @@ #include "../npc.h" #include "../resources/iteminfo.h" -#include "../resources/itemmanager.h" +#include "../resources/itemdb.h" #include "../utils/tostring.h" @@ -232,6 +232,7 @@ void SellDialog::action(const std::string &eventId, gcn::Widget *widget) mMaxItems -= mAmountItems; mShopItems->getShop()->at(selectedItem).quantity = mMaxItems; + mPlayerMoney += (mAmountItems * mShopItems->at(selectedItem).price); mAmountItems = 0; mSlider->setValue(0); mSlider->setEnabled(mMaxItems != 0); @@ -274,7 +275,7 @@ void SellDialog::selectionChanged(const SelectionEvent &event) if (selectedItem > -1) { const ItemInfo &info = - itemDb->getItemInfo(mShopItems->at(selectedItem).id); + ItemDB::get(mShopItems->at(selectedItem).id); mItemDescLabel->setCaption("Description: " + info.getDescription()); mItemEffectLabel->setCaption("Effect: " + info.getEffect()); diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 39abd5ed..bd17bff7 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -174,6 +174,7 @@ ServerDialog::ServerDialog(LoginData *loginData): add(mCancelButton); setLocationRelativeTo(getParent()); + setVisible(true); if (mServerNameField->getText().empty()) { mServerNameField->requestFocus(); diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 5b265c17..d907f340 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -132,7 +132,7 @@ class ServerDialog : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); private: gcn::TextField *mServerNameField; diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp index d9212728..685d88cf 100644 --- a/src/gui/setup_joystick.cpp +++ b/src/gui/setup_joystick.cpp @@ -42,7 +42,7 @@ Setup_Joystick::Setup_Joystick(): mCalibrateLabel->setPosition(10, 25); mCalibrateButton->setPosition(10, 30 + mCalibrateLabel->getHeight()); - mOriginalJoystickEnabled = (joystick ? joystick->isEnabled() : false); + mOriginalJoystickEnabled = (int)config.getValue("joystickEnabled", 0) != 0; mJoystickEnabled->setMarked(mOriginalJoystickEnabled); mJoystickEnabled->setEventId("joystickEnabled"); diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index 3f30732a..2d33e8a8 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -23,7 +23,7 @@ #include "shop.h" #include "../utils/tostring.h" -#include "../resources/itemmanager.h" +#include "../resources/itemdb.h" ShopItems::~ShopItems() { @@ -44,11 +44,11 @@ void ShopItems::addItem(short id, int price) { ITEM_SHOP item_shop; - item_shop.name = itemDb->getItemInfo(id).getName() + item_shop.name = ItemDB::get(id).getName() + " " + toString(price) + " GP"; item_shop.price = price; item_shop.id = id; - item_shop.image = itemDb->getItemInfo(id).getImage(); + item_shop.image = ItemDB::get(id).getImage(); mItemsShop.push_back(item_shop); } diff --git a/src/gui/textfield.h b/src/gui/textfield.h index 1ed802d7..4748830c 100644 --- a/src/gui/textfield.h +++ b/src/gui/textfield.h @@ -28,7 +28,6 @@ class ImageRect; - /** * A text field. * diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index 2ac56ae5..82262563 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -48,7 +48,7 @@ TradeWindow::TradeWindow(): mPartnerInventory(new Inventory()) { setWindowName("Trade"); - setDefaultSize(115, 197, 322, 150); + setDefaultSize(115, 197, 332, 209); mAddButton = new Button("Add", "add", this); mOkButton = new Button("Ok", "ok", this); @@ -95,33 +95,33 @@ TradeWindow::TradeWindow(): add(mMoneyField); add(mMoneyLabel); - mMoneyField->setPosition(8 + 60, getHeight() - 20); + gcn::Rectangle area = getChildrenArea(); + int width = area.width; + int height = area.height; + + mMoneyField->setPosition(8 + 60, height - 20); mMoneyField->setWidth(50); - mMoneyLabel->setPosition(8 + 60 + 50 + 6, getHeight() - 20); - mMoneyLabel2->setPosition(8, getHeight() - 20); + mMoneyLabel->setPosition(8 + 60 + 50 + 6, height - 20); + mMoneyLabel2->setPosition(8, height - 20); - mCancelButton->setPosition(getWidth() - 54, getHeight() - 49); - mTradeButton->setPosition(mCancelButton->getX() - 41 - , getHeight() - 49); - mOkButton->setPosition(mTradeButton->getX() - 24, - getHeight() - 49); - mAddButton->setPosition(mOkButton->getX() - 31, - getHeight() - 49); + mCancelButton->setPosition(width - 54, height - 49); + mTradeButton->setPosition(mCancelButton->getX() - 41, height - 49); + mOkButton->setPosition(mTradeButton->getX() - 24, height - 49); + mAddButton->setPosition(mOkButton->getX() - 31, height - 49); - mMyItemContainer->setSize(getWidth() - 24 - 12 - 1, - (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1); - mMyScroll->setSize(getWidth() - 16, (getHeight() - 76) / 2); + mMyItemContainer->setSize(width - 24 - 12 - 1, + (INVENTORY_SIZE * 24) / (width / 24) - 1); + mMyScroll->setSize(width - 16, (height - 76) / 2); - mPartnerItemContainer->setSize(getWidth() - 24 - 12 - 1, - (INVENTORY_SIZE * 24) / (getWidth() / 24) - 1); - mPartnerScroll->setSize(getWidth() - 16, (getHeight() - 76) / 2); + mPartnerItemContainer->setSize(width - 24 - 12 - 1, + (INVENTORY_SIZE * 24) / (width / 24) - 1); + mPartnerScroll->setSize(width - 16, (height - 76) / 2); mItemNameLabel->setPosition(8, mPartnerScroll->getY() + mPartnerScroll->getHeight() + 4); mItemDescriptionLabel->setPosition(8, mItemNameLabel->getY() + mItemNameLabel->getHeight() + 4); - } TradeWindow::~TradeWindow() diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index c29906a1..73343483 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -192,7 +192,7 @@ int UpdaterWindow::updateProgress(void *ptr, if (progress > 1) progress = 1.0f; uw->setLabel( - uw->mCurrentFile + " (" + toString((int)progress * 100) + "%)"); + uw->mCurrentFile + " (" + toString((int) (progress * 100)) + "%)"); uw->setProgress(progress); if (state != STATE_UPDATE || uw->mDownloadStatus == UPDATE_ERROR) diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp new file mode 100644 index 00000000..d0525a2f --- /dev/null +++ b/src/gui/viewport.cpp @@ -0,0 +1,392 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#include "viewport.h" + +#include + +#include "gui.h" +#include "popupmenu.h" + +#include "../beingmanager.h" +#include "../configuration.h" +#include "../flooritemmanager.h" +#include "../graphics.h" +#include "../localplayer.h" +#include "../map.h" +#include "../npc.h" + +#include "../resources/monsterdb.h" + +#include "../utils/tostring.h" + +Viewport::Viewport(): + mMap(0), + mViewX(0.0f), + mViewY(0.0f), + mCameraX(0), + mCameraY(0), + mShowDebugPath(false), + mPopupActive(false) +{ + setOpaque(false); + addMouseListener(this); + + mScrollLaziness = (int) config.getValue("ScrollLaziness", 32); + mScrollRadius = (int) config.getValue("ScrollRadius", 32); + + config.addListener("ScrollLaziness", this); + config.addListener("ScrollRadius", this); + + mPopupMenu = new PopupMenu(); +} + +Viewport::~Viewport() +{ + delete mPopupMenu; +} + +void +Viewport::setMap(Map *map) +{ + mMap = map; +} + +void +Viewport::draw(gcn::Graphics *gcnGraphics) +{ + static int lastTick = tick_time; + + if (!mMap || !player_node) + return; + + Graphics *graphics = static_cast(gcnGraphics); + + // Avoid freaking out when tick_time overflows + if (tick_time < lastTick) + { + lastTick = tick_time; + } + + // Calculate viewpoint + int midTileX = graphics->getWidth() / 2; + int midTileY = graphics->getHeight() / 2; + + int player_x = player_node->mX - midTileX + player_node->getXOffset(); + int player_y = player_node->mY - midTileY + player_node->getYOffset(); + + if (mScrollLaziness < 1) + mScrollLaziness = 1; // Avoids division by zero + + // Apply lazy scrolling + while (lastTick < tick_time) + { + if (player_x > mViewX + mScrollRadius) + { + mViewX += (player_x - mViewX - mScrollRadius) / mScrollLaziness; + } + if (player_x < mViewX - mScrollRadius) + { + mViewX += (player_x - mViewX + mScrollRadius) / mScrollLaziness; + } + if (player_y > mViewY + mScrollRadius) + { + mViewY += (player_y - mViewY - mScrollRadius) / mScrollLaziness; + } + if (player_y < mViewY - mScrollRadius) + { + mViewY += (player_y - mViewY + mScrollRadius) / mScrollLaziness; + } + lastTick++; + } + + // Auto center when player is off screen + if ( player_x - mViewX > graphics->getWidth() / 2 + || mViewX - player_x > graphics->getWidth() / 2 + || mViewY - player_y > graphics->getHeight() / 2 + || player_y - mViewY > graphics->getHeight() / 2 + ) + { + mViewX = player_x; + mViewY = player_y; + }; + + if (mMap) { + if (mViewX < 0) { + mViewX = 0; + } + if (mViewY < 0) { + mViewY = 0; + } + if (mViewX > mMap->getWidth() * 32 - midTileX) { + mViewX = mMap->getWidth() * 32 - midTileX; + } + if (mViewY > mMap->getHeight() * 32 - midTileY) { + mViewY = mMap->getHeight() * 32 - midTileY; + } + } + + mCameraX = (int) mViewX; + mCameraY = (int) mViewY; + + // Draw tiles and sprites + if (mMap) + { + mMap->draw(graphics, mCameraX, mCameraY, 0); + mMap->draw(graphics, mCameraX, mCameraY, 1); + mMap->draw(graphics, mCameraX, mCameraY, 2); + mMap->drawOverlay(graphics, mViewX, mViewY, + (int) config.getValue("OverlayDetail", 2)); + } + + // Find a path from the player to the mouse, and draw it. This is for debug + // purposes. + if (mShowDebugPath && mMap) + { + // Get the current mouse position + int mouseX, mouseY; + SDL_GetMouseState(&mouseX, &mouseY); + + int mouseTileX = (mouseX + mCameraX) / 32; + int mouseTileY = (mouseY + mCameraY) / 32; + + Path debugPath = mMap->findPath( + player_node->mX / 32, player_node->mY / 32, + mouseTileX, mouseTileY); + + graphics->setColor(gcn::Color(255, 0, 0)); + for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++) + { + int squareX = i->x * 32 - mCameraX + 12; + int squareY = i->y * 32 - mCameraY + 12; + + graphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); + graphics->drawText( + toString(mMap->getMetaTile(i->x, i->y)->Gcost), + squareX + 4, squareY + 12, gcn::Graphics::CENTER); + } + } + + // Draw player nickname, speech, and emotion sprite as needed + Beings &beings = beingManager->getAll(); + for (BeingIterator i = beings.begin(); i != beings.end(); i++) + { + (*i)->drawSpeech(graphics, -mCameraX, -mCameraY); + (*i)->drawName(graphics, -mCameraX, -mCameraY); + (*i)->drawEmotion(graphics, -mCameraX, -mCameraY); + } + + // Draw target marker if needed + Being *target; + if ((target = player_node->getTarget())) + { + graphics->setFont(speechFont); + graphics->setColor(gcn::Color(255, 32, 32)); + int dy = (target->getType() == Being::PLAYER) ? 80 : 42; + + std::string mobName = ""; + + if (target->mJob >= 1002) + { + int mobId = target->mJob - 1002; + mobName = MonsterDB::get(mobId).getName(); + + graphics->drawText(mobName, + target->getPixelX() - mCameraX + 15, + target->getPixelY() - mCameraY - dy, + gcn::Graphics::CENTER); + } + } + + // Draw contained widgets + WindowContainer::draw(gcnGraphics); +} + +void +Viewport::logic() +{ + WindowContainer::logic(); + + if (!mMap || !player_node) + return; + + int mouseX, mouseY; + Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); + + if (mPlayerFollowMouse && button & SDL_BUTTON(1) && + mWalkTime != player_node->mWalkTime) + { + player_node->setDestination(mouseX + mCameraX, + mouseY + mCameraY); + mWalkTime = player_node->mWalkTime; + } +} + +void +Viewport::mousePress(int mx, int my, int button) +{ + // Check if we are alive and kickin' + if (!mMap || !player_node || player_node->mAction == Being::DEAD) + return; + + // Check if we are busy + if (current_npc) + return; + + mPlayerFollowMouse = false; + + int tilex = (mx + mCameraX) / 32; + int tiley = (my + mCameraY) / 32; + + // Right click might open a popup + if (button == gcn::MouseInput::RIGHT) + { + Being *being; + FloorItem *floorItem; + + if ((being = beingManager->findBeing(tilex, tiley)) && + being->getType() != Being::LOCALPLAYER) + { + showPopup(mx, my, being); + return; + } + else if((floorItem = floorItemManager->findByCoordinates(tilex, tiley))) + { + showPopup(mx, my, floorItem); + return; + } + } + + // If a popup is active, just remove it + if (mPopupActive) + { + mPopupMenu->setVisible(false); + mPopupActive = false; + return; + } + + // Left click can cause different actions + if (button == gcn::MouseInput::LEFT) + { + Being *being; + FloorItem *item; + + // Interact with some being + if ((being = beingManager->findBeing(tilex, tiley))) + { + switch (being->getType()) + { + case Being::NPC: + dynamic_cast(being)->talk(); + break; + + case Being::MONSTER: + case Being::PLAYER: + if (being->mAction == Being::DEAD) + break; + + player_node->attack(being, true); + break; + + default: + break; + } + } + // Pick up some item + else if ((item = floorItemManager->findByCoordinates(tilex, tiley))) + { + player_node->pickUp(item); + } + // Just walk around + else if (mMap->getWalk(tilex, tiley)) + { + // XXX XXX XXX REALLY UGLY! + Uint8 *keys = SDL_GetKeyState(NULL); + if (!(keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT])) + { + player_node->setDestination(mx + mCameraX, my + mCameraY); + player_node->stopAttack(); + } + mPlayerFollowMouse = true; + } + } + + if (button == gcn::MouseInput::MIDDLE) + { + // Find the being nearest to the clicked position + Being *target = beingManager->findNearestLivingBeing( + tilex, tiley, + 20, Being::MONSTER); + + if (target) + { + player_node->setTarget(target); + } + } +} + +void +Viewport::mouseMotion(int mx, int my) +{ + if (!mMap || !player_node) + return; + + if (mPlayerFollowMouse && mWalkTime == player_node->mWalkTime) + { + player_node->setDestination(mx + mCameraX, my + mCameraY); + } +} + +void +Viewport::mouseRelease(int mx, int my, int button) +{ + mPlayerFollowMouse = false; +} + +void +Viewport::showPopup(int x, int y, Item *item) +{ + mPopupMenu->showPopup(x, y, item); + mPopupActive = true; +} + +void +Viewport::showPopup(int x, int y, FloorItem *floorItem) +{ + mPopupMenu->showPopup(x, y, floorItem); + mPopupActive = true; +} + +void +Viewport::showPopup(int x, int y, Being *being) +{ + mPopupMenu->showPopup(x, y, being); + mPopupActive = true; +} + +void +Viewport::optionChanged(const std::string &name) +{ + mScrollLaziness = (int) config.getValue("ScrollLaziness", 32); + mScrollRadius = (int) config.getValue("ScrollRadius", 32); +} diff --git a/src/gui/viewport.h b/src/gui/viewport.h new file mode 100644 index 00000000..df78b1da --- /dev/null +++ b/src/gui/viewport.h @@ -0,0 +1,145 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#ifndef _TMW_VIEWPORT_H_ +#define _TMW_VIEWPORT_H_ + +#include + +#include "windowcontainer.h" + +#include "../configlistener.h" + +class Map; +class Being; +class FloorItem; +class Item; +class PopupMenu; + +/** + * The viewport on the map. Displays the current map and handles mouse input + * and the popup menu. + * + * TODO: This class is planned to be extended to allow floating widgets on top + * of it such as NPC messages, which are positioned using map pixel + * coordinates. + */ +class Viewport : public WindowContainer, public gcn::MouseListener, + public ConfigListener +{ + public: + /** + * Constructor. + */ + Viewport(); + + /** + * Destructor. + */ + ~Viewport(); + + /** + * Sets the map displayed by the viewport. + */ + void + setMap(Map *map); + + /** + * Draws the viewport. + */ + void + draw(gcn::Graphics *graphics); + + /** + * Implements player to keep following mouse. + */ + void + logic(); + + /** + * Toggles whether the path debug graphics are shown + */ + void toggleDebugPath() { mShowDebugPath = !mShowDebugPath; } + + /** + * Handles mouse press on map. + */ + void + mousePress(int mx, int my, int button); + + /** + * Handles mouse move on map + */ + void + mouseMotion(int mx, int my); + + /** + * Handles mouse button release on map. + */ + void + mouseRelease(int mx, int my, int button); + + /** + * Shows a popup for an item. + * TODO Find some way to get rid of Item here + */ + void showPopup(int x, int y, Item *item); + + /** + * A relevant config option changed. + */ + void + optionChanged(const std::string &name); + + private: + /** + * Shows a popup for a floor item. + * TODO Find some way to get rid of FloorItem here + */ + void showPopup(int x, int y, FloorItem *floorItem); + + /** + * Shows a popup for a being. + * TODO Find some way to get rid of Being here + */ + void showPopup(int x, int y, Being *being); + + + Map *mMap; /**< The current map. */ + + int mScrollRadius; + int mScrollLaziness; + float mViewX; /**< Current viewpoint in pixels. */ + float mViewY; /**< Current viewpoint in pixels. */ + int mCameraX; + int mCameraY; + bool mShowDebugPath; /**< Show a path from player to pointer. */ + + bool mPlayerFollowMouse; + int mWalkTime; + + PopupMenu *mPopupMenu; /**< Popup menu. */ + bool mPopupActive; +}; + +#endif diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 13d42c78..1960d6ca 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -113,6 +113,9 @@ Window::Window(const std::string& caption, bool modal, Window *parent): { requestModalFocus(); } + + // Windows are invisible by default + setVisible(false); } Window::~Window() diff --git a/src/gui/window.h b/src/gui/window.h index 51c876e3..158035c0 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -36,7 +36,8 @@ class WindowContainer; /** - * A window. This window can be dragged around and has a title bar. + * A window. This window can be dragged around and has a title bar. Windows are + * invisible by default. * * \ingroup GUI */ diff --git a/src/gui/windowcontainer.h b/src/gui/windowcontainer.h index b860fa3c..df255f84 100644 --- a/src/gui/windowcontainer.h +++ b/src/gui/windowcontainer.h @@ -27,7 +27,8 @@ #include /** - * A window container. This container makes draggable windows possible. + * A window container. This container adds functionality for more convenient + * widget (windows in particular) destruction. * * \ingroup GUI */ diff --git a/src/item.h b/src/item.h index 1375886e..47cdb1a9 100644 --- a/src/item.h +++ b/src/item.h @@ -24,7 +24,7 @@ #ifndef _ITEM_H_ #define _ITEM_H_ -#include "resources/itemmanager.h" +#include "resources/itemdb.h" /** * Represents one or more instances of a certain item type. @@ -119,7 +119,7 @@ class Item * Returns information about this item type. */ const ItemInfo& - getInfo() const { return itemDb->getItemInfo(mId); } + getInfo() const { return ItemDB::get(mId); } protected: int mId; /**< Item type id. */ diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 6898dfb7..c887dd1c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -30,6 +30,7 @@ #include "item.h" #include "main.h" #include "sound.h" +#include "log.h" #include "net/gameserver/player.h" @@ -65,9 +66,19 @@ void LocalPlayer::logic() void LocalPlayer::nextStep() { - if (mPath.empty() && mPickUpTarget) { - pickUp(mPickUpTarget); + if (mPath.empty()) + { + if (mPickUpTarget) + { + pickUp(mPickUpTarget); + } + + if (mWalkingDir) + { + walk(mWalkingDir); + } } + Player::nextStep(); } @@ -161,10 +172,15 @@ void LocalPlayer::pickUp(FloorItem *item) void LocalPlayer::walk(unsigned char dir) { + if (mWalkingDir != dir) + { + mWalkingDir = dir; + } + if (!mMap || !dir) return; - if (mAction == WALK) + if (mAction == WALK && !mPath.empty()) { // Just finish the current action, otherwise we get out of sync Being::setDestination(mX, mY); @@ -198,10 +214,8 @@ void LocalPlayer::walk(unsigned char dir) } else if (dir) { - // Update the player direction to where he wants to walk - // Warning: Not communicated to the server yet - // If the being can't move, just change direction + // TODO: Communicate this to the server (waiting on tmwserv) setDirection(dir); } } @@ -216,10 +230,16 @@ void LocalPlayer::setDestination(Uint16 x, Uint16 y) x = tx * 32 + fx; y = ty * 32 + fy; - Net::GameServer::Player::walk(x, y); + // Only send a new message to the server when destination changes + if (x != mDestX || y != mDestY) + { + mDestX = x; + mDestY = y; - mPickUpTarget = NULL; + Net::GameServer::Player::walk(x, y); + } + mPickUpTarget = NULL; Being::setDestination(x, y); } diff --git a/src/localplayer.h b/src/localplayer.h index dbf2a147..f632b1b9 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -47,6 +47,11 @@ class LocalPlayer : public Player virtual ~LocalPlayer(); virtual void logic(); + + /** + * Adds a new step when walking before calling super. Also, when + * specified it picks up an item at the end of a path. + */ virtual void nextStep(); /** @@ -151,7 +156,10 @@ class LocalPlayer : public Player FloorItem *mPickUpTarget; bool mTrading; - int mLastAction; /**< Time stamp of the last action, -1 if none */ + int mLastAction; /**< Time stamp of the last action, -1 if none. */ + int mWalkingDir; /**< The direction the player is walking in. */ + int mDestX; /**< X coordinate of destination. */ + int mDestY; /**< Y coordinate of destination. */ }; extern LocalPlayer *player_node; diff --git a/src/log.cpp b/src/log.cpp index 07eb55f7..3a3c91b8 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -21,7 +21,9 @@ #include "log.h" #ifdef WIN32 -#include + #include "utils/wingettimeofday.h" +#else + #include #endif #ifdef __APPLE__ #include @@ -64,7 +66,6 @@ void Logger::log(const char *log_text, ...) char* buf = new char[1024]; va_list ap; - time_t t; // Use a temporary buffer to fill in the variables va_start(ap, log_text); @@ -72,19 +73,23 @@ void Logger::log(const char *log_text, ...) va_end(ap); // Get the current system time - time(&t); + timeval tv; + gettimeofday(&tv, NULL); // Print the log entry std::stringstream timeStr; timeStr << "[" - << ((((t / 60) / 60) % 24 < 10) ? "0" : "") - << (int)(((t / 60) / 60) % 24) + << ((((tv.tv_sec / 60) / 60) % 24 < 10) ? "0" : "") + << (int)(((tv.tv_sec / 60) / 60) % 24) << ":" - << (((t / 60) % 60 < 10) ? "0" : "") - << (int)((t / 60) % 60) + << (((tv.tv_sec / 60) % 60 < 10) ? "0" : "") + << (int)((tv.tv_sec / 60) % 60) << ":" - << ((t % 60 < 10) ? "0" : "") - << (int)(t % 60) + << ((tv.tv_sec % 60 < 10) ? "0" : "") + << (int)(tv.tv_sec % 60) + << "." + << (((tv.tv_usec / 10000) % 100) < 10 ? "0" : "") + << (int)((tv.tv_usec / 10000) % 100) << "] "; mLogFile << timeStr.str() << buf << std::endl; diff --git a/src/main.cpp b/src/main.cpp index 59bb1566..90368b7d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,7 +76,10 @@ #include "net/gameserver/gameserver.h" +#include "resources/equipmentdb.h" #include "resources/image.h" +#include "resources/itemdb.h" +#include "resources/monsterdb.h" #include "resources/resourcemanager.h" #include "resources/spriteset.h" @@ -87,8 +90,6 @@ char n_character; std::string token; -std::vector hairset; -Spriteset *playerset[2]; Graphics *graphics; unsigned char state; @@ -171,6 +172,7 @@ void initHomeDir() void initConfiguration(const Options &options) { // Fill configuration with defaults + logger->log("Initializing configuration..."); config.setValue("host", "animesites.de"); config.setValue("port", 9601); config.setValue("hwaccel", 0); @@ -219,6 +221,7 @@ void initConfiguration(const Options &options) void init_engine() { // Initialize SDL + logger->log("Initializing SDL..."); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { std::cerr << "Could not initialize SDL: " << SDL_GetError() << std::endl; @@ -288,26 +291,6 @@ void init_engine() // Initialize for drawing graphics->_beginDraw(); - playerset[0] = resman->getSpriteset( - "graphics/sprites/player_male_base.png", 64, 64); - if (!playerset[0]) logger->error("Couldn't load male player spriteset!"); - playerset[1] = resman->getSpriteset( - "graphics/sprites/player_female_base.png", 64, 64); - if (!playerset[1]) logger->error("Couldn't load female player spriteset!"); - - - for (int i = 0; i < NR_HAIR_STYLES - 1; i++) - { - Spriteset *tmp = ResourceManager::getInstance()->getSpriteset( - "graphics/sprites/hairstyle" + toString(i + 1) + ".png", - 40, 40); - if (!tmp) { - logger->error("Unable to load hairstyle"); - } else { - hairset.push_back(tmp); - } - } - gui = new Gui(graphics); state = STATE_CHOOSE_SERVER; /**< Initial game state */ @@ -316,8 +299,9 @@ void init_engine() if (config.getValue("sound", 0) == 1) { sound.init(); } - sound.setSfxVolume((int)config.getValue("sfxVolume", defaultSfxVolume)); - sound.setMusicVolume((int)config.getValue("musicVolume", + sound.setSfxVolume((int) config.getValue("sfxVolume", + defaultSfxVolume)); + sound.setMusicVolume((int) config.getValue("musicVolume", defaultMusicVolume)); } catch (const char *err) { @@ -325,6 +309,11 @@ void init_engine() errorMessage = err; logger->log("Warning: %s", err); } + + // Load XML databases + EquipmentDB::load(); + ItemDB::load(); + MonsterDB::load(); } /** Clear the engine */ @@ -334,19 +323,17 @@ void exit_engine() delete gui; delete graphics; - std::for_each(hairset.begin(), hairset.end(), - std::mem_fun(&Spriteset::decRef)); - hairset.clear(); - - playerset[0]->decRef(); - playerset[1]->decRef(); - // Shutdown libxml xmlCleanupParser(); // Shutdown sound sound.close(); + // Unload XML databases + EquipmentDB::unload(); + ItemDB::unload(); + MonsterDB::unload(); + ResourceManager::deleteInstance(); } @@ -599,7 +586,7 @@ int main(int argc, char *argv[]) gui->logic(); Net::flush(); - if (state > STATE_CONNECT_ACCOUNT && state < STATE_GAME) + if (state > STATE_CONNECT_ACCOUNT && state < STATE_GAME) { if (!accountServerConnection->isConnected()) { diff --git a/src/map.cpp b/src/map.cpp index 1cdc1077..1bd8f235 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -282,35 +282,35 @@ Map::setWalk(int x, int y, bool walkable) bool Map::getWalk(int x, int y) { - // Check for being walkable - if (tileCollides(x, y)) { - return false; - } + return !tileCollides(x, y) && !occupied(x, y); +} - /* - // Check for collision with a being +bool +Map::occupied(int x, int y) +{ Beings &beings = beingManager->getAll(); - for (BeingIterator i = beings.begin(); i != beings.end(); i++) { + for (BeingIterator i = beings.begin(); i != beings.end(); i++) + { // job 45 is a portal, they don't collide - if ((*i)->mX / 32 == x && (*i)->mY / 32 == y && (*i)->mJob != 45) { - return false; + if ((*i)->mX / 32 == x && (*i)->mY / 32 == y && (*i)->mJob != 45) + { + return true; } } - */ - return true; + return false; } bool Map::tileCollides(int x, int y) { - // You can't walk outside of the map - if (x < 0 || y < 0 || x >= mWidth || y >= mHeight) { - return true; - } + return !(contains(x, y) && mMetaTiles[x + y * mWidth].walkable); +} - // Check if the tile is walkable - return !mMetaTiles[x + y * mWidth].walkable; +bool +Map::contains(int x, int y) +{ + return x >= 0 && y >= 0 && x < mWidth && y < mHeight; } void @@ -355,8 +355,9 @@ Map::findPath(int startX, int startY, int destX, int destY) // Declare open list, a list with open tiles sorted on F cost std::priority_queue openList; - // Return empty path when destination not walkable - if (!getWalk(destX, destY)) return path; + // Return empty path when destination collides + if (tileCollides(destX, destY)) + return path; // Reset starting tile's G cost to 0 MetaTile *startTile = getMetaTile(startX, startY); @@ -395,16 +396,15 @@ Map::findPath(int startX, int startY, int destX, int destY) // Skip if if we're checking the same tile we're leaving from, // or if the new location falls outside of the map boundaries - if ((dx == 0 && dy == 0) || - (x < 0 || y < 0 || x >= mWidth || y >= mHeight)) + if ((dx == 0 && dy == 0) || !contains(x, y)) { continue; } MetaTile *newTile = getMetaTile(x, y); - // Skip if the tile is on the closed list or is not walkable - if (newTile->whichList == mOnClosedList || !getWalk(x, y)) + // Skip if the tile is on the closed list or collides + if (newTile->whichList == mOnClosedList || tileCollides(x, y)) { continue; } @@ -441,6 +441,13 @@ Map::findPath(int startX, int startY, int destX, int destY) ++Gcost; } + // It costs extra to walk through a being (needs to be enough + // to make it more attractive to walk around). + if (occupied(x, y)) + { + Gcost += 30; + } + // Skip if Gcost becomes too much // Warning: probably not entirely accurate if (Gcost > 20 * basicCost) diff --git a/src/map.h b/src/map.h index 961326b8..15b9b0dc 100644 --- a/src/map.h +++ b/src/map.h @@ -129,7 +129,7 @@ class Map : public Properties MetaTile *getMetaTile(int x, int y); /** - * Set walkability flag for a tile + * Set walkability flag for a tile. */ void setWalk(int x, int y, bool walkable); @@ -199,6 +199,16 @@ class Map : public Properties Tileset* getTilesetWithGid(int gid); + /** + * Tells whether a tile is occupied by a being. + */ + bool occupied(int x, int y); + + /** + * Tells whether the given coordinates fall within the map boundaries. + */ + bool contains(int x, int y); + int mWidth, mHeight; int mTileWidth, mTileHeight; MetaTile *mMetaTiles; diff --git a/src/monster.cpp b/src/monster.cpp index a4317e5e..f2e4d93d 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -25,6 +25,9 @@ #include "animatedsprite.h" #include "game.h" +#include "sound.h" + +#include "resources/monsterdb.h" #include "utils/tostring.h" @@ -32,7 +35,8 @@ Monster::Monster(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { - mSprites[BASE_SPRITE] = new AnimatedSprite("graphics/sprites/monster" + toString(job - 1002) + ".xml", 0); + mSprites[BASE_SPRITE] = new AnimatedSprite( + "graphics/sprites/" + MonsterDB::get(job - 1002).getSprite()); } Being::Type @@ -41,3 +45,36 @@ Monster::getType() const return MONSTER; } +void +Monster::setAction(Uint8 action) +{ + SpriteAction currentAction = ACTION_INVALID; + + switch (action) + { + case WALK: + currentAction = ACTION_WALK; + break; + case DEAD: + currentAction = ACTION_DEAD; + sound.playSfx(MonsterDB::get(mJob - 1002).getSound(EVENT_DIE)); + break; + case ATTACK: + currentAction = ACTION_ATTACK; + sound.playSfx(MonsterDB::get(mJob - 1002).getSound(EVENT_HIT)); + mSprites[BASE_SPRITE]->reset(); + break; + case STAND: + currentAction = ACTION_STAND; + break; + case HURT: + // Not implemented yet + break; + } + + if (currentAction != ACTION_INVALID) + { + mSprites[BASE_SPRITE]->play(currentAction); + mAction = action; + } +} diff --git a/src/monster.h b/src/monster.h index 0314a035..7f129e14 100644 --- a/src/monster.h +++ b/src/monster.h @@ -31,6 +31,8 @@ class Monster : public Being public: Monster(Uint16 id, Uint16 job, Map *map); + virtual void setAction(Uint8 action); + virtual Type getType() const; }; diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 2d68dd28..6d8ff6c6 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -66,6 +66,7 @@ void BeingHandler::handleMessage(MessageIn &msg) /* Uint32 id; Uint16 job, speed; + Uint16 headBottom, headTop, headMid; Sint16 param1; Sint8 type; Being *srcBeing, *dstBeing; @@ -124,7 +125,8 @@ void BeingHandler::handleMessage(MessageIn &msg) dstBeing->mJob = job; dstBeing->setHairStyle(msg.readShort()); dstBeing->setWeapon(msg.readShort()); - dstBeing->setVisibleEquipment(3, msg.readShort()); // head bottom + dstBeing->setVisibleEquipment( + Being::BOTTOMCLOTHES_SPRITE, msg.readShort()); if (msg.getId() == SMSG_BEING_MOVE) { @@ -132,8 +134,9 @@ void BeingHandler::handleMessage(MessageIn &msg) } msg.readShort(); // shield - dstBeing->setVisibleEquipment(4, msg.readShort()); // head top - dstBeing->setVisibleEquipment(5, msg.readShort()); // head mid + dstBeing->setVisibleEquipment(Being::HAIT_SPRITE, msg.readShort()); + dstBeing->setVisibleEquipment( + Being::TOPCLOTHES_SPRITE, msg.readShort()); dstBeing->setHairColor(msg.readShort()); msg.readShort(); // unknown msg.readShort(); // head dir @@ -156,7 +159,9 @@ void BeingHandler::handleMessage(MessageIn &msg) } else { - //msg.readCoordinates(dstBeing->mX, dstBeing->mY, dstBeing->mDirection); + //Uint8 dir; + //msg->readCoordinates(dstBeing->mX, dstBeing->mY, dir); + //dstBeing->setDirection(dir); } msg.readByte(); // unknown @@ -173,19 +178,7 @@ void BeingHandler::handleMessage(MessageIn &msg) if (msg.readByte() == 1) { - // Death - switch (dstBeing->getType()) - { - case Being::MONSTER: - dstBeing->setAction(Being::MONSTER_DEAD); - dstBeing->mFrame = 0; - dstBeing->mWalkTime = tick_time; - break; - - default: - dstBeing->setAction(Being::DEAD); - break; - } + dstBeing->setAction(Being::DEAD); } else { @@ -219,15 +212,7 @@ void BeingHandler::handleMessage(MessageIn &msg) if (srcBeing != NULL && srcBeing != player_node) { - // buggy - if (srcBeing->getType() == Being::MONSTER) - { - srcBeing->setAction(Being::MONSTER_ATTACK); - } - else - { - srcBeing->setAction(Being::ATTACK); - } + srcBeing->setAction(Being::ATTACK); srcBeing->mFrame = 0; srcBeing->mWalkTime = tick_time; } @@ -275,27 +260,35 @@ void BeingHandler::handleMessage(MessageIn &msg) } int type = msg.readByte(); + int id = msg.readByte(); switch (type) { case 1: - dstBeing->setHairStyle(msg.readByte()); + dstBeing->setHairStyle(id); break; case 2: - dstBeing->setWeapon(msg.readByte()); + dstBeing->setWeapon(id); + break; + case 3: // Change lower headgear for eAthena, pants for us + dstBeing->setVisibleEquipment( + Being::BOTTOMCLOTHES_SPRITE, + id); + break; + case 4: // Change upper headgear for eAthena, hat for us + dstBeing->setVisibleEquipment( + Being::HAT_SPRITE, + id); break; - case 3: - case 4: - case 5: - // Equip/unequip head 3. Bottom 4. Top 5. Middle - dstBeing->setVisibleEquipment(type, msg.readByte()); - // First 3 slots of mVisibleEquipments are reserved for - // later use, probably accessories. + case 5: // Change middle headgear for eathena, armor for us + dstBeing->setVisibleEquipment( + Being::TOPCLOTHES_SPRITE, + id); break; case 6: - dstBeing->setHairColor(msg.readByte()); + dstBeing->setHairColor(id); break; default: - printf("c3: %i\n", msg.readByte()); // unsupported + logger->log("c3: %i\n", id); // unsupported break; } } @@ -331,15 +324,15 @@ void BeingHandler::handleMessage(MessageIn &msg) dstBeing->setHairStyle(msg.readShort()); dstBeing->setWeaponById(msg.readShort()); // item id 1 msg.readShort(); // item id 2 - dstBeing->setVisibleEquipment(3, msg.readShort()); // head bottom + headBottom = msg.readShort(); if (msg.getId() == SMSG_PLAYER_MOVE) { msg.readLong(); // server tick } - dstBeing->setVisibleEquipment(4, msg.readShort()); // head top - dstBeing->setVisibleEquipment(5, msg.readShort()); // head mid + headTop = msg.readShort(); + headMid = msg.readShort(); dstBeing->setHairColor(msg.readShort()); msg.readShort(); // unknown msg.readShort(); // head dir @@ -348,6 +341,10 @@ void BeingHandler::handleMessage(MessageIn &msg) msg.readShort(); // manner msg.readByte(); // karma dstBeing->setSex(1 - msg.readByte()); // sex + dstBeing->setVisibleEquipment( + Being::BOTTOMCLOTHES_SPRITE, headBottom); + dstBeing->setVisibleEquipment(Being::HAT_SPRITE, headTop); + dstBeing->setVisibleEquipment(Being::TOPCLOTHES_SPRITE, headMid); if (msg.getId() == SMSG_PLAYER_MOVE) { @@ -359,7 +356,9 @@ void BeingHandler::handleMessage(MessageIn &msg) } else { - //msg.readCoordinates(dstBeing->mX, dstBeing->mY, dstBeing->mDirection); + //Uint8 dir; + //msg->readCoordinates(dstBeing->mX, dstBeing->mY, dir); + //dstBeing->setDirection(dir); } msg.readByte(); // unknown @@ -386,7 +385,7 @@ void BeingHandler::handleMessage(MessageIn &msg) case 0x0119: // Change in players look - printf("0x0119 %li %i %i %x %i\n", msg.readLong(), + logger->log("0x0119 %li %i %i %x %i\n", msg.readLong(), msg.readShort(), msg.readShort(), msg.readShort(), msg.readByte()); break; diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index 3f7e8709..f003d77a 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -92,7 +92,7 @@ void InventoryHandler::handleMessage(MessageIn &msg) if (msg.readByte()> 0) { chatWindow->chatLog("Unable to pick up item", BY_SERVER); } else { - const ItemInfo &itemInfo = itemDb->getItemInfo(itemId); + const ItemInfo &itemInfo = ItemDB::get(itemId); chatWindow->chatLog("You picked up a " + itemInfo.getName(), BY_SERVER); player_node->addInvItem(index, itemId, amount, equipType != 0); diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 9c89e71f..02204a84 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -49,20 +49,22 @@ NPCHandler::NPCHandler() void NPCHandler::handleMessage(MessageIn &msg) { + int id; + switch (msg.getId()) { case SMSG_NPC_CHOICE: msg.readShort(); // length - current_npc = dynamic_cast( - beingManager->findBeing(msg.readLong())); + id = msg.readLong(); + current_npc = dynamic_cast(beingManager->findBeing(id)); npcListDialog->parseItems(msg.readString(msg.getLength() - 8)); npcListDialog->setVisible(true); break; case SMSG_NPC_MESSAGE: msg.readShort(); // length - current_npc = dynamic_cast( - beingManager->findBeing(msg.readLong())); + id = msg.readLong(); + current_npc = dynamic_cast(beingManager->findBeing(id)); npcTextDialog->addText(msg.readString(msg.getLength() - 8)); npcListDialog->setVisible(false); npcTextDialog->setVisible(true); diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index 6eb80d59..37291c0a 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -46,7 +46,8 @@ OkDialog *deathNotice = NULL; namespace { struct WeightListener : public gcn::ActionListener { - void action(const std::string &eventId, gcn::Widget *widget) { + void action(const std::string &eventId, gcn::Widget *widget) + { weightNotice = NULL; } } weightListener; @@ -57,8 +58,10 @@ namespace { */ // TODO Move somewhere else namespace { - struct DeathListener : public gcn::ActionListener { - void action(const std::string &eventId, gcn::Widget *widget) { + struct DeathListener : public gcn::ActionListener + { + void action(const std::string &eventId, gcn::Widget *widget) + { player_node->revive(); deathNotice = NULL; } @@ -114,10 +117,11 @@ void PlayerHandler::handleMessage(MessageIn &msg) player_node->mMaxWeight / 2) { weightNotice = new OkDialog("Message", - "You are carrying more then half your " - "weight. You are unable to regain " - "health."); - weightNotice->addActionListener(&weightListener); + "You are carrying more then half " + "your weight. You are unable to " + "regain health."); + weightNotice->addActionListener( + &weightListener); } player_node->mTotalWeight = value; break; diff --git a/src/net/skillhandler.cpp b/src/net/skillhandler.cpp index d9bea775..17dea606 100644 --- a/src/net/skillhandler.cpp +++ b/src/net/skillhandler.cpp @@ -26,6 +26,8 @@ #include "messagein.h" #include "protocol.h" +#include "../log.h" + #include "../gui/chat.h" #include "../gui/skill.h" @@ -85,7 +87,7 @@ void SkillHandler::handleMessage(MessageIn &msg) if (action.success != SKILL_FAILED && action.bskill == BSKILL_EMOTE) { - printf("Action: %d/%d", action.bskill, action.success); + logger->log("Action: %d/%d", action.bskill, action.success); } chatWindow->chatLog(action); break; diff --git a/src/npc.cpp b/src/npc.cpp index 3bd4371b..3c142889 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -24,6 +24,9 @@ #include "npc.h" #include "animatedsprite.h" +#include "graphics.h" + +#include "gui/gui.h" class Spriteset; extern Spriteset *npcset; @@ -33,7 +36,8 @@ NPC *current_npc = 0; NPC::NPC(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { - mSprites[BASE_SPRITE] = new AnimatedSprite("graphics/sprites/npc.xml", job-100); + mSprites[BASE_SPRITE] = new AnimatedSprite("graphics/sprites/npc.xml", + job - 100); } Being::Type @@ -42,6 +46,17 @@ NPC::getType() const return Being::NPC; } +void +NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) +{ + int px = mPx + offsetX; + int py = mPy + offsetY; + + graphics->setFont(speechFont); + graphics->setColor(gcn::Color(200, 200, 255)); + graphics->drawText(mName, px + 15, py + 30, gcn::Graphics::CENTER); +} + void NPC::talk() { diff --git a/src/npc.h b/src/npc.h index 3b61123b..cf5defbc 100644 --- a/src/npc.h +++ b/src/npc.h @@ -26,12 +26,18 @@ #include "being.h" +class Graphics; + class NPC : public Being { public: NPC(Uint16 id, Uint16 job, Map *map); - virtual Type getType() const; + virtual Type + getType() const; + + virtual void + drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY); void talk(); void nextDialog(); diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 05bbb6b3..ec6c1ee3 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -52,6 +52,9 @@ OpenGLGraphics::~OpenGLGraphics() bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel) { + logger->log("Setting video mode %dx%d %s", + w, h, fs ? "fullscreen" : "windowed"); + int displayFlags = SDL_ANYFORMAT | SDL_OPENGL; mFullscreen = fs; diff --git a/src/player.cpp b/src/player.cpp index 0acf8262..63ed5455 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -28,6 +28,8 @@ #include "graphics.h" #include "log.h" +#include "resources/equipmentdb.h" + #include "utils/tostring.h" #include "gui/gui.h" @@ -35,9 +37,6 @@ Player::Player(Uint16 id, Uint16 job, Map *map): Being(id, job, map) { - // Load the weapon sprite. - // When there are more different weapons this should be moved to the - // setWeapon Method. setWeapon(0); } @@ -70,52 +69,72 @@ Player::setSex(Uint8 sex) if (sex != mSex) { - delete mSprites[BASE_SPRITE]; + Being::setSex(sex); + + // Reload base sprite + AnimatedSprite *newBaseSprite; if (sex == 0) { - mSprites[BASE_SPRITE] = new AnimatedSprite( - "graphics/sprites/player_male_base.xml", 0); + newBaseSprite = new AnimatedSprite( + "graphics/sprites/player_male_base.xml"); } else { - mSprites[BASE_SPRITE] = new AnimatedSprite( - "graphics/sprites/player_female_base.xml", 0); + newBaseSprite = new AnimatedSprite( + "graphics/sprites/player_female_base.xml"); } - Being::setSex(sex); - resetAnimations(); + delete mSprites[BASE_SPRITE]; + mSprites[BASE_SPRITE] = newBaseSprite; + + // Reload equipment + for (int i = 1; i < VECTOREND_SPRITE; i++) + { + if (i != HAIR_SPRITE && mEquipmentSpriteIDs.at(i) != 0) + { + AnimatedSprite *newEqSprite = new AnimatedSprite( + "graphics/sprites/" + EquipmentDB::get( + mEquipmentSpriteIDs.at(i))->getSprite(sex)); + delete mSprites[i]; + mSprites[i] = newEqSprite; + } + } } } - void Player::setWeapon(Uint16 weapon) { if (weapon != mWeapon) { - delete mSprites[WEAPON_SPRITE]; - mSprites[WEAPON_SPRITE] = NULL; + AnimatedSprite *newWeaponSprite = NULL; switch (weapon) { case 0: - mSprites[WEAPON_SPRITE] = new AnimatedSprite("graphics/sprites/weapon-fist.xml", 0); + newWeaponSprite = + new AnimatedSprite("graphics/sprites/weapon-fist.xml"); break; case 1: - mSprites[WEAPON_SPRITE] = new AnimatedSprite("graphics/sprites/weapon-dagger.xml", 0); + newWeaponSprite = + new AnimatedSprite("graphics/sprites/weapon-dagger.xml"); break; case 2: - mSprites[WEAPON_SPRITE] = new AnimatedSprite("graphics/sprites/weapon-bow.xml", 0); + newWeaponSprite = + new AnimatedSprite("graphics/sprites/weapon-bow.xml"); break; case 3: - mSprites[WEAPON_SPRITE] = new AnimatedSprite("graphics/sprites/weapon-scythe.xml", 0); + newWeaponSprite = + new AnimatedSprite("graphics/sprites/weapon-scythe.xml"); break; } + + delete mSprites[WEAPON_SPRITE]; + mSprites[WEAPON_SPRITE] = newWeaponSprite; } Being::setWeapon(weapon); } - void Player::setHairColor(Uint16 color) { @@ -128,7 +147,6 @@ Player::setHairColor(Uint16 color) delete mSprites[HAIR_SPRITE]; mSprites[HAIR_SPRITE] = newHairSprite; - resetAnimations(); setAction(mAction); } @@ -148,7 +166,6 @@ Player::setHairStyle(Uint16 style) delete mSprites[HAIR_SPRITE]; mSprites[HAIR_SPRITE] = newHairSprite; - resetAnimations(); setAction(mAction); } @@ -157,55 +174,35 @@ Player::setHairStyle(Uint16 style) } void -Player::setVisibleEquipment(Uint8 slot, Uint8 id) +Player::setVisibleEquipment(Uint8 slot, int id) { - // Translate eAthena specific slot - Uint8 position = 0; - switch (slot) { - case 3: - position = BOTTOMCLOTHES_SPRITE; - break; - case 4: - position = HAT_SPRITE; - break; - case 5: - position = TOPCLOTHES_SPRITE; - break; - } - // id = 0 means unequip if (id == 0) { - delete mSprites[position]; - mSprites[position] = NULL; + delete mSprites[slot]; + mSprites[slot] = NULL; } else { - char stringId[4]; - sprintf(stringId, "%03i", id); + AnimatedSprite *equipmentSprite; + + if (mSex == 0) + { + equipmentSprite = new AnimatedSprite( + "graphics/sprites/" + EquipmentDB::get(id)->getSprite(0)); + } + else { + equipmentSprite = new AnimatedSprite( + "graphics/sprites/" + EquipmentDB::get(id)->getSprite(1)); + } - AnimatedSprite *equipmentSprite = new AnimatedSprite( - "graphics/sprites/item" + toString(stringId) + ".xml", 0); equipmentSprite->setDirection(getSpriteDirection()); - delete mSprites[position]; - mSprites[position] = equipmentSprite; - resetAnimations(); + delete mSprites[slot]; + mSprites[slot] = equipmentSprite; setAction(mAction); } Being::setVisibleEquipment(slot, id); } - -void -Player::resetAnimations() -{ - for (int i = 0; i < VECTOREND_SPRITE; i++) - { - if (mSprites[i] != NULL) - { - mSprites[i]->reset(); - } - } -} diff --git a/src/player.h b/src/player.h index 3c061be6..b062a55f 100644 --- a/src/player.h +++ b/src/player.h @@ -26,12 +26,14 @@ #include "being.h" -#include - class Graphics; class Map; -class AnimatedSprite; +/** + * A player being. Players have their name drawn beneath them. This class also + * implements player-specific loading of base sprite, hair sprite and equipment + * sprites. + */ class Player : public Being { public: @@ -56,18 +58,10 @@ class Player : public Being setHairStyle(Uint16 style); virtual void - setVisibleEquipment(Uint8 slot, Uint8 id); + setVisibleEquipment(Uint8 slot, int id); virtual void setWeapon(Uint16 weapon); - - private: - /** - * Resets all animations associated with this player. This is used to - * synchronize the animations after a new one has been added. - */ - void - resetAnimations(); }; #endif diff --git a/src/resources/equipmentdb.cpp b/src/resources/equipmentdb.cpp new file mode 100644 index 00000000..78ae3b6a --- /dev/null +++ b/src/resources/equipmentdb.cpp @@ -0,0 +1,158 @@ +/* + * The Mana World + * Copyright 2006 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#include "equipmentdb.h" + +#include "resourcemanager.h" + +#include "../log.h" + +#include "../utils/dtor.h" +#include "../utils/xml.h" + +namespace +{ + EquipmentDB::EquipmentInfos mEquipmentInfos; + EquipmentInfo mUnknown; + bool mLoaded = false; +} + +void +EquipmentDB::load() +{ + logger->log("Initializing equipment database..."); + mUnknown.setSprite("error.xml", 0); + mUnknown.setSprite("error.xml", 1); + + ResourceManager *resman = ResourceManager::getInstance(); + int size; + char *data = (char*)resman->loadFile("equipment.xml", size); + + if (!data) + { + logger->error("Equipment Database: Could not find equipment.xml!"); + } + + xmlDocPtr doc = xmlParseMemory(data, size); + free(data); + + if (!doc) + { + logger->error("Equipment Database: Error while parsing equipment database (equipment.xml)!"); + } + + xmlNodePtr rootNode = xmlDocGetRootElement(doc); + if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "equipments")) + { + logger->error("Equipment Database: equipment.xml is not a valid database file!"); + } + + //iterate s + for ( xmlNodePtr equipmentNode = rootNode->xmlChildrenNode; + equipmentNode != NULL; + equipmentNode = equipmentNode->next) + { + + if (!xmlStrEqual(equipmentNode->name, BAD_CAST "equipment")) + { + continue; + } + + EquipmentInfo *currentInfo = new EquipmentInfo(); + + currentInfo->setSlot (XML::getProperty(equipmentNode, "slot", 0)); + + //iterate s + for ( xmlNodePtr spriteNode = equipmentNode->xmlChildrenNode; + spriteNode != NULL; + spriteNode = spriteNode->next) + { + if (!xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) + { + continue; + } + + std::string gender = XML::getProperty(spriteNode, "gender", "unisex"); + std::string filename = (const char*) spriteNode->xmlChildrenNode->content; + + if (gender == "male" || gender == "unisex") + { + currentInfo->setSprite(filename, 0); + } + + if (gender == "female" || gender == "unisex") + { + currentInfo->setSprite(filename, 1); + } + } + + setEquipment( XML::getProperty(equipmentNode, "id", 0), + currentInfo); + } + + mLoaded = true; +} + +void +EquipmentDB::unload() +{ + // kill EquipmentInfos + for_each ( mEquipmentInfos.begin(), mEquipmentInfos.end(), + make_dtor(mEquipmentInfos)); + mEquipmentInfos.clear(); + + mLoaded = false; +} + +EquipmentInfo* +EquipmentDB::get(int id) +{ + if (!mLoaded) { + logger->error("Error: Equipment database used before initialization!"); + } + + EquipmentInfoIterator i = mEquipmentInfos.find(id); + + if (i == mEquipmentInfos.end() ) + { + logger->log("EquipmentDB: Error, unknown equipment ID# %d", id); + return &mUnknown; + } + else + { + return i->second; + } +} + +void +EquipmentDB::setEquipment(int id, EquipmentInfo* equipmentInfo) +{ + if (mEquipmentInfos.find(id) != mEquipmentInfos.end()) { + logger->log("Warning: Equipment Piece with ID %d defined multiple times", + id); + delete equipmentInfo; + } + else { + mEquipmentInfos[id] = equipmentInfo; + }; +} diff --git a/src/resources/equipmentdb.h b/src/resources/equipmentdb.h new file mode 100644 index 00000000..b8618f5f --- /dev/null +++ b/src/resources/equipmentdb.h @@ -0,0 +1,52 @@ +/* + * The Mana World + * Copyright 2006 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#ifndef _TMW_EQUIPMENT_DB_H +#define _TMW_EQUIPMENT_DB_H + +#include + +#include "equipmentinfo.h" + +namespace EquipmentDB +{ + /** + * Loads the equipment info from Items.xml + */ + void load(); + + /** + * Frees equipment data + */ + void unload(); + + void setEquipment(int id, EquipmentInfo* equipmentInfo); + + EquipmentInfo* get(int id); + + // Equipment database types + typedef std::map EquipmentInfos; + typedef EquipmentInfos::iterator EquipmentInfoIterator; +} + +#endif diff --git a/src/resources/equipmentinfo.h b/src/resources/equipmentinfo.h new file mode 100644 index 00000000..93a1cb42 --- /dev/null +++ b/src/resources/equipmentinfo.h @@ -0,0 +1,52 @@ +/* + * The Mana World + * Copyright 2006 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#ifndef _TMW_EQUIPMENTINFO_H_ +#define _TMW_EQUIPMENTINFO_H_ + +#include +#include + +class EquipmentInfo +{ + public: + EquipmentInfo(): + mSlot (0) + { + }; + + void + setSlot (int slot) { mSlot = slot; }; + + const std::string& + getSprite(int gender) {return animationFiles[gender]; }; + + void + setSprite(std::string animationFile, int gender) {animationFiles[gender] = animationFile; }; + + private: + int mSlot; //not used at the moment but maybe useful on our own server + std::map animationFiles; +}; + +#endif diff --git a/src/resources/image.cpp b/src/resources/image.cpp index eb3a2409..48818f6f 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -68,9 +68,17 @@ Image* Image::load(void *buffer, unsigned int bufferSize, { // Load the raw file data from the buffer in an RWops structure SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); + SDL_Surface *tmpImage; // Use SDL_Image to load the raw image data and have it free the data - SDL_Surface *tmpImage = IMG_Load_RW(rw, 1); + if (!idPath.compare(idPath.length() - 4, 4, ".tga")) + { + tmpImage = IMG_LoadTyped_RW(rw, 1, const_cast("TGA")); + } + else + { + tmpImage = IMG_Load_RW(rw, 1); + } if (tmpImage == NULL) { logger->log("Error, image load failed: %s", IMG_GetError()); diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp new file mode 100644 index 00000000..b91e34cc --- /dev/null +++ b/src/resources/itemdb.cpp @@ -0,0 +1,170 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#include "itemdb.h" + +#include + +#include "iteminfo.h" +#include "resourcemanager.h" + +#include "../log.h" + +#include "../utils/dtor.h" +#include "../utils/xml.h" + +namespace +{ + ItemDB::ItemInfos mItemInfos; + ItemInfo mUnknown; +} + + +void ItemDB::load() +{ + logger->log("Initializing item database..."); + mUnknown.setName("Unknown item"); + + ResourceManager *resman = ResourceManager::getInstance(); + int size; + char *data = (char*)resman->loadFile("items.xml", size); + + if (!data) { + logger->error("ItemDB: Could not find items.xml!"); + } + + xmlDocPtr doc = xmlParseMemory(data, size); + free(data); + + if (!doc) + { + logger->error("ItemDB: Error while parsing item database (items.xml)!"); + } + + xmlNodePtr node = xmlDocGetRootElement(doc); + if (!node || !xmlStrEqual(node->name, BAD_CAST "items")) + { + logger->error("ItemDB: items.xml is not a valid database file!"); + } + + for (node = node->xmlChildrenNode; node != NULL; node = node->next) + { + if (!xmlStrEqual(node->name, BAD_CAST "item")) { + continue; + } + + int id = XML::getProperty(node, "id", 0); + int art = XML::getProperty(node, "art", 0); + int type = XML::getProperty(node, "type", 0); + int weight = XML::getProperty(node, "weight", 0); + int slot = XML::getProperty(node, "slot", 0); + + std::string name = XML::getProperty(node, "name", ""); + std::string image = XML::getProperty(node, "image", ""); + std::string description = XML::getProperty(node, "description", ""); + std::string effect = XML::getProperty(node, "effect", ""); + + if (id && name != "") + { + ItemInfo *itemInfo = new ItemInfo(); + itemInfo->setImage(image); + itemInfo->setArt(art); + itemInfo->setName(name); + itemInfo->setDescription(description); + itemInfo->setEffect(effect); + itemInfo->setType(type); + itemInfo->setWeight(weight); + itemInfo->setSlot(slot); + mItemInfos[id] = itemInfo; + } + + + if (id == 0) + { + logger->log("ItemDB: An item has no ID in items.xml!"); + } + if (name == "") + { + logger->log("ItemDB: Missing name for item %d!", id); + } + + if (image == "") + { + logger->log("ItemDB: Missing image parameter for item: %i. %s", + id, name.c_str()); + } + /* + if (art == 0) + { + logger->log("Item Manager: Missing art parameter for item: %i. %s", + id, name.c_str()); + } + if (description == "") + { + logger->log("ItemDB: Missing description parameter for item: %i. %s", + id, name.c_str()); + } + if (effect == "") + { + logger->log("ItemDB: Missing effect parameter for item: %i. %s", + id, name.c_str()); + } + if (type == 0) + { + logger->log("Item Manager: Missing type parameter for item: %i. %s", + id, name.c_str()); + } + */ + if (weight == 0) + { + logger->log("Item Manager: Missing weight parameter for item: %i. %s", + id, name.c_str()); + } + /* + if (slot == 0) + { + logger->log("Item Manager: Missing slot parameter for item: %i. %s", + id, name.c_str()); + } + */ + } + + xmlFreeDoc(doc); +} + +void ItemDB::unload() +{ + for (ItemInfoIterator i = mItemInfos.begin(); i != mItemInfos.end(); i++) + { + delete i->second; + } + mItemInfos.clear(); +} + +const ItemInfo& +ItemDB::get(int id) +{ + ItemInfoIterator i = mItemInfos.find(id); + + return (i != mItemInfos.end()) ? *(i->second) : mUnknown; +} diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h new file mode 100644 index 00000000..5922984a --- /dev/null +++ b/src/resources/itemdb.h @@ -0,0 +1,53 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: itemdb.h 2650 2006-09-03 15:00:47Z b_lindeijer $ + */ + +#ifndef _TMW_ITEM_MANAGER_H +#define _TMW_ITEM_MANAGER_H + +#include "iteminfo.h" + +#include + +/** + * The namespace that holds the item information + */ +namespace ItemDB +{ + /** + * Loads the item data from Items.xml + */ + void load(); + + /** + * Frees item data + */ + void unload(); + + const ItemInfo& get(int id); + + // Items database + typedef std::map ItemInfos; + typedef ItemInfos::iterator ItemInfoIterator; +} + +#endif diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 9a04bb2e..e4f851bb 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -33,8 +33,6 @@ class Image; */ class ItemInfo { - friend class ItemManager; - public: /** * Constructor. @@ -49,6 +47,11 @@ class ItemInfo { } + /** + * Destructor. + */ + ~ItemInfo(); + void setArt(short art) { mArt = art; } @@ -101,11 +104,6 @@ class ItemInfo getSlot() const { return mSlot; } protected: - /** - * Destructor. - */ - ~ItemInfo(); - std::string mImageName; /* TODO (BL): I do not think the item info should keep a reference to diff --git a/src/resources/itemmanager.cpp b/src/resources/itemmanager.cpp deleted file mode 100644 index 7d0b13f2..00000000 --- a/src/resources/itemmanager.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - * The Mana World - * Copyright 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * The Mana World is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * The Mana World is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ - */ - -#include "itemmanager.h" - -#include - -#include "iteminfo.h" -#include "resourcemanager.h" - -#include "../log.h" - -#include "../utils/dtor.h" - -#define READ_PROP(node, prop, name, target, cast) \ - prop = xmlGetProp(node, BAD_CAST name); \ - if (prop) { \ - target = cast((const char*)prop); \ - xmlFree(prop); \ - } - -ItemManager::ItemManager() -{ - mUnknown.setName("Unknown item"); - - ResourceManager *resman = ResourceManager::getInstance(); - int size; - char *data = (char*)resman->loadFile("items.xml", size); - - if (!data) { - logger->error("Item Manager: Could not find items.xml!"); - } - - xmlDocPtr doc = xmlParseMemory(data, size); - free(data); - - if (!doc) - { - logger->error("Item Manager: Error while parsing item database (items.xml)!"); - } - - xmlNodePtr node = xmlDocGetRootElement(doc); - if (!node || !xmlStrEqual(node->name, BAD_CAST "items")) - { - logger->error("Item Manager: items.xml is not a valid database file!"); - } - - for (node = node->xmlChildrenNode; node != NULL; node = node->next) - { - int id = 0, art = 0, type = 0, weight = 0, slot = 0; - std::string name = "", description = "", effect = "", image = ""; - - if (!xmlStrEqual(node->name, BAD_CAST "item")) { - continue; - } - - xmlChar *prop = NULL; - READ_PROP(node, prop, "id", id, atoi); - READ_PROP(node, prop, "image", image, ); - READ_PROP(node, prop, "art", art, atoi); - READ_PROP(node, prop, "name", name, ); - READ_PROP(node, prop, "description", description, ); - READ_PROP(node, prop, "effect", effect, ); - READ_PROP(node, prop, "type", type, atoi); - READ_PROP(node, prop, "weight", weight, atoi); - READ_PROP(node, prop, "slot", slot, atoi); - - - if (id && name != "") - { - ItemInfo *itemInfo = new ItemInfo(); - itemInfo->setImage(image); - itemInfo->setArt(art); - itemInfo->setName(name); - itemInfo->setDescription(description); - itemInfo->setEffect(effect); - itemInfo->setType(type); - itemInfo->setWeight(weight); - itemInfo->setSlot(slot); - mItemInfos[id] = itemInfo; - } - - - if (id == 0) - { - logger->log("Item Manager: An item has no ID in items.xml!"); - } - if (name == "") - { - logger->log("Item Manager: An item has no name in items.xml!"); - } - - if (image == "") - { - logger->log("Item Manager: Missing image parameter for item: %i. %s", - id, name.c_str()); - } - /*if (art == 0) - { - logger->log("Item Manager: Missing art parameter for item: %i. %s", - id, name.c_str()); - }*/ - if (description == "") - { - logger->log("Item Manager: Missing description parameter for item: %i. %s", - id, name.c_str()); - } - if (effect == "") - { - logger->log("Item Manager: Missing effect parameter for item: %i. %s", - id, name.c_str()); - } - /*if (type == 0) - { - logger->log("Item Manager: Missing type parameter for item: %i. %s", - id, name.c_str()); - }*/ - if (weight == 0) - { - logger->log("Item Manager: Missing weight parameter for item: %i. %s", - id, name.c_str()); - } - if (slot == 0) - { - logger->log("Item Manager: Missing slot parameter for item: %i. %s", - id, name.c_str()); - } - - /*logger->log("Item: %i %i %i %s %s %i %i %i", id, - getImage(id), getArt(id), getName(id).c_str(), - getDescription(id).c_str(), getType(id), getWeight(id), - getSlot(id));*/ - } - - xmlFreeDoc(doc); -} - -ItemManager::~ItemManager() -{ - for (ItemInfoIterator i = mItemInfos.begin(); i != mItemInfos.end(); i++) - { - delete i->second; - } - mItemInfos.clear(); -} - -const ItemInfo& -ItemManager::getItemInfo(int id) -{ - ItemInfoIterator i = mItemInfos.find(id); - - return (i != mItemInfos.end()) ? *(i->second) : mUnknown; -} diff --git a/src/resources/itemmanager.h b/src/resources/itemmanager.h deleted file mode 100644 index b1f2b95c..00000000 --- a/src/resources/itemmanager.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * The Mana World - * Copyright 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * The Mana World is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * The Mana World is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ - */ - -#ifndef _TMW_ITEM_MANAGER_H -#define _TMW_ITEM_MANAGER_H - -#include "iteminfo.h" - -#include - -/** - * Defines a class to load items database. - */ -class ItemManager -{ - public: - /** - * Constructor. - */ - ItemManager(); - - /** - * Destructor. - */ - ~ItemManager(); - - const ItemInfo& getItemInfo(int id); - - protected: - // Items database - typedef std::map ItemInfos; - typedef ItemInfos::iterator ItemInfoIterator; - ItemInfos mItemInfos; - ItemInfo mUnknown; -}; - -extern ItemManager *itemDb; - -#endif diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 2aea3dc5..09a6eb74 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -36,6 +36,7 @@ #include "../tileset.h" #include "../utils/tostring.h" +#include "../utils/xml.h" const unsigned int DEFAULT_TILE_WIDTH = 32; const unsigned int DEFAULT_TILE_HEIGHT = 32; @@ -205,10 +206,10 @@ MapReader::readMap(xmlNodePtr node, const std::string &path) prop = xmlGetProp(node, BAD_CAST "version"); xmlFree(prop); - int w = getProperty(node, "width", 0); - int h = getProperty(node, "height", 0); - int tilew = getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH); - int tileh = getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT); + int w = XML::getProperty(node, "width", 0); + int h = XML::getProperty(node, "height", 0); + int tilew = XML::getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH); + int tileh = XML::getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT); int layerNr = 0; Map *map = new Map(w, h, tilew, tileh); @@ -308,7 +309,7 @@ MapReader::readLayer(xmlNodePtr node, Map *map, int layer) int binLen; unsigned char *binData = - php_base64_decode(charData, strlen((char*)charData), &binLen); + php3_base64_decode(charData, strlen((char*)charData), &binLen); delete[] charData; @@ -354,7 +355,7 @@ MapReader::readLayer(xmlNodePtr node, Map *map, int layer) if (!xmlStrEqual(n2->name, BAD_CAST "tile")) continue; - int gid = getProperty(n2, "gid", -1); + int gid = XML::getProperty(n2, "gid", -1); map->setTileWithGid(x, y, layer, gid); x++; @@ -387,9 +388,9 @@ MapReader::readTileset(xmlNodePtr node, return NULL; } - int firstGid = getProperty(node, "firstgid", 0); - int tw = getProperty(node, "tilewidth", map->getTileWidth()); - int th = getProperty(node, "tileheight", map->getTileHeight()); + int firstGid = XML::getProperty(node, "firstgid", 0); + int tw = XML::getProperty(node, "tilewidth", map->getTileWidth()); + int th = XML::getProperty(node, "tileheight", map->getTileHeight()); for (node = node->xmlChildrenNode; node; node = node->next) { if (!xmlStrEqual(node->name, BAD_CAST "image")) @@ -422,16 +423,3 @@ MapReader::readTileset(xmlNodePtr node, return NULL; } - -int -MapReader::getProperty(xmlNodePtr node, const char* name, int def) -{ - int &ret = def; - - xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { - ret = atoi((char*)prop); - xmlFree(prop); - } - return ret; -} diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp new file mode 100644 index 00000000..fb03f6c1 --- /dev/null +++ b/src/resources/monsterdb.cpp @@ -0,0 +1,151 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#include "monsterdb.h" + +#include "resourcemanager.h" + +#include "../log.h" + +#include "../utils/dtor.h" +#include "../utils/xml.h" + +namespace +{ + MonsterDB::MonsterInfos mMonsterInfos; + MonsterInfo mUnknown; +} + +void +MonsterDB::load() +{ + mUnknown.setSprite("error.xml"); + mUnknown.setName("unnamed"); + + logger->log("Initializing monster database..."); + + ResourceManager *resman = ResourceManager::getInstance(); + int size; + char *data = (char*)resman->loadFile("monsters.xml", size); + + if (!data) + { + logger->error("Monster Database: Could not find monsters.xml!"); + } + + xmlDocPtr doc = xmlParseMemory(data, size); + free(data); + + if (!doc) + { + logger->error("Monster Database: Error while parsing monster database (monsters.xml)!"); + } + + xmlNodePtr rootNode = xmlDocGetRootElement(doc); + if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "monsters")) + { + logger->error("Monster Database: monster.xml is not a valid database file!"); + } + + //iterate s + for ( xmlNodePtr monsterNode = rootNode->xmlChildrenNode; + monsterNode != NULL; + monsterNode = monsterNode->next) + { + + if (!xmlStrEqual(monsterNode->name, BAD_CAST "monster")) + { + continue; + } + + MonsterInfo *currentInfo = new MonsterInfo(); + + currentInfo->setName (XML::getProperty(monsterNode, "name", "unnamed")); + + //iterate s and s + for ( xmlNodePtr spriteNode = monsterNode->xmlChildrenNode; + spriteNode != NULL; + spriteNode = spriteNode->next) + { + if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) + { + currentInfo->setSprite((const char*) spriteNode->xmlChildrenNode->content); + } + + if (xmlStrEqual(spriteNode->name, BAD_CAST "sound")) + { + std::string event = XML::getProperty(spriteNode, "event", ""); + const char *filename; + filename = (const char*) spriteNode->xmlChildrenNode->content; + + if (event == "hit") + { + currentInfo->addSound(EVENT_HIT, filename); + } + else if (event == "miss") + { + currentInfo->addSound(EVENT_MISS, filename); + } + else if (event == "hurt") + { + currentInfo->addSound(EVENT_HURT, filename); + } + else if (event == "die") + { + currentInfo->addSound(EVENT_DIE, filename); + } + else + { + logger->log("MonsterDB: Warning, sound effect %s for unknown event %s of monster %s", + filename, event.c_str(), currentInfo->getName().c_str()); + } + } + } + mMonsterInfos[XML::getProperty(monsterNode, "id", 0)] = currentInfo; + } +} + +void +MonsterDB::unload() +{ + for_each ( mMonsterInfos.begin(), mMonsterInfos.end(), + make_dtor(mMonsterInfos)); + mMonsterInfos.clear(); +} + + +const MonsterInfo& +MonsterDB::get (int id) +{ + MonsterInfoIterator i = mMonsterInfos.find(id); + + if (i == mMonsterInfos.end()) + { + logger->log("MonsterDB: Warning, unknown monster ID %d requested", id); + return mUnknown; + } + else + { + return *(i->second); + } +} diff --git a/src/resources/monsterdb.h b/src/resources/monsterdb.h new file mode 100644 index 00000000..b105665a --- /dev/null +++ b/src/resources/monsterdb.h @@ -0,0 +1,45 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: + */ + +#ifndef _TMW_MONSTER_DB_H +#define _TMW_MONSTER_DB_H + +#include + +#include "monsterinfo.h" + +namespace MonsterDB +{ + void + load(); + + void + unload(); + + const MonsterInfo& get (int id); + + typedef std::map MonsterInfos; + typedef MonsterInfos::iterator MonsterInfoIterator; +} + +#endif diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp new file mode 100644 index 00000000..43aac32a --- /dev/null +++ b/src/resources/monsterinfo.cpp @@ -0,0 +1,70 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: monsterinfo.cpp 2650 2006-09-03 15:00:47Z b_lindeijer $ + */ + +#include "monsterinfo.h" + +#include "../utils/dtor.h" + +MonsterInfo::MonsterInfo(): + mSprite("error.xml") +{ + +} + +MonsterInfo::~MonsterInfo() +{ + //kill vectors in mSoundEffects + for_each ( mSounds.begin(), mSounds.end(), + make_dtor(mSounds)); + mSounds.clear(); +} + + +void +MonsterInfo::addSound (SoundEvent event, std::string filename) +{ + if (mSounds.find(event) == mSounds.end()) + { + mSounds[event] = new std::vector; + } + + mSounds[event]->push_back("sfx/" + filename); +} + + +std::string +MonsterInfo::getSound (SoundEvent event) const +{ + std::map* >::const_iterator i; + + i = mSounds.find(event); + + if (i == mSounds.end()) + { + return ""; + } + else + { + return i->second->at(rand()%i->second->size()); + } +} diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h new file mode 100644 index 00000000..413dafa0 --- /dev/null +++ b/src/resources/monsterinfo.h @@ -0,0 +1,74 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: monsterinfo.h 2650 2006-09-03 15:00:47Z b_lindeijer $ + */ + +#ifndef _TMW_MONSTERINFO_H_ +#define _TMW_MONSTERINFO_H_ + +#include +#include +#include + + +enum SoundEvent +{ + EVENT_HIT, + EVENT_MISS, + EVENT_HURT, + EVENT_DIE +}; + + +class MonsterInfo +{ + public: + MonsterInfo(); + + ~MonsterInfo(); + + void + setName(std::string name) { mName = name; } ; + + void + setSprite(std::string filename) { mSprite = filename; } + + void + addSound (SoundEvent event, std::string filename); + + const std::string& + getName () const { return mName; }; + + const std::string& + getSprite () const { return mSprite; }; + + std::string + getSound (SoundEvent event) const; + + private: + + std::string mName; + std::string mSprite; + + std::map* > mSounds; +}; + +#endif diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index bb51d023..45067302 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -32,6 +32,7 @@ #include "music.h" #include "soundeffect.h" #include "spriteset.h" +#include "spritedef.h" #include "../log.h" @@ -40,15 +41,33 @@ ResourceManager *ResourceManager::instance = NULL; ResourceManager::ResourceManager() { + logger->log("Initializing resource manager..."); } ResourceManager::~ResourceManager() { - // Release any remaining spritesets first because they depend on images + // Release any remaining spritedefs first because they depend on spritesets ResourceIterator iter = mResources.begin(); while (iter != mResources.end()) { - if (dynamic_cast(iter->second) != NULL) + if (dynamic_cast(iter->second) != 0) + { + cleanUp(iter->second); + ResourceIterator toErase = iter; + ++iter; + mResources.erase(toErase); + } + else + { + ++iter; + } + } + + // Release any remaining spritesets first because they depend on images + iter = mResources.begin(); + while (iter != mResources.end()) + { + if (dynamic_cast(iter->second) != 0) { cleanUp(iter->second); ResourceIterator toErase = iter; @@ -83,7 +102,7 @@ ResourceManager::cleanUp(Resource *res) bool ResourceManager::setWriteDir(const std::string &path) { - return (bool)PHYSFS_setWriteDir(path.c_str()); + return (bool) PHYSFS_setWriteDir(path.c_str()); } void @@ -96,7 +115,7 @@ ResourceManager::addToSearchPath(const std::string &path, bool append) bool ResourceManager::mkdir(const std::string &path) { - return (bool)PHYSFS_mkdir(path.c_str()); + return (bool) PHYSFS_mkdir(path.c_str()); } bool @@ -158,9 +177,9 @@ ResourceManager::get(const E_RESOURCE_TYPE &type, const std::string &idPath) free(buffer); - if (resource) { + if (resource) + { resource->incRef(); - mResources[idPath] = resource; } @@ -215,6 +234,27 @@ ResourceManager::getSpriteset(const std::string &imagePath, int w, int h) return spriteset; } +SpriteDef* +ResourceManager::getSprite(const std::string &path, int variant) +{ + std::stringstream ss; + ss << path << "[" << variant << "]"; + const std::string idPath = ss.str(); + + ResourceIterator resIter = mResources.find(idPath); + + if (resIter != mResources.end()) { + resIter->second->incRef(); + return dynamic_cast(resIter->second); + } + + SpriteDef *sprite = new SpriteDef(idPath, path, variant); + sprite->incRef(); + mResources[idPath] = sprite; + + return sprite; +} + void ResourceManager::release(const std::string &idPath) { @@ -246,18 +286,13 @@ ResourceManager::deleteInstance() void* ResourceManager::loadFile(const std::string &fileName, int &fileSize) { - // If the file doesn't exist indicate failure - if (!PHYSFS_exists(fileName.c_str())) { - logger->log("Warning: %s not found!", fileName.c_str()); - return NULL; - } - // Attempt to open the specified file using PhysicsFS PHYSFS_file *file = PHYSFS_openRead(fileName.c_str()); // If the handler is an invalid pointer indicate failure if (file == NULL) { - logger->log("Warning: %s failed to load!", fileName.c_str()); + logger->log("Warning: Failed to load %s: %s", + fileName.c_str(), PHYSFS_getLastError()); return NULL; } diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 0086b167..d458f96e 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -34,6 +34,7 @@ class Image; class Music; class SoundEffect; class Spriteset; +class SpriteDef; /** * A class for loading and managing resources. @@ -113,21 +114,21 @@ class ResourceManager get(const E_RESOURCE_TYPE &type, const std::string &idPath); /** - * Convenience wrapper around ResourceManager::create for loading + * Convenience wrapper around ResourceManager::get for loading * images. */ Image* getImage(const std::string &idPath); /** - * Convenience wrapper around ResourceManager::create for loading + * Convenience wrapper around ResourceManager::get for loading * songs. */ Music* getMusic(const std::string &idPath); /** - * Convenience wrapper around ResourceManager::create for loading + * Convenience wrapper around ResourceManager::get for loading * samples. */ SoundEffect* @@ -137,7 +138,15 @@ class ResourceManager * Creates a spriteset based on the image referenced by the given * path and the supplied sprite sizes */ - Spriteset* getSpriteset(const std::string &imagePath, int w, int h); + Spriteset* + getSpriteset(const std::string &imagePath, int w, int h); + + /** + * Creates a sprite definition based on a given path and the supplied + * variant. + */ + SpriteDef* + getSprite(const std::string &path, int variant = 0); /** * Releases a resource, removing it from the set of loaded resources. diff --git a/src/resources/soundeffect.cpp b/src/resources/soundeffect.cpp index 3340e5ea..bb35218e 100644 --- a/src/resources/soundeffect.cpp +++ b/src/resources/soundeffect.cpp @@ -23,6 +23,8 @@ #include "soundeffect.h" +#include "../log.h" + SoundEffect::SoundEffect(const std::string &idPath, Mix_Chunk *soundEffect): Resource(idPath), mChunk(soundEffect) @@ -41,13 +43,18 @@ SoundEffect::load(void *buffer, unsigned int bufferSize, // Load the raw file data from the buffer in an RWops structure SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); - // Use Mix_LoadWAV_RW to load the raw music data - Mix_Chunk *tmpSoundEffect = Mix_LoadWAV_RW(rw, 0); - - // Now free the SDL_RWops data - SDL_FreeRW(rw); + // Load the music data and free the RWops structure + Mix_Chunk *tmpSoundEffect = Mix_LoadWAV_RW(rw, 1); - return new SoundEffect(idPath, tmpSoundEffect); + if (tmpSoundEffect) + { + return new SoundEffect(idPath, tmpSoundEffect); + } + else + { + logger->log("Error while loading sound effect (%s)", idPath.c_str()); + return NULL; + } } bool diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp new file mode 100644 index 00000000..bd273b3b --- /dev/null +++ b/src/resources/spritedef.cpp @@ -0,0 +1,381 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#include "spritedef.h" + +#include "../animation.h" +#include "../action.h" +#include "../graphics.h" +#include "../log.h" + +#include "resourcemanager.h" +#include "spriteset.h" +#include "image.h" + +#include "../utils/xml.h" + +SpriteDef::SpriteDef(const std::string &idPath, + const std::string &file, int variant): + Resource(idPath), + mAction(NULL), + mDirection(DIRECTION_DOWN), + mLastTime(0) +{ + load(file, variant); +} + +Action* +SpriteDef::getAction(SpriteAction action) const +{ + Actions::const_iterator i = mActions.find(action); + + if (i == mActions.end()) + { + logger->log("Warning: no action \"%u\" defined!", action); + return NULL; + } + + return i->second; +} + +void +SpriteDef::load(const std::string &animationFile, int variant) +{ + int size; + ResourceManager *resman = ResourceManager::getInstance(); + char *data = (char*) resman->loadFile(animationFile.c_str(), size); + + if (!data) { + logger->error("Animation: Could not find " + animationFile + "!"); + } + + xmlDocPtr doc = xmlParseMemory(data, size); + free(data); + + if (!doc) { + logger->error( + "Animation: Error while parsing animation definition file!"); + } + + xmlNodePtr node = xmlDocGetRootElement(doc); + if (!node || !xmlStrEqual(node->name, BAD_CAST "sprite")) { + logger->error( + "Animation: this is not a valid animation definition file!"); + } + + // Get the variant + int variant_num = XML::getProperty(node, "variants", 0); + int variant_offset = 0; + + if (variant_num > 0 && variant < variant_num) + { + variant_offset = variant * XML::getProperty(node, "variant_offset", 0); + } + + for (node = node->xmlChildrenNode; node != NULL; node = node->next) + { + if (xmlStrEqual(node->name, BAD_CAST "imageset")) + { + loadImageSet(node); + } + else if (xmlStrEqual(node->name, BAD_CAST "action")) + { + loadAction(node, variant_offset); + } + else if (xmlStrEqual(node->name, BAD_CAST "include")) + { + includeSprite(node); + } + } + + xmlFreeDoc(doc); + + // Complete missing actions + substituteAction(ACTION_STAND, ACTION_DEFAULT); + substituteAction(ACTION_WALK, ACTION_STAND); + substituteAction(ACTION_WALK, ACTION_RUN); + substituteAction(ACTION_ATTACK, ACTION_STAND); + substituteAction(ACTION_ATTACK_SWING, ACTION_ATTACK); + substituteAction(ACTION_ATTACK_STAB, ACTION_ATTACK_SWING); + substituteAction(ACTION_ATTACK_BOW, ACTION_ATTACK_STAB); + substituteAction(ACTION_ATTACK_THROW, ACTION_ATTACK_SWING); + substituteAction(ACTION_CAST_MAGIC, ACTION_ATTACK_SWING); + substituteAction(ACTION_USE_ITEM, ACTION_CAST_MAGIC); + substituteAction(ACTION_SIT, ACTION_STAND); + substituteAction(ACTION_SLEEP, ACTION_SIT); + substituteAction(ACTION_HURT, ACTION_STAND); + substituteAction(ACTION_DEAD, ACTION_HURT); +} + +void +SpriteDef::loadImageSet(xmlNodePtr node) +{ + int width = XML::getProperty(node, "width", 0); + int height = XML::getProperty(node, "height", 0); + std::string name = XML::getProperty(node, "name", ""); + std::string imageSrc = XML::getProperty(node, "src", ""); + + ResourceManager *resman = ResourceManager::getInstance(); + Spriteset *spriteset = resman->getSpriteset(imageSrc, width, height); + + if (!spriteset) + { + logger->error("Couldn't load imageset!"); + } + + mSpritesets[name] = spriteset; +} + +void +SpriteDef::loadAction(xmlNodePtr node, int variant_offset) +{ + const std::string actionName = XML::getProperty(node, "name", ""); + const std::string imagesetName = XML::getProperty(node, "imageset", ""); + + SpritesetIterator si = mSpritesets.find(imagesetName); + if (si == mSpritesets.end()) + { + logger->log("Warning: imageset \"%s\" not defined in %s", + imagesetName.c_str(), getIdPath().c_str()); + return; + } + Spriteset *imageset = si->second; + + SpriteAction actionType = makeSpriteAction(actionName); + if (actionType == ACTION_INVALID) + { + logger->log("Warning: Unknown action \"%s\" defined in %s", + actionName.c_str(), getIdPath().c_str()); + return; + } + Action *action = new Action(); + mActions[actionType] = action; + + // When first action set it as default direction + if (mActions.empty()) + { + mActions[ACTION_DEFAULT] = action; + } + + // Load animations + for (xmlNodePtr animationNode = node->xmlChildrenNode; + animationNode != NULL; + animationNode = animationNode->next) + { + if (xmlStrEqual(animationNode->name, BAD_CAST "animation")) + { + loadAnimation(animationNode, action, imageset, variant_offset); + } + } +} + +void +SpriteDef::loadAnimation(xmlNodePtr animationNode, + Action *action, Spriteset *imageset, + int variant_offset) +{ + std::string directionName = + XML::getProperty(animationNode, "direction", ""); + SpriteDirection directionType = makeSpriteDirection(directionName); + + if (directionType == DIRECTION_INVALID) + { + logger->log("Warning: Unknown direction \"%s\" used in %s", + directionName.c_str(), getIdPath().c_str()); + return; + } + + Animation *animation = new Animation(); + action->setAnimation(directionType, animation); + + // Get animation phases + for (xmlNodePtr phaseNode = animationNode->xmlChildrenNode; + phaseNode != NULL; + phaseNode = phaseNode->next) + { + int delay = XML::getProperty(phaseNode, "delay", 0); + int offsetX = XML::getProperty(phaseNode, "offsetX", 0); + int offsetY = XML::getProperty(phaseNode, "offsetY", 0); + offsetY -= imageset->getHeight() - 32; + offsetX -= imageset->getWidth() / 2 - 16; + + if (xmlStrEqual(phaseNode->name, BAD_CAST "frame")) + { + int index = XML::getProperty(phaseNode, "index", -1); + + if (index < 0) + { + logger->log("No valid value for 'index'"); + continue; + } + + Image *img = imageset->get(index + variant_offset); + + if (!img) + { + logger->log("No image at index " + (index + variant_offset)); + continue; + } + + animation->addPhase(img, delay, offsetX, offsetY); + } + else if (xmlStrEqual(phaseNode->name, BAD_CAST "sequence")) + { + int start = XML::getProperty(phaseNode, "start", -1); + int end = XML::getProperty(phaseNode, "end", -1); + + if (start < 0 || end < 0) + { + logger->log("No valid value for 'start' or 'end'"); + continue; + } + + while (end >= start) + { + Image *img = imageset->get(start + variant_offset); + + if (!img) + { + logger->log("No image at index " + + (start + variant_offset)); + continue; + } + + animation->addPhase(img, delay, offsetX, offsetY); + start++; + } + } + else if (xmlStrEqual(phaseNode->name, BAD_CAST "end")) + { + animation->addTerminator(); + } + } // for phaseNode +} + +void +SpriteDef::includeSprite(xmlNodePtr includeNode) +{ + std::string filename = XML::getProperty(includeNode, "file", ""); + ResourceManager *resman = ResourceManager::getInstance(); + SpriteDef *sprite = resman->getSprite("graphics/sprites/" + filename); + + // TODO: Somehow implement actually including it + sprite->decRef(); +} + +void +SpriteDef::substituteAction(SpriteAction complete, SpriteAction with) +{ + if (mActions.find(complete) == mActions.end()) + { + Actions::iterator i = mActions.find(with); + if (i != mActions.end()) { + mActions[complete] = i->second; + } + } +} + +SpriteDef::~SpriteDef() +{ + for (SpritesetIterator i = mSpritesets.begin(); + i != mSpritesets.end(); ++i) + { + i->second->decRef(); + } +} + +SpriteAction +SpriteDef::makeSpriteAction(const std::string& action) +{ + if (action == "" || action == "default") { + return ACTION_DEFAULT; + } + if (action == "stand") { + return ACTION_STAND; + } + else if (action == "walk") { + return ACTION_WALK; + } + else if (action == "run") { + return ACTION_RUN; + } + else if (action == "attack") { + return ACTION_ATTACK; + } + else if (action == "attack_swing") { + return ACTION_ATTACK_SWING; + } + else if (action == "attack_stab") { + return ACTION_ATTACK_STAB; + } + else if (action == "attack_bow") { + return ACTION_ATTACK_BOW; + } + else if (action == "attack_throw") { + return ACTION_ATTACK_THROW; + } + else if (action == "cast_magic") { + return ACTION_CAST_MAGIC; + } + else if (action == "use_item") { + return ACTION_USE_ITEM; + } + else if (action == "sit") { + return ACTION_SIT; + } + else if (action == "sleep") { + return ACTION_SLEEP; + } + else if (action == "hurt") { + return ACTION_HURT; + } + else if (action == "dead") { + return ACTION_DEAD; + } + else { + return ACTION_INVALID; + } +} + +SpriteDirection +SpriteDef::makeSpriteDirection(const std::string& direction) +{ + if (direction == "" || direction == "default") { + return DIRECTION_DEFAULT; + } + else if (direction == "up") { + return DIRECTION_UP; + } + else if (direction == "left") { + return DIRECTION_LEFT; + } + else if (direction == "right") { + return DIRECTION_RIGHT; + } + else if (direction == "down") { + return DIRECTION_DOWN; + } + else { + return DIRECTION_INVALID; + }; +} diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h new file mode 100644 index 00000000..64414259 --- /dev/null +++ b/src/resources/spritedef.h @@ -0,0 +1,158 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#ifndef _TMW_SPRITEDEF_H +#define _TMW_SPRITEDEF_H + +#include "resource.h" + +#include +#include + +#include + +class Action; +class Graphics; +class Spriteset; +struct AnimationPhase; +class Animation; + +enum SpriteAction +{ + ACTION_DEFAULT = 0, + ACTION_STAND, + ACTION_WALK, + ACTION_RUN, + ACTION_ATTACK, + ACTION_ATTACK_SWING, + ACTION_ATTACK_STAB, + ACTION_ATTACK_BOW, + ACTION_ATTACK_THROW, + ACTION_CAST_MAGIC, + ACTION_USE_ITEM, + ACTION_SIT, + ACTION_SLEEP, + ACTION_HURT, + ACTION_DEAD, + ACTION_INVALID +}; + +enum SpriteDirection +{ + DIRECTION_DEFAULT = 0, + DIRECTION_DOWN, + DIRECTION_UP, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_INVALID +}; + +/** + * Defines a class to load an animation. + */ +class SpriteDef : public Resource +{ + public: + /** + * Constructor. + */ + SpriteDef(const std::string &idPath, + const std::string &file, int variant); + + /** + * Destructor. + */ + ~SpriteDef(); + + /** + * Returns the specified action. + */ + Action* + getAction(SpriteAction action) const; + + private: + /** + * Loads a sprite definition file. + */ + void + load(const std::string &file, int variant); + + /** + * Loads an imageset element. + */ + void + loadImageSet(xmlNodePtr node); + + /** + * Loads an action element. + */ + void + loadAction(xmlNodePtr node, int variant_offset); + + /** + * Loads an animation element. + */ + void + loadAnimation(xmlNodePtr animationNode, + Action *action, Spriteset *imageset, + int variant_offset); + + /** + * Include another sprite into this one. + */ + void + includeSprite(xmlNodePtr includeNode); + + /** + * When there are no animations defined for the action "complete", its + * animations become a copy of those of the action "with". + */ + void + substituteAction(SpriteAction complete, SpriteAction with); + + /** + * Converts a string into a SpriteAction enum. + */ + static SpriteAction + makeSpriteAction(const std::string &action); + + /** + * Converts a string into a SpriteDirection enum. + */ + static SpriteDirection + makeSpriteDirection(const std::string &direction); + + + typedef std::map Spritesets; + typedef Spritesets::iterator SpritesetIterator; + + typedef std::map Actions; + + Spritesets mSpritesets; + Actions mActions; + Action *mAction; + SpriteDirection mDirection; + int mLastTime; +}; + +#endif diff --git a/src/resources/spriteset.h b/src/resources/spriteset.h index c51e6a75..7f6b42df 100644 --- a/src/resources/spriteset.h +++ b/src/resources/spriteset.h @@ -32,7 +32,9 @@ class Image; /** - * Stores a complete set of sprites. + * Stores a set of subimages originating from a single image. + * + * TODO: Should probably be renamed to ImageSet or TileSet. */ class Spriteset : public Resource { @@ -40,7 +42,7 @@ class Spriteset : public Resource /* * Cuts the passed image in a grid of sub images. */ - Spriteset(const std::string& idPath, Image *img, int w, int h); + Spriteset(const std::string &idPath, Image *img, int w, int h); /** * Destructor. diff --git a/src/sound.cpp b/src/sound.cpp index 182be3d6..8ba8fe99 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -191,15 +191,15 @@ void Sound::fadeOutMusic(int ms) } } -void Sound::playSfx(const char *path) +void Sound::playSfx(const std::string &path) { - if (!mInstalled) return; + if (!mInstalled || path.length() == 0) return; ResourceManager *resman = ResourceManager::getInstance(); SoundEffect *sample = resman->getSoundEffect(path); if (sample) { + logger->log("Sound::playSfx() Playing: %s", path.c_str()); sample->play(0, 120); - logger->log("Sound::playSfx() Playing: %s", path); } } diff --git a/src/sound.h b/src/sound.h index 39901121..07db0587 100644 --- a/src/sound.h +++ b/src/sound.h @@ -26,6 +26,8 @@ #include +#include + /** Sound engine * * \ingroup CORE @@ -105,7 +107,7 @@ class Sound { * * \param path Full path to file */ - void playSfx(const char *path); + void playSfx(const std::string &path); private: bool mInstalled; diff --git a/src/sprite.h b/src/sprite.h index 282091cc..51811149 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -47,7 +47,7 @@ class Sprite * partly with the clipping rectangle support. */ virtual void - draw(Graphics *graphics, int offsetX, int offsetY) = 0; + draw(Graphics *graphics, int offsetX, int offsetY) const = 0; /** * Returns the pixel Y coordinate of the sprite. diff --git a/src/utils/wingettimeofday.h b/src/utils/wingettimeofday.h new file mode 100644 index 00000000..0f8b767a --- /dev/null +++ b/src/utils/wingettimeofday.h @@ -0,0 +1,111 @@ +/* + * The Mana World Server + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _TMWSERV_WINGETTIMEOFDAY_H_ +#define _TMWSERV_WINGETTIMEOFDAY_H_ + +#ifdef WIN32 + +#include + +/* + * the function gettimeofday() is available on UNIX but not on windows. + * this header defines a windows implementation as a + * GetSystemTimeAsFileTime() wrapper. + */ + +int gettimeofday(struct timeval* tv, void *tz) +/*--------------------------------------------------------------- + * Copyright (c) 1999,2000,2001,2002,2003 + * The Board of Trustees of the University of Illinois + * All Rights Reserved. + *--------------------------------------------------------------- + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software (Iperf) and associated + * documentation files (the "Software"), to deal in the Software + * without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit + * persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and + * the following disclaimers. + * + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimers in the documentation and/or other materials + * provided with the distribution. + * + * + * Neither the names of the University of Illinois, NCSA, + * nor the names of its contributors may be used to endorse + * or promote products derived from this Software without + * specific prior written permission. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * ________________________________________________________________ + * National Laboratory for Applied Network Research + * National Center for Supercomputing Applications + * University of Illinois at Urbana-Champaign + * http://www.ncsa.uiuc.edu + * ________________________________________________________________ + * + * gettimeofday.c + * by Mark Gates + * ------------------------------------------------------------------- + * A (hack) implementation of gettimeofday for Windows. + * Since I send sec/usec in UDP packets, this made the most sense. + * ------------------------------------------------------------------- */ +{ + FILETIME time; + double timed; + + GetSystemTimeAsFileTime( &time ); + + // Apparently Win32 has units of 1e-7 sec (tenths of microsecs) + // 4294967296 is 2^32, to shift high word over + // 11644473600 is the number of seconds between + // the Win32 epoch 1601-Jan-01 and the Unix epoch 1970-Jan-01 + // Tests found floating point to be 10x faster than 64bit int math. + + timed = ((time.dwHighDateTime * 4294967296e-7) - 11644473600.0) + + (time.dwLowDateTime * 1e-7); + + tv->tv_sec = (long) timed; + tv->tv_usec = (long) ((timed - tv->tv_sec) * 1e6); + + return 0; +} + + +#endif // WIN32 +#endif diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp new file mode 100644 index 00000000..7c917dc0 --- /dev/null +++ b/src/utils/xml.cpp @@ -0,0 +1,54 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#include "xml.h" + +namespace XML +{ + int + getProperty(xmlNodePtr node, const char* name, int def) + { + int &ret = def; + + xmlChar *prop = xmlGetProp(node, BAD_CAST name); + if (prop) { + ret = atoi((char*)prop); + xmlFree(prop); + } + + return ret; + } + + std::string + getProperty(xmlNodePtr node, const char *name, const std::string &def) + { + xmlChar *prop = xmlGetProp(node, BAD_CAST name); + if (prop) { + std::string val = (char*)prop; + xmlFree(prop); + return val; + } + + return def; + } +} diff --git a/src/utils/xml.h b/src/utils/xml.h new file mode 100644 index 00000000..54ed9951 --- /dev/null +++ b/src/utils/xml.h @@ -0,0 +1,46 @@ +/* + * The Mana World + * Copyright 2004 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id$ + */ + +#ifndef _TMW_XML_H +#define _TMW_XML_H + +#include + +#include + +namespace XML +{ + /** + * Gets an integer property from an xmlNodePtr. + */ + int + getProperty(xmlNodePtr node, const char *name, int def); + + /** + * Gets a string property from an xmlNodePtr. + */ + std::string + getProperty(xmlNodePtr node, const char *name, const std::string &def); +} + +#endif diff --git a/tmw.cbp b/tmw.cbp index b8931cf6..d36a8bd0 100644 --- a/tmw.cbp +++ b/tmw.cbp @@ -21,31 +21,35 @@ - - - - - - + + + + + - + - - - - - + + + + + + + + + + + + + + - + - + - + - + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From 430bbe292eb51b3f3bb7b356d8b218b28bed0ff4 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 23 Jul 2007 16:51:13 +0000 Subject: Converted NPC code to new server. --- ChangeLog | 5 +++++ src/beingmanager.cpp | 12 ------------ src/net/beinghandler.cpp | 13 ++++++++++++- src/net/gameserver/player.cpp | 17 ++++++++++++++++- src/net/gameserver/player.h | 4 +++- src/net/npchandler.cpp | 34 ++++++++++++++-------------------- src/net/protocol.h | 6 ++++++ src/npc.cpp | 24 ++++++------------------ src/npc.h | 2 +- 9 files changed, 63 insertions(+), 54 deletions(-) (limited to 'src/npc.h') diff --git a/ChangeLog b/ChangeLog index 25de29df..90c563d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ * src/main.cpp, src/game.cpp: Fixed segfault on exit when OpenGL configuration changed. + * src/beingmanager.cpp: Removed dead code. + * src/npc.cpp, src/npc.h, src/net/protocol.h, src/net/npchandler.cpp, + src/net/gameserver/player.cpp, src/net/gameserver/player.h: Converted + to new server. + * src/beinghandler.cpp: Added support for NPCs. 2007-07-22 Eugenio Favalli diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 14b4ea7e..a5be17d2 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -72,19 +72,7 @@ Being* BeingManager::createBeing(Uint16 id, Uint16 job) else being = new Being(id, job, mMap); - // Player or NPC - if (job < 200) - { - // XXX Convert for new server - /* - MessageOut outMsg(mNetwork); - outMsg.writeInt16(0x0094); - outMsg.writeInt32(id);//readLong(2)); - */ - } - mBeings.push_back(being); - return being; } diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 51609b1d..bce2c3b8 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -486,13 +486,24 @@ BeingHandler::handleBeingEnterMessage(MessageIn &msg) { int monsterId = msg.readShort(); Being *being; - being = beingManager->createBeing(id, 1002 + monsterId); + being = beingManager->createBeing(id, monsterId); being->setWalkSpeed(150); // TODO being->mX = px; being->mY = py; being->setDestination(px, py); being->setAction(action); } break; + + case OBJECT_NPC: + { + int npcId = msg.readShort(); + Being *being; + being = beingManager->createBeing(id, npcId); + being->mX = px; + being->mY = py; + being->setDestination(px, py); + being->setAction(action); + } break; } } diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp index 9af0c238..daf76c3e 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -67,7 +67,7 @@ void Net::GameServer::Player::equip(int slot) Net::GameServer::connection->send(msg); } -void Net::GameServer::Player::attack(unsigned char direction) +void Net::GameServer::Player::attack(int direction) { MessageOut msg(PGMSG_ATTACK); msg.writeByte(direction); @@ -80,3 +80,18 @@ void Net::GameServer::Player::changeAction(Being::Action action) msg.writeByte(action); Net::GameServer::connection->send(msg); } + +void Net::GameServer::Player::talkToNPC(int id, bool restart) +{ + MessageOut msg(restart ? PGMSG_NPC_TALK : PGMSG_NPC_TALK_NEXT); + msg.writeShort(id); + Net::GameServer::connection->send(msg); +} + +void Net::GameServer::Player::selectFromNPC(int id, int choice) +{ + MessageOut msg(PGMSG_NPC_SELECT); + msg.writeShort(id); + msg.writeByte(choice); + Net::GameServer::connection->send(msg); +} diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h index 7cc45486..cb6927ba 100644 --- a/src/net/gameserver/player.h +++ b/src/net/gameserver/player.h @@ -39,8 +39,10 @@ namespace Net void pickUp(int x, int y); void drop(int slot, int amount); void equip(int slot); - void attack(unsigned char direction); + void attack(int direction); void changeAction(Being::Action action); + void talkToNPC(int id, bool restart); + void selectFromNPC(int id, int choice); } } } diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 02204a84..888a3a29 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -38,10 +38,8 @@ extern NpcTextDialog *npcTextDialog; NPCHandler::NPCHandler() { static const Uint16 _messages[] = { - SMSG_NPC_CHOICE, - SMSG_NPC_MESSAGE, - SMSG_NPC_NEXT, - SMSG_NPC_CLOSE, + GPMSG_NPC_CHOICE, + GPMSG_NPC_MESSAGE, 0 }; handledMessages = _messages; @@ -49,30 +47,26 @@ NPCHandler::NPCHandler() void NPCHandler::handleMessage(MessageIn &msg) { - int id; + Being *being = beingManager->findBeing(msg.readShort()); + if (!being || being->getType() != Being::NPC) + { + return; + } + + current_npc = static_cast< NPC * >(being); + std::string text = msg.readString(msg.getUnreadLength()); switch (msg.getId()) { - case SMSG_NPC_CHOICE: - msg.readShort(); // length - id = msg.readLong(); - current_npc = dynamic_cast(beingManager->findBeing(id)); - npcListDialog->parseItems(msg.readString(msg.getLength() - 8)); + case GPMSG_NPC_CHOICE: + npcListDialog->parseItems(text); npcListDialog->setVisible(true); break; - case SMSG_NPC_MESSAGE: - msg.readShort(); // length - id = msg.readLong(); - current_npc = dynamic_cast(beingManager->findBeing(id)); - npcTextDialog->addText(msg.readString(msg.getLength() - 8)); + case GPMSG_NPC_MESSAGE: + npcTextDialog->addText(text); npcListDialog->setVisible(false); npcTextDialog->setVisible(true); break; - - case SMSG_NPC_NEXT: - case SMSG_NPC_CLOSE: - // Next/Close button in NPC dialog, currently unused - break; } } diff --git a/src/net/protocol.h b/src/net/protocol.h index f13b6a02..8fe7e1b6 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -165,6 +165,7 @@ enum { GPMSG_BEING_ENTER = 0x0200, // B type, W being id, B action, W*2 position // player: S name, B hair style, B hair color, B gender, B item bitmask, { W item id }* // monster: W type id + // npc: W type id GPMSG_BEING_LEAVE = 0x0201, // W being id GPMSG_ITEM_APPEAR = 0x0202, // W item id, W*2 position GPMSG_BEING_LOOKS_CHANGE = 0x0210, // W weapon, W hat, W top clothes, W bottom clothes @@ -177,6 +178,11 @@ enum { GPMSG_BEING_ATTACK = 0x0291, // W being id PGMSG_SAY = 0x02A0, // S text GPMSG_SAY = 0x02A1, // W being id, S text + GPMSG_NPC_CHOICE = 0x02B0, // W being id, B* text + GPMSG_NPC_MESSAGE = 0x02B1, // W being id, B* text + PGMSG_NPC_TALK = 0x02B2, // W being id + PGMSG_NPC_TALK_NEXT = 0x02B3, // W being id + PGMSG_NPC_SELECT = 0x02B4, // W being id, B choice PGMSG_USE_ITEM = 0x0300, // L item id GPMSG_USE_RESPONSE = 0x0301, // B error GPMSG_BEINGS_DAMAGE = 0x0310, // { W being id, W amount }* diff --git a/src/npc.cpp b/src/npc.cpp index 2d291104..f65c8d19 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -27,6 +27,8 @@ #include "graphics.h" #include "gui/gui.h" +#include "net/messageout.h" +#include "net/gameserver/player.h" NPC *current_npc = 0; @@ -57,34 +59,20 @@ NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) void NPC::talk() { - // XXX Convert for new server - /* - MessageOut outMsg(CMSG_NPC_TALK); - outMsg.writeLong(mId); - outMsg.writeByte(0); + Net::GameServer::Player::talkToNPC(mId, true); current_npc = this; - */ } void NPC::nextDialog() { - // XXX Convert for new server - /* - MessageOut outMsg(CMSG_NPC_NEXT_REQUEST); - outMsg.writeLong(mId); - */ + Net::GameServer::Player::talkToNPC(mId, false); } void -NPC::dialogChoice(char choice) +NPC::dialogChoice(int choice) { - // XXX Convert for new server - /* - MessageOut outMsg(CMSG_NPC_LIST_CHOICE); - outMsg.writeLong(mId); - outMsg.writeByte(choice); - */ + Net::GameServer::Player::selectFromNPC(mId, choice); } /* diff --git a/src/npc.h b/src/npc.h index cf5defbc..90570b36 100644 --- a/src/npc.h +++ b/src/npc.h @@ -41,7 +41,7 @@ class NPC : public Being void talk(); void nextDialog(); - void dialogChoice(char choice); + void dialogChoice(int choice); void buy(); void sell(); -- cgit v1.2.3-70-g09d2 From d0dfa3c6de533c015893965f439cf71d2dc064c9 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Sat, 15 Mar 2008 02:40:33 +0000 Subject: AAdded pathblocking rules to NPCs. --- ChangeLog | 1 + src/npc.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'src/npc.h') diff --git a/ChangeLog b/ChangeLog index 33ba3285..24c32e70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * src/map.cpp: Fixed a crash caused by the new blocking system. * data/new_1-1.tmx: Fixed warp to map 15 (patch by peavey). + * src/npc.hpp: Added pathblocking rules for NPCs. 2008-03-13 Philipp Sehmisch diff --git a/src/npc.h b/src/npc.h index 90570b36..17ebd537 100644 --- a/src/npc.h +++ b/src/npc.h @@ -45,6 +45,19 @@ class NPC : public Being void buy(); void sell(); + + /** + * Gets the way an NPC is blocked by other things on the map + */ + virtual unsigned char getWalkMask() const + { return 0x83; } // blocked like a monster by walls, monsters and characters ( bin 1000 0011) + + protected: + /** + * Gets the way a monster blocks pathfinding for other objects + */ + virtual Map::BlockType getBlockType() const + { return Map::BLOCKTYPE_CHARACTER; } //blocks like a player character }; extern NPC *current_npc; -- cgit v1.2.3-70-g09d2 From a1226761e08f33146e5e175c9d8786dbc56fde82 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 31 Mar 2008 23:18:19 +0000 Subject: Implemented NPC XML database which maps NPC IDs to one or more animation files and thus enables animated NPCs. --- src/main.cpp | 3 + src/npc.cpp | 23 ++++++-- src/npc.h | 2 +- src/resources/npcdb.h | 56 ++++++++++++++++++ src/resources/npcdp.cpp | 151 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 230 insertions(+), 5 deletions(-) create mode 100644 src/resources/npcdb.h create mode 100644 src/resources/npcdp.cpp (limited to 'src/npc.h') diff --git a/src/main.cpp b/src/main.cpp index eea47394..7d550571 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -89,6 +89,7 @@ #include "resources/image.h" #include "resources/itemdb.h" #include "resources/monsterdb.h" +#include "resources/npcdb.h" #include "resources/resourcemanager.h" #include "utils/dtor.h" @@ -367,6 +368,7 @@ void exit_engine() // Unload XML databases ItemDB::unload(); MonsterDB::unload(); + NPCDB::unload(); ResourceManager::deleteInstance(); } @@ -910,6 +912,7 @@ int main(int argc, char *argv[]) // Load XML databases ItemDB::load(); MonsterDB::load(); + NPCDB::load(); state = STATE_LOGIN; break; diff --git a/src/npc.cpp b/src/npc.cpp index 8e0b00a5..9336986d 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -29,14 +29,29 @@ #include "gui/gui.h" #include "net/messageout.h" #include "net/gameserver/player.h" +#include "resources/npcdb.h" NPC *current_npc = 0; -NPC::NPC(Uint16 id, Uint16 job, Map *map): - Being(id, job, map) +NPC::NPC(Uint16 id, int sprite, Map *map): + Being(id, sprite, map) { - mSprites[BASE_SPRITE] = AnimatedSprite::load("graphics/sprites/npc.xml", - job - 100); + NPCInfo info = NPCDB::get(sprite); + int c = BASE_SPRITE; + + for (NPCInfo::const_iterator i = info.begin(); + i != info.end(); + i++) + { + if (c == VECTOREND_SPRITE) break; + + std::string file = "graphics/sprites/" + (*i)->sprite; + int variant = (*i)->variant; + mSprites[c] = AnimatedSprite::load(file, variant); + c++; + } + + mName = "NPC"; } Being::Type diff --git a/src/npc.h b/src/npc.h index 17ebd537..561ad9f0 100644 --- a/src/npc.h +++ b/src/npc.h @@ -31,7 +31,7 @@ class Graphics; class NPC : public Being { public: - NPC(Uint16 id, Uint16 job, Map *map); + NPC(Uint16 id, int sprite, Map *map); virtual Type getType() const; diff --git a/src/resources/npcdb.h b/src/resources/npcdb.h new file mode 100644 index 00000000..30431e59 --- /dev/null +++ b/src/resources/npcdb.h @@ -0,0 +1,56 @@ +/* + * The Mana World + * Copyright 2008 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: monsterdb.h 3456 2007-08-13 21:09:12Z gmelquio $ + */ + +#ifndef _TMW_NPC_DB_H +#define _TMW_NPC_DB_H + +#include +#include +#include + +struct NPCsprite +{ + std::string sprite; + int variant; +}; + +typedef std::list NPCInfo; +typedef std::map NPCInfos; + +/** + * NPC information database. + */ +namespace NPCDB +{ + void + load(); + + void + unload(); + + const NPCInfo& get(int id); + + typedef NPCInfos::iterator NPCInfosIterator; +} + +#endif diff --git a/src/resources/npcdp.cpp b/src/resources/npcdp.cpp new file mode 100644 index 00000000..e60431c3 --- /dev/null +++ b/src/resources/npcdp.cpp @@ -0,0 +1,151 @@ +/* + * The Mana World + * Copyright 2008 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: monsterdb.cpp 3999 2008-03-23 01:27:13Z b_lindeijer $ + */ + +#include "npcdb.h" + +#include "resourcemanager.h" + +#include "../log.h" + +#include "../utils/dtor.h" +#include "../utils/xml.h" + +namespace +{ + NPCInfos mNPCInfos; + NPCInfo mUnknown; + bool mLoaded = false; +} + +void NPCDB::load() +{ + if (mLoaded) + return; + + NPCsprite *unknownSprite = new NPCsprite; + unknownSprite->sprite = "error.xml"; + unknownSprite->variant = 0; + mUnknown.push_back(unknownSprite); + + logger->log("Initializing NPC database..."); + + ResourceManager *resman = ResourceManager::getInstance(); + int size; + char *data = (char*)resman->loadFile("npcs.xml", size); + + if (!data) + { + logger->error("NPC Database: Could not find npcs.xml!"); + } + + xmlDocPtr doc = xmlParseMemory(data, size); + free(data); + + if (!doc) + { + logger->error("NPC Database: Error while parsing NPC database (npcs.xml)!"); + } + + xmlNodePtr rootNode = xmlDocGetRootElement(doc); + if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "npcs")) + { + logger->error("NPC Database: npcs.xml is not a valid database file!"); + } + + //iterate s + for_each_xml_child_node(npcNode, rootNode) + { + if (!xmlStrEqual(npcNode->name, BAD_CAST "npc")) + continue; + + int id = XML::getProperty(npcNode, "id", 0); + if (id == 0) + { + logger->log("NPC Database: NPC with missing ID in npcs.xml!"); + continue; + } + + NPCInfo *currentInfo = new NPCInfo; + + for_each_xml_child_node(spriteNode, npcNode) + { + if (!xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) + continue; + + NPCsprite *currentSprite = new NPCsprite; + currentSprite->sprite = (const char*)spriteNode->xmlChildrenNode->content; + currentSprite->variant = XML::getProperty(spriteNode, "variant", 0); + currentInfo->push_back(currentSprite); + } + + mNPCInfos[id] = currentInfo; + + } + + xmlFreeDoc(doc); + + mLoaded = true; +} + +void +NPCDB::unload() +{ + for ( NPCInfosIterator i = mNPCInfos.begin(); + i != mNPCInfos.end(); + i++) + { + while (!i->second->empty()) + { + delete i->second->front(); + i->second->pop_front(); + } + delete i->second; + } + + mNPCInfos.clear(); + + while (!mUnknown.empty()) + { + delete mUnknown.front(); + mUnknown.pop_front(); + } + + mLoaded = false; +} + +const NPCInfo& +NPCDB::get (int id) +{ + NPCInfosIterator i = mNPCInfos.find(id); + + if (i == mNPCInfos.end()) + { + logger->log("NPCDB: Warning, unknown NPC ID %d requested", id); + return mUnknown; + } + else + { + return *(i->second); + } +} + -- cgit v1.2.3-70-g09d2 From ff61662640c4053220464f34413568f06f51154a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 16 Nov 2008 15:37:13 +0100 Subject: Got rid of CVS/Subversion $Id$ markers I don't know why we dealt with these things for so long. Did we ever get anything out of it? --- src/animatedsprite.cpp | 2 -- src/animatedsprite.h | 2 -- src/animationparticle.cpp | 1 - src/animationparticle.h | 1 - src/being.cpp | 2 -- src/being.h | 2 -- src/beingmanager.cpp | 2 -- src/beingmanager.h | 2 -- src/channel.cpp | 2 -- src/channel.h | 2 -- src/channelmanager.cpp | 2 -- src/channelmanager.h | 2 -- src/commandhandler.cpp | 2 -- src/commandhandler.h | 2 -- src/configlistener.h | 2 -- src/configuration.cpp | 2 -- src/configuration.h | 2 -- src/effectmanager.cpp | 1 - src/effectmanager.h | 1 - src/engine.cpp | 2 -- src/engine.h | 2 -- src/equipment.cpp | 2 -- src/equipment.h | 2 -- src/floor_item.cpp | 2 -- src/floor_item.h | 2 -- src/flooritemmanager.cpp | 2 -- src/flooritemmanager.h | 2 -- src/game.cpp | 2 -- src/game.h | 2 -- src/graphics.cpp | 2 -- src/graphics.h | 2 -- src/gui/box.cpp | 2 -- src/gui/box.h | 2 -- src/gui/browserbox.cpp | 2 -- src/gui/browserbox.h | 2 -- src/gui/buddywindow.cpp | 2 -- src/gui/buddywindow.h | 2 -- src/gui/button.cpp | 2 -- src/gui/button.h | 2 -- src/gui/buy.cpp | 2 -- src/gui/buy.h | 2 -- src/gui/buysell.cpp | 2 -- src/gui/buysell.h | 2 -- src/gui/changeemaildialog.cpp | 2 -- src/gui/changeemaildialog.h | 2 -- src/gui/changepassworddialog.cpp | 2 -- src/gui/changepassworddialog.h | 2 -- src/gui/char_select.cpp | 2 -- src/gui/char_select.h | 2 -- src/gui/chargedialog.cpp | 1 - src/gui/chargedialog.h | 1 - src/gui/chat.cpp | 2 -- src/gui/chat.h | 2 -- src/gui/chatinput.cpp | 2 -- src/gui/chatinput.h | 2 -- src/gui/checkbox.cpp | 2 -- src/gui/checkbox.h | 2 -- src/gui/confirm_dialog.cpp | 2 -- src/gui/confirm_dialog.h | 2 -- src/gui/connection.cpp | 2 -- src/gui/connection.h | 2 -- src/gui/debugwindow.cpp | 2 -- src/gui/debugwindow.h | 2 -- src/gui/equipmentwindow.cpp | 2 -- src/gui/equipmentwindow.h | 2 -- src/gui/focushandler.cpp | 2 -- src/gui/focushandler.h | 2 -- src/gui/gccontainer.cpp | 2 -- src/gui/gccontainer.h | 2 -- src/gui/gui.cpp | 2 -- src/gui/gui.h | 2 -- src/gui/guildlistbox.cpp | 2 -- src/gui/guildlistbox.h | 2 -- src/gui/guildwindow.cpp | 1 - src/gui/guildwindow.h | 2 -- src/gui/hbox.cpp | 2 -- src/gui/hbox.h | 2 -- src/gui/help.cpp | 2 -- src/gui/help.h | 2 -- src/gui/icon.cpp | 2 -- src/gui/icon.h | 2 -- src/gui/inttextbox.cpp | 2 -- src/gui/inttextbox.h | 2 -- src/gui/inventorywindow.cpp | 2 -- src/gui/inventorywindow.h | 2 -- src/gui/item_amount.cpp | 2 -- src/gui/item_amount.h | 2 -- src/gui/itemcontainer.cpp | 2 -- src/gui/itemcontainer.h | 2 -- src/gui/itempopup.cpp | 2 -- src/gui/itempopup.h | 3 --- src/gui/itemshortcutcontainer.cpp | 2 -- src/gui/itemshortcutcontainer.h | 2 -- src/gui/itemshortcutwindow.cpp | 2 -- src/gui/itemshortcutwindow.h | 2 -- src/gui/linkhandler.h | 2 -- src/gui/listbox.cpp | 2 -- src/gui/listbox.h | 2 -- src/gui/login.cpp | 2 -- src/gui/login.h | 2 -- src/gui/magic.cpp | 2 -- src/gui/magic.h | 3 --- src/gui/menuwindow.cpp | 2 -- src/gui/menuwindow.h | 2 -- src/gui/minimap.cpp | 2 -- src/gui/minimap.h | 2 -- src/gui/ministatus.cpp | 2 -- src/gui/ministatus.h | 2 -- src/gui/newskill.cpp | 2 -- src/gui/newskill.h | 2 -- src/gui/npc_text.cpp | 2 -- src/gui/npc_text.h | 2 -- src/gui/npclistdialog.cpp | 2 -- src/gui/npclistdialog.h | 2 -- src/gui/npcpostdialog.cpp | 2 -- src/gui/npcpostdialog.h | 2 -- src/gui/ok_dialog.cpp | 2 -- src/gui/ok_dialog.h | 2 -- src/gui/partywindow.cpp | 2 -- src/gui/partywindow.h | 2 -- src/gui/passwordfield.cpp | 2 -- src/gui/passwordfield.h | 2 -- src/gui/playerbox.cpp | 2 -- src/gui/playerbox.h | 2 -- src/gui/popupmenu.cpp | 2 -- src/gui/popupmenu.h | 2 -- src/gui/progressbar.cpp | 2 -- src/gui/progressbar.h | 2 -- src/gui/quitdialog.cpp | 1 - src/gui/quitdialog.h | 1 - src/gui/radiobutton.cpp | 2 -- src/gui/radiobutton.h | 2 -- src/gui/register.cpp | 2 -- src/gui/register.h | 2 -- src/gui/scrollarea.cpp | 2 -- src/gui/scrollarea.h | 2 -- src/gui/sdlinput.cpp | 2 -- src/gui/sdlinput.h | 2 -- src/gui/sell.cpp | 2 -- src/gui/sell.h | 2 -- src/gui/serverdialog.cpp | 2 -- src/gui/serverdialog.h | 2 -- src/gui/setup.cpp | 2 -- src/gui/setup.h | 2 -- src/gui/setup_audio.cpp | 2 -- src/gui/setup_audio.h | 2 -- src/gui/setup_joystick.cpp | 2 -- src/gui/setup_joystick.h | 2 -- src/gui/setup_keyboard.cpp | 2 -- src/gui/setup_keyboard.h | 2 -- src/gui/setup_video.cpp | 2 -- src/gui/setup_video.h | 2 -- src/gui/setuptab.h | 2 -- src/gui/shop.cpp | 2 -- src/gui/shop.h | 2 -- src/gui/shoplistbox.cpp | 2 -- src/gui/shoplistbox.h | 2 -- src/gui/skill.cpp | 2 -- src/gui/skill.h | 2 -- src/gui/slider.cpp | 2 -- src/gui/slider.h | 2 -- src/gui/speechbubble.cpp | 2 -- src/gui/speechbubble.h | 2 -- src/gui/status.cpp | 2 -- src/gui/status.h | 2 -- src/gui/textbox.cpp | 2 -- src/gui/textbox.h | 2 -- src/gui/textdialog.cpp | 2 -- src/gui/textdialog.h | 2 -- src/gui/textfield.cpp | 2 -- src/gui/textfield.h | 2 -- src/gui/trade.cpp | 2 -- src/gui/trade.h | 2 -- src/gui/truetypefont.cpp | 2 -- src/gui/truetypefont.h | 2 -- src/gui/unregisterdialog.cpp | 2 -- src/gui/unregisterdialog.h | 2 -- src/gui/updatewindow.cpp | 2 -- src/gui/updatewindow.h | 2 -- src/gui/vbox.cpp | 2 -- src/gui/vbox.h | 2 -- src/gui/viewport.cpp | 2 -- src/gui/viewport.h | 2 -- src/gui/widgets/avatar.cpp | 2 -- src/gui/widgets/avatar.h | 2 -- src/gui/widgets/dropdown.cpp | 2 -- src/gui/widgets/dropdown.h | 2 -- src/gui/widgets/layout.cpp | 2 -- src/gui/widgets/layout.h | 2 -- src/gui/widgets/resizegrip.cpp | 2 -- src/gui/widgets/resizegrip.h | 2 -- src/gui/widgets/tab.cpp | 2 -- src/gui/widgets/tab.h | 2 -- src/gui/widgets/tabbedarea.cpp | 2 -- src/gui/widgets/tabbedarea.h | 2 -- src/gui/window.cpp | 2 -- src/gui/window.h | 2 -- src/gui/windowcontainer.cpp | 2 -- src/gui/windowcontainer.h | 2 -- src/guichanfwd.h | 2 -- src/guild.cpp | 2 -- src/guild.h | 2 -- src/imageparticle.cpp | 2 -- src/imageparticle.h | 2 -- src/inventory.cpp | 2 -- src/inventory.h | 2 -- src/item.cpp | 2 -- src/item.h | 2 -- src/itemshortcut.cpp | 2 -- src/itemshortcut.h | 2 -- src/joystick.cpp | 2 -- src/joystick.h | 2 -- src/keyboardconfig.cpp | 2 -- src/keyboardconfig.h | 2 -- src/localplayer.cpp | 2 -- src/localplayer.h | 2 -- src/lockedarray.h | 2 -- src/logindata.h | 2 -- src/main.cpp | 2 -- src/main.h | 2 -- src/map.cpp | 2 -- src/map.h | 2 -- src/monster.cpp | 2 -- src/monster.h | 2 -- src/net/accountserver/account.cpp | 2 -- src/net/accountserver/account.h | 2 -- src/net/accountserver/accountserver.cpp | 2 -- src/net/accountserver/accountserver.h | 2 -- src/net/accountserver/internal.cpp | 2 -- src/net/accountserver/internal.h | 2 -- src/net/beinghandler.cpp | 2 -- src/net/beinghandler.h | 2 -- src/net/buysellhandler.cpp | 2 -- src/net/buysellhandler.h | 2 -- src/net/charserverhandler.cpp | 2 -- src/net/charserverhandler.h | 2 -- src/net/chathandler.cpp | 2 -- src/net/chathandler.h | 2 -- src/net/chatserver/chatserver.cpp | 2 -- src/net/chatserver/chatserver.h | 2 -- src/net/chatserver/guild.cpp | 2 -- src/net/chatserver/guild.h | 2 -- src/net/chatserver/internal.cpp | 2 -- src/net/chatserver/internal.h | 2 -- src/net/chatserver/party.cpp | 2 -- src/net/chatserver/party.h | 2 -- src/net/connection.cpp | 2 -- src/net/connection.h | 2 -- src/net/effecthandler.cpp | 1 - src/net/effecthandler.h | 1 - src/net/gameserver/gameserver.cpp | 2 -- src/net/gameserver/gameserver.h | 2 -- src/net/gameserver/internal.cpp | 2 -- src/net/gameserver/internal.h | 2 -- src/net/gameserver/player.cpp | 2 -- src/net/gameserver/player.h | 2 -- src/net/guildhandler.cpp | 2 -- src/net/guildhandler.h | 2 -- src/net/internal.cpp | 2 -- src/net/internal.h | 2 -- src/net/inventoryhandler.cpp | 2 -- src/net/inventoryhandler.h | 2 -- src/net/itemhandler.cpp | 2 -- src/net/itemhandler.h | 2 -- src/net/loginhandler.cpp | 2 -- src/net/loginhandler.h | 2 -- src/net/logouthandler.cpp | 2 -- src/net/logouthandler.h | 2 -- src/net/messagehandler.cpp | 2 -- src/net/messagehandler.h | 2 -- src/net/messagein.cpp | 2 -- src/net/messagein.h | 2 -- src/net/messageout.cpp | 2 -- src/net/messageout.h | 2 -- src/net/network.cpp | 2 -- src/net/network.h | 2 -- src/net/npchandler.cpp | 2 -- src/net/npchandler.h | 2 -- src/net/partyhandler.cpp | 2 -- src/net/partyhandler.h | 2 -- src/net/playerhandler.cpp | 2 -- src/net/playerhandler.h | 2 -- src/net/protocol.h | 2 -- src/net/tradehandler.cpp | 2 -- src/net/tradehandler.h | 2 -- src/npc.cpp | 2 -- src/npc.h | 2 -- src/openglgraphics.cpp | 2 -- src/openglgraphics.h | 2 -- src/particle.cpp | 2 -- src/particle.h | 2 -- src/particleemitter.cpp | 2 -- src/particleemitter.h | 2 -- src/player.cpp | 2 -- src/player.h | 2 -- src/position.cpp | 2 -- src/position.h | 2 -- src/properties.h | 2 -- src/resources/action.cpp | 2 -- src/resources/action.h | 2 -- src/resources/ambientoverlay.cpp | 2 -- src/resources/ambientoverlay.h | 2 -- src/resources/animation.cpp | 2 -- src/resources/animation.h | 2 -- src/resources/buddylist.cpp | 2 -- src/resources/buddylist.h | 2 -- src/resources/dye.cpp | 2 -- src/resources/dye.h | 2 -- src/resources/image.cpp | 2 -- src/resources/image.h | 2 -- src/resources/imageloader.cpp | 2 -- src/resources/imageloader.h | 2 -- src/resources/imageset.cpp | 2 -- src/resources/imageset.h | 2 -- src/resources/imagewriter.cpp | 2 -- src/resources/imagewriter.h | 2 -- src/resources/itemdb.cpp | 2 -- src/resources/itemdb.h | 2 -- src/resources/iteminfo.cpp | 2 -- src/resources/iteminfo.h | 2 -- src/resources/mapreader.cpp | 2 -- src/resources/mapreader.h | 2 -- src/resources/monsterdb.cpp | 2 -- src/resources/monsterdb.h | 2 -- src/resources/monsterinfo.cpp | 2 -- src/resources/monsterinfo.h | 2 -- src/resources/music.cpp | 2 -- src/resources/music.h | 2 -- src/resources/npcdb.cpp | 2 -- src/resources/npcdb.h | 2 -- src/resources/resource.cpp | 2 -- src/resources/resource.h | 2 -- src/resources/resourcemanager.cpp | 2 -- src/resources/resourcemanager.h | 2 -- src/resources/soundeffect.cpp | 2 -- src/resources/soundeffect.h | 2 -- src/resources/spritedef.cpp | 2 -- src/resources/spritedef.h | 2 -- src/serverinfo.h | 2 -- src/shopitem.cpp | 2 -- src/shopitem.h | 2 -- src/simpleanimation.cpp | 2 -- src/simpleanimation.h | 2 -- src/sound.cpp | 2 -- src/sound.h | 2 -- src/sprite.h | 2 -- src/textparticle.cpp | 2 -- src/textparticle.h | 2 -- src/tileset.h | 2 -- src/utils/base64.cpp | 1 - src/utils/base64.h | 1 - src/utils/dtor.h | 2 -- src/utils/fastsqrt.h | 2 -- src/utils/gettext.h | 2 -- src/utils/minmax.h | 2 -- src/utils/sha256.cpp | 2 -- src/utils/sha256.h | 2 -- src/utils/strprintf.cpp | 2 -- src/utils/strprintf.h | 2 -- src/utils/tostring.h | 2 -- src/utils/trim.h | 2 -- src/utils/xml.cpp | 2 -- src/utils/xml.h | 2 -- src/vector.cpp | 2 -- src/vector.h | 2 -- tools/dyecmd/src/dye.cpp | 2 -- tools/dyecmd/src/dye.h | 2 -- tools/dyecmd/src/dyecmd.cpp | 2 -- tools/dyecmd/src/imagewriter.cpp | 2 -- tools/dyecmd/src/imagewriter.h | 2 -- tools/tmxcopy/base64.cpp | 1 - tools/tmxcopy/base64.h | 1 - tools/tmxcopy/tostring.h | 2 -- tools/tmxcopy/xmlutils.cpp | 1 - tools/tmxcopy/xmlutils.h | 1 - 375 files changed, 735 deletions(-) (limited to 'src/npc.h') diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 13596a70..b2bb1f28 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "animatedsprite.h" diff --git a/src/animatedsprite.h b/src/animatedsprite.h index a1fbe7a0..405bf42e 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ANIMATEDSPRITE_H diff --git a/src/animationparticle.cpp b/src/animationparticle.cpp index c79a5bc4..eb260157 100644 --- a/src/animationparticle.cpp +++ b/src/animationparticle.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "animationparticle.h" diff --git a/src/animationparticle.h b/src/animationparticle.h index 054b1b73..eabc2742 100644 --- a/src/animationparticle.h +++ b/src/animationparticle.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _ANIMATION_PARTICLE diff --git a/src/being.cpp b/src/being.cpp index bac66d48..a267d033 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "being.h" diff --git a/src/being.h b/src/being.h index a0475910..bf11e3ed 100644 --- a/src/being.h +++ b/src/being.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BEING_H diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 40f438df..6d9267d2 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/beingmanager.h b/src/beingmanager.h index f7a3b8f0..d3fb9888 100644 --- a/src/beingmanager.h +++ b/src/beingmanager.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BEINGMANAGER_H diff --git a/src/channel.cpp b/src/channel.cpp index 969386f1..c62d6590 100644 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/channel.h b/src/channel.h index 3cb38a1c..01bd2728 100644 --- a/src/channel.h +++ b/src/channel.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/channelmanager.cpp b/src/channelmanager.cpp index 3c66f4bb..a332edbb 100644 --- a/src/channelmanager.cpp +++ b/src/channelmanager.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/channelmanager.h b/src/channelmanager.h index 5e6b5ba1..c19c548a 100644 --- a/src/channelmanager.h +++ b/src/channelmanager.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CHANNELMANAGER_H diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 5c7b5e52..4b1a0225 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/commandhandler.h b/src/commandhandler.h index 10a4376f..eab0f077 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_COMMANDHANDLER_H diff --git a/src/configlistener.h b/src/configlistener.h index 7ce5d949..b740720f 100644 --- a/src/configlistener.h +++ b/src/configlistener.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CONFIGLISTENER_H diff --git a/src/configuration.cpp b/src/configuration.cpp index 864ad7c3..e801083f 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/configuration.h b/src/configuration.h index 28246a02..a2d3b55d 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CONFIGURATION_H diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index 87d98834..52f1eb31 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "effectmanager.h" diff --git a/src/effectmanager.h b/src/effectmanager.h index b5451f27..1ae82caf 100644 --- a/src/effectmanager.h +++ b/src/effectmanager.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _EFFECT_MANAGER_H diff --git a/src/engine.cpp b/src/engine.cpp index e4b25c02..ba5ce5e3 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "engine.h" diff --git a/src/engine.h b/src/engine.h index 0e77bf3d..dbee1258 100644 --- a/src/engine.h +++ b/src/engine.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _ENGINE_H diff --git a/src/equipment.cpp b/src/equipment.cpp index 265f230a..aa56b791 100644 --- a/src/equipment.cpp +++ b/src/equipment.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/equipment.h b/src/equipment.h index 7a0c8238..736074dd 100644 --- a/src/equipment.h +++ b/src/equipment.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_EQUIPMENT_H_ diff --git a/src/floor_item.cpp b/src/floor_item.cpp index 9727093f..7ad3c0c0 100644 --- a/src/floor_item.cpp +++ b/src/floor_item.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "floor_item.h" diff --git a/src/floor_item.h b/src/floor_item.h index a87e3f79..b747310b 100644 --- a/src/floor_item.h +++ b/src/floor_item.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_FLOORITEM_H_ diff --git a/src/flooritemmanager.cpp b/src/flooritemmanager.cpp index c28755fb..68c84b5b 100644 --- a/src/flooritemmanager.cpp +++ b/src/flooritemmanager.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "flooritemmanager.h" diff --git a/src/flooritemmanager.h b/src/flooritemmanager.h index c12883a4..3dbaf988 100644 --- a/src/flooritemmanager.h +++ b/src/flooritemmanager.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_FLOORITEMMANAGER_H diff --git a/src/game.cpp b/src/game.cpp index 421c8aac..df6d5578 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "game.h" diff --git a/src/game.h b/src/game.h index 56923bd0..4035584b 100644 --- a/src/game.h +++ b/src/game.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GAME_ diff --git a/src/graphics.cpp b/src/graphics.cpp index 586f9f49..6920bcb0 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/graphics.h b/src/graphics.h index 564826a2..efdd1ac1 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _GRAPHICS_H diff --git a/src/gui/box.cpp b/src/gui/box.cpp index 6af3ae3e..59d8c135 100644 --- a/src/gui/box.cpp +++ b/src/gui/box.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "box.h" diff --git a/src/gui/box.h b/src/gui/box.h index ed1a7163..46654b48 100644 --- a/src/gui/box.h +++ b/src/gui/box.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index 53a2ac0f..b0b6f48e 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/browserbox.h b/src/gui/browserbox.h index 0a9032e4..465ff497 100644 --- a/src/gui/browserbox.h +++ b/src/gui/browserbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef __TMW_BROWSERBOX_H__ diff --git a/src/gui/buddywindow.cpp b/src/gui/buddywindow.cpp index 0ed383ce..14a941a5 100644 --- a/src/gui/buddywindow.cpp +++ b/src/gui/buddywindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "buddywindow.h" diff --git a/src/gui/buddywindow.h b/src/gui/buddywindow.h index a3ca4de2..6b07f470 100644 --- a/src/gui/buddywindow.h +++ b/src/gui/buddywindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BUDDYWINDOW_H diff --git a/src/gui/button.cpp b/src/gui/button.cpp index c6bc4ccb..40ecd1b7 100644 --- a/src/gui/button.cpp +++ b/src/gui/button.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/button.h b/src/gui/button.h index d12173b2..f451416c 100644 --- a/src/gui/button.h +++ b/src/gui/button.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BUTTON_H diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 49d19675..a948b136 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "buy.h" diff --git a/src/gui/buy.h b/src/gui/buy.h index ec7419be..24f18742 100644 --- a/src/gui/buy.h +++ b/src/gui/buy.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BUY_H diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index ae5c7358..42380882 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "buysell.h" diff --git a/src/gui/buysell.h b/src/gui/buysell.h index 97caf34b..2391ed1c 100644 --- a/src/gui/buysell.h +++ b/src/gui/buysell.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BUYSELL_H diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp index 94253d31..c9bc2570 100644 --- a/src/gui/changeemaildialog.cpp +++ b/src/gui/changeemaildialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "changeemaildialog.h" diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h index 862c9d10..8ec3705d 100644 --- a/src/gui/changeemaildialog.h +++ b/src/gui/changeemaildialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_CHANGEEMAIL_H diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp index e3bb0511..8d667790 100644 --- a/src/gui/changepassworddialog.cpp +++ b/src/gui/changepassworddialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "changepassworddialog.h" diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h index 450cce61..0cf744da 100644 --- a/src/gui/changepassworddialog.h +++ b/src/gui/changepassworddialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CHANGEPASSWORDDIALOG_H diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index c011aa84..3adfbc08 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "char_select.h" diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 0c1dbe45..ed03cedd 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _CHAR_SELECT_H diff --git a/src/gui/chargedialog.cpp b/src/gui/chargedialog.cpp index 862378ae..1c9edf45 100644 --- a/src/gui/chargedialog.cpp +++ b/src/gui/chargedialog.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* The window supported by this class shows player stats and keeps a charging diff --git a/src/gui/chargedialog.h b/src/gui/chargedialog.h index c09c692c..9517ef6a 100644 --- a/src/gui/chargedialog.h +++ b/src/gui/chargedialog.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _TMW_CHARGE_H diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 82e7d372..c94429c8 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/chat.h b/src/gui/chat.h index f7af6480..a41b11fb 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CHAT_H diff --git a/src/gui/chatinput.cpp b/src/gui/chatinput.cpp index fc5d6aab..afe7f037 100644 --- a/src/gui/chatinput.cpp +++ b/src/gui/chatinput.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "chatinput.h" diff --git a/src/gui/chatinput.h b/src/gui/chatinput.h index da2342ae..e04dfa6e 100644 --- a/src/gui/chatinput.h +++ b/src/gui/chatinput.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CHATINPUT_H diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp index 5b300d33..20e24dee 100644 --- a/src/gui/checkbox.cpp +++ b/src/gui/checkbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "checkbox.h" diff --git a/src/gui/checkbox.h b/src/gui/checkbox.h index 262e63ae..839ca97e 100644 --- a/src/gui/checkbox.h +++ b/src/gui/checkbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CHECKBOX_H diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp index 65ca27f7..5f2b9cb2 100644 --- a/src/gui/confirm_dialog.cpp +++ b/src/gui/confirm_dialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "confirm_dialog.h" diff --git a/src/gui/confirm_dialog.h b/src/gui/confirm_dialog.h index 8728f83f..c9bfca02 100644 --- a/src/gui/confirm_dialog.h +++ b/src/gui/confirm_dialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_OPTION_DIALOG_H diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp index a9fa2a56..f54c9dd5 100644 --- a/src/gui/connection.cpp +++ b/src/gui/connection.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "connection.h" diff --git a/src/gui/connection.h b/src/gui/connection.h index 51ad5467..36ccd8a9 100644 --- a/src/gui/connection.h +++ b/src/gui/connection.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_CONNECTION_H diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 3d0690b9..d92c3575 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "debugwindow.h" diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 9b6f2017..ae1d8b14 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_DEBUGWINDOW_H diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 9a96b4d6..aee262d0 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #define BOX_WIDTH 36 diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index 696f4fc6..b6d2e2f4 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_EQUIPMENT_H diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp index ffdb7896..1bda568e 100644 --- a/src/gui/focushandler.cpp +++ b/src/gui/focushandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "focushandler.h" diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h index 252fdd9d..a5218485 100644 --- a/src/gui/focushandler.h +++ b/src/gui/focushandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_FOCUSHANDLER_H diff --git a/src/gui/gccontainer.cpp b/src/gui/gccontainer.cpp index 1edb4daf..ec3c8a5c 100644 --- a/src/gui/gccontainer.cpp +++ b/src/gui/gccontainer.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "gccontainer.h" diff --git a/src/gui/gccontainer.h b/src/gui/gccontainer.h index 8b8a7ffe..cc7c9336 100644 --- a/src/gui/gccontainer.h +++ b/src/gui/gccontainer.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_GCCONTAINER_H diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index bc2f017b..6803be65 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "gui.h" diff --git a/src/gui/gui.h b/src/gui/gui.h index 84f52a31..a07d236f 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI diff --git a/src/gui/guildlistbox.cpp b/src/gui/guildlistbox.cpp index 5fe62fe5..556df3fe 100644 --- a/src/gui/guildlistbox.cpp +++ b/src/gui/guildlistbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id $ */ #include "guildlistbox.h" diff --git a/src/gui/guildlistbox.h b/src/gui/guildlistbox.h index b3892955..cc8e3ce7 100644 --- a/src/gui/guildlistbox.h +++ b/src/gui/guildlistbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id $ */ #ifndef _TMW_GUI_GUILDLISTBOX_H diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp index 3319489c..ae9684df 100644 --- a/src/gui/guildwindow.cpp +++ b/src/gui/guildwindow.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * $$ */ diff --git a/src/gui/guildwindow.h b/src/gui/guildwindow.h index e1bd99d7..4f6b9cbb 100644 --- a/src/gui/guildwindow.h +++ b/src/gui/guildwindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_GUILDWINDOW_H diff --git a/src/gui/hbox.cpp b/src/gui/hbox.cpp index 69564fbb..020e85c6 100644 --- a/src/gui/hbox.cpp +++ b/src/gui/hbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "hbox.h" diff --git a/src/gui/hbox.h b/src/gui/hbox.h index 560b1a29..4b241383 100644 --- a/src/gui/hbox.h +++ b/src/gui/hbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef HBOX_H diff --git a/src/gui/help.cpp b/src/gui/help.cpp index 87de1e2f..ffe9c02d 100644 --- a/src/gui/help.cpp +++ b/src/gui/help.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "help.h" diff --git a/src/gui/help.h b/src/gui/help.h index 3c3715a0..053df723 100644 --- a/src/gui/help.h +++ b/src/gui/help.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_HELP_H diff --git a/src/gui/icon.cpp b/src/gui/icon.cpp index 58b3ae8a..1e352292 100644 --- a/src/gui/icon.cpp +++ b/src/gui/icon.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "icon.h" diff --git a/src/gui/icon.h b/src/gui/icon.h index f0d3a70a..9baf1a99 100644 --- a/src/gui/icon.h +++ b/src/gui/icon.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/gui/inttextbox.cpp b/src/gui/inttextbox.cpp index 17e87afd..644601cf 100644 --- a/src/gui/inttextbox.cpp +++ b/src/gui/inttextbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "inttextbox.h" diff --git a/src/gui/inttextbox.h b/src/gui/inttextbox.h index 219c6018..8dad0c39 100644 --- a/src/gui/inttextbox.h +++ b/src/gui/inttextbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef INTTEXTBOX_H diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 2127442a..82b36aef 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "inventorywindow.h" diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index f9ff8ea2..a7130b65 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_INVENTORYWINDOW_H diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp index 6f1c8ae6..c6763014 100644 --- a/src/gui/item_amount.cpp +++ b/src/gui/item_amount.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "item_amount.h" diff --git a/src/gui/item_amount.h b/src/gui/item_amount.h index 03303603..dd1026b7 100644 --- a/src/gui/item_amount.h +++ b/src/gui/item_amount.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEM_AMOUNT_WINDOW_H diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 4c528a16..5fb99ffc 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itemcontainer.h" diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h index 9ae5c9c2..8d93671c 100644 --- a/src/gui/itemcontainer.h +++ b/src/gui/itemcontainer.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEMCONTAINER_H__ diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index cf719f9f..02d35570 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -18,8 +18,6 @@ * You should have received a copy of the GNU General Public License * along with The Legend of Mazzeroth; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itempopup.h" diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h index 499b2e0a..cb55296c 100644 --- a/src/gui/itempopup.h +++ b/src/gui/itempopup.h @@ -1,5 +1,4 @@ /* -* * The Legend of Mazzeroth * Copyright (C) 2008, The Legend of Mazzeroth Development Team * @@ -19,8 +18,6 @@ * You should have received a copy of the GNU General Public License * along with The Legend of Mazzeroth; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _LOM_ITEMPOPUP_H__ diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index 23b41650..76104e12 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itemshortcutcontainer.h" diff --git a/src/gui/itemshortcutcontainer.h b/src/gui/itemshortcutcontainer.h index 58f0aea7..76ca870c 100644 --- a/src/gui/itemshortcutcontainer.h +++ b/src/gui/itemshortcutcontainer.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEMSHORTCUTCONTAINER_H__ diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp index fb75e20d..e4d352fe 100644 --- a/src/gui/itemshortcutwindow.cpp +++ b/src/gui/itemshortcutwindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itemshortcutwindow.h" diff --git a/src/gui/itemshortcutwindow.h b/src/gui/itemshortcutwindow.h index 9742abdc..017df5ec 100644 --- a/src/gui/itemshortcutwindow.h +++ b/src/gui/itemshortcutwindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEMSHORTCUTWINDOW_H diff --git a/src/gui/linkhandler.h b/src/gui/linkhandler.h index 3a32f825..44f906db 100644 --- a/src/gui/linkhandler.h +++ b/src/gui/linkhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LINK_HANDLER_H_ diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp index ac18c2cd..204d7961 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "listbox.h" diff --git a/src/gui/listbox.h b/src/gui/listbox.h index 03a8b541..d42c7d3e 100644 --- a/src/gui/listbox.h +++ b/src/gui/listbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LISTBOX_H diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 72d7ee51..24c55e37 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "login.h" diff --git a/src/gui/login.h b/src/gui/login.h index d8ae7eaf..1c23a0f5 100644 --- a/src/gui/login.h +++ b/src/gui/login.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LOGIN_H diff --git a/src/gui/magic.cpp b/src/gui/magic.cpp index 28e7de92..a31b661a 100644 --- a/src/gui/magic.cpp +++ b/src/gui/magic.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: skill.cpp 4569 2008-09-04 20:09:57Z b_lindeijer $ */ #include diff --git a/src/gui/magic.h b/src/gui/magic.h index a8082755..af46c823 100644 --- a/src/gui/magic.h +++ b/src/gui/magic.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: skill.h 4476 2008-08-18 01:23:58Z rhoderyc $ */ #ifndef _TMW_MAGIC_H @@ -32,7 +30,6 @@ #include "../guichanfwd.h" - /** * The skill dialog. * diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index c3e572a7..dbbb08d2 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "menuwindow.h" diff --git a/src/gui/menuwindow.h b/src/gui/menuwindow.h index f43b9921..03ec3380 100644 --- a/src/gui/menuwindow.h +++ b/src/gui/menuwindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MENU_H diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 5f768609..501530f1 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "minimap.h" diff --git a/src/gui/minimap.h b/src/gui/minimap.h index 5e9458bf..f91dc22d 100644 --- a/src/gui/minimap.h +++ b/src/gui/minimap.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MINIMAP_H diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 3742be64..424c3558 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "ministatus.h" diff --git a/src/gui/ministatus.h b/src/gui/ministatus.h index 1192bc1e..f512ef25 100644 --- a/src/gui/ministatus.h +++ b/src/gui/ministatus.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MINISTATUS_H diff --git a/src/gui/newskill.cpp b/src/gui/newskill.cpp index 6783a546..20fc01bd 100644 --- a/src/gui/newskill.cpp +++ b/src/gui/newskill.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ /* This file implements the new skill dialog for use under the latest diff --git a/src/gui/newskill.h b/src/gui/newskill.h index 6e12169f..49476e5e 100644 --- a/src/gui/newskill.h +++ b/src/gui/newskill.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NSKILL_H diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index fd02a14a..c593feb1 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npc_text.h" diff --git a/src/gui/npc_text.h b/src/gui/npc_text.h index 0ef1b938..2c9771d3 100644 --- a/src/gui/npc_text.h +++ b/src/gui/npc_text.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NPC_TEXT_H diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp index ff017a0e..918031b4 100644 --- a/src/gui/npclistdialog.cpp +++ b/src/gui/npclistdialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npclistdialog.h" diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h index 02b9cd49..e21f9e8c 100644 --- a/src/gui/npclistdialog.h +++ b/src/gui/npclistdialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_NPCLISTDIALOG_H diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index 2d3fce64..3a72b21b 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npcpostdialog.h" diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h index e142dac5..1956c877 100644 --- a/src/gui/npcpostdialog.h +++ b/src/gui/npcpostdialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_NPCPOSTDIALOG_H diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index 37d66353..b03c3964 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "ok_dialog.h" diff --git a/src/gui/ok_dialog.h b/src/gui/ok_dialog.h index a7b24a90..cba12d72 100644 --- a/src/gui/ok_dialog.h +++ b/src/gui/ok_dialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _OK_DIALOG_H diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 1b963dae..262e3b2e 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: box.cpp 1456 2005-07-15 23:17:00Z b_lindeijer $ */ #include "partywindow.h" diff --git a/src/gui/partywindow.h b/src/gui/partywindow.h index f09eeb6a..e79bf392 100644 --- a/src/gui/partywindow.h +++ b/src/gui/partywindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: box.cpp 1456 2005-07-15 23:17:00Z b_lindeijer $ */ #ifndef _TMW_PARTYWINDOW_H diff --git a/src/gui/passwordfield.cpp b/src/gui/passwordfield.cpp index 533f54fb..01c7e15d 100644 --- a/src/gui/passwordfield.cpp +++ b/src/gui/passwordfield.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "passwordfield.h" diff --git a/src/gui/passwordfield.h b/src/gui/passwordfield.h index cae1f92e..8a14b72a 100644 --- a/src/gui/passwordfield.h +++ b/src/gui/passwordfield.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_PASSWORDFIELD_H_ diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp index e9237110..0a0c8a17 100644 --- a/src/gui/playerbox.cpp +++ b/src/gui/playerbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/playerbox.h b/src/gui/playerbox.h index c226e750..78eeee91 100644 --- a/src/gui/playerbox.h +++ b/src/gui/playerbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef __TMW_PLAYERBOX_H__ diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 2888382b..59ca0867 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "popupmenu.h" diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h index 9fe9f866..2d10e6eb 100644 --- a/src/gui/popupmenu.h +++ b/src/gui/popupmenu.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_POPUP_MENU_H diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 90a85478..9a47eefc 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "progressbar.h" diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h index ddabbb77..0b1616f5 100644 --- a/src/gui/progressbar.h +++ b/src/gui/progressbar.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_PROGRESSBAR_H diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 7ed4f913..563ed34a 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "quitdialog.h" diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index 97a03f2e..018f1e52 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _TMW_QUITDIALOG_H diff --git a/src/gui/radiobutton.cpp b/src/gui/radiobutton.cpp index 57d6772d..619ec84f 100644 --- a/src/gui/radiobutton.cpp +++ b/src/gui/radiobutton.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "radiobutton.h" diff --git a/src/gui/radiobutton.h b/src/gui/radiobutton.h index 3b97ad86..09f703dc 100644 --- a/src/gui/radiobutton.h +++ b/src/gui/radiobutton.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_RADIOBUTTON_H diff --git a/src/gui/register.cpp b/src/gui/register.cpp index 7e236a7d..051c0fa4 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "register.h" diff --git a/src/gui/register.h b/src/gui/register.h index 088e8f9b..79578461 100644 --- a/src/gui/register.h +++ b/src/gui/register.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_REGISTER_H diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 255aa2d8..032e3f78 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/scrollarea.h b/src/gui/scrollarea.h index be361f68..d21dae11 100644 --- a/src/gui/scrollarea.h +++ b/src/gui/scrollarea.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef __TMW_SCROLLAREA_H__ diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index cef53697..ee94b2c6 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -53,8 +53,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "sdlinput.h" diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index e23178fa..72d949e1 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -53,8 +53,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #ifndef _TMW_SDLINPUT_ diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index 37626155..30e78368 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "sell.h" diff --git a/src/gui/sell.h b/src/gui/sell.h index 63a16770..742c28fb 100644 --- a/src/gui/sell.h +++ b/src/gui/sell.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SELL_H diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index a6d1d1f0..b11aea6c 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 53474611..268b1baf 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SERVERDIALOG_H diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index b6b052bc..2a60308b 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/setup.h b/src/gui/setup.h index 77173367..2142a67d 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SETUP_H diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp index 1ed4fc94..4f09cde0 100644 --- a/src/gui/setup_audio.cpp +++ b/src/gui/setup_audio.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "setup_audio.h" diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h index 6e722f74..eaa55de6 100644 --- a/src/gui/setup_audio.h +++ b/src/gui/setup_audio.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_SETUP_AUDIO_H diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp index 57adef28..9de5be9f 100644 --- a/src/gui/setup_joystick.cpp +++ b/src/gui/setup_joystick.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "setup_joystick.h" diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h index 6d3ad129..0b7ebe98 100644 --- a/src/gui/setup_joystick.h +++ b/src/gui/setup_joystick.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_SETUP_JOYSTICK_H diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp index 2b785dd5..270f4a0e 100644 --- a/src/gui/setup_keyboard.cpp +++ b/src/gui/setup_keyboard.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "setup_keyboard.h" diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_keyboard.h index b72e8746..50fa76fb 100644 --- a/src/gui/setup_keyboard.h +++ b/src/gui/setup_keyboard.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_SETUP_KEYBOARD_H diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 4d9b5d74..51cee8e3 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "setup_video.h" diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h index e4e9fcf1..17ca1241 100644 --- a/src/gui/setup_video.h +++ b/src/gui/setup_video.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_SETUP_VIDEO_H diff --git a/src/gui/setuptab.h b/src/gui/setuptab.h index a7d45b9a..6c276c35 100644 --- a/src/gui/setuptab.h +++ b/src/gui/setuptab.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_SETUPTAB_H diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index 2a7ea0ce..a521c75b 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "shop.h" diff --git a/src/gui/shop.h b/src/gui/shop.h index f4329b4d..62b60cae 100644 --- a/src/gui/shop.h +++ b/src/gui/shop.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _SHOP_H diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index ba77be47..bce6a48c 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "shoplistbox.h" diff --git a/src/gui/shoplistbox.h b/src/gui/shoplistbox.h index d5e2d836..75f514ab 100644 --- a/src/gui/shoplistbox.h +++ b/src/gui/shoplistbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SHOPLISTBOX_H diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 49037cbd..49bacaf0 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/skill.h b/src/gui/skill.h index 12f619bd..3d010daa 100644 --- a/src/gui/skill.h +++ b/src/gui/skill.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SKILL_H diff --git a/src/gui/slider.cpp b/src/gui/slider.cpp index c94c7bfb..afeecf17 100644 --- a/src/gui/slider.cpp +++ b/src/gui/slider.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "slider.h" diff --git a/src/gui/slider.h b/src/gui/slider.h index dc38b738..3b796425 100644 --- a/src/gui/slider.h +++ b/src/gui/slider.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SLIDER_H diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp index 815238b9..d3ef7bbe 100644 --- a/src/gui/speechbubble.cpp +++ b/src/gui/speechbubble.cpp @@ -18,8 +18,6 @@ * You should have received a copy of the GNU General Public License * along with The Legend of Mazzeroth; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "speechbubble.h" diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h index c4ca9109..ed69a8d2 100644 --- a/src/gui/speechbubble.h +++ b/src/gui/speechbubble.h @@ -18,8 +18,6 @@ * You should have received a copy of the GNU General Public License * along with The Legend of Mazzeroth; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _LOM_SPEECHBUBBLE_H__ diff --git a/src/gui/status.cpp b/src/gui/status.cpp index b9ebfecf..43f81135 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "status.h" diff --git a/src/gui/status.h b/src/gui/status.h index 6e613495..262b89f6 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_STATUS_H diff --git a/src/gui/textbox.cpp b/src/gui/textbox.cpp index 8d16dc46..619265ec 100644 --- a/src/gui/textbox.cpp +++ b/src/gui/textbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "textbox.h" diff --git a/src/gui/textbox.h b/src/gui/textbox.h index f06f98ec..2060e377 100644 --- a/src/gui/textbox.h +++ b/src/gui/textbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef __TMW_TEXTBOX_H__ diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp index 3986ed4e..05e43906 100644 --- a/src/gui/textdialog.cpp +++ b/src/gui/textdialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "textdialog.h" diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h index c03ce7e6..8b4e2cc3 100644 --- a/src/gui/textdialog.h +++ b/src/gui/textdialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUI_GUILD_DIALOG_H diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp index 4fd85d36..49c0c91d 100644 --- a/src/gui/textfield.cpp +++ b/src/gui/textfield.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/textfield.h b/src/gui/textfield.h index 36f921ac..b808fad2 100644 --- a/src/gui/textfield.h +++ b/src/gui/textfield.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef __TMW_TEXTFIELD_H__ diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index c098c04c..38064f48 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/trade.h b/src/gui/trade.h index c8ece8d9..c51e0fdd 100644 --- a/src/gui/trade.h +++ b/src/gui/trade.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_TRADE_H diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp index 7f9abd3a..1132c3b5 100644 --- a/src/gui/truetypefont.cpp +++ b/src/gui/truetypefont.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "truetypefont.h" diff --git a/src/gui/truetypefont.h b/src/gui/truetypefont.h index 6dbc6634..3b39329e 100644 --- a/src/gui/truetypefont.h +++ b/src/gui/truetypefont.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_TRUETYPEFONT_H diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp index 4b8755d5..1e09ca23 100644 --- a/src/gui/unregisterdialog.cpp +++ b/src/gui/unregisterdialog.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "unregisterdialog.h" diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h index 8c8eaf64..4056d251 100644 --- a/src/gui/unregisterdialog.h +++ b/src/gui/unregisterdialog.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UNREGISTERDIALOG_H diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 22bf8c13..ff1e600c 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "updatewindow.h" diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h index 61ea4a27..d7e3c4c7 100644 --- a/src/gui/updatewindow.h +++ b/src/gui/updatewindow.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _UPDATERWINDOW_H diff --git a/src/gui/vbox.cpp b/src/gui/vbox.cpp index b503508e..2ec1112d 100644 --- a/src/gui/vbox.cpp +++ b/src/gui/vbox.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "vbox.h" diff --git a/src/gui/vbox.h b/src/gui/vbox.h index 06a270ef..2072ab24 100644 --- a/src/gui/vbox.h +++ b/src/gui/vbox.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef VBOX_H diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 14239094..1795836d 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "viewport.h" diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 5dedcea8..dd17fa24 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_VIEWPORT_H_ diff --git a/src/gui/widgets/avatar.cpp b/src/gui/widgets/avatar.cpp index 03fa1aeb..68ce5243 100644 --- a/src/gui/widgets/avatar.cpp +++ b/src/gui/widgets/avatar.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "avatar.h" diff --git a/src/gui/widgets/avatar.h b/src/gui/widgets/avatar.h index 3707e8f8..0f657895 100644 --- a/src/gui/widgets/avatar.h +++ b/src/gui/widgets/avatar.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_AVATAR_H diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index b33a55cf..d4c2bc4b 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index d0dab7d2..58a18a15 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef DROPDOWN_H diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 02ed42a1..bcc54cf7 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 5914b5c1..d631c154 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_WIDGET_LAYOUT_H__ diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp index 6be50f2c..c3b537db 100644 --- a/src/gui/widgets/resizegrip.cpp +++ b/src/gui/widgets/resizegrip.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "resizegrip.h" diff --git a/src/gui/widgets/resizegrip.h b/src/gui/widgets/resizegrip.h index 04be3db3..f57eda94 100644 --- a/src/gui/widgets/resizegrip.h +++ b/src/gui/widgets/resizegrip.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_RESIZEGRIP_H diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 990c6a95..c53ac85c 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index b18c93e3..42964b0f 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_TAB_H diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 7a4d153a..205fdc99 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "tabbedarea.h" diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 554a68b6..2199264b 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_TABBEDAREA_H diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 2bce49b2..e498236a 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/gui/window.h b/src/gui/window.h index 44982500..22355572 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_WINDOW_H__ diff --git a/src/gui/windowcontainer.cpp b/src/gui/windowcontainer.cpp index 006dbf44..d8535f73 100644 --- a/src/gui/windowcontainer.cpp +++ b/src/gui/windowcontainer.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "windowcontainer.h" diff --git a/src/gui/windowcontainer.h b/src/gui/windowcontainer.h index df255f84..88a13d31 100644 --- a/src/gui/windowcontainer.h +++ b/src/gui/windowcontainer.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_WINDOWCONTAINER_H_ diff --git a/src/guichanfwd.h b/src/guichanfwd.h index 812f3f7a..4fb7ea3e 100644 --- a/src/guichanfwd.h +++ b/src/guichanfwd.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_GUICHANFWD_H diff --git a/src/guild.cpp b/src/guild.cpp index c02af865..68e65cb9 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "guild.h" diff --git a/src/guild.h b/src/guild.h index e262d3df..7c85fe31 100644 --- a/src/guild.h +++ b/src/guild.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef TMW_GUILD_H diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp index 965434b0..65780345 100644 --- a/src/imageparticle.cpp +++ b/src/imageparticle.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "imageparticle.h" diff --git a/src/imageparticle.h b/src/imageparticle.h index 0ad515cc..91c5426c 100644 --- a/src/imageparticle.h +++ b/src/imageparticle.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _IMAGEPARTICLE_H diff --git a/src/inventory.cpp b/src/inventory.cpp index 807e1223..85461f90 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "inventory.h" diff --git a/src/inventory.h b/src/inventory.h index 48ace29c..90d9c7a2 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _INVENTORY_H diff --git a/src/item.cpp b/src/item.cpp index 210589e9..374d5051 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "item.h" diff --git a/src/item.h b/src/item.h index fc71e53d..37db52a4 100644 --- a/src/item.h +++ b/src/item.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _ITEM_H_ diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp index 59c1ee3b..a89da974 100644 --- a/src/itemshortcut.cpp +++ b/src/itemshortcut.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itemshortcut.h" diff --git a/src/itemshortcut.h b/src/itemshortcut.h index d75db2e8..a0c52468 100644 --- a/src/itemshortcut.h +++ b/src/itemshortcut.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEMSHORTCUT_H__ diff --git a/src/joystick.cpp b/src/joystick.cpp index a5dab4f4..b69537cf 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "joystick.h" diff --git a/src/joystick.h b/src/joystick.h index 321e3e7d..4cc1babd 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_JOYSTICK_H diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index a959e244..37d5f276 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "keyboardconfig.h" diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index 53a5c96d..d9886150 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_KEYBOARDCONFIG_H diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 30ad7b2e..14d253c0 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "localplayer.h" diff --git a/src/localplayer.h b/src/localplayer.h index 16b9715a..5dce5ebe 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LOCALPLAYER_H diff --git a/src/lockedarray.h b/src/lockedarray.h index f31292d7..8e525191 100644 --- a/src/lockedarray.h +++ b/src/lockedarray.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LOCKEDARRAY_H diff --git a/src/logindata.h b/src/logindata.h index 689a5aaa..3d959ad4 100644 --- a/src/logindata.h +++ b/src/logindata.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_LOGINDATA_H diff --git a/src/main.cpp b/src/main.cpp index ede00d57..33900d5d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "main.h" diff --git a/src/main.h b/src/main.h index d123834b..49173266 100644 --- a/src/main.h +++ b/src/main.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MAIN_H diff --git a/src/map.cpp b/src/map.cpp index e10e4fad..5c2290d6 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "map.h" diff --git a/src/map.h b/src/map.h index c4a4fc0b..07bf2866 100644 --- a/src/map.h +++ b/src/map.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MAP_H_ diff --git a/src/monster.cpp b/src/monster.cpp index 396d0c06..a62c1f4c 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "monster.h" diff --git a/src/monster.h b/src/monster.h index bde99ed6..5b6fcf61 100644 --- a/src/monster.h +++ b/src/monster.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MONSTER_H diff --git a/src/net/accountserver/account.cpp b/src/net/accountserver/account.cpp index d1fe6863..f734c4eb 100644 --- a/src/net/accountserver/account.cpp +++ b/src/net/accountserver/account.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "account.h" diff --git a/src/net/accountserver/account.h b/src/net/accountserver/account.h index 0cf0758e..581bcb42 100644 --- a/src/net/accountserver/account.h +++ b/src/net/accountserver/account.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_ACCOUNTSERVER_CHARACTER_H diff --git a/src/net/accountserver/accountserver.cpp b/src/net/accountserver/accountserver.cpp index db94563b..b1ce590c 100644 --- a/src/net/accountserver/accountserver.cpp +++ b/src/net/accountserver/accountserver.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "accountserver.h" diff --git a/src/net/accountserver/accountserver.h b/src/net/accountserver/accountserver.h index 8bfe991c..8e0573fc 100644 --- a/src/net/accountserver/accountserver.h +++ b/src/net/accountserver/accountserver.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_ACCOUNTSERVER_ACCOUNTSERVER_H diff --git a/src/net/accountserver/internal.cpp b/src/net/accountserver/internal.cpp index 28a9695e..a3be76a1 100644 --- a/src/net/accountserver/internal.cpp +++ b/src/net/accountserver/internal.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "internal.h" diff --git a/src/net/accountserver/internal.h b/src/net/accountserver/internal.h index 8af5ec04..35f986cd 100644 --- a/src/net/accountserver/internal.h +++ b/src/net/accountserver/internal.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_ACCOUNTSERVER_INTERNAL_H diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index dd7d467b..72371da5 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "beinghandler.h" diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h index 8ac07017..b02728b4 100644 --- a/src/net/beinghandler.h +++ b/src/net/beinghandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_BEINGHANDLER_H diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp index 57806edc..596ac434 100644 --- a/src/net/buysellhandler.cpp +++ b/src/net/buysellhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "buysellhandler.h" diff --git a/src/net/buysellhandler.h b/src/net/buysellhandler.h index e242d373..52e9b2f7 100644 --- a/src/net/buysellhandler.h +++ b/src/net/buysellhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_BUYSELLHANDLER_H diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 6cc9e384..bde856a5 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "charserverhandler.h" diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 4a4fe0c3..08ba5102 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_CHARSERVERHANDLER_H diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index 0cb59403..d81a8b7d 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "chathandler.h" diff --git a/src/net/chathandler.h b/src/net/chathandler.h index 7ca4d50d..aeaf5368 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_CHATHANDLER_H diff --git a/src/net/chatserver/chatserver.cpp b/src/net/chatserver/chatserver.cpp index f302a0ef..94e36b94 100644 --- a/src/net/chatserver/chatserver.cpp +++ b/src/net/chatserver/chatserver.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "chatserver.h" diff --git a/src/net/chatserver/chatserver.h b/src/net/chatserver/chatserver.h index 10de1213..1129239a 100644 --- a/src/net/chatserver/chatserver.h +++ b/src/net/chatserver/chatserver.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_CHATSERVER_CHATSERVER_H diff --git a/src/net/chatserver/guild.cpp b/src/net/chatserver/guild.cpp index fb400d5d..042ff013 100644 --- a/src/net/chatserver/guild.cpp +++ b/src/net/chatserver/guild.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/net/chatserver/guild.h b/src/net/chatserver/guild.h index 354ecd82..6c35be9f 100644 --- a/src/net/chatserver/guild.h +++ b/src/net/chatserver/guild.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/net/chatserver/internal.cpp b/src/net/chatserver/internal.cpp index c1f7a3f7..0822d93d 100644 --- a/src/net/chatserver/internal.cpp +++ b/src/net/chatserver/internal.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "internal.h" diff --git a/src/net/chatserver/internal.h b/src/net/chatserver/internal.h index 7579972b..b0f137c5 100644 --- a/src/net/chatserver/internal.h +++ b/src/net/chatserver/internal.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_CHATSERVER_INTERNAL_H diff --git a/src/net/chatserver/party.cpp b/src/net/chatserver/party.cpp index ff465924..56eb57d2 100644 --- a/src/net/chatserver/party.cpp +++ b/src/net/chatserver/party.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/net/chatserver/party.h b/src/net/chatserver/party.h index 1d47c2c5..c1febd66 100644 --- a/src/net/chatserver/party.h +++ b/src/net/chatserver/party.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ diff --git a/src/net/connection.cpp b/src/net/connection.cpp index caaa0ce1..7d3c2328 100644 --- a/src/net/connection.cpp +++ b/src/net/connection.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "connection.h" diff --git a/src/net/connection.h b/src/net/connection.h index 734c8d65..4ab3d24d 100644 --- a/src/net/connection.h +++ b/src/net/connection.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_CONNECTION_H diff --git a/src/net/effecthandler.cpp b/src/net/effecthandler.cpp index 04951d46..f7ff2bf2 100644 --- a/src/net/effecthandler.cpp +++ b/src/net/effecthandler.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "effecthandler.h" diff --git a/src/net/effecthandler.h b/src/net/effecthandler.h index d836b341..283c7c10 100644 --- a/src/net/effecthandler.h +++ b/src/net/effecthandler.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _TMW_NET_EFFECTSHANDLER_H diff --git a/src/net/gameserver/gameserver.cpp b/src/net/gameserver/gameserver.cpp index e451d473..1bdaef26 100644 --- a/src/net/gameserver/gameserver.cpp +++ b/src/net/gameserver/gameserver.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "gameserver.h" diff --git a/src/net/gameserver/gameserver.h b/src/net/gameserver/gameserver.h index 5bf196b6..5ea2c718 100644 --- a/src/net/gameserver/gameserver.h +++ b/src/net/gameserver/gameserver.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_GAMESERVER_GAMESERVER_H diff --git a/src/net/gameserver/internal.cpp b/src/net/gameserver/internal.cpp index 328b4863..6b6ba081 100644 --- a/src/net/gameserver/internal.cpp +++ b/src/net/gameserver/internal.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "internal.h" diff --git a/src/net/gameserver/internal.h b/src/net/gameserver/internal.h index 567e15d2..df9787fe 100644 --- a/src/net/gameserver/internal.h +++ b/src/net/gameserver/internal.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_GAMESERVER_INTERNAL_H diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp index cd85447c..95c13ec2 100644 --- a/src/net/gameserver/player.cpp +++ b/src/net/gameserver/player.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "player.h" diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h index 75e28270..9e68ced9 100644 --- a/src/net/gameserver/player.h +++ b/src/net/gameserver/player.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_GAMESERVER_PLAYER_H diff --git a/src/net/guildhandler.cpp b/src/net/guildhandler.cpp index f6677cd8..cf886ab3 100644 --- a/src/net/guildhandler.cpp +++ b/src/net/guildhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index 01ad428b..4eb2da0b 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_GUILDHANDLER_H diff --git a/src/net/internal.cpp b/src/net/internal.cpp index 358aa143..4cb88a4e 100644 --- a/src/net/internal.cpp +++ b/src/net/internal.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "internal.h" diff --git a/src/net/internal.h b/src/net/internal.h index e1ef648a..1e411605 100644 --- a/src/net/internal.h +++ b/src/net/internal.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_INTERNAL_H diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index dde6a954..41032f13 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "inventoryhandler.h" diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h index 4190bf83..1326ea71 100644 --- a/src/net/inventoryhandler.h +++ b/src/net/inventoryhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_INVENTORYHANDLER_H diff --git a/src/net/itemhandler.cpp b/src/net/itemhandler.cpp index ea65bc3b..af06084f 100644 --- a/src/net/itemhandler.cpp +++ b/src/net/itemhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "itemhandler.h" diff --git a/src/net/itemhandler.h b/src/net/itemhandler.h index 5ffcb134..e3005a6f 100644 --- a/src/net/itemhandler.h +++ b/src/net/itemhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_ITEMHANDLER_H diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index 6840d90c..f1898fb5 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "loginhandler.h" diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index 5bac079c..f557c97b 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_LOGINHANDLER_H diff --git a/src/net/logouthandler.cpp b/src/net/logouthandler.cpp index fb27540f..6dea4c83 100644 --- a/src/net/logouthandler.cpp +++ b/src/net/logouthandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "logouthandler.h" diff --git a/src/net/logouthandler.h b/src/net/logouthandler.h index fa906234..369eaa80 100644 --- a/src/net/logouthandler.h +++ b/src/net/logouthandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_LOGOUTHANDLER_H diff --git a/src/net/messagehandler.cpp b/src/net/messagehandler.cpp index b6074690..973c5555 100644 --- a/src/net/messagehandler.cpp +++ b/src/net/messagehandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "messagehandler.h" diff --git a/src/net/messagehandler.h b/src/net/messagehandler.h index a5fc81b3..74226aa5 100644 --- a/src/net/messagehandler.h +++ b/src/net/messagehandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_MESSAGEHANDLER_H diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index b5d5b97a..57c268e7 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "messagein.h" diff --git a/src/net/messagein.h b/src/net/messagein.h index 3cc45a23..444699c8 100644 --- a/src/net/messagein.h +++ b/src/net/messagein.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMWSERV_MESSAGEIN_H_ diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index 10f1b1d4..b08332b6 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/net/messageout.h b/src/net/messageout.h index 032db190..4eadda5f 100644 --- a/src/net/messageout.h +++ b/src/net/messageout.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMWSERV_MESSAGEOUT_H_ diff --git a/src/net/network.cpp b/src/net/network.cpp index 7cf4bf49..a4ea3def 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "network.h" diff --git a/src/net/network.h b/src/net/network.h index 42590adf..13576e79 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_NETWORK_H diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 4b08ed8d..30507537 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npchandler.h" diff --git a/src/net/npchandler.h b/src/net/npchandler.h index 0cb40f64..5560787e 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_NPCHANDLER_H diff --git a/src/net/partyhandler.cpp b/src/net/partyhandler.cpp index 7a9768fa..60c51821 100644 --- a/src/net/partyhandler.cpp +++ b/src/net/partyhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h index dda78d94..b4257c34 100644 --- a/src/net/partyhandler.h +++ b/src/net/partyhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_PARTYHANDLER_H diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index 3c0a1835..ad271f15 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "playerhandler.h" diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 9b6c9e01..9c5f87cc 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_PLAYERHANDLER_H diff --git a/src/net/protocol.h b/src/net/protocol.h index 2ed414a8..5dfa78da 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_PROTOCOL_ diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp index d75350bc..5d93016f 100644 --- a/src/net/tradehandler.cpp +++ b/src/net/tradehandler.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "tradehandler.h" diff --git a/src/net/tradehandler.h b/src/net/tradehandler.h index 33dddf05..1a0fa695 100644 --- a/src/net/tradehandler.h +++ b/src/net/tradehandler.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NET_TRADEHANDLER_H diff --git a/src/npc.cpp b/src/npc.cpp index a7302e0d..5665ad95 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npc.h" diff --git a/src/npc.h b/src/npc.h index 561ad9f0..60f9e6d8 100644 --- a/src/npc.h +++ b/src/npc.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NPC_H diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 67248100..48b10a1f 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "main.h" diff --git a/src/openglgraphics.h b/src/openglgraphics.h index e6d4850b..ea30e019 100644 --- a/src/openglgraphics.h +++ b/src/openglgraphics.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_OPENGLGRAPHICS_H diff --git a/src/particle.cpp b/src/particle.cpp index c59d2c03..8a15a132 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/particle.h b/src/particle.h index 7b46a641..4a11c4cb 100644 --- a/src/particle.h +++ b/src/particle.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _PARTICLE_H diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index cd80fb58..d368237c 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "particleemitter.h" diff --git a/src/particleemitter.h b/src/particleemitter.h index c237c1ba..4dc2f6fb 100644 --- a/src/particleemitter.h +++ b/src/particleemitter.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _PARTICLEEMITTER_H diff --git a/src/player.cpp b/src/player.cpp index 97c60789..648b330a 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "player.h" diff --git a/src/player.h b/src/player.h index 7e86b1e1..068e3cf5 100644 --- a/src/player.h +++ b/src/player.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_PLAYER_H diff --git a/src/position.cpp b/src/position.cpp index 334079bb..cc39a1af 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "position.h" diff --git a/src/position.h b/src/position.h index d1aa2ee6..7beb3ef7 100644 --- a/src/position.h +++ b/src/position.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: being.h 4570 2008-09-04 20:59:34Z b_lindeijer $ */ #ifndef TMW_POSITION_H diff --git a/src/properties.h b/src/properties.h index 93148bdf..2eafeeca 100644 --- a/src/properties.h +++ b/src/properties.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_PROPERTIES_H_ diff --git a/src/resources/action.cpp b/src/resources/action.cpp index 6b3c2f52..ffbbffb2 100644 --- a/src/resources/action.cpp +++ b/src/resources/action.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "action.h" diff --git a/src/resources/action.h b/src/resources/action.h index 8d5e8d11..09eb066e 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ACTION_H diff --git a/src/resources/ambientoverlay.cpp b/src/resources/ambientoverlay.cpp index 058b6083..9eee57f0 100644 --- a/src/resources/ambientoverlay.cpp +++ b/src/resources/ambientoverlay.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "ambientoverlay.h" diff --git a/src/resources/ambientoverlay.h b/src/resources/ambientoverlay.h index a939cbb4..56c70066 100644 --- a/src/resources/ambientoverlay.h +++ b/src/resources/ambientoverlay.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_RESOURCES_AMBIENTOVERLAY_H_ diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp index de96525c..d2794e61 100644 --- a/src/resources/animation.cpp +++ b/src/resources/animation.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "animation.h" diff --git a/src/resources/animation.h b/src/resources/animation.h index aad93cda..8dfe8614 100644 --- a/src/resources/animation.h +++ b/src/resources/animation.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ANIMATION_H diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp index 32d8d9f4..c85105c5 100644 --- a/src/resources/buddylist.cpp +++ b/src/resources/buddylist.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/buddylist.h b/src/resources/buddylist.h index 3791a03a..6a3de8c4 100644 --- a/src/resources/buddylist.h +++ b/src/resources/buddylist.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_BUDDYLIST_H diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index a43b1204..3be105d8 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/dye.h b/src/resources/dye.h index a11e3365..528a1d91 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_DYE_H diff --git a/src/resources/image.cpp b/src/resources/image.cpp index d0dae462..77d77f96 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/image.h b/src/resources/image.h index 52f286f8..3677696f 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_IMAGE_H diff --git a/src/resources/imageloader.cpp b/src/resources/imageloader.cpp index 6ec5fe8f..29458ba3 100644 --- a/src/resources/imageloader.cpp +++ b/src/resources/imageloader.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/imageloader.h b/src/resources/imageloader.h index f41f6472..7979fd2f 100644 --- a/src/resources/imageloader.h +++ b/src/resources/imageloader.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_IMAGELOADER_H diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp index ba612103..1c0f9373 100644 --- a/src/resources/imageset.cpp +++ b/src/resources/imageset.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "imageset.h" diff --git a/src/resources/imageset.h b/src/resources/imageset.h index fa1840ec..58b7a8ea 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_IMAGESET_H diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp index 7cfa16b4..d6d8a6c2 100644 --- a/src/resources/imagewriter.cpp +++ b/src/resources/imagewriter.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "imagewriter.h" diff --git a/src/resources/imagewriter.h b/src/resources/imagewriter.h index 205e4584..632e2ae4 100644 --- a/src/resources/imagewriter.h +++ b/src/resources/imagewriter.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 306c0e5a..01688619 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h index df7e7be9..20756a52 100644 --- a/src/resources/itemdb.h +++ b/src/resources/itemdb.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEM_MANAGER_H diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 4322db8d..cc7a6afc 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "iteminfo.h" diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 5b500dcf..7cc3ba15 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_ITEMINFO_H_ diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 33616c0a..cec74717 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "mapreader.h" diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h index 60056358..0142eb45 100644 --- a/src/resources/mapreader.h +++ b/src/resources/mapreader.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MAPREADER_H_ diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index f531a41d..1d198a96 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/monsterdb.h b/src/resources/monsterdb.h index 46a33b06..f1d69e72 100644 --- a/src/resources/monsterdb.h +++ b/src/resources/monsterdb.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MONSTER_DB_H diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp index 263810de..bac9c35f 100644 --- a/src/resources/monsterinfo.cpp +++ b/src/resources/monsterinfo.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "monsterinfo.h" diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index f34a3ea9..f13c2f7c 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MONSTERINFO_H_ diff --git a/src/resources/music.cpp b/src/resources/music.cpp index 161d8b01..2386aa43 100644 --- a/src/resources/music.cpp +++ b/src/resources/music.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "music.h" diff --git a/src/resources/music.h b/src/resources/music.h index 72e76295..d50150b8 100644 --- a/src/resources/music.h +++ b/src/resources/music.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_MUSIC_H diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp index bc1c920e..5cd6d20d 100644 --- a/src/resources/npcdb.cpp +++ b/src/resources/npcdb.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "npcdb.h" diff --git a/src/resources/npcdb.h b/src/resources/npcdb.h index 2abf959b..00b4f99b 100644 --- a/src/resources/npcdb.h +++ b/src/resources/npcdb.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_NPC_DB_H diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp index 8f21f5d2..449caf55 100644 --- a/src/resources/resource.cpp +++ b/src/resources/resource.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/resource.h b/src/resources/resource.h index 5b9a5eb8..e85e3147 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_RESOURCE_H diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 9c109257..8ee64452 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index da85e2f9..66813a9c 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_RESOURCE_MANAGER_H diff --git a/src/resources/soundeffect.cpp b/src/resources/soundeffect.cpp index ec9bc65c..e21fd2b0 100644 --- a/src/resources/soundeffect.cpp +++ b/src/resources/soundeffect.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "soundeffect.h" diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h index 866c53ec..c3ff6668 100644 --- a/src/resources/soundeffect.h +++ b/src/resources/soundeffect.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SOUND_EFFECT_H diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index dcfee165..5aea55fa 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h index e9946a7a..56b9a713 100644 --- a/src/resources/spritedef.h +++ b/src/resources/spritedef.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SPRITEDEF_H diff --git a/src/serverinfo.h b/src/serverinfo.h index b317b87b..6522da61 100644 --- a/src/serverinfo.h +++ b/src/serverinfo.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SERVERINFO_ diff --git a/src/shopitem.cpp b/src/shopitem.cpp index ed5d30a9..9888f829 100644 --- a/src/shopitem.cpp +++ b/src/shopitem.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "shopitem.h" diff --git a/src/shopitem.h b/src/shopitem.h index 6e7606ac..05a0a67d 100644 --- a/src/shopitem.h +++ b/src/shopitem.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _SHOPITEM_H_ diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp index f425d3c1..e8c26df1 100644 --- a/src/simpleanimation.cpp +++ b/src/simpleanimation.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "simpleanimation.h" diff --git a/src/simpleanimation.h b/src/simpleanimation.h index 561c540d..577268a8 100644 --- a/src/simpleanimation.h +++ b/src/simpleanimation.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SIMPLEANIMAION_H diff --git a/src/sound.cpp b/src/sound.cpp index 0a20d3f2..888dcc31 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "sound.h" diff --git a/src/sound.h b/src/sound.h index ebcd6442..0c2af74b 100644 --- a/src/sound.h +++ b/src/sound.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SOUND_H diff --git a/src/sprite.h b/src/sprite.h index 89780519..0e0a95db 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_SPRITE_H_ diff --git a/src/textparticle.cpp b/src/textparticle.cpp index 89466006..308c043d 100644 --- a/src/textparticle.cpp +++ b/src/textparticle.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "textparticle.h" diff --git a/src/textparticle.h b/src/textparticle.h index 34badb57..3a0ba674 100644 --- a/src/textparticle.h +++ b/src/textparticle.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TEXTPARTICLE_H diff --git a/src/tileset.h b/src/tileset.h index 625fac1b..fb855831 100644 --- a/src/tileset.h +++ b/src/tileset.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_TILESET_H_ diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp index 9a8f6356..8cea60f9 100644 --- a/src/utils/base64.cpp +++ b/src/utils/base64.cpp @@ -26,7 +26,6 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id$ */ #include #include diff --git a/src/utils/base64.h b/src/utils/base64.h index ff20ac53..c802207b 100644 --- a/src/utils/base64.h +++ b/src/utils/base64.h @@ -26,7 +26,6 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id$ */ #ifndef _TMW_BASE64_H #define _TMW_BASE64_H diff --git a/src/utils/dtor.h b/src/utils/dtor.h index 516fd916..9aa92c84 100644 --- a/src/utils/dtor.h +++ b/src/utils/dtor.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_DTOR_H diff --git a/src/utils/fastsqrt.h b/src/utils/fastsqrt.h index b7b036e9..78768149 100644 --- a/src/utils/fastsqrt.h +++ b/src/utils/fastsqrt.h @@ -5,8 +5,6 @@ * http://www.math.purdue.edu/~clomont/Math/Papers/2003/InvSqrt.pdf * * Unfortunately the original creator of this function seems to be unknown. - * - * $Id$ */ float fastInvSqrt(float x) diff --git a/src/utils/gettext.h b/src/utils/gettext.h index 72533850..0cd9114b 100644 --- a/src/utils/gettext.h +++ b/src/utils/gettext.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_GETTEXT_H diff --git a/src/utils/minmax.h b/src/utils/minmax.h index 353c60e7..7e3d84f2 100644 --- a/src/utils/minmax.h +++ b/src/utils/minmax.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp index 209d4f96..82d1fc5c 100644 --- a/src/utils/sha256.cpp +++ b/src/utils/sha256.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ /* +------------------------------------+ diff --git a/src/utils/sha256.h b/src/utils/sha256.h index c03efc0c..66152caf 100644 --- a/src/utils/sha256.h +++ b/src/utils/sha256.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_SHA256_H_ diff --git a/src/utils/strprintf.cpp b/src/utils/strprintf.cpp index 26313fe9..c8a8a247 100644 --- a/src/utils/strprintf.cpp +++ b/src/utils/strprintf.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_TOSTRING_H diff --git a/src/utils/strprintf.h b/src/utils/strprintf.h index a1fb0f13..382ab6e0 100644 --- a/src/utils/strprintf.h +++ b/src/utils/strprintf.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_STRPRINTF_H diff --git a/src/utils/tostring.h b/src/utils/tostring.h index 95b8985f..d2dd941a 100644 --- a/src/utils/tostring.h +++ b/src/utils/tostring.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_TOSTRING_H diff --git a/src/utils/trim.h b/src/utils/trim.h index fec99100..a7c40ca2 100644 --- a/src/utils/trim.h +++ b/src/utils/trim.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_TRIM_H_ diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index 98b474cb..47f1bd04 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "xml.h" diff --git a/src/utils/xml.h b/src/utils/xml.h index 5473b2ca..5a5c756b 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_XML_H diff --git a/src/vector.cpp b/src/vector.cpp index 88092c9b..7d5f055a 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: vector.h 4592 2008-09-07 20:38:52Z b_lindeijer $ */ #include "vector.h" diff --git a/src/vector.h b/src/vector.h index 7251eff0..f32b201a 100644 --- a/src/vector.h +++ b/src/vector.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_VECTOR_H_ diff --git a/tools/dyecmd/src/dye.cpp b/tools/dyecmd/src/dye.cpp index 73912a96..c93f46c8 100644 --- a/tools/dyecmd/src/dye.cpp +++ b/tools/dyecmd/src/dye.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/tools/dyecmd/src/dye.h b/tools/dyecmd/src/dye.h index a11e3365..528a1d91 100644 --- a/tools/dyecmd/src/dye.h +++ b/tools/dyecmd/src/dye.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_DYE_H diff --git a/tools/dyecmd/src/dyecmd.cpp b/tools/dyecmd/src/dyecmd.cpp index 7254e287..8938aea5 100644 --- a/tools/dyecmd/src/dyecmd.cpp +++ b/tools/dyecmd/src/dyecmd.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/tools/dyecmd/src/imagewriter.cpp b/tools/dyecmd/src/imagewriter.cpp index 36c139b9..9b4b10dc 100644 --- a/tools/dyecmd/src/imagewriter.cpp +++ b/tools/dyecmd/src/imagewriter.cpp @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include "imagewriter.h" diff --git a/tools/dyecmd/src/imagewriter.h b/tools/dyecmd/src/imagewriter.h index 205e4584..632e2ae4 100644 --- a/tools/dyecmd/src/imagewriter.h +++ b/tools/dyecmd/src/imagewriter.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #include diff --git a/tools/tmxcopy/base64.cpp b/tools/tmxcopy/base64.cpp index 9a8f6356..8cea60f9 100644 --- a/tools/tmxcopy/base64.cpp +++ b/tools/tmxcopy/base64.cpp @@ -26,7 +26,6 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id$ */ #include #include diff --git a/tools/tmxcopy/base64.h b/tools/tmxcopy/base64.h index ff20ac53..c802207b 100644 --- a/tools/tmxcopy/base64.h +++ b/tools/tmxcopy/base64.h @@ -26,7 +26,6 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id$ */ #ifndef _TMW_BASE64_H #define _TMW_BASE64_H diff --git a/tools/tmxcopy/tostring.h b/tools/tmxcopy/tostring.h index 95b8985f..d2dd941a 100644 --- a/tools/tmxcopy/tostring.h +++ b/tools/tmxcopy/tostring.h @@ -17,8 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id$ */ #ifndef _TMW_UTILS_TOSTRING_H diff --git a/tools/tmxcopy/xmlutils.cpp b/tools/tmxcopy/xmlutils.cpp index 47bff51a..8b1b62cf 100644 --- a/tools/tmxcopy/xmlutils.cpp +++ b/tools/tmxcopy/xmlutils.cpp @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "xmlutils.h" diff --git a/tools/tmxcopy/xmlutils.h b/tools/tmxcopy/xmlutils.h index 32d1a960..60e8f3cd 100644 --- a/tools/tmxcopy/xmlutils.h +++ b/tools/tmxcopy/xmlutils.h @@ -17,7 +17,6 @@ * You should have received a copy of the GNU General Public License * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _XMLUTILS_H -- cgit v1.2.3-70-g09d2