summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS74
-rw-r--r--Aethyra.dev (renamed from The Mana World.dev)18
-rw-r--r--Aethyra.vcproj (renamed from ManaWorld.vcproj)690
-rw-r--r--AethyraLin2WinXcompile.cbp (renamed from tmw.cbp)60
-rw-r--r--CMakeLists.txt10
-rw-r--r--ChangeLog6147
-rw-r--r--INSTALL48
-rw-r--r--Makefile.am2
-rw-r--r--README66
-rw-r--r--WinReadMe.txt22
-rw-r--r--aethyra.cbp693
-rw-r--r--aethyra.desktop (renamed from tmw.desktop)8
-rw-r--r--aethyra.pngbin0 -> 10182 bytes
-rwxr-xr-xautobuild.sh47
-rwxr-xr-xconfigure.ac10
-rw-r--r--data/Makefile.am2
-rw-r--r--data/graphics/gui/CMakeLists.txt4
-rw-r--r--data/graphics/gui/Makefile.am7
-rw-r--r--data/graphics/gui/bg_quad_dis.pngbin5241 -> 5539 bytes
-rw-r--r--data/graphics/gui/button.pngbin374 -> 481 bytes
-rw-r--r--data/graphics/gui/button_disabled.pngbin313 -> 358 bytes
-rw-r--r--data/graphics/gui/buttonhi.pngbin374 -> 480 bytes
-rw-r--r--data/graphics/gui/buttonpress.pngbin377 -> 424 bytes
-rw-r--r--data/graphics/gui/checkbox.pngbin696 -> 649 bytes
-rw-r--r--data/graphics/gui/close_button.pngbin650 -> 637 bytes
-rw-r--r--data/graphics/gui/deepbox.pngbin270 -> 307 bytes
-rw-r--r--data/graphics/gui/default.pngbin0 -> 1461 bytes
-rw-r--r--data/graphics/gui/gui.xml18
-rw-r--r--data/graphics/gui/hits_blue.pngbin589 -> 884 bytes
-rw-r--r--data/graphics/gui/hits_red.pngbin561 -> 813 bytes
-rw-r--r--data/graphics/gui/hits_yellow.pngbin894 -> 907 bytes
-rw-r--r--data/graphics/gui/hscroll_left_default.pngbin358 -> 402 bytes
-rw-r--r--data/graphics/gui/hscroll_left_highlight.pngbin364 -> 381 bytes
-rw-r--r--data/graphics/gui/hscroll_left_pressed.pngbin349 -> 356 bytes
-rw-r--r--data/graphics/gui/hscroll_right_default.pngbin340 -> 346 bytes
-rw-r--r--data/graphics/gui/hscroll_right_highlight.pngbin359 -> 379 bytes
-rw-r--r--data/graphics/gui/hscroll_right_pressed.pngbin350 -> 351 bytes
-rw-r--r--data/graphics/gui/item_shortcut_bgr.pngbin1026 -> 1366 bytes
-rw-r--r--data/graphics/gui/menuitemD.pngbin1329 -> 1694 bytes
-rw-r--r--data/graphics/gui/menuitemF.pngbin1530 -> 1830 bytes
-rw-r--r--data/graphics/gui/menuitemN.pngbin1310 -> 1529 bytes
-rw-r--r--data/graphics/gui/menuitemP.pngbin1436 -> 1733 bytes
-rw-r--r--data/graphics/gui/mouse.pngbin4508 -> 4385 bytes
-rw-r--r--data/graphics/gui/radioin.pngbin454 -> 438 bytes
-rw-r--r--data/graphics/gui/radioout.pngbin380 -> 346 bytes
-rw-r--r--data/graphics/gui/resize.pngbin443 -> 518 bytes
-rw-r--r--data/graphics/gui/rpgfont_wider-blue.pngbin0 -> 4431 bytes
-rw-r--r--data/graphics/gui/rpgfont_wider-green.pngbin0 -> 4423 bytes
-rw-r--r--data/graphics/gui/rpgfont_wider-orange.pngbin0 -> 4415 bytes
-rw-r--r--data/graphics/gui/slider.pngbin571 -> 615 bytes
-rw-r--r--data/graphics/gui/speech_bubble.pngbin0 -> 2031 bytes
-rw-r--r--data/graphics/gui/speechbubble.xml18
-rw-r--r--data/graphics/gui/thickborder.pngbin530 -> 593 bytes
-rw-r--r--data/graphics/gui/vscroll_blue.pngbin395 -> 476 bytes
-rw-r--r--data/graphics/gui/vscroll_down_default.pngbin367 -> 350 bytes
-rw-r--r--data/graphics/gui/vscroll_down_highlight.pngbin382 -> 378 bytes
-rw-r--r--data/graphics/gui/vscroll_down_pressed.pngbin376 -> 369 bytes
-rw-r--r--data/graphics/gui/vscroll_grey.pngbin371 -> 452 bytes
-rw-r--r--data/graphics/gui/vscroll_red.pngbin394 -> 471 bytes
-rw-r--r--data/graphics/gui/vscroll_up_default.pngbin377 -> 359 bytes
-rw-r--r--data/graphics/gui/vscroll_up_highlight.pngbin376 -> 381 bytes
-rw-r--r--data/graphics/gui/vscroll_up_pressed.pngbin364 -> 345 bytes
-rw-r--r--data/graphics/images/Makefile.am6
-rw-r--r--data/graphics/images/copyright.txt6
-rw-r--r--data/graphics/images/login_wallpaper.pngbin643307 -> 187106 bytes
-rw-r--r--data/graphics/images/login_wallpaper_1024x768.pngbin0 -> 1016644 bytes
-rw-r--r--data/graphics/images/login_wallpaper_1280x960.pngbin0 -> 1413986 bytes
-rw-r--r--data/graphics/images/login_wallpaper_1440x1080.pngbin0 -> 1648969 bytes
-rw-r--r--data/graphics/images/login_wallpaper_1600x1200.pngbin0 -> 1835415 bytes
-rw-r--r--data/help/about.txt49
-rw-r--r--data/help/changes.txt5
-rw-r--r--data/help/commands.txt14
-rw-r--r--data/help/header.txt8
-rw-r--r--data/help/index.txt2
-rw-r--r--data/help/skills.txt2
-rw-r--r--data/help/support.txt6
-rw-r--r--data/help/team.txt180
-rw-r--r--data/icons/Aethyra.icnsbin0 -> 31566 bytes
-rw-r--r--data/icons/Makefile.am6
-rw-r--r--data/icons/The Mana World.icnsbin65136 -> 0 bytes
-rw-r--r--data/icons/aethyra.icobin0 -> 17542 bytes
-rw-r--r--data/icons/aethyra.pngbin0 -> 8760 bytes
-rw-r--r--data/icons/aethyra.xpm312
-rw-r--r--data/icons/tmw.icobin22382 -> 0 bytes
-rw-r--r--data/icons/tmw.pngbin18176 -> 0 bytes
-rw-r--r--data/icons/tmw.xpm784
-rw-r--r--debian/aethyra-data.install6
-rw-r--r--debian/aethyra.docs (renamed from debian/tmw.docs)0
-rw-r--r--debian/aethyra.install5
-rw-r--r--debian/aethyra.menu4
-rw-r--r--debian/aethyra.sgml (renamed from debian/tmw.sgml)0
-rw-r--r--debian/aethyra.xpm312
-rw-r--r--debian/control54
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/tmw-data.install5
-rw-r--r--debian/tmw.desktop15
-rw-r--r--debian/tmw.install5
-rw-r--r--debian/tmw.menu4
-rw-r--r--debian/tmw.xpm776
-rw-r--r--debian/watch2
-rw-r--r--docs/FAQ.txt35
-rw-r--r--docs/HACKING.txt6
-rw-r--r--docs/INSTALL/debian.txt52
-rw-r--r--docs/INSTALL/win32.txt42
-rw-r--r--docs/Makefile.am6
-rw-r--r--docs/SOURCE/aethyra.doxcfg (renamed from docs/SOURCE/tmw.doxcfg)4
-rw-r--r--docs/SOURCE/aethyradox.sh1
-rw-r--r--docs/SOURCE/tmwdox.sh1
-rw-r--r--docs/aethyra.6 (renamed from docs/tmw.6)51
-rw-r--r--docs/packages.txt39
-rw-r--r--docs/sounddev.txt10
-rw-r--r--docs/win32-release.txt13
-rw-r--r--src/CMakeLists.txt21
-rw-r--r--src/Makefile.am64
-rw-r--r--src/aethyra.rc (renamed from src/tmw.rc)43
-rw-r--r--src/animatedsprite.cpp1
-rw-r--r--src/animationparticle.cpp1
-rw-r--r--src/being.cpp405
-rw-r--r--src/being.h151
-rw-r--r--src/beingmanager.cpp14
-rw-r--r--src/beingmanager.h39
-rw-r--r--src/configlistener.h1
-rw-r--r--src/configuration.cpp4
-rw-r--r--src/configuration.h6
-rw-r--r--src/effectmanager.cpp85
-rw-r--r--src/effectmanager.h (renamed from src/gui/buddywindow.h)49
-rw-r--r--src/engine.cpp24
-rw-r--r--src/equipment.cpp5
-rw-r--r--src/extensions.h34
-rw-r--r--src/floor_item.cpp1
-rw-r--r--src/flooritemmanager.cpp7
-rw-r--r--src/game.cpp571
-rw-r--r--src/game.h48
-rw-r--r--src/gui/browserbox.cpp72
-rw-r--r--src/gui/browserbox.h29
-rw-r--r--src/gui/button.h2
-rw-r--r--src/gui/buttonbox.cpp44
-rw-r--r--src/gui/buttonbox.h (renamed from src/gui/newskill.h)61
-rw-r--r--src/gui/buy.cpp6
-rw-r--r--src/gui/buy.h6
-rw-r--r--src/gui/buysell.cpp3
-rw-r--r--src/gui/buysell.h2
-rw-r--r--src/gui/char_select.cpp17
-rw-r--r--src/gui/char_select.h6
-rw-r--r--src/gui/char_server.cpp4
-rw-r--r--src/gui/chargedialog.cpp1
-rw-r--r--src/gui/chargedialog.h2
-rw-r--r--src/gui/chat.cpp504
-rw-r--r--src/gui/chat.h284
-rw-r--r--src/gui/chatinput.h4
-rw-r--r--src/gui/checkbox.h2
-rw-r--r--src/gui/colour.cpp137
-rw-r--r--src/gui/colour.h133
-rw-r--r--src/gui/confirm_dialog.cpp57
-rw-r--r--src/gui/confirm_dialog.h11
-rw-r--r--src/gui/connection.cpp3
-rw-r--r--src/gui/debugwindow.cpp5
-rw-r--r--src/gui/equipmentwindow.cpp9
-rw-r--r--src/gui/equipmentwindow.h3
-rw-r--r--src/gui/focushandler.cpp1
-rw-r--r--src/gui/gccontainer.h2
-rw-r--r--src/gui/gui.cpp56
-rw-r--r--src/gui/gui.h10
-rw-r--r--src/gui/hbox.h2
-rw-r--r--src/gui/help.cpp3
-rw-r--r--src/gui/help.h2
-rw-r--r--src/gui/inttextbox.cpp4
-rw-r--r--src/gui/inttextbox.h2
-rw-r--r--src/gui/inventorywindow.cpp136
-rw-r--r--src/gui/inventorywindow.h23
-rw-r--r--src/gui/item_amount.cpp3
-rw-r--r--src/gui/itemcontainer.cpp26
-rw-r--r--src/gui/itemcontainer.h15
-rw-r--r--src/gui/itempopup.cpp113
-rw-r--r--src/gui/itempopup.h51
-rw-r--r--src/gui/itemshortcutcontainer.cpp4
-rw-r--r--src/gui/itemshortcutcontainer.h2
-rw-r--r--src/gui/itemshortcutwindow.cpp3
-rw-r--r--src/gui/itemshortcutwindow.h2
-rw-r--r--src/gui/listbox.cpp4
-rw-r--r--src/gui/listbox.h2
-rw-r--r--src/gui/login.cpp265
-rw-r--r--src/gui/login.h58
-rw-r--r--src/gui/menuwindow.cpp17
-rw-r--r--src/gui/minimap.cpp32
-rw-r--r--src/gui/minimap.h8
-rw-r--r--src/gui/ministatus.cpp10
-rw-r--r--src/gui/npc_text.cpp12
-rw-r--r--src/gui/npc_text.h5
-rw-r--r--src/gui/npclistdialog.cpp5
-rw-r--r--src/gui/npclistdialog.h2
-rw-r--r--src/gui/ok_dialog.cpp58
-rw-r--r--src/gui/ok_dialog.h12
-rw-r--r--src/gui/passwordfield.h2
-rw-r--r--src/gui/playerbox.cpp2
-rw-r--r--src/gui/playerbox.h2
-rw-r--r--src/gui/popupmenu.cpp214
-rw-r--r--src/gui/popupmenu.h3
-rw-r--r--src/gui/progressbar.h3
-rw-r--r--src/gui/radiobutton.h3
-rw-r--r--src/gui/register.cpp125
-rw-r--r--src/gui/register.h23
-rw-r--r--src/gui/scrollarea.h2
-rw-r--r--src/gui/sell.cpp7
-rw-r--r--src/gui/setup.cpp27
-rw-r--r--src/gui/setup.h2
-rw-r--r--src/gui/setup_audio.cpp3
-rw-r--r--src/gui/setup_audio.h4
-rw-r--r--src/gui/setup_colours.cpp207
-rw-r--r--src/gui/setup_colours.h76
-rw-r--r--src/gui/setup_joystick.cpp4
-rw-r--r--src/gui/setup_joystick.h4
-rw-r--r--src/gui/setup_keyboard.cpp5
-rw-r--r--src/gui/setup_keyboard.h8
-rw-r--r--src/gui/setup_players.cpp8
-rw-r--r--src/gui/setup_players.h7
-rw-r--r--src/gui/setup_video.cpp67
-rw-r--r--src/gui/setup_video.h8
-rw-r--r--src/gui/shop.cpp4
-rw-r--r--src/gui/shop.h5
-rw-r--r--src/gui/shoplistbox.cpp8
-rw-r--r--src/gui/shoplistbox.h2
-rw-r--r--src/gui/skill.cpp10
-rw-r--r--src/gui/skill.h5
-rw-r--r--src/gui/slider.h3
-rw-r--r--src/gui/speechbubble.cpp93
-rw-r--r--src/gui/speechbubble.h45
-rw-r--r--src/gui/status.cpp4
-rw-r--r--src/gui/tabbedcontainer.cpp30
-rw-r--r--src/gui/tabbedcontainer.h13
-rw-r--r--src/gui/table.cpp7
-rw-r--r--src/gui/table.h1
-rw-r--r--src/gui/table_model.cpp4
-rw-r--r--src/gui/table_model.h4
-rw-r--r--src/gui/textbox.cpp41
-rw-r--r--src/gui/textbox.h15
-rw-r--r--src/gui/textfield.cpp70
-rw-r--r--src/gui/textfield.h49
-rw-r--r--src/gui/trade.cpp12
-rw-r--r--src/gui/updatewindow.cpp9
-rw-r--r--src/gui/updatewindow.h1
-rw-r--r--src/gui/vbox.h2
-rw-r--r--src/gui/viewport.cpp215
-rw-r--r--src/gui/viewport.h44
-rw-r--r--src/gui/widgets/dropdown.cpp167
-rw-r--r--src/gui/widgets/dropdown.h86
-rw-r--r--src/gui/widgets/resizegrip.cpp8
-rw-r--r--src/gui/widgets/resizegrip.h4
-rw-r--r--src/gui/window.cpp241
-rw-r--r--src/gui/window.h20
-rw-r--r--src/gui/windowcontainer.cpp4
-rw-r--r--src/gui/windowcontainer.h2
-rw-r--r--src/imageparticle.cpp3
-rw-r--r--src/inventory.cpp38
-rw-r--r--src/inventory.h8
-rw-r--r--src/itemshortcut.cpp3
-rw-r--r--src/joystick.cpp3
-rw-r--r--src/joystick.h4
-rw-r--r--src/keyboardconfig.cpp10
-rw-r--r--src/keyboardconfig.h6
-rw-r--r--src/localplayer.cpp200
-rw-r--r--src/localplayer.h44
-rw-r--r--src/main.cpp268
-rw-r--r--src/main.h4
-rw-r--r--src/map.cpp43
-rw-r--r--src/monster.cpp86
-rw-r--r--src/monster.h2
-rw-r--r--src/net/beinghandler.cpp104
-rw-r--r--src/net/beinghandler.h2
-rw-r--r--src/net/buysellhandler.cpp5
-rw-r--r--src/net/charserverhandler.cpp19
-rw-r--r--src/net/chathandler.cpp3
-rw-r--r--src/net/equipmenthandler.cpp44
-rw-r--r--src/net/inventoryhandler.cpp126
-rw-r--r--src/net/itemhandler.cpp1
-rw-r--r--src/net/loginhandler.cpp5
-rw-r--r--src/net/loginhandler.h2
-rw-r--r--src/net/maploginhandler.cpp1
-rw-r--r--src/net/messagehandler.cpp3
-rw-r--r--src/net/messagein.cpp5
-rw-r--r--src/net/messagein.h2
-rw-r--r--src/net/messageout.cpp5
-rw-r--r--src/net/network.cpp5
-rw-r--r--src/net/npchandler.cpp11
-rw-r--r--src/net/partyhandler.cpp124
-rw-r--r--src/net/partyhandler.h39
-rw-r--r--src/net/playerhandler.cpp79
-rw-r--r--src/net/protocol.h43
-rw-r--r--src/net/skillhandler.cpp3
-rw-r--r--src/net/tradehandler.cpp13
-rw-r--r--src/npc.cpp51
-rw-r--r--src/npc.h6
-rw-r--r--src/openglgraphics.cpp38
-rw-r--r--src/openglgraphics.h8
-rw-r--r--src/particle.cpp13
-rw-r--r--src/particle.h4
-rw-r--r--src/particleemitter.cpp35
-rw-r--r--src/particleemitter.h2
-rw-r--r--src/particleemitterprop.h2
-rw-r--r--src/party.cpp216
-rw-r--r--src/party.h73
-rw-r--r--src/player.cpp40
-rw-r--r--src/player.h1
-rw-r--r--src/player_relations.cpp7
-rw-r--r--src/player_relations.h11
-rw-r--r--src/properties.h2
-rw-r--r--src/recorder.cpp110
-rw-r--r--src/recorder.h48
-rw-r--r--src/resources/action.cpp7
-rw-r--r--src/resources/ambientoverlay.cpp1
-rw-r--r--src/resources/animation.cpp4
-rw-r--r--src/resources/buddylist.cpp4
-rw-r--r--src/resources/colordb.cpp126
-rw-r--r--src/resources/colordb.h52
-rw-r--r--src/resources/dye.h5
-rw-r--r--src/resources/image.cpp3
-rw-r--r--src/resources/image.h3
-rw-r--r--src/resources/imageloader.cpp4
-rw-r--r--src/resources/imageset.cpp10
-rw-r--r--src/resources/imageset.h1
-rw-r--r--src/resources/imagewriter.cpp6
-rw-r--r--src/resources/itemdb.cpp12
-rw-r--r--src/resources/itemdb.h4
-rw-r--r--src/resources/iteminfo.cpp3
-rw-r--r--src/resources/mapreader.cpp65
-rw-r--r--src/resources/mapreader.h2
-rw-r--r--src/resources/monsterdb.cpp12
-rw-r--r--src/resources/monsterinfo.cpp5
-rw-r--r--src/resources/monsterinfo.h11
-rw-r--r--src/resources/npcdb.cpp1
-rw-r--r--src/resources/npcdb.h2
-rw-r--r--src/resources/resource.cpp1
-rw-r--r--src/resources/resourcemanager.cpp16
-rw-r--r--src/resources/resourcemanager.h4
-rw-r--r--src/resources/spritedef.cpp3
-rw-r--r--src/resources/spritedef.h4
-rw-r--r--src/simpleanimation.cpp6
-rw-r--r--src/sound.cpp4
-rw-r--r--src/sound.h1
-rw-r--r--src/text.cpp43
-rw-r--r--src/text.h59
-rw-r--r--src/textmanager.cpp43
-rw-r--r--src/textmanager.h47
-rw-r--r--src/textparticle.cpp3
-rw-r--r--src/textparticle.h3
-rw-r--r--src/utils/base64.cpp2
-rw-r--r--src/utils/dtor.h8
-rw-r--r--src/utils/strprintf.cpp1
-rw-r--r--src/utils/xml.cpp2
-rw-r--r--src/utils/xml.h4
-rw-r--r--src/vector.cpp28
-rw-r--r--src/vector.h68
-rw-r--r--src/winver.h12
-rw-r--r--tools/adler32.c2
-rwxr-xr-xupdate.sh28
355 files changed, 14978 insertions, 4539 deletions
diff --git a/AUTHORS b/AUTHORS
index 29e56fe6..34618b84 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,76 @@
+<<<<<<< HEAD:AUTHORS
+---------------------------
+Aethyra Dev Team
+---------------------------
+
+ Tametomo <irarice@gmail.com>
+
+== Programmers ==
+
+ Kraant <kraant@gmail.com>
+ Tametomo <irarice@gmail.com>
+
+== Artists ==
+
+ Frictor
+ Angeliex
+
+== Map Designers ==
+
+ Ichigo Black (aka Gonzo Dark)
+ Arkyan
+
+== Inactive/Retired ==
+
+ Blameu aka Kevin Day (blame@aethyra.com.com)
+ Sanga <sanga@aethyra.com>
+ Scraggy <DougABoffey@netscape.net>
+ Sertraline
+
+-----------------------
+The Mana World Dev Team
+-----------------------
+
+ ElvenProgrammer aka Eugenio Favalli (elvenprogrammer@gmail.com)
+ Project leader, programmer
+
+== Programmers ==
+
+ Bertram (SDL input, progress bar drawing, Debian package)
+ Bj�rn Lindeijer (various parts, GUI, graphics, A* and map rewrites)
+ Bj�rn Steinbrink (various parts)
+ Javila (various parts, GUI)
+ nym (several GUI parts)
+ Shura (configuration, sound, misc. ports)
+ zenogais (resource manager)
+ Usiu (several GUI parts)
+ Mra (some GUI parts)
+
+== Artists ==
+
+ Clef (tiles, concepts)
+ Gnulia (conceptual art)
+ Irukard (item icons)
+ Magick (music and sound effects)
+ Neko-mon (player sprites, various things)
+ Neorice (monster sprites, tiles)
+ Modanung (pixel art, concept art)
+ Pajarico (concepts)
+ Rotonen (backstory, art director, music, sound)
+ Talaroc (sprites)
+ Ti Sing Hao (music)
+
+== Misc thanks ==
+
+ Ultramichy (hosting test server)
+
+== Inactive/retired ==
+
+ Chetic (maps)
+ SimEdw (network code)
+ Sull (hosting CVS and related services)
+ Vlady (several items)
+=======
---------------------------------
-- The Mana World Contributors --
---------------------------------
@@ -58,3 +131,4 @@ Jean-Francois Lampron <sull.kf gmail.com>
Rodney Dawes <dobey novell.com>
Ultramichy
Zuzanna K. Filutowska <platyna users.sourceforge.net>
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:AUTHORS
diff --git a/The Mana World.dev b/Aethyra.dev
index 76728f25..6bfb1bfa 100644
--- a/The Mana World.dev
+++ b/Aethyra.dev
@@ -1,13 +1,13 @@
[Project]
-FileName=The Mana World.dev
-Name=tmw
+FileName=Aethyra.dev
+Name=aethyra
UnitCount=277
Type=0
Ver=1
ObjFiles=
Includes=
Libs=
-PrivateResource=The_Mana_World_private.rc
+PrivateResource=Aethyra_private.rc
ResourceIncludes=
MakeIncludes=
Compiler=
@@ -18,7 +18,7 @@ Icon=
ExeOutput=
ObjectOutput=obj
OverrideOutput=1
-OverrideOutputName=tmw.exe
+OverrideOutputName=aethyra.exe
HostApplication=
Folders=gui,gui/header,gui/source,header,header/widgets,net,net/header,net/source,resources,utils
CommandLine=
@@ -77,16 +77,6 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit22]
-FileName=src\gui\buddywindow.cpp
-CompileCpp=1
-Folder=gui/source
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
[Unit25]
FileName=src\gui\button.h
CompileCpp=1
diff --git a/ManaWorld.vcproj b/Aethyra.vcproj
index 478a345c..7a42b19d 100644
--- a/ManaWorld.vcproj
+++ b/Aethyra.vcproj
@@ -2,9 +2,9 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
- Name="ManaWorld"
+ Name="Aethyra"
ProjectGUID="{DE31E83E-62BD-460E-8E6A-648CF98CC5A4}"
- RootNamespace="ManaWorld"
+ RootNamespace="Aethyra"
Keyword="Win32Proj"
SignManifests="true"
>
@@ -65,11 +65,11 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="physfs.lib sdl.lib sdlmain.lib sdl_image.lib sdl_mixer.lib guichan.lib guichan_sdl.lib ws2_32.lib libxml2.lib iconv.lib zlib.lib libcurl.lib"
- OutputFile="$(OutDir)/ManaWorld.exe"
+ OutputFile="$(OutDir)/Aethyra.exe"
LinkIncremental="2"
IgnoreDefaultLibraryNames="libc.lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/ManaWorld.pdb"
+ ProgramDatabaseFile="$(OutDir)/Aethyra.pdb"
SubSystem="2"
TargetMachine="1"
/>
@@ -144,7 +144,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="physfs.lib alleg.lib guichan.lib guichan_sdl.lib sdl.lib sdlmain.lib sdl_mixer.lib sdl_image.lib ws2_32.lib libxml2.lib iconv.lib zlib.lib libcurl.lib"
- OutputFile="tmw.exe"
+ OutputFile="aethyra.exe"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBC.lib"
GenerateDebugInformation="true"
@@ -254,11 +254,19 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath=".\src\base64.cpp"
+ RelativePath=".\src\animatedsprite.cpp"
>
</File>
<File
- RelativePath=".\src\base64.h"
+ RelativePath=".\src\animatedsprite.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\animationparticle.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\animationparticle.h"
>
</File>
<File
@@ -270,6 +278,18 @@
>
</File>
<File
+ RelativePath=".\src\beingmanager.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\beingmanager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\configlistener.h"
+ >
+ </File>
+ <File
RelativePath=".\src\configuration.cpp"
>
</File>
@@ -286,6 +306,18 @@
>
</File>
<File
+ RelativePath=".\src\equipment.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\equipment.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\extensions.h"
+ >
+ </File>
+ <File
RelativePath=".\src\floor_item.cpp"
>
</File>
@@ -310,6 +342,66 @@
>
</File>
<File
+ RelativePath=".\src\guichanfwd.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\imageparticle.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\imageparticle.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\inventory.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\inventory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\item.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\item.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\itemshortcut.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\itemshortcut.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\joystick.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\joystick.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\keyboardconfig.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\keyboardconfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\localplayer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\localplayer.h"
+ >
+ </File>
+ <File
RelativePath=".\src\log.cpp"
>
</File>
@@ -318,6 +410,10 @@
>
</File>
<File
+ RelativePath=".\src\logindata.h"
+ >
+ </File>
+ <File
RelativePath=".\src\main.cpp"
>
</File>
@@ -334,6 +430,102 @@
>
</File>
<File
+ RelativePath=".\src\monster.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\monster.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\npc.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\npc.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\openglgraphics.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\openglgraphics.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\particle.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\particle.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\particleemitter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\particleemitter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\party.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\party.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\player.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\player.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\player_relations.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\player_relations.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\properties.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\recorder.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\recorder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\serverinfo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\shopitem.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\shopitem.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\simpleanimation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\simpleanimation.h"
+ >
+ </File>
+ <File
RelativePath=".\src\sound.cpp"
>
</File>
@@ -342,20 +534,104 @@
>
</File>
<Filter
- Name="graphic"
+ Name="net"
>
<File
- RelativePath=".\src\graphic\spriteset.cpp"
+ RelativePath=".\src\net\beinghandler.cpp"
>
</File>
<File
- RelativePath=".\src\graphic\spriteset.h"
+ RelativePath=".\src\net\beinghandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\buysellhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\buysellhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\charservhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\charservhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\chathandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\chathandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\equipmenthandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\equipmenthandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\inventoryhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\inventoryhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\itemhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\itemhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\loginhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\loginhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\maploginhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\maploginhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messagehandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messagehandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messagein.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messagein.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messageout.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\messageout.h"
>
</File>
- </Filter>
- <Filter
- Name="net"
- >
<File
RelativePath=".\src\net\network.cpp"
>
@@ -365,6 +641,30 @@
>
</File>
<File
+ RelativePath=".\src\net\npchandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\npchandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\partyhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\partyhandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\playerhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\playerhandler.h"
+ >
+ </File>
+ <File
RelativePath=".\src\net\protocol.cpp"
>
</File>
@@ -373,15 +673,19 @@
>
</File>
<File
- RelativePath=".\src\net\win2linux.h"
+ RelativePath=".\src\net\skillhandler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\net\skillhandler.h"
>
</File>
<File
- RelativePath=".\src\net\win2mac.cpp"
+ RelativePath=".\src\net\tradehandler.cpp"
>
</File>
<File
- RelativePath=".\src\net\win2mac.h"
+ RelativePath=".\src\net\tradehandler.h"
>
</File>
</Filter>
@@ -405,19 +709,19 @@
>
</File>
<File
- RelativePath=".\src\gui\buddywindow.cpp"
+ RelativePath=".\src\gui\button.cpp"
>
</File>
<File
- RelativePath=".\src\gui\buddywindow.h"
+ RelativePath=".\src\gui\button.h"
>
</File>
<File
- RelativePath=".\src\gui\button.cpp"
+ RelativePath=".\src\gui\buttonbox.cpp"
>
</File>
<File
- RelativePath=".\src\gui\button.h"
+ RelativePath=".\src\gui\buttonbox.h"
>
</File>
<File
@@ -493,11 +797,35 @@
>
</File>
<File
- RelativePath=".\src\gui\equipment.cpp"
+ RelativePath=".\src\gui\connection.cpp"
>
</File>
<File
- RelativePath=".\src\gui\equipment.h"
+ RelativePath=".\src\gui\connection.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\coulor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\coulor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\debugwindow.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\debugwindow.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\equipmentwindow.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\equipmentwindow.h"
>
</File>
<File
@@ -509,6 +837,14 @@
>
</File>
<File
+ RelativePath=".\src\gui\gccontainer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\gccontainer.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\gui.cpp"
>
</File>
@@ -541,11 +877,11 @@
>
</File>
<File
- RelativePath=".\src\gui\inventory.cpp"
+ RelativePath=".\src\gui\inventorywindow.cpp"
>
</File>
<File
- RelativePath=".\src\gui\inventory.h"
+ RelativePath=".\src\gui\inventorywindow.h"
>
</File>
<File
@@ -565,6 +901,22 @@
>
</File>
<File
+ RelativePath=".\src\gui\itemshortcutcontainer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\itemshortcutcontainer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\itemshortcutwindow.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\itemshortcutwindow.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\linkhandler.h"
>
</File>
@@ -585,6 +937,14 @@
>
</File>
<File
+ RelativePath=".\src\gui\menuwindow.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\menuwindow.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\minimap.cpp"
>
</File>
@@ -593,6 +953,14 @@
>
</File>
<File
+ RelativePath=".\src\gui\ministatus.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\ministatus.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\newskill.cpp"
>
</File>
@@ -601,11 +969,11 @@
>
</File>
<File
- RelativePath=".\src\gui\npc.cpp"
+ RelativePath=".\src\gui\npclistdialogue.cpp"
>
</File>
<File
- RelativePath=".\src\gui\npc.h"
+ RelativePath=".\src\gui\npclistdialogue.h"
>
</File>
<File
@@ -665,11 +1033,11 @@
>
</File>
<File
- RelativePath=".\src\gui\requesttrade.cpp"
+ RelativePath=".\src\gui\register.cpp"
>
</File>
<File
- RelativePath=".\src\gui\requesttrade.h"
+ RelativePath=".\src\gui\register.h"
>
</File>
<File
@@ -697,6 +1065,58 @@
>
</File>
<File
+ RelativePath=".\src\gui\setup_audio.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_audio.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_colours.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_colours.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_joystick.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_joystick.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_keyboard.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_keyboard.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_players.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_players.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_video.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setup_video.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\setuptab.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\shop.cpp"
>
</File>
@@ -705,6 +1125,14 @@
>
</File>
<File
+ RelativePath=".\src\gui\shoplistbox.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\shoplistbox.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\skill.cpp"
>
</File>
@@ -721,11 +1149,11 @@
>
</File>
<File
- RelativePath=".\src\gui\stats.cpp"
+ RelativePath=".\src\gui\speechbubble.cpp"
>
</File>
<File
- RelativePath=".\src\gui\stats.h"
+ RelativePath=".\src\gui\speechbubble.h"
>
</File>
<File
@@ -737,6 +1165,30 @@
>
</File>
<File
+ RelativePath=".\src\gui\tabbedcontainer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\tabbedcontainer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\table.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\table.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\table_model.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\table_model.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\textbox.cpp"
>
</File>
@@ -777,6 +1229,14 @@
>
</File>
<File
+ RelativePath=".\src\gui\viewport.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\viewport.h"
+ >
+ </File>
+ <File
RelativePath=".\src\gui\window.cpp"
>
</File>
@@ -792,11 +1252,59 @@
RelativePath=".\src\gui\windowcontainer.h"
>
</File>
+ <Filter
+ Name="widgets"
+ >
+ <File
+ RelativePath=".\src\gui\dropdown.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\dropdown.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\gettext.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\resizegrip.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\gui\resizegrip.h"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="resources"
>
<File
+ RelativePath=".\src\resources\action.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\action.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\ambiantoverlay.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\ambiantoverlay.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\animation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\animation.h"
+ >
+ </File>
+ <File
RelativePath=".\src\resources\buddylist.cpp"
>
</File>
@@ -805,6 +1313,14 @@
>
</File>
<File
+ RelativePath=".\src\resources\dye.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\dye.h"
+ >
+ </File>
+ <File
RelativePath=".\src\resources\image.cpp"
>
</File>
@@ -813,19 +1329,43 @@
>
</File>
<File
- RelativePath=".\src\resources\iteminfo.cpp"
+ RelativePath=".\src\resources\imageloader.cpp"
>
</File>
<File
- RelativePath=".\src\resources\iteminfo.h"
+ RelativePath=".\src\resources\imageloader.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\imageset.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\imageset.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\imagewriter.cpp"
>
</File>
<File
- RelativePath=".\src\resources\itemmanager.cpp"
+ RelativePath=".\src\resources\imagewriter.h"
>
</File>
<File
- RelativePath=".\src\resources\itemmanager.h"
+ RelativePath=".\src\resources\itemdb.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\itemdb.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\iteminfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\iteminfo.h"
>
</File>
<File
@@ -837,6 +1377,22 @@
>
</File>
<File
+ RelativePath=".\src\resources\monsterdb.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\monsterdb.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\monsterinfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\monsterinfo.h"
+ >
+ </File>
+ <File
RelativePath=".\src\resources\music.cpp"
>
</File>
@@ -845,6 +1401,14 @@
>
</File>
<File
+ RelativePath=".\src\resources\npcdb.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\npcdb.h"
+ >
+ </File>
+ <File
RelativePath=".\src\resources\resource.cpp"
>
</File>
@@ -868,6 +1432,62 @@
RelativePath=".\src\resources\soundeffect.h"
>
</File>
+ <File
+ RelativePath=".\src\resources\spritedef.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\resources\spritedef.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="utils"
+ >
+ <File
+ RelativePath=".\src\utils\base64.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\base64.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\dtor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\fastsqrt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\minmax.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\strprintf.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\strprintf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\tostring.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\trim.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\xml.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\utils\xml.h"
+ >
+ </File>
</Filter>
</Filter>
</Files>
diff --git a/tmw.cbp b/AethyraLin2WinXcompile.cbp
index f108d01d..ec4940ac 100644
--- a/tmw.cbp
+++ b/AethyraLin2WinXcompile.cbp
@@ -2,21 +2,29 @@
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
- <Option title="The Mana World" />
+ <Option title="Aethyra" />
<Option pch_mode="0" />
+ <Option default_target="default" />
<Option compiler="gcc" />
<Build>
<Target title="default">
- <Option output="tmw.exe" prefix_auto="0" extension_auto="0" />
+ <Option output="aethyra.exe" prefix_auto="0" extension_auto="0" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="0" />
<Compiler>
+ <Add option="-fexpensive-optimizations" />
+ <Add option="-Os" />
+ <Add option="-O3" />
<Add option="-Wall" />
<Add option="-DUSE_OPENGL" />
<Add option="-DNOGDI" />
+ <Add directory="..\..\..\..\..\..\mingw\include\SDL" />
+ <Add directory="..\aethyra\builds\windows\LinuxXcompileBuildSupport\include" />
+ <Add directory="..\aethyra\builds\windows\LinuxXcompileBuildSupport\include\SDL" />
</Compiler>
<Linker>
+ <Add option="-s" />
<Add library="guichan" />
<Add library="guichan_sdl" />
<Add library="guichan_opengl" />
@@ -33,6 +41,7 @@
<Add library="z.dll" />
<Add library="physfs" />
<Add library="curl.dll" />
+ <Add directory="..\aethyra\builds\windows\LinuxXcompileBuildSupport\lib" />
</Linker>
</Target>
<Target title="unix">
@@ -65,9 +74,9 @@
<VirtualTargets>
<Add alias="All" targets="default;" />
</VirtualTargets>
- <Compiler>
- <Add directory="..\..\..\..\..\..\mingw\include\SDL" />
- </Compiler>
+ <Unit filename="src\aethyra.rc">
+ <Option compilerVar="WINDRES" />
+ </Unit>
<Unit filename="src\animatedsprite.cpp" />
<Unit filename="src\animatedsprite.h" />
<Unit filename="src\animationparticle.cpp" />
@@ -83,6 +92,7 @@
<Unit filename="src\engine.h" />
<Unit filename="src\equipment.cpp" />
<Unit filename="src\equipment.h" />
+ <Unit filename="src\extensions.h" />
<Unit filename="src\floor_item.cpp" />
<Unit filename="src\floor_item.h" />
<Unit filename="src\flooritemmanager.cpp" />
@@ -95,10 +105,10 @@
<Unit filename="src\gui\box.h" />
<Unit filename="src\gui\browserbox.cpp" />
<Unit filename="src\gui\browserbox.h" />
- <Unit filename="src\gui\buddywindow.cpp" />
- <Unit filename="src\gui\buddywindow.h" />
<Unit filename="src\gui\button.cpp" />
<Unit filename="src\gui\button.h" />
+ <Unit filename="src\gui\buttonbox.cpp" />
+ <Unit filename="src\gui\buttonbox.h" />
<Unit filename="src\gui\buy.cpp" />
<Unit filename="src\gui\buy.h" />
<Unit filename="src\gui\buysell.cpp" />
@@ -115,6 +125,8 @@
<Unit filename="src\gui\chatinput.h" />
<Unit filename="src\gui\checkbox.cpp" />
<Unit filename="src\gui\checkbox.h" />
+ <Unit filename="src\gui\colour.cpp" />
+ <Unit filename="src\gui\colour.h" />
<Unit filename="src\gui\confirm_dialog.cpp" />
<Unit filename="src\gui\confirm_dialog.h" />
<Unit filename="src\gui\connection.cpp" />
@@ -156,8 +168,6 @@
<Unit filename="src\gui\minimap.h" />
<Unit filename="src\gui\ministatus.cpp" />
<Unit filename="src\gui\ministatus.h" />
- <Unit filename="src\gui\newskill.cpp" />
- <Unit filename="src\gui\newskill.h" />
<Unit filename="src\gui\npc_text.cpp" />
<Unit filename="src\gui\npc_text.h" />
<Unit filename="src\gui\npclistdialog.cpp" />
@@ -168,6 +178,7 @@
<Unit filename="src\gui\passwordfield.h" />
<Unit filename="src\gui\playerbox.cpp" />
<Unit filename="src\gui\playerbox.h" />
+ <Unit filename="src\gui\popup_box.h" />
<Unit filename="src\gui\popupmenu.cpp" />
<Unit filename="src\gui\popupmenu.h" />
<Unit filename="src\gui\progressbar.cpp" />
@@ -178,13 +189,14 @@
<Unit filename="src\gui\register.h" />
<Unit filename="src\gui\scrollarea.cpp" />
<Unit filename="src\gui\scrollarea.h" />
- <Unit filename="src\gui\selectionlistener.h" />
<Unit filename="src\gui\sell.cpp" />
<Unit filename="src\gui\sell.h" />
<Unit filename="src\gui\setup.cpp" />
<Unit filename="src\gui\setup.h" />
<Unit filename="src\gui\setup_audio.cpp" />
<Unit filename="src\gui\setup_audio.h" />
+ <Unit filename="src\gui\setup_colours.cpp" />
+ <Unit filename="src\gui\setup_colours.h" />
<Unit filename="src\gui\setup_joystick.cpp" />
<Unit filename="src\gui\setup_joystick.h" />
<Unit filename="src\gui\setup_keyboard.cpp" />
@@ -202,6 +214,8 @@
<Unit filename="src\gui\skill.h" />
<Unit filename="src\gui\slider.cpp" />
<Unit filename="src\gui\slider.h" />
+ <Unit filename="src\gui\speechbubble.cpp" />
+ <Unit filename="src\gui\speechbubble.h" />
<Unit filename="src\gui\status.cpp" />
<Unit filename="src\gui\status.h" />
<Unit filename="src\gui\tabbedcontainer.cpp" />
@@ -222,6 +236,8 @@
<Unit filename="src\gui\vbox.h" />
<Unit filename="src\gui\viewport.cpp" />
<Unit filename="src\gui\viewport.h" />
+ <Unit filename="src\gui\widgets\dropdown.cpp" />
+ <Unit filename="src\gui\widgets\dropdown.h" />
<Unit filename="src\gui\widgets\resizegrip.cpp" />
<Unit filename="src\gui\widgets\resizegrip.h" />
<Unit filename="src\gui\window.cpp" />
@@ -281,7 +297,6 @@
<Unit filename="src\net\network.h" />
<Unit filename="src\net\npchandler.cpp" />
<Unit filename="src\net\npchandler.h" />
- <Unit filename="src\net\packet.h" />
<Unit filename="src\net\playerhandler.cpp" />
<Unit filename="src\net\playerhandler.h" />
<Unit filename="src\net\protocol.cpp" />
@@ -299,11 +314,15 @@
<Unit filename="src\particleemitter.cpp" />
<Unit filename="src\particleemitter.h" />
<Unit filename="src\particleemitterprop.h" />
+ <Unit filename="src\party.cpp" />
+ <Unit filename="src\party.h" />
<Unit filename="src\player.cpp" />
<Unit filename="src\player.h" />
<Unit filename="src\player_relations.cpp" />
<Unit filename="src\player_relations.h" />
<Unit filename="src\properties.h" />
+ <Unit filename="src\recorder.cpp" />
+ <Unit filename="src\recorder.h" />
<Unit filename="src\resources\action.cpp" />
<Unit filename="src\resources\action.h" />
<Unit filename="src\resources\ambientoverlay.cpp" />
@@ -311,7 +330,8 @@
<Unit filename="src\resources\animation.cpp" />
<Unit filename="src\resources\animation.h" />
<Unit filename="src\resources\buddylist.cpp" />
- <Unit filename="src\resources\buddylist.h" />
+ <Unit filename="src\resources\colordb.cpp" />
+ <Unit filename="src\resources\colordb.h" />
<Unit filename="src\resources\dye.cpp" />
<Unit filename="src\resources\dye.h" />
<Unit filename="src\resources\image.cpp" />
@@ -359,27 +379,23 @@
<Unit filename="src\textparticle.cpp" />
<Unit filename="src\textparticle.h" />
<Unit filename="src\tileset.h" />
- <Unit filename="src\tmw.rc">
- <Option compilerVar="CPP" />
- </Unit>
<Unit filename="src\utils\base64.cpp" />
<Unit filename="src\utils\base64.h" />
- <Unit filename="src\utils\colorconversion.cpp" />
- <Unit filename="src\utils\colorconversion.h" />
<Unit filename="src\utils\dtor.h" />
- <Unit filename="src\utils\fastsqrt.h" />
- <Unit filename="src\utils\strprintf.cpp" />
- <Unit filename="src\utils\strprintf.h" />
<Unit filename="src\utils\tostring.h" />
- <Unit filename="src\utils\trim.h" />
<Unit filename="src\utils\xml.cpp" />
<Unit filename="src\utils\xml.h" />
<Unit filename="src\vector.h" />
<Unit filename="src\winver.h" />
<Extensions>
<code_completion />
- <envvars />
+ <envvars set="default" />
<debugger />
+ <AutoVersioning>
+ <Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10" build_times_to_increment_minor="100" />
+ <Settings autoincrement="1" date_declarations="1" do_auto_increment="0" ask_to_increment="0" language="C++" svn="0" svn_directory="" header_path="version.h" />
+ <Changes_Log show_changes_editor="0" app_title="released version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" />
+ </AutoVersioning>
</Extensions>
</Project>
</CodeBlocks_project_file>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c8aa509..afc6ab69 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,10 @@
-PROJECT(TMW)
+PROJECT(AETHYRA)
+<<<<<<< HEAD:CMakeLists.txt
+SET(VERSION 0.0.27)
+=======
SET(VERSION 0.0.26)
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:CMakeLists.txt
# where to look for cmake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
@@ -11,11 +15,11 @@ IF (WIN32)
SET(PKG_DATADIR ".")
SET(PKG_BINDIR ".")
ELSE (WIN32)
- SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/tmw)
+ SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/aethyra)
SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
ENDIF (WIN32)
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(src)
-INSTALL(FILES tmw.desktop DESTINATION share/applications)
+INSTALL(FILES aethyra.desktop DESTINATION share/applications)
diff --git a/ChangeLog b/ChangeLog
index e69de29b..dc6d534d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,6147 @@
+<<<<<<< HEAD:ChangeLog
+2008-11-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/openglgraphics.h, src/openglgraphics.cpp: Made an option around
+ the syncing, but no way to change it for now.
+
+2008-09-21 Kevin Day ("Blame") <blame@aethyra.com>
+
+ * Added the update.sh script to work with autobuild.sh
+
+2008-09-16 Kevin Day ("Blame") <blame@aethyra.com>
+
+ * Added autobuild.sh complete build script for the client
+ * Updated the gui graphics for the client for halloween
+
+2008-09-12 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Changed default port for Aethyra to 21001
+ * Modified "/where" command to display X and Y coordinates
+ (Again - this was done on 2008-08-21, but the changes
+ were overwritten somehow)
+ * Added client support for Heal spell ("/cast heal")
+ * Added client support for Gather spell ("/cast gather")
+ * some changes to inventory system, to support the use of
+ "Kafra" storage (this is not yet operational - these
+ changes are only part of what's required to enable storage
+ in the client)
+
+2008-09-04 Douglas Boffey ("Scraggy") <scraggy@aethyra.com>
+
+ * Added code to change colours in the chatlog
+
+2008-08-30 Kevin Day ("Blame") <blame@aethyra.com>
+
+ * Updated the in game help files "/trunk/data/help"
+
+2008-08-28 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Patch to prevent crash if a map layer has too many
+ tiles (From TMW svn, r4544)
+
+2008-08-26 Douglas Boffey ("Scraggy") <DougABoffey@netscape.net>
+
+ * Corrected position of registration dialogs
+
+2008-08-21 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added configuration option "EnableSync" that causes
+ client to honor 0x88 "Stop Walking" packet.
+ * Added X and Y coordinates to output of "/where"
+ * Reformatted src/chat.cpp - it was missing indentation
+ in large areas
+
+2008-08-17 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Set the wallpaper based on the screen width.
+ * Added a usleep to the login sequence loop to
+ prevent it from unnecessarily maxing out the CPU
+
+2008-08-17 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Correctly show GP remaining after buying from NPC
+ vendor (from TMW svn, r4449)
+
+2008-08-17 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Fixed issues with unequipping some arrows failing.
+ * Removed hard-coded item ID's from several files
+
+2008-08-16 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Fixed bug where client would crash if another player
+ was targeted when you hit a warp point.
+
+2008-08-14 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Uncommented line so that MP status bar correctly
+ updates based on remaining mana
+
+2008-08-13 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added code to display NPC and monster names using an
+ alternate colored font. Added support for a server
+ provided "GM flag", which prepends "(GM)" to the player's
+ name and changes the font color.
+
+2008-08-08 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Made "--skipupdate" skip the update download process, but
+ still load whatever updates have been previously downloaded.
+
+2008-07-25 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added feature to remember window locations from one
+ session to the next (patch from TMW by ElvenProgrammer)
+
+2008-07-24 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Tweak in net/beinghandler.cpp to compensate for a visual
+ bug when using the TMW server.
+
+2008-07-23 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added support for capes/misc1/misc2 into the character
+ selection display
+
+2008-07-23 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added "chat" button to open/close chat window
+ * Added support for viewable cape/misc1/misc2 (new eAthena
+ version ONLY
+
+2008-07-22 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added handler for 0x0086 movement packet (new eAthena).
+ * Changed startup sequence for game.cpp to send a ping packet
+ to the server after all the handlers have been initialized.
+ This is required by the new eAthena version.
+ * Added #deines for some "ping" packets.
+
+2008-07-19 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Removed unnecessary check ("weight") from itemdb loader
+
+2008-07-18 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added code to provide viewable glove and shoe sprites
+
+2008-07-11 Douglas Boffey <DougABoffey@netscape.net>
+
+ * Added code to avoid collision between different displayed text.
+
+2008-07-08 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added handling for a "Stop Walking" packet. This will
+ force the client back into sync during those "can't run
+ away from a battle" sync error conditions.
+
+2008-07-07 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Added support for update host provided by login server
+ * Changed startup sequence to login first, then update
+
+2008-07-05 Lloyd Bryant ("Sanga") <sanga@aethyra.com>
+
+ * Applied patch from kraant to convert into a TME branded client
+ * Removed redundant autoconf files
+
+2008-07-01 Douglas Boffey <DougABoffey@netscape.net>
+
+ * Split ChatWindow into ChatWindow, Recorder and Party.
+ * Added /toggle command.
+
+2008-06-28 Kevin Day <blame582@gmail.com>
+
+ * Updated configure and configure.ac to reflect tme version info.
+
+2008-06-25 Kevin Day <blame582@gmail.com>
+
+ * Updated README added /commands and updated skill level listing.
+
+2008-06-25 Douglas Boffey <DougABoffey@netscape.net>
+
+ * Added a command to display the characters present within hearing
+ distance (/help present for details).
+ * Removed the need to select the map server if only one available.
+ * Added a text entry for the port to the login dialog.
+ * Added the basis of the party subsystem. (/help party for details).
+ * Added the recording subsystem (/help record for details).
+ * Add a dropdown to the login dialog to make it easier to log in
+ on different servers.
+ * Made the chatlog entry sticky (Cancelled by a blank line) -
+ TODO Make an option.
+
+2008-06-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Added particle property "follow-parent" which
+ makes the particle move when its parent particle is moved.
+
+2008-06-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/imageparticle.cpp, src/particle.cpp, src/particle.h,
+ src/particleemitter.cpp, src/particleemitter.h, src/textparticle.cpp:
+ Implemented "alpha" particle property.
+
+2008-06-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/player_relations.h: Fixed warning about missing virtual
+ destructor.
+
+2008-06-17 Fate <fate.tmw@googlemail.com>
+
+ * src/net/tradehandler.cpp: bug #333: Suppress `trade with X cancelled'
+ messages for ignored players.
+
+2008-06-16 Fate <fate.tmw@googlemail.com>
+
+ * player_relations.h: Allow whispers by default.
+
+2008-06-14 David Athay <ko2fan@gmail.com>
+
+ * src/gui/shop.cpp, src/gui/browserbox.cpp, src/net/tradehandler.cpp:
+ Fixed compilation errors. Fixed trade bug (although a little hacky
+ right now).
+ * src/net/tradehandler.cpp: Changed bug fix as requested by Bjørn.
+
+2008-06-08 Fate <fate.tmw@googlemail.com>
+
+ * src/gui/table.cpp: Invalidate mTopWidget whenever the model is
+ regenerated to reflect that we have no current valid selection.
+ * src/player_relations.cpp: Proper handling of case where player, to
+ apply ignore strategy to, is NULL.
+
+2008-06-05 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/gui/setup_video.cpp: Lowered default particle
+ detail level.
+
+2008-06-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h, src/main.cpp,
+ src/resources/buddylist.cpp, src/resources/spritedef.cpp,
+ src/resources/resourcemanager.cpp: Added command line argument to
+ specify the update host (-H). Also, to avoid problems when files with
+ the same name are served by different update hosts, the updates are
+ now stored in an update host specific directory. Based on a patch by
+ Sanga.
+
+2008-06-04 Lloyd Bryant <sanga@aethyra.com>
+
+ * src/net/charserverhandler.cpp: Display shield sprite also in
+ character select window.
+
+2008-05-30 Lloyd Bryant <sanga@aethyra.com>
+
+ * src/net/equipmenthandler.cpp, src/net/beinghandler.cpp,
+ src/net/protocol.h, src/being.h: Merged handling for eAthena packets
+ 0x00c3 and 0x01d7 and added support for displaying a shield sprite.
+
+2008-05-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp: Changed the way particle emitter skip is handled
+ to make linear and circular emitters work with particleEmitterSkip
+ enabled.
+ * src/gui/setup.cpp, src/gui/setup_video.cpp, src/gui/setup_video.h:
+ Added slider for controlling particleEmitterSkip (overall quality of
+ particle effects) to video setup menu.
+
+2008-05-28 Dennis Friis <peavey@placid.dk>
+
+ * src/being.cpp: Change order of direction to up/down/right/left in
+ Being::getSpriteDirection to fix inconsistancy of facing direction
+ when walking diagonally.
+
+2008-05-27 David Athay <ko2fan@gmail.com>
+
+ * src/main.cpp, src/player_relations.cpp: Changed OSX tmw directory to
+ a more suitable location, and fixed compile error.
+
+2008-05-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/Makefile.am, src/CMakeLists.txt: Fixed linker error caused by
+ missing module.
+
+2008-05-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/setup_players.cpp, src/gui/popup_box.h, src/gui/viewport.h,
+ src/gui/popup_box.cpp, src/gui/setup_players.h, src/Makefile.am:
+ Removed the PopupBox class and used gcn::DropDown instead. It has
+ clipping issues, but it would be better to fix those instead of using
+ this complicated workaround.
+
+2008-05-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/net/beinghandler.cpp: Implemented interpretation of names for
+ NPCs and monsters.
+ * src/npc.cpp, src/resources/npcdb.cpp, src/resources/npcdb.hpp: Added
+ the possibility to add particle effects to NPCs in npcs.xml.
+
+2008-05-16 David Athay <ko2fan@gmail.com>
+
+ * src/gui/popupmenu.cpp: Applied QOAL's patch to fix popup bug.
+
+2008-05-14 fate <fate.tmw@googlemail.com>
+
+ * src/configuration.cpp, src/game.cpp, src/player_relations.h,
+ src/beingmanager.h, src/gui/setup_players.cpp, src/gui/setup.cpp,
+ src/gui/table_model.h, src/gui/table_model.cpp, src/gui/popup_box.h,
+ src/gui/popup_box.cpp, src/gui/table.h, src/gui/setup.h,
+ src/gui/table.cpp, src/gui/setup_players.h, src/gui/popupmenu.cpp,
+ src/beingmanager.cpp, src/player.cpp, src/main.cpp, src/being.cpp,
+ src/player.h, src/net/tradehandler.h, src/net/beinghandler.cpp,
+ src/net/tradehandler.cpp, src/net/chathandler.cpp,
+ src/configuration.h, src/player_relations.cpp, src/Makefile.am,
+ src/being.h, data/graphics/gui/emotions.png,
+ data/graphics/gui/Makefile.am, data/help/commands.txt: Added ability
+ to define friends, players you want to ignore or disregard and
+ configure whether trading is allowed. Based on new popup code,
+ configuration improvements to store hierarchical data and a table
+ model.
+
+2008-05-08 Dennis Friis <peavey@placid.dk>
+
+ * src/game.cpp: Make F8 toggle shortcut window as suggested by And1
+ and fate.
+ * src/game.cpp, src/gui/chat.h, src/gui/chat.cpp: Allow page up and
+ page down to scroll the chat window, based on patch by fate.
+
+2008-05-06 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/itemshortcutcontainer.cpp: Don't allow dragging of empty
+ placeholders.
+
+2008-04-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/gui/chat.h, src/gui/chat.cpp: Fixed issue with
+ determining whether chat input is focused (method no longer virtual).
+ * src/gui/itemshortcutcontainer.cpp: Fixed sometimes rendering with
+ the wrong font.
+ * src/gui/window.h, src/gui/window.cpp: Fixed warnings about hiding
+ virtual method, Window now always deletes its children (the option not
+ to do so was never used anyway).
+ * src/gui/gccontainer.h, src/gui/gccontainer.cpp: Removed unused
+ option from GCContainer to not delete a child, fixing warnings about
+ hiding virtual method gcn::Container::add.
+ * src/log.h, src/resources/imageset.cpp: When compiling with GCC, use
+ the printf format attribute for the log method so that the compiler
+ checks the type of its parameters.
+
+2008-04-28 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/inventorywindow.h, src/gui/itemcontainer.h,
+ src/gui/inventorywindow.cpp, src/gui/scrollarea.h,
+ src/gui/itemcontainer.cpp, src/gui/scrollarea.cpp: Properly fix
+ problems with ItemContainer in InventoryWindow not resizing properly
+ since upgrade to Guichan 0.8.0.
+
+2008-04-28 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/scrollarea.h, src/gui/scrollarea.cpp: Add methods to get
+ width and height adjusted for any visible scrollbars.
+ * src/gui/itemcontainer.cpp: Fix buildup of whitespace by using
+ correct gridHeight and adding just 4px space to bottom.
+ * src/gui/inventorywindow.h, src/gui/inventorywindow.cpp: Switch to
+ use our extended ScrollArea and use adjusted width to proper calculate
+ the grid for itemcontainer.
+ * src/game.cpp: Tweak keyboard input handling a bit. This fixes using
+ emoticons triggering shortcut items to be used.
+ * src/game.cpp: Remove check for KMOD_NONE since this is not working
+ uniformly across systems.
+
+2008-04-27 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/inventorywindow.cpp: Fix ItemContainer not being resized
+ properly when resizing inventory window.
+
+2008-04-26 Dennis Friis <peavey@placid.dk>
+
+ * src/inventory.cpp: Avoid stacking equipment other than arrows. Based on
+ similar fix in inventoryhandler.
+ * src/gui/trade.cpp: Text fix, z => GP.
+ * src/net/playerhandler.cpp: When picking up GP from trade or quest,
+ tell the user in the chat window like with items.
+
+2008-04-24 Dennis Friis <peavey@placid.dk>
+
+ * src/itemshortcut.h, src/gui/itemshortcutcontainer.cpp,
+ src/gui/itemcontainer.cpp, src/net/inventoryhandler.cpp,
+ src/itemshortcut.cpp: Make shortcut container ID based instead of slot
+ based. Fixes items shifting around often causing equipment to be lost.
+ * data/help/commands.txt: Document anti-trade function.
+
+2008-04-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/beingmanager.cpp: Fixed a bug, thanks GCC 4.3!
+
+2008-04-18 David Athay <ko2fan@gmail.com>
+
+ * src/game.cpp, src/openglgraphics.cpp: Mac now uses Apple key for
+ emoticons, so alt can be used for alternate characters. Disable vsync
+ on mac.
+
+2008-04-17 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/sell.cpp: Fix shop list not to scroll to top when selling.
+ Redo of revision 3801 due to changes in guichan 0.8.0.
+ * src/gui/minimap.cpp: Draw NPCs in yellow on minimap and skip drawing
+ of warps. Based on idea by leeor_net.
+
+2008-04-16 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/browserbox.cpp: Fix a basic_string::at sometimes being out
+ of range in BrowserBox::draw when checking for line separators and
+ color codes.
+ * src/localplayer.cpp: Cancel walking to a clicked monster if the
+ target is lost while getting to it (killed or otherwise removed).
+
+2008-04-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/npc_text.h, src/gui/textbox.cpp, src/gui/npc_text.cpp,
+ src/gui/scrollarea.h, src/gui/textbox.h: Restored the text wrapping in
+ TextBox, since it was based on overriding a method that is no longer
+ virtual in Guichan 0.8.0.
+ * src/gui/viewport.cpp: Fixed compilation warning.
+
+2008-04-15 David Athay <ko2fan@gmail.com>
+
+ * src/gui/viewport.cpp, src/beingmanager.cpp, tmw.cbp: Fixed clicking
+ near player.
+
+2008-04-14 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/chat.cpp: Tweaked /whisper command to allow quoting of nicks
+ with spaces in them.
+
+2008-04-14 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/resources/dye.cpp: Fixed multi-channel dyeing (patch by fate)
+ * src/gui/chat.h: Changed prefix of received whisper messages from
+ "says:" to "whispers:"
+
+2008-04-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/itemshortcutcontainer.h, src/gui/itemshortcutcontainer.cpp,
+ src/gui/itemshortcutwindow.cpp, src/gui/scrollarea.h,
+ src/gui/scrollarea.cpp, src/gui/itemshortcutwindow.h: Fixed display of
+ item shortcut container. gcn::Widget::setWidth is no longer virtual.
+
+2008-04-11 David Athay <ko2fan@gmail.com>
+
+ * src/localplayer.cpp, src/beingmanager.h, src/gui/viewport.cpp,
+ src/beingmanager.cpp, src/localplayer.h, tmw.cbp: Players now need to
+ click on the monster sprites rather than the tile. Players will now
+ move to the target before attacking it.
+
+2008-04-10 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/chat.h, src/gui/chat.cpp, src/net/protocol.h,
+ src/net/chathandler.cpp: Implemented support for whispering to other
+ players.
+
+2008-04-10 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/net/beinghandler.cpp: Critical hits are now displayed.
+
+2008-04-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/shoplistbox.cpp, src/gui/shoplistbox.h: Fixed problem with
+ row height in shop list box.
+ * src/game.cpp, src/gui/menuwindow.cpp, src/gui/itemcontainer.cpp,
+ src/main.cpp, src/CMakeLists.txt, src/net/inventoryhandler.cpp,
+ src/Makefile.am: Re-enabled non-functional item shortcut window,
+ planned to be fixed for 0.0.25.
+
+2008-04-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/particle.cpp, src/utils/xml.cpp, src/utils/xml.h,
+ src/resources/mapreader.cpp, src/resources/spritedef.cpp,
+ src/resources/npcdb.h, src/resources/monsterdb.cpp,
+ src/resources/itemdb.cpp, src/resources/npcdb.cpp,
+ src/resources/spritedef.h: Added XML::Document class which simplifies
+ parsing an XML document and automatically cleans it up again.
+ * src/being.cpp: Fixed crash on trying to show out of range emoticon.
+ * src/winver.h, README, configure.ac, data/help/changes.txt,
+ data/help/header.txt, NEWS, CMakeLists.txt: Updated version, release
+ date and changes.
+
+2008-04-03 David Athay <ko2fan@gmail.com>
+
+ * src/game.cpp: Tweaked disconnect dialog, hoping to fix a crash bug.
+
+2008-03-31 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/main.cpp, src/npc.cpp, src/npc.h, src/resources/npcdb.h,
+ src/resources/npcdb.cpp, data/npcs.xml, src/Makefile.am, tmc.cbp:
+ Implemented NPC XML database which maps NPC IDs to one or more
+ animation files and thus enables animated NPCs.
+
+2008-03-30 Dennis Friis <peavey@placid.dk>
+
+ * configure.ac: Updated for tmwdata split.
+
+2008-03-27 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/progressbar.cpp, src/gui/scrollarea.cpp: Revert progress bar
+ changes and initialize mWalkTime.
+
+2008-03-26 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/progressbar.cpp, src/localplayer.cpp: Initialized some
+ uninitialized variables.
+
+2008-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.h, src/gui/viewport.h, src/engine.cpp,
+ src/net/playerhandler.cpp: Removed unnecessary forwarding method.
+
+2008-03-16 Dennis Friis <peavey@placid.dk>
+
+ * The Mana World.dev: Updated Dev-C++ project file.
+
+2008-03-11 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/gui/CMakeLists.txt, data/graphics/gui/Makefile.am:
+ Removed unused image here too.
+
+2008-03-11 Eugenio Favalli <elvenprogrammer@themanaworld.org>
+
+ * data/graphics/gui/attack_target.png: Removed unused image.
+
+2008-03-09 Dennis Friis <peavey@placid.dk>
+
+ * src/game.cpp: Pressing escape in the quit dialog closes the dialog.
+ * src/gui/chat.cpp, src/gui/chat.h: Fixed a bug with chat messages
+ without a sender which include semicolons.
+ * src/chat.cpp: Added "/clear" command to clear chat window.
+
+2008-03-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * tools/tmxcopy/main.cpp, tools/tmxcopy/main.map.cpp,
+ tools/tmxcopy/zlibutils.cpp: Fixed some width/height mixups in
+ TMXCopy.
+
+2008-03-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/*: Moved dynamically released data to its own module (tmwdata).
+
+2008-03-07 Eugenio Favalli <elvenprogrammer@themanaworld.org>
+
+ * data/equipment.xml, data/graphics/items/armor-legs-chaps.png,
+ data/graphics/items/armour-head-cowboyblack.png,
+ data/graphics/items/armour-head-cowboywhite.png,
+ data/graphics/items/generic-snakeskin.png,
+ data/graphics/sprites/head-cowboyblack.png,
+ data/graphics/sprites/head-cowboyblack.xml,
+ data/graphics/sprites/head-cowboywhite.png,
+ data/graphics/sprites/head-cowboywhite.xml,
+ data/graphics/sprites/leg-chaps-female.png,
+ data/graphics/sprites/leg-chaps-female.xml,
+ data/graphics/sprites/leg-chaps-male.png,
+ data/graphics/sprites/leg-chaps-male.xml,
+ data/graphics/sprites/monster-snake.png,
+ data/graphics/sprites/monster-snake.xml,
+ data/graphics/sprites/npcs.png, data/items.xml, data/monsters.xml:
+ Added new items by Black Don, new xml definitions by Peavey.
+
+2008-03-02 Eugenio Favalli <elvenprogrammer@themanaworld.org>
+
+ * tmw.cbp: Upgraded project file to latest C::B release.
+
+2008-03-02 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/leg-jeans-female.png: fixed transparency issue.
+
+2008-02-26 Eugenio Favalli <elvenprogrammer@themanaworld.org>
+
+ * src/gui/minimap.cpp: Keep minimap status. Based on a patch by Knivey.
+ * data/graphics/tiles/tulimshar1.png, data/maps/new_3-1.tmx: Added
+ Modanung's mud tileset and applyed to some houses in Tulimshar.
+
+2008-02-26 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/maps/new_14-1.tmx: Fixed some monster traps on
+ southwest woodland.
+
+2008-02-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/generic-ironore.png, data/items.xml:
+ Implemented iron ore item.
+ * data/maps/new_10-1.tmx, data/maps/new_11-1.tmx,
+ data/maps/new_12-1.tmx, data/maps/new_21-1.tmx: Map fixes by
+ QOAL.
+ * data/graphics/sprites/head-mask.xml,
+ data/graphics/sprites/head-warlordhelm.xml:
+ Animaton fixes by QOAL.
+
+2008-02-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_22-1.tmx: Map fixes at snake dungeon by QOAL.
+
+2008-02-18 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/hairstyle7-female.xml, src/sound.cpp,
+ src/utils/strprintf.cpp, tmw.cbp: Fixed image name.
+
+2008-02-13 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/equipment.xml, data/items.xml,
+ data/graphics/items/armor-head-crusaderhelm.png,
+ data/graphics/items/armor-head-infantryhelm.png,
+ data/graphics/items/armor-head-knighthelm.png,
+ data/graphics/items/armor-head-warlordhelm.png,
+ data/graphics/sprites/head-crusaderhelm.png,
+ data/graphics/sprites/head-infantryhelm.png,
+ data/graphics/sprites/head-knighthelm.png,
+ data/graphics/sprites/head-warlordhelm.png,
+ data/graphics/sprites/head-crusaderhelm.xml,
+ data/graphics/sprites/head-infantryhelm.xml,
+ data/graphics/sprites/head-knighthelm.xml,
+ data/graphics/sprites/head-warlordhelm.xml: Added new headgears by
+ Black Don (thanks to QOAL for testing and implementation)
+
+2008-02-12 Dennis Friis <peavey@placid.dk>
+
+ * src/localplayer.cpp, src/map.cpp, src/gui/viewport.cpp, src/being.cpp
+ src/map.h: Made pathfinding not halt on collision destination tile,
+ made moving around with mouse smoother. Added possibility to pass
+ through players with key controls.
+
+2008-02-11 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_22-1.tmx: Added music and overlay to snake dungeon.
+
+2008-02-10 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_23-1.tmx: Added Dimonds Cove outdoor map by MerlinX420.
+
+2008-02-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_14-1.tmx, data/maps/new_22-1.tmx: Added Dimonds Cove
+ outdoor map by MerlinX420. Fixed some map bugs in snake dungeon.
+ * data/items.xml: Added chicken leg meta information.
+
+2008-01-28 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/sell.cpp, src/gui/window.cpp, src/gui/inventorywindow.h,
+ src/gui/buy.h, src/gui/itemshortcutwindow.cpp,
+ src/gui/inventorywindow.cpp, src/gui/buy.cpp, src/gui/sell.h,
+ src/gui/window.h, src/gui/windowlistener.h,
+ src/gui/itemshortcutwindow.h, src/CMakeLists.txt, src/Makefile.am:
+ Used the gcn::WidgetListener instead of our WindowListener.
+
+2008-01-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/trade.h, src/game.h, src/being.h: Fixed a GCC 4.3 compile
+ error and constified the usage of auto_ptr, since that's the way in
+ which we are using them.
+
+2008-01-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/char_server.cpp, src/gui/window.cpp, src/gui/checkbox.h,
+ src/gui/playerbox.h, src/gui/button.cpp, src/gui/chat.cpp,
+ src/gui/slider.cpp, src/gui/tabbedcontainer.cpp, src/gui/textfield.h,
+ src/gui/shoplistbox.cpp, src/gui/register.cpp,
+ src/gui/radiobutton.cpp, src/gui/textbox.cpp, src/gui/login.cpp,
+ src/gui/setup_audio.cpp, src/gui/setup_video.cpp,
+ src/gui/textfield.cpp, src/gui/playerbox.cpp,
+ src/gui/setup_joystick.cpp, src/gui/scrollarea.h,
+ src/gui/windowlistener.h, src/gui/checkbox.cpp,
+ src/gui/scrollarea.cpp: Compile against Guichan 0.8.0. Some issues
+ with ShopListBox left and not trying to use their new TabbedArea,
+ SelectionListener and WidgetListener yet. Also needs more testing.
+ * src/gui/trade.cpp, src/gui/sell.cpp, src/gui/inventorywindow.h,
+ src/gui/selectionlistener.h, src/gui/itemcontainer.h,
+ src/gui/shoplistbox.cpp, src/gui/shoplistbox.h, src/gui/listbox.h,
+ src/gui/buy.h, src/gui/inventorywindow.cpp, src/gui/buy.cpp,
+ src/gui/itemcontainer.cpp, src/gui/sell.h, src/gui/trade.h,
+ src/gui/listbox.cpp, src/CMakeLists.txt, src/Makefile.am: Used the
+ gcn::SelectionListener instead of our own.
+
+2008-01-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_10-1.tmx, data/maps/new_11-1.tmx: Map fixes by 5t3v3 at
+ the new snow maps. Added hot spring particle effect to pond south of
+ snow village.
+ * data/graphics/particles/bubbles_32px,
+ data/graphics/particles/bubbles_12px,
+ data/graphics/particles/bubbles_8px,
+ data/graphics/particles/whirlpool.particle.xml: Added bubble particle
+ effect.
+
+2008-01-14 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_10-1.tmx, data/maps/new_11-1.tmx: Added new versions of
+ snow maps by 5t3v3.
+ * src/sound.cpp: Fixed an error in Davids last commit (couldn't compile
+ that way).
+
+2008-01-13 David Athay <ko2fan@gmail.com>
+
+ * src/resources/resourcemanager.h, src/resources/resourcemanager.cpp,
+ src/main.cpp, src/sound.cpp, src/engine.cpp: Fixed music loading from
+ non-default location.
+
+2008-01-03 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_1-1.tmx, data/maps/new_3-1.tmx: Some map bugs reported
+ by Strump, fixed by Zipon.
+
+2007-12-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/viewport.cpp: Added config options to set the scroll center.
+ * src/engine.cpp, src/engine.h, src/gui/viewport.h,
+ src/net/playerhandler.cpp: Retained scroll offset during map change for
+ smoother map transitions.
+
+2007-12-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_22-1.tmx: Some mapping fixes at snake dungeon map.
+ * src/game.cpp, src/beingmanager.cpp, src/beingmanager.h,
+ src/keyboardconfig.cpp, src/keyboardconfig.h: Added a key for targeting
+ the nearest player character based on patches by Trinexx.
+
+2007-12-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_7-1.tmx, data/maps/new_22-1.tmx: Added new map by 5t3v3
+ (east desert cave) and enhanced version of eastern desert by Len.
+
+2007-12-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_3-1.tmx: Some mapping errors fixed by Zipon.
+ * src/being.cpp, src/monster.cpp, src/resources/monsterinfo.cpp,
+ src/resources/monsterinfo.h: Added the possibility to assign particle
+ effects to monsters in the monster database.
+ * data/monsters.xml: Added flame particle effect to fire goblin as a
+ proof of concept.
+
+2007-12-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * README: Fixed year here too...
+
+2007-12-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/help/header.txt: Fixed year. :)
+ * debian/rules: Fixed missing backslash.
+ * src/CMakeLists.txt: Updated CMake file.
+
+2007-12-24 David Athay <ko2fan@gmail.com>
+
+ * src/game.cpp: Fixed dialog for disconnections, so it says Ok, not
+ yes/no.
+ * src/openglgraphics.cpp: Changed type so it would compile on Leopard.
+
+2007-12-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * README, data/help/changes.txt, data/help/header.txt, NEWS: Updated
+ release date.
+ * src/game.cpp, src/gui/menuwindow.cpp, src/gui/itemcontainer.cpp,
+ src/main.cpp, src/CMakeLists.txt, src/net/inventoryhandler.cpp,
+ src/Makefile.am: Disabled non-functional item shortcut window.
+ * src/particleemitter.cpp: Fix compile warning.
+
+2007-12-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particleemitter.cpp, src/particleemitter.h: Particle images
+ are now reference-counted properly.
+ * src/resources/spritedef.cpp: Error placeholder is now used when
+ attempting to load a sprite definition file that doesn't exist.
+ * src/monster.cpp, src/player.cpp: Avoided attempts to load
+ "data/graphics/" when a monster or equipment piece has no sprite.
+ * data/graphics/particles/cookingfire.particle.xml: Removed some
+ particle properties that did nothing because they were misspelled.
+
+2007-12-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/winver.h, README, configure.ac, INSTALL, data/help/header.txt,
+ NEWS, CMakeLists.txt: Updated version to 0.0.24.
+ * src/net/chathandler.cpp, NEWS: Make sure chat messages are also
+ trimmed for the local player.
+
+2007-12-21 David Athay <ko2fan@gmail.com>
+
+ * src/game.cpp, src/gui/updatewindow.cpp: Attempted to fix client
+ freeze when unable to connect to update host, and added exit dialog
+ when client loses connection.
+
+2007-12-21 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/shoplistbox.cpp: Fixed shop list box not to scroll up when
+ the selection is removed.
+ * src/resources/resourcemanager.h, src/resources/resourcemanager.cpp:
+ Added logging of error on PHYSFS_addToSearchPath.
+ * src/localplayer.cpp, src/inventory.h, src/gui/inventorywindow.cpp,
+ src/inventory.cpp, src/localplayer.h: Fixed inventory size not
+ matching the size assumed by eAthena, and related memory corruption.
+ * src/main.cpp: Increased default chat log length.
+
+2007-12-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_18-1.tmx: Fixed a map bug (monster trap) on
+ map 18 (woodland village surrounding)
+
+2007-12-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * tools/upalyzer/analyse.php: Fixed association of entries to update,
+ added no-cache headers, added a bit of error reporting in case of
+ invalid zip files, kept original ordering of the update list and
+ sorted the list of entries on their filename.
+ * tools/upalyzer/analyse.php: Added list of files in each update with
+ indication on whether they are still used.
+
+2007-12-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Remember to delete the progressbar and label also when
+ the game was not started.
+ * tools/upalyzer/analyse.php: Added initial version of the update
+ analysis tool upalyzer.
+ * tools/upalyzer/analyse.php: Optimized with single loop approach and
+ nicer printing calls, inspired by doener's version. Also added list of
+ update entries and their respective update.
+
+2007-12-14 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/head-mask.png,
+ data/graphics/sprites/head-mask.xml,
+ data/graphics/sprites/head-mushroom.xml,
+ data/graphics/sprites/head-shroom.xml,
+ data/items.xml, data/equipment.xml:
+ Fixed some problems with the new items.
+
+2007-12-12 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/cave.png, data/graphics/tiles/cave_x2.png:
+ Fixed the blurred outlines of the new tiles.
+
+2007-12-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/tiles/cave.png, data/graphics/tiles/cave_x2.png,
+ data/maps/new_4-1.tmx: Added two new cave tiles by yosuhara.
+
+2007-12-12 Philipp Sehmisch <tmw@crushnet.org>
+
+ * tools/tmxcopy/base64.cpp,
+ tools/tmxcopy/base64.h, tools/tmxcopy/main.cpp,
+ tools/tmxcopy/map.cpp, tools/tmxcopy/map.hpp,
+ tools/tmxcopy/readme.txt, tools/tmxcopy/tmxcopy.cbp,
+ tools/tmxcopy/tostring.h, tools/tmxcopy/xmlutils.cpp,
+ tools/tmxcopy/xmlutils.h, tools/tmxcopy/zlibutils.cpp,
+ tools/tmxcopy/zlibutils.h: Added my tmxcopy tool for copying
+ parts of maps to other maps.
+
+2007-12-10 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp: Include cassert header.
+
+2007-12-10 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/being.cpp, src/being.h, src/net/beinghandler.cpp,
+ src/net/charserverhandler.cpp, src/net/equipmenthandler.cpp,
+ src/player.cpp, src/player.h, data/items.xml: Simplified player
+ subsprite handling by treating equipment, hairstyle and base
+ sprites alike. This also enables gender-specific hairstyles.
+ * src/game.cpp, src/gui/chat.cpp, src/gui/chat.h, src/log.cpp,
+ src/log.h: Added an option to show log messages in the chat console.
+ * data/items.xml,
+ data/graphics/sprites/hairstyle1.png,
+ data/graphics/sprites/hairstyle1.xml,
+ data/graphics/sprites/hairstyle1-male.png,
+ data/graphics/sprites/hairstyle1-male.xml,
+ data/graphics/sprites/hairstyle1-female.png,
+ data/graphics/sprites/hairstyle1-female.xml,
+ data/graphics/sprites/hairstyle2.png,
+ data/graphics/sprites/hairstyle2.xml,
+ data/graphics/sprites/hairstyle2-male.png,
+ data/graphics/sprites/hairstyle2-male.xml,
+ data/graphics/sprites/hairstyle2-female.png,
+ data/graphics/sprites/hairstyle2-female.xml,
+ data/graphics/sprites/hairstyle3.png,
+ data/graphics/sprites/hairstyle3.xml,
+ data/graphics/sprites/hairstyle3-male.png,
+ data/graphics/sprites/hairstyle3-male.xml,
+ data/graphics/sprites/hairstyle3-female.png,
+ data/graphics/sprites/hairstyle3-female.xml,
+ data/graphics/sprites/hairstyle4.png,
+ data/graphics/sprites/hairstyle4.xml,
+ data/graphics/sprites/hairstyle4-male.png,
+ data/graphics/sprites/hairstyle4-male.xml,
+ data/graphics/sprites/hairstyle4-female.png,
+ data/graphics/sprites/hairstyle4-female.xml,
+ data/graphics/sprites/hairstyle5.png,
+ data/graphics/sprites/hairstyle5.xml,
+ data/graphics/sprites/hairstyle5-male.png,
+ data/graphics/sprites/hairstyle5-male.xml,
+ data/graphics/sprites/hairstyle5-female.png,
+ data/graphics/sprites/hairstyle5-female.xml,
+ data/graphics/sprites/hairstyle6.png,
+ data/graphics/sprites/hairstyle6.xml,
+ data/graphics/sprites/hairstyle6-male.png,
+ data/graphics/sprites/hairstyle6-male.xml,
+ data/graphics/sprites/hairstyle6-female.png,
+ data/graphics/sprites/hairstyle6-female.xml,
+ data/graphics/sprites/hairstyle7.png,
+ data/graphics/sprites/hairstyle7.xml,
+ data/graphics/sprites/hairstyle7-male.png,
+ data/graphics/sprites/hairstyle7-male.xml,
+ data/graphics/sprites/hairstyle7-female.png,
+ data/graphics/sprites/hairstyle7-female.xml:
+ Implemented female hairstyles.
+
+2007-12-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/head-funkywinter.png,
+ data/graphics/sprites/head-funkywinter.xml,
+ data/graphics/sprites/head-xmaself.png,
+ data/graphics/sprites/head-xmaself.xml: New versions of funky hat
+ and elf hat by QOAL.
+
+2007-12-04 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/generic-santacookie.png,
+ data/items.xml: Added a new drop item for the christmas event.
+
+2007-12-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/map.cpp, src/map.h: Fix drawing of very high fringe tiles by
+ keeping track of the maximum tile height.
+ * src/itemshortcut.h, src/gui/itemshortcutcontainer.h,
+ src/gui/itemshortcutcontainer.cpp, src/gui/itemshortcutwindow.cpp,
+ src/gui/itemshortcutwindow.h, src/itemshortcut.cpp: Random cleanups.
+
+2007-12-04 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/head-funkywinter.png,
+ data/graphics/sprites/head-funkywinter.xml,
+ data/graphics/sprites/head-mask.png,
+ data/graphics/sprites/head-mask.xml,
+ data/graphics/sprites/head-mushroom.png,
+ data/graphics/sprites/head-mushroom.xml,
+ data/graphics/sprites/head-shroom.png,
+ data/graphics/sprites/head-shroom.xml,
+ data/graphics/sprites/head-tophat.png,
+ data/graphics/sprites/head-tophat.xml,
+ data/graphics/sprites/head-xmaself.png,
+ data/graphics/sprites/head-xmaself.xml,
+ data/graphics/items/armor-head-xmaself.png,
+ data/graphics/items/armor-head-mask.png,
+ data/items.xml: Added/renamed some headgears for the christmas event.
+
+2007-11-20 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/maps/new_1-1.tmx,
+ data/graphics/maps/new_3-1.tmx,
+ data/graphics/maps/new_15-1.tmx: Updated desert maps with new
+ tiles by Len.
+
+2007-11-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/floor_item.cpp, src/localplayer.cpp, src/item.cpp,
+ src/inventory.h, src/gui/sell.cpp, src/gui/equipmentwindow.cpp,
+ src/gui/shop.cpp, src/gui/shoplistbox.cpp, src/gui/shop.h,
+ src/gui/itemshortcutcontainer.cpp, src/gui/buy.cpp,
+ src/gui/itemcontainer.cpp, src/inventory.cpp, src/item.h,
+ src/equipment.h, src/shopitem.cpp, src/CMakeLists.txt,
+ src/floor_item.h, src/net/inventoryhandler.cpp, src/equipment.cpp,
+ src/localplayer.h, src/Makefile.am, src/resources/iteminfo.h,
+ src/resources/itemdb.cpp, src/resources/iteminfo.cpp, src/shopitem.h:
+ Moved item icon from ItemInfo class to the Item class, so that it can
+ be loaded on demand. Results in faster startup time and reduced memory
+ usage.
+
+2007-11-16 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/resourcemanager.h, src/resources/resource.h,
+ src/resources/resourcemanager.cpp, src/resources/resource.cpp: Delayed
+ resource deletion by 30 seconds.
+ * src/resources/image.cpp: Sped up recoloring of transparent pixels.
+
+2007-11-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/log.cpp, src/utils/wingettimeofday.h: Removed useless win32
+ implementation of gettimeofday.
+ * src/log.cpp, tmw.cbp: Fixed minor issues.
+
+2007-11-11 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/item_amount.cpp, src/gui/item_amount.h,
+ src/gui/inventorywindow.cpp: Moved check on dropping 1 item to the
+ inventory dialog.
+
+2007-11-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/chest-chainmail-male,
+ data/graphics/sprites/chest-chainmail-female,
+ data/graphics/sprites/chest-cotton-male,
+ data/graphics/sprites/chest-cotton-female,
+ data/graphics/sprites/chest-leather-male,
+ data/graphics/sprites/chest-leather-female,
+ data/graphics/sprites/chest-tnecksweater-male,
+ data/graphics/sprites/chest-tnecksweater-female,
+ data/graphics/sprites/chest-vnecksweater-male,
+ data/graphics/sprites/chest-vnecksweater-female:
+ Modifications at the back shading of shirt sprites by Pauan.
+
+2007-11-04 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/dye.cpp, src/resources/resourcemanager.cpp: Moved
+ palette qualifiers to the right as the code appends things on the left.
+ * src/resources/spritedef.cpp, src/resources/spritedef.h,
+ src/resources/resourcemanager.h: Added propagation of palettes through
+ sprite resource names.
+ * data/monsters.xml, data/graphics/sprites/monster-scorpion.xml: Used
+ palettes on sprite names.
+ * data/graphics/sprites/monster-scorpion-black.xml,
+ data/graphics/sprites/monster-scorpion-red.xml: Removed obsolete files.
+ * src/player.cpp: Added hair colors.
+ * data/graphics/sprites/hairstyle*.xml: Removed sprite variants. Set
+ replaceable color.
+ * data/graphics/sprites/hairstyle*.png: Reduced image sizes.
+ * data/monsters.xml, data/graphics/sprites/monster-slime.xml,
+ data/graphics/sprites/monster-slime.png: Added generic slime.
+ * data/graphics/sprites/monster-slime-{green,red,yellow}.png,
+ data/graphics/sprites/monster-slime-{green,red,yellow}.xml: Removed
+ obsolete files.
+
+2007-11-03 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/player.cpp, src/player.h, src/gui/char_select.cpp: Factored code.
+ * src/net/beinghandler.cpp, src/net/charserverhandler.cpp: Fixed double
+ load of hair graphics.
+ * src/Makefile.am, src/resources/dye.cpp, src/resources/dye.h: Added
+ palette holder and linear interpolator of colors.
+ * src/resources/image.h, src/resources/image.cpp: Added palette-based
+ recoloring of images.
+ * src/resources/resourcemanager.h, src/resources/resourcemanager.cpp:
+ Added automatic recoloring of images depending on their names.
+ * data/graphics/sprites/monster-scorpion.png: Flattened colors.
+ * data/graphics/sprites/monster-scorpion-black.png,
+ data/graphics/sprites/monster-scorpion-red.png: Removed obsolete files.
+ * data/graphics/sprites/monster-scorpion.xml,
+ data/graphics/sprites/monster-scorpion-black.xml,
+ data/graphics/sprites/monster-scorpion-red.xml: Added automatic
+ recoloring of scorpions.
+
+2007-11-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/particles/aniblaze.png,
+ data/graphics/particles/cookingfire.particle.xml,
+ data/graphics/particles/fireplace.particle.xml,
+ data/graphics/particles/flame.particle.xml: Improved fire particle
+ effects by using animated particles.
+
+2007-10-31 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/items.xml, data/graphics/sprites/leg-skirt.png,
+ data/graphics/sprites/leg-skirt.xml,
+ data/graphics/items/armor-leg-skirt.png: Added skirt by Saphy.
+ ViewID is 26, item ID is 632, item properties are c&p from jeans
+ shorts.
+
+2007-10-27 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/properties.h, src/game.cpp, src/channel.h, src/log.cpp,
+ src/gui/window.cpp, src/gui/setup.cpp, src/gui/button.cpp,
+ src/gui/chat.h, src/gui/widgets/dropdown.cpp, src/gui/chat.cpp,
+ src/gui/tabbedcontainer.cpp, src/gui/windowcontainer.cpp,
+ src/gui/skill.cpp, src/gui/serverdialog.cpp, src/gui/textfield.cpp,
+ src/gui/playerbox.cpp, src/gui/scrollarea.cpp, src/beingmanager.cpp,
+ src/flooritemmanager.cpp, src/channelmanager.cpp, src/main.cpp,
+ src/particle.cpp, src/net/messageout.cpp, src/channel.cpp,
+ src/localplayer.h, src/resources/imageset.cpp,
+ src/resources/buddylist.cpp, src/resources/monsterinfo.h,
+ src/resources/iteminfo.h, src/resources/monsterdb.cpp,
+ src/resources/monsterinfo.cpp, src/resources/itemdb.cpp: Fixed missing
+ dependencies, spurious const qualifiers, and weak brackets, so that it
+ compiles with GCC 4.3.
+
+2007-10-26 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/item_ammount.cpp: Item amount dialog is now skipped
+ when there is only one item on the stack.
+ * src/browserbox.cpp, src/browserbox.h, src/chat.h, src/main.cpp:
+ Added possibility of length limitation to browserbox and used it
+ for the chatlog (length set by the config option "ChatLogLength").
+ * src/chat.cpp, src/chat.h: Removed some completely useless code
+ from the chat class.
+ * src/monster.cpp, src/monster.h, data/sfx/logmonster-hurt1.ogg,
+ data/sfx/logmonster-hurt2.ogg, data/sfx/logmonster-hurt3.ogg,
+ data/sfx/logmonster-hurt4.ogg, data/sfx/logmonster-hurt5.ogg:
+ Implemented monster hurt sounds and added new sound effects by
+ Cosmostrator.
+
+2007-10-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/items.xml, data/graphics/items/generic-darkcrystal.png:
+ Added a new quest loot item for the halloween event.
+
+2007-10-22 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/particle.cpp: Plugged memory leak.
+ * src/configuration.cpp, src/main.cpp: Plugged memory leak. Cleaned
+ code.
+
+2007-10-21 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/gui/window.cpp, src/gui/window.h: Removed redundant resizable
+ flag. Factored moving/resizing code, so that events are fired only
+ once per size change.
+ * src/resources/spritedef.cpp: Plugged memory leak in sprites.
+ * src/resources/action.cpp: Fixed double-free of sprite actions.
+ * src/resources/iteminfo.cpp, src/resources/iteminfo.h: Plugged memory
+ leak in equipment sound.
+ * src/resources/monsterdb.cpp: Plugged memory leak in database reader.
+ * src/engine.cpp, src/engine.h, src/game.cpp: Fixed current map not
+ deleted on server change.
+ * src/gui/trade.cpp: Added persistent positioning.
+ * src/gui/menuwindow.cpp: Fixed missing pixels at bottom and right.
+ * src/gui/window.cpp, src/gui/window.h: Changed to use default values
+ when restoring missing settings.
+ * src/gui/shoplistbox.cpp, src/gui/listbox.cpp: Fixed invisible text.
+
+2007-10-20 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/gui/playerbox.cpp: Centered sprite inside selection box.
+
+2007-10-19 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/resource.cpp, src/resources/resource.h,
+ src/resources/imageset.cpp, src/resources/imageset.h: Removed mandatory
+ identifier path.
+ * src/resources/resourcemanager.cpp, src/resources/resourcemanager.h:
+ Factored code between resource handlers.
+ * src/resources/soundeffect.h, src/resources/soundeffect.cpp,
+ src/resources/music.h, src/resources/music.cpp, src/resources/image.h,
+ src/resources/image.cpp: Reworked resource loaders.
+ * src/resources/spritedef.h, src/resources/spritedef.cpp: Implemented
+ a failure-friendly loader.
+ * src/gui/truetypefont.cpp, src/resources/imageloader.cpp,
+ src/tileset.h: Removed dummy parameter.
+
+2007-10-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/images/ambient/fog.png: Added fog effect overlay
+ graphic.
+
+2007-10-18 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/iteminfo.h, src/resources/itemdb.cpp: Removed unused
+ slot field.
+ * src/localplayer.cpp, src/localplayer.h: Removed specific type.
+ * src/gui/viewport.cpp, src/gui/minimap.cpp: Changed identification of
+ local player to a check of player_node.
+ * src/animatedsprite.cpp, src/animatedsprite.h, src/npc.cpp,
+ src/player.cpp, src/monster.cpp, src/resources/resourcemanager.cpp:
+ Prevented client from exiting on missing sprites.
+ * src/resources/spritedef.cpp: Added filename to fatal error messages.
+ * src/resources/iteminfo.cpp, src/resources/iteminfo.h,
+ src/resources/itemdb.cpp, data/items.xml: Merged weapon_type and
+ attacktype field.
+
+2007-10-18 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/hairstyle7-male.png,
+ data/graphics/sprites/hairstyle7-female.png: Readded hairstyle number
+ 7.
+
+2007-10-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/net/tradehandler.h, src/net/tradehandler.cpp:
+ Implemented automatic denying of trade requests based on a patch
+ submitted by Quiche_on_a_leash.
+
+2007-10-07 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/maps/new_18-1.tmx: Fixed some collision layer problems.
+
+2007-10-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/player.cpp, data/graphics/sprites/hairstyle*:
+ Added support for different hairstyles for male and female characters
+ (current female hairstyles are copies of the male ones until the
+ real female ones are finished)
+
+2007-09-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/desert_x3.png: Removed the purple line from the
+ ruin tile.
+
+2007-09-27 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/desert2.png, data/graphics/tiles/desert_x3.png,
+ data/graphics/tiles/desert_x5.png: Added new desert tiles by Len.
+
+2007-09-20 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/equipment.xml, data/graphics/items/armor-head-funkyhat.png,
+ data/graphics/items/armor-head-mushroomhat.png,
+ data/graphics/items/armor-head-shroomhat.png,
+ data/graphics/items/armor-head-tophat.png,
+ data/graphics/sprites/item019.png, data/graphics/sprites/item019.xml,
+ data/graphics/sprites/item020.png, data/graphics/sprites/item020.xml,
+ data/graphics/sprites/item021.png, data/graphics/sprites/item021.xml,
+ data/graphics/sprites/item022.png, data/graphics/sprites/item022.xml,
+ data/items.xml, data/maps/new_21-1.tmx: Added 4 new items and a new ice
+ cave map.
+
+2007-09-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/items.xml, data/equipment.xml: Added temporary weapon IDs below
+ 256 to use as view-ID in eAthena's item DB.
+ * src/gui/shoplistbox.cpp, src/gui/buy.h, src/gui/buy.cpp: Allowed
+ selection of items that cannot be afforded, so that their descriptions
+ are still accessible. Also made sure the player's money value of
+ ShopItemList gets updated.
+
+2007-09-11 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/chat.cpp, tmw.cbp: Fixed admin commands.
+
+2007-09-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/particles/aniblaze.png,
+ data/graphics/particles/cookingfire.particle.xml,
+ data/graphics/particles/fireplace.particle.xml,
+ data/graphics/particles/flame.particle.xml: Improved fire effects by
+ using animated particles.
+
+2007-09-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animationparticle.cpp, src/imageparticle.cpp: Fixed animated
+ particles.
+
+2007-09-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/Makefile.am: Fixed the entry for windowlistener.h.
+
+2007-08-30 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/localplayer.cpp, src/player.cpp, src/main.cpp, src/being.cpp,
+ src/CMakeLists.txt, src/Makefile.am, src/resources/iteminfo.h,
+ src/resources/equipmentdb.h, src/resources/equipmentinfo.h,
+ src/resources/itemdb.cpp, src/resources/iteminfo.cpp,
+ src/resources/equipmentdb.cpp, src/resources/equipmentinfo.cpp,
+ src/resources/spritedef.h, src/being.h, data/items.xml,
+ data/equipment.xml: Merged equipment database with items database and
+ got rid of the unused item art attribute.
+ * src/net/beinghandler.cpp, src/net/charserverhandler.cpp: Removed the
+ now unnecessary multiplication of weapon IDs with 10000.
+ * src/resources/iteminfo.cpp, data/graphics/items/unknown.png: Added
+ fallback item icon and use it for unknown items or when item image
+ fails to load.
+ * NEWS: Updated with changes since last update.
+ * data/items.xml, data/equipment.xml: Reverted equipment database and
+ included original low-ID items in items.xml for compatibility with
+ eAthena, which doesn't support View ID to come above 255.
+ * src/resources/itemdb.cpp: Accept items without a name.
+
+2007-08-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/sell.cpp, src/gui/inventorywindow.cpp, src/gui/sell.h: Made
+ sell dialog resizable and tweaked inventory resize code a bit.
+ * data/items.xml: Fixed typo in chainmail description.
+
+2007-08-28 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/window.cpp, src/gui/inventorywindow.h,
+ src/gui/selectionlistener.h, src/gui/buy.h,
+ src/gui/itemshortcutwindow.cpp, src/gui/inventorywindow.cpp,
+ src/gui/buy.cpp, src/gui/window.h, src/gui/windowlistener.h,
+ src/gui/itemshortcutwindow.h, src/CMakeLists.txt, src/Makefile.am:
+ Made buy dialog resizable and added a WindowListener class for
+ listening for window resize and move events.
+ * src/textparticle.h, src/particle.h, src/CMakeLists.txt,
+ src/particle.cpp, src/imageparticle.cpp, src/vector.h,
+ src/textparticle.cpp, src/Makefile.am: Added Vector class and used it
+ in the particle engine.
+
+2007-08-27 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.cpp, src/resources/mapreader.cpp: Made client search for
+ both compressed and non-compressed map files.
+
+2007-08-27 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Assigned unused emotions to Alt +/-. (applied a patch
+ by Quiche_on_a_leash).
+ * data/maps/new_1-1.tmx, data/maps/new_1-1.tmx.gz,
+ data/maps/new_10-1.tmx, data/maps/new_10-1.tmx.gz,
+ data/maps/new_11-1.tmx, data/maps/new_11-1.tmx.gz,
+ data/maps/new_12-1.tmx, data/maps/new_12-1.tmx.gz,
+ data/maps/new_13-1.tmx, data/maps/new_13-1.tmx.gz,
+ data/maps/new_14-1.tmx, data/maps/new_14-1.tmx.gz,
+ data/maps/new_15-1.tmx, data/maps/new_15-1.tmx.gz,
+ data/maps/new_16-1.tmx, data/maps/new_16-1.tmx.gz,
+ data/maps/new_17-1.tmx, data/maps/new_17-1.tmx.gz,
+ data/maps/new_18-1.tmx, data/maps/new_18-1.tmx.gz,
+ data/maps/new_19-1.tmx, data/maps/new_19-1.tmx.gz,
+ data/maps/new_2-1.tmx, data/maps/new_2-1.tmx.gz,
+ data/maps/new_20-1.tmx, data/maps/new_20-1.tmx.gz,
+ data/maps/new_3-1.tmx, data/maps/new_3-1.tmx.gz,
+ data/maps/new_4-1.tmx, data/maps/new_4-1.tmx.gz,
+ data/maps/new_5-1.tmx, data/maps/new_5-1.tmx.gz,
+ data/maps/new_6-1.tmx, data/maps/new_6-1.tmx.gz,
+ data/maps/new_7-1.tmx, data/maps/new_7-1.tmx.gz,
+ data/maps/new_8-1.tmx, data/maps/new_8-1.tmx.gz,
+ data/maps/new_9-1.tmx, data/maps/new_9-1.tmx.gz: Replaced compressed
+ maps with layer compressed maps.
+
+2007-08-26 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/updatewindow.cpp, src/main.cpp, tmw.cbp: Removed home dir
+ from config file to avoid encoding issues.
+
+2007-08-26 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/gui/button.cpp: Fixed incorrect button dimensions, as they mess
+ OpenGL display with rectangle textures.
+ * src/graphics.cpp, src/openglgraphics.h, src/graphics.h,
+ src/openglgraphics.cpp: Fixed fonts not being recolored by adding an
+ explicit parameter to require it.
+
+2007-08-25 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * configure.ac: Removed dependency on Guichan's OpenGL library.
+ * src/Makefile.am, src/resources/sdlimageloader.cpp,
+ src/resources/sdlimageloader.h, src/resources/openglsdlimageloader.h,
+ src/resources/openglsdlimageloader.cpp, src/resources/imageloader.cpp,
+ src/resources/imageloader.h, src/gui/gui.cpp, src/gui/gui.h: Replaced
+ Guichan's image loaders with our owns, so that we have control over all
+ the images used as textures.
+ * src/resources/image.cpp, src/openglgraphics.h, src/resources/image.h,
+ src/openglgraphics.cpp, src/graphics.cpp, src/graphics.h: Added support
+ for rectangle OpenGL textures when available, in order to reduce video
+ memory usage.
+
+2007-08-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/gui.h, src/gui/gui.cpp: Removed useless logic method and
+ reverted mouse cursor to non-static since there can be only one Gui
+ instance so there is no point in supporting a shared resource.
+ * src/gui/window.cpp, src/gui/gui.h: Removed unnecessary
+ Gui::isCustomCursor method.
+ * src/gui/char_select.h, src/gui/char_select.cpp, src/utils/trim.h:
+ Added trimming of name for new character creation.
+ * src/net/chathandler.cpp: Added trimming of chat messages appearing
+ above players.
+ * src/gui/window.cpp, src/gui/window.h: Improved resize mouse cursor
+ indication, removing duplicated code and fixing indicator above resize
+ grip.
+
+2007-08-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/viewport.h, src/gui/viewport.cpp: Removed two useless popup
+ related methods.
+ * src/gui/debugwindow.h, src/gui/debugwindow.cpp: Use generic close
+ button functionality.
+ * src/particle.h, src/particleemitter.cpp, src/particle.cpp: Renamed
+ Particle::mVector to Particle::mVelocity for clarity.
+ * src/localplayer.cpp, src/gui/ministatus.cpp, src/gui/status.cpp,
+ src/being.cpp, src/net/charserverhandler.cpp,
+ src/net/playerhandler.cpp, src/localplayer.h, src/being.h: Changed XP
+ gaining effect to appear on the player instead.
+ * data/graphics/gui/hits_yellow.png: Restored shadow of yellow font.
+
+2007-08-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/itemshortcutcontainer.h: Fixed compiler warning.
+ * src/CMakeLists.txt, src/Makefile.am: Updated source lists.
+ * data/graphics/gui/CMakeLists.txt, data/graphics/gui/Makefile.am:
+ Added close button and item shortcut backgrounds to files that will be
+ installed.
+ * src/gui/itemshortcutcontainer.cpp: Make sure mGridWidth and
+ mGridHeight are initialized properly (fixes arithmetic exception in
+ ItemShortcutContainer::draw).
+ * src/keyboardconfig.cpp: Changed default sitting key back to 's'.
+ * src/net/equipmenthandler.cpp: Removed a line that attempted to set
+ the player's weapon sprite with each kind of equipment. Seems to work
+ fine without as well.
+ * src/gui/chat.cpp, src/utils/trim.h, src/CMakeLists.txt,
+ src/Makefile.am: Added trimming of chat messages.
+
+2007-08-22 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/chest-lightplatemail-male.png,
+ data/graphics/sprites/chest-lightplatemail-female.png,
+ data/graphics/items/armor-chest-lightplatemail.png,
+ data/graphics/tiles/woodland_indoor_x2.png: Another color correction
+ at the light platemail (looks more metalic now)
+ * data/maps/new_18-1.tmx.gz, data/maps/new_19-1.tmx.gz,
+ data/images/minimap_new_18-1.png, data/images/minimap_new_19-1.png:
+ Removed a tree that prevented people from sitting on one of the
+ benches properly. Added correct minimap to woodland village and
+ surrounding.
+
+2007-08-22 Joshua Langley <joshlangley[at]optusnet.com.au>
+
+ * data/graphics/gui/item_shortcut_bgr.png, src/game.cpp,
+ src/gui/gui.cpp, src/gui/itemcontainer.cpp,
+ src/gui/itemshortcutcontainer.cpp, src/gui/itemshortcutcontainer.h,
+ src/gui/itemshortcutwindow.cpp, src/gui/itemshortcutwindow.h,
+ src/gui/menuwindow.cpp, src/gui/setup_keyboard.cpp, src/gui/window.h,
+ src/itemshortcut.cpp, src/itemshortcut.h, src/keyboardconfig.cpp,
+ src/keyboardconfig.h, src/localplayer.cpp, src/localplayer.h,
+ src/main.cpp, src/net/inventoryhandler.cpp, src/utils/tostring.h,
+ tmw.cbp: Added item shortcut bar.
+
+2007-08-20 Joshua Langley <joshlangley[at]optusnet.com.au>
+
+ * data/graphics/gui/mouse.png, src/gui/equipmentwindow.cpp,
+ src/gui/gui.cpp, src/gui/gui.h, src/gui/inventorywindow.cpp,
+ src/gui/setup.cpp, src/gui/skill.cpp, src/gui/skill.h,
+ src/gui/status.cpp, src/gui/window.cpp, src/gui/window.h,
+ data/graphics/gui/close_button.png: Added close button functionality,
+ resize cursor cues.
+ * data/graphics/gui/hits_yellow.png, src/being.cpp, src/being.h,
+ src/gui/gui.cpp, src/localplayer.cpp, src/localplayer.h,
+ src/net/charserverhandler.cpp, src/net/playerhandler.cpp,
+ src/particle.cpp, src/particle.h: Added monster killed xp notification
+ effect.
+
+2007-08-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/equipment.xml: Fixed typo in female light plate mail.
+ * NEWS: Updated with changes since 0.0.23.
+
+2007-08-19 Joshua Langley <joshlangley[at]optusnet.com.au>
+
+ * src/keyboardconfig.cpp, src/keyboardconfig.h: Minor cleanup.
+ * src/gui/buy.cpp, src/gui/sell.cpp: Buy/sell fixed minimum quantity.
+ * src/gui/setup_keyboard.cpp, src/gui/setup_keyboard.h: Fixed bug -
+ reverts unassigned key.
+
+2007-08-17 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * tools/adler32.c: Added little program for calculating adler32
+ checksums of files.
+ * src/gui/setup_keyboard.cpp: Fixed compile issue related to array
+ bound not being an integer constant.
+
+2007-08-15 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/npcs.png, data/graphics/sprites/npc.xml:
+ Added farmer NPC for woodland village.
+
+2007-08-14 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/popupmenu.cpp, src/gui/viewport.cpp, src/gui/viewport.h,
+ tmw.cbp: Fixed popup menu requiring one more click after being used.
+
+2007-08-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/chest-lightplatemail-male.png,
+ data/graphics/sprites/chest-lightplatemail-female.png,
+ data/graphics/items/armor-chest-lightplatemail.png,
+ data/graphics/tiles/woodland_indoor_x2.png: Gave the platemail
+ armor a blue tint. Looks less boring and makes recoloring through
+ hue shifting possible.
+
+2007-08-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/particles/cookingfire.particle.xml,
+ data/graphics/particles/fireplace.particle.xml,
+ data/maps/new_20-1.tmx.gz: Added particle effects and music to the
+ woodland village indoor map.
+ * data/maps/new_19-1.tmx.gz: Added overlay effect and music to
+ woodland village outdoor map.
+ * data/maps/new_18-1.tmx.gz: Fixed some collision map errors and added
+ music and overlay effect to the surrounding of the woodland village.
+
+2007-08-07 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/npcs.png: Added two new NPCs and gave some
+ of the older NPCs a makeover to look more like the style of the new
+ playerset.
+ * data/maps/new_20-1.tmx.gz: Corrected a few mapping errors in the
+ new woodland village.
+ * data/items.xml: Tweaked description and values of the scythe.
+
+2007-08-06 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/Makefile.am, src/utils/strprintf.h, src/utils/strprintf.cpp:
+ Added a helper function for printf-formatting a (gettext) C string
+ into a dynamically-sized C++ string.
+
+2007-08-05 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/woodland_indoor.png,
+ data/graphics/tiles/woodland_indoor_x2.png,
+ data/graphics/tiles/woodland_indoor_x3.png: Added woodland
+ village indoor tilesets.
+ * data/maps/new_20-1.tmx.gz: Added woodland village indoor map.
+
+2007-07-29 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * CMake/Modules/FindLibXml2.cmake, CMake/Modules/FindLibcurl.cmake,
+ src/CMakeLists.txt: Switch to upstream CMake modules for libxml2 and
+ curl.
+
+2007-07-27 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/image.cpp: Added support for subimages of subimages.
+ * src/gui/equipmentwindow.cpp, src/gui/button.cpp, src/gui/slider.cpp,
+ src/gui/widgets/resizegrip.cpp, src/gui/widgets/dropdown.cpp,
+ src/gui/progressbar.cpp, src/gui/browserbox.cpp, src/gui/gui.cpp,
+ src/gui/radiobutton.cpp, src/gui/textfield.cpp, src/gui/playerbox.cpp,
+ src/gui/itemcontainer.cpp, src/gui/checkbox.cpp, src/gui/minimap.cpp,
+ src/gui/scrollarea.cpp, src/gui/popupmenu.cpp: Removed useless yet
+ costly dynamic casts.
+
+2007-07-25 Joshua Langley <joshlangley[at]optusnet.com.au>
+
+ * src/gui/setup.cpp, src/gui/setup_keyboard.cpp,
+ src/gui/setup_keyboard.h, src/keyboardconfig.cpp,
+ src/keyboardconfig.h, src/main.cpp: Minor changes to keyboard config,
+ keyboard setup gui re-designed.
+
+2007-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/CMakeLists.txt, src/Makefile.am: Added setup_keyboard.* and
+ keyboardconfig.* to the list of source files.
+ * src/keyboardconfig.h: Fixed initialization order.
+
+2007-07-17 Joshua Langley <joshlangley[at]optusnet.com.au>
+
+ * src/game.cpp: Only one key per function.
+ * src/main.cpp: Keyboard configuration included.
+ * src/gui/button.cpp, src/gui/button.h: Default constructor and
+ init function added.
+ * src/gui/setup.cpp: Keyboard setup tab added.
+ * src/gui/setup_keyboard.cpp, src/gui/setup_keyboard.h: Add to project
+ file, it is the keyboard setup tab.
+ * src/keyboardconfig.cpp, src/keyboardconfig.h: Add to project file,
+ the main keyboard config operations.
+
+2007-07-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/items.xml: Fixed description of silk headband.
+
+2007-07-11 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/resources/monsterdb.cpp, src/resources/monsterinfo.cpp,
+ src/resources/monsterinfo.h, src/monster.cpp: Renamed SoundEvent
+ to MonsterSoundEvent.
+ * src/resources/equipmentdb.cpp, src/resources/equipmentinfo.cpp,
+ src/resources/equipmentinfo.h: EquipmentDB now holds the type of
+ attack animation and the sounds of weapons.
+ * src/being.cpp. src/being.h, src/localplayer.cpp,
+ src/net/beinghandler.cpp, src/net/charserverhandler.cpp,
+ src/net/equipmenthandler.cpp, src/player.cpp, src/player.h: The
+ type of weapon player characters are using is now set using
+ setVisibleEquipment() instead of setWeapon() or setWeaponById().
+ * src/CMakeLists.txt, src/Makefile.AM, tmw.cbp, The Mana World.dev:
+ Updated project files and buildscripts.
+ * data/graphics/images/login-wallpaper.png: Replaced login wallpaper
+ with a new one by Irukard.
+
+2007-07-11 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/window.cpp: Fixed resizing windows by their resize grip.
+
+2007-07-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/gui.cpp, src/gui/chatinput.h, src/gui/chatinput.cpp,
+ INSTALL: Ported to Guichan 0.7.0. Unfortunately, since Guichan 0.6.x
+ didn't have a FocusListener, compatibility with older versions is
+ broken.
+
+2007-06-29 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particleemitter.cpp: Corrected some perspective
+ issues of the particle engine and fixed a crash caused by particles
+ with child emitters that have an image than isn't used elsewhere.
+ * data/maps/new-3-1.tmx.gz: Added a particle effect at the spawn point
+ in Tulimshar.
+
+2007-06-21 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/monsters.xml, data/graphics/sprites/monster-logmonster.png,
+ data/graphics/sprites/monster-logmonster.xml: Added logmonster by
+ Enigmatik (Monster ID is 23).
+ * data/items.xml, data/equipment.xml,
+ data/graphics/items/armor-chest-lightplatemail.png,
+ data/graphics/sprites/chest-lightplatemail-male.xml,
+ data/graphics/sprites/chest-lightplatemail-male.png,
+ data/graphics/sprites/chest-lightplatemail-female.png,
+ data/graphics/sprites/chest-lightplatemail-female.xml:
+ Added light platemail (see entry in items.xml for proposed specs).
+
+2007-06-16 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/resources/image.cpp: Set GL texture index to zero when an image
+ uses the SDL backend.
+
+2007-06-13 Philipp Sehmisch <tmw@crushnet.org>
+
+ * The Mana World.dev: Updated DevCpp project file.
+
+2007-06-13 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/main.cpp: Added logging of version number.
+
+2007-06-12 David Athay <ko2fan@gmail.com>
+
+ * src/net/playerhandler.cpp: Fixed bug with DEF_BONUS not updating
+ Mantis id: 0000087
+ * data/icons/The Mana World.icns: Added Mac OSX icon.
+
+2007-06-11 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.h, src/being.cpp: Fixed a bug that prevented
+ being-controlled particles from being deleted (thanks to tuchs for
+ reporting).
+
+2007-06-06 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/items.xml: Fixed defense of silk headband.
+
+2007-06-04 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/maps/new_17-1.tmx.gz: Changed the minimap image of the
+ lamp snake cave to the correct one.
+
+2007-06-03 David Athay <ko2fan@gmail.com>
+
+ * src/main.cpp, src/game.cpp: Fixed screenshot taking on OSX.
+
+2007-06-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/CMakeLists.txt, src/Makefile.am, docs/Makefile.am: Added some
+ files to be included with the release.
+ * src/utils/fastsqrt.h: Fixed warning about strict-aliasing rules.
+ * src/Makefile.am: Don't die on warnings by default.
+ * src/resources/image.cpp: Fixed image loading in software mode to not
+ check for alpha layer when images aren't 32-bit.
+ * src/graphics.cpp, src/graphics.h, src/imageparticle.cpp: Removed
+ drawImageTransparent from Graphics class, should be set on image.
+ * src/imageparticle.h, src/particleemitter.h, src/particle.h,
+ src/particleemitter.cpp, src/particle.cpp, src/imageparticle.cpp: Have
+ ParticleEmitter load a possible particle image early on and don't
+ cause a crash when the image can't be found.
+
+2007-06-02 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/winver.h, README, NEWS, CMakeLists.txt, configure.ac,
+ data/help/changes.txt, data/help/header.txt: Updated version and
+ release date and summarized changes.
+ * src/gui/chat.h, src/gui/chat.cpp: Changed color of chat messages in
+ OpenGL mode from orange to black.
+ * src/gui/sell.cpp, src/gui/buy.h, src/gui/buy.cpp, src/gui/sell.h:
+ Some cleanup of buy/sell dialog code.
+
+2007-06-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/gui/CMakeLists.txt, data/graphics/gui/Makefile.am:
+ Added target cursors to installed files.
+
+2007-05-31 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_16-1.tmx.gz: Fixed an inconsistency with the neighbor
+ map (no new walkmap required).
+
+2007-05-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/sell.cpp, src/gui/buy.cpp, src/being.cpp: A bunch of
+ lingering syntactical changes.
+ * src/gui/viewport.cpp: Added a missing include and fixed a bug with
+ cleaning up target cursor animations.
+
+2007-05-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/viewport.cpp,
+ data/graphics/gui/target-cursor-blue-s.png,
+ data/graphics/gui/target-cursor-blue-m.png,
+ data/graphics/gui/target-cursor-blue-l.png,
+ data/graphics/gui/target-cursor-red-s.png,
+ data/graphics/gui/target-cursor-red-m.png,
+ data/graphics/gui/target-cursor-red-l.png: Replaced target cursor
+ graphics with higher quality ones by Pauan.
+ * src/particle.cpp: Made bouncing particles immune against death by
+ ground contact and removed a nonsensical debugging log message. Made
+ text splash effects fade out.
+ * src/textparticle.cpp: Implemented fading in and out for text
+ particles.
+ * src/being.cpp, src/particle.cpp, src/particle.h,
+ src/textparticle.cpp, src/textparticle.h: The color values of text
+ particles are now stored in 3 integers instead of a Guichan color
+ structure.
+
+2007-05-20 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * tmw.cbp: Updated Code::Blocks project file.
+
+2007-05-20 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/buy.cpp, src/gui/sell.cpp: Unified some differences between
+ buy and sell dialog. Money label now shows money after transaction
+ instead of current money.
+ * src/gui/sell.cpp: Fixed the amount-not-reset-when-using-scrollwheel
+ bug.
+ * src/being.h, src/gui/viewport.cpp, src/gui/viewport.h: Added 3
+ different target cursor sizes.
+ * src/monster.h, src/monster.cpp, src/resources/monsterdb.cpp,
+ scr/resources/monsterinfo.h, data/monsters.xml: Target cursor size for
+ monster is read from the monsters.xml.
+ * data/graphics/gui/target-cursor-blue-s.png,
+ data/graphics/gui/target-cursor-blue-m.png,
+ data/graphics/gui/target-cursor-blue-l.png,
+ data/graphics/gui/target-cursor-red-s.png,
+ data/graphics/gui/target-cursor-red-m.png,
+ data/graphics/gui/target-cursor-red-l.png: Added temporary
+ placeholders for small and large target cursors until better versions
+ based on the original SVG are available.
+
+2007-05-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/monster-bat.png,
+ data/graphics/sprites/monster-bat.xml,
+ data/graphics/sprites/monster-flower.xml,
+ data/graphics/sprites/monster-fluffy.xml,
+ data/graphics/sprites/monster-fluffy.png,
+ data/graphics/sprites/monster-goblin-fire.xml,
+ data/graphics/sprites/monster-maggot-giant.xml,
+ data/graphics/sprites/monster-maggot.xml,
+ data/graphics/sprites/monster-mountsnake.xml,
+ data/graphics/sprites/monster-mushroom-red.xml,
+ data/graphics/sprites/monster-mushroom-spiky.xml,
+ data/graphics/sprites/monster-pinkie.xml,
+ data/graphics/sprites/monster-scorpion-black.xml,
+ data/graphics/sprites/monster-scorpion-red.png,
+ data/graphics/sprites/monster-scorpion-red.xml,
+ data/graphics/sprites/monster-skull-poison.xml,
+ data/graphics/sprites/monster-slime-green.xml,
+ data/graphics/sprites/monster-slime-red.xml,
+ data/graphics/sprites/monster-slime-rudolph.xml,
+ data/graphics/sprites/monster-slime-santa.png,
+ data/graphics/sprites/monster-slime-santa.xml,
+ data/graphics/sprites/monster-slime-yellow.xml,
+ data/graphics/sprites/monster-snake-cave.png,
+ data/graphics/sprites/monster-snake-cave.xml,
+ data/graphics/sprites/monster-snake.xml,
+ data/graphics/sprites/monster-spider.xml:
+ Adjusted offsets of monster sprites (thanks to Pauan for finding out
+ the correct offsets - I just subtracted 6 of all x offsets to take the
+ new position of the target circle in account) and committed some
+ modifications at some monster graphics by Pauan.
+
+2007-05-02 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/sprite.h, src/being.cpp, src/being.h, src/animatedsprite.cpp,
+ src/animatedsprite.h: Added methods to get the width and height of the
+ graphical representation of a sprite.
+ * src/gui/viewport.cpp: Fixed positioning of monster names and target
+ circles.
+
+2007-05-02 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp: Fixed a compiler warning.
+
+2007-05-02 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am: Add the new particle subclasses to the automake
+ configuration.
+ * src/imageparticle.h, src/textparticle.h, src/particle.h,
+ src/animationparticle.h, src/CMakeLists.txt, src/particleemitter.cpp,
+ src/animationparticle.cpp, src/particle.cpp, src/imageparticle.cpp,
+ src/textparticle.cpp, src/utils/xml.cpp, src/utils/xml.h: Split the
+ particle class into subclasses based on their appearance.
+
+2007-04-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h: Some minor code cleanups, speed
+ optimizations and a bit of documentation.
+
+2007-04-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/particles/flame.particle.xml,
+ data/graphics/particles/blaze.png: Added two files I forgot with the
+ last commit.
+ * src/resources/mapreader.cpp, src/particle.cpp,
+ src/particleemitter.cpp: Using XML child node iteration macro.
+
+2007-04-22 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/configuration.cpp, src/utils/xml.h, src/resources/mapreader.cpp,
+ src/resources/spritedef.cpp, src/resources/monsterdb.cpp,
+ src/resources/itemdb.cpp, src/resources/equipmentdb.cpp: Added a macro
+ for XML child node iterations to make the code more terse and easier
+ to read.
+ * src/resources/itemdb.cpp: Made the parameter checks more terse and
+ manageable.
+
+2007-04-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/resources/mapreader.cpp: Emitter positions are now read from map
+ files.
+ * src/engine.cpp: Removed the player follow effect used for testing.
+ * data/maps/new_4-1.tmx.gz, data/maps/new_5-1.tmx.gz: Added flame
+ effect to all lamps on the cave maps
+ * data/maps/new_9-1.tmx.gz: Added waterfall effect to the upper right
+ corner of NW woodland map.
+
+2007-04-15 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/openglgraphics.cpp: Rely on default 0 value for z axis.
+ * src/CMakeLists.txt, src/gui/window.cpp, src/gui/widgets,
+ src/gui/widgets/resizegrip.cpp, src/gui/widgets/resizegrip.h,
+ src/gui/inventorywindow.cpp, src/gui/window.h, src/Makefile.am:
+ Reimplemented window resizing. It is now once again possible to resize
+ windows using their borders (except for the top one, since that's the
+ title bar for Guichan) and the resize grip in the bottom right is much
+ easier to grab.
+ * src/gui/window.cpp: Increased minimum window height and fixed a
+ problem with setting window content size which was introduced with the
+ new resize grip.
+
+2007-04-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * data/graphics/gui/CMakeLists.txt: Added target cursor graphics to
+ the set of files to be installed.
+
+2007-03-25 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Improved programming style and documentation
+ and added some small tweaks.
+ * src/engine.cpp, src/map.cpp, src/map.h, src/resources/mapreader.cpp:
+ Prepared getting the emitter positions from the map file by storing
+ them in the Map class and setting them up from the MapReader.
+
+2007-03-22 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/simpleanimation.cpp, src/simpleanimation.h: Added new
+ constructor for simple animation that allows to build the animation
+ based on an xmlNodePtr pointing to an <animation> node.
+ * src/particle.cpp, src/particle.h: Added support for <image> and
+ <animation> childtags for effect root particles.
+ * data/graphics/particles/playerglow.particle.xml: New player follow
+ effect that demonstrates an animated root particle with an emitter.
+
+2007-04-05 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/main.cpp: Unified storage of configuration, updates and
+ screenshots in home directory.
+
+2007-04-03 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/generic-easteregg-blue.png,
+ data/graphics/items/generic-easteregg-green.png,
+ data/graphics/items/generic-easteregg-pink.png,
+ data/graphics/items/generic-easteregg-red.png,
+ data/graphics/items/generic-easteregg-teal.png,
+ data/graphics/items/generic-easteregg-yellow.png,
+ data/items.xml: Added six different easter egg item graphics for the
+ easter event. Item IDs are 1208 - 1213.
+ * data/graphics/sprites/npcs.png: Added bunny girl npc for the easter
+ event.
+
+2007-04-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/game.cpp: Screenshots are no longer saved directly in the users
+ home directory on UNIX systems but in the sub folder /.tmw/. A chatlog
+ message about the success of the screenshot saving does appear now.
+ Based on a patch by Patrick "the-me" Matthäi.
+
+2007-03-27 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Icon loading doesn't necessarily succeed, so better
+ not crash when it doesn't.
+
+2007-03-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Changed the order of network message handling and
+ logic, in order to prevent an incoming character delete message from
+ deleting the player character that was about to be drawn.
+ * src/gui/char_select.cpp: Removed useless lock/unlock calls.
+ * src/logindata.h, src/main.cpp, src/gui/login.cpp: Go back to login
+ or register state on error, depending on what the user was doing.
+ * src/gui/register.cpp: Actually use the server that is filled in.
+ * src/net/loginhandler.cpp: Fixed error message.
+ * src/net/charserverhandler.cpp: Fixed crash since now logic is called
+ after non-selected characters are deleted, by properly setting deleted
+ instances to 0 and going back to initial selection.
+ * src/main.cpp, src/net/network.h, src/net/network.cpp: Make sure that
+ when a network error occurs, the error message is available and shown
+ to the user.
+ * src/gui/register.h, src/gui/register.cpp: Only enable Register
+ button when all necessary fields are filled in.
+
+2007-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/char_select.cpp, src/gui/char_select.h,
+ src/net/charserverhandler.h, src/net/charserverhandler.cpp: Clarified
+ the error message when character creation fails and made sure the
+ character creation dialog doesn't close when creation failed.
+
+2007-03-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/login.cpp, src/gui/login.h, src/gui/register.h,
+ src/gui/register.cpp: Only enable login button when a username,
+ password and server are filled in. Pass username, password and server
+ on to the register dialog. Go back to login dialog when canceling
+ registration. Fixed a crash caused by deleting an OkDialog twice (it
+ also deletes itself). Made the register dialog a bit wider. Register
+ dialog no longer clears username field when it is invalid.
+ * src/main.cpp, data/icons/CMakeLists.txt, data/icons/Makefile.am,
+ data/icons/tmw-32x32.png: Use a 32x32 non-alpha layered window icon.
+ * tmw.cbp: Updated project file.
+ * data/icons/CMakeLists.txt, data/icons/Makefile.am, src/main.cpp,
+ data/icons/tmw-32x32.png: Removed 32x32 non-alpha layered window icon
+ again, and instead used the icon in the executable on Windows.
+
+2007-03-21 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp, src/gui/viewport.cpp, src/resources/image.h,
+ src/resources/image.cpp: Reduced amount of useless logging, calculate
+ nearest power of two in a function and only do the alpha check in
+ software mode.
+ * src/gui/login.cpp: Fixed small issue where default server didn't fit
+ in the server entry field properly.
+ * src/main.cpp: Display a progress bar and connecting status for each
+ server and display the version using a gcn::Label.
+ * src/gui/viewport.cpp, src/monster.h: Avoiding magic numbers where
+ possible (1002) and also display the target when other players are
+ targeted.
+ * src/floor_item.cpp, src/being.cpp, src/main.cpp, src/CMakeLists.txt,
+ src/gui/equipmentwindow.cpp, src/gui/viewport.cpp,
+ src/gui/itemcontainer.cpp, src/gui/viewport.h, src/engine.cpp,
+ src/animatedsprite.cpp, src/tileset.h, src/npc.cpp, src/Makefile.am,
+ src/being.h, src/resources/imageset.cpp, src/resources/animation.h,
+ src/resources/spritedef.cpp, src/resources/resourcemanager.h,
+ src/resources/spriteset.h, src/resources/imageset.h,
+ src/resources/resourcemanager.cpp, src/resources/spriteset.cpp,
+ src/resources/spritedef.h: Renamed Spriteset to ImageSet.
+
+2007-03-20 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/updatewindow.cpp: Cancel button is now disabled after
+ downloading is finished.
+
+2007-03-20 David Athay <ko2fan@gmail.com>
+
+ * src/gui/viewport.cpp: Fixed target cursor animation, and changed
+ which layer it is drawn after.
+ * src/gui/viewport.cpp, src/gui/viewport.h: Split drawing the target
+ cursor and target name into functions.
+
+2007-03-20 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/gui/mouse.png: Positioned the cursor image more
+ accurate.
+
+2007-03-19 David Athay <ko2fan@gmail.com>
+
+ * src/localplayer.cpp, src/gui/viewport.cpp, src/gui/viewport.h,
+ src/net/equipmenthandler.cpp, src/localplayer.h,
+ src/net/protocol.h: Added target cursor.
+
+2007-03-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * docs/Makefile.am, docs/tmw.6: Added man page by Patrick Matthäi.
+ * src/resources/image.cpp: Restored alpha layer check, since it should
+ be more efficient in software mode when SDL knows an image doesn't use
+ the alpha layer.
+ * data/graphics/gui/thickborder.png,
+ data/graphics/gui/vscroll_grey.png, data/graphics/gui/slider.png,
+ data/graphics/gui/vscroll_blue.png, data/graphics/gui/vscroll_red.png,
+ data/graphics/gui/deepbox.png,
+ data/graphics/sprites/monster-slime-red.png,
+ data/graphics/sprites/monster-scorpion-black.png,
+ data/graphics/sprites/monster-scorpion.png,
+ data/graphics/sprites/monster-slime-rudolph.png,
+ data/graphics/sprites/monster-snake.png,
+ data/graphics/sprites/monster-slime-santa.png,
+ data/graphics/sprites/monster-maggot.png,
+ data/graphics/sprites/monster-spider.png,
+ data/graphics/sprites/monster-scorpion-red.png,
+ data/graphics/sprites/monster-slime-yellow.png,
+ data/graphics/sprites/monster-slime-green.png,
+ data/graphics/sprites/monster-maggot-giant.png: Replaced pink pixels
+ with transparent ones.
+
+2007-03-18 Rogier Polak <rogier.l.a.polak@gmail.com>
+
+ * src/main.cpp: Added (-v) version to the arguments. (Applied a patch
+ by Patrick Matthäi).
+ * src/resources/image.cpp: Deleted the "pink code", which added
+ transparancy with SDL_SetColorKey.
+
+2007-03-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * icons/tmw.ico, icons/tmw.png, icons/tmw.xpm: Replaced icons with the
+ green globe that is also used on the website.
+
+2007-03-14 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp, src/tmw.rc, data/icons/tmw-icon.png,
+ data/icons/tmw-icon.xpm, data/icons/tmw.ico, data/icons/tmw-icon.ico,
+ data/icons/Makefile.am, data/icons/tmw.png, data/icons/tmw.xpm,
+ data/icons/CMakeLists.txt: Renamed icons to make things easier for
+ Debian packaging, and the "-icon" part was superfluous anyway.
+
+2007-03-12 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/simpleanimation.cpp, src/simpleanimation.h, src/CmakeLists.txt,
+ src/Makefile.am: Added a simple animation class that hosts a looping
+ animation without the action and direction stuff from AnimatedSprite.
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp: Used said
+ simple animation class for animated particles.
+
+2007-03-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/items/armor-head-rangerhat.png: New version of ranger
+ hat icon by Pauan.
+
+2007-03-11 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/map.cpp, src/gui/viewport.cpp: Fixed a bug that made the engine
+ not draw the last row and column of the map.
+
+2007-03-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp: Reimplemented physics mode that uses the default
+ square root function as fallback for systems where the fastInvSqrt
+ function doesn't work properly.
+ * src/particle.cpp, src/particle.h: Some performance optimizations
+ suggested by Rogier "Avaniel" Polak.
+
+2007-03-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/gui/target-cursor-blue.png,
+ data/graphics/gui/target-cursor-red.png: Added targeting cursors by
+ Pauan.
+ * data/graphics/sprites/chest-cotton-male.png,
+ data/graphics/sprites/chest-cotton-female.png: Replaced cotton shirt
+ with improved version by Pauan.
+
+2007-02-27 Philipp Sehmisch <tmw@crushnet.org>
+
+ * gui/button.cpp, src/guibutton.h,
+ src/gui/tabbedcontainer.cpp, src/gui/tabbedcontainer.h:: Tabbed
+ containers now display the button of the active tab pressed all
+ the time.
+
+2007-02-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac: Made OpenGL enabled by default.
+
+2007-02-26 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/sfx/maggot-dying1.ogg, data/sfx/maggot-hit1.ogg,
+ data/sfx/maggot-hit2.ogg, data/sfx/maggot-miss1.ogg,
+ data/sfx/pinkie-hit1.ogg, data/sfx/pinkie-miss1.ogg,
+ data/monsters.xml: New sound effects by Cosmostrator.
+
+2007-02-25 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.h, src/particleemitter.h: Just some documentation work.
+
+2007-02-22 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Added new particle property "bounce" that makes
+ particles bounce off the ground and use it with the damage numbers.
+
+
+2007-02-21 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/char-server.cpp, src/gui/updatewindow.cpp, src/gui/main.cpp,
+ src/gui/main.h: Added a new state "LOADDATA_STATE" that loads the XML
+ databases.
+ * src/resourcemanager.cpp, src/resourcemanager.h, src/main.cpp,
+ customdata/: Added a customdata dir that allows to add custom user
+ data easily. Just create a zip file with the same structure like the
+ update archives and drop it in the customdata folder and the files in
+ it override the default data and the updates.
+
+2007-02-15 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/engine.cpp: The name conflict problem with Guichan seems to be
+ solved with version 0.6.1.
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Added support for animated particles.
+ * data/graphics/particles/playerglow.particle.xml: Created a new
+ player follow particle that spawns a swarm of animated bats that
+ follow the player.
+
+2007-02-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp: Fixed a misspelled include and another
+ optimisation at the vector calculation.
+
+2007-02-08 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/utils/fastsqrt.h: Added a faster function to
+ calculate square roots and using it for hypotenuse calculations.
+ Thanks to Rogier aka Avaniel for finding the function.
+
+2007-02-07 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp: Renamed
+ Particle::MAX_PARTICLES to Particle::maxCount and read the value from
+ config ("particleMaxCount")
+ * src/particle.cpp: Added fast physics mode that replaces the
+ trigonometric calculations made for calculating the acceleration by
+ much less cpu intense but also less accurate formulas. To enable it
+ set the config option "particleFastPhysics" to "1".
+ * src/particle.cpp: Added the config option "particleEmitterSkip" that
+ allows to reduces the output of the emitters by making them spawn
+ particles only every n-th game tick.
+ * src/graphics.cpp, src/graphics.h: Added a new method
+ "drawImageTransparent" to the graphic engine that blits an image with
+ an alpha factor.
+ * src/particle.cpp: Using new drawImageTransparent method.
+
+2007-02-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Implemented die-distance (particles are deleted
+ when they reached a certain proximity to their target)
+ * src/particle.cpp: Fixed a bug in the acceleration vector calculation.
+ * src/particle.cpp, src/particle.h: Fixed a problem with particles with
+ unlimited lifetime and fade-in.
+ * data/graphics/particles/playerglow.particle.xml: And again a new
+ player follow particle. This time it demonstrates die-distance and the
+ fixed acceleration vector calculation.
+ * src/engine.cpp, data/graphics/particles/snow.particle.xml,
+ data/graphics/particles/snowflake.png: I can't stand the begging
+ anymore. Now it snows in the snow area... and the forest... and the
+ desert... and under the earth... and indoors... Are you happy now,
+ Rotonen and Elven? ;-)
+ * src/particle.cpp: Removed some debug log messages.
+ * src/being.cpp: Avoided crash when attempting to control an invalid
+ particle.
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Cleaned the includes up.
+
+2007-01-31 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Changed some variable names.
+ * data/graphics/particles/waterfall.particle.xml,
+ data/graphics/particles/waterfall-a.png: New waterfall with Modanungs
+ waterfall particle.
+ * src/particle.cpp: forgot to remove a svn conflict marker and changed
+ the order of initialisations to fix some compiler warnings.
+
+2007-01-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * tmw.cbp: Updated Code::blocks project file.
+
+2007-01-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/net/beinghandler.cpp,
+ data/graphics/particles/skillup.particle.xml: Added different particle
+ effect for job levelup.
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Renamed "alphafade" to "fade-out", added new
+ property "fade-in".
+ * data/graphics/particles/playerglow.particle.xml: Added a new player
+ effect (a fire) demonstrating how to use fade-in and fade-out to fade
+ one color into another.
+
+2007-01-29 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Added a new particle property "alphafade" that
+ makes the particles fade into alpha before their lifetime ends.
+ * src/particle.cpp, src/particle.h: fixed an issue with particles that
+ have a lifetime of 0 and an issue with the momentum property.
+ * data/graphics/particles/waterfall.particle.xml,
+ data/graphics/particles/fog-medium-white-a.png,
+ data/graphics/particles/fog-medium-white-b.png,
+ data/graphics/particles/fog-medium-white-c.png: Added fog to the
+ waterfall effect demonstrating the new alphafade feature.
+
+2007-01-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/utils/xml.cpp, src/utils/xml.h, src/particleemitter.cpp: Most
+ values are now read as floating point values from the emitter files.
+ * data/graphics/particles/fountain.particle.xml,
+ data/graphics/particles/hit.particle.xml,
+ data/graphics/particles/playerglow.particle.xml: Changed some values
+ as floating point values. Made the player follow effect magenta to
+ improve the visibility of the hit effects.
+ * src/engine.cpp, data/graphics/particles/waterfall.particle.xml:
+ Removed the fountain and added a waterfall instead.
+ * src/particle.h: Corrected the drawing order of the particles in
+ relation to the other sprites.
+ * src/gui/debugwindow.cpp, src/gui/debugwindow.h: Added particle count
+ to debug window.
+ * src/particle.cpp: Allowed momentum without acceleration and
+ implement the acceleration properly.
+ * src/utils/minmax.h, src/particleemitter.cpp, src/particleemitter.h:
+ Added a structure to hold a pair of numeric minimum and maximum values
+ and used it to store all numeric emitter properties.
+ * src/utils/randbetween.h: Removed (the functionality is now in struct
+ MinMax)
+
+2007-01-27 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/shoplistbox.cpp: Fixed compilation against Guichan 0.6.1.
+ * src/utils/randbetween.h: Fixed integer overflow causing the
+ randBetween function not to work properly on Linux.
+
+2007-01-27 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/net/beinghandler.cpp: Fixed a compiler issue.
+
+2007-01-27 Philipp Sehmisch <tmw@crushnet.org>
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h, src/engine.cpp: Emitter data is read from
+ external xml files. Reimplemented target-based particles with the
+ difference that they don't target beings or locations but other
+ particles (at the moment the host particle of the effect).
+ * src/being.cpp: Beings now move controlled particles to their center
+ instead of their upper left corner.
+ * data/graphics/particles/orb*: Added a bunch of new particles.
+ * data/graphics/particles/fountain.particle.xml: Reimplementation of
+ the fountain effect in XML.
+ * data/graphics/particles/playerglow.particle.xml: New effect that
+ spawns orbs that orbit around the origin.
+ * src/being.cpp, data/graphics/particles/hit.particle.xml: Added
+ particle effect on hit.
+ * src/net/beinghandler.cpp,
+ data/graphics/particles/levelup.particle.xml: Added particle effect on
+ levelup (own or other player).
+
+2007-01-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp: Initialized all variables of the particles in the
+ constructor.
+ * src/particleemitter.cpp, src/particleemitter.h: minor cleanups.
+
+2007-01-22 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/being.cpp, src/being.h, src/particle.cpp, src/particle.h
+ src/particleemitter.cpp, src/particleemitter.h, src/engine.cpp:
+ Particle effects are now created in child particles of the root
+ particle. Particle emitters have no longer a being they check every
+ frame. Instead beings have the ability to take control of particles.
+
+2007-01-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h, src/particleemitter.cpp,
+ src/particleemitter.h: Implemented emitters that follow a being.
+ * src/engine.cpp: Added an emitter that follows the local player.
+ * src/particle.cpp: Fixed the crash on exit (reason was that the
+ mSpriteIterator wasn't initialized in every case)
+
+2007-01-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/particle.h, src/particle.cpp, src/CMakeLists.txt,
+ src/Makefile.am: Fixed compilation issues on Linux.
+
+2007-01-15 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/game.cpp, src/particle.cpp, src/particle.h,
+ src/particleemitter.h: Made the particle count global and more
+ performant.
+
+2007-01-14 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/main.cpp, src/gui/trade.cpp, src/gui/sell.cpp,
+ src/gui/connection.cpp, src/gui/buddywindow.cpp, src/gui/browserbox.h,
+ src/gui/char_server.cpp, src/gui/window.cpp, src/gui/login.cpp,
+ src/gui/inttextbox.h, src/gui/viewport.cpp, src/gui/button.h,
+ src/gui/shoplistbox.h, src/gui/skill.h, src/gui/item_amount.h,
+ src/gui/setup_audio.h, src/gui/newskill.cpp, src/gui/listbox.h,
+ src/gui/register.h, src/gui/setup.cpp, src/gui/npclistdialog.h,
+ src/gui/updatewindow.cpp, src/gui/button.cpp, src/gui/char_select.cpp,
+ src/gui/login.h, src/gui/setup_audio.cpp, src/gui/item_amount.cpp,
+ src/gui/setup_joystick.h, src/gui/chat.h, src/gui/npc_text.cpp,
+ src/gui/setup_video.cpp, src/gui/ok_dialog.cpp,
+ src/gui/inventorywindow.h, src/gui/gccontainer.cpp,
+ src/gui/newskill.h, src/gui/buy.h, src/gui/setup.h,
+ src/gui/itemcontainer.h, src/gui/confirm_dialog.cpp,
+ src/gui/debugwindow.cpp, src/gui/chat.cpp, src/gui/setup_joystick.cpp,
+ src/gui/updatewindow.h, src/gui/char_select.h, src/gui/buysell.h,
+ src/gui/tabbedcontainer.cpp, src/gui/inventorywindow.cpp,
+ src/gui/help.cpp, src/gui/status.h, src/gui/npc_text.h,
+ src/gui/setup_video.h, src/gui/menuwindow.cpp, src/gui/browserbox.cpp,
+ src/gui/ok_dialog.h, src/gui/buy.cpp, src/gui/itemcontainer.cpp,
+ src/gui/gccontainer.h, src/gui/buddywindow.h, src/gui/sell.h,
+ src/gui/trade.h, src/gui/inttextbox.cpp, src/gui/char_server.h,
+ src/gui/window.h, src/gui/shoplistbox.cpp, src/gui/skill.cpp,
+ src/gui/buysell.cpp, src/gui/confirm_dialog.h, src/gui/debugwindow.h,
+ src/gui/status.cpp, src/gui/listbox.cpp, src/gui/register.cpp,
+ src/gui/viewport.h, src/gui/tabbedcontainer.h,
+ src/gui/npclistdialog.cpp, src/gui/help.h, src/gui/chatinput.h,
+ src/gui/chatinput.cpp, src/net/tradehandler.cpp,
+ src/net/playerhandler.cpp: Upgraded to Guichan 0.6.0 (merge from
+ guichan-0.6.0 branch).
+ * src/winver.h, configure.ac, data/help/header.txt, NEWS, README,
+ CMakeLists.txt: Updated version to 0.0.22.1.
+
+2007-01-14 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/particle.cpp, src/particle.h; src/particleemitter.cpp,
+ src/particleemitter.h, src/utils/randbetween.h:
+ Implemented particle engine.
+ * src/engine.cpp, src/game.cpp: added calls to the particle engine
+ * data/graphics/particles/*: added a bunch of particle graphics for
+ testing purpose.
+ * particleengine-todo.txt: Added particle engine todo list (please
+ omit when merging)
+
+2007-01-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/CMakeLists.txt: Updated with regard to renaming
+ of cotton equipment.
+
+2006-01-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/debugwindow.cpp, src/gui/viewport.h: Fixed mouse coordinates
+ display in debug window.
+
+2007-01-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/viewport.cpp: Fixed initialization of mPlayerFollowMouse,
+ the lack of which sometimes caused the player to start walking when
+ clicking on the GUI.
+
+2007-01-09 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/icecave.png: Added new tiles and fixes by Nickman and
+ made some other cosmetical corrections.
+
+2007-01-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/monster-mountsnake.xml,
+ data/graphics/sprites/monster-mountsnake.png, data/monsters.xml: Added
+ brown snake by Pauan.
+
+2007-01-07 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/chest-cottonshirt-male.png,
+ data/graphics/chest-cottonshirt-male.xml,
+ data/graphics/chest-cottonshirt-female.png,
+ data/graphics/chest-cottonshirt-female.xml,
+ data/graphics/item001.png, data/equipment.xml: Added female
+ cottonshirt sprites.
+ * data/equipment.xml: Fixed some wrong armor values.
+
+2007-01-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/CMakeLists.txt, data/graphics/images/ambient/Makefile.am,
+ data/graphics/sprites/CMakeLists.txt: Synchronized build files.
+
+2006-12-12 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * tools/Purger.java: Removed purger tool.
+
+2006-12-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/tiles/christmastree.png, data/maps/new_11-1.tmx.gz:
+ Added Christmas tree by Pauan.
+ * data/graphics/sprites/head-christmastree.xml: Fixed name of image.
+ * src/resources/spriteset.cpp: Fixed index check to prevent crashing.
+ * data/graphics/sprites/head-christmastreehat.png,
+ data/graphics/sprites/head-rangerhat.png,
+ data/graphics/sprites/head-christmastree.xml,
+ data/graphics/sprites/head-antlerhat.xml,
+ data/graphics/sprites/head-santabeardhat.xml,
+ data/graphics/sprites/head-santabeardhat.png,
+ data/graphics/sprites/head-rangerhat.xml: Updates to Pauan's recent
+ sprites by Pauan.
+ * data/items.xml: Fixes to descriptions and weights by Pauan.
+
+2006-12-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/shoplistbox.cpp: Don't try to draw an icon when it is not
+ defined or failed to load properly.
+ * src/resources/image.cpp: Major rendering performance increase in
+ software mode, by not using RLE compression on loaded images while
+ most of the time, we're only drawing a small subimage of them.
+ * README, data/help/header.txt, NEWS: Filled in release dates.
+
+2006-12-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, data/graphics/items/Makefile.am,
+ data/graphics/items/CMakeLists.txt, data/graphics/images/Makefile.am,
+ data/graphics/images/CMakeLists.txt,
+ data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/CMakeLists.txt, data/graphics/Makefile.am,
+ data/graphics/CMakeLists.txt, data/maps/Makefile.am,
+ data/maps/CMakeLists.txt, data/sfx/Makefile.am,
+ data/sfx/CMakeLists.txt, data/Makefile.am, data/CMakeLists.txt:
+ Removed database files, minimaps, items, monster sprites, maps and
+ sounds from the release. They will be released dynamically only.
+ * data/graphics/tiles/snow_x3.png: Added bottom of Christmas tree by
+ pauan.
+ * src/main.cpp, src/resources/itemdb.h, src/resources/monsterdb.cpp,
+ src/resources/itemdb.cpp, src/resources/equipmentdb.cpp: Load the
+ databases at the start of the LOGIN state, after the updates are
+ loaded.
+
+2006-12-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/items/armor-head-rangerhat.png,
+ data/graphics/items/generic-redstocking.png,
+ data/graphics/items/armor-head-christmastree.png,
+ data/graphics/items/armor-head-antlerhat.png,
+ data/graphics/items/armor-head-santabeardhat.png,
+ data/graphics/sprites/head-christmastreehat.png,
+ data/graphics/sprites/head-rangerhat.png,
+ data/graphics/sprites/head-christmastree.xml,
+ data/graphics/sprites/head-antlerhat.xml,
+ data/graphics/sprites/head-santabeardhat.xml,
+ data/graphics/sprites/head-antlerhat.png,
+ data/graphics/sprites/head-santabeardhat.png,
+ data/graphics/sprites/head-rangerhat.xml, data/items.xml,
+ data/equipment.xml, data/monsters.xml: Added new Christmas themed
+ headwear by Pauan.
+ * data/graphics/items/Makefile.am, data/graphics/items/CMakeLists.txt,
+ data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/CMakeLists.txt, data/Makefile.am,
+ data/CMakeLists.txt: Updated Makefiles.
+
+2006-12-21 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, CMakeLists.txt, README, data/help/header.txt: Updated
+ version to 0.0.22.
+
+2006-12-18 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/armor-chest-vnecksweater.png: New version of
+ the inventory icon for the V-neck sweater by Saphy.
+
+2006-12-17 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/sell.cpp, src/gui/shoplistbox.h, src/gui/listbox.h,
+ src/gui/shop.cpp, src/gui/buy.cpp, src/gui/shoplistbox.cpp,
+ src/gui/listbox.cpp: Subclassed ShopListBox from ListBox to get rid of
+ some duplicated code, and fixed a problem with scrolling to the
+ current selection. Also aligned the text a bit better and put the
+ price in parenthesis.
+
+2006-12-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/connection.cpp, src/gui/chargedialog.cpp: Fixed dialog
+ visibility.
+ * src/localplayer.cpp, src/game.cpp, src/localplayer.h: Fixed issues
+ with walking one tile too many and changing direction towards an
+ obstacle.
+
+2006-12-15 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/desert1.png: Removed some unused legacy tiles and
+ added variant tiles for the cliffs.
+
+2006-12-14 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/engine.h, src/engine.cpp: Removed the rather
+ useless remaining draw function from the engine class.
+ * src/being.cpp, src/being.h: Fixed an issue with fading out damage
+ texts (they were sometimes fully opaque at the end of fading out).
+
+2006-12-12 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h, src/main.cpp:
+ Added Adler32 checksum for updates.
+ * src/net/playerhandler.cpp: Fixed crash when selecting an item after
+ death.
+ * data/items.xml: Fixed defense values for sweaters.
+ * src/net/playerhandler.cpp: Hide all NPC dialogs after death.
+
+2006-12-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/animatedsprite.h, src/CMakeLists.txt, src/animatedsprite.cpp,
+ src/resources/action.h, src/resources/animation.h,
+ src/resources/spritedef.cpp, src/resources/action.cpp,
+ src/resources/animation.cpp, src/resources/spritedef.h: Moved
+ Action, Animation and Frame (renamed from AnimationPhase) classes into
+ the resources directory, since they are part of the SpriteDef class.
+ * src/CMakeLists.txt, src/utils/base64.cpp, src/utils/base64.h,
+ src/Makefile.am, src/resources/mapreader.cpp: Moved base64 module into
+ utils directory.
+ * src/engine.cpp, src/npc.cpp: Cleaned up some unused stuff.
+
+2006-12-12 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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:
+ Normalized versions of sound effects by Cosmostrator.
+
+2006-12-11 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/updatewindow.cpp: Fixed visibility of the update window.
+
+2006-12-11 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/equipment.xml, data/items.xml,
+ data/graphics/sprites/chest-tnecksweater-male.png,
+ data/graphics/sprites/chest-tnecksweater-female.png,
+ data/graphics/sprites/chest-vnecksweater-male.png,
+ data/graphics/sprites/chest-vnecksweater-female.png,
+ data/graphics/sprites/chest-tnecksweater-male.xml,
+ data/graphics/sprites/chest-tnecksweater-female.xml,
+ data/graphics/sprites/chest-vnecksweater-male.xml,
+ data/graphics/sprites/chest-vnecksweater-female.xml,
+ data/graphics/sprites/Makefile.AM,
+ data/graphics/sprites/CMakeLists.txt,
+ data/graphics/items/armor-chest-vnecksweater.png,
+ data/graphics/items/armor-chest-tnecksweater.png,
+ data/graphics/items/armor-chest-woolsweater.png,
+ data/graphics/items/Makefile.AM, data/graphics/items/CMakeLists.txt:
+ Added new sweaters by Saphy. Info for server admins: Item IDs are 564
+ for turtleneck (should already be in there) and 624 for v-neck. The
+ visible sprite IDs are 19 for turtleneck and 20 for v-neck.
+
+2006-12-11 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/main.h, src/tmw.rc, src/winver.h, The Mana World.dev, tmw.cbp:
+ Fixed windows binary version.
+
+2006-12-10 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * docs/INSTALL/win32.txt: Added more detailed instructions for Dev-C++
+ users.
+
+2006-12-09 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/npcs.png: Added pirate NPC.
+
+2006-12-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * 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/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 <bjorn@lindeijer.nl>
+
+ * 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 <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+
+2006-12-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * src/gui/item_amount.cpp: Fixed visibility of item amount window.
+
+2006-12-05 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <tmw@crushnet.org>
+
+ * data/graphics/sprites/chest-leather-female.png: A little correction
+ at the female leather shirt by mangamaniac.
+
+2006-12-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+
+2006-11-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/monster.cpp: Small fix to resource path.
+
+2006-11-29 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * tmw.cbp: Updated Code::Blocks project file.
+
+2006-11-27 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/log.cpp, src/util/wingettimeofday.h: Added implementation of
+ gettimeofday() for windows machines.
+
+2006-11-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * 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 <B.Steinbrink@gmx.de>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <tmw@crushnet.org>
+
+ * 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 <tmw@crushnet.org>
+
+ * 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 <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+
+2006-11-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * 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 <B.Steinbrink@gmx.de>
+
+ * data/graphics/sprites/CMakeLists.txt: Fixed some filenames.
+
+2006-11-17 Wai Ling Tsang <simotsa@gmail.com>
+
+ * 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 <tmw@crushnet.org>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <elvenprogrammer@gmail.com>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * 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-09 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * 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 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * 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 <bjorn@lindeijer.nl>
+
+ * data/graphics/images/login_wallpaper.png: Reverted to standard
+ wallpaper.
+ * src/resources/resourcemanager.cpp: More useful logging about
+ resources that are being loaded (including source).
+ * src/graphics.cpp, src/gui/window.cpp, src/gui/button.cpp,
+ src/gui/widgets/dropdown.cpp, src/gui/textfield.cpp,
+ src/gui/playerbox.cpp, src/gui/progressbar.cpp,
+ src/gui/scrollarea.cpp, src/graphics.h, src/CMakeLists.txt,
+ src/Makefile.am, src/graphic, src/graphic/imagerect.h: Merged the
+ definition of ImageRect into graphics.h.
+
+2006-11-05 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/Makefile.am, src/gui/buy.cpp, src/gui/buy.h, src/gui/shop.h,
+ src/gui/shop.cpp, src/gui/sell.cpp, src/gui/shoplistbox.h,
+ src/gui/shoplistbox.cpp: Added pictures to items in buy dialogs.
+ Also too expensive items are highlighted in gray and can't be
+ selected.
+ * src/gui/shop.cpp, src/gui/shop.h, src/gui.sell.h, src/gui/sell.cpp,
+ src/net/buysellhandler.cpp, src/gui/shoplistbox.h,
+ src/gui/shoplistbox.cpp: Added item's pictures in sell dialogs, and
+ 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 <B.Steinbrink@gmx.de>
+
+ * data/graphics/sprites/Makefile.am: Use tabs instead of spaces as
+ required by automake (AFAIK).
+
+2006-11-05 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/weapon0.png,
+ data/graphics/sprites/weapon2.png,
+ data/graphics/sprites/weapon-bow.xml,
+ data/graphics/sprites/weapon-dagger.xml,
+ data/graphics/sprites/weapon-fist.xml,
+ data/graphics/sprites/weapon-scythe.xml,
+ data/graphics/items/weapon-polearm-scythe.png, src/player.cpp,
+ src/player.h, src/being.cpp, src/being.h, data/items.xml: Added scythe
+ as a permanent weapon (ID: 623)
+
+2006-11-04 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h: Removed useless
+ addRow method.
+
+2006-11-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/maps/new_1-1.tmx.gz, data/maps/new_10-1.tmx.gz,
+ data/maps/new_11-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_3-1.tmx.gz, data/maps/new_7-1.tmx.gz,
+ data/maps/new_9-1.tmx.gz: Reverted Halloween map versions, except for
+ map 10 and 11 which include the latest fixes by Crush but now have
+ their night layer removed.
+
+2006-11-04 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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:
+ Added music and minimap to woodland cave level 2.
+ * data/maps/new_10-1.tmx.gz, maps/new_11-1.tmx.gz:
+ Fixed some map bugs (please update server sided walkmap)
+
+2006-11-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/updatewindow.cpp, src/main.cpp: Updated to the new default
+ updatehost.
+
+2006-11-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/gui.cpp, src/gui/browserbox.cpp,
+ data/graphics/gui/rpgfont_wider.png,
+ data/graphics/gui/browserfont.png, data/graphics/gui/fixedfont.png:
+ Added support for å and Å (with help of Håkan Rönn).
+
+2006-10-31 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/desert1.png, data/graphics/tiles/desert_x2.png:
+ Adding a bunch of graphical improvements made by VxD.
+
+2006-10-31 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/sprites/item011.png,
+ data/graphics/sprites/item011.xml, data/graphics/sprites/item012.png,
+ data/graphics/sprites/item018.xml,
+ data/graphics/sprites/monster21.xml: Fixed some graphical issues,
+ mostly a cosmetic update.
+
+2006-10-30 Yohann Ferreira <bertram@cegetel.net>
+
+ * debian/changelog: Updated the package's version.
+
+2006-10-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_9-1.tmx.gz: Removed the night effect that accidentally
+ sneaked in with the last map change.
+
+2006-10-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/tmw.rc: Updated Windows binary version.
+ * data/help/header.txt, NEWS, README: Fixed some release dates and
+ versions.
+ * data/graphics/items/armor-head-axehat.png,
+ data/graphics/items/armor-head-bandana.png,
+ data/graphics/items/armor-head-circlet.png,
+ data/graphics/items/armor-head-eyepatch.png,
+ data/graphics/items/armor-head-goggles.png,
+ data/graphics/items/armor-head-leathergoggles.png,
+ data/graphics/items/armor-head-piratehat.png,
+ data/graphics/items/armor-head-pumpkinhelmet.png,
+ data/graphics/items/Makefile.am, data/items.xml: Added new items.
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/monster21.png,
+ data/graphics/sprites/monster21.xml,
+ data/graphics/sprites/monster22.png,
+ data/graphics/sprites/monster22.xml: Added new monsters.
+ * data/graphics/sprites/item011.png, data/graphics/sprites/item011.xml,
+ data/graphics/sprites/item012.png, data/graphics/sprites/item012.xml,
+ data/graphics/sprites/item013.png, data/graphics/sprites/item013.xml,
+ data/graphics/sprites/item014.png, data/graphics/sprites/item014.xml,
+ data/graphics/sprites/item015.png, data/graphics/sprites/item015.xml,
+ data/graphics/sprites/item016.png, data/graphics/sprites/item016.xml,
+ data/graphics/sprites/item017.png, data/graphics/sprites/item017.xml,
+ data/graphics/sprites/item018.png, data/graphics/sprites/item018.xml,
+ data/graphics/sprites/Makefile.am: Added new visible equipments.
+ * data/graphics/images/login_wallpaper.png, data/maps/new_1-1.tmx.gz,
+ data/maps/new_10-1.tmx.gz, data/maps/new_11-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_3-1.tmx.gz,
+ data/maps/new_7-1.tmx.gz, data/maps/new_9-1.tmx.gz: Halloween related
+ contents.
+ * data/graphics/items/Makefile.am: Fixed wrong filename.
+ * data/graphics/sprites/Makefile.am: Fixed wrong filenames.
+ * data/graphics/sprites/weapon0.png: Replaced knife with scythe.
+
+2006-10-30 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * data/graphics/items/CMakeLists.txt: Synced with autotools config.
+ * data/graphics/items/CMakeLists.txt: Added new items to CMake config.
+ * src/being.cpp: Properly initialize sprite vector.
+
+2006-10-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, The Mana World.dev, CMakeLists.txt,
+ data/help/header.txt, NEWS: Set version to 0.0.21.1.
+ * src/player.cpp: Fixed excessive unnecessary reloading of sprites.
+
+2006-10-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.c: Reload wallpaper after updates are fetched.
+ * data/graphics/sprites/Makefile.am: Added monster20.
+
+2006-10-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/monster20.png,
+ data/graphics/sprites/monster20.xml,
+ data/graphics/sprites/CMakeLists.txt:
+ Added pumpkin ghost monster for halloween event.
+ * data/maps/new_9-1.tmx.gz: Fixed a map discrepancy between
+ new_9-1 and new_14-1 (no new walkmap required). Thanks to QOAL
+ for reporting.
+
+2006-10-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/images/ambient/night.png: added graphic for night
+ ambient effect.
+
+2006-10-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac: Added zlib check before PhysFS check. The PhysFS check
+ was failing on MSYS because of a missing -lz.
+
+2006-10-22 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * CMakeLists.txt, src/CMakeLists.txt: Add PACKAGE_VERSION support.
+ * CMakeLists.txt, src/CMakeLists.txt: Setup the binary dir in the main
+ CMakeLists.txt file.
+ * src/main.h: Include config.h only when we have it.
+ * src/CMakeLists.txt: Properly set build flags for the tmw target.
+
+2006-10-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/CMakeLists.txt, data/graphics/tiles/CMakeLists.txt,
+ data/graphics/items/CMakeLists.txt, data/graphics/gui/CMakeLists.txt,
+ data/graphics/images/ambient/CMakeLists.txt,
+ data/graphics/images/CMakeLists.txt,
+ data/graphics/sprites/CMakeLists.txt, data/maps/CMakeLists.txt,
+ data/sfx/CMakeLists.txt, data/help/CMakeLists.txt,
+ data/icons/CMakeLists.txt, data/CMakeLists.txt, CMakeLists.txt: Add
+ TMW_DATADIR definition.
+
+2006-10-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/CMakeLists.txt: Adjusted path for Windows.
+
+2006-10-16 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * CMakeLists.txt: Enable OpenGL by default.
+ * CMake/Modules/FindLibcurl.cmake: Fix libcurl library not being
+ marked as advanced option.
+ * CMakeLists.txt, src/CMakeLists.txt: Add OpenGL option.
+ * data/CMakeLists.txt: Adjust data destination for Windows.
+ * src/CMakeLists.txt: Adjust binary destination for Windows.
+ * src/CMakeLists.txt, data/graphics/tiles/CMakeLists.txt,
+ data/graphics/items/CMakeLists.txt, data/graphics/gui/CMakeLists.txt,
+ data/graphics/images/ambient/CMakeLists.txt,
+ data/graphics/images/CMakeLists.txt,
+ data/graphics/sprites/CMakeLists.txt, data/graphics/CMakeLists.txt,
+ data/maps/CMakeLists.txt, data/sfx/CMakeLists.txt,
+ data/help/CMakeLists.txt, data/icons/CMakeLists.txt,
+ data/CMakeLists.txt, CMakeLists.txt: Add CMake install support.
+ * CMake/Modules/FindGuichan.cmake, CMake/Modules/FindLibXml2.cmake,
+ CMake/Modules/FindLibcurl.cmake, CMakeLists.txt, src/CMakeLists.txt:
+ Add basic CMake support for building tmw.
+
+2006-10-12 Yohann Ferreira <bertram@cegetel.net>
+
+ * debian/rules, debian/tmw-data.install, debian/tmw-data.dirs,
+ debian/tmw-music.install, debian/changelog: Updating Debian files for
+ bug fixing.
+
+2006-10-12 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * /data/graphics/sprites/npcs.png: Updated the clothes salesman,
+ it was way out of date.
+
+2006-10-12 Cédric Borgese <cedric.borgese@gmail.com>
+
+ * data/graphics/tiles/Woodland_x3.png: Enlarge the trunk and the
+ base of the trees in the woodland tileset.
+
+2006-10-09 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/gui/buysell.cpp, src/gui/buy.cpp : A little tweak to the buy
+ dialogs.
+
+2006-10-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/resources/mapreader.cpp: Added support for gzip compressed map
+ layers.
+ * configure.ac, The Mana World.dev: Increased version to 0.0.22.
+ * src/map.cpp: Removed unused setSize method. Also introduced
+ initializeOverlays method and removed the confusing setOverlay (which
+ actually added one).
+ * src/properties.h: Added convenience method to read a property as a
+ float.
+ * src/map.cpp, src/resources/ambientoverlay.cpp,
+ src/resources/ambientoverlay.h: Resolved some weirdness involving
+ the terms scroll and speed.
+
+2006-10-07 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+
+2006-10-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/item006.xml,
+ data/graphics/sprites/item007.xml,
+ data/graphics/sprites/item008.xml,
+ data/graphics/sprites/item009.xml,
+ data/graphics/sprites/item006.png,
+ data/graphics/sprites/item007.png,
+ data/graphics/sprites/item008.png,
+ data/graphics/sprites/item009.png,
+ data/graphics/sprites/item010.xml,
+ data/graphics/sprites/item010.png: Removed empty frames from
+ headgears.
+
+2006-10-03 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/map.cpp, src/map.h, src/Makefile.am,
+ src/resources/mapreader.cpp, src/resources/ambientoverlay.cpp,
+ src/resources/ambientoverlay.h: Turned AmbientOverlay into a class.
+ Cleaned up the associated code.
+
+2006-10-01 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * tools/Purger.java: Added a tool to purge old accounts from eAthena's
+ database files.
+
+2006-10-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/gui/trade.cpp, src/gui/inventorywindow.cpp:
+ Accepted patches by GDO and VictorSan that fix problems with hiding
+ windows using h and problems with trade window positioning.
+
+2006-09-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/map.cpp: Fix random crashes when map tiles are missing.
+
+2006-09-28 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/maps/new_2-1.tmx.gz: Matt Howe fixed up cave map.
+
+2006-09-26 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/maps/new_6-1.tmx.gz: Alderan fixed a map issue.
+
+2006-09-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/hairstyle*.png,
+ data/graphics/sprites/hairstyle*.xml, tools/Reorganize.java: Removed
+ unused frames from the hairsets.
+ * src/resources/image.h: Defined NO_SDL_GLEXT to prevent a
+ redefinition when gl.h also tries to define OpenGL extensions (patch
+ accepted from Rogier Polak).
+
+2006-09-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/maps/new_5-1.tmx.gz: Accepted new version by Matt Howe, fixing
+ several mapping issues.
+
+2006-09-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/tiles/Makefile.am: Added missing tileset.
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h: Made canceling the
+ update process non-blocking (Patch by VictorSan).
+
+2006-09-21 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animation.cpp, src/animation.h, src/animatedsprite.cpp,
+ src/animatedsprite.h: Removed some obsolete code and implemented
+ the posibility to define an <end /> token in the <animation>s
+ that allows to define an animation that doesn't loop and returns
+ to the STAND animation when finished.
+ * data/graphics/sprites/hairstyle*.xml,
+ data/graphics/sprites/item0*.xml,
+ data/graphics/sprites/monster*.xml,
+ data/graphics/sprites/weapons.xml: Used the <end /> token for all
+ attack animations fixing the problem with looping monster attack
+ animations.
+
+2006-09-20 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/generic-whitefur.png,
+ data/graphics/items/generic-cavesnakelamp.png,
+ data/graphics/items/generic-hardspike.png,
+ data/graphics/items/generic-pinkantennae.png,
+ data/graphics/items/Makefile.am, data/items.xml: Added drops for new
+ monsters.
+ * src/gui/setup.cpp, src/gui/setup_video.cpp,
+ src/gui/setup_video.h: Added a slider for controlling the overlay
+ detail to the video setup dialog based on a patch by VictorSan.
+ * data/maps/new_14-1.tmx.gz, data/maps/new_16-1.tmx.gz: Added cloud
+ effect and minimap.
+ * data/images/Makefile.am: Updated makefile.
+
+2006-09-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/Makefile.am: Added missing monster19 sprite.
+
+2006-09-17 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/maps/Makefile.am: Added missing maps.
+ * data/maps/new_10-1.tmx.gz: Disabled layer compression.
+
+2006-09-18 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_9-1.tmx.gz: Fixed some mapping bugs (new walkmap
+ required).
+
+2006-09-17 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/maps/new_10-1.tmx.gz: Fixed transparent snow issue (Fix by
+ Pajarico).
+
+2006-09-17 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp: Stop using the sticky window attribute which is
+ unneeded for the current implementation, instead adjust the set of
+ affected windows by the 'hide' shortcut.
+
+2006-09-17 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_14-1.tmx.gz, data/maps/new_15-1.tmx.gz,
+ data/maps/new_16-1.tmx.gz: fixed some mapping errors.
+
+2006-09-16 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animatedsprite.cpp, src/animatedsprite.h: Fixed the crash when
+ attacking without a weapon, some additional stability improvements and
+ more descriptive variable names in the parsing algorithmn.
+
+2006-09-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/help/changes.txt, data/help/header.txt, NEWS, README,
+ src/tmw.rc: Updated release infos.
+
+2006-09-14 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animation.h, src/animatedsprite.h,
+ data/graphics/sprites/weapon.xml: Some modifications at the animation
+ system. No more "undefined action foo" warnings in the tmw.log. Not
+ visible actions must now be declared explicitly.
+ * data/graphics/images/ambient/sandstorm.png,
+ data/graphics/images/ambient/clouds.png: Improved quality of the overlay
+ graphics.
+
+2006-09-14 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/char_select.cpp: Remove debug output.
+ * src/gui/char_select.cpp, src/main.cpp: Fix the character name
+ matching loop and add support for saving the last used character
+ (based on a patch by Andrew Harrison).
+ * src/gui/char_select.cpp, src/gui/char_select.h, src/main.cpp: Clean
+ up the player selection stuff, it's a bit nicer now.
+ * src/main.cpp: Fix up the player selection command line option.
+
+2006-09-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/game.h: Simplified fps limiting a bit and added
+ some comments. Now based on ConfigListener so that the fpslimit option
+ doesn't need to be queried the whole time.
+ * NEWS: Updated with some items.
+
+2006-09-11 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Fixed more fps issues.
+
+2006-09-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/gui.cpp: Removed easy targeting functionality since it
+ interferes with walking around too much. Targeting can still be rather
+ conveniently done with 'a' or the middle mouse button.
+
+2006-09-07 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/resources/image.cpp: Fixed a typo.
+ * src/resources/image.cpp: Worked around a memory leak when using
+ OpenGL.
+
+2006-09-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/item010.png, data/graphics/sprites/item010.xml,
+ data/graphics/sprites/Makefile.am: Added santa hat sprites and updated
+ makefile.
+
+2006-09-06 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp, src/gui/setup_video.cpp, src/main.cpp: Fixed fps
+ limiter issues and increased default limit to 60.
+ * src/game.cpp: Fixed fps limiter when disabled.
+
+2006-09-05 Philipp Sehmisch <tmw@crushnet.org>
+ * data/graphics/tiles/Woodland_ground.png,
+ data/graphics/tiles/Woodland_x2.png,
+ data/graphics/tiles/Woodland_x3.png: Some minor improvements and
+ additions at my tilesets.
+ * data/graphics/sprites/monster0.xml,
+ data/graphics/sprites/monster1.xml,
+ data/graphics/sprites/monster2.xml,
+ data/graphics/sprites/monster3.xml,
+ data/graphics/sprites/monster4.xml,
+ data/graphics/sprites/monster5.xml,
+ data/graphics/sprites/monster6.xml,
+ data/graphics/sprites/monster8.xml,
+ data/graphics/sprites/monster9.xml,
+ data/graphics/sprites/monster11.xml,
+ data/graphics/sprites/monster13.xml,
+ data/graphics/sprites/monster0.xml: Adjusted the animation speed of
+ several monsters.
+
+2006-09-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/floor_item.cpp, src/gui/equipmentwindow.cpp, src/gui/sell.cpp,
+ src/gui/trade.cpp, src/gui/inventorywindow.h,
+ src/gui/selectionlistener.h, src/gui/itemcontainer.h,
+ src/gui/inventorywindow.cpp, src/gui/buy.cpp,
+ src/gui/itemcontainer.cpp, src/gui/popupmenu.cpp, src/item.h,
+ src/net/inventoryhandler.cpp, src/Makefile.am,
+ src/resources/itemmanager.h, src/resources/iteminfo.cpp,
+ src/resources/iteminfo.h, src/resources/itemmanager.cpp: Introduced
+ SelectionListener to fix updating problem in inventory window (should
+ also be used to fix similar problem in trade, buy and sell dialogs).
+ Made the ItemInfo be passed around as a reference instead of a pointer,
+ since it is never NULL.
+ * src/gui/trade.cpp, src/gui/trade.h: Fixed updating of labels in
+ trade window.
+ * src/gui/sell.cpp, src/gui/listbox.h, src/gui/inventorywindow.h,
+ src/gui/buy.h, src/gui/buy.cpp, src/gui/sell.h, src/gui/listbox.cpp:
+ Fixed updating of labels in buy and sell dialogs. Also made our
+ listbox respond to mouse dragging to change the selection.
+
+2006-09-02 Bernard Lidicky <bernard@matfyz.cz>
+
+ * src/game.cpp, src/beingmanager.h, src/gui/gui.cpp,
+ src/beingmanager.cpp, src/localplayer.h, README,
+ data/help/commands.txt, NEWS: Added targeting nearest monster with
+ either keyboard or mouse. Also made clicking beings in general a bit
+ easier (patch applied by Bjørn Lindeijer).
+
+2006-09-01 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/monster19.png,
+ data/graphics/sprites/monster19.xml, data/graphics/tiles/arena.png,
+ data/graphics/tiles/cave.png, data/maps/new_17-1.tmx.gz,
+ data/maps/new_6-1.tmx.gz: Added new big cave map, lamp-snake monster,
+ improved arena map.
+
+2006-08-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/item007.png,
+ data/graphics/sprites/item007.xml, data/graphics/sprites/item009.png,
+ data/graphics/sprites/item009.xml:
+ Added sprites for miners helm and standard headband.
+
+2006-08-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/map.cpp, src/beingmanager.h, src/gui/minimap.cpp,
+ src/engine.cpp, src/beingmanager.cpp: It's better to use a reference
+ when you don't need a pointer.
+ * NEWS: Updated with addition of config file option.
+
+2006-08-29 Andrew Harrison <atharris@users.sourceforge.net>
+
+ * src/main.cpp: Added command line option to specify which
+ configuration file to use (patch applied by Bjørn Lindeijer).
+
+2006-08-29 Matthias Hartmann <hartmann.matthias@gmail.com>
+
+ * data/graphics/sprites/item006.png,
+ data/graphics/sprites/item006.xml, data/graphics/sprites/item008.xml:
+ Fixed fancy hat + silk headband positions.
+
+2006-08-29 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/item008.png,
+ data/graphics/sprites/item008.xml, data/graphics/sprites/Makefile.am:
+ Added fancy hat sprite.
+
+2006-08-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/setup_video.cpp: Modified the ranges of the ScrollLaziness
+ and ScrollRadius sliders.
+
+2006-08-28 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/items/*: Changed svn properties.
+ * data/graphics/sprites/item001.xml, data/graphics/sprites/item002.xml,
+ data/graphics/sprites/item003.xml, data/graphics/sprites/item004.xml,
+ data/graphics/sprites/item005.xml, data/graphics/sprites/item006.png,
+ data/graphics/sprites/item006.xml, data/graphics/sprites/Makefile.am:
+ Added headband and fixed svn properties.
+
+2006-08-27 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/net/inventoryhandler.cpp: Applied patch by Andrew Harrison that
+ adds item pickup messages to the chat window.
+ * NEWS: Updated with some recently added and fixed issues. Doesn't
+ mention any of the recent content updates yet.
+
+2006-08-26 Pascal Ganaye <pascalganaye@users.sourceforge.net>
+
+ * src/joystick.h, src/joystick.cpp, src/gui/setup.cpp,
+ src/gui/setup_joystick.h, src/gui/setup_video.cpp,
+ src/gui/setup_joystick.cpp, src/gui/setup_video.h: Added sliders to
+ the video section of the setup window to configure the laziness and
+ radius of the scrolling behaviour. Added a checkbox to the joystick
+ section to allow enabling/disabling the joystick (patch applied by
+ Bjørn Lindeijer).
+
+2006-08-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/ministatus.cpp, src/gui/ministatus.h: Applied patch by mrha
+ (Herbi), adding experience bar to the ministatus in the top left.
+ * configure.ac, data/graphics/items/Makefile.am,
+ data/graphics/Makefile.am: Added Makefile.am to make sure the item
+ icons are installed.
+ * src/player.cpp, src/animation.h, src/player.h,
+ src/animatedsprite.cpp, src/animation.cpp: Applied patch by Bahamut81
+ which implements resetting of Animation, Action and AnimatedSprite.
+ This fixes the animation synchronization issues.
+
+2006-08-25 Matthias Hartmann <hartmann.matthias@gmail.com>
+
+ * src/gui/char_select.cpp, src/gui/char_select.h, src/main.cpp: Added
+ --playername command line option for selecting the character you want
+ to play with (patch applied by Bjørn Lindeijer).
+
+2006-08-25 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/engine.cpp, src/map.h, src/map.cpp: Addded new config variable
+ "OverlayDetail" to control the number of drawn overlays.
+ 2 (or more) = all (default), 1 = only the first one, 0 = none.
+
+2006-08-24 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/help/commands.txt, README, src/game.cpp, src/gui/chat.cpp,
+ src/gui/window.cpp, src/gui/window.h: Added support for sticky windows
+ as discussed with doener. Patch by Andrew Harrison.
+ * data/items.xml: Added jeans shorts.
+
+2006-08-24 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/engine.cpp: Scrolling speed no longer affected by framerate.
+ * src/map.cpp, scr/map.h: Overlay speed no longer affected by
+ framerate.
+ * data/maps/new_1-1.tmx.gz, data/graphics/new_7-1.tmx.gz,
+ data/graphics/images/ambient/sandstorm.png: Redone sandstorm effect
+ (larger and more transparent image, tripple layer parallax scrolling)
+
+2006-08-24 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/sprites/item004.png,
+ data/graphics/sprites/item005.png, data/graphics/sprites/Makefile.am,
+ data/graphics/items/armor-legs-cottonshorts,
+ data/graphics/items/armor-legs-jeanshorts: Added the equip graphics of
+ the short jeans and the cotton shorts and an inventory icon of the
+ cotton shorts. Also added all added files to the makefile.
+
+2006-08-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_7-1.tmx.gz: Fixed a minor mapping bug reported on the
+ forum (no new walkmap required).
+ * data/maps/new_9-1.tmx.gz: Fixed two minor mapping bugs (new walkmap
+ required).
+
+2006-08-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, data/graphics/images/ambient,
+ data/graphics/images/ambient/Makefile.am,
+ data/graphics/images/Makefile.am: Updated makefiles to account for new
+ ambient images and changed the version from 0.0.20.1 to 0.0.21.
+
+2006-08-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, tmw.cbp: Updated project files.
+
+2006-08-21 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/mapreader.cpp: Added logic for initialisation of the overlays.
+ * src/map.cpp, src/map.h: Code for updating and drawing the overlays.
+ * src/engine.cpp, src/engine.h: Added smooth scrolling and the call
+ to draw the overlays.
+ * data/maps/new_1-1.tmx.gz, data/graphics/new_7-1.tmx.gz,
+ data/graphics/images/ambient/sandstorm.png: Added sandstorm effect
+ to the desert maps outside of the city (feedback, please).
+ * data/maps/new_2-1.tmx.gz, data/maps/new_4-1.tmx.gz,
+ data/maps/new_5-1.tmx.gz, data/graphics/images/ambient/spotlight.png
+ Added spotlight effect to the cave maps (feedback, please)
+ * data/graphics/maps/new_9-1.tmx.gz,
+ data/graphics/images/ambient/clouds.png:
+ Added cloudshadow effect to the woodland map (feedback, please).
+
+2006-08-20 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac: Moved libpng check before SDL_image check, since the
+ latter requires the former.
+
+2006-08-20 Yohann Ferreira <bertram@cegetel.net>
+
+ * data/graphics/sprites/Makefile.am: Following the splitting from
+ Philipp, moved out the items.png file from the Makefile.am.
+ * debian/control, debian/tmw-data.install: Updated debian package
+ creation process.
+ * src/Makefile.am: Added iteminfo.cpp to avoid an undefined reference
+ with gcc 4.1.2. Happy to be back :)
+
+2006-08-17 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/items/*: Splitted the items.png into separate images
+ with more distinctive names. (no, i won't list all 114)
+ * src/itemmanager.cpp, data/items.xml: Replaced indices on the item
+ spriteset with filenames. added names and descriptions for all missing
+ items. Changed names and descriptions of some items.
+ * src/engine.cpp: Removed global item spriteset.
+ * src/floor_item.cpp, src/floor_item.h, src/iteminfo.cpp,
+ src/iteminfo.h, src/equipmentwindow.cpp, src/equipmentwindow.h,
+ src/itemcontainer.cpp, src/itemcontainer.h: The iteminfo class now
+ provides a pointer to the item icon image instead of providing the
+ index on the item spriteset.
+ * data/graphics/tiles/trans_desert-woodland.png: Added transmission
+ tileset between desert and woodland.
+
+2006-08-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/monster18.png,
+ data/graphics/sprites/monster18.xml,
+ data/graphics/sprites/npcs.png: Added new monster and npcs.
+ * src/gui.cpp, tmw.cbp, The Mana World.dev: Fixed Guichan 0.5.0
+ compilation issues.
+
+2006-08-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/openglgraphics.cpp, src/game.cpp, src/main.cpp,
+ src/gui/buddywindow.cpp, src/gui/connection.cpp, src/gui/sell.cpp,
+ src/gui/trade.cpp, src/gui/char_server.cpp, src/gui/window.cpp,
+ src/gui/login.cpp, src/gui/skill.h, src/gui/gui.cpp,
+ src/gui/item_amount.h, src/gui/setup_audio.h, src/gui/newskill.cpp,
+ src/gui/register.h, src/gui/setup.cpp, src/gui/npclistdialog.h,
+ src/gui/updatewindow.cpp, src/gui/char_select.cpp, src/gui/login.h,
+ src/gui/item_amount.cpp, src/gui/setup_audio.cpp,
+ src/gui/npc_text.cpp, src/gui/chat.h, src/gui/setup_joystick.h,
+ src/gui/setup_video.cpp, src/gui/ok_dialog.cpp, src/gui/textfield.cpp,
+ src/gui/inventorywindow.h, src/gui/newskill.h, src/gui/box.h,
+ src/gui/ministatus.cpp, src/gui/buy.h, src/gui/setup.h,
+ src/gui/confirm_dialog.cpp, src/gui/debugwindow.cpp, src/gui/vbox.cpp,
+ src/gui/chat.cpp, src/gui/setup_joystick.cpp, src/gui/updatewindow.h,
+ src/gui/char_select.h, src/gui/buysell.h, src/gui/tabbedcontainer.cpp,
+ src/gui/inventorywindow.cpp, src/gui/help.cpp, src/gui/status.h,
+ src/gui/npc_text.h, src/gui/setup_video.h, src/gui/menuwindow.cpp,
+ src/gui/ok_dialog.h, src/gui/buy.cpp, src/gui/buddywindow.h,
+ src/gui/sell.h, src/gui/trade.h, src/gui/char_server.h,
+ src/gui/skill.cpp, src/gui/buysell.cpp, src/gui/confirm_dialog.h,
+ src/gui/debugwindow.h, src/gui/status.cpp, src/gui/register.cpp,
+ src/gui/scrollarea.cpp, src/gui/tabbedcontainer.h,
+ src/gui/npclistdialog.cpp, src/gui/help.h, src/net/tradehandler.cpp,
+ src/net/playerhandler.cpp, src/Makefile.am,
+ src/resources/sdlimageloader.cpp, src/resources/sdlimageloader.h,
+ src/resources/openglsdlimageloader.cpp,
+ src/resources/resourcemanager.cpp,
+ src/resources/openglsdlimageloader.h, src/resources/resourcemanager.h:
+ Updated TMW to be compatible with Guichan 0.5.0 (merged from
+ guichan-0.5.0 branch).
+ * INSTALL, docs/INSTALL/win32.txt: Updated required Guichan to version
+ 0.5.0.
+ * configure.ac: Moved some basic checks above the checks on the
+ libraries we depend on, in order to get rid of the confusing
+ rpl_realloc error.
+ * src/resources/openglsdlimageloader.cpp, src/player.cpp: Fixed
+ several compiler warnings and a linker error when compiling without
+ OpenGL support.
+
+2006-08-12 Philipp Sehmisch <tmw@crushnet.org>
+
+ * 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: Fixed some
+ inaccessible areas.
+
+2006-08-07 Philipp Sehmisch <tmw@crushnet.org>
+ * 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/graphics/images/minimap_new_9-1.png,
+ data/graphics/images/minimap_new_14-1.png,
+ data/graphics/images/minimap_new_15-1.png,
+ data/graphics/images/minimap_new_16-1.png: Added minimaps for woodland
+ maps.
+
+2006-08-07 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_1-1.tmx.gz, data/maps/new_14-1.tmx.gz,
+ data/maps/new_15-1.tmx.gz, data/maps/new_16-1.tmx.gz:
+ Added a new woodland map and a connection map between desert and
+ woodland.
+ * data/graphics/woodland_ground.png: Added some new rocks.
+
+2006-08-07 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/gui/chat.h, src/gui/chat.cpp, src/main.cpp: A
+ bunch of cleanups.
+
+2006-08-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/configuration.cpp, src/game.cpp, src/engine.cpp, src/player.cpp,
+ src/being.cpp, src/resources/mapreader.cpp,
+ src/resources/itemmanager.cpp: Some cleanups, mostly lowering
+ indentation.
+ * src/being.cpp: Small code cleanup.
+
+2006-08-04 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/animatedsprite.cpp: Fix enum being treated as string.
+ * src/animation.cpp: Small code cleanups. Removed unused headers.
+ * src/animatedsprite.cpp: Small code cleanup/lower indentation.
+
+2006-08-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/animatedsprite.cpp: Fixed presence of NULL actions. This is
+ doener's version of the fix, because it was more efficient in the more
+ common case.
+
+2006-08-04 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/tiles/desert_x3.png: Replaced the old cactus with
+ a nice new high-res one.
+
+2006-08-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/player.cpp, src/being.cpp, src/being.h: Removed three
+ setDirection(mDirection) calls by instead specifically setting the
+ current direction on the newly added animated sprite. The same might
+ be done for the action later.
+ * src/animatedsprite.h, src/animatedsprite.cpp: Since this class isn't
+ subclassed and has no virtual functions, make protected members
+ private. Also added a start of a reset function which could be a
+ solution to unsynchronized animated sprites.
+ * src/net/network.cpp: Fixed two delete/delete[] errors.
+
+2006-08-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animation.h, src/animation.cpp, src/animatedsprite.h,
+ src/animatedsprite.cpp, src/being.cpp: Animations and directions
+ are now passed and stored as enums and no longer as strings.
+
+2006-07-30 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/animatedsprite.h, src/animatedsprite.cpp: Unified the play
+ methods.
+
+2006-07-30 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_5-1.tmx.gz: Fixed two minor mapping errors (no new
+ walkmap required).
+
+2006-07-29 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/animatedsprite.h, src/animatedsprite.cpp, src/animation.cpp: A
+ bunch of cleanups.
+ * src/animation.h, src/animatedsprite.cpp: Moved included from header
+ to source file.
+
+2006-07-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/npc.cpp, src/player.cpp, src/animatedsprite.h, src/animation.h,
+ src/being.cpp, src/main.cpp, src/monster.cpp, src/animatedsprite.cpp,
+ src/animation.cpp, src/Makefile.am, src/being.h: Moved AnimatedSprite
+ into its own files, removed useless includes.
+ * src/engine.cpp: Removed an unused var.
+
+2006-07-26 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/Makefile.am, data/graphics/tiles/Makefile.am,
+ data/maps/Makefile.am, data/maps/new_13-1.tmx.gz: Added map with
+ inside of snow village buildings and fixed makefiles.
+ * src/being.cpp, src/being.h, src/player.cpp: Fixed direction and
+ action issues when changing appeareance, frames are still out of sync.
+ * data/maps/Makefile.am, data/maps/new_14-1.tmx.gz,
+ data/maps/new_9-1.tmx.gz: Added new woodland map by Crush and fixed
+ connection with the old one.
+
+2006-07-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/maps/new_4-1.tmx.gz: Fixes to the collision layer.
+
+2006-07-26 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/tiles/snowset.png, data/graphics/tiles/snow_x2.png,
+ data/graphics/tiles/snow_x3.png: Moved the lamppost, the rock and the
+ bench to seperate tall tilebitmaps.
+ * data/maps/new_11-1.tmx.gz: Improved the snow village map, main
+ changes are that the player can now walk better behind houses,
+ lampposts, rocks and benches.
+ * data/graphics/sprites/item003.png, data/graphics/sprites/item003.xml:
+ Added the leather shirt
+
+2006-07-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/log.cpp, src/log.h: Added support for writing log to standard
+ output.
+ * src/gui/updatewindow.cpp: Fixed updating on Windows.
+
+2006-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Fixed the loading of updates and made skipping the
+ update process also skip the loading of updates.
+
+2006-07-24 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/localplayer.cpp, src/being.cpp: Fixed setDirection() semantics.
+ Removed a printf-leftover.
+
+2006-07-24 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/sprites/npcs.png: Added the organdealer to the NPCs.
+ * data/graphics/sprites/player_male_base.png,
+ data/graphics/sprites/player_female_base.png: Fixed some transparency
+ issues.
+
+2006-07-24 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/being.cpp, src/being.h, src/localplayer, The Mana World.dev,
+ tmw.cbp: Removed unused code, fixed "change direction when not
+ walking" bug, updated project files.
+ * data/graphics/sprites/monster1.xml: Slowed down scorpions.
+ * data/graphics/sprites/monster2.xml: Red scorpions have got the same
+ problem.
+ * data/graphics/sprites/player_female_base.xml: Fixed female playerset
+ animation definition.
+ * data/help/about.txt, data/help/changes.txt, data/help/commands.txt,
+ data/help/header.txt, data/help/index.txt, data/help/skills.txt,
+ data/help/support.txt, data/help/team.txt: Forced to use UNIX end of
+ line character.
+ * src/net/equipmenthandler.cpp: Equipments now use real slot
+ positions.
+
+2006-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/floor_item.cpp, src/animation.h, src/being.cpp, src/main.cpp,
+ src/gui/equipmentwindow.cpp, src/gui/playerbox.cpp,
+ src/gui/itemcontainer.cpp, src/engine.cpp, src/tileset.h,
+ src/animation.cpp, src/Makefile.am, src/resources/mapreader.cpp,
+ src/resources/resourcemanager.cpp, src/resources/spriteset.cpp,
+ src/resources/resourcemanager.h, src/resources/spriteset.h,
+ src/being.h, src/graphic/spriteset.cpp, src/graphic/spriteset.h,
+ data/graphics/sprites/npc.xml, data/graphics/sprites/weapons.xml:
+ Implemented caching of spritesets, including a lot of cleanups to the
+ new animation system. Action now refers to the Spriteset directly and
+ AnimatedSprite refers to the current Action directly instead of using
+ the std::map with a std::string constantly. Some methods and
+ parameters are marked as const. The READ_PROP macro was replaced by
+ static methods. Warnings are logged when unnamed actions are defined
+ or when actions refer to undefined imagesets. Code is more tolerant
+ towards missing actions.
+ * NEWS: Rearranged some items.
+
+2006-07-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/animation.cpp, src/animation.h: Removed unused code, fixed a
+ numeric conversion, used a more meaningful speed.
+
+2006-07-20 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/help/header.txt, data/help/skills.txt, docs/FAQ.txt, README:
+ Updated some docs for the 0.0.20 release.
+ * NEWS: Added new features of 0.0.20.
+ * data/items.xml: Added shorts.
+ * src/tmw.rc, The Mana World.dev, tmw.cbp: Added a resource script to
+ let both Dev-Cpp and Code::Blocks share the same binary icon and
+ version infos.
+ * data/graphics/sprites/player_female_base.xml,
+ data/graphics/sprites/player_male_base.xml, src/animation.cpp,
+ src/animation.h, src/being.cpp: Fixed left bow attack animation,
+ made the attack animation stay in sync with attack speed.
+
+2006-07-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/minimap.cpp: Fixed dot size of local player.
+ * src/engine.cpp: Fixed color of "[TARGET]".
+ * src/resources/mapreader.cpp, src/resources/mapreader.h,
+ data/maps/new_12-1.tmx.gz, data/maps/new_3-1.tmx.gz,
+ data/maps/new_4-1.tmx.gz, data/maps/new_5-1.tmx.gz,
+ data/maps/new_6-1.tmx.gz, data/maps/new_7-1.tmx.gz,
+ data/maps/new_8-1.tmx.gz, data/maps/new_9-1.tmx.gz,
+ data/maps/new_1-1.tmx.gz, data/maps/new_10-1.tmx.gz,
+ data/maps/new_11-1.tmx.gz, data/maps/new_2-1.tmx.gz: Implemented
+ loading for the way Tiled saves properties since version 0.6.0 and
+ updated all current maps.
+
+2006-07-19 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/item001.png, data/graphics/sprites/item001.xml,
+ data/graphics/sprites/item002.png, data/graphics/sprites/item002.xml,
+ data/graphics/sprites/item1202.png, data/graphics/sprites/Makefile.am,
+ docs/INSTALL/win32.txt, src/animation.cpp, src/being.cpp, src/being.h,
+ src/gui/equipmentwindow.cpp, src/gui/newskill.cpp, src/main.cpp,
+ src/net/beinghandler.cpp, src/net/charserverhandler.cpp,
+ src/player.cpp, src/player.h: Merged trunk changes r2381:2397 into
+ new_animation branch.
+ * tmw.cbp: Updated Code::Blocks project file.
+ * src/gui/char_select.cpp: Fixed next/previous buttons behaviour in
+ character selection dialog.
+ * data/graphics/sprites/Makefile.am: Alphabetically correct.
+
+2006-07-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * tmw.cbp: Added Code::Blocks project file.
+
+2006-07-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h, src/main.cpp,
+ src/resources/resourcemanager.cpp, src/resources/resourcemanager.h:
+ Updated the updating system. It will now only load those updates
+ specified in the downloaded resources.txt file, and in the order
+ in which they are mentioned (the top one being the most
+ significant).
+
+2006-07-17 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/sprites/items.png: Added shorts' icon to items.png
+
+2006-07-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/newskill.cpp: Fixed up a string comparison that caused a
+ warning with GCC 4.2.
+
+2006-07-12 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * data/graphics/sprites/item001.png: Completed the cotton shirt
+ equipment graphic.
+
+2006-07-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animation.cpp, src/animation.h, src/being.cpp, src/being.h,
+ src/monster.cpp, src/npc.cpp, src/player.cpp:
+ Fixed some minor bugs, cleaned up general code style and added more
+ comments.
+
+2006-07-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/monster.cpp, src/npc.cpp, src/player.cpp: Fixed broken paths.
+ * data/graphics/sprites/Makefile.am: Added new files.
+ * src/animation.cpp: Added missing return value...
+ * src/Makefile.am: Added new files.
+
+2006-07-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/monster0.xml: Fixed frame size of maggot.
+ * src/being.h: drawName should be virtual, lest we want names to be
+ drawn.
+
+2006-07-03 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/spriteset.cpp, src/spriteset.h: Spriteset::get() doesn't crash
+ anymore when requesting a sprite outside of the spriteset. (it returns
+ NULL instead and logs a warning).
+
+2006-07-03 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/being.cpp: Fixed a compiler issue reported by Pajarico.
+
+2006-07-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * tools/Reorganize.java: Added tool used for reorganizing and
+ auto-cropping the monster spritesets.
+
+2006-07-03 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/main.cpp, src/engine.cpp: Removed some no longer required old
+ style spritesets.
+ * src/being.h, src/being.cpp: Removed some no longer needed member
+ variables.
+ * src/monster.cpp: Monsters are now drawed with the new animation
+ system.
+ * src/npc.cpp, data/graphics/sprites/npcs.xml: NPCs are now drawed
+ with the new animation system.
+ * src/being.h, src/being.cpp, src/npc.cpp, src/npc.h, src/monster.cpp,
+ src/monster.h: Moved all drawing code from the Being based classes
+ into Being.
+ * data/graphics/sprites/monster*.png: Resized and reorganized the
+ monster spritesets to fit the new animation system (thanks, Bjørn).
+ * data/graphics/sprites/monster*.xml: Added animation files for all
+ monsters.
+ * src/animation.cpp: The offset values of the Frames of animated
+ sprites are now modified so every frame is drawn centered.
+ * data/graphics/sprites/hairstyle*.xml: Retuned the offsets of the
+ hair sprites.
+ * src/animation.cpp: Small stability fix.
+ * src/being.cpp, src/being.h: weapon animation now uses the new
+ animation system.
+ * data/graphics/sprites/player_male_base.xml
+ data/graphics/sprites/player_female_base.xml
+ data/graphics/sprites/hairstyle*.xml: Tuned walk speed and added bow
+ animations.
+
+2006-07-03 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/being.cpp: Removed an unnecessary parameter.
+
+2006-07-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/sprites/Makefile.am: Updated to new xml files.
+
+2006-07-02 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/localplayer.cpp: Fixed the "walking against walls" bug.
+ * src/animation.cpp src/animation.h: fixed the "sliding" bug and
+ removed some unused variables.
+
+2006-07-01 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/being.cpp, src/being.h, src/player.cpp, src/player.h,
+ src/localplayer.cpp: Sprites are now stored in a vector instead of a
+ list, so they can be replaced a lot easier; added female playerset;
+ added hairstyles and colors.
+ * src/animation.cpp, src/animation.h: added support for variations,
+ variations are animations stored in the same spriteset with the same
+ layout and sequence but starting at another index.
+ * data/graphics/sprites/player_female_base.xml: Added xml file for
+ female characters.
+ * data/graphics/sprites/hairstyle0.xml,
+ data/graphics/sprites/hairstyle1.xml,
+ data/graphics/sprites/hairstyle2.xml,
+ data/graphics/sprites/hairstyle3.xml,
+ data/graphics/sprites/hairstyle4.xml,
+ data/graphics/sprites/hairstyle5.xml,
+ data/graphics/sprites/hairstyle6.xml,
+ data/graphics/sprites/hairstyle7.xml: Added xml files for all
+ hairstyles (these xml files are using the new variation feature).
+ * src/being.cpp, src/being.h, src/localplayer.cpp, src/player.cpp: The
+ beings now haven't got one, but a list of animated sprites (named
+ mSprites). At the moment it contains the hair and the base sprite.
+ * src/animation.cpp, src/animation,h: Fixed a crash when substituting
+ an undefined direction; renamed completeDirections method to
+ substituteAction.
+ * data/graphics/sprites/hairstyle0.xml: Made a xml file for the hair
+ animation.
+
+2006-06-29 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/items.xml, src/being.cpp, src/being.h src/net/beinghandler.cpp,
+ src/player.cpp: Clients get notified of equipping visible items.
+ * src/net/beinghandler.cpp: GCC 4 fix.
+
+2006-06-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/animation.cpp, src/animation.h: Parser now works like described
+ on the wiki; the single animation phases are now stored in structures;
+ drawing call for animatiedSprites moved into the animatiedSprite
+ class.
+ * src/being.cpp, src/being.h, src/localplayer.cpp, src/player.cpp:
+ Renamed mAnimatedSprite to mBaseSprite to distinct it from hair-equip
+ and other sprites that will also be part of the class.
+ * src/player.cpp: Drawing call for animatiedSprites moved into the
+ animatiedSprite class; time now correctly passed in ms to the
+ animatedSprite class.
+ * src/graphic/spriteset.cpp, src/graphic/spriteset.h: Width and height
+ of the subimages is now saved in the spritesheet class.
+ * src/graphics.cpp: Added an additional check to avoid crashes when
+ passing a NULL pointer as image argument.
+ * data/graphics/sprites/player_male_base.xml: Animation file now has
+ the syntax described on the wiki.
+
+2006-06-27 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/player_male_base.xml, src/being.cpp,
+ src/being.h, src/engine.cpp, src/localplayer.cpp, src/main.cpp,
+ src/net/beinghandler.cpp, src/net/playerhandler.cpp,
+ src/resources/itemmanager.cpp, The Mana World.dev: Added a beginning
+ of a new animation system to slow down player walking.
+ * src/animation.cpp, src/animation.h: Forgot 2 files.
+ * src/being.cpp, src/gui/equipmentwindow.cpp, src/player.cpp:
+ Equipment window now show all the slots, and adapted visible shirts to
+ head (middle) equipments.
+
+2006-06-27 Frode Lindeijer <f.lindeijer@gmail.com>
+
+ * /tmw/trunk/data/graphics/sprites/player_male_base.png:
+ Fixed transparency issue with the north punching frames
+
+2006-06-26 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/net/messagein.cpp: Fixed the readString method (synchronized
+ with the server version by Guillaume Melquiond).
+
+2006-06-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/monster11.png,
+ data/graphics/sprites/monster17.png: Fixed attack animation of monster
+ 11 and added a new monster.
+ * data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/player_female_base.png, src/being.cpp,
+ src/being.h, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/playerbox.cpp, src/gui/playerbox.h, src/gui/register.cpp,
+ src/main.cpp, src/net/beinghandler.cpp, src/net/charserverhandler.cpp,
+ src/player.cpp: Added female players.
+
+2006-06-19 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/sprites/monster16.png: added the little pink monster
+
+2006-05-22 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/tiles/icecave.png, data/graphics/tiles/Makefile.am,
+ data/maps/Makefile.am, data/maps/new_10-1.tmx.gz,
+ data/maps/new_11-1.tmx.gz, data/maps/new_4-1.tmx.gz,
+ data/maps/new_5-1.tmx.gz, src/resources/itemmanager.cpp: A bunch of
+ updates to the world and disabled art and type xml parser checks since
+ they're not used.
+
+2006-05-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated dev-cpp project file.
+
+2006-05-17 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/npcs.png, data/graphics/tiles/Makefile.am,
+ data/graphics/snow_building.png, data/graphics/tiles/snowset.png,
+ data/maps/Makefile.am, data/maps/new_11-1.tmx.gz: New NPCs, new snow
+ tiles and village.
+
+2006-05-15 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/item_amount.cpp: Set slider range to the real values instead
+ of mapping the amount between [0,1] and [1,max] all the time.
+
+2006-05-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/openglgraphics.cpp: Set color back to current color instead of
+ setting it to white. Fixes white rectangles in equipment window.
+ * src/being.cpp, src/being.h, src/player.cpp: Specify the color in
+ which speech and names are supposed to be drawn. Removed unused
+ mSpeechColor member.
+
+2006-05-12 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp: Fixed initialization order in Being ctor.
+
+2006-05-12 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/item1202.png,
+ data/graphics/sprites/Makefile.am, src/being.cpp, src/being.h,
+ src/localplayer.cpp, src/localplayer.h, src/main.cpp, src/player.cpp,
+ The Mana World: You can now see the shirt when equipping a top
+ equipment.
+
+2006-05-05 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/setup_video.cpp: Fixed some numeric conversions.
+
+2006-05-03 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * configure.ac, src/game.cpp, src/graphics.cpp, src/main.cpp,
+ src/openglgraphics.cpp, The Mana World: Increased fps limit
+ granularity and cleaned some code, fixed some xml library name in
+ Dev-C++ project file, switched version to 0.0.20.
+ * src/game.cpp, src/gui/setup.cpp, src/gui/setup_video.cpp,
+ src/gui/setup_video.h, src/main.cpp: FPS limit can now be set in setup
+ dialog. Default value for FPS is 50. (Code based on peoro's patch).
+
+2006-05-02 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/localplayer.cpp: Fixed the delay last move bug.
+
+2006-04-29 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/tiles/cave.png: Added tiles by yosuhara.
+
+2006-04-28 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/Woodland_ground.png: Graphical update of the
+ woodland tileset. Paths improved, and tiles that were redunant
+ replaced by new dirt tiles.
+ * data/maps/new_9.1.tmx.gz: Modified because of changes in the tileset
+ layout (no new server sided walkmap required).
+ * data/graphics/sprites/monster11.png: Improved the shading of the
+ mushroom monster.
+ * data/graphics/sprites/monster15.png: Added dropshadow to the bat
+ monster (note that the version 0.0.19 live update overrides the
+ changed file).
+
+2006-04-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * ChangeLog: Converted to UTF-8.
+ * NEWS: Spelling correction.
+ * docs/INSTALL/debian.txt, docs/INSTALL/win32.txt: Updated with
+ respect to the move from CVS to Subversion.
+
+2006-03-25 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/window.cpp: Added window resize patch by peoro.
+
+2006-03-21 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated project.
+
+2006-03-20 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp: Fixed a crash on map change.
+
+2006-03-20 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/char_select.cpp: Fixed an include.
+
+2006-03-19 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/register.h, src/gui/register.cpp: Fixed a memory leak and
+ removed some whitespace noise.
+ * src/lockedarray.h, src/game.cpp, src/gui/gui.cpp,
+ src/gui/browserbox.cpp, src/gui/register.cpp,
+ src/resources/resourcemanager.cpp: Removed some useless null pointer
+ checks.
+ * src/gui/login.cpp, src/gui/setup_audio.h, src/gui/setup.cpp,
+ src/gui/setup_audio.cpp, src/gui/setup_video.cpp,
+ src/gui/setup_video.h: Removed some duplicated initializations.
+ * src/gui/setup_audio.h, src/gui/setup.cpp, src/gui/setup_audio.cpp,
+ src/gui/setup_joystick.h, src/gui/setup_video.cpp, src/gui/setuptab.h,
+ src/gui/setup.h, src/gui/setup_joystick.cpp, src/gui/setup_video.h,
+ src/Makefile.am: Splitted setup window into manageable pieces
+ according to their tabs in the window. Fixed some memory leaks along
+ the way. Also fixed two settings not being stored on "apply".
+
+2006-03-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/chat.cpp, src/gui/menuwindow.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp: Use the window container instead of the graphics
+ class to calculate window positions.
+ * src/utils/dtor.h: Fixed indentation.
+ * src/configuration.cpp, src/log.cpp, src/main.cpp, src/being.cpp,
+ src/monster.cpp, src/gui/equipmentwindow.cpp, src/gui/sell.cpp,
+ src/gui/trade.cpp, src/gui/char_server.cpp, src/gui/setup.cpp,
+ src/gui/updatewindow.cpp, src/gui/char_select.cpp,
+ src/gui/ministatus.cpp, src/gui/debugwindow.cpp,
+ src/gui/tabbedcontainer.cpp, src/gui/inventorywindow.cpp,
+ src/gui/buy.cpp, src/gui/itemcontainer.cpp, src/gui/inttextbox.cpp,
+ src/gui/debugwindow.h, src/gui/status.cpp, src/gui/register.cpp,
+ src/net/chathandler.cpp, src/engine.cpp, src/utils/tostring.h,
+ src/Makefile.am: Added a toString conversion function.
+
+2006-03-15 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.h, src/main.cpp, src/gui/equipmentwindow.cpp,
+ src/gui/window.cpp, src/gui/login.cpp, src/gui/listbox.h,
+ src/gui/chat.h, src/gui/ministatus.cpp, src/gui/chat.cpp,
+ src/gui/help.cpp, src/gui/itemcontainer.cpp, src/gui/listbox.cpp,
+ src/gui/checkbox.cpp, src/engine.cpp, src/resources/image.cpp: A bunch
+ of cosmetic changes.
+ * src/net/network.cpp: Fixed connection not being shut down completely
+ in case of an error.
+
+2006-03-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/main.cpp: Fixed skip update option.
+
+2006-03-13 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_7.1.tmx.gz: Fixed some map bugs (update of server
+ sided walkmap required!)
+
+2006-03-11 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/hairstyle1.png,
+ data/graphics/sprites/hairstyle2.png,
+ data/graphics/sprites/hairstyle3.png,
+ data/graphics/sprites/hairstyle4.png,
+ data/graphics/sprites/hairstyle6.png,
+ data/graphics/sprites/hairstyle7.png,
+ data/graphics/sprites/Makefile.am: Fixed some hair positions, added a
+ new style, updated makefile.
+
+2006-03-09 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/utils/dtor.h: Added guards.
+ * src/game.cpp, src/main.cpp, src/gui/connection.cpp,
+ src/gui/menuwindow.cpp, src/net/tradehandler.cpp,
+ src/net/playerhandler.cpp: Made all local action listeners structs and
+ moved them into anonymous namespaces.
+ * src/gui/connection.cpp, src/gui/newskill.cpp,
+ src/gui/chargedialog.cpp, src/gui/updatewindow.cpp,
+ src/gui/progressbar.h, src/gui/ministatus.cpp,
+ src/gui/progressbar.cpp, src/gui/status.cpp: Removed coordinate
+ arguments from ProgressBar ctor.
+ * src/openglgraphics.cpp, src/localplayer.cpp, src/game.cpp,
+ src/map.cpp, src/log.cpp, src/being.cpp, src/monster.cpp, src/sound.h,
+ src/graphics.cpp, src/gui/equipmentwindow.cpp, src/gui/sell.cpp,
+ src/gui/trade.cpp, src/gui/char_server.cpp, src/gui/window.cpp,
+ src/gui/login.cpp, src/gui/inttextbox.h, src/gui/chargedialog.h,
+ src/gui/focushandler.h, src/gui/skill.h, src/gui/gui.cpp,
+ src/gui/newskill.cpp, src/gui/register.h, src/gui/popupmenu.h,
+ src/gui/setup.cpp, src/gui/npclistdialog.h, src/gui/chargedialog.cpp,
+ src/gui/playerbox.h, src/gui/char_select.cpp, src/gui/login.h,
+ src/gui/focushandler.cpp, src/gui/chat.h, src/gui/inventorywindow.h,
+ src/gui/newskill.h, src/gui/ministatus.cpp, src/gui/buy.h,
+ src/gui/playerbox.cpp, src/gui/setup.h, src/gui/itemcontainer.h,
+ src/gui/debugwindow.cpp, src/gui/chat.cpp, src/gui/char_select.h,
+ src/gui/inventorywindow.cpp, src/gui/help.cpp, src/gui/status.h,
+ src/gui/buy.cpp, src/gui/itemcontainer.cpp, src/gui/equipmentwindow.h,
+ src/gui/sell.h, src/gui/trade.h, src/gui/ministatus.h,
+ src/gui/inttextbox.cpp, src/gui/char_server.h, src/gui/window.h,
+ src/gui/skill.cpp, src/gui/debugwindow.h, src/gui/status.cpp,
+ src/gui/register.cpp, src/gui/popupmenu.cpp, src/gui/minimap.cpp,
+ src/gui/npclistdialog.cpp, src/gui/help.h, src/net/buysellhandler.cpp,
+ src/net/beinghandler.cpp, src/net/charserverhandler.cpp,
+ src/net/maploginhandler.cpp, src/net/playerhandler.cpp,
+ src/engine.cpp, src/localplayer.h, src/beingmanager.cpp, src/map.h,
+ src/log.h, src/sound.cpp, src/resources/itemmanager.h,
+ src/resources/buddylist.cpp, src/resources/buddylist.h,
+ src/resources/image.cpp, src/resources/image.h,
+ src/resources/itemmanager.cpp, src/being.h, src/player.cpp: Made all
+ class members named like mClassMember.
+ * src/floor_item.cpp, src/map.cpp, src/being.cpp,
+ src/gui/equipmentwindow.cpp, src/gui/playerbox.cpp,
+ src/gui/itemcontainer.cpp, src/graphic/spriteset.cpp,
+ src/graphic/spriteset.h, src/player.cpp: Added Spriteset::get() and
+ Spriteset::size() to hide the member vector and remove the weird
+ mySpriteset->spriteset stuff.
+ * src/gui/buddywindow.cpp, src/gui/connection.cpp, src/gui/sell.cpp,
+ src/gui/trade.cpp, src/gui/char_server.cpp, src/gui/login.cpp,
+ src/gui/button.h, src/gui/newskill.cpp, src/gui/setup.cpp,
+ src/gui/updatewindow.cpp, src/gui/button.cpp, src/gui/char_select.cpp
+ ,src/gui/item_amount.cpp, src/gui/npc_text.cpp, src/gui/ok_dialog.cpp,
+ src/gui/confirm_dialog.cpp, src/gui/debugwindow.cpp,
+ src/gui/tabbedcontainer.cpp, src/gui/inventorywindow.cpp,
+ src/gui/help.cpp, src/gui/menuwindow.cpp, src/gui/buy.cpp,
+ src/gui/skill.cpp, src/gui/buysell.cpp, src/gui/status.cpp,
+ src/gui/register.cpp, src/gui/npclistdialog.cpp: Made the Button ctor
+ accept eventId and action listener.
+ * src/localplayer.cpp, src/game.cpp, src/gui/trade.cpp,
+ src/gui/inventorywindow.cpp, src/gui/trade.h, src/localplayer.h,
+ src/game.h: Use std::auto_ptr in some places.
+ * src/lockedarray.h: Use fill_n instead of for-loop.
+ * src/gui/browserbox.cpp: Make the MouseOverLink functor dynamic and
+ use a STL algorithm in one more place.
+
+2006-03-08 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/browserbox.h, src/gui/menuwindow.cpp, src/gui/buysell.cpp:
+ Some fixes for compiling with pedantic compiler settings and const
+ char* checks.
+ * data/graphics/sprites/player_male_base.png: Use two rows for each
+ direction in order to make the texture less wide so that it stays
+ within the 1024 texture limit for OpenGL mode.
+
+2006-03-08 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/map.cpp, src/main.cpp, src/gui/button.cpp,
+ src/gui/textfield.cpp, src/gui/playerbox.cpp,
+ src/gui/windowcontainer.cpp, src/gui/skill.cpp,
+ src/gui/scrollarea.cpp, src/engine.cpp, src/beingmanager.cpp,
+ src/utils, src/utils/dtor.h, src/Makefile.am,
+ src/flooritemmanager.cpp, src/graphic/spriteset.cpp: Added a 'dtor'
+ helper functor to delete objects in arrays and containers using STL
+ algorithms.
+ * src/resources/image.cpp: Removed some conditional code.
+ * src/localplayer.cpp, src/gui/gui.cpp: Reverted changes from r2225,
+ it broke walking code as I missed the differences between tile and
+ being collisions.
+ * src/gui/itemcontainer.cpp, src/inventory.cpp: Made Inventory use STL
+ algorithms and fixed getLastUsedSlot semantics.
+ * src/engine.cpp, src/engine.h: Moved a variable definition into the
+ right place and made getCurrentMap inline.
+ * src/equipment.cpp, src/equipment.h: Use STL algorithms and make
+ destructor inline.
+ * src/localplayer.cpp, src/gui/gui.cpp: Let the LocalPlayer decide
+ whether it can walk to a destination.
+
+2006-03-07 Yohann Ferreira <bertram@cegetel.net>
+
+ * debian/rules, debian/changelog, ChangeLog: Updating Debian files for
+ 0.0.19 release.
+
+2006-03-07 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/tiles/Makefile.am, data/graphics/tiles/Woodland.png:
+ Removed unused tileset.
+
+2006-03-06 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * configure.ac: Version changed to 0.0.19.
+
+2006-03-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_9.1.tmx.gz: Fixed some mapping bugs.
+
+2006-03-06 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * AUTHORS, NEWS, README, data/help/changes.txt, data/help/header.txt,
+ data/help/team.txt: A bunch of updates to docs, ready for 0.0.19.
+ * data/help/changes.txt, src/main.cpp: Small fixes before releasing.
+
+2006-03-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * data/graphics/sprites/Makefile.am: Remove trailing whitespace.
+ * src/engine.cpp: Re-add main.h header, Windows build needs it.
+
+2006-03-05 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/player_male_base.png: Added pants.
+
+2006-03-02 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/weapon1.png: Added missing frames.
+ * src/player.cpp: Fixed north shooting hair position.
+ * data/graphics/sprites/Makefile.am: Added new graphics.
+ * data/graphics/sprites/monster15.png: Added bat monster.
+
+2006-03-01 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Enabled -Wall switch.
+ * data/graphics/sprites/monster9.png: Fixed fire goblin north walking
+ animation.
+ * data/graphics/sprites/hairstyle1.png,
+ data/graphics/sprites/hairstyle2.png,
+ data/graphics/sprites/hairstyle3.png,
+ data/graphics/sprites/hairstyle4.png,
+ data/graphics/sprites/hairstyle5.png,
+ data/graphics/sprites/hairstyle6.png,
+ data/graphics/sprites/player_male_base.png,
+ data/graphics/sprites/weapon0.png,
+ data/graphics/sprites/weapon1.png: New graphics for hair styles,
+ player and weapons.
+ * src/being.cpp, src/being.h, src/engine.cpp, src/gui/playerbox.cpp,
+ src/localplayer.cpp, src/main.cpp, beinghandler.cpp, player.cpp,
+ src/resources/image.cpp: Hacked code to support the new playerset.
+
+2006-02-25 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/beingmanager.cpp, src/beingmanager.h, src/engine.cpp,
+ src/main.h, src/sound.h: Added a logic method to the being manager.
+
+2006-02-24 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/being.h, src/configuration.cpp,
+ src/configuration.h, src/engine.cpp, src/map.cpp, src/map.h,
+ src/properties.h, src/gui/browserbox.cpp, src/gui/browserbox.h,
+ src/gui/chat.cpp, src/gui/chat.h, src/gui/gccontainer.cpp,
+ src/gui/gccontainer.h, src/gui/minimap.cpp,
+ src/gui/tabbedcontainer.cpp, src/gui/tabbedcontainer.h,
+ src/net/network.cpp, src/net/network.h, src/resources/itemmanager.cpp,
+ src/resources/itemmanager.h: Another bunch of cosmetic cleanups, i.e.
+ mostly typedefs...
+
+2006-02-23 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/being.h, src/beingmanager.cpp,
+ src/beingmanager.h, src/engine.cpp, src/inventory.cpp,
+ src/inventory.h, src/logindata.h, src/main.cpp, src/main.h,
+ src/openglgraphics.cpp, src/gui/equipmentwindow.h,
+ src/gui/minimap.cpp, src/gui/minimap.h, src/gui/windowcontainer.cpp,
+ src/gui/windowcontainer.h, src/net/loginhandler.cpp: A bunch of mostly
+ cosmetic cleanups.
+
+2006-02-23 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_4.1.tmx.gz: I remapped the hermits cave. It looks much
+ more natural now. A new server sided walkmap is required.
+
+2006-02-22 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/cave.png: fixed two almost invisible pixel
+ errors
+
+2006-02-21 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/maps/new_9.1.tmx.gz: fixed another map bug.
+
+2006-02-05 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/resources/itemmanager.cpp: Added warnings when parameters are
+ missing in the items xml file.
+
+2006-02-16 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/browserbox.cpp, src/gui/browserbox.h, src/gui/gui.cpp: Use
+ Widget::mFont instead of browerFont for drawing, fixes the "gui
+ needs to be valid real early" issue.
+
+2006-02-07 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/being.h, src/game.cpp, src/localplayer.cpp,
+ src/localplayer.h, src/monster.cpp, src/player.cpp,
+ src/net/messagein.cpp, src/net/protocol.cpp: Made the being directions
+ being stored in a bitfield.
+
+2006-02-06 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/Woodland_ground.png,
+ data/graphics/tiles/Woodland_x2.png, data/maps/new_9.1.tmx.gz: added
+ dynamic grass that covers the lower area of sprites (doesn't work for
+ flower beds yet).
+
+2006-02-06 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/net/tradehandler.cpp: Updated Dev-Cpp project
+ file, fixed a gcc 3.4 issue.
+ * src/net/tradehandler.cpp: Undone last changes because Bertram
+ already fixed the compiler issue.
+
+2006-02-06 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/game.cpp, src/joystick.cpp, src/joystick.h,
+ src/gui/setup.cpp, src/gui/setup.h: Added a Joystick class.
+ * src/being.cpp, src/being.h, src/monster.cpp, src/npc.cpp: Unify some
+ of the drawing code for beings.
+ * src/being.cpp, src/being.h, src/localplayer.h, src/player.cpp,
+ src/player.h: Use virtual methods instead of getType() checks.
+ * data/graphics/gui/browserfont.png,
+ data/graphics/gui/fixedfont.png, data/graphics/gui/rpgfont_wider.png,
+ data/graphics/gui/sansserif8.png, src/Makefile.am, src/engine.cpp,
+ src/floor_item.cpp, src/floor_item.h, src/flooritemmanager.cpp,
+ src/flooritemmanager.h, src/game.cpp, src/gui/gui.cpp,
+ src/net/itemhandler.cpp: Introduced a FloorItemManager class.
+
+2006-02-05 Yohann Ferreira <bertram@cegetel.net>
+
+ * data/graphics/gui/rpgfont_wider.png,
+ data/graphics/gui/fixedfont.png,data/graphics/gui/browserfont.png,
+ data/graphics/gui/sansserif8.png: Adding è accents mostly to the font
+ images.
+ * src/engine.cpp, src/being.h, src/being.cpp, src/player.cpp,
+ src/gui/char_select.h, src/gui/char_select.cpp: Made the nickname and
+ emotions displayed above every layers. Made the delete and ok buttons
+ be disabled once the character is selected at login.
+ * src/net/tradehandler.cpp, src/resources/itemmanager.cpp: Fixed a gcc
+ 4.0 issue in the tradehandler. Strengthen the xml parser in the
+ itemmanager so tmw doesn't crash anymore if an item lacks some
+ parameters.
+
+2006-02-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * INSTALL: Updated dependencies in response to patch by Hanno Braun.
+
+2006-02-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * data/graphics/tiles/Makefile.am: Added the new tilesets.
+ * src/localplayer.cpp, src/localplayer.h, src/gui/gui.cpp: Made the
+ player walk to items prior to picking them up.
+
+2006-02-04 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/Woodland.png: new path design
+ * data/graphics/tiles/Woodland_ground.png,
+ data/graphics/tiles/Woodland_x2.png,
+ data/graphics/tiles/Woodland_x3.png: splitted the tileset into three
+ tilesets with different tile sizes
+ (i kept the original tileset for backward compatiblity)
+ * data/maps/new_9.1.tmx.gz: remapped with the oversized tile
+ technology. made the forests less regular. made the unwalkable map
+ borders more visual appealing
+
+2006-02-04 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/localplayer.h, src/logindata.h, src/main.cpp, src/main.h,
+ src/gui/char_select.cpp, src/gui/char_server.cpp,
+ src/gui/char_server.h, src/net/charserverhandler.cpp,
+ src/net/charserverhandler.h, src/net/loginhandler.cpp,
+ src/net/loginhandler.h, src/net/network.cpp, src/net/network.h: Unify
+ the gui code for the various logins to use LoginData.
+
+2006-02-03 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/logindata.h, src/main.cpp, src/gui/login.cpp, src/gui/login.h:
+ Made the login dialog work on LoginData only, without playing with the
+ config, it's not its job to do so.
+ * src/net/protocol.cpp, src/net/protocol.h: Removed some unused code.
+
+2006-02-02 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/desert1.png, data/graphics/tiles/desert2.png,
+ data/graphics/tiles/desert_x2.png, data/graphics/tiles/desert_x3.png:
+ Replaced the old sand tile with Irucards new one. Added new crates.
+ Made some minor corrections.
+
+2006-02-01 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/game.h, src/main.cpp: Created a Game class.
+ * src/gui/passwordfield.cpp: Removed duplicated code.
+ * src/Makefile.am, src/main.cpp, src/gui/error.cpp, src/gui/error.h:
+ Replaced ErrorDialog by OkDialog + listener.
+ * src/Makefile.am, src/game.cpp, src/gui/buysell.cpp,
+ src/gui/char_select.cpp, src/gui/confirm_dialog.cpp,
+ src/gui/confirm_dialog.h, src/gui/login.cpp, src/gui/login.h,
+ src/gui/menuwindow.cpp, src/gui/ok_dialog.cpp, src/gui/ok_dialog.h,
+ src/gui/register.cpp, src/gui/requesttrade.cpp,
+ src/gui/requesttrade.h, src/gui/setup.cpp, src/net/playerhandler.cpp,
+ src/net/tradehandler.cpp: Made the OkDialog and ConfirmDialog classes
+ proxies for their buttons' events. Removed the RequestTradeWindow
+ class, replaced with a plain ConfirmDialog. Fixed a memory leak along
+ the way.
+
+ * src/gui/buysell.cpp, src/gui/menuwindow.cpp: Simplified button
+ creation code.
+ * src/gui/npc_text.cpp: Fixed a bug where the game crashes if there's a
+ message dialog from a npc that no longer exists.
+ * src/properties.h: Reverted properties to private.
+
+2006-01-31 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/setup.cpp: Cleanup.
+ * src/gui/requesttrade.cpp, src/gui/requesttrade.h: Made
+ RequestTradeDialog inherit from ConfirmDialog.
+ * src/Makefile.am, src/gui/buy.cpp, src/gui/buy.h, src/gui/sell.cpp,
+ src/gui/sell.h, src/gui/shop.cpp, src/gui/shop.h: Created a ListModel
+ for ShopItems.
+ * src/floor_item.cpp, src/graphics.h, src/map.cpp, src/map.h,
+ src/properties.h, src/sprite.h, src/gui/login.cpp,
+ src/gui/scrollarea.cpp, src/gui/windowcontainer.cpp,
+ src/resources/sdlimageloader.cpp: Various small cleanups.
+ * src/resources/resource.cpp, src/resources/resourcemanager.cpp,
+ src/resources/resource.h, src/resources/resourcemanager.h: Made
+ ResourceManager a friend of Resource to avoid looping over decRef,
+ which returns void now.
+
+2006-01-30 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/char_select.cpp, src/gui/confirm_dialog.cpp,
+ src/gui/confirm_dialog.h, src/gui/error.cpp, src/gui/error.h,
+ src/gui/ministatus.cpp, src/gui/ok_dialog.cpp, src/gui/ok_dialog.h,
+ src/gui/setup.cpp, src/net/charserverhandler.cpp: A few cleanups and
+ simplifications.
+
+2006-01-26 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/game.h, src/main.cpp: Moved some setup code out of
+ the game loop into the setup functions. Setup functions are now called
+ from the outside.
+
+2006-01-22 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/main.cpp: Updated Dev-Cpp project file, fixed
+ a GDI issue.
+
+2006-01-22 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/net/network.cpp: Make dispatchMessages actually
+ handle more than one message per call.
+ * src/main.cpp: Remove obsoleted action listeners.
+ * src/main.cpp: Use generic error method for sound failure.
+ * src/main.cpp, src/net/charserverhandler.cpp,
+ src/net/loginhandler.cpp, src/net/maploginhandler.cpp,
+ src/net/network.cpp: Unify some network stuff in the main loop and fix
+ a bug in the network class that triggers when a handlers survives the
+ network object.
+
+2006-01-21 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/browserbox.cpp: Applied a patch by Ar2ro that works around
+ the problems with line wrapping in the chatbox. Note though that this
+ while code should be properly rewritten later.
+
+2006-01-20 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated Dev-Cpp project file.
+
+2006-01-20 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/equipment.h, src/game.cpp, src/game.h, src/main.h,
+ src/gui/buddywindow.cpp, src/gui/buddywindow.h,
+ src/gui/chargedialog.h, src/gui/connection.cpp, src/gui/connection.h,
+ src/gui/equipmentwindow.cpp, src/gui/equipmentwindow.h,
+ src/gui/linkhandler.h, src/gui/ministatus.h, src/gui/register.h,
+ src/net/protocol.h, src/resources/mapreader.h: Header, class
+ declaration and include cleanup.
+ * src/localplayer.cpp, src/localplayer.h, src/gui/requesttrade.cpp,
+ src/net/tradehandler.cpp: Made the local player object care about its
+ trading state, later this could be used for different stuff, like the
+ player setting itself to auto-decline trade offers without messing up
+ the code in the tradehandler. Removed message sending code from the
+ trade handler.
+ * src/npc.cpp, src/npc.h: Added the files for real this time.
+ * src/npc.cpp, src/npc.h, src/Makefile.am, src/being.cpp,
+ src/beingmanager.cpp, src/beingmanager.h, src/engine.cpp,
+ src/engine.h, src/game.cpp, src/game.h, src/localplayer.cpp,
+ src/localplayer.h, src/map.cpp, src/gui/buy.cpp, src/gui/buysell.cpp,
+ src/gui/buysell.h, src/gui/gui.cpp, src/gui/minimap.cpp,
+ src/gui/npc.cpp, src/gui/npc.h, src/gui/npc_text.cpp,
+ src/gui/npc_text.h, src/gui/npclistdialog.cpp,
+ src/gui/npclistdialog.h, src/gui/popupmenu.cpp,
+ src/gui/requesttrade.cpp, src/gui/requesttrade.h, src/gui/sell.cpp,
+ src/gui/setup.cpp, src/gui/skill.cpp, src/gui/skill.h,
+ src/gui/status.cpp, src/gui/status.h, src/net/buysellhandler.cpp,
+ src/net/charserverhandler.cpp, src/net/chathandler.cpp,
+ src/net/equipmenthandler.cpp, src/net/npchandler.cpp,
+ src/net/playerhandler.cpp, src/net/protocol.cpp,
+ src/net/tradehandler.cpp: Added a class for NPCs. Removed network
+ stuff from a bunch of gui dialog classes. Cleaned up some gui class
+ declarations and checked a bunch of includes for being useless.
+
+2006-01-19 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * INSTALL, README, The Mana World.dev, data/help/support.txt,
+ docs/INSTALL/debian.txt, docs/INSTALL/win32.txt, docs/progression.txt:
+ Updated infos on new irc channel.
+
+2006-01-14 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.cpp, src/main.h, src/gui/char_server.cpp,
+ src/gui/char_server.h: Moved network code out of the
+ ServerSelectDialog.
+ * src/gui/char_select.cpp, src/gui/char_select.h: Change setPlayerInfo
+ to updatePlayerInfo, as there's now a convenient wrapper around the
+ plain data.
+ * src/Makefile.am, src/lockedarray.cpp, src/lockedarray.h,
+ src/main.cpp, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/net/charserverhandler.cpp,
+ src/net/charserverhandler.h, src/net/network.cpp, src/net/network.h:
+ Created a single CharServerHandler. Created a LockedArray class to
+ "synchronize" access to arrays. Moved a bunch of networking out of the
+ char server related gui classes.
+ * src/Makefile.am, src/logindata.h, src/main.cpp, src/main.h,
+ src/gui/login.cpp, src/gui/login.h, src/gui/register.cpp,
+ src/gui/register.h: Removed network code from login and register
+ dialogs.
+ * src/gui/login.cpp, src/gui/login.h: Removed unused var.
+ * src/main.cpp, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/connection.cpp, src/gui/connection.h, src/gui/error.cpp,
+ src/gui/error.h, src/gui/login.cpp, src/gui/login.h,
+ src/gui/register.cpp, src/gui/register.h, src/gui/updatewindow.cpp,
+ src/gui/updatewindow.h: Removed the pre-game input handlers and
+ unified them in main.cpp. Some header and class cleanups.
+ * src/net/maploginhandler.cpp, src/net/maploginhandler.h,
+ src/Makefile.am, src/engine.cpp, src/engine.h, src/game.cpp,
+ src/main.cpp, src/gui/connection.cpp, src/gui/connection.h,
+ src/net/playerhandler.cpp: Made changeMap() care about sending the
+ map-loaded message. Removed network stuff from connection dialog.
+
+2006-01-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/gui/login.cpp, src/gui/login.h,
+ src/gui/register.cpp, src/net/loginhandler.cpp,
+ src/net/loginhandler.h: Remove duplicated code by unifying the message
+ handlers for login and register.
+ * src/gui/char_server.cpp, src/gui/char_server.h: Removed the polling
+ loop.
+ * src/gui/char_select.cpp, src/gui/char_select.h: Remove destructor
+ again, no idea why the compiler complained earlier.
+ * src/gui/char_select.cpp, src/gui/char_select.h: Created a message
+ handler for character creation and cleaned up the header file.
+ * src/gui/register.cpp, src/gui/register.h: Added a message handler
+ and removed the polling loop.
+ * src/net/network.cpp: Add recognition of disconnects.
+ * src/gui/connection.cpp, src/gui/connection.h,
+ src/net/playerhandler.cpp: Removed the polling loop and the duplicate
+ login message handler.
+ * src/gui/login.cpp, src/gui/login.h: Remove polling loop, the new
+ network code takes care of all that.
+ * src/net/network.cpp: Make sure that we don't send anything when not
+ connected.
+ * src/gui/login.cpp: Added a handler for network messages.
+ * src/game.cpp, src/net/beinghandler.cpp, src/net/beinghandler.h,
+ src/net/buysellhandler.cpp, src/net/buysellhandler.h,
+ src/net/chathandler.cpp, src/net/chathandler.h,
+ src/net/equipmenthandler.cpp, src/net/equipmenthandler.h,
+ src/net/inventoryhandler.cpp, src/net/inventoryhandler.h,
+ src/net/itemhandler.cpp, src/net/itemhandler.h,
+ src/net/messagehandler.cpp, src/net/messagehandler.h,
+ src/net/npchandler.cpp, src/net/npchandler.h,
+ src/net/playerhandler.cpp, src/net/playerhandler.h,
+ src/net/skillhandler.cpp, src/net/skillhandler.h,
+ src/net/tradehandler.cpp, src/net/tradehandler.h: Reverted the patch
+ to make the handlers register themselves, this just cannot work.
+ * src/game.cpp: Small cleanup.
+ * src/game.cpp, src/localplayer.cpp, src/localplayer.h: Made emote() a
+ method of the LocalPlayer class.
+
+2006-01-12 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/main.cpp, src/net/beinghandler.cpp,
+ src/net/beinghandler.h, src/net/buysellhandler.cpp,
+ src/net/buysellhandler.h, src/net/chathandler.cpp,
+ src/net/chathandler.h, src/net/equipmenthandler.cpp,
+ src/net/equipmenthandler.h, src/net/inventoryhandler.cpp,
+ src/net/inventoryhandler.h, src/net/itemhandler.cpp,
+ src/net/itemhandler.h, src/net/messagehandler.cpp,
+ src/net/messagehandler.h, src/net/npchandler.cpp,
+ src/net/npchandler.h, src/net/playerhandler.cpp,
+ src/net/playerhandler.h, src/net/skillhandler.cpp,
+ src/net/skillhandler.h, src/net/tradehandler.cpp,
+ src/net/tradehandler.h: Added a constructor parameter to the
+ MessageHandler class to support it self-registering to a network.
+ * src/game.cpp, src/net/beinghandler.cpp, src/net/network.cpp,
+ src/net/network.h, src/net/playerhandler.cpp: Moved the last few
+ messages out of the game loop into handlers. Added logging of
+ unhandled messages to the network class.
+ * src/Makefile.am, src/game.cpp, src/net/skillhandler.cpp,
+ src/net/skillhandler.h: Added a dedicated handler for skill messages.
+ * src/game.cpp, src/net/beinghandler.cpp: Moved some messages into the
+ being message handler.
+ * src/net/playerhandler.cpp: Fixed death listener.
+ * src/Makefile.am, src/game.cpp, src/net/playerhandler.cpp,
+ src/net/playerhandler.h: Added a dedicated handler for player
+ messages.
+ * src/game.cpp, src/net/chathandler.cpp: Moved WHO answer and some MVP
+ thing into the chat handler.
+ * src/Makefile.am, src/game.cpp, src/net/npchandler.cpp,
+ src/net/npchandler.h: Added a dedicated handler for npc messages.
+ * src/Makefile.am, src/game.cpp, src/net/itemhandler.cpp,
+ src/net/itemhandler.h: Added a dedicated handler for item messages.
+ * src/net/messagehandler.cpp, src/Makefile.am, src/game.cpp,
+ src/gui/char_select.cpp, src/gui/char_server.cpp,
+ src/gui/connection.cpp, src/net/messagehandler.h, src/net/network.cpp,
+ src/net/tradehandler.cpp, src/net/tradehandler.h: Made the
+ MessageHandler class aware of the network it is listening to and
+ unregistering itself.
+ * src/Makefile.am, src/beingmanager.cpp, src/beingmanager.h,
+ src/engine.cpp, src/game.cpp, src/net/beinghandler.cpp,
+ src/net/beinghandler.h: Added a dedicated handler for being messages.
+ Made the beingManager care about map changes.
+ * src/net/network.cpp: Removed some debug output.
+ * src/Makefile.am, src/game.cpp, src/net/inventoryhandler.cpp,
+ src/net/inventoryhandler.h: Added a dedicated handler for inventory
+ messages.
+ * src/game.cpp, src/inventory.cpp, src/inventory.h,
+ src/localplayer.cpp, src/localplayer.h, src/gui/trade.cpp,
+ src/net/buysellhandler.cpp, src/net/equipmenthandler.cpp,
+ src/net/tradehandler.cpp: Added delegation methods for inventory stuff
+ to the LocalPlayer class. Removed some unneeded includes.
+ * src/Makefile.am, src/game.cpp, src/net/equipmenthandler.cpp,
+ src/net/equipmenthandler.h: Added a dedicated handler for equipment
+ messages.
+ * src/game.cpp, src/localplayer.h: Removed unions, array are indexed
+ by the existing enums now.
+ * src/Makefile.am, src/game.cpp, src/net/buysellhandler.cpp,
+ src/net/buysellhandler.h: Added a dedicated handler for buy and sell
+ messages.
+ * src/Makefile.am, src/game.cpp, src/net/chathandler.cpp,
+ src/net/chathandler.h, src/net/tradehandler.cpp: Added a dedicated
+ handler for chat messages.
+
+2006-01-11 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/game.cpp, src/game.h, src/gui/popupmenu.cpp,
+ src/gui/requesttrade.h, src/net/messagehandler.h, src/net/network.cpp,
+ src/net/network.h, src/net/tradehandler.cpp, src/net/tradehandler.h:
+ Added a dedicated handler for trade messages.
+ * gui/char_select.cpp, gui/char_server.cpp, gui/connection.cpp,
+ net/messagehandler.h, net/network.cpp: Fixed a memory leak.
+ * src/Makefile.am, src/game.cpp, src/localplayer.cpp, src/main.cpp,
+ src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/connection.cpp, src/gui/connection.h, src/gui/gui.cpp,
+ src/gui/popupmenu.cpp, src/net/messagehandler.h, src/net/network.cpp,
+ src/net/network.h, src/net/protocol.cpp, src/net/protocol.h: Fixed
+ networking thread. Made skip calls queuable. Added MessageHandler base
+ class and added derived message handlers for some stuff.
+ * src/being.h, src/beingmanager.cpp, src/beingmanager.h,
+ src/game.cpp, src/game.h, src/localplayer.cpp, src/localplayer.h,
+ src/main.cpp, src/gui/buy.cpp, src/gui/buy.h, src/gui/buysell.cpp,
+ src/gui/buysell.h, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/char_server.h, src/gui/chat.cpp,
+ src/gui/chat.h, src/gui/connection.cpp, src/gui/connection.h,
+ src/gui/gui.cpp, src/gui/login.cpp, src/gui/login.h, src/gui/npc.cpp,
+ src/gui/npc.h, src/gui/npc_text.cpp, src/gui/npc_text.h,
+ src/gui/popupmenu.cpp, src/gui/register.cpp, src/gui/register.h,
+ src/gui/requesttrade.cpp, src/gui/requesttrade.h, src/gui/sell.cpp,
+ src/gui/sell.h, src/gui/skill.cpp, src/gui/skill.h,
+ src/gui/status.cpp, src/gui/status.h, src/gui/trade.cpp,
+ src/gui/trade.h, src/net/messageout.cpp, src/net/messageout.h,
+ src/net/network.cpp, src/net/network.h, src/net/protocol.cpp,
+ src/net/protocol.h: Created a network class.
+
+2006-01-10 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/graphics/tiles/Woodland.png: color modifications
+ * data/maps/new_9-1.tmx.gz: some more errors fixed
+
+2006-01-09 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Fixed canceled/cancelled inconsistency.
+
+2006-01-08 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/floor_item.cpp, src/floor_item.h, src/game.cpp,
+ src/localplayer.cpp, src/localplayer.h, src/gui/gui.cpp,
+ src/gui/popupmenu.cpp, src/net/protocol.cpp, src/net/protocol.h: Made
+ find_floor_item_by_cor return the item instead of its id. Made pickUp
+ a method of the LocalPlayer class.
+ * equipment.cpp, equipment.h, game.cpp, inventory.cpp, inventory.h,
+ localplayer.cpp, localplayer.h, gui/equipmentwindow.cpp,
+ gui/inventorywindow.cpp, gui/item_amount.cpp, gui/popupmenu.cpp: Made
+ inventory and equipment properties of the LocalPlayer class.
+ * src/game.cpp, src/game.h, src/gui/connection.cpp: Removed some
+ globals.
+
+2006-01-07 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/localplayer.cpp, src/localplayer.h: Created a walk
+ method for LocalPlayer.
+
+2006-01-07 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/maps/new_9-1.tmx.gz: Crush fixed the issues reported on wiki.
+ * The Mana World.dev, src/game.cpp, src/gui/setup.cpp, src/gui/setup.h,
+ src/main.cpp: Removed --skipupdate option from Dev.Cpp project file,
+ splitted the setup window into 3 tabs and added a joystick calibration
+ tool.
+
+2006-01-06 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/localplayer.cpp: Changed semantics for auto
+ target. The player now keeps attacking the select target till he
+ selects an other one, and not just by running into another one.
+ * src/being.cpp, src/beingmanager.cpp, src/beingmanager.h,
+ src/game.cpp, src/localplayer.h, src/gui/char_select.cpp,
+ src/gui/char_server.cpp: Fix local player id being wrongly assigned
+ causing various issues.
+ * src/gui/status.cpp: Fix attributes not being shown.
+ * src/Makefile.am, src/being.cpp, src/being.h, src/beingmanager.cpp,
+ src/beingmanager.h, src/engine.cpp, src/game.cpp, src/game.h,
+ src/localplayer.cpp, src/localplayer.h, src/main.cpp, src/map.cpp,
+ src/monster.cpp, src/monster.h, src/player.cpp, src/player.h,
+ src/playerinfo.h, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/chargedialog.cpp, src/gui/chat.cpp,
+ src/gui/gui.cpp, src/gui/inventorywindow.cpp, src/gui/minimap.cpp,
+ src/gui/ministatus.cpp, src/gui/popupmenu.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp, src/gui/status.h, src/net/protocol.cpp,
+ src/net/protocol.h: Created subclasses of the Being class to move
+ specific code there. Added a BeingManager to remove use of globals.
+ Moved PLAYERINFO stuff into the new LocalPlayer class.
+
+2006-01-05 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * engine.cpp, engine.h, game.cpp, game.h, gui/buysell.h,
+ gui/chargedialog.h, gui/debugwindow.cpp, gui/debugwindow.h, gui/gui.h,
+ gui/ministatus.h, gui/npc_text.h, gui/sell.h, gui/setup.h: Remove some
+ useless code.
+
+2006-01-04 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/Makefile.am, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/confirm_dialog.cpp,
+ src/gui/confirm_dialog.h, src/gui/ok_dialog.cpp, src/gui/ok_dialog.h,
+ src/gui/trade.cpp, src/playerinfo.h: Reverted r0nny changes, enabled 3
+ slots to create players, smoothed player deletion.
+
+2006-01-04 Icy <icywolf@web.de>
+
+ * src/game.cpp, src/main.cpp, src/main.h: FreeBSD fixes to The Mana
+ World.
+
+2006-01-03 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp, src/gui/chat.cpp, src/gui/chat.h, src/gui/login.cpp,
+ src/gui/trade.cpp: Really disabled /commands and added proper message
+ when logging in and banned.
+ * src/game.cpp, src/gui/chat.cpp, src/gui/chat.h, src/net/protocol.h:
+ Enabled some /commands.
+ * src/main.cpp: Fixed a compile warning with GCC 4.1.
+
+2006-01-02 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/login.cpp, src/gui/register.cpp:
+ Smoothed also character creation, buttons are now disabled during
+ connection/data phase.
+
+2006-01-01 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/login.cpp, src/gui/login.h: Remove tracking of OkDialog, the
+ garbage collection stuff takes care of deletion and breaks manual
+ tracking.
+
+2006-01-01 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Applied patch by pclouds that allows for a faster
+ login sequence by providing the username and password from the command
+ line, and allowing the client to choose the default server and
+ character.
+
+2005-12-30 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/chat.cpp, src/gui/chat.h: Applied patch by pclouds to have
+ the chat window temporarily become visible when chatting while it is
+ hidden.
+
+2005-12-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, data/graphics/sprites/items.png,
+ data/items.xml, src/Makefile.am, src/gui/char_select.cpp,
+ src/gui/char_server.cpp, src/gui/login.cpp, src/gui/login.h,
+ src/main.cpp, src/main.h, src/net/network.cpp, src/net/network.h,
+ src/gui/register.cpp, src/gui/register.h: Added a new item, improved
+ smooth login sequence, added a registration window (a lot of
+ duplicated code to be removed).
+
+2005-12-29 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, data/maps/new_10-1.tmx.gz,
+ src/gui/char_select.cpp, src/gui/char_select.h, src/gui/char_server.cpp,
+ src/gui/char_server.h, src/gui/connection.cpp, src/gui/connection.h,
+ src/gui/login.cpp, src/gui/login.h, src/net/network.h: Restored Dev-Cpp
+ default execution options, updated walkmap in snow map, smoothed login
+ sequence.
+
+2005-12-29 Jan-Fabian Humann <malastare@gmx.net>
+
+ * src/gui/gui.cpp: Added rather ugly workaround to prevent a on-start
+ crash by Doener. Fixed GCC 3.3.6 and 4.x paranthesis problem, patch
+ by r0nny. Fixed popupMenu not showing on items.
+
+2005-12-29 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/gui/popupmenu.cpp, src/net/protocol.cpp: Remove
+ duplicated code for picking up items as patched by pclouds.
+ * src/game.cpp, src/gui/gui.cpp, src/gui/gui.h,
+ src/gui/inventorywindow.cpp, src/gui/popupmenu.h: Added popup support
+ to the Gui and moved the according code there to get rid of some nasty
+ hack that made them disappear.
+ * src/game.cpp, src/gui/gui.cpp, src/gui/gui.h,
+ src/gui/inventorywindow.cpp, src/gui/popupmenu.h,
+ src/net/protocol.cpp, src/net/protocol.h: Moved all mouse input code
+ into the Gui class.
+
+2005-12-26 Duane Bailey <nayryeliab@gmail.com>
+
+ * src/main.h: Fixed define problems with The_Mana_World_private.h.
+
+2005-12-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp: Small fix to prevent other stuff than the damage
+ numbers from fading out.
+
+2005-12-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/map.cpp: Worked around fringe layer drawing bug at the bottom.
+ * src/main.cpp: When compiling with OpenGL support, it'll default to
+ using OpenGL on only Windows and Mac. These systems are known to have
+ stable acceleration most of the time.
+ * NEWS, configure.ac, The Mana World.dev: Updated in preparation of
+ release 0.0.18.1.
+
+2005-12-20 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac: Changed version to 0.0.18.
+
+2005-12-18 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/maps/new_10-1.tmx.gz, src/main.cpp: Removed unused code and
+ added changes to snowy map by Bertram.
+
+2005-12-15 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Fixed setup window behaviour.
+
+2005-12-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/items.xml: Changed item properties according to eAthena scripting
+ capabilities.
+ * src/being.cpp: Enabled monster emotions.
+
+2005-12-12 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, data/graphics/tiles/Makefile.am, data/items.xml,
+ data/maps/Makefile.am, data/graphics/tiles/Woodland.png,
+ data/graphics/tiles/snowset.png, data/maps/new_9-1.tmx.gz,
+ data/maps/new_10-1.tmx.gz: Cleaned Dev-Cpp project file, added new
+ items definitions and new maps and tilesets.
+
+2005-12-08 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/graphics/sprites/monster11.png,
+ data/graphics/sprites/monster12.png, data/graphics/sprites/monster13.png,
+ data/graphics/sprites/monster14.png, data/graphics/sprites/Makefile.am,
+ data/graphics/sprites/items.png, data/graphics/sprites/npcs.png,: Added
+ new monsters, items and npcs.
+
+2005-12-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+ * src/gui/char_server.cpp: Avoid crashing on trying to log the name
+ of a non-existing character.
+ * src/main.h, src/main.cpp: Display TMW version on Windows too.
+
+2005-11-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated Dev-Cpp project file.
+
+2005-11-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/maps/new_1-1.tmx.gz, data/maps/new_3-1.tmx.gz,
+ data/maps/new_7-1.tmx.gz: Made the three desert maps use the fringe
+ layer for objects. Reveals bug with objects disappearing at the bottom
+ and still some draw order problems.
+
+2005-10-24 Ferreira Yohann <Bertram@cegetel.net>
+
+ * src/main.cpp: Add version displaying at startup.
+ * docs/INSTALL/debian.txt: Updated Debian Install Doc.
+
+2005-10-20 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/item_amount.cpp: Fix scrollbar not being updated when the
+ amount is changed using the buttons.
+ * src/gui/buddywindow.cpp, src/gui/buddywindow.h, src/gui/buy.cpp,
+ src/gui/buy.h, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/chat.cpp, src/gui/help.cpp,
+ src/gui/help.h, src/gui/inventorywindow.cpp,
+ src/gui/inventorywindow.h, src/gui/item_amount.cpp, src/gui/npc.cpp,
+ src/gui/npc.h, src/gui/npc_text.cpp, src/gui/npc_text.h,
+ src/gui/scrollarea.cpp, src/gui/scrollarea.h, src/gui/sell.cpp,
+ src/gui/sell.h, src/gui/setup.cpp ,src/gui/skill.cpp,
+ src/gui/trade.cpp, src/gui/updatewindow.cpp: Add garbage collection to
+ the ScrollArea class.
+ * src/gui/confirm_dialog.cpp, src/gui/confirm_dialog.h,
+ src/gui/connection.cpp, src/gui/connection.h, src/gui/debugwindow.cpp,
+ src/gui/debugwindow.h, src/gui/item_amount.cpp, src/gui/item_amount.h,
+ src/gui/menuwindow.cpp, src/gui/menuwindow.h, src/gui/ok_dialog.cpp,
+ src/gui/ok_dialog.h: Various cleanups and refactorisations.
+ * data/help/index.txt: Fix typo, remove spaces on empty lines.
+
+2005-10-19 Duane Bailey <nayryeliab@gmail.com>
+
+ * data/help/index.txt: Added SDL_net reference.
+
+2005-10-19 Yohann Ferreira <bertram@cegetel.net>
+
+ * debian/rules, debian/tmw.install, debian/copyright, debian/compat,
+ debian/changelog, debian/control, debian/docs, debian/tmw.menu:
+ Updated Debian files to get tmw ready for official ITP.
+
+2005-10-19 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/resources/resourcemanager.cpp: Fix empty lines not being read
+ from text files.
+ * src/gui/browserbox.cpp, src/gui/browserbox.h: Code cleanup.
+ * src/gui/gccontainer.cpp: Remove debug output.
+
+2005-10-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/gui/buddywindow.cpp, src/gui/buddywindow.h,
+ src/gui/buy.cpp, src/gui/buy.h, src/gui/buysell.cpp,
+ src/gui/buysell.h, src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/chargedialog.cpp, src/gui/chargedialog.h, src/gui/chat.cpp,
+ src/gui/confirm_dialog.cpp, src/gui/confirm_dialog.h,
+ src/gui/connection.cpp, src/gui/connection.h, src/gui/debugwindow.cpp,
+ src/gui/debugwindow.h, src/gui/error.h, src/gui/hbox.cpp,
+ src/gui/hbox.h, src/gui/help.cpp, src/gui/inttextbox.cpp,
+ src/gui/inttextbox.h, src/gui/inventorywindow.cpp,
+ src/gui/item_amount.cpp, src/gui/item_amount.h, src/gui/login.cpp,
+ src/gui/login.h, src/gui/menuwindow.cpp, src/gui/menuwindow.h,
+ src/gui/ministatus.cpp, src/gui/ministatus.h, src/gui/newskill.cpp,
+ src/gui/newskill.h, src/gui/npc.cpp, src/gui/npc_text.cpp,
+ src/gui/ok_dialog.cpp, src/gui/popupmenu.cpp, src/gui/popupmenu.h,
+ src/gui/requesttrade.cpp, src/gui/requesttrade.h, src/gui/sell.cpp,
+ src/gui/setup.cpp, src/gui/skill.cpp, src/gui/status.cpp,
+ src/gui/status.h, src/gui/tabbedcontainer.cpp, src/gui/trade.cpp,
+ src/gui/updatewindow.cpp, src/gui/vbox.cpp, src/gui/vbox.h,
+ src/gui/window.cpp, src/gui/window.h, src/gui/windowcontainer.cpp:
+ Added automatic widget cleanup to the window class.
+ * src/gui/connection.cpp, src/gui/connection.h, src/gui/error.cpp,
+ src/gui/status.cpp, src/gui/window.h: Header, whitespace and
+ indentation cleanups.
+
+2005-10-16 Duane Bailey <nayryeliab@gmail.com>
+
+ * src/main.cpp: OpenGL is now default for mac, win, and those who
+ define USE_OPENGL
+ * src/gui/setup.cpp: made it so those who use and go to fullscreen
+ requires a restart (texture/context baddies)
+
+2005-10-16 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/game.cpp, src/inventory.cpp, src/gui/buy.cpp,
+ src/gui/buysell.cpp, src/gui/char_select.cpp, src/gui/char_server.cpp,
+ src/gui/chat.cpp, src/gui/connection.cpp, src/gui/login.cpp,
+ src/gui/npc.cpp, src/gui/npc_text.cpp, src/gui/popupmenu.cpp,
+ src/gui/requesttrade.cpp, src/gui/sell.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp, src/gui/trade.cpp, src/net/messagein.cpp,
+ src/net/messagein.h, src/net/messageout.cpp, src/net/messageout.h,
+ src/net/protocol.cpp: Rename {read,write}{Byte,Short,Long} to
+ {read,write}Int{8,16,32}.
+ * src/being.cpp, src/engine.cpp, src/engine.h, src/game.cpp,
+ src/main.cpp, src/gui/equipmentwindow.cpp, src/gui/itemcontainer.cpp,
+ src/resources/resourcemanager.cpp, src/resources/resourcemanager.h:
+ Use the ResourceManager to get spritesets.
+ * src/being.cpp: Reduce code duplication in the findNode functions and
+ use a functor to do the search.
+ * src/map.cpp: Some code improvements.
+ * src/Makefile.am: Added two missing files.
+
+2005-10-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/game.cpp, src/gui/char_select.cpp,
+ src/gui/char_server.cpp, src/gui/char_server.h, src/gui/connection.cpp,
+ src/gui/connection.h, src/gui/login.cpp, src/gui/login.h, src/main.cpp,
+ src/main.h, src/net/network.cpp, src/net/network.h,
+ src/net/protocol.cpp, src/net/protocol.h: The connection should be
+ non-blocking now and fixed the problem with sound not being played at
+ startup.
+
+2005-10-15 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp: Moved some variables into the conditional block
+ where they are used.
+ * src/being.cpp: A few changes that make the code look nicer.
+ * src/openglgraphics.cpp, src/resources/image.cpp,
+ src/resources/image.h: Some small cleanups.
+ * src/engine.cpp: Removed some legacy debug code.
+
+2005-10-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp: Prevent Alt+p/s/f from appearing in chatbox.
+ * src/Makefile.am: Some updates for added/removed headers.
+ * src/being.cpp: Changed char to signed char for GNU/Linux PPC.
+
+2005-10-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp, src/gui/browserbox.cpp, src/gui/gui.cpp,
+ src/gui/gui.h: Use gcn::Font instead of gcn::ImageFont where the
+ former is sufficient.
+
+2005-10-10 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp, src/being.h, src/game.cpp: Always compile with debug
+ window and hide it on startup. Also added fading out effect on damage
+ font (only works in OpenGL).
+ * src/Makefile.am: Don't include debugwindow.h/cpp twice.
+ * data/graphics/gui/browserfont.png, data/graphics/gui/fixedfont.png,
+ data/graphics/gui/rpgfont_wider.png, src/gui/browserbox.cpp,
+ src/gui/gui.cpp: Pajarico added more international characters to the
+ fixed font and rpg font.
+ * src/game.cpp, README, data/helps/commands.txt: Introduced new window
+ shortcuts.
+ * src/gui/status.cpp: Corrected position of job XP bar.
+ * src/data/graphics/tiles/Makefile.am: Forgot to add new tilesets
+ here.
+ * src/map.cpp: Another small fix to sprite rendering.
+
+2005-10-09 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/gui/browserbox.cpp, src/gui/ministatus.cpp,
+ src/gui/debugwindow.h, src/gui/debugwindow.cpp, src/game.cpp,
+ src/engine.cpp, src/Makefile.am: Corrected the white browser font
+ bug and the black hp/mp bug which were linked. Added a debug window
+
+2005-10-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp, src/being.h, src/engine.cpp, src/engine.h,
+ src/floor_item.cpp, src/floor_item.h, src/map.cpp, src/map.h,
+ src/sprite.h: Made Sprite into an interface implemented by both
+ FloorItem and Being, which hook themselves into the map on
+ construction. The improved fringe layer is working as expected now.
+ * src/equipment.cpp, src/equipment.h, src/game.cpp, src/game.h,
+ src/graphics.cpp, src/guichanfwd.h, src/inventory.h,
+ src/openglgraphics.cpp, src/sound.cpp, src/gui/chargedialog.cpp,
+ src/gui/chargedialog.h, src/gui/chat.cpp, src/gui/chat.h,
+ src/gui/equipmentwindow.cpp, src/gui/equipmentwindow.h,
+ src/gui/gui.cpp, src/gui/help.cpp, src/gui/inventorywindow.cpp,
+ src/gui/item_amount.cpp, src/gui/itemcontainer.cpp,
+ src/gui/itemcontainer.h, src/gui/linkhandler.h, src/gui/login.cpp,
+ src/gui/menuwindow.cpp, src/gui/newskill.cpp, src/gui/npc_text.cpp,
+ src/gui/popupmenu.cpp, src/gui/popupmenu.h, src/gui/progressbar.cpp,
+ src/gui/progressbar.h, src/gui/scrollarea.cpp, src/gui/scrollarea.h,
+ src/gui/skill.cpp, src/gui/status.cpp, src/gui/trade.h,
+ src/gui/window.cpp, src/gui/window.h, src/net/messagein.cpp,
+ src/net/packet.cpp, src/net/packet.h, src/resources/image.cpp,
+ src/resources/image.h, src/resources/iteminfo.cpp,
+ src/resources/iteminfo.h, src/resources/music.cpp,
+ src/resources/music.h, src/resources/soundeffect.cpp,
+ src/resources/soundeffect.h: Made sure TMW compiles without warnings
+ even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings
+ -ansi -pedantic", lots of cleanups.
+ * src/data/maps/new_3-1.tmx.gz, src/graphics/tiles/desert_x2.png,
+ src/graphics/tiled/desert_x3.png: Added two new small tilesets that
+ contain the desert tiles that are twice and three times the height of
+ a normal tile. One well in new_3-1 has been converted to use the new
+ double tiles for testing purposes.
+ * src/being.cpp, src/game.cpp, src/engine.cpp: Fixed map switch
+ crashing the client, display of [TARGET], Alt keys for toggling
+ windows and names to overlap other players.
+
+2005-10-06 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp: Modified finding NPC as by timonator's suggestion in
+ order to allow NPCs to be clicked on their heads too.
+ * src/engine.cpp, src/engine.h, src/floor_item.cpp, src/floor_item.h,
+ src/game.cpp, src/map.cpp, src/sprite.h: Added a Sprite class that
+ represents something on the map. The map will make sure to draw the
+ sprites top to bottom, at the same time as the fringe layer tiles.
+ This is currently still only used by the floor items.
+ * src/item.cpp, src/item.h: Changed formatting and added
+ documentation.
+ * src/properies.h: Separated properties class from Map class, in order
+ to simplify Map class and to allow properties to be used by other
+ classes.
+
+2005-10-06 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/being.h, src/game.cpp: Use integer types from SDL
+ and along the way fixed some long vs. int issues.
+ * src/inventory.cpp: Return NULL when no valid item index is given to
+ getItem() to bail out early.
+
+2005-10-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.cpp, src/main.cpp, src/gui/char_select.cpp,
+ src/gui/skill.cpp, src/net/messagein.cpp: Fixed some resource cleanup
+ and memory leaks.
+ * src/resources/resource.h, src/resources/resourcemanager.cpp:
+ Changed the way dangling references to resources are reported to be
+ more informative.
+
+2005-10-04 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/game.cpp, src/gui/menuwindow.cpp, src/gui/inventorywindow.cpp,
+ src/gui/equipmentwindow.cpp: Move to top the requested window with
+ shortcuts or with menu button, also corrected the default position
+ of equipment and inventory windows.
+ * src/gui/chat.cpp: Fixed the Chat Window scrolling bug.
+ * src/gui/status.cpp, src/gui/ministatus.cpp: Changed the font used
+ in mini-status. Dynamised previously statically placed widgets in
+ status win to avoid some label over-drawings.
+ * src/gui/setup.cpp: Enable the OpenGL Checkbox only if tmw has been
+ compiled with its support.
+
+2005-10-02 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, src/Makefile.am: Added check for pthread library and
+ removed manual -lpthread and -lguichan linker flags.
+ * src/map.cpp: A small start on supporting other tile height than the
+ default (map) tile height.
+ * src/gui/window.cpp, src/gui/window.h, src/resources/buddylist.cpp,
+ src/resources/buddylist.h: Some cleanups (void argument list was
+ something you had to do in C times, not necessary in C++).
+
+2005-09-30 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/gui/inventorywindow.cpp, src/gui/inventorywindow.h,
+ src/gui/window.h src/gui/window.cpp src/gui/setup.cpp: Made the
+ inventory Win behave normally when resized by default size functions.
+
+2005-09-29 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/game.cpp, src/gui/window.h, src/gui/window.cpp, src/gui/setup.h,
+ src/gui/setup.cpp, src/gui/chat.cpp, src/gui/inventorywindow.h,
+ src/gui/inventorywindow.cpp, src/gui/skill.cpp,
+ src/gui/equipmentwindow.cpp, src/gui/menuwindow.cpp,
+ src/gui/ministatus.cpp, src/gui/minimap.cpp, src/gui/status.cpp:
+ Improved a lot windows reset to default size and pos. Also corrected
+ a few the default win position. And moved the setposition from game to
+ each win, to clarify the code.
+
+2005-09-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/map.cpp, src/map.h, src/tileset.h, src/resources/mapreader.cpp,
+ src/resources/mapreader.h: Moved tileset management into the map class
+ and made sure the tilesets are cleaned up properly on switching maps.
+
+2005-09-28 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/gui/updaterwindow.cpp: Fixed the scroll bug in the update window.
+ * src/gui/ministatus.h, src/gui/ministatus.cpp: Added HP, MP Display
+ in mini-status window.
+ * src/gui/window.h, src/gui/window.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp, src/gui/equipmentwindow.cpp, src/gui/help.cpp,
+ src/gui/inventorywindow.cpp, src/gui/minimap.cpp, src/gui/chat.cpp:
+ Added window internal name to later get X, Y, height and width be
+ saved.
+ * src/gui/window.h, src/gui/window.cpp, src/game.cpp: Load and save X,
+ Y, Width and Height of windows when useful.
+ * src/gui/setup.cpp, src/gui/setup.h; src/gui/minimap.h: Added a 'Reset
+ Windows to Default' Button in the Setup Window.
+
+2005-09-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/browserbox.cpp: Fix deletion of the gui font because of a
+ missing check.
+ * src/Makefile.am: Added -Werror to the CXXFLAGS to catch warnings
+ easier.
+ * src/gui/error.h: Removed unnecessary ambigous inheritance.
+
+2005-09-26 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/gui/char_select.cpp, debian/control, debian/rules,
+ debian/tmw.install, debian/changelog: Updated Debian files and fixed a
+ typo let by Elven.
+
+2005-09-26 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/Makefile.am, src/game.cpp,
+ src/gui/char_select.cpp, src/gui/char_server.cpp, src/gui/error.cpp,
+ src/gui/error.h, src/gui/gui.cpp, src/gui/login.cpp,
+ src/gui/updatewindow.cpp, src/main.cpp, src/main.h,
+ src/net/network.cpp: Added a nicer handling of when you get
+ disconnected from the server.
+ * src/gui/char_select.cpp, src/gui/skill.cpp, src/main.cpp, src/main.h,
+ src/net/network.cpp: Now error message is displayed properly when the
+ map server is offline.
+
+2005-09-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/openglgraphics.cpp: Fixed taking OpenGL screenshots and in
+ addition made it flip the image using just a line buffer instead of a
+ buffer for the complete image. Still needs testing on MacOS X.
+
+2005-09-24 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/being.cpp, src/engine.cpp, src/game.cpp, src/main.cpp,
+ src/map.cpp, src/sound.cpp, src/gui/char_select.cpp,
+ src/gui/char_select.h, src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/chargedialog.cpp, src/gui/chargedialog.h, src/gui/chat.cpp,
+ src/gui/equipmentwindow.cpp, src/gui/login.h, src/gui/setup.cpp,
+ src/gui/setup.h, src/gui/status.cpp, src/gui/updatewindow.cpp,
+ src/gui/updatewindow.h, src/resources/iteminfo.cpp,
+ src/resources/iteminfo.h, src/resources/itemmanager.cpp,
+ src/resources/itemmanager.h: Merged most of the changes in
+ biggeruniverse's second memory cleanup patch.
+
+2005-09-23 Duane Bailey <nayryeliab@gmail.com>
+
+ * src/openglgraphics.cpp: Totally redid the OpenGL screenshot method.
+ Needs to be tested on lil endian systems. Also made it smoother on
+ OpenGL MacOSX.
+
+2005-09-23 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/resources/imagewriter.cpp: Reverted the last change that broke
+ the screenshots facility.
+
+2005-19-22 Duane Bailey <nayryeliab@gmail.com>
+
+ * src/net/win2mac.h, src/net/win2mac.cpp: Removed
+ * src/net/network.h, src/net/messagein.h, src/net/messageout.h:
+ Removed references to win2mac.h
+ * src/net/messagein.cpp, src/net/messageout.cpp, src/net/network.cpp:
+ Changed byte swapping support to SDL_endian
+
+2005-09-21 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/gui/chat.cpp: Show time of the messages in the chat window.
+ * The Mana World.dev: Removed reference to src/gui/stats.* since they
+ are in the attic now.
+
+2005-09-20 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/game.cpp, src/gui/ok_dialog.cpp, src/gui/ok_dialog.h,
+ src/gui/window.cpp: Enter is used to dismiss dialogs currently,
+ removed the hacks for use in combination with non-modal dialogs that
+ made the game crash.
+ * src/openglgraphics.cpp: Changed glColor4f to glColor4ub.
+
+2005-09-19 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac: Replaced custom function FIND_PATH with AC_PATH_PROG,
+ used for finding sdl-config.
+ * src/Makefile.am: Removed -lphysfs which should be added
+ automatically already.
+ * src/engine.cpp, src/game.h, src/game.cpp, src/openglgraphics.h,
+ src/gui/popupmenu.cpp, src/net/messagein.cpp, src/net/messageout.cpp,
+ src/net/win2mac.h, src/net/win2mac.cpp: Some cleanups.
+ * src/game.cpp: Actually show the overweight message, and only show it
+ once for each time weight goes above half the max weight (apparently
+ this code wasn't even tested once).
+ * src/graphics.cpp: Surfaces passed to SDL_BlitSurface shouldn't be
+ locked according to the manual.
+ * src/main.cpp: Minimal fps limit is now 10 fps.
+ * src/gui/updatewindow.cpp: Reverted change by Bertram that hardcoded
+ the updatehost value.
+
+2005-09-19 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp, src/gui/trade.cpp, src/gui/updatewindow.cpp,
+ src/inventory.cpp: Removed useless flush() calls.
+ * src/being.cpp, src/game.cpp, src/gui/buy.cpp, src/gui/buysell.cpp,
+ src/gui/char_select.cpp, src/gui/char_server.cpp, src/gui/chat.cpp,
+ src/gui/login.cpp, src/gui/npc.cpp, src/gui, npc_text.cpp,
+ src/gui/popipmenu.cpp, src/gui/requesttrade.cpp, src/gui/sell.cpp,
+ src/gui/skill.cpp, src/gui/status.cpp, src/gui/trade.cpp,
+ src/inventory.cpp, src/net/messageout.cpp, src/net/network.cpp,
+ src/net/network.h, src/net/protocol.cpp: Got rid of writeSet() calls.
+ * data/graphics/sprites/monster2.png: Fixed some non very bright pixels.
+
+2005-09-18 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/gui/npc.cpp: Updated dev-cpp project file to
+ last changes, and fixed the bug with npc lists I introduced earlier.
+ * data/items.xml: Updated the defense value of fancy hat as pointed out
+ by xand.
+ * src/game.cpp, src/gui/gui.cpp, src/gui/updatewindow.cpp,
+ src/main.cpp, src/resources/mapreader.cpp: Applied biggeruniverse's
+ patch to fix memory leaks.
+ * src/game.cpp, src/main.cpp: Increased joypad tolerance which is safer
+ and simplifyed joypad state reset code.
+
+2005-09-18 Duane Bailey <nayryeliab@gmail.com>
+
+ * game.cpp: Added weight notice; now notifies person when they
+ are carrying more then half their weight
+
+2005-09-18 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/game.cpp, src/graphics.cpp, src/graphics.h,
+ src/resources/imagewriter.cpp, src/resources/imagewriter.h:
+ Made the saveScreenShot makes its screenshots under user home dir in
+ *nices, made it more C++ way to avoid a leak, and made it check
+ for existence of a file with same name before writing; In that
+ case the screenshot's number is incremented until it finds
+ an adequate name.
+ * src/gui/updatewindow.cpp: Corrected a bug in the determination
+ of the update host I had.
+ * src/gui/updatewindow.cpp, src/playerinfo.h, debian/control,
+ debian/changelog: Corrected a range value bug for derived stats.
+ Fixed the percentage of the update win, updated debian information.
+ * src/gui/status.cpp: As m[a]tt noticed, made the status win a
+ little more wide, and resizable.
+
+2005-09-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp, src/graphics.cpp, src/graphics.h: Move the writing
+ logic out of the Graphics class once again... Some cleanups in the
+ screenshot filename selection code.
+ * src/resources/imagewriter.cpp: Small cleanups.
+ * src/Makefile.am, src/game.cpp, src/graphics.cpp, src/graphics.h,
+ src/openglgraphics.cpp, src/openglgraphics.h: Changed saveScreenshot
+ function in Graphics to getScreenshot. We now use the ImageWriter to
+ save that screenshot.
+ * src/resources/imagewriter.cpp, src/resources/imagewriter.h: Added
+ ImageWriter class that provides a function to save a SDL surface as
+ png.
+
+2005-09-17 Duane Bailey <nayryeliab@gmail.com>
+
+ * src/net/messagin.cpp, src/net/messageout.cpp, src/net/network.cpp:
+ removed replaced MACOSX defines with big endian defines
+ * src/graphics.cpp, src/graphics.h: added screenshot method
+ * src/game.cpp: added code, so that when one presses 'alt-p' (for
+ picture), it takes a screenshot and saves it to a png
+ * src/Makefile.am, config.ac: added png library stuff
+
+2005-09-17 Matthias Hartmann <hartmann.matthias@gmail.com>
+
+ * src/engine.cpp: [TARGET] text over player
+ * src/game.cpp, src/game.h: PVP
+ * src/gui/popupmenu.cpp: Added "attack" option to the popupmenu
+ * src/net/protocol.cpp: findPlayer
+
+2005-09-17 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.cpp, src/game.cpp: Indent properly.
+
+2005-09-17 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * configure.ac: Fix typo.
+ * src/Makefile.am: Remove useless (duplicate) -lpng.
+ * src/graphics.cpp: Add missing cstdarg header.
+ * src/net/messagein.cpp: Fix some funny looking preprocessor
+ statement.
+ * src/net/messageout.cpp: Readd SDLnet header, for changed
+ preprocessor stuff.
+ * src/game.h: Remove inclusion of being.h, there was a forward
+ declaration of class Being anyways...
+ * src/openglgraphics.cpp: Use gl{Push,Pop}Matrix instead of
+ calculating offsets, cause the values are stored as float and aren't
+ accurate enough.
+
+2005-09-17 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/gui/skill.cpp: Updated to last changes, and
+ wrong names fixes.
+ * src/being.cpp, src/game.cpp, src/gui/buy.cpp, src/gui/buysell.cpp,
+ src/gui/char_select.cpp, src/gui/char_server, src/gui/chat.cpp,
+ src/gui/npc.cpp, src/gui/npc_text.cpp, src/gui/popupmenu.cpp,
+ src/gui/requesttrade.cpp, src/gui/sell.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp, src/gui/trade.cpp, src/inventory.cpp,
+ src/net/messageout.cpp, src/net/network.cpp, src/net/network.h,
+ src/net/protocol.cpp, src/net/protocol.h: Completed transition to use
+ MessageOut.
+
+2005-09-17 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/game.cpp, src/gui/ministatus.cpp, src/gui/ministatus.h,
+ src/gui/menuwindow.h, src/gui/menuwindow.cpp, src/gui/status.cpp,
+ src/gui/status.h: Improving General Layout.
+ * src/games.cpp, src/playerinfo.h, src/gui/char_server.cpp,
+ src/gui/char_select.cpp, src/gui/ministatus.cpp, src/gui/skill.cpp,
+ src/gui/status.cpp, src/gui/status.h: Now the derived stats values
+ are got from the server, and then, are correct ones.
+ * src/gui/minimap.cpp: Only shows the Minimap Window if there's
+ actually a minimap to the current map.
+ * src/gui/status.cpp, src/game.cpp: The derived stats are now updated
+ correctly upon equipping/unequipping.
+
+2005-09-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/resources/image.cpp: Report which error occured when loading of
+ an image fails.
+
+2005-09-14 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp: Fix missing parentheses in a negated check.
+ * src/engine.cpp, src/engine.h, src/game.cpp: Moved Map management
+ code completely into engine.cpp.
+ * src/net/messagein.cpp, src/net/messagein.h, src/net/messageout.cpp,
+ src/net/messageout.h: Added stream operators for char, short and long
+ reading and writing.
+ * src/game.cpp, src/log.cpp, src/main.cpp, src/gui/char_select.cpp,
+ src/gui/char_server.cpp, src/gui/login.cpp, src/net/messageout.cpp,
+ src/net/messageout.h, src/net/network.cpp, src/net/network.h,
+ src/net/packet.cpp, src/net/protocol.cpp: Header cleanups.
+ * src/gui/popupmenu.cpp, src/gui/sell.cpp: Use cassert instead of
+ assert.h.
+ * src/net/network.cpp: Add missing cassert header, remove some unused
+ headers.
+ * src/net/messagein.cpp: Add missing cassert header.
+ * src/being.cpp, src/being.h, src/game.cpp: Made Being::setDamage
+ accept a short instead of a string.
+ * src/game.cpp, src/game.h, src/gui/char_select.cpp: Converted
+ map_path from char array to std::string.
+
+2005-09-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated to last changes.
+ * The Mana World.dev: Added latest changes to the proper branch.
+ * src/gui/login.cpp, src/net/messageout.cpp, src/net/messageout.h,
+ src/net/network.cpp, src/net/network.h: Started to use MessageOut to
+ send login data.
+
+2005-09-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * ChangeLog, The Mana World.dev, configure.ac, src/Makefile.am,
+ src/being.cpp, src/being.h, src/engine.cpp, src/floor_item.cpp,
+ src/floor_item.h, src/game.cpp, src/game.h, src/inventory.cpp,
+ src/log.h, src/main.cpp, src/playerinfo.h, src/serverinfo.h,
+ src/gui/buy.cpp, src/gui/buysell.cpp, src/gui/char_select.cpp,
+ src/gui/char_server.cpp, src/gui/chargedialog.cpp, src/gui/chat.cpp,
+ src/gui/inventorywindow.cpp, src/gui/login.cpp, src/gui/npc.cpp,
+ src/gui/npc.h, src/gui/npc_text.cpp, src/gui/npc_text.h,
+ src/gui/popupmenu.cpp, src/gui/requesttrade.cpp,
+ src/gui/requesttrade.h, src/gui/sell.cpp, src/gui/skill.cpp,
+ src/gui/stats.cpp, src/gui/status.cpp, src/gui/status.h,
+ src/gui/trade.cpp, src/net/messagein.cpp, src/net/messagein.h,
+ src/net/messageout.cpp, src/net/messageout.h, src/net/network.cpp,
+ src/net/network.h, src/net/packet.cpp, src/net/packet.h,
+ src/net/protocol.cpp, src/net/protocol.h, src/net/win2linux.h,
+ src/net/win2mac.cpp, src/net/win2mac.h: Merged with SDL_NET_TEST
+ branch.
+ * src/being.cpp, src/being.h, src/game.cpp: Simplify remove_node.
+ * src/being.cpp, src/being.h, src/game.cpp: Merged createBeing and
+ add_node into createBeing.
+ * src/main.cpp, src/main.h, src/gui/char_select.cpp,
+ src/gui/login.cpp: Removed some globals.
+ * src/main.cpp, src/main.h, src/gui/char_select.cpp,
+ src/gui/char_select.h, src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/login.cpp, src/gui/login.h, src/gui/updatewindow.cpp,
+ src/gui/updatewindow.h: Unified the loops for the various dialogs that
+ are shown before the actual game starts.
+ * src/gui/login.cpp: Removed a close_session call i missed.
+ * src/gui/login.cpp: Close the session only when it was opened.
+
+2005-09-13 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/floor_item.cpp, src/floor_item.h, src/engine.cpp,
+ popupmenu.cpp: Made members private and provided more convenient
+ constructor.
+ * src/net/messageout.cpp: Fixed bug in destructor.
+ * src/net/network.cpp: Initialize buffers and enforce only a single
+ session at a time.
+ * src/game.cpp, src/net/protocol.h: Converted all incoming messages
+ handled in game.cpp to use the MessageIn class. This is a huge change
+ so please test if everything is still working correctly.
+ * src/gui/npc.cpp, src/gui/npc.h, src/gui/npc_text.cpp,
+ src/gui/npc_text.h: Changed argument from char* to std::string for
+ convenience.
+ * src/gui/setup.cpp, src/gui/setup.h: Enabled OpenGL checkbox and
+ added messagebox informing the user that apply this change requires
+ restarting the client.
+ * src/gui/updatewindow.cpp: Start displaying file progress at 0% and
+ some small fixes.
+
+2005-09-12 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/gui/browserbox.cpp, src/gui/gui.cpp,
+ src/resources/resourcemanager.cpp, src/resources/resourcemanager.h,
+ src/resources/sdlimageloader.cpp, src/resources/sdlimageloader.h:
+ Added SDLImageLoader to make guichan support physfs. Removed
+ ResourceManager::getRealPath() because it's no longer needed.
+
+2005-09-12 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * data/graphics/gui/hits_blue.png, data/graphics/gui/hits_red.png,
+ data/graphics/gui/hits_yellow.png: Made shadow translucent.
+ * data/graphics/images/minimap_new_7-1.png: Added this minimap.
+ * data/help/changes.txt, data/help/commands.txt: Added 0.0.16 changes.
+ * data/maps/new_7-1.tmx.gz: Fixed well being in the wrong layer.
+
+2005-09-11 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/net/network.cpp: Improved error reporting a bit and got rid of
+ loop for sending data, which shouldn't be necessary according to
+ SDL_net documentation.
+ * src/Makefile.am, src/being.cpp, src/being.h, src/engine.cpp,
+ src/game.cpp, src/main.cpp, src/playerinfo.h, src/gui/char_server.cpp,
+ src/gui/chargedialog.cpp, src/gui/chat.cpp,
+ src/gui/inventorywindow.cpp, src/gui/popupmenu.cpp, src/gui/skill.cpp,
+ src/gui/stats.cpp, src/gui/status.cpp, src/gui/status.h,
+ src/net/protocol.cpp: Changed char_info into the array it's used as
+ for character selection and introduced player_info as the pointer to
+ the player information. Should help towards support for multiple
+ characters on the same account. Also changed PLAYER_INFO name field to
+ a std::string.
+ * src/net/win2mac.cpp, src/net/win2mac.h: A bit of clean up.
+ * src/net/packet.h, src/net/packet.cpp, src/net/messagein.h,
+ src/net/messagein.cpp, src/net/messageout.h, src/net/messageout.cpp:
+ Added these packet reading/writing helpers, taken from the new server
+ in development.
+ * src/gui/char_select.cpp: Made new character message be parsed
+ using MessageIn. Many other incoming messages should be ready to be
+ ported similarly, simplifying the parsing of packets because of
+ automatic incrementation of the read position.
+ * src/game.cpp, src/game.h, src/gui/popupmenu.cpp,
+ src/gui/requesttrade.cpp, src/gui/requesttrade.h: Changed
+ tradePartnerName to std::string.
+ * src/net/win2linux.h: Removed because it became redundant with
+ the use of SDL_net.
+ * src/game.cpp, src/game.h, src/gui/char_select.cpp,
+ src/net/messagein.cpp, src/net/messagein.h, src/net/network.cpp,
+ src/net/network.h: Got rid of usage of Packet by MessageIn,
+ simplifying both its usage and implementation. Now also handling
+ response to character selection through MessageIn.
+ * src/main.cpp, src/serverinfo.h, src/gui/char_select.cpp,
+ src/gui/char_server.cpp, src/gui/login.cpp, src/net/network.cpp,
+ src/net/network.h, src/net/protocol.cpp, src/net/protocol.h:
+ Introduced get_next_message function to reduce duplication of that
+ process. Also now MessageIn is used for all incoming messages handled
+ during the login sequence.
+ * src/being.cpp, src/being.h, src/game.cpp, src/game.h,
+ src/inventory.cpp, src/serverinfo.h, src/gui/login.cpp,
+ src/gui/trade.cpp, src/net/messagein.cpp, src/net/messagein.h,
+ src/net/network.cpp, src/net/protocol.cpp, src/net/protocol.h: Added
+ readCoordinates and readCoordinatePair to MessageIn for reading the
+ specific ways eAthena sends sends those, and converted part of
+ game.cpp to use the MessageIn class. Also simplified cases where
+ flush() was still called in a loop for sending and added asserts to
+ MessageIn methods.
+
+2005-09-10 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/log.cpp: Committed patch by Nayr for displaying a messagebox
+ when an error occurs on MacOS.
+
+2005-09-10 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * configure.ac: Add check for SDL_net.
+
+2005-09-09 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Fixes to dropped items network code
+
+2005-09-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/net/win2linux.h: Removed inclusion of malloc.h header as it
+ doens't seem necessary and was problematic on FreeBSD.
+
+2005-09-08 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp: Clean the floor items when the map changes.
+
+2005-08-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * README, The Mana World.dev, data/graphics/sprites/items.png,
+ data/graphics/sprites/npcs.png, data/help/header.txt,
+ data/help/skills.txt, data/items.xml, data/maps/new_8-1.tmx.gz:
+ Updated docs for release, fixed Dev-Cpp project file, added more items
+ and npcs, fixed the new map and added it to the makefile.
+
+2005-08-31 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Fix push/pop of clip area, we need to
+ translate using the x/y offset, not the x/y coordinates of the clip
+ area. This fixes the broken scrollareas.
+
+2005-08-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated project file.
+ * data/graphics/sprites/npcs.png, src/gui/sell.cpp: Added empty sprite
+ and reorganized spriteset, fixed a typo.
+
+2005-08-29 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/configlistener.cpp, src/configlistener.h: Made
+ the destructor inline, as it is an interface, we don't need a .cpp
+ file, thus it was removed.
+ * src/resources/image.cpp, src/resources/image.h,
+ src/resources/music.cpp, src/resources/music.h,
+ src/resources/resource.cpp, src/resources/resource.h,
+ src/resources/resourcemanager.cpp, src/resources/soundeffect.cpp,
+ src/resources/soundeffect.h: Removed the setIdPath() method from the
+ Resource class and added the idPath as a Constructor parameter, as
+ that value is not meant to be changed.
+
+2005-08-29 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * data/maps/new_8-1.tmx.gz: Some layer and walkability fixes.
+
+2005-08-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp, src/gui/browserbox.cpp,
+ src/gui/buddywindow.cpp, src/gui/buddywindow.h, src/gui/buysell.h,
+ src/gui/char_server.h, src/gui/chargedialog.h, src/gui/chat.cpp,
+ src/gui/chat.h, src/gui/confirm_dialog.h, src/gui/equipmentwindow.h,
+ src/gui/focushandler.h, src/gui/gui.cpp, src/gui/gui.h,
+ src/gui/help.h, src/gui/inttextbox.cpp, src/gui/inventorywindow.cpp,
+ src/gui/inventorywindow.h, src/gui/item_amount.h,
+ src/gui/itemcontainer.cpp, src/gui/listbox.cpp, src/gui/newskill.h,
+ src/gui/npc_text.h, src/gui/ok_dialog.h, src/gui/passwordfield.cpp,
+ src/gui/requesttrade.h, src/gui/setup.h, src/gui/stats.h,
+ src/gui/status.h, src/gui/textbox.cpp, src/gui/textfield.cpp,
+ src/gui/trade.h, src/gui/updatewindow.h: Add #include's that just
+ weren't necessary because the guichan folks don't provide clean
+ headers. This is preparatory for the case that they ever do. ;)
+ * src/gui/gui.cpp, src/gui/gui.h: Create a GuiConfigListener class.
+ * src/gui/window.h: Small cleanup.
+ * src/gui/window.cpp, src/gui/window.h: Create a static ConfigListener
+ for the Window class. (Fixes each Window listening to config changes,
+ although they only affect a static class member.)
+
+2005-08-27 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/npc.cpp: Fix a memory leak.
+ * src/game.cpp, src/gui/npc.cpp, src/gui/npc.h: Fix the bug when
+ sometimes the last entry in npc list windows is missing. The network
+ buffer isn't reset to all zeros, thus we can't rely on the received
+ string to be nul-terminated, instead we have to use the length
+ parameter we receive from eAthena (and this way we're also safe
+ against buffer overflows, because we can use strncpy()).
+ * src/gui/window.cpp: Bail out early if there's no window container.
+ * src/engine.cpp, src/game.cpp, src/gui/stats.cpp, src/gui/stats.h,
+ src/gui/status.cpp, src/gui/status.h: Update the stats and status
+ window contents only at a single location and let them do it
+ automagically.
+ * src/gui/updatewindow.cpp, src/gui/updatewindow.h: Small cleanups.
+
+2005-08-25 Ferreira Yohann <bertram@cegetel.net>
+
+ * src/gui/buy.h, src/gui/buy.cpp, src/gui/sell.h, src/gui/sell.cpp,
+ src/gui/inventorywindow.h, src/gui/inventorywindow.cpp: Added effect
+ description to those each windows, and also made some improvements and
+ bugfixes as I was on it.
+ * data/maps/new_7-1.tmx.gz: Added eyecandy to the map 7-1.
+
+2005-08-26 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * ChangeLog: Fix indentation and line length.
+ * docs/HACKING.txt: Fix the example (OOPS!).
+ * src/configuration.cpp: Remove dependency on math.h.
+ * src/openglgraphics.cpp: Remove useless code.
+ * src/openglgraphics.cpp: Use glTranslatef instead of glTranslated.
+ Remove some useless code.
+
+2005-08-25 Ferreira Yohann <bertram@cegetel.net>
+
+ * src/main.h, src/main.cpp, src/gui/login.cpp,
+ src/resources/buddylist.cpp, gui/char_select.cpp: Adding min and max
+ length check for password, more code cleanups in login and removing
+ possible buffer overflows by replacing some global char[] by
+ std::strings.
+ * src/items.h, src/items.cpp, src/resources/itemmanager.h,
+ src/resources/itemmanager.cpp, src/resources/iteminfo.h,
+ src/resources/iteminfo.cpp, data/items.xml, data/items.xsd: Added
+ Effects description to items.
+
+2005-08-25 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * ChangeLog: Fixed line length using tab size of 8.
+ * src/configuration.h, src/configuration.cpp: Removed some debug code
+ and updated documentation a bit.
+ * src/resources/resourcemanager.cpp: Removed unused (I think) headers
+ for Windows.
+
+2005-08-25 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Use the translation capabilities of OpenGL
+ instead of doing it ourselves all the time.
+ * src/graphics.cpp: Simplify the image rect drawing code a bit and
+ remove an obsolete included header.
+ * src/openglgraphics.cpp, src/openglgraphics.h: Reduce the code
+ duplication even further.
+ * src/engine.cpp, src/floor_item.cpp, src/floor_item.h: Move the
+ extern declaration for the floor item list into engine.cpp as it's
+ only used there.
+ * src/log.cpp: Lower indentation level.
+ * src/openglgraphics.cpp, src/openglgraphics.h: Reduce code
+ duplication.
+ * src/configuration.cpp: Fix compilation errors.
+ * src/graphics.cpp, src/openglgraphics.cpp, src/gui/button.cpp,
+ src/gui/checkbox.cpp, src/gui/equipmentwindow.cpp,
+ src/gui/itemcontainer.cpp, src/gui/minimap.cpp,
+ src/gui/passwordfield.cpp, src/gui/playerbox.cpp,
+ stc/gui/progressbar.cpp, src/gui/radiobutton.cpp,
+ src/gui/scrollarea.cpp, src/gui/slider.cpp, src/gui/textfield.cpp,
+ src/gui/window.cpp: Made our Graphics::drawImage() method respect the
+ clip area from the guichan part. Removed some obsolete code.
+ * src/gui/tabbedcontainer.h: Fix include path for guichanfwd.h.
+ * src/gui/tabbedcontainer.cpp, src/gui/tabbedcontainer.h: Added a new
+ container type, that allows switching between the contents through a
+ tab bar at the top of the container.
+ * ChangeLog: Fixed intendation and line length.
+ * docs/HACKING.txt: Added a notice about line length in ChangeLog and
+ an example for the ChangeLog format.
+
+2005-08-24 Ferreira Yohann <bertram@cegetel.net>
+
+ * src/game.cpp: Simply don't show equipped items in sell dialog as it's
+ annoying.
+ * src/gui/login.h, src/gui/login.cpp: Code cleanups and improvements
+ to the login sequence.
+
+2005-08-23 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/shop.h: Fixed using a forward declaration for std::string,
+ where it was a class member.
+ * src/game.cpp, src/gui/sell.cpp, src/gui/sell.h: Made the sell dialog
+ accepts Items instead of looking them up in the inventory.
+ * src/gui/sell.cpp: Some code cleanups, simplifications and removal of
+ duplicate code.
+ * src/gui/buy.cpp, src/gui/sell.cpp, src/gui/shop.h: Avoid possible
+ buffer overflows by using a std::string instead of char[30].
+ * src/gui/buy.cpp: Some code cleanups, simplifications and removal of
+ duplicate code.
+
+2005-08-22 Ferreira Yohann <bertram@cegetel.net>
+
+ * src/gui/buy.cpp, src/gui/sell.cpp, src/game.cpp: Removed asserts as
+ they were not suitable for a stable implementation of buy/sell dialogs
+ and made some improvements on them. Still has to clean up code.
+ * src/gui/login.h, src/login.cpp: Code cleanups, little improvements of
+ the login function.
+
+2005-08-22 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/skill.cpp: Disabled use button in skill dialog since is still
+ not being used.
+
+2005-08-20 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/openglgraphics.cpp: Added some missing state changes and checks.
+ * src/gui/inventorywindow.cpp, src/gui/item_amount.cpp,
+ src/gui/item_amount.h, src/gui/popupmenu.cpp, src/gui/trade.cpp: Made
+ the item amount dialog work on a provided item, instead of having it
+ ask the inventory window itself.
+
+2005-08-19 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp, src/game.cpp: The engine isn't connected to all the
+ gui windows, so move creation from its constructor into the game.cpp
+ where most of them are actually used.
+ * src/log.cpp, src/log.h, src/main.cpp: Added support for parsing
+ command line options. Added option to skip the update process. Made
+ logger being created immediately after startup, because some
+ destructors use it.
+
+2005-08-18 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/game.cpp, src/gui/skill.h, src/gui/skill.cpp:
+ Updated reference to latest libxml, fixed a bug in updating skills,
+ updated skill names database.
+
+2005-08-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/graphics.cpp, src/graphics.h, src/main.cpp,
+ src/openglgraphics.cpp src/openglgraphics.h, src/gui/gui.cpp,
+ src/resources/image.h: Semi-separated OpenGL and SDL graphics classes,
+ improves OpenGL performance quite a bit, while rewriting a good bunch
+ of code provided by guichan (but maybe we'll diverge so much that we'd
+ need that anyways...)
+
+2005-08-17 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/configuration.cpp, src/resources/itemmanager.cpp,
+ src/resources/mapreader.cpp: Removed special #ifdefs for libxml2
+ linking issues in Win32.
+
+2005-08-16 Ferreira Yohann <bertram@cegetel.net>
+
+ * src/gui/window.h, src/gui/window.cpp: Bugfixing and simplifying
+ resize code.
+ * debian/*: Updates to the debian packaging files. (The actual update
+ was from a few days ago.) Now we have the tmw, tmw-data and tmw-music
+ packages.
+ * src/gui/setup.h, src/gui/setup.cpp: Now the setup (Config) windows
+ works as it should be. (The actual update was from a few days ago.)
+
+2005-08-16 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/gui/status.cpp, src/gui/window.cpp,
+ src/gui/window.h, src/gui/windowcontainer.h,
+ data/graphics/gui/resize.png: Added a resize grip to resizable window,
+ fixed some compiling errors.
+
+2005-08-15 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp, src/gui/gui.cpp, src/gui/gui.h: Removed guiTop global
+ variable.
+ * src/graphics.cpp, src/graphics.h, src/main.cpp: Made the OpenGL
+ related code fully #ifdef'ed.
+ * src/main.cpp, src/gui/browserbox.cpp, src/gui/gui.cpp,
+ src/resources/image.cpp, src/resources/image.h: Fully faded out the
+ useOpenGL global. Image and Graphics keep track of the mode on their
+ own now (the latter will go away once we have separate classes...)
+ * src/graphics.cpp, src/graphics.h, src/main.cpp, src/main.h,
+ src/gui/browserbox.cpp, src/gui/gui.cpp, src/resources/image.cpp:
+ Started to fade out the useOpenGL global variable.
+ * src/engine.cpp, src/gui/char_select.cpp, src/gui/char_server.cpp,
+ src/gui/chat.cpp, src/gui/gui.cpp, src/gui/gui.h, src/gui/login.cpp,
+ src/gui/popupmenu.cpp, src/gui/setup.cpp, src/gui/updatewindow.cpp,
+ src/gui/window.cpp: Removed guiGraphics global pointer and removed
+ dependencies on gui.h in some places.
+
+
+2005-08-14 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/graphics.cpp, src/graphics.h, src/resources/image.cpp,
+ src/resources/image.h: Moved the image drawing code into the graphics
+ class.
+ * src/being.cpp, src/engine.cpp, src/graphics.cpp, src/graphics.h: Made
+ the wrapper functions in the Graphics class conditional on whether we
+ compile with OpenGL support.
+
+2005-08-13 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/Makefile.am, src/being.cpp, src/being.h, src/configlistener.cpp,
+ src/configlistener.h, src/configuration.cpp, src/configuration.h,
+ src/engine.cpp, src/engine.h, src/equipment.cpp, src/equipment.h,
+ src/game.cpp, src/game.h, src/graphics.cpp, src/graphics.h,
+ src/guichanfwd.h, src/inventory.cpp, src/inventory.h, src/item.h,
+ src/log.cpp, src/log.h, src/main.cpp, src/main.h, src/map.cpp,
+ src/map.h, src/playerinfo.h, src/sound.cpp, src/sound.h,
+ src/graphic/imagerect.h, src/graphic/spriteset.cpp,
+ src/graphic/spriteset.h, src/gui/box.h, src/gui/browserbox.cpp,
+ src/gui/browserbox.h, src/gui/buddywindow.h, src/gui/button.cpp,
+ src/gui/button.h, src/gui/buy.cpp, src/gui/buy.h, src/gui/buysell.h,
+ src/gui/char_select.cpp, src/gui/char_select.h,
+ src/gui/char_server.cpp, src/gui/char_server.h,
+ src/gui/chargedialog.cpp, src/gui/chargedialog.h, src/gui/chat.cpp,
+ src/gui/chat.h, src/gui/chatinput.cpp, src/gui/checkbox.cpp,
+ src/gui/checkbox.h, src/gui/confirm_dialog.cpp,
+ src/gui/confirm_dialog.h, src/gui/equipmentwindow.cpp,
+ src/gui/equipmentwindow.h, src/gui/focushandler.h, src/gui/gui.cpp,
+ src/gui/gui.h, src/gui/help.cpp, src/gui/help.h,
+ src/gui/inttextbox.cpp, src/gui/inttextbox.h,
+ src/gui/inventorywindow.cpp, src/gui/inventorywindow.h,
+ src/gui/item_amount.cpp, src/gui/item_amount.h,
+ src/gui/itemcontainer.cpp, src/gui/itemcontainer.h,
+ src/gui/listbox.cpp, src/gui/listbox.h, src/gui/login.cpp,
+ src/gui/login.h, src/gui/minimap.cpp, src/gui/minimap.h,
+ src/gui/newskill.cpp, src/gui/newskill.h, src/gui/npc.h,
+ src/gui/npc_text.h, src/gui/ok_dialog.cpp, src/gui/ok_dialog.h,
+ src/gui/passwordfield.h, src/gui/playerbox.cpp, src/gui/playerbox.h,
+ src/gui/popupmenu.cpp, src/gui/popupmenu.h, src/gui/progressbar.cpp,
+ src/gui/progressbar.h, src/gui/radiobutton.cpp, src/gui/radiobutton.h,
+ src/gui/requesttrade.cpp, src/gui/requesttrade.h,
+ src/gui/scrollarea.cpp, src/gui/scrollarea.h, src/gui/sell.cpp,
+ src/gui/sell.h, src/gui/setup.cpp, src/gui/setup.h, src/gui/skill.h,
+ src/gui/slider.cpp, src/gui/slider.h, src/gui/stats.cpp,
+ src/gui/stats.h, src/gui/status.cpp, src/gui/status.h,
+ src/gui/textbox.cpp, src/gui/textbox.h, src/gui/textfield.cpp,
+ src/gui/textfield.h, src/gui/trade.cpp, src/gui/trade.h,
+ src/gui/updatewindow.cpp, src/gui/updatewindow.h, src/gui/window.cpp,
+ src/gui/window.h, src/gui/windowcontainer.h, src/net/protocol.cpp,
+ src/net/protocol.h, src/resources/buddylist.hm
+ src/resources/image.cpp, src/resources/image.h,
+ src/resources/itemmanager.cpp, src/resources/itemmanager.h,
+ src/resources/mapreader.cpp, src/resources/mapreader.h,
+ src/resources/music.h, src/resources/resource.cpp,
+ src/resources/resourcemanager.cpp, src/resources/resourcemanager.h,
+ src/resources/soundeffect.h: Huge header cleanup, removing nearly all
+ #include's from headers to reduce dependencies and compile time.
+ * src/engine.cpp, src/gui/char_select.cpp, src/gui/inventorywindow.cpp,
+ src/gui/skill.cpp, src/gui/skill.h, src/gui/stats.cpp,
+ src/gui/status.cpp: Another small header cleanup, should also solve
+ compilation problems on windows.
+ * src/gui/sell.cpp: Reset selection in the sell dialog if all items at
+ the selected slot are sold.
+
+2005-08-13 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/status.h, src/gui/status.cpp: Reformatted status window
+ layout to avoid overlapping and lowered saturation of bars' colors.
+ * src/gui/status.cpp: Removed smooth color changing from xp bar which
+ was causing problems and doesn't act as the job xp bar.
+ * The Mana World.dev, src/game.cpp, src/playerinfo.h,
+ src/net/protocol.cpp, src/resources/itemmanager.cpp,
+ src/gui/inventorywindow.cpp: Updated dev-cpp project file, removed
+ unnecessary header, fixed some include paths.
+
+2005-08-12 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/buy.cpp, src/sell.cpp: Resetting quantity to 0 after selecting
+ other items in buy/sell dialogs.
+
+2005-08-11 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/resources/image.cpp: Little cleanup and simplification.
+
+2005-08-10 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp, src/graphics.cpp, src/graphics.h,
+ src/gui/browserbox.cpp, src/gui/gui.cpp, src/gui/listbox.cpp,
+ src/gui/minimap.cpp, src/gui/progressbar.cpp, src/gui/scrollarea.cpp:
+ Moved knowledge about whether we use OpenGL into the Graphics class (as
+ much as possible)
+ * src/game.cpp: Added helper function for being creation to reduce code
+ duplication. Some code simplifications.
+
+2005-08-09 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp: Adjust drawing offset to have the player centered in
+ higher resolutions as well.
+
+2005-08-04 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.cpp: Use "true" instead of "1" as bool argument.
+ * src/resources/resourcemanager.cpp, src/resources/resourcemanager.h:
+ Added a method to determine the real path of a file in the PhysFS
+ search path.
+ * src/gui/browserbox.cpp: Make use of then new resource manager method
+ to determine the real path of a file.
+ * src/gui/gui.cpp: Dynamically determine the path to graphic files
+ instead of using the try-catch fallback method.
+
+2005-08-03 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/game.cpp, src/game.h, src/gui/requesttrade.cpp,
+ src/gui/requesttrade.h: Moved my invented variable, since it makes more
+ sense.
+ * src/game.cpp, src/game.h, src/gui/requesttrade.cpp: Fix my previous
+ fix because it broke my own code.
+
+2005-08-03 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.cpp: Use PhysFS to determine user's home directory on unix
+ system. Removed an now unused header.
+ * src/game.cpp: Commented a switch case label that was left uncommented
+ though the rest was commented.
+ * src/resources/buddylist.cpp, src/main.h: Removed unneeded header from
+ main.h, added it to buddylist.cpp.
+ * src/engine.cpp: Converted two global variables to function-local
+ ones.
+
+2005-08-02 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/game.cpp: Fixed "Trade canceled" happening often.
+
+2005-08-02 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/engine.cpp: Cleanups in the drawing code.
+ * src/engine.cpp, src/game.cpp: Made autoTarget checks being handled at
+ a single location.
+ * src/being.cpp, src/being.h, src/engine.h: Small header cleanups.
+ * src/graphics.cpp, src/graphics.h, src/main.cpp, src/main.h,
+ src/gui/setup.cpp: Moved graphics setup code into the graphics class.
+
+2005-08-02 Marcel W. Wysocki <maci@satgnu.org>
+
+ * tmw/src/gui/status.cpp: making setup dialog quitting when clicking
+ on setup button while dialog is opened
+
+2005-08-01 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/inventory.cpp, src/inventory.h, src/gui/itemcontainer.cpp,
+ src/gui/itemcontainer.h: Added a logic function to dynamically adjust
+ the size of the itemcontainer.
+ * src/game.cpp: Fixed autoTarget not being set to NULL on map change.
+
+2005-07-31 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/game.cpp, src/game.h, src/gui/popupmenu.cpp: Show the name of the
+ trade partner in the trade dialog.
+
+2005-07-31 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/listbox.cpp: Small cleanup of the drawing code.
+ * src/engine.cpp: Added a check to stop scrolling when we hit the map
+ border.
+
+2005-07-31 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/game.cpp: Don't allow more than one trade dialog or requesting it
+ at once; if a trade is canceled on the other side, close the trade
+ window.
+
+2005-07-30 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/main.cpp: Removed unnecessary value assignment to a variable.
+
+2005-07-30 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.cpp, src/resources/resourcemanager.h,
+ src/resources/resourcemanager.cpp: Fixed buggy check for the existence
+ of the updates directory. Extended the resource manager with some
+ physfs functions and moved the actual setup process from the resource
+ manager constructor into the main initialization.
+
+2005-07-29 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp: Fixed popup window not always being correctly hidden
+ when the player clicks somewhere else.
+
+2005-07-28 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/main.cpp, src/gui/update.cpp, src/resources/resourcemanager.cpp,
+ src/resources/resourcemanager.h: Added support for files downloaded
+ through the update manager to the resource manager. Changed directory
+ name for updates from "data" to "updates".
+ * src/game.cpp, src/gui/inventorywindow.cpp, src/gui/popupmenu.cpp,
+ src/gui/popupmenu.h: Cleaned up the showPopup() code, moved
+ "map"-related code into game.cpp, made the popup show up at mouse
+ coordinates instead of being aligned to tiles.
+ * src/being.cpp, src/being.h, src/engine.cpp, src/game.cpp, src/game.h,
+ src/gui/gui.cpp, src/net/protocol.cpp: Added an action enumeration to
+ the Being class and removed the old #define's.
+ * src/resources/resourcemanager.cpp: Fixed a location where a wrong
+ dir-separator was used.
+ * src/main.cpp: Fixed updates directory not being created on non-unix
+ systems. Started using PhysFS write support.
+
+2005-07-27 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.cpp, src/game.cpp, src/graphics.cpp, src/graphics.h,
+ src/main.cpp, src/gui/browserbox.cpp, src/gui/button.cpp,
+ src/gui/gui.cpp, src/gui/listbox.cpp, src/gui/minimap.cpp,
+ src/gui/playerbox.cpp, src/gui/progressbar.cpp,
+ src/gui/scrollarea.cpp, src/gui/textfield.cpp, src/gui/window.cpp,
+ src/resources/image.cpp, src/resources/image.h,
+ src/resources/mapreader.h: Merged OpenGL/SDL merge patch by Andrej
+ Sinicyn, and his followup patch for fixing SDL-only build.
+
+2005-07-27 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/gui.cpp, src/gui/gui.h: Removed continous mouse movement,
+ that implementation wasn't suitable for a release.
+
+2005-07-26 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.cpp, src/being.h, src/engine.cpp, src/game.cpp,
+ src/gui/minimap.cpp, src/gui/popupmenu.cpp, src/net/protocol.cpp:
+ Introduced a Being::Type enumeration. Added type-aware findNode()
+ function.
+ * src/being.cpp: Set font back to gui font after drawing speech.
+ Draw auto-target marker in engine instead of being.
+ * src/gui/popupmenu.cpp: Fixed empty popup window being shown when user
+ right clicks on an empty tile while the popup is visible.
+
+2005-07-26 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev: Updated release infos.
+ * data/graphics/sprites/emotions.png: Added Modanung's smilies.
+ * src/being.cpp, src/engine.cpp: Fixed text and smilies position.
+ * src/game.cpp: Cleanups.
+ * src/gui/skill.cpp: Added new skill names.
+ * src/main.cpp: Moved sound playback to update screen and changed song.
+
+2005-07-24 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/game.cpp: Made the key-event handler use switches instead of
+ if-else.
+ * src/gui/gui.cpp, src/gui/gui.h: Allow continous movement when holding
+ down the left mouse button.
+
+2005-07-23 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/being.h, src/being.cpp: Added a member to keep the current map,
+ restored setDestination.
+ * src/game.cpp, src/gui/gui.cpp: Change calls to Being::setPath() to
+ Being::setDestination().
+ * src/map.h: Add a forward declaration for struct PATH_NODE.
+
+2005-07-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * NEWS: Moved project news here.
+ * ChangeLog: Started standard ChangeLog file here.
+ * docs/HACKING.txt: Added info about member naming and ChangeLog
+ format.
+ * src/gui/updatewindow.h, src/gui/updatewindow.cpp: Changed member
+ names, set a 15 second timeout for connecting to update server and
+ restore some doxygen comments, improved size adaption and made the
+ window a shorter.
+ * data/graphics/images/login_wallpaper.png: New login wallpaper by
+ Momotaro.
+=======
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:ChangeLog
diff --git a/INSTALL b/INSTALL
index cd530cae..4124002d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,20 +1,24 @@
-How to compile and run TMW on your GNU/Linux Box
+How to compile and run Aethyra on your GNU/Linux Box
================================================
-Homepage: http://themanaworld.org/
-IRC: irc.freenode.net / #themanaworld
+Homepage: http://www.aethyra.com/
+IRC: irc.freenode.net / #aethyra
1) Requirements
+<<<<<<< HEAD:INSTALL
+2) Compiling Aethyra
+=======
2) Compiling And Installing The Mana World
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:INSTALL
3) Notes
1. Requirements
===============
-You are expected to have either checked out TMW from CVS or you have downloaded
-a source release. To get The Mana World to compile, you need a compiler (GCC)
-and some libraries. The required libraries are:
+You are expected to have either checked out Aethyra from CVS or you have downloaded
+a source release. To get Aethyra to compile, you need a compiler
+(GCC) and some libraries. The required libraries are:
* SDL http://www.libsdl.org/
* SDL_mixer http://www.libsdl.org/projects/SDL_mixer/
@@ -26,7 +30,12 @@ and some libraries. The required libraries are:
* zlib 1.2.x http://www.gzip.org/zlib/
* libcurl http://curl.haxx.se/libcurl/
+<<<<<<< HEAD:INSTALL
+If you checked Aethyra out from Subversion you will also need these tools to
+compile:
+=======
If you've cloned the Git repository, you will also need these tools to compile:
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:INSTALL
* GNU automake 1.9 http://www.gnu.org/software/automake/
* GNU autoconf http://www.gnu.org/software/autoconf/
@@ -35,22 +44,35 @@ Installing these dependencies is distributions-specific, and we'll leave it to
you to figure this out.
-2. Compiling And Installing The Mana World
-==========================================
+2. Compiling And Installing Aethyra
+===============================================
1) Go to the directory you have extracted the source to.
+<<<<<<< HEAD:INSTALL
+2) If you checked out from SVN, run "./autobuild.sh" to install the client.
+=======
2) If you've cloned the Git repository, run "autoreconf -i" to generate
configure and install any missing auxiliary files.
3) Run "./configure"
4) Run "make"
5) Run "make install" as root
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:INSTALL
-It should have installed The Mana World on your system now, and you can run it
-with "tmw". By default all files are installed to /usr/local, you can pass a
-different prefix to configure as usual.
+It should have installed Aethyra on your system now, and you can
+run it with "aethyra". By default all files are installed to /usr/local, you can
+pass a different prefix to configure as usual.
+ NOTE: if the autobuild.sh fails
+ 1.) ./autogen.sh
+ 2.) ./configure
+ 3.) make
+ 4.) su -c "make install"
- NOTE: It is possible to compile TMW without support for OpenGL rendering.
+ you can get help from A.) IRC channel irc.freenode.net #aedev or #aethyra
+ B.) http://forum.aethyra.com
+ Make sure you record the output from the konsole window
+
+ NOTE: It is possible to compile Aethyra without support for OpenGL rendering.
To do this perform step 3 as follows:
./configure --without-opengl
@@ -64,4 +86,4 @@ different prefix to configure as usual.
If you have any problems, you are welcome to post your questions on our forums,
or talk about them in our IRC channel.
-- The Mana World Dev Team
+- Aethyra Dev Team
diff --git a/Makefile.am b/Makefile.am
index 7306c71f..f399eb3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@ SUBDIRS = data docs src
desktopdir = $(datadir)/applications
-desktop_DATA = tmw.desktop
+desktop_DATA = aethyra.desktop
# Extra files to include
EXTRA_DIST = $(desktop_DATA)
diff --git a/README b/README
index 4f5fc02e..e5053509 100644
--- a/README
+++ b/README
@@ -1,7 +1,11 @@
-THE MANA WORLD
-==============
+AETHYRA
+===================
+<<<<<<< HEAD:README
+ Version: 0.0.25 Date: 9/16/2008
+=======
Version: 0.0.26 Date: 29/8/2008
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:README
Development team:
- See AUTHORS file for a list
@@ -49,15 +53,15 @@ Use arrow keys to move around. Other keys:
- F8 toggle shortcut window
- F9 show setup window
- F10 toggle debug window
-- Alt + 0-9 show emotions
-- Alt + S sit down / stand up
+- Alt + 0-9 show emotions / usuable at skill level 2.
+- Alt + S sit down / stand up / usuable at skill level 3.
- Alt + F toggle debug pathfinding feature
- Alt + P take screenshot
+- Alt + T turns on anti-trade function / usuable at skill level 1.
- A target nearest monster
- H hide all non-sticky windows
- G or Z pick up item
- Enter focus chat window / send message
-- Shift hold it when attacking to lock target for auto attack
MOUSE:
@@ -65,6 +69,38 @@ Left click to execute default action: walk, pick up an item, attack a monster
and talk to NPCs (be sure to click on their feet). Right click to show up a
context menu. Holding [Left Shift] prevents from walking when attacking.
+/Commands:
+
+- /help Displays the list of commands
+- /announce broadcasts a global msg(Gm Cammand only)
+- /clear clears the chat window
+- /who shows how many players are online
+- /where displays the map name your currently on
+- /whisper send a private msg to another player
+ (format: /whisper <charname> <message>)
+ If the <nick> has spaces in it, enclose it in double
+ quotes e.g. /whisper "char name" <message>
+- /record Records the Chat output
+ (format: /record <filename to write to> starts the record
+ session /record again
+ stops the session)
+- /party <command> <params>: Party commands
+ - /party new creates a new party /party new <party name>
+ - /party create creates a new party /party create <party name>
+ - /party prefix This commands sets the party prefix character
+ /party prefix <prefix-char>
+ "/party prefix" reports the current party prefix
+ character
+ - /party leave This command causes the player to leave the party.
+Type /help party <option> for further help.
+- /present This command gets a list of players within hearing
+- /toggle make the chatlog lose focus on a blank line or after
+ message. (format: /toggle <option>, where option can be
+ '1', 'y' or 't' to make the chatlog lose focus on a
+ blank line, and '0', 'n' or 'f' to make the chatlog lose
+ focus after every message. /toggle displays the status)
+For more information, type /help <command>
+
3. Skills
---------
@@ -73,10 +109,16 @@ point to spend on skills.
BASIC SKILLS:
-Level 1: enables the ability to trade with others
-Level 2: enables the ability to express emotions
-Level 3: enables character to sit
-Other level not yet implemented.
+Level 1: enables the ability to trade with others
+Level 2: enables the ability to express emotions
+Level 3: enables character to sit
+Level 4: enables not used
+level 5: enables the ability to join a party
+level 6: enables not used
+level 7: enables the ability to create a party
+level 8: enables not used
+level 9: enables not used
+level 10: enables not used
4. Support
----------
@@ -84,9 +126,11 @@ Other level not yet implemented.
If you're having troubles, please first of all read the FAQ.
If you can't find a solution to your problem, feel free to check our
Bugs/Support section of the forum:
-- http://themanaworld.org/phpBB2/viewforum.php?f=3
+- http://forums.aethyra.com
or come visit us on our IRC channel:
-- #themanaworld @ irc.freenode.net
+- #aethyra @ irc.freenode.net
+- ##aethyra @ irc.freenode.net
+- #aedev @ irc.freenode.net
Otherwise check the AUTHORS file to have a list of developers and how to
contact them.
diff --git a/WinReadMe.txt b/WinReadMe.txt
new file mode 100644
index 00000000..17870e03
--- /dev/null
+++ b/WinReadMe.txt
@@ -0,0 +1,22 @@
+To run aethyra double click on aethyra.exe in this folder.
+
+There are a couple of known bugs you might run into first run...
+
+aethyra.exe might complain about not being able to create it's
+configuration folder. If it crashes out just run it again.
+
+You may also have issues with the aethyra crashing with lots of
+updates. Again just run it again and it should continue the update
+from where it left off.
+
+To install the client, just copy this folder to your Program Files
+folder and add a shortcut to aethyra.exe to your Start Menu.
+
+For any further questions pop onto the forums at http://forums.aethyra.com/
+especially the Windows Way forum, or pop onto the IRC channel #aethyra on the
+FreeNode network
+
+If you don't have an IRC client you can still get to the
+channel through this page: http://www.aethyra.com/ircchat.html
+
+Thanks for playing from the Aethyra team.
diff --git a/aethyra.cbp b/aethyra.cbp
new file mode 100644
index 00000000..efc735c9
--- /dev/null
+++ b/aethyra.cbp
@@ -0,0 +1,693 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="Aethyra" />
+ <Option pch_mode="0" />
+ <Option compiler="gcc" />
+ <Build>
+ <Target title="default">
+ <Option output="aethyra.exe" prefix_auto="0" extension_auto="0" />
+ <Option type="0" />
+ <Option compiler="gcc" />
+ <Option projectResourceIncludeDirsRelation="0" />
+ <Compiler>
+ <Add option="-Wall" />
+ <Add option="-DUSE_OPENGL" />
+ <Add option="-DNOGDI" />
+ </Compiler>
+ <Linker>
+ <Add library="guichan" />
+ <Add library="guichan_sdl" />
+ <Add library="guichan_opengl" />
+ <Add library="wsock32" />
+ <Add library="SDL_image" />
+ <Add library="SDL_mixer" />
+ <Add library="SDL_net" />
+ <Add library="mingw32" />
+ <Add library="SDLmain" />
+ <Add library="SDL.dll" />
+ <Add library="xml2.dll" />
+ <Add library="opengl32" />
+ <Add library="png12.dll" />
+ <Add library="z.dll" />
+ <Add library="physfs" />
+ <Add library="curl.dll" />
+ </Linker>
+ </Target>
+ <Target title="unix">
+ <Option platforms="Unix;" />
+ <Option output="aethyra" prefix_auto="1" extension_auto="1" />
+ <Option type="0" />
+ <Option compiler="gcc" />
+ <Compiler>
+ <Add option="-Wall" />
+ <Add option="-g" />
+ <Add option="`sdl-config --cflags`" />
+ <Add directory="\usr\local\include\libxml2" />
+ </Compiler>
+ <Linker>
+ <Add option="`sdl-config --libs`" />
+ <Add library="guichan" />
+ <Add library="guichan_sdl" />
+ <Add library="guichan_opengl" />
+ <Add library="GL" />
+ <Add library="physfs" />
+ <Add library="curl" />
+ <Add library="xml2" />
+ <Add library="SDL_mixer" />
+ <Add library="SDL_net" />
+ <Add library="SDL_image" />
+ <Add library="png" />
+ </Linker>
+ </Target>
+ </Build>
+ <VirtualTargets>
+ <Add alias="All" targets="default;" />
+ </VirtualTargets>
+ <Compiler>
+ <Add directory="..\..\..\..\..\..\mingw\include\SDL" />
+ </Compiler>
+<<<<<<< HEAD:aethyra.cbp
+ <Unit filename="src/animatedsprite.cpp" />
+ <Unit filename="src/animatedsprite.h" />
+ <Unit filename="src/animationparticle.cpp" />
+ <Unit filename="src/animationparticle.h" />
+ <Unit filename="src/being.cpp" />
+ <Unit filename="src/being.h" />
+ <Unit filename="src/beingmanager.cpp" />
+ <Unit filename="src/beingmanager.h" />
+ <Unit filename="src/configlistener.h" />
+ <Unit filename="src/configuration.cpp" />
+ <Unit filename="src/configuration.h" />
+ <Unit filename="src/engine.cpp" />
+ <Unit filename="src/engine.h" />
+ <Unit filename="src/equipment.cpp" />
+ <Unit filename="src/equipment.h" />
+ <Unit filename="src/floor_item.cpp" />
+ <Unit filename="src/floor_item.h" />
+ <Unit filename="src/flooritemmanager.cpp" />
+ <Unit filename="src/flooritemmanager.h" />
+ <Unit filename="src/game.cpp" />
+ <Unit filename="src/game.h" />
+ <Unit filename="src/graphics.cpp" />
+ <Unit filename="src/graphics.h" />
+ <Unit filename="src/gui/box.cpp" />
+ <Unit filename="src/gui/box.h" />
+ <Unit filename="src/gui/browserbox.cpp" />
+ <Unit filename="src/gui/browserbox.h" />
+ <Unit filename="src/gui/button.cpp" />
+ <Unit filename="src/gui/button.h" />
+ <Unit filename="src/gui/buy.cpp" />
+ <Unit filename="src/gui/buy.h" />
+ <Unit filename="src/gui/buysell.cpp" />
+ <Unit filename="src/gui/buysell.h" />
+ <Unit filename="src/gui/chargedialog.cpp" />
+ <Unit filename="src/gui/chargedialog.h" />
+ <Unit filename="src/gui/char_select.cpp" />
+ <Unit filename="src/gui/char_select.h" />
+ <Unit filename="src/gui/char_server.cpp" />
+ <Unit filename="src/gui/char_server.h" />
+ <Unit filename="src/gui/chat.cpp" />
+ <Unit filename="src/gui/chat.h" />
+ <Unit filename="src/gui/chatinput.cpp" />
+ <Unit filename="src/gui/chatinput.h" />
+ <Unit filename="src/gui/checkbox.cpp" />
+ <Unit filename="src/gui/checkbox.h" />
+ <Unit filename="src/gui/confirm_dialog.cpp" />
+ <Unit filename="src/gui/confirm_dialog.h" />
+ <Unit filename="src/gui/connection.cpp" />
+ <Unit filename="src/gui/connection.h" />
+ <Unit filename="src/gui/debugwindow.cpp" />
+ <Unit filename="src/gui/debugwindow.h" />
+ <Unit filename="src/gui/equipmentwindow.cpp" />
+ <Unit filename="src/gui/equipmentwindow.h" />
+ <Unit filename="src/gui/focushandler.cpp" />
+ <Unit filename="src/gui/focushandler.h" />
+ <Unit filename="src/gui/gccontainer.cpp" />
+ <Unit filename="src/gui/gccontainer.h" />
+ <Unit filename="src/gui/gui.cpp" />
+ <Unit filename="src/gui/gui.h" />
+ <Unit filename="src/gui/hbox.cpp" />
+ <Unit filename="src/gui/hbox.h" />
+ <Unit filename="src/gui/help.cpp" />
+ <Unit filename="src/gui/help.h" />
+ <Unit filename="src/gui/inttextbox.cpp" />
+ <Unit filename="src/gui/inttextbox.h" />
+ <Unit filename="src/gui/inventorywindow.cpp" />
+ <Unit filename="src/gui/inventorywindow.h" />
+ <Unit filename="src/gui/itemcontainer.cpp" />
+ <Unit filename="src/gui/itemcontainer.h" />
+ <Unit filename="src/gui/itemshortcutcontainer.cpp" />
+ <Unit filename="src/gui/itemshortcutcontainer.h" />
+ <Unit filename="src/gui/itemshortcutwindow.cpp" />
+ <Unit filename="src/gui/itemshortcutwindow.h" />
+ <Unit filename="src/gui/item_amount.cpp" />
+ <Unit filename="src/gui/item_amount.h" />
+ <Unit filename="src/gui/linkhandler.h" />
+ <Unit filename="src/gui/listbox.cpp" />
+ <Unit filename="src/gui/listbox.h" />
+ <Unit filename="src/gui/login.cpp" />
+ <Unit filename="src/gui/login.h" />
+ <Unit filename="src/gui/menuwindow.cpp" />
+ <Unit filename="src/gui/menuwindow.h" />
+ <Unit filename="src/gui/minimap.cpp" />
+ <Unit filename="src/gui/minimap.h" />
+ <Unit filename="src/gui/ministatus.cpp" />
+ <Unit filename="src/gui/ministatus.h" />
+ <Unit filename="src/gui/npc_text.cpp" />
+ <Unit filename="src/gui/npc_text.h" />
+ <Unit filename="src/gui/npclistdialog.cpp" />
+ <Unit filename="src/gui/npclistdialog.h" />
+ <Unit filename="src/gui/ok_dialog.cpp" />
+ <Unit filename="src/gui/ok_dialog.h" />
+ <Unit filename="src/gui/passwordfield.cpp" />
+ <Unit filename="src/gui/passwordfield.h" />
+ <Unit filename="src/gui/playerbox.cpp" />
+ <Unit filename="src/gui/playerbox.h" />
+ <Unit filename="src/gui/popupmenu.cpp" />
+ <Unit filename="src/gui/popupmenu.h" />
+ <Unit filename="src/gui/progressbar.cpp" />
+ <Unit filename="src/gui/progressbar.h" />
+ <Unit filename="src/gui/radiobutton.cpp" />
+ <Unit filename="src/gui/radiobutton.h" />
+ <Unit filename="src/gui/register.cpp" />
+ <Unit filename="src/gui/register.h" />
+ <Unit filename="src/gui/scrollarea.cpp" />
+ <Unit filename="src/gui/scrollarea.h" />
+ <Unit filename="src/gui/sell.cpp" />
+ <Unit filename="src/gui/sell.h" />
+ <Unit filename="src/gui/setup.cpp" />
+ <Unit filename="src/gui/setup.h" />
+ <Unit filename="src/gui/setup_audio.cpp" />
+ <Unit filename="src/gui/setup_audio.h" />
+ <Unit filename="src/gui/setup_joystick.cpp" />
+ <Unit filename="src/gui/setup_joystick.h" />
+ <Unit filename="src/gui/setup_keyboard.cpp" />
+ <Unit filename="src/gui/setup_keyboard.h" />
+ <Unit filename="src/gui/setup_players.cpp" />
+ <Unit filename="src/gui/setup_players.h" />
+ <Unit filename="src/gui/setup_video.cpp" />
+ <Unit filename="src/gui/setup_video.h" />
+ <Unit filename="src/gui/setuptab.h" />
+ <Unit filename="src/gui/shop.cpp" />
+ <Unit filename="src/gui/shop.h" />
+ <Unit filename="src/gui/shoplistbox.cpp" />
+ <Unit filename="src/gui/shoplistbox.h" />
+ <Unit filename="src/gui/skill.cpp" />
+ <Unit filename="src/gui/skill.h" />
+ <Unit filename="src/gui/slider.cpp" />
+ <Unit filename="src/gui/slider.h" />
+ <Unit filename="src/gui/status.cpp" />
+ <Unit filename="src/gui/status.h" />
+ <Unit filename="src/gui/tabbedcontainer.cpp" />
+ <Unit filename="src/gui/tabbedcontainer.h" />
+ <Unit filename="src/gui/table.cpp" />
+ <Unit filename="src/gui/table.h" />
+ <Unit filename="src/gui/table_model.cpp" />
+ <Unit filename="src/gui/table_model.h" />
+ <Unit filename="src/gui/textbox.cpp" />
+ <Unit filename="src/gui/textbox.h" />
+ <Unit filename="src/gui/textfield.cpp" />
+ <Unit filename="src/gui/textfield.h" />
+ <Unit filename="src/gui/trade.cpp" />
+ <Unit filename="src/gui/trade.h" />
+ <Unit filename="src/gui/updatewindow.cpp" />
+ <Unit filename="src/gui/updatewindow.h" />
+ <Unit filename="src/gui/vbox.cpp" />
+ <Unit filename="src/gui/vbox.h" />
+ <Unit filename="src/gui/viewport.cpp" />
+ <Unit filename="src/gui/viewport.h" />
+ <Unit filename="src/gui/widgets/dropdown.cpp"/>
+ <Unit filename="src/gui/widgets/dropdown.h" />
+ <Unit filename="src/gui/widgets/resizegrip.cpp" />
+ <Unit filename="src/gui/widgets/resizegrip.h" />
+ <Unit filename="src/gui/window.cpp" />
+ <Unit filename="src/gui/window.h" />
+ <Unit filename="src/gui/windowcontainer.cpp" />
+ <Unit filename="src/gui/windowcontainer.h" />
+ <Unit filename="src/guichanfwd.h" />
+ <Unit filename="src/imageparticle.cpp" />
+ <Unit filename="src/imageparticle.h" />
+ <Unit filename="src/inventory.cpp" />
+ <Unit filename="src/inventory.h" />
+ <Unit filename="src/item.cpp" />
+ <Unit filename="src/item.h" />
+ <Unit filename="src/itemshortcut.cpp" />
+ <Unit filename="src/itemshortcut.h" />
+ <Unit filename="src/joystick.cpp" />
+ <Unit filename="src/joystick.h" />
+ <Unit filename="src/keyboardconfig.cpp" />
+ <Unit filename="src/keyboardconfig.h" />
+ <Unit filename="src/localplayer.cpp" />
+ <Unit filename="src/localplayer.h" />
+ <Unit filename="src/lockedarray.h" />
+ <Unit filename="src/log.cpp" />
+ <Unit filename="src/log.h" />
+ <Unit filename="src/logindata.h" />
+ <Unit filename="src/main.cpp" />
+ <Unit filename="src/main.h" />
+ <Unit filename="src/map.cpp" />
+ <Unit filename="src/map.h" />
+ <Unit filename="src/monster.cpp" />
+ <Unit filename="src/monster.h" />
+ <Unit filename="src/net/beinghandler.cpp" />
+ <Unit filename="src/net/beinghandler.h" />
+ <Unit filename="src/net/buysellhandler.cpp" />
+ <Unit filename="src/net/buysellhandler.h" />
+ <Unit filename="src/net/charserverhandler.cpp" />
+ <Unit filename="src/net/charserverhandler.h" />
+ <Unit filename="src/net/chathandler.cpp" />
+ <Unit filename="src/net/chathandler.h" />
+ <Unit filename="src/net/equipmenthandler.cpp" />
+ <Unit filename="src/net/equipmenthandler.h" />
+ <Unit filename="src/net/inventoryhandler.cpp" />
+ <Unit filename="src/net/inventoryhandler.h" />
+ <Unit filename="src/net/itemhandler.cpp" />
+ <Unit filename="src/net/itemhandler.h" />
+ <Unit filename="src/net/loginhandler.cpp" />
+ <Unit filename="src/net/loginhandler.h" />
+ <Unit filename="src/net/maploginhandler.cpp" />
+ <Unit filename="src/net/maploginhandler.h" />
+ <Unit filename="src/net/messagehandler.cpp" />
+ <Unit filename="src/net/messagehandler.h" />
+ <Unit filename="src/net/messagein.cpp" />
+ <Unit filename="src/net/messagein.h" />
+ <Unit filename="src/net/messageout.cpp" />
+ <Unit filename="src/net/messageout.h" />
+ <Unit filename="src/net/network.cpp" />
+ <Unit filename="src/net/network.h" />
+ <Unit filename="src/net/npchandler.cpp" />
+ <Unit filename="src/net/npchandler.h" />
+ <Unit filename="src/net/partyhandler.cpp"/>
+ <Unit filename="src/net/partyhandler.h" />
+ <Unit filename="src/net/playerhandler.cpp" />
+ <Unit filename="src/net/playerhandler.h" />
+ <Unit filename="src/net/protocol.cpp" />
+ <Unit filename="src/net/protocol.h" />
+ <Unit filename="src/net/skillhandler.cpp" />
+ <Unit filename="src/net/skillhandler.h" />
+ <Unit filename="src/net/tradehandler.cpp" />
+ <Unit filename="src/net/tradehandler.h" />
+ <Unit filename="src/npc.cpp" />
+ <Unit filename="src/npc.h" />
+ <Unit filename="src/openglgraphics.cpp" />
+ <Unit filename="src/openglgraphics.h" />
+ <Unit filename="src/particle.cpp" />
+ <Unit filename="src/particle.h" />
+ <Unit filename="src/particleemitter.cpp" />
+ <Unit filename="src/particleemitter.h" />
+ <Unit filename="src/party.cpp" />
+ <Unit filename="src/party.h" />
+ <Unit filename="src/player.cpp" />
+ <Unit filename="src/player.h" />
+ <Unit filename="src/player_relations.cpp" />
+ <Unit filename="src/player_relations.h" />
+ <Unit filename="src/properties.h" />
+ <Unit filename="src/recorder.cpp" />
+ <Unit filename="src/recorder.h" />
+ <Unit filename="src/resources/action.cpp" />
+ <Unit filename="src/resources/action.h" />
+ <Unit filename="src/resources/ambientoverlay.cpp" />
+ <Unit filename="src/resources/ambientoverlay.h" />
+ <Unit filename="src/resources/animation.cpp" />
+ <Unit filename="src/resources/animation.h" />
+ <Unit filename="src/resources/buddylist.cpp"/>
+ <Unit filename="src/resources/buddylist.h" />
+ <Unit filename="src/resources/dye.cpp" />
+ <Unit filename="src/resources/dye.h" />
+ <Unit filename="src/resources/image.cpp" />
+ <Unit filename="src/resources/image.h" />
+ <Unit filename="src/resources/imageloader.cpp" />
+ <Unit filename="src/resources/imageloader.h" />
+ <Unit filename="src/resources/imageset.cpp" />
+ <Unit filename="src/resources/imageset.h" />
+ <Unit filename="src/resources/imagewriter.cpp" />
+ <Unit filename="src/resources/imagewriter.h" />
+ <Unit filename="src/resources/itemdb.cpp" />
+ <Unit filename="src/resources/itemdb.h" />
+ <Unit filename="src/resources/iteminfo.cpp" />
+ <Unit filename="src/resources/iteminfo.h" />
+ <Unit filename="src/resources/mapreader.cpp" />
+ <Unit filename="src/resources/mapreader.h" />
+ <Unit filename="src/resources/monsterdb.cpp" />
+ <Unit filename="src/resources/monsterdb.h" />
+ <Unit filename="src/resources/monsterinfo.cpp" />
+ <Unit filename="src/resources/monsterinfo.h" />
+ <Unit filename="src/resources/music.cpp" />
+ <Unit filename="src/resources/music.h" />
+ <Unit filename="src/resources/npcdb.cpp" />
+ <Unit filename="src/resources/npcdb.h" />
+ <Unit filename="src/resources/resource.cpp" />
+ <Unit filename="src/resources/resource.h" />
+ <Unit filename="src/resources/resourcemanager.cpp" />
+ <Unit filename="src/resources/resourcemanager.h" />
+ <Unit filename="src/resources/soundeffect.cpp" />
+ <Unit filename="src/resources/soundeffect.h" />
+ <Unit filename="src/resources/spritedef.cpp" />
+ <Unit filename="src/resources/spritedef.h" />
+ <Unit filename="src/serverinfo.h" />
+ <Unit filename="src/simpleanimation.cpp" />
+ <Unit filename="src/simpleanimation.h" />
+ <Unit filename="src/sound.cpp" />
+ <Unit filename="src/sound.h" />
+ <Unit filename="src/sprite.h" />
+ <Unit filename="src/text.cpp" />
+ <Unit filename="src/text.h" />
+ <Unit filename="src/textmanager.cpp" />
+ <Unit filename="src/textmanager.h" />
+ <Unit filename="src/textparticle.cpp" />
+ <Unit filename="src/textparticle.h" />
+ <Unit filename="src/tileset.h" />
+ <Unit filename="src/aethyra.rc">
+ <Option compilerVar="WINDRES" />
+ <Option target="&lt;{~None~}&gt;" />
+ </Unit>
+ <Unit filename="src/utils/base64.cpp" />
+ <Unit filename="src/utils/base64.h" />
+ <Unit filename="src/utils/dtor.h" />
+ <Unit filename="src/utils/fastsqrt.h" />
+ <Unit filename="src/utils/strprintf.cpp" />
+ <Unit filename="src/utils/strprintf.h" />
+ <Unit filename="src/utils/tostring.h" />
+ <Unit filename="src/utils/xml.cpp" />
+ <Unit filename="src/utils/xml.h" />
+ <Unit filename="src/winver.h">
+ <Option target="unix" />
+=======
+ <Unit filename="src\animatedsprite.cpp" />
+ <Unit filename="src\animatedsprite.h" />
+ <Unit filename="src\animationparticle.cpp" />
+ <Unit filename="src\animationparticle.h" />
+ <Unit filename="src\being.cpp" />
+ <Unit filename="src\being.h" />
+ <Unit filename="src\beingmanager.cpp" />
+ <Unit filename="src\beingmanager.h" />
+ <Unit filename="src\configlistener.h" />
+ <Unit filename="src\configuration.cpp" />
+ <Unit filename="src\configuration.h" />
+ <Unit filename="src\engine.cpp" />
+ <Unit filename="src\engine.h" />
+ <Unit filename="src\equipment.cpp" />
+ <Unit filename="src\equipment.h" />
+ <Unit filename="src\floor_item.cpp" />
+ <Unit filename="src\floor_item.h" />
+ <Unit filename="src\flooritemmanager.cpp" />
+ <Unit filename="src\flooritemmanager.h" />
+ <Unit filename="src\game.cpp" />
+ <Unit filename="src\game.h" />
+ <Unit filename="src\graphics.cpp" />
+ <Unit filename="src\graphics.h" />
+ <Unit filename="src\gui\box.cpp" />
+ <Unit filename="src\gui\box.h" />
+ <Unit filename="src\gui\browserbox.cpp" />
+ <Unit filename="src\gui\browserbox.h" />
+ <Unit filename="src\gui\buddywindow.cpp" />
+ <Unit filename="src\gui\buddywindow.h" />
+ <Unit filename="src\gui\button.cpp" />
+ <Unit filename="src\gui\button.h" />
+ <Unit filename="src\gui\buy.cpp" />
+ <Unit filename="src\gui\buy.h" />
+ <Unit filename="src\gui\buysell.cpp" />
+ <Unit filename="src\gui\buysell.h" />
+ <Unit filename="src\gui\char_select.cpp" />
+ <Unit filename="src\gui\char_select.h" />
+ <Unit filename="src\gui\char_server.cpp" />
+ <Unit filename="src\gui\char_server.h" />
+ <Unit filename="src\gui\chargedialog.cpp" />
+ <Unit filename="src\gui\chargedialog.h" />
+ <Unit filename="src\gui\chat.cpp" />
+ <Unit filename="src\gui\chat.h" />
+ <Unit filename="src\gui\chatinput.cpp" />
+ <Unit filename="src\gui\chatinput.h" />
+ <Unit filename="src\gui\checkbox.cpp" />
+ <Unit filename="src\gui\checkbox.h" />
+ <Unit filename="src\gui\confirm_dialog.cpp" />
+ <Unit filename="src\gui\confirm_dialog.h" />
+ <Unit filename="src\gui\connection.cpp" />
+ <Unit filename="src\gui\connection.h" />
+ <Unit filename="src\gui\debugwindow.cpp" />
+ <Unit filename="src\gui\debugwindow.h" />
+ <Unit filename="src\gui\equipmentwindow.cpp" />
+ <Unit filename="src\gui\equipmentwindow.h" />
+ <Unit filename="src\gui\focushandler.cpp" />
+ <Unit filename="src\gui\focushandler.h" />
+ <Unit filename="src\gui\gccontainer.cpp" />
+ <Unit filename="src\gui\gccontainer.h" />
+ <Unit filename="src\gui\gui.cpp" />
+ <Unit filename="src\gui\gui.h" />
+ <Unit filename="src\gui\hbox.cpp" />
+ <Unit filename="src\gui\hbox.h" />
+ <Unit filename="src\gui\help.cpp" />
+ <Unit filename="src\gui\help.h" />
+ <Unit filename="src\gui\inttextbox.cpp" />
+ <Unit filename="src\gui\inttextbox.h" />
+ <Unit filename="src\gui\inventorywindow.cpp" />
+ <Unit filename="src\gui\inventorywindow.h" />
+ <Unit filename="src\gui\item_amount.cpp" />
+ <Unit filename="src\gui\item_amount.h" />
+ <Unit filename="src\gui\itemcontainer.cpp" />
+ <Unit filename="src\gui\itemcontainer.h" />
+ <Unit filename="src\gui\itemshortcutcontainer.cpp" />
+ <Unit filename="src\gui\itemshortcutcontainer.h" />
+ <Unit filename="src\gui\itemshortcutwindow.cpp" />
+ <Unit filename="src\gui\itemshortcutwindow.h" />
+ <Unit filename="src\gui\linkhandler.h" />
+ <Unit filename="src\gui\listbox.cpp" />
+ <Unit filename="src\gui\listbox.h" />
+ <Unit filename="src\gui\login.cpp" />
+ <Unit filename="src\gui\login.h" />
+ <Unit filename="src\gui\menuwindow.cpp" />
+ <Unit filename="src\gui\menuwindow.h" />
+ <Unit filename="src\gui\minimap.cpp" />
+ <Unit filename="src\gui\minimap.h" />
+ <Unit filename="src\gui\ministatus.cpp" />
+ <Unit filename="src\gui\ministatus.h" />
+ <Unit filename="src\gui\newskill.cpp" />
+ <Unit filename="src\gui\newskill.h" />
+ <Unit filename="src\gui\npc_text.cpp" />
+ <Unit filename="src\gui\npc_text.h" />
+ <Unit filename="src\gui\npclistdialog.cpp" />
+ <Unit filename="src\gui\npclistdialog.h" />
+ <Unit filename="src\gui\ok_dialog.cpp" />
+ <Unit filename="src\gui\ok_dialog.h" />
+ <Unit filename="src\gui\passwordfield.cpp" />
+ <Unit filename="src\gui\passwordfield.h" />
+ <Unit filename="src\gui\playerbox.cpp" />
+ <Unit filename="src\gui\playerbox.h" />
+ <Unit filename="src\gui\popupmenu.cpp" />
+ <Unit filename="src\gui\popupmenu.h" />
+ <Unit filename="src\gui\progressbar.cpp" />
+ <Unit filename="src\gui\progressbar.h" />
+ <Unit filename="src\gui\radiobutton.cpp" />
+ <Unit filename="src\gui\radiobutton.h" />
+ <Unit filename="src\gui\register.cpp" />
+ <Unit filename="src\gui\register.h" />
+ <Unit filename="src\gui\scrollarea.cpp" />
+ <Unit filename="src\gui\scrollarea.h" />
+ <Unit filename="src\gui\selectionlistener.h" />
+ <Unit filename="src\gui\sell.cpp" />
+ <Unit filename="src\gui\sell.h" />
+ <Unit filename="src\gui\setup.cpp" />
+ <Unit filename="src\gui\setup.h" />
+ <Unit filename="src\gui\setup_audio.cpp" />
+ <Unit filename="src\gui\setup_audio.h" />
+ <Unit filename="src\gui\setup_joystick.cpp" />
+ <Unit filename="src\gui\setup_joystick.h" />
+ <Unit filename="src\gui\setup_keyboard.cpp" />
+ <Unit filename="src\gui\setup_keyboard.h" />
+ <Unit filename="src\gui\setup_players.cpp" />
+ <Unit filename="src\gui\setup_players.h" />
+ <Unit filename="src\gui\setup_video.cpp" />
+ <Unit filename="src\gui\setup_video.h" />
+ <Unit filename="src\gui\setuptab.h" />
+ <Unit filename="src\gui\shop.cpp" />
+ <Unit filename="src\gui\shop.h" />
+ <Unit filename="src\gui\shoplistbox.cpp" />
+ <Unit filename="src\gui\shoplistbox.h" />
+ <Unit filename="src\gui\skill.cpp" />
+ <Unit filename="src\gui\skill.h" />
+ <Unit filename="src\gui\slider.cpp" />
+ <Unit filename="src\gui\slider.h" />
+ <Unit filename="src\gui\status.cpp" />
+ <Unit filename="src\gui\status.h" />
+ <Unit filename="src\gui\tabbedcontainer.cpp" />
+ <Unit filename="src\gui\tabbedcontainer.h" />
+ <Unit filename="src\gui\table.cpp" />
+ <Unit filename="src\gui\table.h" />
+ <Unit filename="src\gui\table_model.cpp" />
+ <Unit filename="src\gui\table_model.h" />
+ <Unit filename="src\gui\textbox.cpp" />
+ <Unit filename="src\gui\textbox.h" />
+ <Unit filename="src\gui\textfield.cpp" />
+ <Unit filename="src\gui\textfield.h" />
+ <Unit filename="src\gui\trade.cpp" />
+ <Unit filename="src\gui\trade.h" />
+ <Unit filename="src\gui\updatewindow.cpp" />
+ <Unit filename="src\gui\updatewindow.h" />
+ <Unit filename="src\gui\vbox.cpp" />
+ <Unit filename="src\gui\vbox.h" />
+ <Unit filename="src\gui\viewport.cpp" />
+ <Unit filename="src\gui\viewport.h" />
+ <Unit filename="src\gui\widgets\resizegrip.cpp" />
+ <Unit filename="src\gui\widgets\resizegrip.h" />
+ <Unit filename="src\gui\window.cpp" />
+ <Unit filename="src\gui\window.h" />
+ <Unit filename="src\gui\windowcontainer.cpp" />
+ <Unit filename="src\gui\windowcontainer.h" />
+ <Unit filename="src\guichanfwd.h" />
+ <Unit filename="src\imageparticle.cpp" />
+ <Unit filename="src\imageparticle.h" />
+ <Unit filename="src\inventory.cpp" />
+ <Unit filename="src\inventory.h" />
+ <Unit filename="src\item.cpp" />
+ <Unit filename="src\item.h" />
+ <Unit filename="src\itemshortcut.cpp" />
+ <Unit filename="src\itemshortcut.h" />
+ <Unit filename="src\joystick.cpp" />
+ <Unit filename="src\joystick.h" />
+ <Unit filename="src\keyboardconfig.cpp" />
+ <Unit filename="src\keyboardconfig.h" />
+ <Unit filename="src\localplayer.cpp" />
+ <Unit filename="src\localplayer.h" />
+ <Unit filename="src\lockedarray.h" />
+ <Unit filename="src\log.cpp" />
+ <Unit filename="src\log.h" />
+ <Unit filename="src\logindata.h" />
+ <Unit filename="src\main.cpp" />
+ <Unit filename="src\main.h" />
+ <Unit filename="src\map.cpp" />
+ <Unit filename="src\map.h" />
+ <Unit filename="src\monster.cpp" />
+ <Unit filename="src\monster.h" />
+ <Unit filename="src\net\beinghandler.cpp" />
+ <Unit filename="src\net\beinghandler.h" />
+ <Unit filename="src\net\buysellhandler.cpp" />
+ <Unit filename="src\net\buysellhandler.h" />
+ <Unit filename="src\net\charserverhandler.cpp" />
+ <Unit filename="src\net\charserverhandler.h" />
+ <Unit filename="src\net\chathandler.cpp" />
+ <Unit filename="src\net\chathandler.h" />
+ <Unit filename="src\net\equipmenthandler.cpp" />
+ <Unit filename="src\net\equipmenthandler.h" />
+ <Unit filename="src\net\inventoryhandler.cpp" />
+ <Unit filename="src\net\inventoryhandler.h" />
+ <Unit filename="src\net\itemhandler.cpp" />
+ <Unit filename="src\net\itemhandler.h" />
+ <Unit filename="src\net\loginhandler.cpp" />
+ <Unit filename="src\net\loginhandler.h" />
+ <Unit filename="src\net\maploginhandler.cpp" />
+ <Unit filename="src\net\maploginhandler.h" />
+ <Unit filename="src\net\messagehandler.cpp" />
+ <Unit filename="src\net\messagehandler.h" />
+ <Unit filename="src\net\messagein.cpp" />
+ <Unit filename="src\net\messagein.h" />
+ <Unit filename="src\net\messageout.cpp" />
+ <Unit filename="src\net\messageout.h" />
+ <Unit filename="src\net\network.cpp" />
+ <Unit filename="src\net\network.h" />
+ <Unit filename="src\net\npchandler.cpp" />
+ <Unit filename="src\net\npchandler.h" />
+ <Unit filename="src\net\packet.h" />
+ <Unit filename="src\net\playerhandler.cpp" />
+ <Unit filename="src\net\playerhandler.h" />
+ <Unit filename="src\net\protocol.cpp" />
+ <Unit filename="src\net\protocol.h" />
+ <Unit filename="src\net\skillhandler.cpp" />
+ <Unit filename="src\net\skillhandler.h" />
+ <Unit filename="src\net\tradehandler.cpp" />
+ <Unit filename="src\net\tradehandler.h" />
+ <Unit filename="src\npc.cpp" />
+ <Unit filename="src\npc.h" />
+ <Unit filename="src\openglgraphics.cpp" />
+ <Unit filename="src\openglgraphics.h" />
+ <Unit filename="src\particle.cpp" />
+ <Unit filename="src\particle.h" />
+ <Unit filename="src\particleemitter.cpp" />
+ <Unit filename="src\particleemitter.h" />
+ <Unit filename="src\particleemitterprop.h" />
+ <Unit filename="src\player.cpp" />
+ <Unit filename="src\player.h" />
+ <Unit filename="src\player_relations.cpp" />
+ <Unit filename="src\player_relations.h" />
+ <Unit filename="src\properties.h" />
+ <Unit filename="src\resources\action.cpp" />
+ <Unit filename="src\resources\action.h" />
+ <Unit filename="src\resources\ambientoverlay.cpp" />
+ <Unit filename="src\resources\ambientoverlay.h" />
+ <Unit filename="src\resources\animation.cpp" />
+ <Unit filename="src\resources\animation.h" />
+ <Unit filename="src\resources\buddylist.cpp" />
+ <Unit filename="src\resources\buddylist.h" />
+ <Unit filename="src\resources\dye.cpp" />
+ <Unit filename="src\resources\dye.h" />
+ <Unit filename="src\resources\image.cpp" />
+ <Unit filename="src\resources\image.h" />
+ <Unit filename="src\resources\imageloader.cpp" />
+ <Unit filename="src\resources\imageloader.h" />
+ <Unit filename="src\resources\imageset.cpp" />
+ <Unit filename="src\resources\imageset.h" />
+ <Unit filename="src\resources\imagewriter.cpp" />
+ <Unit filename="src\resources\imagewriter.h" />
+ <Unit filename="src\resources\itemdb.cpp" />
+ <Unit filename="src\resources\itemdb.h" />
+ <Unit filename="src\resources\iteminfo.cpp" />
+ <Unit filename="src\resources\iteminfo.h" />
+ <Unit filename="src\resources\mapreader.cpp" />
+ <Unit filename="src\resources\mapreader.h" />
+ <Unit filename="src\resources\monsterdb.cpp" />
+ <Unit filename="src\resources\monsterdb.h" />
+ <Unit filename="src\resources\monsterinfo.cpp" />
+ <Unit filename="src\resources\monsterinfo.h" />
+ <Unit filename="src\resources\music.cpp" />
+ <Unit filename="src\resources\music.h" />
+ <Unit filename="src\resources\npcdb.cpp" />
+ <Unit filename="src\resources\npcdb.h" />
+ <Unit filename="src\resources\resource.cpp" />
+ <Unit filename="src\resources\resource.h" />
+ <Unit filename="src\resources\resourcemanager.cpp" />
+ <Unit filename="src\resources\resourcemanager.h" />
+ <Unit filename="src\resources\soundeffect.cpp" />
+ <Unit filename="src\resources\soundeffect.h" />
+ <Unit filename="src\resources\spritedef.cpp" />
+ <Unit filename="src\resources\spritedef.h" />
+ <Unit filename="src\serverinfo.h" />
+ <Unit filename="src\shopitem.cpp" />
+ <Unit filename="src\shopitem.h" />
+ <Unit filename="src\simpleanimation.cpp" />
+ <Unit filename="src\simpleanimation.h" />
+ <Unit filename="src\sound.cpp" />
+ <Unit filename="src\sound.h" />
+ <Unit filename="src\sprite.h" />
+ <Unit filename="src\text.cpp" />
+ <Unit filename="src\text.h" />
+ <Unit filename="src\textmanager.cpp" />
+ <Unit filename="src\textmanager.h" />
+ <Unit filename="src\textparticle.cpp" />
+ <Unit filename="src\textparticle.h" />
+ <Unit filename="src\tileset.h" />
+ <Unit filename="src\tmw.rc">
+ <Option compilerVar="CPP" />
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:tmw.cbp
+ </Unit>
+ <Unit filename="src\utils\base64.cpp" />
+ <Unit filename="src\utils\base64.h" />
+ <Unit filename="src\utils\colorconversion.cpp" />
+ <Unit filename="src\utils\colorconversion.h" />
+ <Unit filename="src\utils\dtor.h" />
+ <Unit filename="src\utils\fastsqrt.h" />
+ <Unit filename="src\utils\strprintf.cpp" />
+ <Unit filename="src\utils\strprintf.h" />
+ <Unit filename="src\utils\tostring.h" />
+ <Unit filename="src\utils\trim.h" />
+ <Unit filename="src\utils\xml.cpp" />
+ <Unit filename="src\utils\xml.h" />
+ <Unit filename="src\vector.h" />
+ <Unit filename="src\winver.h" />
+ <Extensions>
+ <code_completion />
+ <envvars />
+ <debugger />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
diff --git a/tmw.desktop b/aethyra.desktop
index 398fb439..eb75b5cf 100644
--- a/tmw.desktop
+++ b/aethyra.desktop
@@ -1,16 +1,16 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
-Name=The Mana World
-Name[fr]=Le Monde de Mana
+Name=Aethyra
+Name[fr]=Aethyra
Comment=An on-line fantasy role playing game
Comment[fr]=Un jeu en ligne dans un univers fantastique
Comment[de]=ein Online Fantasy Spiel
Comment[it]=Un gioco fantasy online
Comment[nl]=Een online role playing game
-Exec=tmw
+Exec=aethyra
StartupNotify=false
Terminal=false
Type=Application
-Icon=tmw.png
+Icon=aethyra.png
Categories=Application;Game
diff --git a/aethyra.png b/aethyra.png
new file mode 100644
index 00000000..b3c128f7
--- /dev/null
+++ b/aethyra.png
Binary files differ
diff --git a/autobuild.sh b/autobuild.sh
new file mode 100755
index 00000000..d15bd853
--- /dev/null
+++ b/autobuild.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+# auto build script based on fedora but usable for other distros
+#author=Blame <blame582@gmail.com>
+#last modified date 2008-09-29 Blameu
+# right now thes should be ok for testing
+file=/etc/fedora-release
+file1=/etc/lsb-release
+
+echo "Generating build information using aclocal, autoheader, automake and autoconf."
+echo
+
+# Regerate configuration files
+aclocal
+autoheader
+automake --gnu --add-missing --copy
+autoconf
+
+echo
+echo "Now you are ready to run ./configure"
+
+./configure
+
+echo
+echo "now running make"
+
+make
+
+echo
+echo "now running make install please input your root password";
+# we must test for fedora first otherwise we get an error
+if [ -e $file ]; then
+ echo "Fedora found";
+ su -c "make install";
+ su -c "make clean";
+ echo "Done";
+ aethyra &
+ exit 1;
+elif [ -e $file1 ];then
+ echo "ubuntu found";
+ sudo make install;
+ aethyra &
+ exit 1;
+else
+ echo "login as root and run make install"
+fi
+echo "done"
+
diff --git a/configure.ac b/configure.ac
index 304ae6d7..afcca24b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,9 @@
AC_PREREQ(2.59)
+<<<<<<< HEAD:configure.ac
+AC_INIT([Aethyra], [SVN-0.0.27], [irarice@gmail.com], [aethyra])
+=======
AC_INIT([The Mana World], [0.0.26], [elvenprogrammer@gmail.com], [tmw])
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:configure.ac
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_LANG_CPLUSPLUS
@@ -79,7 +83,7 @@ else
with_opengl=yes
AC_CHECK_LIB([GL], [glBegin], ,
AC_MSG_ERROR([ *** Unable to find OpenGL library]))
- AC_DEFINE(USE_OPENGL, 1, [Defines if tmw should use an OpenGL display])
+ AC_DEFINE(USE_OPENGL, 1, [Defines if aethyra should use an OpenGL display])
fi
# Search for sdl-config
@@ -92,10 +96,10 @@ if test -n "$LIBSDL_CONFIG"; then
AC_SUBST(LIBSDL_CFLAGS)
AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1,
- [Defines if your system has the LIBSDL library])
+ [Defines if your system has the LIBSDL library])
else
AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 0,
- [Defines if your system has the LIBSDL library])
+ [Defines if your system has the LIBSDL library])
AC_MSG_ERROR([Could not find sdl-config, check http://www.libsdl.org])
fi
diff --git a/data/Makefile.am b/data/Makefile.am
index 5a28f7c1..508e6e0e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,4 @@
SUBDIRS = graphics help icons
-tmwdatadir = $(pkgdatadir)/data
+aethyradatadir = $(pkgdatadir)/data
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
index 5cb47b8c..0ad4bd13 100644
--- a/data/graphics/gui/CMakeLists.txt
+++ b/data/graphics/gui/CMakeLists.txt
@@ -8,7 +8,9 @@ SET (FILES
checkbox.png
close_button.png
deepbox.png
+ default.png
fixedfont.png
+ gui.xml
hits_blue.png
hits_red.png
hits_yellow.png
@@ -31,6 +33,8 @@ SET (FILES
selection.png
sansserif8.png
slider.png
+ speech_bubble.png
+ speech_bubble.xml
target-cursor-blue-l.png
target-cursor-blue-m.png
target-cursor-blue-s.png
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
index cfa14192..f2abf035 100644
--- a/data/graphics/gui/Makefile.am
+++ b/data/graphics/gui/Makefile.am
@@ -11,8 +11,10 @@ gui_DATA = \
checkbox.png \
close_button.png \
deepbox.png \
+ default.png \
emotions.png \
fixedfont.png \
+ gui.xml \
hits_blue.png \
hits_red.png \
hits_yellow.png \
@@ -32,9 +34,14 @@ gui_DATA = \
radioout.png \
resize.png \
rpgfont_wider.png \
+ rpgfont_wider-blue.png \
+ rpgfont_wider-green.png \
+ rpgfont_wider-orange.png \
selection.png \
sansserif8.png \
slider.png \
+ speech_bubble.png \
+ speechbubble.xml \
target-cursor-blue-l.png \
target-cursor-blue-m.png \
target-cursor-blue-s.png \
diff --git a/data/graphics/gui/bg_quad_dis.png b/data/graphics/gui/bg_quad_dis.png
index 3a0354bb..b79b9ca7 100644
--- a/data/graphics/gui/bg_quad_dis.png
+++ b/data/graphics/gui/bg_quad_dis.png
Binary files differ
diff --git a/data/graphics/gui/button.png b/data/graphics/gui/button.png
index 9ebbea63..ff50a908 100644
--- a/data/graphics/gui/button.png
+++ b/data/graphics/gui/button.png
Binary files differ
diff --git a/data/graphics/gui/button_disabled.png b/data/graphics/gui/button_disabled.png
index 0ce3aa6f..cb5a1b01 100644
--- a/data/graphics/gui/button_disabled.png
+++ b/data/graphics/gui/button_disabled.png
Binary files differ
diff --git a/data/graphics/gui/buttonhi.png b/data/graphics/gui/buttonhi.png
index c4772634..da30f283 100644
--- a/data/graphics/gui/buttonhi.png
+++ b/data/graphics/gui/buttonhi.png
Binary files differ
diff --git a/data/graphics/gui/buttonpress.png b/data/graphics/gui/buttonpress.png
index e9cd1765..4c45a45f 100644
--- a/data/graphics/gui/buttonpress.png
+++ b/data/graphics/gui/buttonpress.png
Binary files differ
diff --git a/data/graphics/gui/checkbox.png b/data/graphics/gui/checkbox.png
index 669ecf03..bf8e9052 100644
--- a/data/graphics/gui/checkbox.png
+++ b/data/graphics/gui/checkbox.png
Binary files differ
diff --git a/data/graphics/gui/close_button.png b/data/graphics/gui/close_button.png
index f87cc2a9..a0a6d144 100644
--- a/data/graphics/gui/close_button.png
+++ b/data/graphics/gui/close_button.png
Binary files differ
diff --git a/data/graphics/gui/deepbox.png b/data/graphics/gui/deepbox.png
index ed3231f3..0980f57e 100644
--- a/data/graphics/gui/deepbox.png
+++ b/data/graphics/gui/deepbox.png
Binary files differ
diff --git a/data/graphics/gui/default.png b/data/graphics/gui/default.png
new file mode 100644
index 00000000..29353df8
--- /dev/null
+++ b/data/graphics/gui/default.png
Binary files differ
diff --git a/data/graphics/gui/gui.xml b/data/graphics/gui/gui.xml
new file mode 100644
index 00000000..fe62528e
--- /dev/null
+++ b/data/graphics/gui/gui.xml
@@ -0,0 +1,18 @@
+<skinset name="Default" image="default.png">
+ <widget type="Window">
+ <!-- Top Row -->
+ <part type="top-left-corner" xpos="0" ypos="0" width="4" height="4" />
+ <part type="top-edge" xpos="4" ypos="0" width="3" height="4" />
+ <part type="top-right-corner" xpos="7" ypos="0" width="4" height="4" />
+
+ <!-- Middle Row -->
+ <part type="left-edge" xpos="0" ypos="4" width="4" height="10" />
+ <part type="bg-quad" xpos="11" ypos="0" width="32" height="32" />
+ <part type="right-edge" xpos="7" ypos="4" width="4" height="10" />
+
+ <!-- Bottom Row -->
+ <part type="bottom-left-corner" xpos="0" ypos="15" width="4" height="4" />
+ <part type="bottom-edge" xpos="4" ypos="15" width="3" height="4" />
+ <part type="bottom-right-corner" xpos="7" ypos="15" width="4" height="4" />
+ </widget>
+</skinset> \ No newline at end of file
diff --git a/data/graphics/gui/hits_blue.png b/data/graphics/gui/hits_blue.png
index 59458485..cfb04ab8 100644
--- a/data/graphics/gui/hits_blue.png
+++ b/data/graphics/gui/hits_blue.png
Binary files differ
diff --git a/data/graphics/gui/hits_red.png b/data/graphics/gui/hits_red.png
index da765dc4..150f1c1e 100644
--- a/data/graphics/gui/hits_red.png
+++ b/data/graphics/gui/hits_red.png
Binary files differ
diff --git a/data/graphics/gui/hits_yellow.png b/data/graphics/gui/hits_yellow.png
index d77b7c05..6975dfd5 100644
--- a/data/graphics/gui/hits_yellow.png
+++ b/data/graphics/gui/hits_yellow.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_left_default.png b/data/graphics/gui/hscroll_left_default.png
index 2f763d30..6d21e7c0 100644
--- a/data/graphics/gui/hscroll_left_default.png
+++ b/data/graphics/gui/hscroll_left_default.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_left_highlight.png b/data/graphics/gui/hscroll_left_highlight.png
index 6be5ae25..1dd79658 100644
--- a/data/graphics/gui/hscroll_left_highlight.png
+++ b/data/graphics/gui/hscroll_left_highlight.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_left_pressed.png b/data/graphics/gui/hscroll_left_pressed.png
index b8ebcb46..92478ec8 100644
--- a/data/graphics/gui/hscroll_left_pressed.png
+++ b/data/graphics/gui/hscroll_left_pressed.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_right_default.png b/data/graphics/gui/hscroll_right_default.png
index 33fdddd0..94c0efeb 100644
--- a/data/graphics/gui/hscroll_right_default.png
+++ b/data/graphics/gui/hscroll_right_default.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_right_highlight.png b/data/graphics/gui/hscroll_right_highlight.png
index e9e633ea..ef56538f 100644
--- a/data/graphics/gui/hscroll_right_highlight.png
+++ b/data/graphics/gui/hscroll_right_highlight.png
Binary files differ
diff --git a/data/graphics/gui/hscroll_right_pressed.png b/data/graphics/gui/hscroll_right_pressed.png
index 53972f2b..36cff58a 100644
--- a/data/graphics/gui/hscroll_right_pressed.png
+++ b/data/graphics/gui/hscroll_right_pressed.png
Binary files differ
diff --git a/data/graphics/gui/item_shortcut_bgr.png b/data/graphics/gui/item_shortcut_bgr.png
index e878fc7a..01f1643a 100644
--- a/data/graphics/gui/item_shortcut_bgr.png
+++ b/data/graphics/gui/item_shortcut_bgr.png
Binary files differ
diff --git a/data/graphics/gui/menuitemD.png b/data/graphics/gui/menuitemD.png
index a9fe2222..e6654e97 100644
--- a/data/graphics/gui/menuitemD.png
+++ b/data/graphics/gui/menuitemD.png
Binary files differ
diff --git a/data/graphics/gui/menuitemF.png b/data/graphics/gui/menuitemF.png
index 84142a16..f18a82eb 100644
--- a/data/graphics/gui/menuitemF.png
+++ b/data/graphics/gui/menuitemF.png
Binary files differ
diff --git a/data/graphics/gui/menuitemN.png b/data/graphics/gui/menuitemN.png
index bf25dd61..f813d4c5 100644
--- a/data/graphics/gui/menuitemN.png
+++ b/data/graphics/gui/menuitemN.png
Binary files differ
diff --git a/data/graphics/gui/menuitemP.png b/data/graphics/gui/menuitemP.png
index 060d5a34..ba6e1543 100644
--- a/data/graphics/gui/menuitemP.png
+++ b/data/graphics/gui/menuitemP.png
Binary files differ
diff --git a/data/graphics/gui/mouse.png b/data/graphics/gui/mouse.png
index 84dc2ad1..6c1b7e8e 100644
--- a/data/graphics/gui/mouse.png
+++ b/data/graphics/gui/mouse.png
Binary files differ
diff --git a/data/graphics/gui/radioin.png b/data/graphics/gui/radioin.png
index 12e027fe..9034f469 100644
--- a/data/graphics/gui/radioin.png
+++ b/data/graphics/gui/radioin.png
Binary files differ
diff --git a/data/graphics/gui/radioout.png b/data/graphics/gui/radioout.png
index 5eb67bd8..4e088943 100644
--- a/data/graphics/gui/radioout.png
+++ b/data/graphics/gui/radioout.png
Binary files differ
diff --git a/data/graphics/gui/resize.png b/data/graphics/gui/resize.png
index 6b31ac64..9890f83f 100644
--- a/data/graphics/gui/resize.png
+++ b/data/graphics/gui/resize.png
Binary files differ
diff --git a/data/graphics/gui/rpgfont_wider-blue.png b/data/graphics/gui/rpgfont_wider-blue.png
new file mode 100644
index 00000000..b4a27434
--- /dev/null
+++ b/data/graphics/gui/rpgfont_wider-blue.png
Binary files differ
diff --git a/data/graphics/gui/rpgfont_wider-green.png b/data/graphics/gui/rpgfont_wider-green.png
new file mode 100644
index 00000000..00098746
--- /dev/null
+++ b/data/graphics/gui/rpgfont_wider-green.png
Binary files differ
diff --git a/data/graphics/gui/rpgfont_wider-orange.png b/data/graphics/gui/rpgfont_wider-orange.png
new file mode 100644
index 00000000..18dd67e9
--- /dev/null
+++ b/data/graphics/gui/rpgfont_wider-orange.png
Binary files differ
diff --git a/data/graphics/gui/slider.png b/data/graphics/gui/slider.png
index 1f6e6b35..32adf4f7 100644
--- a/data/graphics/gui/slider.png
+++ b/data/graphics/gui/slider.png
Binary files differ
diff --git a/data/graphics/gui/speech_bubble.png b/data/graphics/gui/speech_bubble.png
new file mode 100644
index 00000000..3e678099
--- /dev/null
+++ b/data/graphics/gui/speech_bubble.png
Binary files differ
diff --git a/data/graphics/gui/speechbubble.xml b/data/graphics/gui/speechbubble.xml
new file mode 100644
index 00000000..1b11ea85
--- /dev/null
+++ b/data/graphics/gui/speechbubble.xml
@@ -0,0 +1,18 @@
+<skinset name="SpeechBubble" image="speech_bubble.png">
+ <widget type="Window">
+ <!-- Top Row -->
+ <part type="top-left-corner" xpos="0" ypos="0" width="14" height="14" />
+ <part type="top-edge" xpos="15" ypos="0" width="1" height="14" />
+ <part type="top-right-corner" xpos="17" ypos="0" width="17" height="14" />
+
+ <!-- Middle Row -->
+ <part type="left-edge" xpos="0" ypos="15" width="14" height="1" />
+ <part type="bg-quad" xpos="34" ypos="0" width="32" height="32" />
+ <part type="right-edge" xpos="17" ypos="15" width="17" height="1" />
+
+ <!-- Bottom Row -->
+ <part type="bottom-left-corner" xpos="0" ypos="17" width="14" height="17" />
+ <part type="bottom-edge" xpos="15" ypos="17" width="1" height="17" />
+ <part type="bottom-right-corner" xpos="17" ypos="17" width="17" height="17" />
+ </widget>
+</skinset> \ No newline at end of file
diff --git a/data/graphics/gui/thickborder.png b/data/graphics/gui/thickborder.png
index da72c92f..d3844b71 100644
--- a/data/graphics/gui/thickborder.png
+++ b/data/graphics/gui/thickborder.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_blue.png b/data/graphics/gui/vscroll_blue.png
index 397501ce..295ca1a5 100644
--- a/data/graphics/gui/vscroll_blue.png
+++ b/data/graphics/gui/vscroll_blue.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_down_default.png b/data/graphics/gui/vscroll_down_default.png
index c4292489..4bf696b0 100644
--- a/data/graphics/gui/vscroll_down_default.png
+++ b/data/graphics/gui/vscroll_down_default.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_down_highlight.png b/data/graphics/gui/vscroll_down_highlight.png
index ac88f7c7..a7459745 100644
--- a/data/graphics/gui/vscroll_down_highlight.png
+++ b/data/graphics/gui/vscroll_down_highlight.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_down_pressed.png b/data/graphics/gui/vscroll_down_pressed.png
index 9dcc89f6..e6238024 100644
--- a/data/graphics/gui/vscroll_down_pressed.png
+++ b/data/graphics/gui/vscroll_down_pressed.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_grey.png b/data/graphics/gui/vscroll_grey.png
index 87ba8758..4d950a32 100644
--- a/data/graphics/gui/vscroll_grey.png
+++ b/data/graphics/gui/vscroll_grey.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_red.png b/data/graphics/gui/vscroll_red.png
index d7ad4a90..0e50513c 100644
--- a/data/graphics/gui/vscroll_red.png
+++ b/data/graphics/gui/vscroll_red.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_up_default.png b/data/graphics/gui/vscroll_up_default.png
index 1cecc351..c08a2b2a 100644
--- a/data/graphics/gui/vscroll_up_default.png
+++ b/data/graphics/gui/vscroll_up_default.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_up_highlight.png b/data/graphics/gui/vscroll_up_highlight.png
index 7b5009f3..2f5ffade 100644
--- a/data/graphics/gui/vscroll_up_highlight.png
+++ b/data/graphics/gui/vscroll_up_highlight.png
Binary files differ
diff --git a/data/graphics/gui/vscroll_up_pressed.png b/data/graphics/gui/vscroll_up_pressed.png
index 2320ec42..102bac86 100644
--- a/data/graphics/gui/vscroll_up_pressed.png
+++ b/data/graphics/gui/vscroll_up_pressed.png
Binary files differ
diff --git a/data/graphics/images/Makefile.am b/data/graphics/images/Makefile.am
index 4df6b7ed..e003bc7a 100644
--- a/data/graphics/images/Makefile.am
+++ b/data/graphics/images/Makefile.am
@@ -2,7 +2,11 @@ imagesdir = $(pkgdatadir)/data/graphics/images
images_DATA = \
error.png \
- login_wallpaper.png
+ login_wallpaper.png \
+ login_wallpaper_1024x768.png \
+ login_wallpaper_1280x960.png \
+ login_wallpaper_1440x1080.png \
+ login_wallpaper_1600x1200.png
EXTRA_DIST = \
$(images_DATA)
diff --git a/data/graphics/images/copyright.txt b/data/graphics/images/copyright.txt
new file mode 100644
index 00000000..2eb4c9df
--- /dev/null
+++ b/data/graphics/images/copyright.txt
@@ -0,0 +1,6 @@
+The login wallpaper (Mitsukai Hana) is used by permission of Kayla Shirley (kai_kaiyla@live.com). All rights are reserved by her.
+
+The login wallpaper with permission of the author is now licenced under
+a CC-NC (Creative Commons Non-Commercial) licence.
+
+http://creativecommons.org/licenses/by-nc/3.0/
diff --git a/data/graphics/images/login_wallpaper.png b/data/graphics/images/login_wallpaper.png
index 7af4f913..06a9e94f 100644
--- a/data/graphics/images/login_wallpaper.png
+++ b/data/graphics/images/login_wallpaper.png
Binary files differ
diff --git a/data/graphics/images/login_wallpaper_1024x768.png b/data/graphics/images/login_wallpaper_1024x768.png
new file mode 100644
index 00000000..1239c6b0
--- /dev/null
+++ b/data/graphics/images/login_wallpaper_1024x768.png
Binary files differ
diff --git a/data/graphics/images/login_wallpaper_1280x960.png b/data/graphics/images/login_wallpaper_1280x960.png
new file mode 100644
index 00000000..a7cf1242
--- /dev/null
+++ b/data/graphics/images/login_wallpaper_1280x960.png
Binary files differ
diff --git a/data/graphics/images/login_wallpaper_1440x1080.png b/data/graphics/images/login_wallpaper_1440x1080.png
new file mode 100644
index 00000000..f0659073
--- /dev/null
+++ b/data/graphics/images/login_wallpaper_1440x1080.png
Binary files differ
diff --git a/data/graphics/images/login_wallpaper_1600x1200.png b/data/graphics/images/login_wallpaper_1600x1200.png
new file mode 100644
index 00000000..9e8d6663
--- /dev/null
+++ b/data/graphics/images/login_wallpaper_1600x1200.png
Binary files differ
diff --git a/data/help/about.txt b/data/help/about.txt
index 812aad84..79840ad6 100644
--- a/data/help/about.txt
+++ b/data/help/about.txt
@@ -1,17 +1,40 @@
<- @@index|Back to Index@@
-##3 === ABOUT THE MANA WORLD ===
+##3 === ABOUT Aethyra ===
- ##2The Mana World (TMW)##P is a serious effort to create an innovative free
- and open source MMORPG. TMW uses 2D graphics and aims to create a
- large and diverse interactive world. It is licensed under the GPL,
- making sure this game can't ever run away from you.
-
- The project includes the development of both a client and a server,
- as well as the development of an online world. At the moment we're
- making alpha releases of the client, while our server is in early
- development. The eAthena free software Ragnarok Online server is used
- until our own server has matured enough to replace it. Once ready,
- we'll be making releases of our server too so anybody will be free to
- set up their own server and start building their own online world.
+ ##2Aethyra (Ae)##P Aethyra is a 2D MMORPG, using the eAthena server
+ (an open-source clone of the commercial Ragnarok Online server). It
+ features expanding lands and community-made graphics, making for a
+ fun, free, open source community project.
+
+ ##PAethyra started out as "The Mana Experiment," an experimental
+ test-server for community-developed content designed for The Mana
+ World which was put into action by Blame, Sanga, and Sertaline.
+ ##PSoon thereafter, it became evident that it was taking far too
+ long for the elitist development team at The Mana World to
+ implement good tested-content. They made excuses and treated the
+ long-awaited custom server TMWServ as the answer to all the problems,
+ and left the eAthena server (which The Mana World still runs on)
+ to rot. Many development team members lost interest in helping, and
+ the programmers forsook the eAthena server saying that it would
+ simply delay TMWServ progress for months to fix the simplest of
+ errors. In response to this, The Mana Experiment became a fork
+ project, and an official game server.
+ ##PTime passed, and more and more content was tested and implemented.
+ Soon, discussion began for a name. Aethyra was chosen, and the Game
+ you see now was setup. Content development has never been better, and
+ the staff never more motivated! Stay on the lookout for more exciting
+ Aethyra developments!
+
+##3 === Aethyra's Goal ===
+
+ ##PAethyra is a community driven experiment that utilizes eAthena at
+ its core with the end goal of getting its players as involved in the
+ process as much as possible. It's originally forked from The Mana
+ World when its developers came up with the idea of "Why should we
+ have to wait for an MMORPG game in development when we've already got
+ a great server setup here that does everything we've been promised
+ and more?" ##P As such, we are trying to implement as many functions
+ of eAthena as possible while creating our own in the process based
+ on what our players want to see.
diff --git a/data/help/changes.txt b/data/help/changes.txt
index d05dd5cb..e679e928 100644
--- a/data/help/changes.txt
+++ b/data/help/changes.txt
@@ -3,6 +3,10 @@
##3 === RECENT CHANGES ===
+<<<<<<< HEAD:data/help/changes.txt
+Go to http://gitorious.org/projects/tmw/repos/aethyra for a detailed
+list of changes.
+=======
0.0.26 (29 August 2008)
- Added support for a newer version of eAthena server
- Added support for showing custom being effects
@@ -68,4 +72,5 @@
- Fixed a crash in equipment window on failure to load an item icon
- Fixed a crash on filling up your inventory
- Fixed item list in shops not to scroll back when selling
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:data/help/changes.txt
diff --git a/data/help/commands.txt b/data/help/commands.txt
index e98cb677..e80c537e 100644
--- a/data/help/commands.txt
+++ b/data/help/commands.txt
@@ -27,11 +27,9 @@
##2Alt + T##P toggle ignore of incoming trades
##2A##P target nearest monster
##2H##P hide all non-sticky windows
- ##2G or Z##P pick up item
+ ##2Z##P pick up item
##2Enter##P focus chat window / send message
- ##2Shift##P hold it when attacking to lock target for auto
- attack
-
+
##2MOUSE:
@@ -50,10 +48,18 @@
/whisper <name> <message>
+<<<<<<< HEAD:data/help/commands.txt
+ This will send <message> to player <name>, if that player is logged in.
+ to whisper to users with spaces in there name you must incase the user name in qoutes
+ (e.g. /whisper "user name" <message>)
+
+ For further help type /help in the chat console.
+=======
This will send <message> to player <name>, if that player is logged in. If the
name has a space in it, put double quotes around it like this:
/whisper "<name>" <message>
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:data/help/commands.txt
##2IGNORING COMMUNICATION
diff --git a/data/help/header.txt b/data/help/header.txt
index 462deaa2..a560895c 100644
--- a/data/help/header.txt
+++ b/data/help/header.txt
@@ -1,9 +1,13 @@
-##1 T H E M A N A W O R L D
+##1 AETHYRA
##1 ==========================================
+<<<<<<< HEAD:data/help/header.txt
+ ##2Version:##6 Aethyra GIT 0.0.27 ##2Date:##5 December 2008
+=======
##2Version:##6 0.0.26 ##2Date:##329 August 2008
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:data/help/header.txt
-##2 Website: http://themanaworld.org
+##2 Website: http://www.aethyra.org
diff --git a/data/help/index.txt b/data/help/index.txt
index b7262f85..4dcc2332 100644
--- a/data/help/index.txt
+++ b/data/help/index.txt
@@ -1,6 +1,6 @@
##3 === INDEX ===
- -> @@about|About The Mana World@@
+ -> @@about|About Aethyra@@
-> @@team|Development Team@@
-> @@changes|Recent Changes@@
diff --git a/data/help/skills.txt b/data/help/skills.txt
index 84d5bc5a..3a075ee0 100644
--- a/data/help/skills.txt
+++ b/data/help/skills.txt
@@ -11,5 +11,7 @@
##2Level 1:##P enables the ability to trade with others
##2Level 2:##P enables the ability to express emotions
##2Level 3:##P enables character to sit
+ ##2Level 5:##P enables a char to join a party.
+ ##2Level 7:##P enables a char to create a party
Other levels are still not implemented.
\ No newline at end of file
diff --git a/data/help/support.txt b/data/help/support.txt
index dfbd588d..819516de 100644
--- a/data/help/support.txt
+++ b/data/help/support.txt
@@ -7,11 +7,15 @@
can't find a solution to your problem, feel free to check our
Bugs/Support section of the forum:
+<<<<<<< HEAD:data/help/support.txt
+##2 http://forums.aethyra.com
+=======
##2 http://forums.themanaworld.org/viewforum.php?f=3
+>>>>>>> a7c21e6f8add37af7412449742ec55c8daa8571a:data/help/support.txt
or come visit us on our IRC channel:
-##2 #themanaworld ##P@##2 irc.freenode.net
+##2 #aethyra ##P@##2 irc.freenode.net
Otherwise see the @@team|Development Team@@ section to have a list of
developers and how to contact them.
diff --git a/data/help/team.txt b/data/help/team.txt
index e17771d5..dfd00d4b 100644
--- a/data/help/team.txt
+++ b/data/help/team.txt
@@ -2,131 +2,65 @@
##3 === DEVELOPMENT TEAM ===
-
-##2 Project Leader:
-
- ##9Eugenio Favalli (aka ElvenProgrammer)
- elvenprogrammer@gmail.com
-
-
+
+##2 Administration:
+
+ ##9Blua Server Administrator/Content Development
+
+ ##9MrDan Forum Administrator/GM
+
+ ##9Slinker Game Server Host
+
+ ##9Tametomo Project Head/Artist/Client Developer/Ubuntu Package Maintainer/Misc.
+
##2 Programmers:
-
- ##9Bjorn Lindeijer (aka Hammerbear)
- b_lindeijer@users.sourceforge.net
- (various parts, GUI, graphics, A* and map rewrites)
-
- ##9Björn Steinbrink (aka Doener)
- der_doener@users.sourceforge.net
- (various parts)
-
- ##9Eric Scrivner (aka zenogais)
- bitshift2002@users.sourceforge.net
- (resource manager)
-
- ##9J. Avila (aka Javila)
- javila@users.sourceforge.net
- (various parts, GUI)
-
- ##9Jan-Fabian Humann (aka Mra)
- malastare@users.sourceforge.net
- (some GUI parts)
-
- ##9Kiyoshi Kyokai (aka Kiokay)
- kyokai@users.sourceforge.net
- (game systems designer)
-
- ##9Mateusz Kaduk (aka Usiu)
- usiu@users.sourceforge.net
- (several GUI parts)
-
- ##9Aaron Marks (aka nym)
- nymacro@users.sourceforge.net
- (several GUI parts)
-
- ##9Shura
- kth5@users.sourceforge.net
- (configuration, sound, misc. ports)
-
- ##9Yohann Ferreira (aka Bertram)
- bertram25@users.sourceforge.net
- (SDL input, progress bar drawing, Debian package)
-
+
+ ##9Kraant Developer
+ <kraant@gmail.com>
##2 Artists:
-
- ##9Clef
- (tiles, concepts)
-
- ##9Frode Lindeijer (aka Modanung)
- f.lindeijer@xs4all.nl
- (arts)
-
- ##9Gnulia
- (conceptual art)
-
- ##9Magick
- (music and sound effects)
-
- ##9Neko-mon
- (player sprites, various things)
-
- ##9Neorice
- (monster sprites, tiles)
-
- ##9Pajarico
- pajarico@users.sourceforge.net
- (conceptual arts)
-
- ##9Romulo Fernandes
- razor85@users.sourceforge.net
- (arts)
-
- ##9Rotonen
- rotonen@users.sourceforge.net
- (backstory, art director, music, sound)
-
- ##9Talaroc
- talaroc@users.sourceforge.net
- (sprites)
-
- ##9Ti Sing Hao
- (music)
-
+
+ ##9Angeliex Artist
+
+ ##9Bawabawa/Kyron/Pyrestriker Artist/SuSe Package Contributor
+
+ ##9Frictor Head Artist
+
+##2 Mappers:
+
+ ##9Arkyan Mapper
+
+ ##9GonzoDark Mapper
+
+##2 Content Development:
+
+ ##9Moose
+
+##2 GMs
+
+ ##9Grimmjow
+
+ ##9SoftLace1
+
+ ##9Srauls
##2 Misc. thanks:
-
- ##9David Smith (aka catfish_man)
- catfish_man@users.sourceforge.net
- (Mac package)
-
- ##9Igor Morgado (aka imorgado)
- imorgado@users.sourceforge.net
- (tester)
-
- ##9maci
- maci321@users.sourceforge.net
- (technical support)
-
- ##9Rodney Dawes (aka dobey)
- dobey@users.sourceforge.net
- (Mac package)
-
- ##9Ultramichy
- (hosting test server)
-
-
-##2 Inactive/retired:
-
- ##9Chetic
- chetic@users.sourceforge.net
- (maps)
-
- ##9Simon Edwardsson (aka SimEdw)
- simonedw@users.sourceforge.net
- (network code, Mac package)
-
- ##9Sull
- (hosting CVS and related services)
-
- ##9Vlady
- (several items)
+
+ ##9doorsman Testing
+
+ ##9Snoopy Testing
+
+ ##9Tarax Testing
+
+##2 Leave of Absence
+
+ ##9Blame Developer/GM
+ <blame@aethyra.com>
+
+ ##9Sanga Head Developer/GM ("Sanga")
+ <sanga@aethyra.com>
+
+ ##9Scraggy Client Developer
+ <DougABoffey@netscape.net>
+
+ ##9Sert Head Artist/GM
diff --git a/data/icons/Aethyra.icns b/data/icons/Aethyra.icns
new file mode 100644
index 00000000..08909c0f
--- /dev/null
+++ b/data/icons/Aethyra.icns
Binary files differ
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 375edef7..fee51e4f 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,14 +1,14 @@
iconsdir = $(pkgdatadir)/data/icons
-icons_DATA = tmw.png
+icons_DATA = aethyra.png
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps
- $(INSTALL) $(srcdir)/tmw.png $(DESTDIR)$(datadir)/pixmaps/tmw.png
+ $(INSTALL) $(srcdir)/aethyra.png $(DESTDIR)$(datadir)/pixmaps/aethyra.png
uninstall-local:
- rm -f $(DESTDIR)$(datadir)/pixmaps/tmw.png
+ rm -f $(DESTDIR)$(datadir)/pixmaps/aethyra.png
EXTRA_DIST = \
$(icons_DATA)
diff --git a/data/icons/The Mana World.icns b/data/icons/The Mana World.icns
deleted file mode 100644
index 7230a099..00000000
--- a/data/icons/The Mana World.icns
+++ /dev/null
Binary files differ
diff --git a/data/icons/aethyra.ico b/data/icons/aethyra.ico
new file mode 100644
index 00000000..016e752f
--- /dev/null
+++ b/data/icons/aethyra.ico
Binary files differ
diff --git a/data/icons/aethyra.png b/data/icons/aethyra.png
new file mode 100644
index 00000000..e686289c
--- /dev/null
+++ b/data/icons/aethyra.png
Binary files differ
diff --git a/data/icons/aethyra.xpm b/data/icons/aethyra.xpm
new file mode 100644
index 00000000..515be72e
--- /dev/null
+++ b/data/icons/aethyra.xpm
@@ -0,0 +1,312 @@
+/* XPM */
+static char * Aethyra_xpm[] = {
+"32 32 277 2",
+" c None",
+". c #840000",
+"+ c #7E0000",
+"@ c #4F0000",
+"# c #810000",
+"$ c #830000",
+"% c #7B0000",
+"& c #460000",
+"* c #4C0000",
+"= c #4B0000",
+"- c #750000",
+"; c #860000",
+"> c #850000",
+", c #5D0000",
+"' c #490000",
+") c #450000",
+"! c #4A0000",
+"~ c #440000",
+"{ c #6A0000",
+"] c #7A0000",
+"^ c #8B0000",
+"/ c #990000",
+"( c #960000",
+"_ c #720000",
+": c #6E0000",
+"< c #740000",
+"[ c #6B0202",
+"} c #550505",
+"| c #420404",
+"1 c #440101",
+"2 c #4D0000",
+"3 c #4E0000",
+"4 c #480000",
+"5 c #9D0000",
+"6 c #9B0000",
+"7 c #6F0000",
+"8 c #710000",
+"9 c #760000",
+"0 c #680404",
+"a c #4B0C0C",
+"b c #3C0909",
+"c c #470202",
+"d c #450101",
+"e c #500000",
+"f c #510000",
+"g c #790000",
+"h c #890000",
+"i c #920000",
+"j c #710706",
+"k c #7D381F",
+"l c #934A1A",
+"m c #7B1A09",
+"n c #6B1609",
+"o c #521E13",
+"p c #4F2517",
+"q c #5D230F",
+"r c #4D0F04",
+"s c #350A0A",
+"t c #360909",
+"u c #470303",
+"v c #930000",
+"w c #840202",
+"x c #712C1C",
+"y c #A58248",
+"z c #866621",
+"A c #835819",
+"B c #98681F",
+"C c #845C1D",
+"D c #BB964A",
+"E c #856225",
+"F c #3D1B0B",
+"G c #241818",
+"H c #251717",
+"I c #360A0A",
+"J c #430000",
+"K c #6C0000",
+"L c #800000",
+"M c #730404",
+"N c #6A431E",
+"O c #473C1C",
+"P c #534420",
+"Q c #806125",
+"R c #53290B",
+"S c #461C09",
+"T c #BB9432",
+"U c #65490F",
+"V c #1F1110",
+"W c #1A2323",
+"X c #1A2222",
+"Y c #261212",
+"Z c #440202",
+"` c #7F0000",
+" . c #870000",
+".. c #6D0505",
+"+. c #422522",
+"@. c #454434",
+"#. c #A18744",
+"$. c #8F7237",
+"%. c #A37F48",
+"&. c #AD8847",
+"*. c #C6A657",
+"=. c #644C14",
+"-. c #211615",
+";. c #1C2626",
+">. c #1B2323",
+",. c #231313",
+"'. c #420202",
+"). c #6C0404",
+"!. c #532D23",
+"~. c #A8915B",
+"{. c #967C37",
+"]. c #6E5926",
+"^. c #453512",
+"/. c #473713",
+"(. c #A4832A",
+"_. c #594310",
+":. c #241F1E",
+"<. c #232828",
+"[. c #1C2020",
+"}. c #241111",
+"|. c #430202",
+"1. c #7C5030",
+"2. c #967C3D",
+"3. c #3E3318",
+"4. c #3D3930",
+"5. c #454442",
+"6. c #524D44",
+"7. c #C09E45",
+"8. c #654F17",
+"9. c #262524",
+"0. c #252929",
+"a. c #410202",
+"b. c #6B0302",
+"c. c #A78041",
+"d. c #6A5621",
+"e. c #414543",
+"f. c #696B6B",
+"g. c #747676",
+"h. c #7B7566",
+"i. c #C9A84F",
+"j. c #665017",
+"k. c #282725",
+"l. c #252A2A",
+"m. c #1B2222",
+"n. c #3D0202",
+"o. c #750802",
+"p. c #B48E41",
+"q. c #564418",
+"r. c #4A4B4B",
+"s. c #6D6F6F",
+"t. c #797A7A",
+"u. c #867C62",
+"v. c #AE9040",
+"w. c #664F12",
+"x. c #2D2A25",
+"y. c #242828",
+"z. c #1E1E1E",
+"A. c #291010",
+"B. c #400202",
+"C. c #860B02",
+"D. c #B78C32",
+"E. c #594013",
+"F. c #433E3E",
+"G. c #606464",
+"H. c #74736C",
+"I. c #7C6D44",
+"J. c #433719",
+"K. c #413311",
+"L. c #322F1E",
+"M. c #1C2121",
+"N. c #271212",
+"O. c #3C0606",
+"P. c #8C0200",
+"Q. c #B5771D",
+"R. c #765513",
+"S. c #3F3636",
+"T. c #555B5B",
+"U. c #686969",
+"V. c #5A5957",
+"W. c #3C3832",
+"X. c #403826",
+"Y. c #2F3023",
+"Z. c #1C1F1D",
+"`. c #2E0A0A",
+" + c #460101",
+".+ c #8F0101",
+"++ c #A03F0C",
+"@+ c #AC7E19",
+"#+ c #4B3625",
+"$+ c #474747",
+"%+ c #5B5C5A",
+"&+ c #83775A",
+"*+ c #8C7539",
+"=+ c #67541F",
+"-+ c #6B551C",
+";+ c #8C6D24",
+">+ c #4E1C09",
+",+ c #4A0101",
+"'+ c #8A0606",
+")+ c #8D1203",
+"!+ c #A76713",
+"~+ c #87611B",
+"{+ c #453A32",
+"]+ c #52554E",
+"^+ c #A38A45",
+"/+ c #715818",
+"(+ c #7A6424",
+"_+ c #443212",
+":+ c #947026",
+"<+ c #7D4E11",
+"[+ c #490400",
+"}+ c #420000",
+"|+ c #7F0808",
+"1+ c #8B0101",
+"2+ c #800F01",
+"3+ c #915E11",
+"4+ c #504F40",
+"5+ c #4E4834",
+"6+ c #5A4715",
+"7+ c #5B4814",
+"8+ c #382813",
+"9+ c #917035",
+"0+ c #533209",
+"a+ c #3F0400",
+"b+ c #8E0101",
+"c+ c #8A0000",
+"d+ c #671104",
+"e+ c #663D12",
+"f+ c #786023",
+"g+ c #74612B",
+"h+ c #665320",
+"i+ c #675321",
+"j+ c #785C24",
+"k+ c #684718",
+"l+ c #380B00",
+"m+ c #400000",
+"n+ c #8C0303",
+"o+ c #8D0000",
+"p+ c #780101",
+"q+ c #510808",
+"r+ c #291A16",
+"s+ c #26291C",
+"t+ c #2D2B18",
+"u+ c #321F0E",
+"v+ c #370A02",
+"w+ c #3E0100",
+"x+ c #850202",
+"y+ c #600202",
+"z+ c #331313",
+"A+ c #1E2121",
+"B+ c #1A1E1E",
+"C+ c #270D0D",
+"D+ c #470000",
+"E+ c #7B0404",
+"F+ c #720101",
+"G+ c #4B0D0D",
+"H+ c #2D1717",
+"I+ c #261414",
+"J+ c #380808",
+"K+ c #7E0202",
+"L+ c #5D0606",
+"M+ c #3B0E0E",
+"N+ c #300C0C",
+"O+ c #430303",
+"P+ c #7A0505",
+"Q+ c #7C0000",
+"R+ c #640404",
+"S+ c #430D0D",
+"T+ c #460202",
+"U+ c #610505",
+"V+ c #440E0E",
+"W+ c #390B0B",
+"X+ c #560202",
+"Y+ c #480707",
+"Z+ c #410505",
+"`+ c #4B0101",
+" @ c #480101",
+" ",
+" ",
+" ",
+" . + @ ",
+" # $ % & * @ = ",
+" - # ; > $ , ' ) ! @ * ~ ",
+" { ] ^ / ( $ _ : < [ } | 1 ) ~ ' 2 2 3 3 4 ",
+" ] ^ 5 6 . 7 8 9 0 a b c * d 4 e f @ 3 4 ",
+" g h / i j k l m n o p q r s t u e 3 2 4 ",
+" 8 > v w x y z A B C D E F G H I = @ ' J ",
+" K L ^ M N O P Q R S T U V W X Y Z e ) ",
+" ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.e & ",
+" ` . ).!.~.{.].^./.(._.:.<.[.}.|.@ 4 ",
+" # [ 1.2.3.4.5.6.7.8.9.0.[.}.a.= ",
+" ` b.c.d.e.f.g.h.i.j.k.l.m.,.n.) ",
+" L o.p.q.r.s.t.u.v.w.x.y.z.A.B.~ ",
+" ; C.D.E.F.G.H.I.J.K.L.M.N.O.4 ",
+" P.Q.R.S.T.U.V.W.X.Y.Z.`. +2 ",
+" .+++@+#+$+%+&+*+=+-+;+>+,+= ",
+" '+)+!+~+{+]+^+/+(+_+:+<+[+}+ ",
+" |+1+2+3+z 4+5+6+7+8+9+0+a+ ",
+" b+c+d+e+f+g+h+i+j+k+l+m+ ",
+" n+o+p+q+r+s+t+u+v+w+) ) ",
+" x+` y+z+A+B+C+1 e D+ ",
+" E+# F+G+H+I+J+3 @ ~ ",
+" K+% L+M+N+O+e ' ",
+" P+Q+R+S+I T+@ ) ",
+" 9 U+V+W+u 2 ",
+" X+Y+Z+ + ",
+" * `+ @ ",
+" ",
+" "};
diff --git a/data/icons/tmw.ico b/data/icons/tmw.ico
deleted file mode 100644
index 61d559a3..00000000
--- a/data/icons/tmw.ico
+++ /dev/null
Binary files differ
diff --git a/data/icons/tmw.png b/data/icons/tmw.png
deleted file mode 100644
index 93e6c9ae..00000000
--- a/data/icons/tmw.png
+++ /dev/null
Binary files differ
diff --git a/data/icons/tmw.xpm b/data/icons/tmw.xpm
deleted file mode 100644
index 06ec2865..00000000
--- a/data/icons/tmw.xpm
+++ /dev/null
@@ -1,784 +0,0 @@
-/* XPM */
-static char * tmw_xpm[] = {
-"32 32 749 2",
-" c None",
-". c #E4EB6D",
-"+ c #EFF271",
-"@ c #E7EF65",
-"# c #DDED61",
-"$ c #D6E955",
-"% c #DAED4D",
-"& c #F6F5A0",
-"* c #EFEF89",
-"= c #ECF084",
-"- c #EDF077",
-"; c #EAF075",
-"> c #E0E960",
-", c #D9E757",
-"' c #D4EA52",
-") c #CFE74D",
-"! c #BEE140",
-"~ c #C2E43E",
-"{ c #B6DF33",
-"] c #F8F7C2",
-"^ c #F9F7AB",
-"/ c #F2F099",
-"( c #EEEF80",
-"_ c #F3F077",
-": c #F8F8B1",
-"< c #E8EE6F",
-"[ c #E1EB69",
-"} c #DBEB5E",
-"| c #D5E852",
-"1 c #CDE445",
-"2 c #CEE843",
-"3 c #B6DC34",
-"4 c #A9DA2F",
-"5 c #B3E02F",
-"6 c #B6E630",
-"7 c #F1F2E2",
-"8 c #F9F9D4",
-"9 c #F9F8C5",
-"0 c #F8F8CE",
-"a c #F9F8D6",
-"b c #F9F7CB",
-"c c #F9F7B1",
-"d c #F9F7A7",
-"e c #E7EE73",
-"f c #E4EC69",
-"g c #DEEB60",
-"h c #D8E755",
-"i c #D5EB55",
-"j c #C2E33F",
-"k c #BEE33C",
-"l c #B5E339",
-"m c #A7DF2E",
-"n c #9BDA28",
-"o c #95DA24",
-"p c #8DD724",
-"q c #F9F9F5",
-"r c #F9F9EA",
-"s c #F9F9E1",
-"t c #F9F9F4",
-"u c #F9F7DF",
-"v c #F9F7D1",
-"w c #F9F7C9",
-"x c #F9F7B6",
-"y c #F9F7AE",
-"z c #D7E363",
-"A c #E1EC6B",
-"B c #DDEC60",
-"C c #D8EC61",
-"D c #CDE552",
-"E c #C6E543",
-"F c #BCE440",
-"G c #BEE73E",
-"H c #ABDF30",
-"I c #ACE230",
-"J c #8FD720",
-"K c #80D01C",
-"L c #80D51A",
-"M c #F9F9F7",
-"N c #F9F9EB",
-"O c #F9F9F9",
-"P c #F9F7E6",
-"Q c #F9F7D3",
-"R c #F9F7CE",
-"S c #F9F7BF",
-"T c #F9F8B9",
-"U c #E6EF8F",
-"V c #E1EB65",
-"W c #E0ED63",
-"X c #D1E452",
-"Y c #D3E84D",
-"Z c #C3E340",
-"` c #BBE13E",
-" . c #B0DD35",
-".. c #ABDD2E",
-"+. c #A0DB2A",
-"@. c #95D923",
-"#. c #7ED31C",
-"$. c #7ED31A",
-"%. c #80DA18",
-"&. c #F4F3EF",
-"*. c #F9F9F6",
-"=. c #F9F8F5",
-"-. c #F9F7EE",
-";. c #F9F7E2",
-">. c #F9F7D5",
-",. c #F9F6C2",
-"'. c #F8F69C",
-"). c #D4E56D",
-"!. c #E4ED73",
-"~. c #DBEA60",
-"{. c #DDE961",
-"]. c #C9E54E",
-"^. c #BFE242",
-"/. c #BEE33E",
-"(. c #B1DE34",
-"_. c #ABDE33",
-":. c #95D826",
-"<. c #8DD620",
-"[. c #8DDB20",
-"}. c #91DD1E",
-"|. c #71D116",
-"1. c #50B910",
-"2. c #F9F8F7",
-"3. c #F9F8F4",
-"4. c #F9F7EB",
-"5. c #F9F7E1",
-"6. c #F9F5CF",
-"7. c #F9F6C9",
-"8. c #F9F6BF",
-"9. c #D6E471",
-"0. c #E9F075",
-"a. c #E3EC6B",
-"b. c #D9E96D",
-"c. c #CEE558",
-"d. c #CBE44E",
-"e. c #BEDE3E",
-"f. c #ACDA37",
-"g. c #BCE639",
-"h. c #AEE135",
-"i. c #9EDB2A",
-"j. c #8FD822",
-"k. c #7CD31B",
-"l. c #82DA1C",
-"m. c #63CE13",
-"n. c #61CE12",
-"o. c #F9F9F8",
-"p. c #F9F7F5",
-"q. c #F9F4DD",
-"r. c #F9F5D7",
-"s. c #F9F5C9",
-"t. c #F9F5B6",
-"u. c #E3ED8D",
-"v. c #DEE865",
-"w. c #E3ED6D",
-"x. c #DDEB5E",
-"y. c #D3E755",
-"z. c #CAE349",
-"A. c #CFEB4D",
-"B. c #C1E33B",
-"C. c #BCE743",
-"D. c #B0E02D",
-"E. c #95DB28",
-"F. c #95DB26",
-"G. c #C6E627",
-"H. c #E8F433",
-"I. c #CAED26",
-"J. c #60CD0F",
-"K. c #58CD0E",
-"L. c #F9F7EC",
-"M. c #F9F7F1",
-"N. c #F9F4E4",
-"O. c #F9F3D7",
-"P. c #F9F3CA",
-"Q. c #F9F5CA",
-"R. c #F9F5BB",
-"S. c #F9F8B6",
-"T. c #F6F89E",
-"U. c #DFEB5C",
-"V. c #CEE453",
-"W. c #D0E753",
-"X. c #CDE543",
-"Y. c #C7E842",
-"Z. c #C1E53C",
-"`. c #A7DC30",
-" + c #E6F453",
-".+ c #E2F448",
-"++ c #D8F03C",
-"@+ c #D1ED2E",
-"#+ c #D0F033",
-"$+ c #CAED2C",
-"%+ c #ACE51F",
-"&+ c #55CF0F",
-"*+ c #F5F6EF",
-"=+ c #F9F9F2",
-"-+ c #F9F9F1",
-";+ c #F9F8F0",
-">+ c #F9F7E7",
-",+ c #F9F5F0",
-"'+ c #F9F3E1",
-")+ c #F9F5DB",
-"!+ c #F9F6DB",
-"~+ c #F9F6BE",
-"{+ c #F8F59B",
-"]+ c #F9F5A2",
-"^+ c #F8F68D",
-"/+ c #F7F689",
-"(+ c #D7EC65",
-"_+ c #CEE84E",
-":+ c #BBE23F",
-"<+ c #B6E238",
-"[+ c #A2DC30",
-"}+ c #EBF553",
-"|+ c #E4F443",
-"1+ c #DCF340",
-"2+ c #D4F033",
-"3+ c #CEEF2D",
-"4+ c #C2E926",
-"5+ c #BEEB20",
-"6+ c #5CD50E",
-"7+ c #53CE0D",
-"8+ c #F9F7D9",
-"9+ c #F9F6F2",
-"0+ c #F9F5EB",
-"a+ c #F9F3DA",
-"b+ c #F9F6DF",
-"c+ c #F9F7D0",
-"d+ c #F9F7C2",
-"e+ c #F9F7BB",
-"f+ c #F8F68F",
-"g+ c #F7F58D",
-"h+ c #F6F58B",
-"i+ c #EEF68B",
-"j+ c #BFDF43",
-"k+ c #B5DE37",
-"l+ c #B5E234",
-"m+ c #A7DD30",
-"n+ c #E7F248",
-"o+ c #D6EF40",
-"p+ c #DBF239",
-"q+ c #D0ED2F",
-"r+ c #C3EB2A",
-"s+ c #BCEB26",
-"t+ c #B5E81E",
-"u+ c #52CE0F",
-"v+ c #4ECB0B",
-"w+ c #F9F9D9",
-"x+ c #F9F9D7",
-"y+ c #F9F8F8",
-"z+ c #F9F7E9",
-"A+ c #F9F6E9",
-"B+ c #F9F5E0",
-"C+ c #F8F2D6",
-"D+ c #F9F3CE",
-"E+ c #F9F7CA",
-"F+ c #F9F8B5",
-"G+ c #F6F691",
-"H+ c #F9F699",
-"I+ c #F5F68F",
-"J+ c #F3F579",
-"K+ c #E8F575",
-"L+ c #C7E646",
-"M+ c #B5DF37",
-"N+ c #B9E438",
-"O+ c #9CD928",
-"P+ c #D7F348",
-"Q+ c #DBEF3B",
-"R+ c #D1EF35",
-"S+ c #D7F230",
-"T+ c #C1EA25",
-"U+ c #B5E91F",
-"V+ c #63DC1E",
-"W+ c #48CA0C",
-"X+ c #F4F4DC",
-"Y+ c #F9F9C3",
-"Z+ c #F9F9C5",
-"`+ c #F9F9C7",
-" @ c #F9F9E8",
-".@ c #F9F6DD",
-"+@ c #F9F6D6",
-"@@ c #F9F3C1",
-"#@ c #F9F3BF",
-"$@ c #F9F5B8",
-"%@ c #F8F8A6",
-"&@ c #F6F68F",
-"*@ c #F4F791",
-"=@ c #ABD746",
-"-@ c #C5E449",
-";@ c #C1E448",
-">@ c #BBE23E",
-",@ c #BBE237",
-"'@ c #A9DC30",
-")@ c #99D927",
-"!@ c #D3E32C",
-"~@ c #E2F340",
-"{@ c #D3ED2D",
-"]@ c #CAED2B",
-"^@ c #CDF028",
-"/@ c #C5EB27",
-"(@ c #B0E51C",
-"_@ c #91DC13",
-":@ c #49CA08",
-"<@ c #25B305",
-"[@ c #F5F6BE",
-"}@ c #F5F5A9",
-"|@ c #F3F4B0",
-"1@ c #F6F6B0",
-"2@ c #F7F8B5",
-"3@ c #EDF097",
-"4@ c #F5F18F",
-"5@ c #F9F7B8",
-"6@ c #F9F4B0",
-"7@ c #F9F3AE",
-"8@ c #F9F3A4",
-"9@ c #F9F7A4",
-"0@ c #F7F7A0",
-"a@ c #F5F682",
-"b@ c #D3E75E",
-"c@ c #CAE646",
-"d@ c #CBE846",
-"e@ c #EDF05A",
-"f@ c #C6E432",
-"g@ c #A9E02E",
-"h@ c #99DA27",
-"i@ c #B9DB20",
-"j@ c #E1F33F",
-"k@ c #CEEB2E",
-"l@ c #C7EB27",
-"m@ c #BBEA26",
-"n@ c #B9E722",
-"o@ c #A6DF19",
-"p@ c #ABE815",
-"q@ c #48CB09",
-"r@ c #3ECA08",
-"s@ c #F8F7A7",
-"t@ c #F3F4A0",
-"u@ c #F4F59C",
-"v@ c #F0F49C",
-"w@ c #F2F5A4",
-"x@ c #F5F6A0",
-"y@ c #EFF28F",
-"z@ c #F9F8CD",
-"A@ c #F9F6A7",
-"B@ c #F9F3A0",
-"C@ c #F8F399",
-"D@ c #F8F493",
-"E@ c #F8F693",
-"F@ c #F7F58B",
-"G@ c #E8EF65",
-"H@ c #C7E445",
-"I@ c #C7DB30",
-"J@ c #E1ED48",
-"K@ c #E8F353",
-"L@ c #C3E227",
-"M@ c #D9EB2E",
-"N@ c #E7F549",
-"O@ c #D3EE3B",
-"P@ c #CBED2D",
-"Q@ c #CDEF27",
-"R@ c #BFEC23",
-"S@ c #B6E81E",
-"T@ c #A9E518",
-"U@ c #B1EB1B",
-"V@ c #35BE06",
-"W@ c #38C306",
-"X@ c #F9F9A7",
-"Y@ c #F2F38F",
-"Z@ c #F2F495",
-"`@ c #F3F38D",
-" # c #F9F9E9",
-".# c #F7F8C5",
-"+# c #F8F7D1",
-"@# c #F8F6A2",
-"## c #F9F7A9",
-"$# c #F8F59C",
-"%# c #F8F291",
-"&# c #F8F58F",
-"*# c #F6F789",
-"=# c #F2F477",
-"-# c #F0F571",
-";# c #EAEE52",
-"># c #DCEA45",
-",# c #EBEF43",
-"'# c #E4F04D",
-")# c #DEEF45",
-"!# c #E1F246",
-"~# c #E4F448",
-"{# c #DBF039",
-"]# c #D9F235",
-"^# c #C9ED2B",
-"/# c #CAEF2C",
-"(# c #CEF22B",
-"_# c #B6E91E",
-":# c #B1EB21",
-"<# c #A9E815",
-"[# c #48CF09",
-"}# c #40CD06",
-"|# c #EDEF6B",
-"1# c #EBF07C",
-"2# c #E7EB71",
-"3# c #E8E865",
-"4# c #F8F79E",
-"5# c #F8F7A4",
-"6# c #F9F69E",
-"7# c #F8F48F",
-"8# c #F6F280",
-"9# c #F6F482",
-"0# c #F3F473",
-"a# c #EFF169",
-"b# c #EDF467",
-"c# c #EAF35C",
-"d# c #EAF258",
-"e# c #E4F052",
-"f# c #E4F046",
-"g# c #E0F03F",
-"h# c #D5EE3B",
-"i# c #DFF23E",
-"j# c #D7F137",
-"k# c #CEED2E",
-"l# c #C9EF28",
-"m# c #CAF025",
-"n# c #B9EA1E",
-"o# c #B3E91D",
-"p# c #B1EB1A",
-"q# c #A6E817",
-"r# c #39C506",
-"s# c #35C505",
-"t# c #B3BC3E",
-"u# c #E9F07C",
-"v# c #DEE867",
-"w# c #F9F79E",
-"x# c #F8F793",
-"y# c #F8F78F",
-"z# c #F7F684",
-"A# c #F5F27E",
-"B# c #F4F26D",
-"C# c #F4F36F",
-"D# c #EDF061",
-"E# c #EEF363",
-"F# c #EDF35C",
-"G# c #EEF45C",
-"H# c #EAF357",
-"I# c #E8F34B",
-"J# c #DCEE43",
-"K# c #E1F03F",
-"L# c #D6ED37",
-"M# c #D5EE33",
-"N# c #D5F134",
-"O# c #D9F232",
-"P# c #CEF22D",
-"Q# c #C7F22A",
-"R# c #9BDB18",
-"S# c #A7E518",
-"T# c #AEEB1B",
-"U# c #95E514",
-"V# c #37C306",
-"W# c #3CC705",
-"X# c #E0EC60",
-"Y# c #D1E455",
-"Z# c #F7F78F",
-"`# c #F7F891",
-" $ c #F8F78B",
-".$ c #F5F782",
-"+$ c #F8F791",
-"@$ c #EFF06B",
-"#$ c #F3F36D",
-"$$ c #EFF36D",
-"%$ c #F1F56F",
-"&$ c #EDF260",
-"*$ c #EDF461",
-"=$ c #E7F150",
-"-$ c #E9F355",
-";$ c #E8F349",
-">$ c #E8F442",
-",$ c #DDF13E",
-"'$ c #DAF038",
-")$ c #CEEB26",
-"!$ c #D0EE2C",
-"~$ c #B9E82A",
-"{$ c #C1ED26",
-"]$ c #A0E41C",
-"^$ c #ABE71B",
-"/$ c #99E315",
-"($ c #99E415",
-"_$ c #33B306",
-":$ c #2BBB05",
-"<$ c #D9EB5E",
-"[$ c #CDE44E",
-"}$ c #F6F579",
-"|$ c #F4F577",
-"1$ c #F3F571",
-"2$ c #F4F57C",
-"3$ c #F3F363",
-"4$ c #F2F475",
-"5$ c #F0F567",
-"6$ c #A2D93F",
-"7$ c #C3E43F",
-"8$ c #B6D92E",
-"9$ c #A7CD1F",
-"0$ c #E4F042",
-"a$ c #E4F248",
-"b$ c #E5F348",
-"c$ c #D7EC39",
-"d$ c #DBF33C",
-"e$ c #DDF23E",
-"f$ c #D1EF2D",
-"g$ c #C1E825",
-"h$ c #BFEB26",
-"i$ c #AEE61B",
-"j$ c #A7E318",
-"k$ c #B0E818",
-"l$ c #9EE615",
-"m$ c #6DD30D",
-"n$ c #27A603",
-"o$ c #2CBE05",
-"p$ c #E2ED50",
-"q$ c #CBE348",
-"r$ c #F6F780",
-"s$ c #F5F577",
-"t$ c #F3F56F",
-"u$ c #EFF469",
-"v$ c #F3F471",
-"w$ c #F3F46F",
-"x$ c #EFF461",
-"y$ c #E7F053",
-"z$ c #C6E83F",
-"A$ c #A4D733",
-"B$ c #ABDD2F",
-"C$ c #B0DF2E",
-"D$ c #A7DD2B",
-"E$ c #E4F240",
-"F$ c #E8F555",
-"G$ c #DDF33C",
-"H$ c #E1F53E",
-"I$ c #D4F032",
-"J$ c #CEF02E",
-"K$ c #CAEF2D",
-"L$ c #C2EF28",
-"M$ c #B5E91B",
-"N$ c #93DD13",
-"O$ c #93E215",
-"P$ c #93E213",
-"Q$ c #80DB0D",
-"R$ c #45CA05",
-"S$ c #2FC204",
-"T$ c #CEE743",
-"U$ c #C1E23E",
-"V$ c #F0F365",
-"W$ c #F5F473",
-"X$ c #F2F269",
-"Y$ c #E9EF57",
-"Z$ c #EFF363",
-"`$ c #E8F052",
-" % c #EBF358",
-".% c #B8E439",
-"+% c #BCE839",
-"@% c #A4DC2A",
-"#% c #ABE22D",
-"$% c #95D822",
-"%% c #E1F240",
-"&% c #D6ED32",
-"*% c #CFEC2C",
-"=% c #D4F02F",
-"-% c #CAEE2B",
-";% c #C3EB27",
-">% c #C6EE25",
-",% c #C3EE21",
-"'% c #B8ED21",
-")% c #AEEA16",
-"!% c #79D90F",
-"~% c #2EB106",
-"{% c #26B808",
-"]% c #2CBF05",
-"^% c #C9E73B",
-"/% c #C5E63C",
-"(% c #F0F56B",
-"_% c #EEF258",
-":% c #F0F265",
-"<% c #EFF155",
-"[% c #EDF358",
-"}% c #EBF550",
-"|% c #EBF54D",
-"1% c #C9E83B",
-"2% c #A4DB28",
-"3% c #9EDC2B",
-"4% c #8FD622",
-"5% c #82D01E",
-"6% c #7EC512",
-"7% c #C9E827",
-"8% c #D0EE2E",
-"9% c #C7ED2C",
-"0% c #C7EE27",
-"a% c #C1EE2A",
-"b% c #C2EF24",
-"c% c #BEED22",
-"d% c #A9E718",
-"e% c #3EC307",
-"f% c #39C306",
-"g% c #38C606",
-"h% c #23B603",
-"i% c #ACDB2F",
-"j% c #B0DF34",
-"k% c #EDF35A",
-"l% c #EDF553",
-"m% c #E2F045",
-"n% c #E6F350",
-"o% c #E6F448",
-"p% c #9CD01E",
-"q% c #8BC916",
-"r% c #B8DC1B",
-"s% c #7CBC0F",
-"t% c #95D618",
-"u% c #7ED319",
-"v% c #BFE118",
-"w% c #C6ED2A",
-"x% c #C1EA21",
-"y% c #C1ED22",
-"z% c #B8EA1D",
-"A% c #B6EB1D",
-"B% c #BCEF1F",
-"C% c #53CA07",
-"D% c #3FC708",
-"E% c #2EBC05",
-"F% c #2FBE04",
-"G% c #2DBF04",
-"H% c #A2CF1F",
-"I% c #B1E12F",
-"J% c #B5E32E",
-"K% c #E8F243",
-"L% c #D7EB45",
-"M% c #E8F245",
-"N% c #DDEF40",
-"O% c #E2F342",
-"P% c #DFF33E",
-"Q% c #E4F542",
-"R% c #DAF138",
-"S% c #D8F230",
-"T% c #CBEB28",
-"U% c #D1F02E",
-"V% c #C6EC24",
-"W% c #CAEF25",
-"X% c #BCEB21",
-"Y% c #B6EB1E",
-"Z% c #ABE91B",
-"`% c #A2E616",
-" & c #3CC508",
-".& c #3EC906",
-"+& c #37C305",
-"@& c #27B903",
-"#& c #209B02",
-"$& c #A9DF27",
-"%& c #A4DD27",
-"&& c #91D623",
-"*& c #E3F13C",
-"=& c #E4F340",
-"-& c #E4F33F",
-";& c #E4F43E",
-">& c #E2F439",
-",& c #D6F033",
-"'& c #D5F034",
-")& c #CEEF2E",
-"!& c #CBED26",
-"~& c #CFEF27",
-"{& c #D5F22E",
-"]& c #B5E620",
-"^& c #B9EA1F",
-"/& c #84E620",
-"(& c #3EB508",
-"_& c #58CE0D",
-":& c #39CA11",
-"<& c #3EC607",
-"[& c #3BCA08",
-"}& c #28BB04",
-"|& c #28BC03",
-"1& c #8FD620",
-"2& c #97D823",
-"3& c #A6E22B",
-"4& c #69CB1D",
-"5& c #86D61F",
-"6& c #E5F740",
-"7& c #DCF338",
-"8& c #CAEC2D",
-"9& c #CDED2B",
-"0& c #D1F02C",
-"a& c #CDEE27",
-"b& c #C1EB22",
-"c& c #CFF228",
-"d& c #BCE922",
-"e& c #3CBB09",
-"f& c #50CD0C",
-"g& c #4BCD0B",
-"h& c #3CC207",
-"i& c #42CD09",
-"j& c #2EBB04",
-"k& c #28B905",
-"l& c #28B903",
-"m& c #61B113",
-"n& c #7ED41A",
-"o& c #89D71B",
-"p& c #8DDB1A",
-"q& c #7CD518",
-"r& c #8FDA1B",
-"s& c #71D314",
-"t& c #7CDA18",
-"u& c #BEF232",
-"v& c #8BD715",
-"w& c #63C207",
-"x& c #55C108",
-"y& c #5AD111",
-"z& c #4BC90B",
-"A& c #3EC108",
-"B& c #46C908",
-"C& c #40CB08",
-"D& c #34C205",
-"E& c #32C505",
-"F& c #22A003",
-"G& c #79D818",
-"H& c #75D314",
-"I& c #67D012",
-"J& c #69D313",
-"K& c #71D613",
-"L& c #67D413",
-"M& c #4BC20C",
-"N& c #4DCB0E",
-"O& c #5AD510",
-"P& c #50CA0B",
-"Q& c #4BC909",
-"R& c #3CC708",
-"S& c #42C906",
-"T& c #35C206",
-"U& c #33C306",
-"V& c #30C504",
-"W& c #49C30E",
-"X& c #71D913",
-"Y& c #84E318",
-"Z& c #5ECF0E",
-"`& c #58D00D",
-" * c #5ED40D",
-".* c #48C70A",
-"+* c #57D40B",
-"@* c #37BE06",
-"#* c #39C707",
-"$* c #37C505",
-"%* c #34C705",
-"&* c #49BE0B",
-"** c #4BD00C",
-"=* c #46C609",
-"-* c #46D00A",
-";* c #33BE06",
-">* c #20A904",
-" . + @ # $ % ",
-" & * = - ; > , ' ) ! ~ { ",
-" ] ^ / ( _ : < [ } | 1 2 3 4 5 6 ",
-" 7 8 9 0 a b c d e f g h i j k l m n o p ",
-" q r s t u v w x y z A B C D E F G H I J K L ",
-" M M N O P u Q R S T U V W X Y Z ` ...+.@.#.$.%. ",
-" &.O *.O =.-.;.>.R ,.'.).!.~.{.].^./.(._.:.<.[.}.|.1. ",
-" O O O 2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n. ",
-" o.O *.p.p.3.-.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K. ",
-" O o.q L.p.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+ ",
-" *+=+-+;+>+p.,+'+)+!+~+8.{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+ ",
-" r N N 8+p.9+0+a+b+c+d+e+d f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+ ",
-" w+x+w+y+z+A+B+C+D+E+S F+G+H+I+J+K+L+M+N+O+P+Q+R+S+$+T+U+V+W+ ",
-"X+Y+Z+`+ @.@+@6.@@#@$@^ %@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@",
-"[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@) c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@",
-"s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@>@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@",
-"X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#",
-"|#1#2#3#4###5#'.6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#",
-"t#u#v#w#s@x#y#z#a@A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#",
-" X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$I#;$>$,$'$)$!$~${$]$^$/$($_$:$ ",
-" <$[$}$|$*#1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$ ",
-" p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$S$ ",
-" T$U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]% ",
-" ^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%($e%f%g%h% ",
-" i%j%k%l%a$m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%G% ",
-" H%I%J%K%L%M%N%O%P%Q%G$R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#& ",
-" $&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|& ",
-" 1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&l& ",
-" m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F& ",
-" G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V& ",
-" W&X&Y&Z&`& *.*+*@*#*$*%* ",
-" &***=*-*;*>* "};
diff --git a/debian/aethyra-data.install b/debian/aethyra-data.install
new file mode 100644
index 00000000..c652dff3
--- /dev/null
+++ b/debian/aethyra-data.install
@@ -0,0 +1,6 @@
+data/graphics/gui/*.png usr/share/games/aethyra/data/graphics/gui
+data/graphics/gui/*.xml usr/share/games/aethyra/data/graphics/gui
+data/graphics/images/*.png usr/share/games/aethyra/data/graphics/images
+data/graphics/images/ambient/*.png usr/share/games/aethyra/data/graphics/images/ambient
+data/graphics/tiles/*.png usr/share/games/aethyra/data/graphics/tiles
+data/help/*.txt usr/share/games/aethyra/data/help
diff --git a/debian/tmw.docs b/debian/aethyra.docs
index d622a527..d622a527 100644
--- a/debian/tmw.docs
+++ b/debian/aethyra.docs
diff --git a/debian/aethyra.install b/debian/aethyra.install
new file mode 100644
index 00000000..66ba5126
--- /dev/null
+++ b/debian/aethyra.install
@@ -0,0 +1,5 @@
+debian/aethyra.desktop usr/share/applications
+debian/aethyra.xpm usr/share/pixmaps
+data/icons/aethyra.png usr/share/icons
+docs/aethyra.6 usr/share/man/man6
+src/aethyra usr/games
diff --git a/debian/aethyra.menu b/debian/aethyra.menu
new file mode 100644
index 00000000..42035107
--- /dev/null
+++ b/debian/aethyra.menu
@@ -0,0 +1,4 @@
+?package(aethyra):needs="X11" section="Games/Adventure"\
+ title="Aethyra"\
+ description="Aethyra is a 2D MMORPG using eAthena."\
+ command="/usr/games/aethyra" icon="/usr/share/pixmaps/aethyra.xpm"
diff --git a/debian/tmw.sgml b/debian/aethyra.sgml
index 0ed18199..0ed18199 100644
--- a/debian/tmw.sgml
+++ b/debian/aethyra.sgml
diff --git a/debian/aethyra.xpm b/debian/aethyra.xpm
new file mode 100644
index 00000000..515be72e
--- /dev/null
+++ b/debian/aethyra.xpm
@@ -0,0 +1,312 @@
+/* XPM */
+static char * Aethyra_xpm[] = {
+"32 32 277 2",
+" c None",
+". c #840000",
+"+ c #7E0000",
+"@ c #4F0000",
+"# c #810000",
+"$ c #830000",
+"% c #7B0000",
+"& c #460000",
+"* c #4C0000",
+"= c #4B0000",
+"- c #750000",
+"; c #860000",
+"> c #850000",
+", c #5D0000",
+"' c #490000",
+") c #450000",
+"! c #4A0000",
+"~ c #440000",
+"{ c #6A0000",
+"] c #7A0000",
+"^ c #8B0000",
+"/ c #990000",
+"( c #960000",
+"_ c #720000",
+": c #6E0000",
+"< c #740000",
+"[ c #6B0202",
+"} c #550505",
+"| c #420404",
+"1 c #440101",
+"2 c #4D0000",
+"3 c #4E0000",
+"4 c #480000",
+"5 c #9D0000",
+"6 c #9B0000",
+"7 c #6F0000",
+"8 c #710000",
+"9 c #760000",
+"0 c #680404",
+"a c #4B0C0C",
+"b c #3C0909",
+"c c #470202",
+"d c #450101",
+"e c #500000",
+"f c #510000",
+"g c #790000",
+"h c #890000",
+"i c #920000",
+"j c #710706",
+"k c #7D381F",
+"l c #934A1A",
+"m c #7B1A09",
+"n c #6B1609",
+"o c #521E13",
+"p c #4F2517",
+"q c #5D230F",
+"r c #4D0F04",
+"s c #350A0A",
+"t c #360909",
+"u c #470303",
+"v c #930000",
+"w c #840202",
+"x c #712C1C",
+"y c #A58248",
+"z c #866621",
+"A c #835819",
+"B c #98681F",
+"C c #845C1D",
+"D c #BB964A",
+"E c #856225",
+"F c #3D1B0B",
+"G c #241818",
+"H c #251717",
+"I c #360A0A",
+"J c #430000",
+"K c #6C0000",
+"L c #800000",
+"M c #730404",
+"N c #6A431E",
+"O c #473C1C",
+"P c #534420",
+"Q c #806125",
+"R c #53290B",
+"S c #461C09",
+"T c #BB9432",
+"U c #65490F",
+"V c #1F1110",
+"W c #1A2323",
+"X c #1A2222",
+"Y c #261212",
+"Z c #440202",
+"` c #7F0000",
+" . c #870000",
+".. c #6D0505",
+"+. c #422522",
+"@. c #454434",
+"#. c #A18744",
+"$. c #8F7237",
+"%. c #A37F48",
+"&. c #AD8847",
+"*. c #C6A657",
+"=. c #644C14",
+"-. c #211615",
+";. c #1C2626",
+">. c #1B2323",
+",. c #231313",
+"'. c #420202",
+"). c #6C0404",
+"!. c #532D23",
+"~. c #A8915B",
+"{. c #967C37",
+"]. c #6E5926",
+"^. c #453512",
+"/. c #473713",
+"(. c #A4832A",
+"_. c #594310",
+":. c #241F1E",
+"<. c #232828",
+"[. c #1C2020",
+"}. c #241111",
+"|. c #430202",
+"1. c #7C5030",
+"2. c #967C3D",
+"3. c #3E3318",
+"4. c #3D3930",
+"5. c #454442",
+"6. c #524D44",
+"7. c #C09E45",
+"8. c #654F17",
+"9. c #262524",
+"0. c #252929",
+"a. c #410202",
+"b. c #6B0302",
+"c. c #A78041",
+"d. c #6A5621",
+"e. c #414543",
+"f. c #696B6B",
+"g. c #747676",
+"h. c #7B7566",
+"i. c #C9A84F",
+"j. c #665017",
+"k. c #282725",
+"l. c #252A2A",
+"m. c #1B2222",
+"n. c #3D0202",
+"o. c #750802",
+"p. c #B48E41",
+"q. c #564418",
+"r. c #4A4B4B",
+"s. c #6D6F6F",
+"t. c #797A7A",
+"u. c #867C62",
+"v. c #AE9040",
+"w. c #664F12",
+"x. c #2D2A25",
+"y. c #242828",
+"z. c #1E1E1E",
+"A. c #291010",
+"B. c #400202",
+"C. c #860B02",
+"D. c #B78C32",
+"E. c #594013",
+"F. c #433E3E",
+"G. c #606464",
+"H. c #74736C",
+"I. c #7C6D44",
+"J. c #433719",
+"K. c #413311",
+"L. c #322F1E",
+"M. c #1C2121",
+"N. c #271212",
+"O. c #3C0606",
+"P. c #8C0200",
+"Q. c #B5771D",
+"R. c #765513",
+"S. c #3F3636",
+"T. c #555B5B",
+"U. c #686969",
+"V. c #5A5957",
+"W. c #3C3832",
+"X. c #403826",
+"Y. c #2F3023",
+"Z. c #1C1F1D",
+"`. c #2E0A0A",
+" + c #460101",
+".+ c #8F0101",
+"++ c #A03F0C",
+"@+ c #AC7E19",
+"#+ c #4B3625",
+"$+ c #474747",
+"%+ c #5B5C5A",
+"&+ c #83775A",
+"*+ c #8C7539",
+"=+ c #67541F",
+"-+ c #6B551C",
+";+ c #8C6D24",
+">+ c #4E1C09",
+",+ c #4A0101",
+"'+ c #8A0606",
+")+ c #8D1203",
+"!+ c #A76713",
+"~+ c #87611B",
+"{+ c #453A32",
+"]+ c #52554E",
+"^+ c #A38A45",
+"/+ c #715818",
+"(+ c #7A6424",
+"_+ c #443212",
+":+ c #947026",
+"<+ c #7D4E11",
+"[+ c #490400",
+"}+ c #420000",
+"|+ c #7F0808",
+"1+ c #8B0101",
+"2+ c #800F01",
+"3+ c #915E11",
+"4+ c #504F40",
+"5+ c #4E4834",
+"6+ c #5A4715",
+"7+ c #5B4814",
+"8+ c #382813",
+"9+ c #917035",
+"0+ c #533209",
+"a+ c #3F0400",
+"b+ c #8E0101",
+"c+ c #8A0000",
+"d+ c #671104",
+"e+ c #663D12",
+"f+ c #786023",
+"g+ c #74612B",
+"h+ c #665320",
+"i+ c #675321",
+"j+ c #785C24",
+"k+ c #684718",
+"l+ c #380B00",
+"m+ c #400000",
+"n+ c #8C0303",
+"o+ c #8D0000",
+"p+ c #780101",
+"q+ c #510808",
+"r+ c #291A16",
+"s+ c #26291C",
+"t+ c #2D2B18",
+"u+ c #321F0E",
+"v+ c #370A02",
+"w+ c #3E0100",
+"x+ c #850202",
+"y+ c #600202",
+"z+ c #331313",
+"A+ c #1E2121",
+"B+ c #1A1E1E",
+"C+ c #270D0D",
+"D+ c #470000",
+"E+ c #7B0404",
+"F+ c #720101",
+"G+ c #4B0D0D",
+"H+ c #2D1717",
+"I+ c #261414",
+"J+ c #380808",
+"K+ c #7E0202",
+"L+ c #5D0606",
+"M+ c #3B0E0E",
+"N+ c #300C0C",
+"O+ c #430303",
+"P+ c #7A0505",
+"Q+ c #7C0000",
+"R+ c #640404",
+"S+ c #430D0D",
+"T+ c #460202",
+"U+ c #610505",
+"V+ c #440E0E",
+"W+ c #390B0B",
+"X+ c #560202",
+"Y+ c #480707",
+"Z+ c #410505",
+"`+ c #4B0101",
+" @ c #480101",
+" ",
+" ",
+" ",
+" . + @ ",
+" # $ % & * @ = ",
+" - # ; > $ , ' ) ! @ * ~ ",
+" { ] ^ / ( $ _ : < [ } | 1 ) ~ ' 2 2 3 3 4 ",
+" ] ^ 5 6 . 7 8 9 0 a b c * d 4 e f @ 3 4 ",
+" g h / i j k l m n o p q r s t u e 3 2 4 ",
+" 8 > v w x y z A B C D E F G H I = @ ' J ",
+" K L ^ M N O P Q R S T U V W X Y Z e ) ",
+" ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.e & ",
+" ` . ).!.~.{.].^./.(._.:.<.[.}.|.@ 4 ",
+" # [ 1.2.3.4.5.6.7.8.9.0.[.}.a.= ",
+" ` b.c.d.e.f.g.h.i.j.k.l.m.,.n.) ",
+" L o.p.q.r.s.t.u.v.w.x.y.z.A.B.~ ",
+" ; C.D.E.F.G.H.I.J.K.L.M.N.O.4 ",
+" P.Q.R.S.T.U.V.W.X.Y.Z.`. +2 ",
+" .+++@+#+$+%+&+*+=+-+;+>+,+= ",
+" '+)+!+~+{+]+^+/+(+_+:+<+[+}+ ",
+" |+1+2+3+z 4+5+6+7+8+9+0+a+ ",
+" b+c+d+e+f+g+h+i+j+k+l+m+ ",
+" n+o+p+q+r+s+t+u+v+w+) ) ",
+" x+` y+z+A+B+C+1 e D+ ",
+" E+# F+G+H+I+J+3 @ ~ ",
+" K+% L+M+N+O+e ' ",
+" P+Q+R+S+I T+@ ) ",
+" 9 U+V+W+u 2 ",
+" X+Y+Z+ + ",
+" * `+ @ ",
+" ",
+" "};
diff --git a/debian/control b/debian/control
index 4372aaea..0d94b4fd 100644
--- a/debian/control
+++ b/debian/control
@@ -1,37 +1,43 @@
-Source: tmw
+Source: aethyra
Section: games
Priority: optional
-Homepage: http://www.themanaworld.org/
-Maintainer: Patrick Matthäi <patrick.matthaei@web.de>
-Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.13.19), dpatch, autotools-dev, libcurl4-gnutls-dev, libgl1-mesa-dev, libguichan2-dev (>= 0.7.1), libsdl1.2-dev, libsdl-image1.2-dev, libsdl-net1.2-dev, libsdl-mixer1.2-dev, libphysfs-dev, libpng12-dev, libxml2-dev, zlib1g-dev
+Homepage: http://www.aethyra.org/
+Maintainer: Aethyra Project <www.aethyra.org>
+Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.13.19), dpatch, autotools-dev, libcurl4-gnutls-dev, libgl1-mesa-dev, libguichan-dev (>= 0.8.1-3), libsdl1.2-dev, libsdl-image1.2-dev, libsdl-net1.2-dev, libsdl-mixer1.2-dev, libphysfs-dev, libpng12-dev, libxml2-dev, zlib1g-dev
Standards-Version: 3.7.3
-Package: tmw
+Package: aethyra
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, tmw-data (= ${source:Version})
-Recommends: tmw-music
-Description: The Mana World is a great Online Rolegame
- based upon the Seiken Densetsu serie. It has its own universe, and its own
- character management system, which will give you the opportunity to play in a
- 2D heroic-fantasy world forever.
+Depends: ${shlibs:Depends}, ${misc:Depends}, aethyra-data (= ${source:Version})
+Recommends: aethyra-music
+Description: Aethyra is a community driven experiment that utilizes eAthena at its core with the end goal of
+ getting its players as involved in the process as much as possible. It's originally forked from
+ The Mana World when its developers came up with the idea of "Why should we have to wait for an
+ MMORPG game in development when we've already got a great server setup here that does everything
+ we've been promised and more?" As such, we are trying to implement as many functions of eAthena
+ as possible while creating our own in the process based on what our players want to see.
-Package: tmw-dbg
+Package: aethyra-dbg
Architecture: any
Priority: extra
-Depends: tmw (= ${binary:Version})
-Description: The Mana World is a great Online Rolegame (debugging symbols)
- based upon the Seiken Densetsu serie. It has its own universe, and its own
- character management system, which will give you the opportunity to play in a
- 2D heroic-fantasy world forever.
+Depends: aethyra (= ${binary:Version})
+Description: Aethyra is a community driven experiment that utilizes eAthena at its core with the end goal of
+ getting its players as involved in the process as much as possible. It's originally forked from
+ The Mana World when its developers came up with the idea of "Why should we have to wait for an
+ MMORPG game in development when we've already got a great server setup here that does everything
+ we've been promised and more?" As such, we are trying to implement as many functions of eAthena
+ as possible while creating our own in the process based on what our players want to see.
.
- This package provides debugging symbols for the tmw package.
+ This package provides debugging symbols for the aethyra package.
-Package: tmw-data
+Package: aethyra-data
Architecture: all
-Recommends: tmw, tmw-music
-Description: The Mana World is a great Online Rolegame (data files)
- based upon the Seiken Densetsu serie. It has its own universe, and its own
- character management system, which will give you the opportunity to play in a
- 2D heroic-fantasy world forever.
+Recommends: aethyra, aethyra-music
+Description: Aethyra is a community driven experiment that utilizes eAthena at its core with the end goal of
+ getting its players as involved in the process as much as possible. It's originally forked from
+ The Mana World when its developers came up with the idea of "Why should we have to wait for an
+ MMORPG game in development when we've already got a great server setup here that does everything
+ we've been promised and more?" As such, we are trying to implement as many functions of eAthena
+ as possible while creating our own in the process based on what our players want to see.
.
This package contains the data files.
diff --git a/debian/rules b/debian/rules
index 614ee701..6ee08a3b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -56,7 +56,7 @@ binary-arch: build install
dh_install -a
dh_desktop -a
dh_installmenu -a
- dh_strip -a --dbg-package=tmw-dbg
+ dh_strip -a --dbg-package=aethyra-dbg
dh_compress -a
dh_fixperms -a
dh_installdeb -a
diff --git a/debian/tmw-data.install b/debian/tmw-data.install
deleted file mode 100644
index c9f6cb7b..00000000
--- a/debian/tmw-data.install
+++ /dev/null
@@ -1,5 +0,0 @@
-data/graphics/gui/*.png usr/share/games/tmw/data/graphics/gui
-data/graphics/images/*.png usr/share/games/tmw/data/graphics/images
-data/graphics/images/ambient/*.png usr/share/games/tmw/data/graphics/images/ambient
-data/graphics/tiles/*.png usr/share/games/tmw/data/graphics/tiles
-data/help/*.txt usr/share/games/tmw/data/help
diff --git a/debian/tmw.desktop b/debian/tmw.desktop
deleted file mode 100644
index f094f668..00000000
--- a/debian/tmw.desktop
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=The Mana World
-Name[fr]=Le Monde de Mana
-Comment=An online fantasy role playing game
-Comment[fr]=Un jeu en ligne dans un univers fantastique
-Comment[de]=ein Online Fantasy Spiel
-Comment[it]=Un gioco fantasy online
-Comment[nl]=Een online role playing game
-Exec=tmw
-StartupNotify=false
-Terminal=false
-Type=Game
-Icon=tmw.png
-Categories=Game
diff --git a/debian/tmw.install b/debian/tmw.install
deleted file mode 100644
index 037ccf54..00000000
--- a/debian/tmw.install
+++ /dev/null
@@ -1,5 +0,0 @@
-debian/tmw.desktop usr/share/applications
-debian/tmw.xpm usr/share/pixmaps
-data/icons/tmw.png usr/share/icons
-docs/tmw.6 usr/share/man/man6
-src/tmw usr/games
diff --git a/debian/tmw.menu b/debian/tmw.menu
deleted file mode 100644
index 4af5ad0a..00000000
--- a/debian/tmw.menu
+++ /dev/null
@@ -1,4 +0,0 @@
-?package(tmw):needs="X11" section="Games/Adventure"\
- title="The Mana World"\
- description="The Mana World is an Online Fantasy adventure game."\
- command="/usr/games/tmw" icon="/usr/share/pixmaps/tmw.xpm"
diff --git a/debian/tmw.xpm b/debian/tmw.xpm
deleted file mode 100644
index 46ce5c87..00000000
--- a/debian/tmw.xpm
+++ /dev/null
@@ -1,776 +0,0 @@
-/* XPM */
-static char * tmw_xpm[] = {
-"32 32 741 2",
-" c None",
-". c #E8ED72",
-"+ c #E7ED6A",
-"@ c #E1EB62",
-"# c #D4E758",
-"$ c #D2E750",
-"% c #CDE748",
-"& c #F5F4A1",
-"* c #F3F294",
-"= c #EBEE81",
-"- c #EAEE77",
-"; c #E6ED6F",
-"> c #E1EB68",
-", c #D9E859",
-"' c #D3E851",
-") c #CCE549",
-"! c #C7E643",
-"~ c #BEE239",
-"{ c #B3DF32",
-"] c #F8F8C4",
-"^ c #F9F7B3",
-"/ c #F4F3A2",
-"( c #F4F397",
-"_ c #F5F39A",
-": c #F2F399",
-"< c #E2EA6D",
-"[ c #DFEA66",
-"} c #DAE95C",
-"| c #D3E753",
-"1 c #CAE54B",
-"2 c #C7E545",
-"3 c #BFE23C",
-"4 c #B7E034",
-"5 c #B1E130",
-"6 c #A5DC28",
-"7 c #F9F9DA",
-"8 c #F9F8CA",
-"9 c #F8F7C9",
-"0 c #F8F7CD",
-"a c #F9F7C7",
-"b c #F9F7B8",
-"c c #F7F5A8",
-"d c #E6EC73",
-"e c #E0EA68",
-"f c #DBE95D",
-"g c #D8E956",
-"h c #D2E850",
-"i c #C4E343",
-"j c #BEE23D",
-"k c #B2E036",
-"l c #A9DE2E",
-"m c #A0DC29",
-"n c #91D823",
-"o c #F9F9F5",
-"p c #F9F9EA",
-"q c #F9F9E2",
-"r c #F9F8E9",
-"s c #F9F8E1",
-"t c #F9F7D3",
-"u c #F9F7BC",
-"v c #F9F7AF",
-"w c #E8EE80",
-"x c #E2EC6F",
-"y c #DBEA61",
-"z c #D3E755",
-"A c #CAE44C",
-"B c #C6E446",
-"C c #BDE441",
-"D c #B8E337",
-"E c #AADE30",
-"F c #9DDA2A",
-"G c #91D722",
-"H c #87D61F",
-"I c #7FD61B",
-"J c #F9F9F8",
-"K c #F9F9F7",
-"L c #F9F9F0",
-"M c #F9F8EC",
-"N c #F9F7E1",
-"O c #F9F7D7",
-"P c #F9F7C9",
-"Q c #F9F7B4",
-"R c #EBF092",
-"S c #E1EB69",
-"T c #DBE95F",
-"U c #D3E654",
-"V c #CCE44A",
-"W c #C9E647",
-"X c #BDE13D",
-"Y c #B1DE35",
-"Z c #A8DD30",
-"` c #9BDA29",
-" . c #94D823",
-".. c #8CD921",
-"+. c #82D71C",
-"@. c #7CD716",
-"#. c #F9F9F9",
-"$. c #F9F8F5",
-"%. c #F9F7EE",
-"&. c #F9F7E4",
-"*. c #F9F7D5",
-"=. c #F9F7CB",
-"-. c #F9F7BF",
-";. c #F4F39E",
-">. c #E1EA76",
-",. c #E0EA69",
-"'. c #D9E85D",
-"). c #D7E859",
-"!. c #CCE64E",
-"~. c #C1E343",
-"{. c #BBE23C",
-"]. c #B0DF34",
-"^. c #A9DD2F",
-"/. c #9AD928",
-"(. c #90D822",
-"_. c #8AD81F",
-":. c #81D81B",
-"<. c #76D517",
-"[. c #F9F7F6",
-"}. c #F9F7F4",
-"|. c #F9F5D3",
-"1. c #F9F6C7",
-"2. c #F9F6B9",
-"3. c #E6EC86",
-"4. c #E6ED72",
-"5. c #E3ED6C",
-"6. c #D6E75E",
-"7. c #D1E655",
-"8. c #C7E34A",
-"9. c #C1E141",
-"0. c #B2DD39",
-"a. c #B3E135",
-"b. c #A6DE30",
-"c. c #9BDB29",
-"d. c #97DA24",
-"e. c #87D71E",
-"f. c #82D71B",
-"g. c #87DA1F",
-"h. c #63CF12",
-"i. c #F8F8F8",
-"j. c #F9F7F5",
-"k. c #F9F5E3",
-"l. c #F9F5D4",
-"m. c #F9F6B8",
-"n. c #EDF198",
-"o. c #E1EB6F",
-"p. c #E1EC68",
-"q. c #D8E95C",
-"r. c #D3E752",
-"s. c #C9E44A",
-"t. c #C7E746",
-"u. c #BEE43D",
-"v. c #B0E138",
-"w. c #A8E02D",
-"x. c #A3DF29",
-"y. c #B4E226",
-"z. c #CDEB2C",
-"A. c #B9E925",
-"B. c #6DD213",
-"C. c #56C90F",
-"D. c #F9F8F4",
-"E. c #F9F7EB",
-"F. c #F9F7F2",
-"G. c #F9F5EA",
-"H. c #F9F3DE",
-"I. c #F9F4CF",
-"J. c #F9F5C5",
-"K. c #F9F5B8",
-"L. c #F8F7B2",
-"M. c #F1F495",
-"N. c #E3EC6B",
-"O. c #D8E859",
-"P. c #CEE650",
-"Q. c #C8E449",
-"R. c #C2E441",
-"S. c #BAE139",
-"T. c #E7F24F",
-"U. c #E3F347",
-"V. c #DCF13E",
-"W. c #D9F137",
-"X. c #CDEE30",
-"Y. c #C3EB27",
-"Z. c #85D919",
-"`. c #4FC90E",
-" + c #F7F7F2",
-".+ c #F9F9F2",
-"++ c #F9F8ED",
-"@+ c #F9F5EE",
-"#+ c #F9F4E4",
-"$+ c #F9F5DC",
-"%+ c #F9F6D1",
-"&+ c #F9F6C2",
-"*+ c #F9F6B7",
-"=+ c #F9F6A6",
-"-+ c #F8F599",
-";+ c #F7F591",
-">+ c #F4F584",
-",+ c #D7EB61",
-"'+ c #C5E447",
-")+ c #BAE13E",
-"!+ c #B8E23A",
-"~+ c #B8E132",
-"{+ c #E6F349",
-"]+ c #E1F343",
-"^+ c #DAF13B",
-"/+ c #D2EF33",
-"(+ c #CBEE2E",
-"_+ c #C1EA25",
-":+ c #A9E61F",
-"<+ c #55CE10",
-"[+ c #4FC60D",
-"}+ c #F8F8E9",
-"|+ c #F9F9E8",
-"1+ c #F9F9E7",
-"2+ c #F9F8E4",
-"3+ c #F9F7F0",
-"4+ c #F9F6EF",
-"5+ c #F9F5E7",
-"6+ c #F9F3DB",
-"7+ c #F9F5D6",
-"8+ c #F9F7CE",
-"9+ c #F9F7BE",
-"0+ c #F9F7B7",
-"a+ c #F9F7A5",
-"b+ c #F7F691",
-"c+ c #F6F588",
-"d+ c #F5F580",
-"e+ c #DBEE6B",
-"f+ c #BAE13D",
-"g+ c #B5E137",
-"h+ c #A5DB2E",
-"i+ c #E0F041",
-"j+ c #DBF140",
-"k+ c #DAF138",
-"l+ c #D1EE32",
-"m+ c #C6EB2B",
-"n+ c #C0EC27",
-"o+ c #BAEB22",
-"p+ c #65D517",
-"q+ c #4FCC0B",
-"r+ c #F9F9D7",
-"s+ c #F9F9D6",
-"t+ c #F9F8EA",
-"u+ c #F9F7E8",
-"v+ c #F9F5E5",
-"w+ c #F9F5DD",
-"x+ c #F9F2D2",
-"y+ c #F9F3CA",
-"z+ c #F9F6C3",
-"A+ c #F9F7BA",
-"B+ c #F9F8B2",
-"C+ c #F8F89E",
-"D+ c #F8F58E",
-"E+ c #F5F583",
-"F+ c #EFF479",
-"G+ c #C5E557",
-"H+ c #C5E543",
-"I+ c #B9E13B",
-"J+ c #9FDA2A",
-"K+ c #CEEC3B",
-"L+ c #D9EF38",
-"M+ c #D4EE32",
-"N+ c #D1EF30",
-"O+ c #C8ED2A",
-"P+ c #C2EB26",
-"Q+ c #B5E81E",
-"R+ c #80DC1C",
-"S+ c #46C80B",
-"T+ c #F0F1C0",
-"U+ c #F9F8C7",
-"V+ c #F9F9C6",
-"W+ c #F9F8D5",
-"X+ c #F9F7DF",
-"Y+ c #F9F6D6",
-"Z+ c #F9F5D0",
-"`+ c #F9F3C4",
-" @ c #F9F3BC",
-".@ c #F9F5B5",
-"+@ c #F9F7B0",
-"@@ c #F9F8A4",
-"#@ c #F7F796",
-"$@ c #EFF386",
-"%@ c #D3E865",
-"&@ c #C7E450",
-"*@ c #C0E242",
-"=@ c #BEE33F",
-"-@ c #B5E036",
-";@ c #A7DB2F",
-">@ c #A0DC2B",
-",@ c #C4E32F",
-"'@ c #DCF139",
-")@ c #D2ED2E",
-"!@ c #CAEC2A",
-"~@ c #CBEF2B",
-"{@ c #BEEA22",
-"]@ c #B2E81E",
-"^@ c #8FDD17",
-"/@ c #3DC209",
-"(@ c #33BC07",
-"_@ c #F5F5B4",
-":@ c #F6F6AE",
-"<@ c #F6F6B1",
-"[@ c #F7F7B3",
-"}@ c #F2F3AB",
-"|@ c #F3F198",
-"1@ c #F8F5BA",
-"2@ c #F9F4B6",
-"3@ c #F9F3AF",
-"4@ c #F9F4A4",
-"5@ c #F8F7A2",
-"6@ c #F7F799",
-"7@ c #F6F68A",
-"8@ c #DDEC69",
-"9@ c #CEE74F",
-"0@ c #C0E03C",
-"a@ c #D5EA4C",
-"b@ c #BEE23A",
-"c@ c #A9DF2F",
-"d@ c #9EDD2A",
-"e@ c #BEE22A",
-"f@ c #DCF23A",
-"g@ c #D4F033",
-"h@ c #CBED2A",
-"i@ c #C5ED29",
-"j@ c #BDEB22",
-"k@ c #B4E81E",
-"l@ c #A5E618",
-"m@ c #41C209",
-"n@ c #3ABF07",
-"o@ c #DCDC8A",
-"p@ c #F3F49B",
-"q@ c #F3F49D",
-"r@ c #F2F49D",
-"s@ c #F4F59F",
-"t@ c #F4F59D",
-"u@ c #F1F498",
-"v@ c #F8F7BF",
-"w@ c #F9F6AF",
-"x@ c #F8F39A",
-"y@ c #F8F594",
-"z@ c #F5F57D",
-"A@ c #DDEC66",
-"B@ c #C2E144",
-"C@ c #BDE13F",
-"D@ c #BFD82E",
-"E@ c #E6EF4E",
-"F@ c #E1F04A",
-"G@ c #C2E433",
-"H@ c #CDEA34",
-"I@ c #DDF03F",
-"J@ c #D4EF36",
-"K@ c #CFEF30",
-"L@ c #CBEE2A",
-"M@ c #C2EC26",
-"N@ c #B7E91F",
-"O@ c #ADE71C",
-"P@ c #A0E517",
-"Q@ c #3FC008",
-"R@ c #33BD06",
-"S@ c #DDD97B",
-"T@ c #F2F392",
-"U@ c #F0F28F",
-"V@ c #F1F38C",
-"W@ c #F6F7BE",
-"X@ c #F5F6B7",
-"Y@ c #F5F5B2",
-"Z@ c #F9F6A7",
-"`@ c #F9F6A3",
-" # c #F8F59C",
-".# c #F8F38D",
-"+# c #F7F58C",
-"@# c #F5F687",
-"## c #F3F576",
-"$# c #F0F575",
-"%# c #DDEC57",
-"&# c #D8EA49",
-"*# c #DDE946",
-"=# c #E8F14F",
-"-# c #E3F148",
-";# c #E2F346",
-"># c #E1F345",
-",# c #D8F039",
-"'# c #D1EF31",
-")# c #CAED2C",
-"!# c #C4EC27",
-"~# c #C1ED24",
-"{# c #B6EA1F",
-"]# c #AFEA1C",
-"^# c #A4E717",
-"/# c #3EBF08",
-"(# c #37C206",
-"_# c #E8EB6C",
-":# c #E6ED76",
-"<# c #E4EC73",
-"[# c #ECEF86",
-"}# c #F8F7A7",
-"|# c #F9F7A7",
-"1# c #F8F7A3",
-"2# c #F8F69D",
-"3# c #F8F69A",
-"4# c #F7F48A",
-"5# c #F6F27B",
-"6# c #F6F482",
-"7# c #F3F57B",
-"8# c #F1F574",
-"9# c #F0F46C",
-"0# c #EBF25E",
-"a# c #EBF259",
-"b# c #E7F152",
-"c# c #E1EF44",
-"d# c #DFEF40",
-"e# c #D7EE3B",
-"f# c #DAF039",
-"g# c #D7F137",
-"h# c #D1F032",
-"i# c #CCEF2C",
-"j# c #C6EE26",
-"k# c #B7EA1F",
-"l# c #AAE81A",
-"m# c #97E415",
-"n# c #37BE07",
-"o# c #2CAF05",
-"p# c #D5DC5B",
-"q# c #E4ED6F",
-"r# c #E9F082",
-"s# c #F8F7A1",
-"t# c #F8F79D",
-"u# c #F7F696",
-"v# c #F6F68B",
-"w# c #F5F37B",
-"x# c #F5F378",
-"y# c #F3F372",
-"z# c #F1F36C",
-"A# c #EEF468",
-"B# c #ECF35D",
-"C# c #EAF256",
-"D# c #E7F151",
-"E# c #E4F148",
-"F# c #E0F043",
-"G# c #E1F143",
-"H# c #D9EF39",
-"I# c #D2ED31",
-"J# c #CEF030",
-"K# c #C9EF2A",
-"L# c #C0ED25",
-"M# c #ADE61C",
-"N# c #A7E619",
-"O# c #A5E818",
-"P# c #80D913",
-"Q# c #34BE06",
-"R# c #35BF05",
-"S# c #E0EC61",
-"T# c #E4ED72",
-"U# c #F7F792",
-"V# c #F7F791",
-"W# c #F8F78F",
-"X# c #F6F687",
-"Y# c #F6F688",
-"Z# c #F3F377",
-"`# c #F4F474",
-" $ c #F1F472",
-".$ c #EEF46D",
-"+$ c #DEEB59",
-"@$ c #E7F059",
-"#$ c #E9F356",
-"$$ c #E9F255",
-"%$ c #E7F24D",
-"&$ c #E6F245",
-"*$ c #E4F243",
-"=$ c #DFF240",
-"-$ c #D7EF36",
-";$ c #CCEB2B",
-">$ c #CDEE2C",
-",$ c #C5ED2A",
-"'$ c #BDEB25",
-")$ c #ADE71E",
-"!$ c #A6E51A",
-"~$ c #9AE316",
-"{$ c #93E214",
-"]$ c #5CC30B",
-"^$ c #34BD05",
-"/$ c #DDEC59",
-"($ c #D6E858",
-"_$ c #F5F57C",
-":$ c #F5F680",
-"<$ c #F5F67E",
-"[$ c #F5F67C",
-"}$ c #F4F574",
-"|$ c #F1F26A",
-"1$ c #F2F46F",
-"2$ c #EFF468",
-"3$ c #BCE24A",
-"4$ c #BBDF38",
-"5$ c #B9DB30",
-"6$ c #C3DF33",
-"7$ c #DDED42",
-"8$ c #E5F249",
-"9$ c #DEF03D",
-"0$ c #D5EF35",
-"a$ c #CEEE2E",
-"b$ c #C1E925",
-"c$ c #B9E923",
-"d$ c #B1E71E",
-"e$ c #ABE619",
-"f$ c #A8E517",
-"g$ c #94E113",
-"h$ c #83DE11",
-"i$ c #35AD06",
-"j$ c #2FBB04",
-"k$ c #CEE249",
-"l$ c #CFE54B",
-"m$ c #E8F16F",
-"n$ c #F5F578",
-"o$ c #F4F674",
-"p$ c #F1F46D",
-"q$ c #F2F268",
-"r$ c #F1F366",
-"s$ c #EFF462",
-"t$ c #DEEF5B",
-"u$ c #B3E039",
-"v$ c #B4E037",
-"w$ c #AEDE31",
-"x$ c #A6DB2B",
-"y$ c #BBE331",
-"z$ c #E3F243",
-"A$ c #DFF141",
-"B$ c #D9F038",
-"C$ c #D9F136",
-"D$ c #CDEF2E",
-"E$ c #C7EE2A",
-"F$ c #BDEB24",
-"G$ c #B7EA1D",
-"H$ c #A0E316",
-"I$ c #96E214",
-"J$ c #93E212",
-"K$ c #6DD10D",
-"L$ c #2CAD04",
-"M$ c #2AB303",
-"N$ c #CDE746",
-"O$ c #CDE74B",
-"P$ c #F0F56D",
-"Q$ c #F2F46A",
-"R$ c #F0F264",
-"S$ c #ECF15A",
-"T$ c #EFF361",
-"U$ c #EDF45A",
-"V$ c #EBF45C",
-"W$ c #B9E239",
-"X$ c #B6E335",
-"Y$ c #ADE02E",
-"Z$ c #A9E02B",
-"`$ c #A4DE28",
-" % c #DFF243",
-".% c #D7EF35",
-"+% c #D5EF31",
-"@% c #D4F031",
-"#% c #CDEF2C",
-"$% c #C7ED28",
-"%% c #C6EE27",
-"&% c #C1EE23",
-"*% c #B6EC1F",
-"=% c #A7E818",
-"-% c #67CC0E",
-";% c #47C208",
-">% c #34B906",
-",% c #2DBD04",
-"'% c #C1E23C",
-")% c #C3E53E",
-"!% c #D7EB4F",
-"~% c #EEF257",
-"{% c #ECF057",
-"]% c #EAF051",
-"^% c #EBF255",
-"/% c #EBF452",
-"(% c #E9F450",
-"_% c #B8E137",
-":% c #A3DB2A",
-"<% c #A5DF2B",
-"[% c #98DA26",
-"}% c #8CD621",
-"|% c #90D41D",
-"1% c #BFE326",
-"2% c #D0EE2D",
-"3% c #CEEF2E",
-"4% c #C8EE28",
-"5% c #C1ED26",
-"6% c #BCEC22",
-"7% c #B9ED20",
-"8% c #9FE419",
-"9% c #70CD0F",
-"0% c #35B906",
-"a% c #34C005",
-"b% c #30C005",
-"c% c #26B503",
-"d% c #B7E036",
-"e% c #B7E239",
-"f% c #E2EF4B",
-"g% c #EBF451",
-"h% c #E5F14B",
-"i% c #E4F04B",
-"j% c #E7F451",
-"k% c #E6F44B",
-"l% c #B6DD2C",
-"m% c #ABDC25",
-"n% c #B4DF23",
-"o% c #A3D61D",
-"p% c #96D91D",
-"q% c #86D218",
-"r% c #B3DE21",
-"s% c #CAED2B",
-"t% c #C6EC25",
-"u% c #BEEB22",
-"v% c #BDEC20",
-"w% c #B3EA1D",
-"x% c #9AE017",
-"y% c #46BC07",
-"z% c #40C107",
-"A% c #35C206",
-"B% c #2EBE05",
-"C% c #2BBD04",
-"D% c #B2E130",
-"E% c #B5E334",
-"F% c #DFF042",
-"G% c #E4F147",
-"H% c #E5F348",
-"I% c #E2F246",
-"J% c #E4F445",
-"K% c #DFF33F",
-"L% c #E0F33D",
-"M% c #DCF238",
-"N% c #D8F034",
-"O% c #D2EF2E",
-"P% c #CBEB29",
-"Q% c #D1EF2D",
-"R% c #C7ED26",
-"S% c #C5EE26",
-"T% c #B7EA20",
-"U% c #B5EA1D",
-"V% c #AEEA1B",
-"W% c #85D813",
-"X% c #3FC208",
-"Y% c #3AC507",
-"Z% c #33C005",
-"`% c #2BBB04",
-" & c #26A903",
-".& c #A9E029",
-"+& c #A5DF29",
-"@& c #A5DE29",
-"#& c #D8EE3D",
-"$& c #E4F341",
-"%& c #E2F340",
-"&& c #E0F33C",
-"*& c #DDF239",
-"=& c #D9F236",
-"-& c #D6F133",
-";& c #D3F131",
-">& c #CEEE2A",
-",& c #CEEF28",
-"'& c #CBEF29",
-")& c #BFEB22",
-"!& c #B2EB23",
-"~& c #81DD1D",
-"{& c #6DCF11",
-"]& c #68D10F",
-"^& c #4CCB0E",
-"/& c #39C407",
-"(& c #33C106",
-"_& c #2ABB04",
-":& c #27B803",
-"<& c #97DA23",
-"[& c #98DC24",
-"}& c #95DC23",
-"|& c #93DB25",
-"1& c #99DF2A",
-"2& c #C6EC31",
-"3& c #C6EB2E",
-"4& c #ADE026",
-"5& c #C1E928",
-"6& c #CCEE29",
-"7& c #C9ED26",
-"8& c #B9EA21",
-"9& c #8FD718",
-"0& c #4FC30C",
-"a& c #4DCB0B",
-"b& c #49CB0A",
-"c& c #3DC508",
-"d& c #3DC808",
-"e& c #34C306",
-"f& c #2DBC04",
-"g& c #2CBF04",
-"h& c #88D81D",
-"i& c #87D81A",
-"j& c #86D81A",
-"k& c #7ED518",
-"l& c #75D015",
-"m& c #71D113",
-"n& c #84DB1A",
-"o& c #9DE524",
-"p& c #7CD316",
-"q& c #62CA0E",
-"r& c #5AC80B",
-"s& c #55C90B",
-"t& c #46CA0A",
-"u& c #41C708",
-"v& c #3DC907",
-"w& c #36C406",
-"x& c #30C205",
-"y& c #27AA04",
-"z& c #75D016",
-"A& c #79D516",
-"B& c #73D515",
-"C& c #6AD113",
-"D& c #6CD413",
-"E& c #65D211",
-"F& c #5BCD0F",
-"G& c #56CD0E",
-"H& c #58D10E",
-"I& c #50CC0C",
-"J& c #48C809",
-"K& c #40C708",
-"L& c #3FC607",
-"M& c #40C907",
-"N& c #38C706",
-"O& c #32C105",
-"P& c #57BE0F",
-"Q& c #61D111",
-"R& c #66D411",
-"S& c #62D20F",
-"T& c #57CD0D",
-"U& c #57D00C",
-"V& c #4DCC0C",
-"W& c #4BCD0A",
-"X& c #40C608",
-"Y& c #3DC807",
-"Z& c #30B505",
-"`& c #4BBC0B",
-" * c #4CC20A",
-".* c #48BF0A",
-"+* c #45C109",
-"@* c #38B507",
-"#* c #31B506",
-" . + @ # $ % ",
-" & * = - ; > , ' ) ! ~ { ",
-" ] ^ / ( _ : < [ } | 1 2 3 4 5 6 ",
-" 7 8 9 0 a b c d e f g h i j k l m n ",
-" o p q r s t a u v w x y z A B C D E F G H I ",
-" J K L o M N O P u Q R S T U V W X Y Z ` ...+.@. ",
-" #.K J $.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<. ",
-" #.#.J [.}.%.&.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h. ",
-" i.#.K [.j.}.%.k.l.1.m.n.o.p.q.r.s.t.u.v.E w.x.y.z.A.B.C. ",
-" #.K D.E.}.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.D T.U.V.W.X.Y.Z.`. ",
-" +.+.+++&.F.@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+ ",
-" }+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+9.f+g+h+i+j+k+l+m+n+o+p+q+ ",
-" r+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+].J+K+L+M+N+O+P+Q+R+S+ ",
-"T+U+V+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@",
-"_@:@<@[@[@}@|@1@2@3@4@5@6@7@8@9@W 0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@",
-"o@p@q@r@s@t@u@v@w@4@x@y@b+z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@",
-"S@T@U@V@W@X@Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#",
-"_#:#<#[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#O@l#m#n#o#",
-"p#q#r#5@s#t#u#b+v#w#x#y#z#A#B#C#D#E#F#G#H#I#'#J#K#L#M#N#O#P#Q#R#",
-" S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$ ",
-" /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$G#9$k+0$a$b$c$d$e$f$g$h$i$j$ ",
-" k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$'#D$E$F$G$H$I$J$K$L$M$ ",
-" N$O$P$Q$R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,% ",
-" '%)%!%~%{%]%^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c% ",
-" d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C% ",
-" D%E%F%G%H%I%J%K%L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%`% & ",
-" .&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:& ",
-" <&[&}&|&1&2&3&4&5&6&7&{@8&9&0&a&b&c&d&e&f&g& ",
-" h&i&j&k&l&m&n&o&p&q&r&s&a&t&u&v&w&x&y& ",
-" z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O& ",
-" P&Q&R&S&T&U&V&W&X&Y&v&Z& ",
-" `& *.*+*@*#* "};
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 01aa13f7..00000000
--- a/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://sf.net/themanaworld/tmw-(.*)\.tar\.gz
diff --git a/docs/FAQ.txt b/docs/FAQ.txt
index 6055513c..b52c0f17 100644
--- a/docs/FAQ.txt
+++ b/docs/FAQ.txt
@@ -7,10 +7,10 @@ Q: How to get help?
A: The fastest way is to come on our IRC channel. There you can find a lot of
nice people that will help you until you solve your problem. Server:
- irc.freenode.net Channel: #themanaworld.
+ irc.freenode.net Channel: #aethyra.
If you don't like IRC just come to our forums:
- http://forums.themanaworld.org. Ok, do you think forums are evil? Don't
- worry, send me an e-mail at elvenprogrammer@gmail.com and you're done.
+ http://forums.aethyra.com/ . Ok, do you think forums are evil?
+ Don't worry, send me an e-mail at blame582@gmail.com and you're done.
That's not enough? No, I won't give you my phone number! ;P
GAME
@@ -21,7 +21,7 @@ A: First of all check that your username is at least 4 characters long. Is the
first time you login? Have you registered an account? If not use the
"Register" button in game. If you already succesfully connected before, but
now you're getting this message, please send an e-mail to
- elvenprogrammer@gmail.com.
+ blame582@gmail.com.
Q: I always get "Wrong password" but I'm sure I typed it right, why?
@@ -36,15 +36,6 @@ A: Did you read README? Are you really sure? If not go read it and you'll find
README/ingame help is not up to date/wrong, please report it to the
developers.
-Q: I just typed /<command> in the chat window and then I saw "Your account has
- been banished until ..." and TMW closed. Now when I try to log in nothing
- happens?
-
-A: That's because /<commands> are not implemented at the moment of writing.
- Please avoid using such commands (i.e. /help) until they're added.
- Anyway the ban is temp, just wait some minutes and you should be able to
- connect again.
-
Q: I can't recover HP anymore.
A: Check your inventory, if you've got lots of stuff probably you're
@@ -61,13 +52,15 @@ A: It's a system where is stored the latest development version. It's not
is updated quite frequently). If you want to check it out, read this guide
http://themanaworld.org/svn-tutorial.txt
+(We need our own svn tut -- kraant)
+
DEVELOPMENT
Q: When will the next version be released?
A: We have scheduled releases. Usually a new release is available every month.
- Check http://wiki.themanaworld.org/index.php/Roadmap for further infos.
+ Check http://www.aethyra.com/ for further info.
Q: How can I contribute?
@@ -76,15 +69,11 @@ A: There are a lot of ways:
- If you're a programmer, an artist or just willing to help in any way, you
can become part of the development team. Send an e-mail to
- elvenprogrammer@gmail.com explaining what you want to do, or join our irc
- channel: #themanaworld @ irc.freenode.net.
-
- - You can donate money. Follow the link on the project page:
- http://sourceforge.net/projects/themanaworld.
+ blame582@gmail.com explaining what you want to do, or join our irc
+ channel: #aethyra @ irc.freenode.net.
- - You can be a beta tester. Just play with The Mana World and report every
- error to the tracker. Read for more infos on the project page:
- http://themanaworld.org.
+ - You can be a beta tester. Just play with Aethyra and report
+ every error on the forum.
- - Play with The Mana World: more players, more fun! Simple as that! ;-)
+ - Play with Aethyra: more players, more fun! Simple as that! ;-)
diff --git a/docs/HACKING.txt b/docs/HACKING.txt
index f2ae8b2b..85ad0d8c 100644
--- a/docs/HACKING.txt
+++ b/docs/HACKING.txt
@@ -1,6 +1,6 @@
-----------------------------
-The Mana World Hacking Guide
-----------------------------
+---------------------------------
+Aethyra Hacking Guide
+---------------------------------
With multiple coders working on the same source files, there needs to be a
standard specifying how code is written down. Not doing so can cause quite some
diff --git a/docs/INSTALL/debian.txt b/docs/INSTALL/debian.txt
index 9a74d91b..e9cf3183 100644
--- a/docs/INSTALL/debian.txt
+++ b/docs/INSTALL/debian.txt
@@ -1,31 +1,43 @@
-How to install TMW on my GNU/Debian Box
+How to install Aethyra on my GNU/Debian Box
==================================================
Author: FERREIRA Yohann (Bertram)
Email: Bertram@cegetel.net
-The Mana World project
+With slight edits by Daniel Thomas (kraant@gmail.com)
+to for Aethyra...
+
+WARNING! These instructions are probably outdated!
+
+Check the forums (http://forums.aethyra.com/) where better help can be found.
+
+Aethyra project
======================
-Homepage: http://themanaworld.org/
-IRC: irc.freenode.net / #themanaworld
+Homepage: http://www.aethyra.com/
+IRC: irc.freenode.net / #aethyra
-1) Installing The Mana World and dependencies
+1) Installing Aethyra and dependencies
2) Creating a Debian Package using DebHelper Tools
3) Notes
-1. Installing The Mana World and Dependencies
+1. Installing Aethyra and Dependencies
=============================================
-The Mana World Debian Package can be installed under the Debian Testing and
-Unstable (Sarge/Sid). In order to have Mana World working, you'll need
+Aethyra Debian Package can be installed under the Debian Testing and
+Unstable (Sarge/Sid). In order to have Mana Experiment working, you'll need
packages for SDL, SDL_mixer, SDL_image, libxml2, libphysfs and libguichan0.
To install the dependencies, you can do type (as root):
- apt-get install libsdl-mixer1.2 libsdl-image1.2 libxml2 libphysfs-1.0-0 libguichan0
+ apt-get install libsdl-mixer1.2 libsdl-image1.2 libxml2 libphysfs-1.0-0
-Type tmw as a normal user to play! (Enjoy!)
+(You'll need to compile libguichan from source since we've moved to 8.1
+and there is no package for this as of yet. This could create
+problems, any debian users trying this out and giving us fixes
+would be much appreciated -- kraant)
+
+Type aethyra as a normal user to play! (Enjoy!)
2. Creating a Debian Package using DebHelper Tools
==================================================
@@ -41,9 +53,9 @@ And the debhelper tools:
Download tmw from Subversion using the command (You'll need Subversion
installed on your system):
- svn https://svn.sourceforge.net/svnroot/themanaworld/tmw/trunk tmw
+ svn co svn://209.168.213.109/client/trunk aethyra
-Rename the tmw folder into tmw-XXX and open a console in it.
+Rename the aethyra folder into aethyra-XXX and open a console in it.
You can now type:
fakeroot dpkg-buildpackage
@@ -53,16 +65,16 @@ file.
Install it:
- dpkg -i tmw_XXXXXX_i386.deb
+ dpkg -i aethyra_XXXXXX_i386.deb
(If you've got a previous one already installed with the same version number,
don't forget to remove it with :)
- apt-get remove tmw
+ apt-get remove aethyra
(Don't worry, you configuration files are not removed...)
-And now the final step: type 'tmw' as a normal user in a shell and you're in!
+And now the final step: type 'aethyra' as a normal user in a shell and you're in!
KDE/GNOME menu entries are created in Arcade Games upon installation.
@@ -71,6 +83,10 @@ KDE/GNOME menu entries are created in Arcade Games upon installation.
A Debian Repository has been created.
+(This repository is for The Mana World not Aethyra, volunteers to make a
+package would be nice, basically if you follow these instructions
+you won't get aethyra as of now -- kraant)
+
Simply add in your /etc/apt/sources.list file:
deb http://bertram.ifrance.com ./
@@ -79,9 +95,11 @@ Simply add in your /etc/apt/sources.list file:
Then, as root, do:
apt-get update
- apt-get install tmw
+ apt-get install aethyra
and you're done!
-N.B.: The tmw-music, libguichan0, and libguichan0-dev packages are also
+N.B.: The t_me-music, libguichan0, and libguichan0-dev packages are also
provided in this repository.
+
+(Added '_' to avoid picking this file up in grep, fix this later -- kraant)
diff --git a/docs/INSTALL/win32.txt b/docs/INSTALL/win32.txt
index 1a1e527f..3ffd506e 100644
--- a/docs/INSTALL/win32.txt
+++ b/docs/INSTALL/win32.txt
@@ -1,10 +1,12 @@
-How setup Dev-C++ to compile TMW on a Win32 Box
+How setup Dev-C++ to compile Aethyra on a Win32 Box
===============================================
-The Mana World project
-======================
-Homepage: themanaworld.sourceforge.net
-IRC: irc.freenode.net / #themanaworld
+(I think Dev-C++ support is broken as of now -- kraant)
+
+Aethyra project
+===========================
+Homepage: http://www.aethyra.com
+IRC: irc.freenode.net / #aethyra
0. Index
@@ -12,7 +14,7 @@ IRC: irc.freenode.net / #themanaworld
1. Requirements
2. Installing Dev-C++
3. Installing the required libraries
-4. Compiling The Mana World
+4. Compiling Aethyra
1. Requirements
@@ -23,7 +25,7 @@ free IDE for Win32 built around GCC. Remember, Win32 was not meant for GCC and
stuff so you will probably run into trouble unless you really know what you're
doing, so best stick with Dev-C++.
-Besides a C++ compiler, TMW depends on the following libraries:
+Besides a C++ compiler, Aethyra depends on the following libraries:
1) SDL
2) SDL_mixer
@@ -95,36 +97,36 @@ Install them all through the Dev-C++ package manager.
iconv-1.9.1.win32.zip
From each file, copy the headers to your include directory, the libs to
- the lib direcotry and the dlls (in bin direcotry) to your tmw directory.
+ the lib direcotry and the dlls (in bin direcotry) to your aethyra directory.
**) For PhysFS copy the headers to your include directory, the libs to
- the lib directory and the dlls (in bin direcotry) to your tmw directory.
+ the lib directory and the dlls (in bin direcotry) to your aethyra directory.
***) Download developer files and put headers and libs in to include and lib
- directories of Dev-Cpp. Download binaries and place the dll inside tmw
+ directories of Dev-Cpp. Download binaries and place the dll inside aethyra
folder.
****) Get latest win32 - mingw package and install as usual.
-You should now be fully equipped for compiling the latest TMW development
+You should now be fully equipped for compiling the latest Aethyra development
code!
-4. Compiling The Mana World
-===========================
+4. Compiling Aethyra
+================================
-Check out The Mana World from Subversion using either the command line svn
+Check out The Mana Experiment from Subversion using either the command line svn
tool or TortoiseSVN, pick what you like to use most and install that. Next,
check out the following directory from our repository:
- https://svn.sourceforge.net/svnroot/themanaworld/tmw/trunk
+ svn://209.168.213.109/client/trunk
-Open "The Mana World.dev" in Dev-C++. From there on you should be able to
-start compilition with Excute -> Compile. A file called tmw.exe should appear
+Open "Aethyra.dev" in Dev-C++. From there on you should be able to
+start compilition with Excute -> Compile. A file called aethyra.exe should appear
in the same directory as where you opened the .dev from.
Before you can actually run the executable be sure to copy over the following
-DLLs from your Dev-Cpp/dll directory to the directory containing tmw.exe (or
+DLLs from your Dev-Cpp/dll directory to the directory containing aethyra.exe (or
alternatively into your c:\windows\system\ for a more universal solution):
SDL.dll
@@ -143,7 +145,7 @@ And also make sure you have:
zlib1.dll
Additionally don't forget to copy any updated .dll (when libs are updated,
-the dll are usually updated too) to the folder containing tmw.exe (or to the
+the dll are usually updated too) to the folder containing aethyra.exe (or to the
c:\windows\system\).
-Have fun hacking The Mana World!
+Have fun hacking Aethyra!
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 1ee9a9a6..8b311f85 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,11 +1,11 @@
-man6_MANS = tmw.6
+man6_MANS = aethyra.6
EXTRA_DIST = $(man6_MANS) \
packages.txt \
FAQ.txt \
HACKING.txt \
- SOURCE/tmwdox.sh \
- SOURCE/tmw.doxcfg \
+ SOURCE/aethyradox.sh \
+ SOURCE/aethyra.doxcfg \
items.txt \
progression.txt \
INSTALL/debian.txt \
diff --git a/docs/SOURCE/tmw.doxcfg b/docs/SOURCE/aethyra.doxcfg
index fe5039fb..cbc22910 100644
--- a/docs/SOURCE/tmw.doxcfg
+++ b/docs/SOURCE/aethyra.doxcfg
@@ -17,7 +17,7 @@
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = The Mana World
+PROJECT_NAME = Aethyra
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@@ -625,7 +625,7 @@ GENERATE_HTMLHELP = NO
# can add a path in front of the file if the result should not be
# written to the html output directory.
-CHM_FILE = tmw.chm
+CHM_FILE = aethyra.chm
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
diff --git a/docs/SOURCE/aethyradox.sh b/docs/SOURCE/aethyradox.sh
new file mode 100644
index 00000000..e0f299a8
--- /dev/null
+++ b/docs/SOURCE/aethyradox.sh
@@ -0,0 +1 @@
+cd ../../src/ && doxygen ../docs/SOURCE/aethyra.doxcfg
diff --git a/docs/SOURCE/tmwdox.sh b/docs/SOURCE/tmwdox.sh
deleted file mode 100644
index 541f8bee..00000000
--- a/docs/SOURCE/tmwdox.sh
+++ /dev/null
@@ -1 +0,0 @@
-cd ../../src/ && doxygen ../docs/SOURCE/tmw.doxcfg
diff --git a/docs/tmw.6 b/docs/aethyra.6
index 0dee82c7..a130a3a5 100644
--- a/docs/tmw.6
+++ b/docs/aethyra.6
@@ -1,13 +1,13 @@
-.TH "TMW" "6"
+.TH "AETHYRA" "6"
.SH "NAME"
-tmw \- tmw is The Mana World: A fantasy online game
+aethyra \- aethyra is Aethyra: A fantasy online game
.SH "SYNOPSIS"
-\fBtmw\fR
+\fBaethyra\fR
.SH "DESCRIPTION"
This manual page documents briefly the
-\fBtmw\fR ingame
+\fBaethyra\fR ingame
commands.
-\fBtmw\fR is a great online game based upon the Seiken Densetsu Serie.
+\fBaethyra\fR is a great online game based upon the Seiken Densetsu Serie.
It has its own universe, and and its own character management system, which will
give you the opportunity to play in a 2D heroic-fantasy world forever.
.SH "BINARY PARAMETERS"
@@ -49,26 +49,49 @@ Make your character attack.
.B Key A:
Target nearest monster.
.TP
-.B Key G:
+.B Key Z:
Get items on the ground or in a chest.
.TP
+.B Key S:
+Make your character sit.
+.TP
.B Alt + 1...9:
Shows an emoticon above your character.
.TP
-.B Alt + I:
-Shows / Hide inventory window.
+.B F1:
+Displays / Hides in game help.
+.TP
+.B F2:
+Displays / Hides status window.
+.TP
+.B F3:
+Displays / Hides inventory window.
+.TP
+.B F4:
+Displays / Hides equipment window.
+.TP
+.B F5:
+Displays / Hides skills window.
+.TP
+.B F6:
+Displays / Hides map.
+.TP
+.B F7
+Displays / Hides messages.
.TP
-.B Alt + K:
-Shows / Hide skills window.
+.B F8
+Displays / Hides hot-keys.
.TP
-.B Alt + E:
-Shows / Hide equipment window.
+.B F9:
+Displays / Hides configuration window.
.TP
-.B Alt + C:
-Shows configuration window.
+.B F10
+Displays / Hides debug window.
.SH "AUTHOR"
This manual page was written by Patrick Matth\[:a]i <patrick.matthaei@web.de>
for The Mana World project.
+With slight alterations by Daniel Thomas\[:a]i <kraant@gmail.com>,
+for Aethyra.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License, Version 2 any
later version published by the Free Software Foundation.
diff --git a/docs/packages.txt b/docs/packages.txt
index 40ade7f9..d5735e28 100644
--- a/docs/packages.txt
+++ b/docs/packages.txt
@@ -1,6 +1,6 @@
------------------------------
-THE MANA WORLD PACKAGE SYSTEM
------------------------------
+----------------------------------
+AETHYRA PACKAGE SYSTEM
+----------------------------------
1. INTRODUCTION
2. LOCATION OF DATA
@@ -10,39 +10,46 @@ THE MANA WORLD PACKAGE SYSTEM
6. LOADING A REQUESTED RESOURCE
7. RESOURCE MANAGEMENT DETAILS
+(Note this file is a _little_ outdated in some ways -- kraant)
+
1. INTRODUCTION
-The Mana World is expected to grow continuously with updates to the game world
-occurring relatively frequently. More often so than for example new releases
-of the game client. To make sure players don't have to update their data
-manually all the time, by for example downloading the latest from the website,
-the TMW client should be able to automatically obtain new data packages from
-the server.
+Aethyra (Was The Mana Experiment, original;y The Mana World) is expected to grow continuously with updates to the game
+world occurring relatively frequently. More often so than for example new
+releases of the game client. To make sure players don't have to update their
+data manually all the time, by for example downloading the latest from the
+website, the Aethyra client should be able to automatically obtain new data
+packages from the server.
Note: To reduce the load on the server (which isn't expected to have huge
free uploading resources), the idea is that the server will only send a
torrent file to the client and that the file is subsequently downloaded from
- several locations that have volunteered to spread TMW data files. Ultimately
+ several locations that have volunteered to spread Aethyra data files. Ultimately
a simple option on the client will even allow players to contribute their
excess bandwidth to help other players get the updates faster.
+(This doesn't seem to have occurred we're still using http all the way
+up to now even into Aethyra)
+
2. LOCATION OF DATA
-There are two locations where TMW can look for game data. The install data
+There are two locations where Aethyra can look for game data. The install data
directory and the data directory in the user's home directory. The latter one
doesn't have to be used for Windows users, but is required for dynamic updates
for UNIX users, who generally won't have write permissions to the install
data directory. So for UNIX the two locations are:
- /usr/local/share/manaworld/data/*
+ /usr/local/share/aethyra/data/*
+
+ ~/.aethyra/updates/*
- ~/.manaworld/data/*
+ ~/.aethyra/customdata
While for Windows all the data will be located at:
- C:\Program Files\The Mana World\data\*
+ C:\Program Files\Aethyra\data\*
In the UNIX case it doesn't matter in which order the data directories are
examined.
@@ -83,7 +90,7 @@ package is irrelevant. An example of the contents is given by:
5. INITIALIZING PACKAGE MANAGEMENT
-When TMW starts it will scan its data directories for both packages (archives)
+When Aethyra starts it will scan its data directories for both packages (archives)
and directories. When a directory is found with the same name as a package, the
directory is the preferred location to load data from as it is assumed to be
more up to date.
@@ -127,7 +134,7 @@ The resource management technique is critical to the overall success of the
package management system as a whole. Resources are loaded at runtime as they
are needed, and unloaded as they become unused. In order to ensure the
autonomous functioning of this process reference counting is the agreed upon
-technique for managing loaded resources in TMW.
+technique for managing loaded resources in Aethyra.
For those unfamiliar with the practice of reference counting, it involves
every resource object having a variable containing the number of references to
diff --git a/docs/sounddev.txt b/docs/sounddev.txt
index 149150ba..1c83157a 100644
--- a/docs/sounddev.txt
+++ b/docs/sounddev.txt
@@ -1,6 +1,6 @@
---------------------------------
-THE MANA WORLD SOUND DEVELOPMENT
---------------------------------
+-------------------------------------
+AETHYRA SOUND DEVELOPMENT
+-------------------------------------
1. INTRODUCTION
2. SPECS
@@ -9,7 +9,7 @@ THE MANA WORLD SOUND DEVELOPMENT
1. INTRODUCTION
-In The Mana World we plan to have both background music and sound effects
+In Aethyra we plan to have both background music and sound effects
linked to beings actions.
2. SPECS
@@ -35,4 +35,4 @@ all.
4. SUGGESTIONS
-As placeholders we could use Wesnoth SFX/BGM to test the sound engine. \ No newline at end of file
+As placeholders we could use Wesnoth SFX/BGM to test the sound engine.
diff --git a/docs/win32-release.txt b/docs/win32-release.txt
index a8696897..64590139 100644
--- a/docs/win32-release.txt
+++ b/docs/win32-release.txt
@@ -1,6 +1,6 @@
---------------------------------------
-THE MANA WORLD WIN32 RELEASE CHECKLIST
---------------------------------------
+-------------------------------------------
+AETHYRA WIN32 RELEASE CHECKLIST
+-------------------------------------------
Every Win32 releaser should follow this checklist when creating a new package.
@@ -11,7 +11,10 @@ Every Win32 releaser should follow this checklist when creating a new package.
* Eventually Legal Copyright
- Update README and ChangeLog if not already
- Compile OpenGL version (Using -DUSE_OPENGL option) and rename the executable
- from tmw.exe to tmw_opengl.exe
+ from aethyra.exe to aethyra_opengl.exe
+ (This isn't actually how it's happening because I'm cross compiling
+ and therefore flying blind. As it is aethyra.exe is the OpenGL version
+ and no sdl version is generated -- kraant)
- Compile normal version (Do not use special flags as __DEBUG or USE_OPENGL)
- Check if the dlls were compressed (SDL.dll, SDL_Image.dll, SDL_Mixer.dll)
- Check config.xml for default values:
@@ -19,7 +22,7 @@ Every Win32 releaser should follow this checklist when creating a new package.
<configuration>
<option name="chatlog" value="chatlog.txt"/>
<option name="guialpha" value="0.8"/>
- <option name="host" value="server.themanaworld.org"/>
+ <option name="host" value="209.168.213.109"/>
<option name="hwaccel" value="0"/>
<option name="port" value="6901"/>
<option name="remember" value="0"/>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 94ee854a..b54c7c6c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,7 +8,7 @@ FIND_PACKAGE(PhysFS REQUIRED)
FIND_PACKAGE(PNG REQUIRED)
SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
-SET(FLAGS "${FLAGS} -DTMW_DATADIR=\\\"${PKG_DATADIR}/\\\"")
+SET(FLAGS "${FLAGS} -DAETHYRA_DATADIR=\\\"${PKG_DATADIR}/\\\"")
SET(GUICHAN_COMPONENTS "SDL")
IF (WITH_OPENGL)
@@ -49,6 +49,8 @@ MARK_AS_ADVANCED(SDL_INCLUDE_DIR)
MARK_AS_ADVANCED(SDL_LIBRARY)
SET(SRCS
+ gui/widgets/dropdown.cpp
+ gui/widgets/dropdown.h
gui/widgets/resizegrip.cpp
gui/widgets/resizegrip.h
gui/box.cpp
@@ -116,8 +118,6 @@ SET(SRCS
gui/minimap.h
gui/ministatus.cpp
gui/ministatus.h
- gui/newskill.cpp
- gui/newskill.h
gui/npclistdialog.cpp
gui/npclistdialog.h
gui/npc_text.cpp
@@ -161,6 +161,8 @@ SET(SRCS
gui/skill.h
gui/slider.cpp
gui/slider.h
+ gui/speechbubble.cpp
+ gui/speechbubble.h
gui/status.cpp
gui/status.h
gui/tabbedcontainer.cpp
@@ -229,6 +231,8 @@ SET(SRCS
resources/animation.h
resources/buddylist.cpp
resources/buddylist.h
+ resources/colordb.cpp
+ resources/colordb.h
resources/dye.cpp
resources/dye.h
resources/image.cpp
@@ -286,6 +290,7 @@ SET(SRCS
engine.h
equipment.cpp
equipment.h
+ extensions.h
floor_item.cpp
floor_item.h
flooritemmanager.cpp
@@ -345,11 +350,13 @@ SET(SRCS
textparticle.h
tileset.h
vector.h
+ effectmanager.cpp
+ effectmanager.h
)
-ADD_EXECUTABLE(tmw ${SRCS})
+ADD_EXECUTABLE(aethyra ${SRCS})
-TARGET_LINK_LIBRARIES(tmw
+TARGET_LINK_LIBRARIES(aethyra
${SDL_LIBRARY}
${SDLIMAGE_LIBRARY}
${SDLMIXER_LIBRARY}
@@ -362,6 +369,6 @@ TARGET_LINK_LIBRARIES(tmw
${OPENGL_LIBRARIES}
)
-INSTALL(TARGETS tmw RUNTIME DESTINATION ${PKG_BINDIR})
+INSTALL(TARGETS aethyra RUNTIME DESTINATION ${PKG_BINDIR})
-SET_TARGET_PROPERTIES(tmw PROPERTIES COMPILE_FLAGS "${FLAGS}")
+SET_TARGET_PROPERTIES(aethyra PROPERTIES COMPILE_FLAGS "${FLAGS}")
diff --git a/src/Makefile.am b/src/Makefile.am
index e9d69b5e..507db6f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,30 +1,34 @@
-bin_PROGRAMS = tmw
-tmw_SOURCES = gui/widgets/resizegrip.cpp \
+bin_PROGRAMS = aethyra
+aethyra_SOURCES = gui/widgets/dropdown.cpp \
+ gui/widgets/dropdown.h \
+ gui/widgets/resizegrip.cpp \
gui/widgets/resizegrip.h \
- gui/box.h \
gui/box.cpp \
+ gui/box.h \
gui/browserbox.cpp \
gui/browserbox.h \
- gui/buddywindow.cpp \
- gui/buddywindow.h \
gui/button.cpp \
gui/button.h \
+ gui/buttonbox.cpp \
+ gui/buttonbox.h \
gui/buy.cpp \
gui/buy.h \
gui/buysell.cpp \
gui/buysell.h \
gui/chargedialog.cpp \
gui/chargedialog.h \
- gui/char_server.cpp \
- gui/char_server.h \
gui/char_select.cpp \
gui/char_select.h \
+ gui/char_server.cpp \
+ gui/char_server.h \
gui/chat.cpp \
gui/chat.h \
gui/chatinput.cpp \
gui/chatinput.h \
gui/checkbox.cpp \
gui/checkbox.h \
+ gui/colour.cpp \
+ gui/colour.h \
gui/confirm_dialog.cpp \
gui/confirm_dialog.h \
gui/connection.cpp \
@@ -39,8 +43,8 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
gui/gccontainer.h \
gui/gui.cpp \
gui/gui.h \
- gui/hbox.h \
gui/hbox.cpp \
+ gui/hbox.h \
gui/help.cpp \
gui/help.h \
gui/inttextbox.h \
@@ -66,8 +70,6 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
gui/minimap.h \
gui/ministatus.cpp \
gui/ministatus.h \
- gui/newskill.cpp \
- gui/newskill.h \
gui/npclistdialog.cpp \
gui/npclistdialog.h \
gui/npc_text.cpp \
@@ -90,10 +92,12 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
gui/scrollarea.h \
gui/sell.cpp \
gui/sell.h \
- gui/setup_audio.cpp \
- gui/setup_audio.h \
gui/setup.cpp \
gui/setup.h \
+ gui/setup_audio.cpp \
+ gui/setup_audio.h \
+ gui/setup_colours.cpp \
+ gui/setup_colours.h \
gui/setup_joystick.cpp \
gui/setup_joystick.h \
gui/setup_keyboard.cpp \
@@ -111,14 +115,16 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
gui/skill.h \
gui/slider.cpp \
gui/slider.h \
+ gui/speechbubble.cpp \
+ gui/speechbubble.h \
gui/status.cpp \
gui/status.h \
gui/tabbedcontainer.cpp \
gui/tabbedcontainer.h \
- gui/table.h \
gui/table.cpp \
- gui/table_model.h \
+ gui/table.h \
gui/table_model.cpp \
+ gui/table_model.h \
gui/textbox.cpp \
gui/textbox.h \
gui/textfield.cpp \
@@ -163,6 +169,8 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
net/network.h \
net/npchandler.cpp \
net/npchandler.h \
+ net/partyhandler.cpp \
+ net/partyhandler.h \
net/playerhandler.cpp \
net/playerhandler.h \
net/protocol.cpp \
@@ -177,6 +185,10 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
resources/ambientoverlay.h \
resources/animation.cpp \
resources/animation.h \
+ resources/buddylist.cpp \
+ resources/buddylist.h \
+ resources/colordb.cpp \
+ resources/colordb.h \
resources/dye.cpp \
resources/dye.h \
resources/image.cpp \
@@ -209,8 +221,6 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
resources/soundeffect.cpp \
resources/spritedef.h \
resources/spritedef.cpp \
- resources/buddylist.h \
- resources/buddylist.cpp \
utils/base64.cpp \
utils/base64.h \
utils/dtor.h \
@@ -233,10 +243,13 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
configlistener.h \
configuration.cpp \
configuration.h \
+ effectmanager.cpp \
+ effectmanager.h \
engine.cpp \
engine.h \
equipment.cpp \
equipment.h \
+ extensions.h \
floor_item.cpp \
floor_item.h \
flooritemmanager.cpp \
@@ -276,16 +289,20 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
openglgraphics.h \
particle.cpp \
particle.h \
+ particlecontainer.cpp \
+ particlecontainer.h \
particleemitter.cpp \
particleemitter.h \
particleemitterprop.h \
- particlecontainer.cpp \
- particlecontainer.h \
+ party.cpp \
+ party.h \
player.cpp \
player.h \
player_relations.cpp \
player_relations.h \
properties.h \
+ recorder.cpp \
+ recorder.h \
serverinfo.h \
shopitem.cpp \
shopitem.h \
@@ -301,15 +318,16 @@ tmw_SOURCES = gui/widgets/resizegrip.cpp \
textparticle.cpp \
textparticle.h \
tileset.h \
+ vector.cpp \
vector.h
# set the include path found by configure
INCLUDES = \
$(all_includes) \
- -DTMW_DATADIR=\""$(pkgdatadir)/"\"
+ -DAETHYRA_DATADIR=\""$(pkgdatadir)/"\"
# the library search path.
-tmw_LDFLAGS = $(all_libraries) $(LIBSDL_RPATH) `pkg-config --libs libxml-2.0`
-tmw_CXXFLAGS = -Wall $(LIBSDL_CFLAGS) `pkg-config --cflags libxml-2.0` $(CURL_CFLAGS)
-tmw_LDADD = $(LIBSDL_LIBS) -lguichan_sdl $(CURL_LIBS)
-tmw_TARGET = tmw
+aethyra_LDFLAGS = $(all_libraries) $(LIBSDL_RPATH) `pkg-config --libs libxml-2.0`
+aethyra_CXXFLAGS = -Wall $(LIBSDL_CFLAGS) `pkg-config --cflags libxml-2.0` $(CURL_CFLAGS)
+aethyra_LDADD = $(LIBSDL_LIBS) -lguichan_sdl $(CURL_LIBS)
+aethyra_TARGET = aethyra
diff --git a/src/tmw.rc b/src/aethyra.rc
index 9661ac6b..d2db954f 100644
--- a/src/tmw.rc
+++ b/src/aethyra.rc
@@ -1,23 +1,22 @@
-#include <windows.h> // include for version info constants
-
-#include "winver.h"
-
-A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "data/icons/tmw.ico"
-
-1 VERSIONINFO
-FILEVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
-PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
-FILETYPE VFT_APP {
- BLOCK "StringFileInfo" {
- BLOCK "040904E4" {
- VALUE "CompanyName", "The Mana World Development Team"
- VALUE "FileVersion", PACKAGE_VERSION
- VALUE "FileDescription", "The Mana World"
- VALUE "LegalCopyright", "2004-2006 (C)"
- VALUE "OriginalFilename", "tmw.exe"
- VALUE "ProductName", "The Mana World MMORPG"
- VALUE "ProductVersion", PACKAGE_VERSION
- }
- }
+#include <windows.h> // include for version info constants
+
+#include "winver.h"
+
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "data/icons/aethyra.ico"
+
+1 VERSIONINFO
+FILEVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
+PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
+FILETYPE VFT_APP {
+ BLOCK "StringFileInfo" {
+ BLOCK "040904E4" {
+ VALUE "CompanyName", "Aethyra Development Team"
+ VALUE "FileVersion", PACKAGE_VERSION
+ VALUE "FileDescription", "Aethyra Experiment"
+ VALUE "LegalCopyright", "2008 (C)"
+ VALUE "OriginalFilename", "aethyra.exe"
+ VALUE "ProductName", "Aethyra MMORPG"
+ VALUE "ProductVersion", PACKAGE_VERSION
+ }
+ }
}
-
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index 203a82af..ba71d0e0 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -20,7 +20,6 @@
*/
#include "animatedsprite.h"
-
#include "graphics.h"
#include "log.h"
diff --git a/src/animationparticle.cpp b/src/animationparticle.cpp
index eb260157..59eacb05 100644
--- a/src/animationparticle.cpp
+++ b/src/animationparticle.cpp
@@ -20,7 +20,6 @@
*/
#include "animationparticle.h"
-
#include "graphics.h"
#include "simpleanimation.h"
diff --git a/src/being.cpp b/src/being.cpp
index 7c6d91e7..d98af29c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -18,31 +18,36 @@
* 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 "being.h"
-#include <algorithm>
#include <cassert>
+#include <cmath>
#include "animatedsprite.h"
+#include "being.h"
+#include "configuration.h"
#include "equipment.h"
#include "game.h"
#include "graphics.h"
+#include "localplayer.h"
#include "log.h"
#include "map.h"
#include "particle.h"
#include "sound.h"
-#include "localplayer.h"
#include "text.h"
-#include "resources/itemdb.h"
-#include "resources/resourcemanager.h"
#include "resources/imageset.h"
+#include "resources/itemdb.h"
#include "resources/iteminfo.h"
+#include "resources/resourcemanager.h"
#include "gui/gui.h"
+#include "gui/speechbubble.h"
#include "utils/dtor.h"
#include "utils/tostring.h"
+#include "utils/xml.h"
+
+#define BEING_EFFECTS_FILE "effects.xml"
#include "utils/xml.h"
@@ -50,6 +55,7 @@
#define HAIR_FILE "hair.xml"
int Being::instances = 0;
+int Being::mNumberOfHairstyles = 1;
ImageSet *Being::emotionSet = NULL;
static const int X_SPEECH_OFFSET = 18;
@@ -58,7 +64,7 @@ static const int Y_SPEECH_OFFSET = 60;
Being::Being(int id, int job, Map *map):
mJob(job),
mX(0), mY(0),
- mAction(0),
+ mAction(STAND),
mWalkTime(0),
mEmotion(0), mEmotionTime(0),
mAttackSpeed(350),
@@ -67,6 +73,8 @@ Being::Being(int id, int job, Map *map):
mWalkSpeed(150),
mDirection(DOWN),
mMap(NULL),
+ mIsGM(false),
+ mParticleEffects(config.getValue("particleeffects", 1)),
mEquippedWeapon(NULL),
mHairStyle(1), mHairColor(0),
mGender(2),
@@ -80,21 +88,32 @@ Being::Being(int id, int job, Map *map):
{
setMap(map);
+ mSpeechBubble = new SpeechBubble();
+
if (instances == 0)
{
// Load the emotion set
ResourceManager *rm = ResourceManager::getInstance();
emotionSet = rm->getImageSet("graphics/gui/emotions.png", 30, 32);
if (!emotionSet) logger->error("Unable to load emotions!");
+
+ // Hairstyles are encoded as negative numbers. Count how far negative we can go.
+ int hairstyles = 1;
+ while (ItemDB::get(-hairstyles).getSprite(0) != "error.xml")
+ {
+ hairstyles++;
+ }
+ mNumberOfHairstyles = hairstyles;
}
instances++;
- mSpeech = 0;
+ mSpeech = "";
+ mText = 0;
}
Being::~Being()
{
- std::for_each(mSprites.begin(), mSprites.end(), make_dtor(mSprites));
+ delete_all(mSprites);
clearPath();
setMap(NULL);
@@ -107,11 +126,11 @@ Being::~Being()
emotionSet = NULL;
}
- delete mSpeech;
+ delete mSpeechBubble;
+ delete mText;
}
-void
-Being::setDestination(Uint16 destX, Uint16 destY)
+void Being::setDestination(Uint16 destX, Uint16 destY)
{
if (mMap)
{
@@ -119,14 +138,12 @@ Being::setDestination(Uint16 destX, Uint16 destY)
}
}
-void
-Being::clearPath()
+void Being::clearPath()
{
mPath.clear();
}
-void
-Being::setPath(const Path &path)
+void Being::setPath(const Path &path)
{
mPath = path;
@@ -137,35 +154,27 @@ Being::setPath(const Path &path)
}
}
-void
-Being::setHairStyle(int style, int color)
+void Being::setHairStyle(int style, int color)
{
- mHairStyle = style < 0 ? mHairStyle : style % getHairStylesNr();
- mHairColor = color < 0 ? mHairColor : color % getHairColorsNr();
+ mHairStyle = style < 0 ? mHairStyle : style % mNumberOfHairstyles;
+ mHairColor = color < 0 ? mHairColor : color % ColorDB::size();
}
-void
-Being::setSprite(int slot, int id, std::string color)
+void Being::setSprite(int slot, int id, std::string color)
{
assert(slot >= BASE_SPRITE && slot < VECTOREND_SPRITE);
mSpriteIDs[slot] = id;
mSpriteColors[slot] = color;
}
-void
-Being::setSpeech(const std::string &text, Uint32 time)
+void Being::setSpeech(const std::string &text, Uint32 time)
{
- // don't introduce a memory leak
- delete mSpeech;
+ mSpeech = text;
- mSpeech = new Text(text, mPx + X_SPEECH_OFFSET, mPy - Y_SPEECH_OFFSET,
- gcn::Graphics::CENTER, speechFont,
- gcn::Color(255, 255, 255));
mSpeechTime = 500;
}
-void
-Being::takeDamage(int amount)
+void Being::takeDamage(int amount)
{
gcn::Font *font;
std::string damage = amount ? toString(amount) : "miss";
@@ -177,10 +186,6 @@ Being::takeDamage(int amount)
}
else
{
- // Hit particle effect
- controlParticle(particleEngine->addEffect(
- "graphics/particles/hit.particle.xml", 0, 0));
-
if (getType() == MONSTER)
{
font = hitBlueFont;
@@ -196,16 +201,34 @@ Being::takeDamage(int amount)
mPx + 16, mPy + 16);
}
-void
-Being::handleAttack(Being *victim, int damage)
+void Being::showCrit()
+{
+ gcn::Font *font;
+ std::string text = "crit!";
+
+ // Selecting the right color
+ if (getType() == MONSTER)
+ {
+ font = hitBlueFont;
+ }
+ else
+ {
+ font = hitRedFont;
+ }
+
+ // Show crit notice
+ particleEngine->addTextSplashEffect(text, 255, 255, 255, font,
+ mPx + 16, mPy + 16);
+}
+
+void Being::handleAttack(Being *victim, int damage)
{
setAction(Being::ATTACK);
mFrame = 0;
mWalkTime = tick_time;
}
-void
-Being::setMap(Map *map)
+void Being::setMap(Map *map)
{
// Remove sprite from potential previous map
if (mMap)
@@ -225,16 +248,15 @@ Being::setMap(Map *map)
mChildParticleEffects.clear();
}
-void
-Being::controlParticle(Particle *particle)
+void Being::controlParticle(Particle *particle)
{
mChildParticleEffects.addLocally(particle);
}
-void
-Being::setAction(Uint8 action)
+void Being::setAction(Action action)
{
SpriteAction currentAction = ACTION_INVALID;
+
switch (action)
{
case WALK:
@@ -248,7 +270,8 @@ Being::setAction(Uint8 action)
{
currentAction = mEquippedWeapon->getAttackType();
}
- else {
+ else
+ {
currentAction = ACTION_ATTACK;
}
for (int i = 0; i < VECTOREND_SPRITE; i++)
@@ -285,10 +308,11 @@ Being::setAction(Uint8 action)
}
}
-
-void
-Being::setDirection(Uint8 direction)
+void Being::setDirection(Uint8 direction)
{
+ if (mDirection == direction)
+ return;
+
mDirection = direction;
SpriteDirection dir = getSpriteDirection();
@@ -299,8 +323,7 @@ Being::setDirection(Uint8 direction)
}
}
-SpriteDirection
-Being::getSpriteDirection() const
+SpriteDirection Being::getSpriteDirection() const
{
SpriteDirection dir;
@@ -316,15 +339,15 @@ Being::getSpriteDirection() const
{
dir = DIRECTION_RIGHT;
}
- else {
- dir = DIRECTION_LEFT;
+ else
+ {
+ dir = DIRECTION_LEFT;
}
-
+
return dir;
}
-void
-Being::nextStep()
+void Being::nextStep()
{
if (mPath.empty())
{
@@ -359,32 +382,31 @@ Being::nextStep()
mWalkTime += mWalkSpeed / 10;
}
-void
-Being::logic()
+void Being::logic()
{
// Reduce the time that speech is still displayed
- if (mSpeechTime > 0 && mSpeech)
+ if (mSpeechTime > 0)
+ mSpeechTime--;
+
+ // Remove text if speech boxes aren't being used
+ if (mSpeechTime == 0 && mText)
{
- if (--mSpeechTime == 0)
- {
- delete mSpeech;
- mSpeech = 0;
- }
+ delete mText;
+ mText = 0;
}
int oldPx = mPx;
int oldPy = mPy;
+
// Update pixel coordinates
mPx = mX * 32 + getXOffset();
mPy = mY * 32 + getYOffset();
+
if (mPx != oldPx || mPy != oldPy)
{
- if (mSpeech)
- {
- mSpeech->adviseXY(mPx + X_SPEECH_OFFSET, mPy - Y_SPEECH_OFFSET);
- }
updateCoords();
}
+
if (mEmotion != 0)
{
mEmotionTime--;
@@ -406,8 +428,7 @@ Being::logic()
mChildParticleEffects.setPositions((float)mPx + 16.0f, (float)mPy + 32.0f);
}
-void
-Being::draw(Graphics *graphics, int offsetX, int offsetY) const
+void Being::draw(Graphics *graphics, int offsetX, int offsetY) const
{
int px = mPx + offsetX;
int py = mPy + offsetY;
@@ -421,8 +442,7 @@ Being::draw(Graphics *graphics, int offsetX, int offsetY) const
}
}
-void
-Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY)
+void Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY)
{
if (!mEmotion)
return;
@@ -435,17 +455,56 @@ Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY)
graphics->drawImage(emotionSet->get(emotionIndex), px, py);
}
-Being::Type
-Being::getType() const
+void Being::drawSpeech(Graphics *graphics, int offsetX, int offsetY)
+{
+ int px = mPx + offsetX;
+ int py = mPy + offsetY;
+
+ // Draw speech above this being
+ if (mSpeechTime > 0 && config.getValue("speechbubble", 1))
+ {
+ if (mText)
+ {
+ delete mText;
+ mText = 0;
+ }
+
+ mSpeechBubble->setCaption(mName);
+ mSpeechBubble->setWindowName(mName);
+ // Not quite centered, but close enough. However, it's not too important to get
+ // it right right now, as it doesn't take bubble collision into account yet.
+ mSpeechBubble->setText( mSpeech );
+ mSpeechBubble->setPosition(px - (mSpeechBubble->getWidth() * 4 / 11), py - 70 -
+ (mSpeechBubble->getNumRows()*14));
+ mSpeechBubble->setVisible(true);
+ }
+ else if (mSpeechTime > 0 && !config.getValue("speechbubble", 1))
+ {
+ mSpeechBubble->setVisible(false);
+ // don't introduce a memory leak
+ if (mText)
+ delete mText;
+
+ mText = new Text(mSpeech, mPx + X_SPEECH_OFFSET, mPy - Y_SPEECH_OFFSET,
+ gcn::Graphics::CENTER, speechFont,
+ gcn::Color(255, 255, 255));
+ }
+ else if (mSpeechTime == 0)
+ {
+ mSpeechBubble->setVisible(false);
+ }
+}
+
+Being::Type Being::getType() const
{
return UNKNOWN;
}
-int
-Being::getOffset(char pos, char neg) const
+int Being::getOffset(char pos, char neg) const
{
// Check whether we're walking in the requested direction
- if (mAction != WALK || !(mDirection & (pos | neg))) {
+ if (mAction != WALK || !(mDirection & (pos | neg)))
+ {
return 0;
}
@@ -453,220 +512,42 @@ Being::getOffset(char pos, char neg) const
// We calculate the offset _from_ the _target_ location
offset -= 32;
- if (offset > 0) {
+ if (offset > 0)
+ {
offset = 0;
}
// Going into negative direction? Invert the offset.
- if (mDirection & pos) {
+ if (mDirection & pos)
+ {
offset = -offset;
}
return offset;
}
-
-int
-Being::getWidth() const
+int Being::getWidth() const
{
if (mSprites[BASE_SPRITE])
{
return mSprites[BASE_SPRITE]->getWidth();
}
- else {
+ else
+ {
return 0;
}
}
-int
-Being::getHeight() const
+int Being::getHeight() const
{
if (mSprites[BASE_SPRITE])
{
return mSprites[BASE_SPRITE]->getHeight();
}
- else {
- return 0;
- }
-}
-
-
-struct EffectDescription {
- std::string mGFXEffect;
- std::string mSFXEffect;
-};
-
-static EffectDescription *default_effect = NULL;
-static std::map<int, EffectDescription *> effects;
-static bool effects_initialized = false;
-
-static EffectDescription *
-getEffectDescription(xmlNodePtr node, int *id)
-{
- EffectDescription *ed = new EffectDescription;
-
- *id = atoi(XML::getProperty(node, "id", "-1").c_str());
- ed->mSFXEffect = XML::getProperty(node, "audio", "");
- ed->mGFXEffect = XML::getProperty(node, "particle", "");
-
- return ed;
-}
-
-static EffectDescription *
-getEffectDescription(int effectId)
-{
- if (!effects_initialized)
+ else
{
- XML::Document doc(BEING_EFFECTS_FILE);
- xmlNodePtr root = doc.rootNode();
-
- if (!root || !xmlStrEqual(root->name, BAD_CAST "being-effects"))
- {
- logger->log("Error loading being effects file: "
- BEING_EFFECTS_FILE);
- return NULL;
- }
-
- for_each_xml_child_node(node, root)
- {
- int id;
-
- if (xmlStrEqual(node->name, BAD_CAST "effect"))
- {
- EffectDescription *EffectDescription =
- getEffectDescription(node, &id);
- effects[id] = EffectDescription;
- } else if (xmlStrEqual(node->name, BAD_CAST "default"))
- {
- EffectDescription *EffectDescription =
- getEffectDescription(node, &id);
-
- if (default_effect)
- delete default_effect;
-
- default_effect = EffectDescription;
- }
- }
-
- effects_initialized = true;
- } // done initializing
-
- EffectDescription *ed = effects[effectId];
-
- if (!ed)
- return default_effect;
- else
- return ed;
-}
-
-void
-Being::internalTriggerEffect(int effectId, bool sfx, bool gfx)
-{
- logger->log("Special effect #%d on %s", effectId,
- getId() == player_node->getId() ? "self" : "other");
-
- EffectDescription *ed = getEffectDescription(effectId);
-
- if (!ed) {
- logger->log("Unknown special effect and no default recorded");
- return;
- }
-
- if (gfx && ed->mGFXEffect != "") {
- Particle *selfFX;
-
- selfFX = particleEngine->addEffect(ed->mGFXEffect, 0, 0);
- controlParticle(selfFX);
- }
-
- if (sfx && ed->mSFXEffect != "") {
- sound.playSfx(ed->mSFXEffect);
+ return 0;
}
}
-
-
-
-static int hairStylesNr;
-static int hairColorsNr;
-static std::vector<std::string> hairColors;
-
-static void
-initializeHair(void);
-
-int
-Being::getHairStylesNr(void)
-{
- initializeHair();
- return hairStylesNr;
-}
-
-int
-Being::getHairColorsNr(void)
-{
- initializeHair();
- return hairColorsNr;
-}
-
-std::string
-Being::getHairColor(int index)
-{
- initializeHair();
- if (index < 0 || index >= hairColorsNr)
- return "#000000";
-
- return hairColors[index];
-}
-
-static bool hairInitialized = false;
-
-static void
-initializeHair(void)
-{
- if (hairInitialized)
- return;
-
- // Hairstyles are encoded as negative numbers. Count how far negative we can go.
- int hairstylesCtr = -1;
- while (ItemDB::get(hairstylesCtr).getSprite(0) != "error.xml")
- --hairstylesCtr;
-
- hairStylesNr = -hairstylesCtr; // done.
- if (hairStylesNr == 0)
- hairStylesNr = 1; // No hair style -> no hair
-
- hairColorsNr = 0;
-
- XML::Document doc(HAIR_FILE);
- xmlNodePtr root = doc.rootNode();
-
- if (!root || !xmlStrEqual(root->name, BAD_CAST "colors"))
- {
- logger->log("Error loading being hair configuration file");
- } else {
- for_each_xml_child_node(node, root)
- {
- if (xmlStrEqual(node->name, BAD_CAST "color"))
- {
- int index = atoi(XML::getProperty(node, "id", "-1").c_str());
- std::string value = XML::getProperty(node, "value", "");
-
- if (index >= 0 && value != "") {
- if (index >= hairColorsNr) {
- hairColorsNr = index + 1;
- hairColors.resize(hairColorsNr, "#000000");
- }
- hairColors[index] = value;
- }
- }
- }
- } // done initializing
-
- if (hairColorsNr == 0) { // No colours -> black only
- hairColorsNr = 1;
- hairColors.resize(hairColorsNr, "#000000");
- }
-
- hairInitialized = 1;
-}
diff --git a/src/being.h b/src/being.h
index 15e1e6f9..7202701a 100644
--- a/src/being.h
+++ b/src/being.h
@@ -24,14 +24,20 @@
#include <list>
#include <memory>
-#include <string>
#include <SDL_types.h>
+#include <string>
+#include <vector>
#include <bitset>
-#include "sprite.h"
-#include "map.h"
#include "animatedsprite.h"
+#include "effectmanager.h"
+#include "map.h"
#include "particlecontainer.h"
+#include "sprite.h"
+
+#include "gui/speechbubble.h"
+
+#include "resources/colordb.h"
#define FIRST_IGNORE_EMOTE 14
#define STATUS_EFFECTS 32
@@ -42,8 +48,8 @@ class ItemInfo;
class Item;
class Map;
class Graphics;
-class ImageSet;
class Particle;
+class SpeechBubble;
class Text;
/**
@@ -113,20 +119,17 @@ class Being : public Sprite
/**
* Directions, to be used as bitmask values
*/
- static const char DOWN = 1;
- static const char LEFT = 2;
- static const char UP = 4;
- static const char RIGHT = 8;
+ enum { DOWN = 1, LEFT = 2, UP = 4, RIGHT = 8 };
Uint16 mJob; /**< Job (player job, npc, monster, ) */
Uint16 mX, mY; /**< Tile coordinates */
- Uint8 mAction; /**< Action the being is performing */
- Uint8 mFrame;
+ Action mAction; /**< Action the being is performing */
+ Uint16 mFrame;
Uint16 mWalkTime;
Uint8 mEmotion; /**< Currently showing emotion */
Uint8 mEmotionTime; /**< Time until emotion disappears */
- Uint16 mAttackSpeed; /**< Attack speed */
+ Uint16 mAttackSpeed; /**< Attack speed */
/**
* Constructor.
@@ -162,8 +165,12 @@ class Being : public Sprite
*
* @param amount The amount of damage.
*/
- virtual void
- takeDamage(int amount);
+ virtual void takeDamage(int amount);
+
+ /**
+ * Puts a crit notification bubble above this being.
+ */
+ virtual void showCrit();
/**
* Handles an attack of another being by this being.
@@ -171,22 +178,19 @@ class Being : public Sprite
* @param victim The attacked being.
* @param damage The amount of damage dealt (0 means miss).
*/
- virtual void
- handleAttack(Being *victim, int damage);
+ virtual void handleAttack(Being *victim, int damage);
/**
* Returns the name of the being.
*/
- const std::string&
- getName() const { return mName; }
+ const std::string& getName() const { return mName; }
/**
* Sets the name for the being.
*
* @param name The name that should appear.
*/
- virtual void
- setName(const std::string &name) { mName = name; }
+ virtual void setName(const std::string &name) { mName = name; }
/**
* Gets the hair color for this being.
@@ -201,46 +205,51 @@ class Being : public Sprite
{ return mHairStyle; }
/**
+ * Get the number of hairstyles implemented
+ */
+ static int getNumOfHairstyles() { return mNumberOfHairstyles; }
+
+ /**
* Sets the hair style and color for this being.
*/
- virtual void
- setHairStyle(int style, int color);
+ virtual void setHairStyle(int style, int color);
/**
* Sets visible equipments for this being.
*/
- virtual void
- setSprite(int slot, int id, std::string color = "");
+ virtual void setSprite(int slot, int id, std::string color = "");
/**
* Sets the gender of this being.
*/
- virtual void
- setGender(int gender) { mGender = gender; }
+ virtual void setGender(int gender) { mGender = gender; }
/**
* Gets the gender of this being.
*/
- int
- getGender() const { return mGender; }
+ int getGender() const { return mGender; }
/**
* Makes this being take the next step of his path.
*/
- virtual void
- nextStep();
+ virtual void nextStep();
+
+ virtual void setGM() { mIsGM = true; }
/**
* Performs being logic.
*/
- virtual void
- logic();
+ virtual void logic();
+
+ /**
+ * Draws the speech text above the being.
+ */
+ void drawSpeech(Graphics *graphics, int offsetX, int offsetY);
/**
* Draws the emotion picture above the being.
*/
- void
- drawEmotion(Graphics *graphics, int offsetX, int offsetY);
+ void drawEmotion(Graphics *graphics, int offsetX, int offsetY);
/**
* Returns the type of the being.
@@ -250,26 +259,22 @@ class Being : public Sprite
/**
* Gets the walk speed.
*/
- Uint16
- getWalkSpeed() const { return mWalkSpeed; }
+ Uint16 getWalkSpeed() const { return mWalkSpeed; }
/**
* Sets the walk speed.
*/
- void
- setWalkSpeed(Uint16 speed) { mWalkSpeed = speed; }
+ void setWalkSpeed(Uint16 speed) { mWalkSpeed = speed; }
/**
* Gets the sprite id.
*/
- Uint32
- getId() const { return mId; }
+ Uint32 getId() const { return mId; }
/**
* Sets the sprite id.
*/
- void
- setId(Uint32 id) { mId = id; }
+ void setId(Uint32 id) { mId = id; }
/**
* Sets the map the being is on
@@ -279,8 +284,7 @@ class Being : public Sprite
/**
* Sets the current action.
*/
- virtual void
- setAction(Uint8 action);
+ virtual void setAction(Action action);
/**
* Returns the current direction.
@@ -293,50 +297,53 @@ class Being : public Sprite
void setDirection(Uint8 direction);
/**
+ * Gets the current action.
+ */
+ int getWalkTime() { return mWalkTime; }
+
+ /**
+ * Returns the direction the being is facing.
+ */
+ SpriteDirection getSpriteDirection() const;
+
+ /**
* Draws this being to the given graphics context.
*
* @see Sprite::draw(Graphics, int, int)
*/
- virtual void
- draw(Graphics *graphics, int offsetX, int offsetY) const;
+ virtual void draw(Graphics *graphics, int offsetX, int offsetY) const;
/**
* Returns the pixel X coordinate.
*/
- int
- getPixelX() const { return mPx; }
+ int getPixelX() const { return mPx; }
/**
* Returns the pixel Y coordinate.
*
* @see Sprite::getPixelY()
*/
- int
- getPixelY() const { return mPy; }
+ int getPixelY() const { return mPy; }
/**
* Get the current X pixel offset.
*/
- int
- getXOffset() const { return getOffset(LEFT, RIGHT); }
+ int getXOffset() const { return getOffset(LEFT, RIGHT); }
/**
* Get the current Y pixel offset.
*/
- int
- getYOffset() const { return getOffset(UP, DOWN); }
+ int getYOffset() const { return getOffset(UP, DOWN); }
/**
* Returns the horizontal size of the current base sprite of the being
*/
- virtual int
- getWidth() const;
+ virtual int getWidth() const;
/**
* Returns the vertical size of the current base sprite of the being
*/
- virtual int
- getHeight() const;
+ virtual int getHeight() const;
/**
* Returns the required size of a target cursor for this being.
@@ -355,19 +362,11 @@ class Being : public Sprite
mEmotionTime = emote_time;
}
- /**
- * Triggers a visual effect, such as `level up'
- *
- * Only draws the visual effect, does not play sound effects
- *
- * \param effectId ID of the effect to trigger
- */
- virtual void
- triggerEffect(int effectId) { internalTriggerEffect(effectId, false, true); }
+ // Target cursor being used by the being
+ Image *mTargetCursor;
const std::auto_ptr<Equipment> mEquipment;
-
static int getHairColorsNr(void);
static int getHairStylesNr(void);
@@ -386,19 +385,13 @@ class Being : public Sprite
virtual void updateCoords() {}
/**
- * Returns the sprite direction of this being.
- */
- SpriteDirection getSpriteDirection() const;
-
- /**
* Trigger visual effect, with components
*
* \param effectId ID of the effect to trigger
* \param sfx Whether to trigger sound effects
* \param gfx Whether to trigger graphical effects
*/
- void
- internalTriggerEffect(int effectId, bool sfx, bool gfx);
+ void internalTriggerEffect(int effectId, bool sfx, bool gfx);
Uint32 mId; /**< Unique sprite id */
Uint16 mWalkSpeed; /**< Walking speed */
@@ -406,14 +399,19 @@ class Being : public Sprite
Map *mMap; /**< Map on which this being resides */
std::string mName; /**< Name of character */
SpriteIterator mSpriteIterator;
+ bool mIsGM;
+ bool mParticleEffects; /**< Whether to display particles or not */
typedef std::bitset<STATUS_EFFECTS> StatusEffects;
/** Engine-related infos about weapon. */
const ItemInfo* mEquippedWeapon;
+ static int mNumberOfHairstyles; /** Number of hair styles in use */
+
Path mPath;
- Text *mSpeech;
+ std::string mSpeech;
+ Text *mText;
Uint16 mHairStyle, mHairColor;
Uint8 mGender;
Uint32 mSpeechTime;
@@ -435,6 +433,9 @@ class Being : public Sprite
*/
int getOffset(char pos, char neg) const;
+ // Speech Bubble components
+ SpeechBubble *mSpeechBubble;
+
static int instances; /**< Number of Being instances */
static ImageSet *emotionSet; /**< Emoticons used by beings */
};
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index 51d45213..ada1ddfa 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
+#include <cassert>
#include "beingmanager.h"
-
#include "localplayer.h"
#include "monster.h"
#include "npc.h"
@@ -157,8 +156,6 @@ Being* BeingManager::findBeingByName(std::string name, Being::Type type)
return NULL;
}
-
-
Beings& BeingManager::getAll()
{
return mBeings;
@@ -191,7 +188,7 @@ void BeingManager::clear()
mBeings.remove(player_node);
}
- for_each(mBeings.begin(), mBeings.end(), make_dtor(mBeings));
+ delete_all(mBeings);
mBeings.clear();
if (player_node)
@@ -206,9 +203,12 @@ Being* BeingManager::findNearestLivingBeing(Uint16 x, Uint16 y, int maxdist,
Being *closestBeing = NULL;
int dist = 0;
- for (BeingIterator i = mBeings.begin(); i != mBeings.end(); i++)
+ BeingIterator itr = mBeings.begin();
+ BeingIterator itr_end = mBeings.end();
+
+ for (; itr != itr_end; ++itr)
{
- Being *being = (*i);
+ Being *being = (*itr);
int d = abs(being->mX - x) + abs(being->mY - y);
if ((being->getType() == type || type == Being::UNKNOWN)
diff --git a/src/beingmanager.h b/src/beingmanager.h
index 7a840030..0179bed8 100644
--- a/src/beingmanager.h
+++ b/src/beingmanager.h
@@ -49,7 +49,7 @@ class BeingManager
/**
* Create a being and add it to the list of beings.
*/
- Being* createBeing(Uint32 id, Uint16 job);
+ Being *createBeing(Uint32 id, Uint16 job);
/**
* Remove a Being.
@@ -60,33 +60,36 @@ class BeingManager
* Return a specific id Being.
*/
Being* findBeing(Uint32 id);
+ Being* findBeingByPixel(Uint16 x, Uint16 y);
/**
- * Return a being at specific coordinates.
+ * Returns a being at specific coordinates.
*/
Being* findBeing(Uint16 x, Uint16 y, Being::Type type = Being::UNKNOWN);
- Being* findBeingByPixel(Uint16 x, Uint16 y);
- /**
- * Return a being nearest to specific coordinates.
- *
- * \param maxdist maximal distance. If minimal distance is larger,
- * no being is returned
- */
+ /**
+ * Returns a being nearest to specific coordinates.
+ *
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ * @param maxdist Maximal distance. If minimal distance is larger,
+ * no being is returned.
+ * @param type The type of being to look for.
+ */
Being* findNearestLivingBeing(Uint16 x, Uint16 y, int maxdist,
Being::Type type = Being::UNKNOWN);
- /**
- * Finds a being by name and (optionally) by type.
- */
+ /**
+ * Finds a being by name and (optionally) by type.
+ */
Being* findBeingByName(std::string name, Being::Type type = Being::UNKNOWN);
- /**
- * Return a being nearest to another being.
- *
- * \param maxdist maximal distance. If minimal distance is larger,
- * no being is returned
- */
+ /**
+ * Returns a being nearest to another being.
+ *
+ * \param maxdist maximal distance. If minimal distance is larger,
+ * no being is returned
+ */
Being* findNearestLivingBeing(Being *aroundBeing, int maxdist,
Being::Type type = Being::UNKNOWN);
diff --git a/src/configlistener.h b/src/configlistener.h
index b740720f..9fbc4544 100644
--- a/src/configlistener.h
+++ b/src/configlistener.h
@@ -24,7 +24,6 @@
#include <iosfwd>
-
/**
* The listener interface for receiving notifications about changes to
* configuration options.
diff --git a/src/configuration.cpp b/src/configuration.cpp
index e2deae31..8e80de18 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -19,12 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-#include "configuration.h"
-
#include <libxml/xmlwriter.h>
#include "configlistener.h"
+#include "configuration.h"
#include "log.h"
#include "utils/tostring.h"
diff --git a/src/configuration.h b/src/configuration.h
index 3751d429..197e1a41 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -22,11 +22,11 @@
#ifndef _TMW_CONFIGURATION_H
#define _TMW_CONFIGURATION_H
-#include <map>
-#include <list>
-#include <string>
#include <cassert>
#include <libxml/xmlwriter.h>
+#include <list>
+#include <map>
+#include <string>
class ConfigListener;
class ConfigurationObject;
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
new file mode 100644
index 00000000..4b835355
--- /dev/null
+++ b/src/effectmanager.cpp
@@ -0,0 +1,85 @@
+/*
+ * 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
+ *
+ */
+
+#include "effectmanager.h"
+
+#include "particle.h"
+#include "log.h"
+#include "sound.h"
+
+#include "utils/xml.h"
+
+
+EffectManager::EffectManager()
+{
+ XML::Document doc("effects.xml");
+ xmlNodePtr root = doc.rootNode();
+
+ if (!root || !xmlStrEqual(root->name, BAD_CAST "being-effects"))
+ {
+ logger->log("Error loading being effects file: effects.xml");
+ return;
+ }
+ else
+ {
+ logger->log("Effects are now loading");
+ }
+
+ for_each_xml_child_node(node, root)
+ {
+ int id;
+
+ if (xmlStrEqual(node->name, BAD_CAST "effect"))
+ {
+ EffectDescription ed;
+ ed.id = XML::getProperty(node, "id", -1);
+ ed.GFX = XML::getProperty(node, "particle", "");
+ ed.SFX = XML::getProperty(node, "audio", "");
+ mEffects.push_back(ed);
+ }
+ }
+}
+
+EffectManager::~EffectManager()
+{
+
+}
+
+bool EffectManager::trigger(int id, int x, int y)
+{
+ bool rValue = false;
+ for (std::list<EffectDescription>::iterator i = mEffects.begin(); i != mEffects.end(); ++i)
+ {
+ if ((*i).id == id)
+ {
+ printf("Found effect, playing it");
+ rValue = true;
+ if((*i).GFX != "")
+ particleEngine->addEffect((*i).GFX, x, y);
+ if((*i).SFX != "")
+ sound.playSfx((*i).SFX);
+ break;
+ }
+ }
+ return rValue;
+}
+
diff --git a/src/gui/buddywindow.h b/src/effectmanager.h
index 6b07f470..b5451f27 100644
--- a/src/gui/buddywindow.h
+++ b/src/effectmanager.h
@@ -17,40 +17,41 @@
* You should have received a copy of the GNU General Public License
* 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_BUDDYWINDOW_H
-#define _TMW_BUDDYWINDOW_H
+#ifndef _EFFECT_MANAGER_H
+#define _EFFECT_MANAGER_H
-#include <guichan/actionlistener.hpp>
+#include <string>
+#include <list>
-#include "window.h"
+class EffectManager
+{
-#include "../guichanfwd.h"
+ public:
+ struct EffectDescription {
+ int id;
+ std::string GFX;
+ std::string SFX;
+ };
-class BuddyList;
+
+ EffectManager();
+
+ ~EffectManager();
-/**
- * Window showing buddy list.
- *
- * \ingroup Interface
- */
-class BuddyWindow : public Window, public gcn::ActionListener
-{
- public:
/**
- * Constructor.
+ * Triggers a effect with the id, at x,y
+ * returns true if ID exists
*/
- BuddyWindow();
+ bool trigger(int id, int x = 0, int y = 0);
- /**
- * Performs action.
- */
- void action(const gcn::ActionEvent &event);
+ private:
+ std::list<EffectDescription> mEffects;
- private:
- BuddyList *mBuddyList;
- gcn::ListBox *mListbox;
};
-#endif /* _TMW_BUDDYWINDOW_H */
+extern EffectManager *effectManager;
+
+#endif // _EFFECT_MANAGER_H
diff --git a/src/engine.cpp b/src/engine.cpp
index 2edc6550..74e11336 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -19,13 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "engine.h"
-
#include <list>
#include "being.h"
#include "beingmanager.h"
#include "configuration.h"
+#include "engine.h"
#include "flooritemmanager.h"
#include "game.h"
#include "graphics.h"
@@ -93,6 +92,27 @@ void Engine::changeMap(const std::string &mapPath)
if (newMap->hasProperty("minimap"))
{
mapImage = resman->getImage(newMap->getProperty("minimap"));
+
+ // Set the title for the Minimap
+ if (newMap->hasProperty("mapname"))
+ {
+ minimap->setCaption(newMap->getProperty("mapname"));
+ }
+ else
+ {
+ minimap->setCaption("Unknown");
+ logger->log("WARNING: Map file '%s' defines a minimap image but does not define a 'mapname' property", map_path.c_str());
+ }
+ // How many pixels equal one tile. .5 (which is the TMW default) is 2 tiles to a pixel,
+ // while 1 is 1 tile to 1 pixel
+ if (newMap->hasProperty("minimapproportion"))
+ {
+ minimap->setProportion(atof(newMap->getProperty("minimapproportion").c_str()));
+ }
+ else
+ {
+ minimap->setProportion(0.5);
+ }
}
if (newMap->hasProperty("name"))
{
diff --git a/src/equipment.cpp b/src/equipment.cpp
index 0bdd1c70..f1d1d4f2 100644
--- a/src/equipment.cpp
+++ b/src/equipment.cpp
@@ -19,13 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <algorithm>
+
#include "equipment.h"
#include "item.h"
#include "inventory.h"
#include "localplayer.h"
-#include <algorithm>
-
Equipment::Equipment():
mArrows(0)
{
@@ -40,3 +40,4 @@ Equipment::setEquipment(int index, int inventoryIndex)
if (item)
item->setEquipped(true);
}
+
diff --git a/src/extensions.h b/src/extensions.h
new file mode 100644
index 00000000..5b95afc8
--- /dev/null
+++ b/src/extensions.h
@@ -0,0 +1,34 @@
+/*
+ * Aethyra
+ * Copyright 2008 Lloyd Bryant <sanga@aethyra.com>
+ *
+ * This file is part of the Aethyra project.
+ *
+ * Aethyra 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.
+ *
+ * Aethyra 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 _EXTENSIONS_
+#define _EXTENSIONS_
+
+struct EXTENSIONS
+{
+ bool aethyra_inventory;
+ bool aethyra_spells;
+ bool aethyra_misc;
+};
+
+extern struct EXTENSIONS extensions;
+#endif
diff --git a/src/floor_item.cpp b/src/floor_item.cpp
index 7ad3c0c0..0b114e14 100644
--- a/src/floor_item.cpp
+++ b/src/floor_item.cpp
@@ -20,7 +20,6 @@
*/
#include "floor_item.h"
-
#include "map.h"
FloorItem::FloorItem(unsigned int id,
diff --git a/src/flooritemmanager.cpp b/src/flooritemmanager.cpp
index 006d62c1..7445b1e9 100644
--- a/src/flooritemmanager.cpp
+++ b/src/flooritemmanager.cpp
@@ -19,11 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
-#include "flooritemmanager.h"
-
#include "floor_item.h"
+#include "flooritemmanager.h"
#include "utils/dtor.h"
@@ -48,7 +45,7 @@ void FloorItemManager::destroy(FloorItem *item)
void FloorItemManager::clear()
{
- for_each(mFloorItems.begin(), mFloorItems.end(), make_dtor(mFloorItems));
+ delete_all(mFloorItems);
mFloorItems.clear();
}
diff --git a/src/game.cpp b/src/game.cpp
index 9fa0129e..93bec013 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -26,11 +26,12 @@
#include <sstream>
#include <string>
-#include <guichan/sdl/sdlinput.hpp>
#include <guichan/exception.hpp>
+#include <guichan/sdl/sdlinput.hpp>
#include "beingmanager.h"
#include "configuration.h"
+#include "effectmanager.h"
#include "engine.h"
#include "flooritemmanager.h"
#include "graphics.h"
@@ -74,9 +75,11 @@
#include "net/equipmenthandler.h"
#include "net/inventoryhandler.h"
#include "net/itemhandler.h"
+#include "net/messageout.h"
#include "net/network.h"
#include "net/npchandler.h"
#include "net/playerhandler.h"
+#include "net/protocol.h"
#include "net/skillhandler.h"
#include "net/tradehandler.h"
#include "net/messageout.h"
@@ -93,6 +96,7 @@ std::string map_path;
bool done = false;
volatile int tick_time;
volatile int fps = 0, frame = 0;
+
Engine *engine = NULL;
Joystick *joystick = NULL;
@@ -112,7 +116,6 @@ InventoryWindow *inventoryWindow;
NpcListDialog *npcListDialog;
NpcTextDialog *npcTextDialog;
SkillDialog *skillDialog;
-//NewSkillDialog *newSkillWindow;
Setup* setupWindow;
Minimap *minimap;
EquipmentWindow *equipmentWindow;
@@ -126,11 +129,12 @@ ItemShortcutWindow *itemShortcutWindow;
BeingManager *beingManager = NULL;
FloorItemManager *floorItemManager = NULL;
Particle* particleEngine = NULL;
+EffectManager *effectManager = NULL;
const int MAX_TIME = 10000;
/**
- * Listener used for exitting handling.
+ * Listener used for exiting handling.
*/
namespace {
struct ExitListener : public gcn::ActionListener
@@ -163,15 +167,18 @@ Uint32 nextSecond(Uint32 interval, void *param)
{
fps = frame;
frame = 0;
+
return interval;
}
int get_elapsed_time(int start_time)
{
- if (start_time <= tick_time) {
+ if (start_time <= tick_time)
+ {
return (tick_time - start_time) * 10;
}
- else {
+ else
+ {
return (tick_time + (MAX_TIME - start_time)) * 10;
}
}
@@ -193,7 +200,6 @@ void createGuiWindows(Network *network)
npcTextDialog = new NpcTextDialog();
npcListDialog = new NpcListDialog();
skillDialog = new SkillDialog();
- //newSkillWindow = new NewSkillDialog();
setupWindow = new Setup();
minimap = new Minimap();
equipmentWindow = new EquipmentWindow(player_node->mEquipment.get());
@@ -215,8 +221,7 @@ void createGuiWindows(Network *network)
chatWindow->setVisible((bool) config.getValue(
chatWindow->getWindowName() + "Visible", true));
miniStatusWindow->setVisible((bool) config.getValue(
- miniStatusWindow->getWindowName() + "Visible",
- true));
+ miniStatusWindow->getWindowName() + "Visible", true));
buyDialog->setVisible(false);
sellDialog->setVisible(false);
tradeWindow->setVisible(false);
@@ -251,7 +256,6 @@ void destroyGuiWindows()
delete minimap;
delete equipmentWindow;
//delete chargeDialog;
- //delete newSkillWindow;
delete tradeWindow;
//delete buddyWindow;
delete helpWindow;
@@ -277,6 +281,8 @@ Game::Game(Network *network):
beingManager = new BeingManager(network);
floorItemManager = new FloorItemManager();
+ effectManager = new EffectManager();
+
particleEngine = new Particle(NULL);
particleEngine->setupEngine();
@@ -311,17 +317,13 @@ Game::Game(Network *network):
network->registerHandler(mTradeHandler.get());
/*
- * THIS IS A TEMPORARY WORKAROUND!
- *
- * To prevent the server from sending data before the client has
- * initialized, it's been modified to wait for a "ping" from the client to
- * complete its initialization.
+ * To prevent the server from sending data before the client
+ * has initialized, I've modified it to wait for a "ping"
+ * from the client to complete its initialization
*
- * The real fix is to make sure we are not throwing away messages in the
- * network buffer due to not having registered the handlers above straight
- * after receiving a login success from the map server.
- *
- * The response from eAthena on this packet is ignored by the client.
+ * Note: This only affects the latest eAthena version. This
+ * packet is handled by the older version, but its response
+ * is ignored by the client
*/
MessageOut msg(mNetwork);
msg.writeInt16(CMSG_CLIENT_PING);
@@ -356,17 +358,17 @@ bool saveScreenshot(SDL_Surface *screenshot)
bool found = false;
do {
- screenshotCount++;
- filename.str("");
+ screenshotCount++;
+ filename.str("");
#if (defined __USE_UNIX98 || defined __FreeBSD__)
- filename << PHYSFS_getUserDir() << ".tmw/";
+ filename << PHYSFS_getUserDir() << ".aethyra/";
#elif defined __APPLE__
- filename << PHYSFS_getUserDir() << "Desktop/";
+ filename << PHYSFS_getUserDir() << "Desktop/";
#endif
- filename << "TMW_Screenshot_" << screenshotCount << ".png";
- testExists.open(filename.str().c_str(), std::ios::in);
- found = !testExists.is_open();
- testExists.close();
+ filename << "Ae_Screenshot_" << screenshotCount << ".png";
+ testExists.open(filename.str().c_str(), std::ios::in);
+ found = !testExists.is_open();
+ testExists.close();
} while (!found);
if (ImageWriter::writePNG(screenshot, filename.str()))
@@ -403,61 +405,61 @@ void Game::logic()
while (!done)
{
- // Handle all necessary game logic
- while (get_elapsed_time(gameTime) > 0)
- {
- handleInput();
- engine->logic();
- gameTime++;
- }
+ // Handle all necessary game logic
+ while (get_elapsed_time(gameTime) > 0)
+ {
+ handleInput();
+ engine->logic();
+ gameTime++;
+ }
- // This is done because at some point tick_time will wrap.
- gameTime = tick_time;
+ // This is done because at some point tick_time will wrap.
+ gameTime = tick_time;
- // Update the screen when application is active, delay otherwise.
- if (SDL_GetAppState() & SDL_APPACTIVE)
+ // Update the screen when application is active, delay otherwise.
+ if (SDL_GetAppState() & SDL_APPACTIVE)
+ {
+ // Draw a frame if either frames are not limited or enough time has
+ // passed since the last frame.
+ if (!mMinFrameTime ||
+ get_elapsed_time(mDrawTime / 10) > mMinFrameTime)
{
- // Draw a frame if either frames are not limited or enough time has
- // passed since the last frame.
- if (!mMinFrameTime ||
- get_elapsed_time(mDrawTime / 10) > mMinFrameTime)
- {
- frame++;
- gui->draw();
- graphics->updateScreen();
- mDrawTime += mMinFrameTime;
-
- // Make sure to wrap mDrawTime, since tick_time will wrap.
- if (mDrawTime > MAX_TIME * 10)
- mDrawTime -= MAX_TIME * 10;
- }
- else
- {
- SDL_Delay(10);
- }
+ frame++;
+ gui->draw();
+ graphics->updateScreen();
+ mDrawTime += mMinFrameTime;
+
+ // Make sure to wrap mDrawTime, since tick_time will wrap.
+ if (mDrawTime > MAX_TIME * 10)
+ mDrawTime -= MAX_TIME * 10;
}
else
{
SDL_Delay(10);
- mDrawTime = tick_time * 10;
}
+ }
+ else
+ {
+ SDL_Delay(10);
+ mDrawTime = tick_time * 10;
+ }
- // Handle network stuff
- mNetwork->flush();
- mNetwork->dispatchMessages();
+ // Handle network stuff
+ mNetwork->flush();
+ mNetwork->dispatchMessages();
- if (!mNetwork->isConnected())
+ if (!mNetwork->isConnected())
+ {
+ if (!disconnectedDialog)
{
- if (!disconnectedDialog)
- {
- disconnectedDialog = new
- OkDialog("Network Error",
- "The connection to the server was lost, the program will now quit");
- disconnectedDialog->addActionListener(&exitListener);
- disconnectedDialog->requestMoveToTop();
- }
+ disconnectedDialog = new
+ OkDialog("Network Error",
+ "The connection to the server was lost, the program will now quit");
+ disconnectedDialog->addActionListener(&exitListener);
+ disconnectedDialog->requestMoveToTop();
}
}
+ }
}
void Game::handleInput()
@@ -478,7 +480,7 @@ void Game::handleInput()
{
gcn::Window *requestedWindow = NULL;
- if (setupWindow->isVisible() &&
+ if (setupWindow->isVisible() &&
keyboard.getNewKeyIndex() > keyboard.KEY_NO_VALUE)
{
keyboard.setNewKey((int) event.key.keysym.sym);
@@ -534,194 +536,202 @@ void Game::handleInput()
}
used = true;
break;
- }
}
+ }
- // Smilie
- if (keyboard.isKeyActive(keyboard.KEY_SMILIE))
+ // Smilie
+ if (keyboard.isKeyActive(keyboard.KEY_SMILIE))
+ {
+ // Emotions
+ Uint8 emotion;
+ switch (event.key.keysym.sym)
{
- // Emotions
- Uint8 emotion;
- switch (event.key.keysym.sym)
+ case SDLK_1: emotion = 1; break;
+ case SDLK_2: emotion = 2; break;
+ case SDLK_3: emotion = 3; break;
+ case SDLK_4: emotion = 4; break;
+ case SDLK_5: emotion = 5; break;
+ case SDLK_6: emotion = 6; break;
+ case SDLK_7: emotion = 7; break;
+ case SDLK_8: emotion = 8; break;
+ case SDLK_9: emotion = 9; break;
+ case SDLK_0: emotion = 10; break;
+ case SDLK_MINUS: emotion = 11; break;
+ case SDLK_EQUALS: emotion = 12; break;
+ default: emotion = 0; break;
+ }
+
+ if (emotion)
+ {
+ player_node->emote(emotion);
+ used = true;
+ }
+ }
+ switch (event.key.keysym.sym)
+ {
+ case SDLK_PAGEUP:
+ if (chatWindow->isVisible())
{
- case SDLK_1: emotion = 1; break;
- case SDLK_2: emotion = 2; break;
- case SDLK_3: emotion = 3; break;
- case SDLK_4: emotion = 4; break;
- case SDLK_5: emotion = 5; break;
- case SDLK_6: emotion = 6; break;
- case SDLK_7: emotion = 7; break;
- case SDLK_8: emotion = 8; break;
- case SDLK_9: emotion = 9; break;
- case SDLK_0: emotion = 10; break;
- case SDLK_MINUS: emotion = 11; break;
- case SDLK_EQUALS: emotion = 12; break;
- default: emotion = 0; break;
+ chatWindow->scroll(-DEFAULT_CHAT_WINDOW_SCROLL);
+ used = true;
}
+ break;
- if (emotion)
+ case SDLK_PAGEDOWN:
+ if (chatWindow->isVisible())
{
- player_node->emote(emotion);
+ chatWindow->scroll(DEFAULT_CHAT_WINDOW_SCROLL);
used = true;
return;
}
- }
- switch (event.key.keysym.sym)
- {
- case SDLK_PAGEUP:
- if (chatWindow->isVisible())
- {
- chatWindow->scroll(-DEFAULT_CHAT_WINDOW_SCROLL);
- used = true;
- }
- break;
+ break;
- case SDLK_PAGEDOWN:
- if (chatWindow->isVisible())
- {
- chatWindow->scroll(DEFAULT_CHAT_WINDOW_SCROLL);
- used = true;
- }
+ case SDLK_F1:
+ // In-game Help
+ if (helpWindow->isVisible())
+ {
+ helpWindow->setVisible(false);
+ }
+ else
+ {
+ helpWindow->loadHelp("index");
+ helpWindow->requestMoveToTop();
+ }
+ used = true;
+ break;
+
+ case SDLK_F2: requestedWindow = statusWindow; break;
+ case SDLK_F3: requestedWindow = inventoryWindow; break;
+ case SDLK_F4: requestedWindow = equipmentWindow; break;
+ case SDLK_F5: requestedWindow = skillDialog; break;
+ case SDLK_F6: requestedWindow = minimap; break;
+ case SDLK_F7: requestedWindow = chatWindow; break;
+ case SDLK_F8: requestedWindow = itemShortcutWindow; break;
+ case SDLK_F9: requestedWindow = setupWindow; break;
+ case SDLK_F10: requestedWindow = debugWindow; break;
+
+ case SDLK_RETURN:
+ // Input chat window
+ if (chatWindow->isInputFocused() ||
+ deathNotice != NULL ||
+ weightNotice != NULL)
+ {
break;
+ }
- case SDLK_F1:
- // In-game Help
- if (helpWindow->isVisible())
- {
- helpWindow->setVisible(false);
- }
- else
- {
- helpWindow->loadHelp("index");
- helpWindow->requestMoveToTop();
- }
+ // Quit by pressing Enter if the exit confirm is there
+ if (exitConfirm)
+ {
+ done = true;
+ }
+ // Close the Browser if opened
+ else if (helpWindow->isVisible())
+ {
+ helpWindow->setVisible(false);
+ }
+ // Close the config window, cancelling changes if opened
+ else if (setupWindow->isVisible())
+ {
+ setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
+ }
+ // Proceed to the next dialog option, or close the window
+ else if (npcTextDialog->isVisible())
+ {
+ npcTextDialog->action(gcn::ActionEvent(NULL, "ok"));
+ }
+ // Choose the currently highlighted dialogue option
+ else if (npcListDialog->isVisible())
+ {
+ npcListDialog->action(gcn::ActionEvent(NULL, "ok"));
+ }
+ // Else, open the chat edit box
+ else
+ {
+ chatWindow->requestChatFocus();
used = true;
- break;
-
- case SDLK_F2: requestedWindow = statusWindow; break;
- case SDLK_F3: requestedWindow = inventoryWindow; break;
- case SDLK_F4: requestedWindow = equipmentWindow; break;
- case SDLK_F5: requestedWindow = skillDialog; break;
- case SDLK_F6: requestedWindow = minimap; break;
- case SDLK_F7: requestedWindow = chatWindow; break;
- case SDLK_F8: requestedWindow = itemShortcutWindow; break;
- case SDLK_F9: requestedWindow = setupWindow; break;
- case SDLK_F10: requestedWindow = debugWindow; break;
- //case SDLK_F11: requestedWindow = newSkillWindow; break;
-
- case SDLK_RETURN:
- // Input chat window
- if (chatWindow->isInputFocused() ||
- deathNotice != NULL ||
- weightNotice != NULL)
- {
- break;
- }
+ }
+ break;
+ // Quitting confirmation dialog
+ case SDLK_ESCAPE:
+ if (!exitConfirm) {
+ exitConfirm = new ConfirmDialog(
+ "Quit", "Are you sure you want to quit?");
+ exitConfirm->addActionListener(&exitListener);
+ exitConfirm->requestMoveToTop();
+ }
+ else
+ {
+ exitConfirm->action(gcn::ActionEvent(NULL, "no"));
+ }
+ break;
- // Quit by pressing Enter if the exit confirm is there
- if (exitConfirm)
- {
- done = true;
- }
- // Close the Browser if opened
- else if (helpWindow->isVisible())
- {
- helpWindow->setVisible(false);
- }
- // Close the config window, cancelling changes if opened
- else if (setupWindow->isVisible())
- {
- setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
- }
- // Else, open the chat edit box
- else
- {
- chatWindow->requestChatFocus();
- used = true;
- }
- break;
- // Quitting confirmation dialog
- case SDLK_ESCAPE:
- if (!exitConfirm) {
- exitConfirm = new ConfirmDialog(
- "Quit", "Are you sure you want to quit?");
- exitConfirm->addActionListener(&exitListener);
- exitConfirm->requestMoveToTop();
- }
- else
- {
- exitConfirm->action(gcn::ActionEvent(NULL, "no"));
- }
- break;
+ default:
+ break;
+ }
+ if (keyboard.isEnabled() && !chatWindow->isInputFocused())
+ {
+ const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
- default:
- break;
- }
- if (keyboard.isEnabled() && !chatWindow->isInputFocused())
+ // Do not activate shortcuts if tradewindow is visible
+ if (!tradeWindow->isVisible())
{
- const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
- // Do not activate shortcuts if tradewindow is visible
- if (!tradeWindow->isVisible())
+ // Checks if any item shortcut is pressed.
+ for (int i = KeyboardConfig::KEY_SHORTCUT_0;
+ i <= KeyboardConfig::KEY_SHORTCUT_9;
+ i++)
{
- // Checks if any item shortcut is pressed.
- for (int i = KeyboardConfig::KEY_SHORTCUT_0;
- i <= KeyboardConfig::KEY_SHORTCUT_9;
- i++)
- {
- if (tKey == i && !used) {
- itemShortcut->useItem(
- i - KeyboardConfig::KEY_SHORTCUT_0);
- break;
- }
+ if (tKey == i && !used) {
+ itemShortcut->useItem(i - KeyboardConfig::KEY_SHORTCUT_0);
+ break;
}
}
- switch (tKey) {
- case KeyboardConfig::KEY_PICKUP:
+ }
+ switch (tKey) {
+ case KeyboardConfig::KEY_PICKUP:
+ {
+ FloorItem *item = floorItemManager->findByCoordinates(
+ player_node->mX, player_node->mY);
+
+ // If none below the player, try the tile in front
+ // of the player
+ if (!item) {
+ Uint16 x = player_node->mX;
+ Uint16 y = player_node->mY;
+ switch (player_node->getSpriteDirection())
{
- FloorItem *item = floorItemManager->findByCoordinates(
- player_node->mX, player_node->mY);
-
- // If none below the player, try the tile in front of
- // the player
- if (!item) {
- Uint16 x = player_node->mX;
- Uint16 y = player_node->mY;
- if (player_node->getDirection() & Being::UP)
- y--;
- if (player_node->getDirection() & Being::DOWN)
- y++;
- if (player_node->getDirection() & Being::LEFT)
- x--;
- if (player_node->getDirection() & Being::RIGHT)
- x++;
-
- item = floorItemManager->findByCoordinates(x, y);
- }
+ case DIRECTION_UP : --y; break;
+ case DIRECTION_DOWN : ++y; break;
+ case DIRECTION_LEFT : --x; break;
+ case DIRECTION_RIGHT: ++x; break;
+ default: break;
+ }
+ item = floorItemManager->findByCoordinates(x, y);
+ }
- if (item)
- player_node->pickUp(item);
+ if (item)
+ player_node->pickUp(item);
- used = true;
- }
- break;
- case KeyboardConfig::KEY_SIT:
- // Player sit action
- player_node->toggleSit();
- used = true;
- break;
- case KeyboardConfig::KEY_HIDE_WINDOWS:
- // Hide certain windows
- if (!chatWindow->isInputFocused())
- {
- statusWindow->setVisible(false);
- inventoryWindow->setVisible(false);
- skillDialog->setVisible(false);
- setupWindow->setVisible(false);
- equipmentWindow->setVisible(false);
- helpWindow->setVisible(false);
- debugWindow->setVisible(false);
- }
- break;
+ used = true;
+ }
+ break;
+ case KeyboardConfig::KEY_SIT:
+ // Player sit action
+ player_node->toggleSit();
+ used = true;
+ break;
+ case KeyboardConfig::KEY_HIDE_WINDOWS:
+ // Hide certain windows
+ if (!chatWindow->isInputFocused())
+ {
+ statusWindow->setVisible(false);
+ inventoryWindow->setVisible(false);
+ skillDialog->setVisible(false);
+ setupWindow->setVisible(false);
+ equipmentWindow->setVisible(false);
+ helpWindow->setVisible(false);
+ debugWindow->setVisible(false);
+ }
+ break;
}
}
@@ -756,7 +766,6 @@ void Game::handleInput()
logger->log("Warning: guichan input exception: %s", err);
}
}
-
} // End while
// If the user is configuring the keys then don't respond.
if (!keyboard.isEnabled())
@@ -782,7 +791,7 @@ void Game::handleInput()
direction |= Being::UP;
}
else if (keyboard.isKeyActive(keyboard.KEY_MOVE_DOWN) ||
- (joystick && joystick->isDown()))
+ (joystick && joystick->isDown()))
{
direction |= Being::DOWN;
}
@@ -802,60 +811,88 @@ void Game::handleInput()
// Attacking monsters
if (keyboard.isKeyActive(keyboard.KEY_ATTACK) ||
- (joystick && joystick->buttonPressed(0)))
+ (joystick && joystick->buttonPressed(0)))
{
- Being *target = NULL;
- bool newTarget = keyboard.isKeyActive(keyboard.KEY_TARGET);
+ Being *target = beingManager->findNearestLivingBeing(x, y, 20, Being::MONSTER);
+
+ bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET);
// A set target has highest priority
if (newTarget || !player_node->getTarget())
{
Uint16 targetX = x, targetY = y;
- if (player_node->getDirection() & Being::UP)
- targetY--;
- if (player_node->getDirection() & Being::DOWN)
- targetY++;
- if (player_node->getDirection() & Being::LEFT)
- targetX--;
- if (player_node->getDirection() & Being::RIGHT)
- targetX++;
+ switch (player_node->getSpriteDirection())
+ {
+ case DIRECTION_UP : --targetY; break;
+ case DIRECTION_DOWN : ++targetY; break;
+ case DIRECTION_LEFT : --targetX; break;
+ case DIRECTION_RIGHT: ++targetX; break;
+ default: break;
+ }
// Attack priorioty is: Monster, Player, auto target
- target = beingManager->findBeing(
- targetX, targetY, Being::MONSTER);
+ target = beingManager->findBeing(targetX, targetY, Being::MONSTER);
if (!target)
- target = beingManager->findBeing(
- targetX, targetY, Being::PLAYER);
+ target = beingManager->findBeing(targetX, targetY, Being::PLAYER);
}
player_node->attack(target, newTarget);
}
- // Target the nearest player
- if (keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER))
+ // Target the nearest player if 'q' is pressed
+ if ( keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER) &&
+ !keyboard.isKeyActive(keyboard.KEY_TARGET) )
{
- Being *target = beingManager->findNearestLivingBeing(
- player_node, 20, Being::PLAYER);
+ Being *target = beingManager->findNearestLivingBeing(player_node, 20, Being::PLAYER);
- if (target)
- {
- player_node->setTarget(target);
- }
+ player_node->setTarget(target);
+ }
+
+ // Target the nearest monster if 'a' pressed
+ if ((keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
+ (joystick && joystick->buttonPressed(3))) &&
+ !keyboard.isKeyActive(keyboard.KEY_TARGET))
+ {
+ Being *target = beingManager->findNearestLivingBeing(x, y, 20, Being::MONSTER);
+
+ player_node->setTarget(target);
}
- // Target the nearest monster
- if (keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST)
- || (joystick && joystick->buttonPressed(3)))
+ // Target the nearest npc if 'n' pressed
+ if ( keyboard.isKeyActive(keyboard.KEY_TARGET_NPC) &&
+ !keyboard.isKeyActive(keyboard.KEY_TARGET) )
{
- Being *target =
- beingManager->findNearestLivingBeing(x, y, 20, Being::MONSTER);
+ Being *target = beingManager->findNearestLivingBeing(x, y, 20, Being::NPC);
- if (target)
+ player_node->setTarget(target);
+ }
+
+ // Talk to the nearest NPC if 't' pressed
+ if ( keyboard.isKeyActive(keyboard.KEY_TALK) )
+ {
+ if (!npcTextDialog->isVisible() && !npcListDialog->isVisible())
{
- player_node->setTarget(target);
+ Being *target = player_node->getTarget();
+
+ if (!target)
+ {
+ target = beingManager->findNearestLivingBeing(x, y, 20, Being::NPC);
+ }
+
+ if (target)
+ {
+ if (target->getType() == Being::NPC)
+ dynamic_cast<NPC*>(target)->talk();
+ }
}
}
+ // Stop attacking if shift is pressed
+ if (keyboard.isKeyActive(keyboard.KEY_TARGET))
+ {
+ player_node->stopAttack();
+ }
+
if (joystick)
{
if (joystick->buttonPressed(1))
diff --git a/src/game.h b/src/game.h
index 24e29b7d..1cc18cae 100644
--- a/src/game.h
+++ b/src/game.h
@@ -40,35 +40,35 @@ extern volatile int tick_time;
class Game : public ConfigListener
{
public:
- Game(Network *network);
- ~Game();
+ Game(Network *network);
+ ~Game();
- void logic();
+ void logic();
- void handleInput();
+ void handleInput();
- void optionChanged(const std::string &name);
+ void optionChanged(const std::string &name);
private:
- Network *mNetwork;
-
- /** Used to determine whether to draw the next frame. */
- int mDrawTime;
-
- /** The minimum frame time (used for frame limiting). */
- int mMinFrameTime;
-
- typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr;
- MessageHandlerPtr mBeingHandler;
- MessageHandlerPtr mBuySellHandler;
- MessageHandlerPtr mChatHandler;
- MessageHandlerPtr mEquipmentHandler;
- MessageHandlerPtr mInventoryHandler;
- MessageHandlerPtr mItemHandler;
- MessageHandlerPtr mNpcHandler;
- MessageHandlerPtr mPlayerHandler;
- MessageHandlerPtr mSkillHandler;
- MessageHandlerPtr mTradeHandler;
+ Network *mNetwork;
+
+ /** Used to determine whether to draw the next frame. */
+ int mDrawTime;
+
+ /** The minimum frame time (used for frame limiting). */
+ int mMinFrameTime;
+
+ typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr;
+ MessageHandlerPtr mBeingHandler;
+ MessageHandlerPtr mBuySellHandler;
+ MessageHandlerPtr mChatHandler;
+ MessageHandlerPtr mEquipmentHandler;
+ MessageHandlerPtr mInventoryHandler;
+ MessageHandlerPtr mItemHandler;
+ MessageHandlerPtr mNpcHandler;
+ MessageHandlerPtr mPlayerHandler;
+ MessageHandlerPtr mSkillHandler;
+ MessageHandlerPtr mTradeHandler;
};
/**
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index 1c549949..430a2aa2 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -26,6 +26,7 @@
#include <guichan/mouseinput.hpp>
#include "browserbox.h"
+#include "colour.h"
#include "linkhandler.h"
#ifdef USE_OPENGL
@@ -133,12 +134,12 @@ void BrowserBox::addRow(const std::string &row)
mLinks.push_back(bLink);
- newRow += "##L" + bLink.caption;
+ newRow += "##<" + bLink.caption;
tmp.erase(0, idx3 + 2);
if(tmp != "")
{
- newRow += "##P";
+ newRow += "##>";
}
idx1 = tmp.find("@@");
}
@@ -288,7 +289,8 @@ BrowserBox::draw(gcn::Graphics *graphics)
if ((mHighMode & UNDERLINE))
{
- graphics->setColor(gcn::Color(LINK));
+ bool valid;
+ graphics->setColor(gcn::Color(textColour->getColour('<', valid)));
graphics->drawLine(
mLinks[mSelectedLink].x1,
mLinks[mSelectedLink].y2,
@@ -315,58 +317,26 @@ BrowserBox::draw(gcn::Graphics *graphics)
if ( (mUseLinksAndUserColors && (j + 3) <= row.size()) ||
(!mUseLinksAndUserColors && (j == 0)) )
{
- // Check for color change in format "##x", x = [L,P,0..9]
+ // Check for color change in format "##x"
if ((row.at(j) == '#') && (row.at(j + 1) == '#'))
{
- switch (row.at(j + 2))
+ char c = row.at(j + 2);
+ if (c == '>')
{
- case 'L': // Link color
- prevColor = selColor;
- selColor = LINK;
- break;
- case 'P': // Previous color
- selColor = prevColor;
- break;
- case '1':
- prevColor = selColor;
- selColor = RED;
- break;
- case '2':
- prevColor = selColor;
- selColor = GREEN;
- break;
- case '3':
- prevColor = selColor;
- selColor = BLUE;
- break;
- case '4':
- prevColor = selColor;
- selColor = ORANGE;
- break;
- case '5':
- prevColor = selColor;
- selColor = YELLOW;
- break;
- case '6':
- prevColor = selColor;
- selColor = PINK;
- break;
- case '7':
- prevColor = selColor;
- selColor = PURPLE;
- break;
- case '8':
- prevColor = selColor;
- selColor = GRAY;
- break;
- case '9':
- prevColor = selColor;
- selColor = BROWN;
- break;
- case '0':
- default:
+ selColor = prevColor;
+ }
+ else
+ {
+ bool valid;
+ int rgb = textColour->getColour(c, valid);
+ if (c == '<')
+ {
prevColor = selColor;
- selColor = BLACK;
+ }
+ if (valid)
+ {
+ selColor = rgb;
+ }
}
j += 3;
diff --git a/src/gui/browserbox.h b/src/gui/browserbox.h
index 39ecbda8..267e0fea 100644
--- a/src/gui/browserbox.h
+++ b/src/gui/browserbox.h
@@ -25,8 +25,8 @@
#include <iosfwd>
#include <vector>
-#include <guichan/widget.hpp>
#include <guichan/mouselistener.hpp>
+#include <guichan/widget.hpp>
#include "../guichanfwd.h"
#include "../main.h"
@@ -111,30 +111,13 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener
};
/**
- * BrowserBox colors.
- *
- * NOTES (by Javila):
- * - color values is "0x" prefix followed by HTML color style.
- * - we can add up to 10 different colors: [0..9].
- * - we need a link and a highlighted link colors.
- * - not all colors will be fine with all backgrounds due transparent
- * windows and widgets. So, I think it's better keep BrowserBox
- * opaque (white background) by default.
+ * Some colours used in the browser box
*/
+
enum {
- BLACK = 0x000000, /**< Color 0 */
- RED = 0xff0000, /**< Color 1 */
- GREEN = 0x1fa052, /**< Color 2 */
- BLUE = 0x0000ff, /**< Color 3 */
- ORANGE = 0xe0980e, /**< Color 4 */
- YELLOW = 0xf1dc27, /**< Color 5 */
- PINK = 0xff00d8, /**< Color 6 */
- PURPLE = 0x8415e2, /**< Color 7 */
- GRAY = 0x919191, /**< Color 8 */
- BROWN = 0x8e4c17, /**< Color 9 */
- BGCOLOR = 0xffffff, /**< Bg color for opacity */
- LINK = 0xe50d0d, /**< Color L */
- HIGHLIGHT = 0xcacaca /**< Bg color for highlighted link */
+ BLACK = 0x000000,
+ BGCOLOR = 0xffffff,
+ HIGHLIGHT = 0xcacaca
};
/**
diff --git a/src/gui/button.h b/src/gui/button.h
index f451416c..eecd0dc0 100644
--- a/src/gui/button.h
+++ b/src/gui/button.h
@@ -26,6 +26,8 @@
#include <guichan/widgets/button.hpp>
+#include "../guichanfwd.h"
+
class ImageRect;
/**
diff --git a/src/gui/buttonbox.cpp b/src/gui/buttonbox.cpp
new file mode 100644
index 00000000..903d971d
--- /dev/null
+++ b/src/gui/buttonbox.cpp
@@ -0,0 +1,44 @@
+/*
+ * 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
+ */
+
+#include "button.h"
+#include "buttonbox.h"
+
+ButtonBox::ButtonBox(const std::string &title, const std::string &buttonTxt,
+ ButtonBoxListener *listener) :
+ Window(title),
+ mListener(listener)
+{
+ Button *button = new Button(buttonTxt, "activate", this);
+ setContentSize(button->getWidth() + 10,
+ button->getHeight() + 10);
+ button->setPosition(5, 5);
+ add(button);
+}
+
+void
+ButtonBox::action(const gcn::ActionEvent &event)
+{
+ if (event.getId() == "activate")
+ {
+ mListener->buttonBoxRespond();
+ }
+}
diff --git a/src/gui/newskill.h b/src/gui/buttonbox.h
index 49476e5e..edde4aa4 100644
--- a/src/gui/newskill.h
+++ b/src/gui/buttonbox.h
@@ -19,8 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _TMW_NSKILL_H
-#define _TMW_NSKILL_H
+#ifndef _TMW_BUTTONBOX_H
+#define _TMW_BUTTONBOX_H
+
+#include <string>
#include <guichan/actionlistener.hpp>
@@ -28,42 +30,41 @@
#include "../guichanfwd.h"
-class ProgressBar;
-
-#define N_SKILL 100 // skill count constant
-#define N_SKILL_CAT 9 // skill category count
-#define N_SKILL_CAT_SIZE 10 // skill category maximum size
+class ButtonBoxListener
+{
+ public:
-struct nSkill {
- short level;
- short exp;
+ /*
+ * function that ButtonBox calls when the button has been pressed
+ */
+ virtual void buttonBoxRespond() = 0;
};
-/**
- * Dialog showing the skills in the planned skill model.
- *
- * \ingroup Interface
- */
-class NewSkillDialog : public Window, public gcn::ActionListener
+class ButtonBox : public Window, public gcn::ActionListener
{
public:
- /**
- * Constructor.
- */
- NewSkillDialog();
- // action listener
- void action(const gcn::ActionEvent &event);
+ /*
+ * Constructor
+ *
+ * @param title is the text that appears at the top of the box
+ * @param buttonTxt is the text that appears on the button
+ * @param listener points to the class that should respond to the
+ * button press
+ */
+ ButtonBox(const std::string &title, const std::string &buttonTxt,
+ ButtonBoxListener *listener);
+
+ /*
+ * called when the button is pressed
+ *
+ * @param event is the event that is generated
+ */
+ void
+ action(const gcn::ActionEvent &event);
private:
- void resetNSD(); // updates the values in the dialog box
- // members
- int startPoint; // starting point of skill listing
- ProgressBar *mSkillbar[N_SKILL_CAT_SIZE];
- gcn::Label *mSkillLabel[N_SKILL_CAT_SIZE];
- gcn::Label *mSkillLevel[N_SKILL_CAT_SIZE];
- nSkill mPlayerSkill[N_SKILL]; // pointer to an array of skill values
+ ButtonBoxListener *mListener;
};
-
#endif
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 714f52db..597a7cad 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -19,11 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "buy.h"
-
#include <guichan/widgets/label.hpp>
#include "button.h"
+#include "buy.h"
#include "scrollarea.h"
#include "shop.h"
#include "shoplistbox.h"
@@ -157,9 +156,6 @@ void BuyDialog::action(const gcn::ActionEvent &event)
mSlider->setValue(mAmountItems);
updateButtonsAndLabels();
}
- // TODO: Actually we'd have a bug elsewhere if this check for the number
- // of items to be bought ever fails, Bertram removed the assertions, is
- // there a better way to ensure this fails in an _obivous_ way in C++?
else if (event.getId() == "buy" && mAmountItems > 0 &&
mAmountItems <= mMaxItems)
{
diff --git a/src/gui/buy.h b/src/gui/buy.h
index 0915385a..3b94bbaa 100644
--- a/src/gui/buy.h
+++ b/src/gui/buy.h
@@ -117,9 +117,9 @@ class BuyDialog : public Window, public gcn::ActionListener,
ShopItems *mShopItems;
- int mMoney;
- int mAmountItems;
- int mMaxItems;
+ Uint32 mMoney;
+ Uint32 mAmountItems;
+ Uint32 mMaxItems;
};
#endif
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp
index 42380882..57c95841 100644
--- a/src/gui/buysell.cpp
+++ b/src/gui/buysell.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "buysell.h"
-
#include "button.h"
+#include "buysell.h"
#include "../npc.h"
diff --git a/src/gui/buysell.h b/src/gui/buysell.h
index 2391ed1c..d73205b6 100644
--- a/src/gui/buysell.h
+++ b/src/gui/buysell.h
@@ -26,6 +26,8 @@
#include "window.h"
+#include "../guichanfwd.h"
+
/**
* A dialog to choose between buying or selling at a shop.
*
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index d951f12e..53cc1e8d 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -19,13 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "char_select.h"
-
#include <string>
#include <guichan/widgets/label.hpp>
#include "button.h"
+#include "char_select.h"
#include "confirm_dialog.h"
#include "ok_dialog.h"
#include "playerbox.h"
@@ -254,7 +253,10 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network,
{
mPlayer = new Player(0, 0, NULL);
mPlayer->setGender(gender);
- mPlayer->setHairStyle(rand() % Being::getHairStylesNr(), rand() % Being::getHairColorsNr());
+
+ int numberOfHairColors = ColorDB::size();
+
+ mPlayer->setHairStyle(rand() % mPlayer->getNumOfHairstyles(), rand() % numberOfHairColors);
mNameField = new TextField("");
mNameLabel = new gcn::Label("Name:");
@@ -320,6 +322,7 @@ CharCreateDialog::~CharCreateDialog()
void
CharCreateDialog::action(const gcn::ActionEvent &event)
{
+ int numberOfColors = ColorDB::size();
if (event.getId() == "create") {
if (getName().length() >= 4) {
// Attempt to create the character
@@ -335,16 +338,16 @@ CharCreateDialog::action(const gcn::ActionEvent &event)
scheduleDelete();
}
else if (event.getId() == "nextcolor") {
- mPlayer->setHairStyle(-1, mPlayer->getHairColor() + 1);
+ mPlayer->setHairStyle(mPlayer->getHairStyle(), (mPlayer->getHairColor() + 1) % numberOfColors);
}
else if (event.getId() == "prevcolor") {
- mPlayer->setHairStyle(-1, mPlayer->getHairColor() + Being::getHairColorsNr() - 1);
+ mPlayer->setHairStyle(mPlayer->getHairStyle(), (mPlayer->getHairColor() + numberOfColors - 1) % numberOfColors);
}
else if (event.getId() == "nextstyle") {
- mPlayer->setHairStyle(mPlayer->getHairStyle() + 1, -1);
+ mPlayer->setHairStyle(mPlayer->getHairStyle() + 1, mPlayer->getHairColor());
}
else if (event.getId() == "prevstyle") {
- mPlayer->setHairStyle(mPlayer->getHairStyle() + Being::getHairStylesNr() - 1, -1);
+ mPlayer->setHairStyle(mPlayer->getHairStyle() + mPlayer->getNumOfHairstyles() - 1, mPlayer->getHairColor());
}
}
diff --git a/src/gui/char_select.h b/src/gui/char_select.h
index 0890bea9..63630736 100644
--- a/src/gui/char_select.h
+++ b/src/gui/char_select.h
@@ -22,16 +22,16 @@
#ifndef _CHAR_SELECT_H
#define _CHAR_SELECT_H
+#include <guichan/actionlistener.hpp>
+
#include "window.h"
#include "../guichanfwd.h"
#include "../lockedarray.h"
-#include <guichan/actionlistener.hpp>
-
-class Player;
class LocalPlayer;
class Network;
+class Player;
class PlayerBox;
/**
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index ce068ad1..054aff84 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "char_server.h"
-
#include "button.h"
+#include "char_server.h"
#include "listbox.h"
#include "scrollarea.h"
@@ -106,7 +105,6 @@ ServerSelectDialog::action(const gcn::ActionEvent &event)
mLoginData->hostname = iptostring(si->address);
mLoginData->port = si->port;
mLoginData->updateHost = si->updateHost;
-
state = mNextState;
}
else if (event.getId() == "cancel") {
diff --git a/src/gui/chargedialog.cpp b/src/gui/chargedialog.cpp
index 1c9edf45..1733c7eb 100644
--- a/src/gui/chargedialog.cpp
+++ b/src/gui/chargedialog.cpp
@@ -24,7 +24,6 @@
*/
#include "chargedialog.h"
-
#include "progressbar.h"
#include "../localplayer.h"
diff --git a/src/gui/chargedialog.h b/src/gui/chargedialog.h
index 9517ef6a..53998ab8 100644
--- a/src/gui/chargedialog.h
+++ b/src/gui/chargedialog.h
@@ -24,6 +24,8 @@
#include "window.h"
+#include "../guichanfwd.h"
+
class ProgressBar;
#define CHARGE_TIME 1000 // time in milliseconds it takes to charge up an attack
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 1e22772b..3f12c462 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -20,31 +20,32 @@
*/
#include <algorithm>
-#include <sstream>
+#include <fstream>
#include <guichan/focushandler.hpp>
#include <guichan/key.hpp>
-#include "chat.h"
-
#include "browserbox.h"
+#include "chat.h"
#include "chatinput.h"
#include "scrollarea.h"
#include "windowcontainer.h"
+#include "../beingmanager.h"
#include "../configuration.h"
+#include "../extensions.h"
#include "../game.h"
#include "../localplayer.h"
+#include "../party.h"
+#include "../recorder.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
#include "../utils/trim.h"
-ChatWindow::ChatWindow(Network *network):
- Window(""),
- mNetwork(network),
- mTmpVisible(false)
+ChatWindow::ChatWindow(Network * network):
+Window(""), mNetwork(network), mTmpVisible(false)
{
setWindowName("Chat");
@@ -61,10 +62,10 @@ ChatWindow::ChatWindow(Network *network):
mTextOutput->disableLinksAndUserColors();
mTextOutput->setMaxRow((int) config.getValue("ChatLogLength", 0));
mScrollArea = new ScrollArea(mTextOutput);
- mScrollArea->setPosition(
- mScrollArea->getFrameSize(), mScrollArea->getFrameSize());
- mScrollArea->setScrollPolicy(
- gcn::ScrollArea::SHOW_NEVER, gcn::ScrollArea::SHOW_ALWAYS);
+ mScrollArea->setPosition(mScrollArea->getFrameSize(),
+ mScrollArea->getFrameSize());
+ mScrollArea->setScrollPolicy(gcn::ScrollArea::SHOW_NEVER,
+ gcn::ScrollArea::SHOW_ALWAYS);
mScrollArea->setOpaque(false);
add(mScrollArea);
@@ -73,10 +74,26 @@ ChatWindow::ChatWindow(Network *network):
// Add key listener to chat input to be able to respond to up/down
mChatInput->addKeyListener(this);
mCurHist = mHistory.end();
+
+ // Read the party prefix
+ std::string partyPrefix = config.getValue("PartyPrefix", "$");
+ mPartyPrefix = (partyPrefix == "" ? '$' : partyPrefix.at(0));
+ mReturnToggles = config.getValue("ReturnToggles", "0") == "1";
+ mRecorder = new Recorder(this);
+ mParty = new Party(this, mNetwork);
+}
+
+ChatWindow::~ChatWindow()
+{
+ char partyPrefix[2] = ".";
+ *partyPrefix = mPartyPrefix;
+ config.setValue("PartyPrefix", partyPrefix);
+ config.setValue("ReturnToggles", mReturnToggles ? "1" : "0");
+ delete mRecorder;
}
void
-ChatWindow::logic()
+ ChatWindow::logic()
{
// todo: only do this when the size changes (updateWidgets?)
@@ -84,28 +101,26 @@ ChatWindow::logic()
mChatInput->setPosition(mChatInput->getFrameSize(),
area.height - mChatInput->getHeight() -
- mChatInput->getFrameSize());
+ mChatInput->getFrameSize());
mChatInput->setWidth(area.width - 2 * mChatInput->getFrameSize());
mScrollArea->setWidth(area.width - 2 * mScrollArea->getFrameSize());
mScrollArea->setHeight(area.height - 2 * mScrollArea->getFrameSize() -
- mChatInput->getHeight() - 5);
+ mChatInput->getHeight() - 5);
mScrollArea->logic();
}
-void
-ChatWindow::chatLog(std::string line, int own)
+void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
{
// Trim whitespace
trim(line);
CHATLOG tmp;
- tmp.own = own;
+ tmp.own = own;
tmp.nick = "";
tmp.text = line;
// Fix the owner of welcome message.
- if (line.substr(0, 7) == "Welcome")
- {
+ if (line.substr(0, 7) == "Welcome") {
own = BY_SERVER;
}
@@ -115,37 +130,41 @@ ChatWindow::chatLog(std::string line, int own)
tmp.text = line.substr(pos + 3);
}
- std::string lineColor = "##0"; // Equiv. to BrowserBox::BLACK
+ std::string lineColor = "##C";
switch (own) {
case BY_GM:
tmp.nick += std::string("Global announcement: ");
- lineColor = "##1"; // Equiv. to BrowserBox::RED
+ lineColor = "##G";
break;
case BY_PLAYER:
tmp.nick += CAT_NORMAL;
- lineColor = "##2"; // Equiv. to BrowserBox::GREEN
+ lineColor = "##Y";
break;
case BY_OTHER:
tmp.nick += CAT_NORMAL;
- lineColor = "##0"; // Equiv. to BrowserBox::BLACK
+ lineColor = "##C";
break;
case BY_SERVER:
tmp.nick = "Server: ";
tmp.text = line;
- lineColor = "##7"; // Equiv. to BrowserBox::PINK
+ lineColor = "##S";
+ break;
+ case BY_PARTY:
+ tmp.nick += CAT_NORMAL;
+ lineColor = "##P";
break;
case ACT_WHISPER:
tmp.nick += CAT_WHISPER;
- lineColor = "##3"; // Equiv. to BrowserBox::BLUE
+ lineColor = "##W";
break;
case ACT_IS:
tmp.nick += CAT_IS;
- lineColor = "##5"; // Equiv. to BrowserBox::YELLOW
+ lineColor = "##I";
break;
case BY_LOGGER:
tmp.nick = "";
tmp.text = line;
- lineColor = "##8"; // Equiv. to BrowserBox::GREY
+ lineColor = "##L";
break;
}
@@ -155,41 +174,37 @@ ChatWindow::chatLog(std::string line, int own)
// Format the time string properly
std::stringstream timeStr;
- timeStr << "["
- << ((((t / 60) / 60) % 24 < 10) ? "0" : "")
- << (int)(((t / 60) / 60) % 24)
- << ":"
- << (((t / 60) % 60 < 10) ? "0" : "")
- << (int)((t / 60) % 60)
- << "] ";
+ timeStr << "[" << ((((t / 60) / 60) % 24 < 10) ? "0" : "")
+ << (int) (((t / 60) / 60) % 24)
+ << ":" << (((t / 60) % 60 < 10) ? "0" : "")
+ << (int) ((t / 60) % 60)
+ << "] ";
line = lineColor + timeStr.str() + tmp.nick + tmp.text;
// We look if the Vertical Scroll Bar is set at the max before
// adding a row, otherwise the max will always be a row higher
// at comparison.
- if (mScrollArea->getVerticalScrollAmount() == mScrollArea->getVerticalMaxScroll())
- {
+ if (mScrollArea->getVerticalScrollAmount() ==
+ mScrollArea->getVerticalMaxScroll()) {
mTextOutput->addRow(line);
- mScrollArea->setVerticalScrollAmount(mScrollArea->getVerticalMaxScroll());
- }
- else
- {
+ mScrollArea->setVerticalScrollAmount(mScrollArea->
+ getVerticalMaxScroll());
+ } else {
mTextOutput->addRow(line);
}
+
+ mRecorder->record(line.substr(3));
}
-void
-ChatWindow::chatLog(CHATSKILL act)
+void ChatWindow::chatLog(CHATSKILL act)
{
chatLog(const_msg(act), BY_SERVER);
}
-void
-ChatWindow::action(const gcn::ActionEvent &event)
+void ChatWindow::action(const gcn::ActionEvent & event)
{
- if (event.getId() == "chatinput")
- {
+ if (event.getId() == "chatinput") {
std::string message = mChatInput->getText();
if (!message.empty()) {
@@ -197,7 +212,6 @@ ChatWindow::action(const gcn::ActionEvent &event)
if (mHistory.empty() || message != mHistory.back()) {
mHistory.push_back(message);
}
-
// Reset history iterator
mCurHist = mHistory.end();
@@ -207,24 +221,23 @@ ChatWindow::action(const gcn::ActionEvent &event)
// Clear the text from the chat input
mChatInput->setText("");
}
-
- // Remove focus and hide input
- mFocusHandler->focusNone();
-
- // If the chatWindow is shown up because you want to send a message
- // It should hide now
- if (mTmpVisible) {
- setVisible(false);
+ if (message.empty() || !mReturnToggles) {
+ // Remove focus and hide input
+ mFocusHandler->focusNone();
+
+ // If the chatWindow is shown up because you want to send a message
+ // It should hide now
+ if (mTmpVisible) {
+ setVisible(false);
+ }
}
}
}
-void
-ChatWindow::requestChatFocus()
+void ChatWindow::requestChatFocus()
{
// Make sure chatWindow is visible
- if (!isVisible())
- {
+ if (!isVisible()) {
setVisible(true);
/*
@@ -234,57 +247,38 @@ ChatWindow::requestChatFocus()
*/
mTmpVisible = true;
}
-
// Give focus to the chat input
mChatInput->setVisible(true);
mChatInput->requestFocus();
}
-bool
-ChatWindow::isInputFocused()
+bool ChatWindow::isInputFocused()
{
return mChatInput->isFocused();
}
-void
-ChatWindow::whisper(const std::string &nick, std::string msg, int prefixlen)
-{
- std::string recvnick = "";
- msg.erase(0, prefixlen + 1);
-
- if (msg.substr(0,1) == "\"")
- {
- const std::string::size_type pos = msg.find('"', 1);
- if (pos != std::string::npos) {
- recvnick = msg.substr(1, pos - 1);
- msg.erase(0, pos + 2);
- }
- }
- else
- {
- const std::string::size_type pos = msg.find(" ");
- if (pos != std::string::npos) {
- recvnick = msg.substr(0, pos);
- msg.erase(0, pos + 1);
- }
- }
-
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_CHAT_WHISPER);
- outMsg.writeInt16(msg.length() + 28);
- outMsg.writeString(recvnick, 24);
- outMsg.writeString(msg, msg.length());
-
- chatLog("Whispering to " + recvnick + " : " + msg, BY_PLAYER);
-}
-
-void
-ChatWindow::chatSend(const std::string &nick, std::string msg)
+void ChatWindow::chatSend(const std::string &nick, std::string msg)
{
/* Some messages are managed client side, while others
* require server handling by proper packet. Probably
* those if elses should be replaced by protocol calls */
+ // Send party message
+ if (msg.at(0) == mPartyPrefix) {
+ msg.erase(0, 1);
+ std::size_t length = msg.length() + 1;
+
+ if (length == 0) {
+ chatLog("Trying to send a blank party message.", BY_SERVER);
+ return;
+ }
+ MessageOut outMsg(mNetwork);
+
+ outMsg.writeInt16(CMSG_PARTY_MESSAGE);
+ outMsg.writeInt16(length + 4);
+ outMsg.writeString(msg, length);
+ return;
+ }
// Prepare ordinary message
if (msg.substr(0, 1) != "/") {
msg = nick + " : " + msg;
@@ -294,18 +288,31 @@ ChatWindow::chatSend(const std::string &nick, std::string msg)
// Added + 1 in order to let eAthena parse admin commands correctly
outMsg.writeInt16(msg.length() + 4 + 1);
outMsg.writeString(msg, msg.length() + 1);
+ return;
+ }
+ msg.erase(0, 1);
+ trim(msg);
+
+ std::size_t space = msg.find(" ");
+ std::string command = msg.substr(0, space);
+ if (space == std::string::npos) {
+ msg = "";
+ } else {
+ msg = msg.substr(space);
+ trim(msg);
}
- else if (msg.substr(0, IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE)
+
+ if (command == "announce")
{
- msg.erase(0, IS_ANNOUNCE_LENGTH);
MessageOut outMsg(mNetwork);
outMsg.writeInt16(0x0099);
outMsg.writeInt16(msg.length() + 4);
outMsg.writeString(msg, msg.length());
+ return;
}
- else if (msg.substr(0, IS_HELP_LENGTH) == IS_HELP)
+ else if (command == "help")
{
- msg.erase(0, IS_HELP_LENGTH + 1);
+ msg.erase(0, 6);
trim(msg);
std::size_t space = msg.find(" ");
std::string msg1;
@@ -325,112 +332,233 @@ ChatWindow::chatSend(const std::string &nick, std::string msg)
trim(msg1);
help(msg, msg1);
}
- else if (msg.substr(0, IS_WHERE_LENGTH) == IS_WHERE)
+ else if (command == "where")
{
// Display the current map, X, and Y
std::ostringstream where;
where << map_path << " " << player_node->mX << "," << player_node->mY;
chatLog(where.str(), BY_SERVER);
}
- else if (msg.substr(0, IS_WHO_LENGTH) == IS_WHO)
- {
+ if (command == "who") {
MessageOut outMsg(mNetwork);
outMsg.writeInt16(0x00c1);
+ return;
}
- else if (msg.substr(0, IS_CLEAR_LENGTH) == IS_CLEAR)
- {
+ if (command == "clear") {
mTextOutput->clearRows();
+ return;
}
- else if (msg.substr(0, IS_WHISPER_LENGTH) == IS_WHISPER)
- whisper(nick, msg, IS_WHISPER_LENGTH);
- else if (msg.substr(0, IS_SHORT_WHISPER_LENGTH) == IS_SHORT_WHISPER)
- whisper(nick, msg, IS_SHORT_WHISPER_LENGTH);
- else
- {
- chatLog("Unknown command", BY_SERVER);
+ if (command == "whisper" || command == "msg" || command == "w") {
+ std::string recvnick = "";
+
+ if (msg.substr(0, 1) == "\"") {
+ const std::string::size_type pos = msg.find('"', 1);
+ if (pos != std::string::npos) {
+ recvnick = msg.substr(1, pos - 1);
+ msg.erase(0, pos + 2);
+ }
+ } else {
+ const std::string::size_type pos = msg.find(" ");
+ if (pos != std::string::npos) {
+ recvnick = msg.substr(0, pos);
+ msg.erase(0, pos + 1);
+ }
+ }
+
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_CHAT_WHISPER);
+ outMsg.writeInt16(msg.length() + 28);
+ outMsg.writeString(recvnick, 24);
+ outMsg.writeString(msg, msg.length());
+
+ chatLog("Whispering to " + recvnick + " : " + msg, BY_PLAYER);
+ return;
+ }
+ if (command == "record") {
+ mRecorder->respond(msg);
+ return;
+ }
+ if (command == "toggle") {
+ if (msg == "") {
+ chatLog(mReturnToggles ? "Return toggles chat."
+ : "Message closes chat.", BY_SERVER);
+ return;
+ }
+ msg = msg.substr(0, 1);
+ if (msg == "1" || msg == "y" || msg == "t" || msg == "Y" || msg == "T") {
+ chatLog("Return now toggles chat.", BY_SERVER);
+ mReturnToggles = true;
+ return;
+ }
+ if (msg == "0" || msg == "n" || msg == "f" || msg == "N" || msg == "F") {
+ chatLog("Message now closes chat.", BY_SERVER);
+ mReturnToggles = false;
+ return;
+ }
+ chatLog("Options to /toggle are \"yes\", \"no\", \"true\", \"false\", "
+ "\"1\", \"0\".", BY_SERVER);
+ return;
}
+ if (command == "party") {
+ if (msg == "") {
+ chatLog("Unknown party command... Type \"/help\" party for more "
+ "information.", BY_SERVER);
+ return;
+ }
+ const std::string::size_type space = msg.find(" ");
+ std::string rest = (space == std::string::npos ? ""
+ : msg.substr(space + 1, msg.length()));
+ if (rest != "") {
+ msg = msg.substr(0, space);
+ while (msg != "" && msg[0] == ' ') {
+ msg = msg.substr(1, msg.length());
+ }
+ }
+ party(msg, rest);
+ return;
+ }
+ if (command == "cast") {
+ /*
+ * This will eventually be replaced by a GUI, so
+ * we don't need to get too sophisticated
+ */
+ if (extensions.aethyra_spells) {
+ MessageOut outMsg(mNetwork);
+ if (msg == "heal") {
+ outMsg.writeInt16(0x03f3);
+ outMsg.writeInt16(0x01);
+ outMsg.writeInt32(0);
+ outMsg.writeInt8(0);
+ outMsg.writeInt8(0);
+ outMsg.writeString("", 24);
+ } else if (msg == "gather") {
+ outMsg.writeInt16(0x03f3);
+ outMsg.writeInt16(0x02);
+ outMsg.writeInt32(0);
+ outMsg.writeInt8(0);
+ outMsg.writeInt8(0);
+ outMsg.writeString("", 24);
+ } else {
+ chatLog("No such spell!", BY_SERVER);
+ }
+ } else {
+ chatLog("The current server doesn't support spells", BY_SERVER);
+ }
+ return;
+ }
+ if (command == "present") {
+ Beings & beings = beingManager->getAll();
+ std::string response = "";
+ for (BeingIterator bi = beings.begin(), be = beings.end();
+ bi != be; ++bi) {
+ if ((*bi)->getType() == Being::PLAYER) {
+ if (response != "") {
+ response += ", ";
+ }
+ response += (*bi)->getName();
+ }
+ }
+ if (mRecorder->isRecording()) {
+ // Get the current system time
+ time_t t;
+ time(&t);
+
+ // Format the time string properly
+ std::stringstream timeStr;
+ timeStr << "[" << ((((t / 60) / 60) % 24 < 10) ? "0" : "")
+ << (int) (((t / 60) / 60) % 24)
+ << ":" << (((t / 60) % 60 < 10) ? "0" : "")
+ << (int) ((t / 60) % 60)
+ << "] ";
+
+
+ mRecorder->record(timeStr.str() + "Present: " + response + ".");
+ chatLog("Attendance written to record log.", BY_SERVER, true);
+ } else {
+ chatLog("Present: " + response, BY_SERVER);
+ }
+ return;
+ }
+ chatLog("Unknown command", BY_SERVER);
}
-std::string
-ChatWindow::const_msg(CHATSKILL act)
+std::string ChatWindow::const_msg(CHATSKILL act)
{
std::string msg;
if (act.success == SKILL_FAILED && act.skill == SKILL_BASIC) {
switch (act.bskill) {
- case BSKILL_TRADE :
+ case BSKILL_TRADE:
msg = "Trade failed!";
break;
- case BSKILL_EMOTE :
+ case BSKILL_EMOTE:
msg = "Emote failed!";
break;
- case BSKILL_SIT :
+ case BSKILL_SIT:
msg = "Sit failed!";
break;
- case BSKILL_CREATECHAT :
+ case BSKILL_CREATECHAT:
msg = "Chat creating failed!";
break;
- case BSKILL_JOINPARTY :
+ case BSKILL_JOINPARTY:
msg = "Could not join party!";
break;
- case BSKILL_SHOUT :
+ case BSKILL_SHOUT:
msg = "Cannot shout!";
break;
}
switch (act.reason) {
- case RFAIL_SKILLDEP :
- msg += " You have not yet reached a high enough lvl!";
+ case RFAIL_SKILLDEP:
+ msg += " You have not yet reached a high enough level!";
break;
- case RFAIL_INSUFHP :
+ case RFAIL_INSUFHP:
msg += " Insufficient HP!";
break;
- case RFAIL_INSUFSP :
+ case RFAIL_INSUFSP:
msg += " Insufficient SP!";
break;
- case RFAIL_NOMEMO :
+ case RFAIL_NOMEMO:
msg += " You have no memos!";
break;
- case RFAIL_SKILLDELAY :
+ case RFAIL_SKILLDELAY:
msg += " You cannot do that right now!";
break;
- case RFAIL_ZENY :
+ case RFAIL_ZENY:
msg += " Seems you need more Zeny... ;-)";
break;
- case RFAIL_WEAPON :
+ case RFAIL_WEAPON:
msg += " You cannot use this skill with that kind of weapon!";
break;
- case RFAIL_REDGEM :
+ case RFAIL_REDGEM:
msg += " You need another red gem!";
break;
- case RFAIL_BLUEGEM :
+ case RFAIL_BLUEGEM:
msg += " You need another blue gem!";
break;
- case RFAIL_OVERWEIGHT :
+ case RFAIL_OVERWEIGHT:
msg += " You're carrying to much to do this!";
break;
- default :
+ default:
msg += " Huh? What's that?";
break;
}
} else {
- switch(act.skill) {
- case SKILL_WARP :
+ switch (act.skill) {
+ case SKILL_WARP:
msg = "Warp failed...";
break;
- case SKILL_STEAL :
+ case SKILL_STEAL:
msg = "Could not steal anything...";
break;
- case SKILL_ENVENOM :
+ case SKILL_ENVENOM:
msg = "Poison had no effect...";
break;
}
}
-
return msg;
}
-void
-ChatWindow::scroll(int amount)
+void ChatWindow::scroll(int amount)
{
if (!isVisible())
return;
@@ -442,25 +570,20 @@ ChatWindow::scroll(int amount)
mTextOutput->showPart(scr);
}
-void
-ChatWindow::keyPressed(gcn::KeyEvent &event)
+void ChatWindow::keyPressed(gcn::KeyEvent & event)
{
if (event.getKey().getValue() == gcn::Key::DOWN &&
- mCurHist != mHistory.end())
- {
+ mCurHist != mHistory.end()) {
// Move forward through the history
HistoryIterator prevHist = mCurHist++;
if (mCurHist != mHistory.end()) {
mChatInput->setText(*mCurHist);
mChatInput->setCaretPosition(mChatInput->getText().length());
- }
- else {
+ } else {
mCurHist = prevHist;
}
- }
- else if (event.getKey().getValue() == gcn::Key::UP &&
- mCurHist != mHistory.begin() && mHistory.size() > 0)
- {
+ } else if (event.getKey().getValue() == gcn::Key::UP &&
+ mCurHist != mHistory.begin() && mHistory.size() > 0) {
// Move backward through the history
mCurHist--;
mChatInput->setText(*mCurHist);
@@ -468,15 +591,13 @@ ChatWindow::keyPressed(gcn::KeyEvent &event)
}
}
-void
-ChatWindow::setInputText(std::string input_str)
+void ChatWindow::setInputText(std::string input_str)
{
- mChatInput->setText(input_str + " ");
- requestChatFocus();
+ mChatInput->setText(input_str + " ");
+ requestChatFocus();
}
-void
-ChatWindow::setVisible(bool isVisible)
+void ChatWindow::setVisible(bool isVisible)
{
Window::setVisible(isVisible);
@@ -488,18 +609,46 @@ ChatWindow::setVisible(bool isVisible)
mTmpVisible = false;
}
-void ChatWindow::help(const std::string &msg1, const std::string &msg2)
+void ChatWindow::party(const std::string & command, const std::string & rest)
+{
+ if (command == "prefix") {
+ if (rest == "") {
+ char temp[2] = ".";
+ *temp = mPartyPrefix;
+ chatLog("The current party prefix is " + std::string(temp),
+ BY_SERVER);
+ return;
+ }
+ if (rest.length() != 1) {
+ chatLog("Party prefix must be one character long.", BY_SERVER);
+ } else {
+ if (rest == "/") {
+ chatLog("Cannot use a '/' as the prefix.", BY_SERVER);
+ } else {
+ mPartyPrefix = rest.at(0);
+ chatLog("Changing prefix to " + rest, BY_SERVER);
+ }
+ }
+ return;
+ }
+ mParty->respond(command, rest);
+}
+
+void ChatWindow::help(const std::string & msg1, const std::string & msg2)
{
chatLog("-- Help --", BY_SERVER);
- if (msg1 == "")
- {
+ if (msg1 == "") {
chatLog("/announce: Global announcement (GM only)", BY_SERVER);
chatLog("/clear: Clears this window", BY_SERVER);
chatLog("/help: Display this help.", BY_SERVER);
+ mParty->help();
+ chatLog("/present: Get list of players present", BY_SERVER);
+ mRecorder->help();
+ chatLog("/toggle: Determine whether <return> toggles the chat log.",
+ BY_SERVER);
chatLog("/where: Display map name", BY_SERVER);
chatLog("/whisper <nick> <message>: Sends a private <message>"
" to <nick>", BY_SERVER);
- chatLog("/w <nick> <message>: Short form for /whisper", BY_SERVER);
chatLog("/who: Display number of online users", BY_SERVER);
chatLog("For more information, type /help <command>", BY_SERVER);
return;
@@ -528,6 +677,37 @@ void ChatWindow::help(const std::string &msg1, const std::string &msg2)
chatLog("This command displays help on <command>.", BY_SERVER);
return;
}
+ if (msg1 == "party")
+ {
+ mParty->help(msg2);
+ return;
+ }
+ if (msg1 == "present")
+ {
+ chatLog("Command: /present", BY_SERVER);
+ chatLog("This command gets a list of players within hearing "
+ "and sends it to either the record log if recording, or the "
+ "chat log otherwise.", BY_SERVER);
+ return;
+ }
+ if (msg1 == "record")
+ {
+ mRecorder->help(msg2);
+ return;
+ }
+ if (msg1 == "toggle")
+ {
+ chatLog("Command: /toggle <state>", BY_SERVER);
+ chatLog("This command sets whether the return key should toggle the "
+ "chat log, or whether the chat log turns off automatically.",
+ BY_SERVER);
+ chatLog("<state> can be one of \"1\", \"yes\", \"true\" to turn "
+ "the toggle on, or \"0\", \"no\", \"false\" to turn the "
+ "toggle off.", BY_SERVER);
+ chatLog("Command: /toggle", BY_SERVER);
+ chatLog("This command displays the return toggle status.", BY_SERVER);
+ return;
+ }
if (msg1 == "where")
{
chatLog("Command: /where", BY_SERVER);
@@ -535,11 +715,9 @@ void ChatWindow::help(const std::string &msg1, const std::string &msg2)
BY_SERVER);
return;
}
- if (msg1 == "whisper" || msg1 == "w")
- {
+ if (msg1 == "whisper" || msg1 == "msg" || msg1 == "w") {
chatLog("Command: /whisper <nick> <msg>", BY_SERVER);
- chatLog("Command: /w <nick> <msg>", BY_SERVER);
- chatLog("This command sends the message <msg> to <nick>.", BY_SERVER);
+ chatLog("This command sends the message <msg> to <nick.", BY_SERVER);
chatLog("If the <nick> has spaces in it, enclose it in "
"double quotes (\").", BY_SERVER);
return;
diff --git a/src/gui/chat.h b/src/gui/chat.h
index 76a8146c..437dc115 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -22,6 +22,7 @@
#ifndef _TMW_CHAT_H
#define _TMW_CHAT_H
+#include <fstream>
#include <list>
#include <string>
@@ -34,32 +35,20 @@
class BrowserBox;
class Network;
+class Recorder;
+class Party;
class ScrollArea;
#define BY_GM 0 // those should be self-explanatory =)
#define BY_PLAYER 1
#define BY_OTHER 2
#define BY_SERVER 3
+#define BY_PARTY 4
-#define ACT_WHISPER 4 // getting whispered at
-#define ACT_IS 5 // equivalent to "/me" on IRC
-
-#define BY_LOGGER 6
-
-#define IS_ANNOUNCE "/announce "
-#define IS_ANNOUNCE_LENGTH 10
-#define IS_HELP "/help"
-#define IS_HELP_LENGTH 5
-#define IS_WHERE "/where"
-#define IS_WHERE_LENGTH 6
-#define IS_WHO "/who"
-#define IS_WHO_LENGTH 4
-#define IS_CLEAR "/clear"
-#define IS_CLEAR_LENGTH 6
-#define IS_WHISPER "/whisper"
-#define IS_WHISPER_LENGTH 8
-#define IS_SHORT_WHISPER "/w"
-#define IS_SHORT_WHISPER_LENGTH 2
+#define ACT_WHISPER 5 // getting whispered at
+#define ACT_IS 6 // equivalent to "/me" on IRC
+
+#define BY_LOGGER 7
/**
* gets in between usernick and message text depending on
@@ -118,133 +107,150 @@ struct CHATSKILL
* \ingroup Interface
*/
class ChatWindow : public Window, public gcn::ActionListener,
- public gcn::KeyListener
+ public gcn::KeyListener
{
public:
- /**
- * Constructor.
- */
- ChatWindow(Network *network);
-
- /**
- * Logic (updates components' size)
- */
- void logic();
-
- /*
- * Adds a line of text to our message list. Parameters:
- *
- * @param line Text message.
- * @parem own Type of message (usually the owner-type).
- */
- void chatLog(std::string line, int own);
-
- /*
- * Calls original chat_log() after processing the packet.
- */
- void chatLog(CHATSKILL);
-
- /**
- * Performs action.
- */
- void action(const gcn::ActionEvent &event);
-
- /**
- * Request focus for typing chat message.
- */
- void requestChatFocus();
-
- /**
- * Checks whether ChatWindow is Focused or not.
- */
- bool isInputFocused();
-
- /**
- * Determines whether to send a command or an ordinary message, then
- * contructs packets & sends them.
- *
- * @param nick The character's name to display in front.
- * @param msg The message text which is to be send.
- *
- * NOTE:
- * The nickname is required by the server, if not specified
- * the message may not be sent unless a command was intended
- * which requires another packet to be constructed! you can
- * achieve this by putting a slash ("/") infront of the
- * message followed by the command name and the message.
- * of course all slash-commands need implemented handler-
- * routines. ;-)
- * remember, a line starting with "@" is not a command that needs
- * to be parsed rather is sent using the normal chat-packet.
- *
- * EXAMPLE:
- * // for an global announcement /- command
- * chatlog.chat_send("", "/announce Hello to all logged in users!");
- * // for simple message by a user /- message
- * chatlog.chat_send("Zaeiru", "Hello to all users on the screen!");
- */
- void
- chatSend(const std::string &nick, std::string msg);
-
- /** Called when key is pressed */
- void
- keyPressed(gcn::KeyEvent &event);
-
- /** Called to set current text */
- void
- setInputText(std::string input_str);
-
- /** Override to reset mTmpVisible */
- void
- setVisible(bool visible);
+ /**
+ * Constructor.
+ */
+ ChatWindow(Network *network);
+
+ /**
+ * Destructor: used to write back values to the config file
+ */
+ ~ChatWindow();
+
+ /**
+ * Logic (updates components' size)
+ */
+ void logic();
+
+ /**
+ * Adds a line of text to our message list. Parameters:
+ *
+ * @param line Text message.
+ * @parem own Type of message (usually the owner-type).
+ */
+ void chatLog(std::string line, int own, bool ignoreRecord = false);
+
+ /**
+ * Calls original chat_log() after processing the packet.
+ */
+ void chatLog(CHATSKILL);
+
+ /**
+ * Performs action.
+ */
+ void action(const gcn::ActionEvent &event);
+
+ /**
+ * Request focus for typing chat message.
+ */
+ void requestChatFocus();
+
+ /**
+ * Checks whether ChatWindow is Focused or not.
+ */
+ bool isInputFocused();
+
+ /**
+ * Determines whether to send a command or an ordinary message, then
+ * contructs packets & sends them.
+ *
+ * @param nick The character's name to display in front.
+ * @param msg The message text which is to be send.
+ *
+ * NOTE:
+ * The nickname is required by the server, if not specified
+ * the message may not be sent unless a command was intended
+ * which requires another packet to be constructed! you can
+ * achieve this by putting a slash ("/") infront of the
+ * message followed by the command name and the message.
+ * of course all slash-commands need implemented handler-
+ * routines. ;-)
+ * remember, a line starting with "@" is not a command that needs
+ * to be parsed rather is sent using the normal chat-packet.
+ *
+ * EXAMPLE:
+ * // for an global announcement /- command
+ * chatlog.chat_send("", "/announce Hello to all logged in users!");
+ * // for simple message by a user /- message
+ * chatlog.chat_send("Zaeiru", "Hello to all users on the screen!");
+ */
+ void
+ chatSend(const std::string &nick, std::string msg);
+
+ /** Called when key is pressed */
+ void
+ keyPressed(gcn::KeyEvent &event);
+
+ /** Called to set current text */
+ void
+ setInputText(std::string input_str);
+
+ /** Override to reset mTmpVisible */
+ void
+ setVisible(bool visible);
/**
- * Scrolls the chat window
- *
- * @param amount direction and amount to scroll. Negative numbers scroll
- * up, positive numbers scroll down. The absolute amount indicates the
- * amount of 1/8ths of chat window real estate that should be scrolled.
- */
- void
- scroll(int amount);
-
- /**
- * help implements the /help command
- *
- * @param msg1 is the command that the player needs help on
- * @param msg2 is the sub-command relating to the command
- */
- void
- help(const std::string &msg1, const std::string &msg2);
+ * Scrolls the chat window
+ *
+ * @param amount direction and amount to scroll. Negative numbers scroll
+ * up, positive numbers scroll down. The absolute amount indicates the
+ * amount of 1/8ths of chat window real estate that should be scrolled.
+ */
+ void
+ scroll(int amount);
+
+ /**
+ * party implements the partying chat commands
+ *
+ * @param command is the party command to perform
+ * @param msg is the remainder of the message
+ */
+ void
+ party(const std::string &command, const std::string &msg);
+
+ /**
+ * help implements the /help command
+ *
+ * @param msg1 is the command that the player needs help on
+ * @param msg2 is the sub-command relating to the command
+ */
+ void
+ help(const std::string &msg1, const std::string &msg2);
private:
- Network *mNetwork;
- bool mTmpVisible;
-
- void
- whisper(const std::string &nick, std::string msg, int prefixlen);
-
- /** One item in the chat log */
- struct CHATLOG
- {
- std::string nick;
- std::string text;
- int own;
- };
-
- /** Constructs failed messages for actions */
- std::string const_msg(CHATSKILL);
-
- gcn::TextField *mChatInput; /**< Input box for typing chat messages */
- BrowserBox *mTextOutput; /**< Text box for displaying chat history */
- ScrollArea *mScrollArea; /**< Scroll area around text output */
-
- typedef std::list<std::string> History;
- typedef History::iterator HistoryIterator;
- History mHistory; /**< Command history */
- HistoryIterator mCurHist; /**< History iterator */
-};
+ Network *mNetwork;
+ bool mTmpVisible;
+
+ /** One item in the chat log */
+ struct CHATLOG
+ {
+ std::string nick;
+ std::string text;
+ int own;
+ };
+
+ /** Constructs failed messages for actions */
+ std::string const_msg(CHATSKILL);
+
+ gcn::TextField *mChatInput; /**< Input box for typing chat messages */
+ BrowserBox *mTextOutput; /**< Text box for displaying chat history */
+ ScrollArea *mScrollArea; /**< Scroll area around text output */
+
+ typedef std::list<std::string> History;
+ typedef History::iterator HistoryIterator;
+ History mHistory; /**< Command history */
+ HistoryIterator mCurHist; /**< History iterator */
+ Recorder *mRecorder; /**< Recording class */
+ char mPartyPrefix; /**< Messages beginning with the prefix are sent to
+ the party */
+ bool mReturnToggles; /**< Marks whether <Return> toggles the chat log
+ or not */
+ Party *mParty;
+};
extern ChatWindow *chatWindow;
#endif
diff --git a/src/gui/chatinput.h b/src/gui/chatinput.h
index e04dfa6e..44e22956 100644
--- a/src/gui/chatinput.h
+++ b/src/gui/chatinput.h
@@ -22,9 +22,11 @@
#ifndef _TMW_CHATINPUT_H
#define _TMW_CHATINPUT_H
+#include <guichan/focuslistener.hpp>
+
#include "textfield.h"
-#include <guichan/focuslistener.hpp>
+#include "../guichanfwd.h"
/**
* The chat input hides when it loses focus. It is also invisible by default.
diff --git a/src/gui/checkbox.h b/src/gui/checkbox.h
index 839ca97e..f6d8f2e5 100644
--- a/src/gui/checkbox.h
+++ b/src/gui/checkbox.h
@@ -26,6 +26,8 @@
#include <guichan/widgets/checkbox.hpp>
+#include "../guichanfwd.h"
+
class Image;
/**
diff --git a/src/gui/colour.cpp b/src/gui/colour.cpp
new file mode 100644
index 00000000..4c3782a4
--- /dev/null
+++ b/src/gui/colour.cpp
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include <cstdio>
+
+#include "colour.h"
+
+#include "../configuration.h"
+
+Colour::Colour()
+{
+ addColour('C', 0x000000, "Chat");
+ addColour('G', 0xff0000, "GM");
+ addColour('Y', 0x1fa052, "Player");
+ addColour('W', 0x0000ff, "Whisper");
+ addColour('I', 0xf1dc27, "Is");
+ addColour('P', 0xff00d8, "Party");
+ addColour('S', 0x8415e2, "Server");
+ addColour('L', 0x919191, "Logger");
+ addColour('<', 0xe50d0d, "Hyperlink");
+ commit();
+}
+
+Colour::~Colour()
+{
+ for (ColVector::iterator col = mColVector.begin(),
+ colEnd = mColVector.end();
+ col != colEnd;
+ ++col)
+ {
+ char buffer[20];
+ std::sprintf(buffer, "0x%06x", col->rgb);
+ config.setValue("Colour" + col->text, buffer);
+ }
+}
+
+void Colour::setColour(const char c, const int rgb)
+{
+ for (ColVector::iterator col = mColVector.begin(),
+ colEnd = mColVector.end();
+ col != colEnd;
+ ++col)
+ {
+ if (col->ch == c)
+ {
+ col->rgb = rgb;
+ return;
+ }
+ }
+}
+
+int Colour::getColour(const char c, bool &valid) const
+{
+ for (ColVector::const_iterator col = mColVector.begin(),
+ colEnd = mColVector.end();
+ col != colEnd;
+ ++col)
+ {
+ if (col->ch == c)
+ {
+ valid = true;
+ return col->rgb;
+ }
+ }
+ valid = false;
+ return 0x000000;
+}
+
+std::string Colour::getElementAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return "";
+ }
+ return mColVector[i].text;
+}
+
+void Colour::addColour(const char c, const int rgb, const std::string &text)
+{
+ int trueRgb = config.getValue("Colour" + text, rgb);
+ mColVector.push_back(ColourElem(c, trueRgb, text));
+}
+
+int Colour::getColourAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return 0;
+ }
+ return mColVector[i].rgb;
+}
+
+void Colour::setColourAt(int i, int rgb)
+{
+ if (i >= 0 && i < getNumberOfElements())
+ {
+ mColVector[i].rgb = rgb;
+ }
+}
+
+void Colour::commit()
+{
+ for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end();
+ i != iEnd;
+ ++i)
+ {
+ i->committedRgb = i->rgb;
+ }
+}
+
+void Colour::rollback()
+{
+ for (ColVector::iterator i = mColVector.begin(), iEnd = mColVector.end();
+ i != iEnd;
+ ++i)
+ {
+ i->rgb = i->committedRgb;
+ }
+}
diff --git a/src/gui/colour.h b/src/gui/colour.h
new file mode 100644
index 00000000..1e8ba3db
--- /dev/null
+++ b/src/gui/colour.h
@@ -0,0 +1,133 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef _COLOUR_H
+#define _COLOUR_H
+
+#include <cstdio>
+#include <string>
+#include <vector>
+
+#include <guichan/listmodel.hpp>
+
+#include "../guichanfwd.h"
+
+class Colour : public gcn::ListModel
+{
+ public:
+ /**
+ * Constructor
+ */
+ Colour();
+
+ /**
+ * Destructor
+ */
+ ~Colour();
+
+ /**
+ * Define the colour replacement for a character
+ *
+ * @param c charater to be replaced
+ * @param rgb colour to replace character
+ */
+ void setColour(const char c, const int rgb);
+
+ /**
+ * Define the colour replacement for a character
+ *
+ * @param c character to be replaced
+ * @param r red component
+ * @param g green component
+ * @param b blue component
+ */
+ void setColour(const char c, const int r, const int g, const int b)
+ {
+ setColour(c, (r << 16) | (g << 8) | b);
+ }
+
+ /**
+ * Return the colour associated with a character, if exists
+ *
+ * @param c character requested
+ * @param valid indicate whether character is known
+ */
+ int getColour(const char c, bool &valid) const;
+
+ /**
+ * Return the number of colours known
+ */
+ int getNumberOfElements() {return mColVector.size(); }
+
+ /**
+ * Return the name of the ith colour
+ *
+ * @param i index of colour interested in
+ */
+ std::string getElementAt(int i);
+
+ /**
+ * Get the colour for the element at index i in the current colour
+ * model
+ */
+ int getColourAt(int i);
+
+ /**
+ * Set the colour for the element at index i
+ */
+ void setColourAt(int i, int rgb);
+
+ /**
+ * Commit the colours
+ */
+ void commit();
+
+ /**
+ * Rollback the colours
+ */
+ void rollback();
+
+ private:
+ struct ColourElem
+ {
+ ColourElem(const char c, const int rgb, const std::string &text) :
+ ch(c), rgb(rgb), text(text) {}
+ char ch;
+ int rgb;
+ int committedRgb;
+ std::string text;
+ };
+ typedef std::vector<ColourElem> ColVector;
+ ColVector mColVector;
+
+ /**
+ * Initialise colour
+ *
+ * @param c character that needs initialising
+ * @param rgb default colour if not found in config
+ * @param text identifier of colour
+ */
+ void addColour(const char c, const int rgb, const std::string &text);
+};
+
+extern Colour *textColour;
+
+#endif
diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp
index 9ef94f62..732f5769 100644
--- a/src/gui/confirm_dialog.cpp
+++ b/src/gui/confirm_dialog.cpp
@@ -19,39 +19,59 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "confirm_dialog.h"
-
-#include <guichan/widgets/label.hpp>
-
-#include "button.h"
+#include <guichan/font.hpp>
+#include "confirm_dialog.h"
ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
Window *parent):
Window(title, true, parent)
{
- gcn::Label *textLabel = new gcn::Label(msg);
+ mTextBox = new TextBox();
+ mTextBox->setEditable(false);
+ mTextBox->setOpaque(false);
+
+ mTextArea = new ScrollArea(mTextBox);
gcn::Button *yesButton = new Button("Yes", "yes", this);
gcn::Button *noButton = new Button("No", "no", this);
- int w = textLabel->getWidth() + 20;
+ mTextArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mTextArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mTextArea->setOpaque(false);
+
+ mTextBox->setMinWidth(260);
+ mTextBox->setTextWrapped(msg);
+
+ int numRows = mTextBox->getNumberOfRows();
+ int width = getFont()->getWidth(title);
int inWidth = yesButton->getWidth() + noButton->getWidth() + 5;
- int h = textLabel->getHeight() + 25 + yesButton->getHeight();
- if (w < inWidth + 10) {
- w = inWidth + 10;
+ if (numRows > 1)
+ {
+ // 15 == height of each line of text (based on font heights)
+ // 14 == row top + bottom graphic pixel heights
+ setContentSize(mTextBox->getMinWidth() + 15, 15 + (numRows * 15) + noButton->getHeight());
+ mTextArea->setDimension(gcn::Rectangle(4, 5, mTextBox->getMinWidth() + 5,
+ 3 + (numRows * 14)));
+ }
+ else
+ {
+ if (width < getFont()->getWidth(msg))
+ width = getFont()->getWidth(msg);
+ if (width < inWidth)
+ width = inWidth;
+ setContentSize(width + 15, 30 + noButton->getHeight());
+ mTextArea->setDimension(gcn::Rectangle(4, 5, width + 5, 17));
}
- setContentSize(w, h);
- textLabel->setPosition(10, 10);
yesButton->setPosition(
- (w - inWidth) / 2,
- h - 5 - noButton->getHeight());
+ (mTextBox->getMinWidth() - inWidth) / 2,
+ (numRows * 14) + noButton->getHeight() - 8);
noButton->setPosition(
yesButton->getX() + yesButton->getWidth() + 5,
- h - 5 - noButton->getHeight());
+ (numRows * 14) + noButton->getHeight() - 8);
- add(textLabel);
+ add(mTextArea);
add(yesButton);
add(noButton);
@@ -63,6 +83,11 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
yesButton->requestFocus();
}
+unsigned int ConfirmDialog::getNumRows()
+{
+ return mTextBox->getNumberOfRows();
+}
+
void ConfirmDialog::action(const gcn::ActionEvent &event)
{
// Proxy button events to our listeners
diff --git a/src/gui/confirm_dialog.h b/src/gui/confirm_dialog.h
index c9bfca02..109dcea0 100644
--- a/src/gui/confirm_dialog.h
+++ b/src/gui/confirm_dialog.h
@@ -24,8 +24,12 @@
#include <guichan/actionlistener.hpp>
+#include "button.h"
+#include "scrollarea.h"
+#include "textbox.h"
#include "window.h"
+#include "../guichanfwd.h"
/**
* An option dialog.
@@ -42,10 +46,17 @@ class ConfirmDialog : public Window, public gcn::ActionListener {
ConfirmDialog(const std::string &title, const std::string &msg,
Window *parent = NULL);
+ unsigned int getNumRows();
+
/**
* Called when receiving actions from the widgets.
*/
void action(const gcn::ActionEvent &event);
+
+ private:
+ TextBox *mTextBox;
+ ScrollArea *mTextArea;
+ gcn::Button *okButton;
};
#endif
diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp
index 8ad3b436..1204b203 100644
--- a/src/gui/connection.cpp
+++ b/src/gui/connection.cpp
@@ -19,13 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "connection.h"
-
#include <guichan/actionlistener.hpp>
#include <guichan/widgets/label.hpp>
#include "button.h"
+#include "connection.h"
#include "progressbar.h"
#include "../main.h"
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index f6e9414e..7fc63096 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -19,18 +19,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "debugwindow.h"
-
#include <SDL_mouse.h>
#include <guichan/widgets/label.hpp>
#include "button.h"
+#include "debugwindow.h"
#include "gui.h"
#include "viewport.h"
-#include "../game.h"
#include "../engine.h"
+#include "../game.h"
#include "../particle.h"
#include "../map.h"
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index e0246787..7e1ef315 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -25,7 +25,9 @@
#include "../inventory.h"
#include "../localplayer.h"
#include "../graphics.h"
+#include "../inventory.h"
#include "../item.h"
+#include "../localplayer.h"
#include "../log.h"
#include "../resources/iteminfo.h"
@@ -40,7 +42,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment):
setCloseButton(true);
setDefaultSize(5, 230, 200, 120);
loadWindowState();
- mInventory = player_node->getInventory();
+ mInventory = player_node->getInventory();
}
EquipmentWindow::~EquipmentWindow()
@@ -75,14 +77,15 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
graphics->drawRectangle(gcn::Rectangle(160, 25, 32, 32));
- if (!(item = mInventory->getItem(mEquipment->getArrows())))
+ if (!(item = mInventory->getItem(mEquipment->getArrows())))
return;
image = item->getImage();
+
if (image)
{
static_cast<Graphics*>(graphics)->drawImage(image, 160, 25);
}
graphics->drawText(toString(item->getQuantity()), 170, 62,
- gcn::Graphics::CENTER);
+ gcn::Graphics::CENTER);
}
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index 42aa7701..b669f5b1 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -25,6 +25,9 @@
#include "window.h"
#include "../inventory.h"
+#include "../guichanfwd.h"
+#include "../inventory.h"
+
class Equipment;
/**
diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp
index 1bda568e..f9ea8b7d 100644
--- a/src/gui/focushandler.cpp
+++ b/src/gui/focushandler.cpp
@@ -21,7 +21,6 @@
#include "focushandler.h"
-
void FocusHandler::requestModalFocus(gcn::Widget *widget)
{
/* If there is another widget with modal focus, remove its modal focus
diff --git a/src/gui/gccontainer.h b/src/gui/gccontainer.h
index cc7c9336..2af7f6ad 100644
--- a/src/gui/gccontainer.h
+++ b/src/gui/gccontainer.h
@@ -26,6 +26,8 @@
#include <guichan/widgets/container.hpp>
+#include "../guichanfwd.h"
+
/**
* A garbage collecting container. Childs added to this container are
* automatically deleted when the container is deleted.
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 96415298..70f82d9d 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "gui.h"
-
#include <guichan/exception.hpp>
#include <guichan/image.hpp>
#include <guichan/imagefont.hpp>
@@ -29,6 +27,7 @@
#include <guichan/sdl/sdlinput.hpp>
#include "focushandler.h"
+#include "gui.h"
#include "viewport.h"
#include "window.h"
#include "windowcontainer.h"
@@ -40,8 +39,8 @@
#include "../resources/image.h"
#include "../resources/imageset.h"
-#include "../resources/resourcemanager.h"
#include "../resources/imageloader.h"
+#include "../resources/resourcemanager.h"
// Guichan stuff
Gui *gui;
@@ -55,6 +54,13 @@ gcn::Font *hitYellowFont;
// Font used to display speech and player names
gcn::Font *speechFont;
+// Font for displaying NPC names
+gcn::Font *npcNameFont;
+// Font for displaying mob names
+gcn::Font *mobNameFont;
+// Font for displaying GM names
+gcn::Font *gmNameFont;
+
class GuiConfigListener : public ConfigListener
{
public:
@@ -139,14 +145,54 @@ Gui::Gui(Graphics *graphics):
logger->error("Unable to load rpgfont_wider.png!");
}
+ // Set npc name font
+ try {
+ npcNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-blue.png",
+ " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
+ "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
+ );
+ }
+ catch (gcn::Exception e)
+ {
+ logger->error("Unable to load rpgfont_wider-blue.png!");
+ }
+
+ // Set monster name font
+ try {
+ mobNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-orange.png",
+ " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
+ "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
+ );
+ }
+ catch (gcn::Exception e)
+ {
+ logger->error("Unable to load rpgfont_wider-orange.png!");
+ }
+
+ // Set GM name font
+ try {
+ gmNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-green.png",
+ " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
+ "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
+ );
+ }
+ catch (gcn::Exception e)
+ {
+ logger->error("Unable to load rpgfont_wider-green.png!");
+ }
+
+
gcn::Widget::setGlobalFont(mGuiFont);
// Load hits' colourful fonts
try {
hitRedFont = new gcn::ImageFont("graphics/gui/hits_red.png",
- "0123456789");
+ "0123456789crit! ");
hitBlueFont = new gcn::ImageFont("graphics/gui/hits_blue.png",
- "0123456789");
+ "0123456789crit! ");
hitYellowFont = new gcn::ImageFont("graphics/gui/hits_yellow.png",
"0123456789misxp ");
}
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 15d5d99c..f56b1dbf 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -26,8 +26,8 @@
#include "../guichanfwd.h"
-class GuiConfigListener;
class Graphics;
+class GuiConfigListener;
class ImageSet;
class Viewport;
@@ -128,4 +128,12 @@ extern gcn::Font *hitYellowFont;
*/
extern gcn::Font *speechFont;
+/**
+ * being name fonts
+ */
+extern gcn::Font *npcNameFont;
+extern gcn::Font *mobNameFont;
+extern gcn::Font *gmNameFont;
+
+
#endif
diff --git a/src/gui/hbox.h b/src/gui/hbox.h
index 4b241383..da70a53c 100644
--- a/src/gui/hbox.h
+++ b/src/gui/hbox.h
@@ -24,6 +24,8 @@
#include "box.h"
+#include "../guichanfwd.h"
+
class HBox : public Box
{
public:
diff --git a/src/gui/help.cpp b/src/gui/help.cpp
index 290679b9..19413a08 100644
--- a/src/gui/help.cpp
+++ b/src/gui/help.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "help.h"
-
#include "button.h"
#include "browserbox.h"
+#include "help.h"
#include "scrollarea.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/help.h b/src/gui/help.h
index 053df723..bd200ccf 100644
--- a/src/gui/help.h
+++ b/src/gui/help.h
@@ -24,8 +24,8 @@
#include <guichan/actionlistener.hpp>
-#include "window.h"
#include "linkhandler.h"
+#include "window.h"
#include "../guichanfwd.h"
diff --git a/src/gui/inttextbox.cpp b/src/gui/inttextbox.cpp
index 4825fbf5..858a3fcb 100644
--- a/src/gui/inttextbox.cpp
+++ b/src/gui/inttextbox.cpp
@@ -19,10 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "inttextbox.h"
-
#include <guichan/key.hpp>
+#include "inttextbox.h"
+
#include "../utils/tostring.h"
IntTextBox::IntTextBox(int i):
diff --git a/src/gui/inttextbox.h b/src/gui/inttextbox.h
index 8fc8e404..922ef4c5 100644
--- a/src/gui/inttextbox.h
+++ b/src/gui/inttextbox.h
@@ -24,6 +24,8 @@
#include "textbox.h"
+#include "../guichanfwd.h"
+
/**
* TextBox which only accepts numbers as input.
*/
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index f38c118e..424fca59 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -19,15 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "inventorywindow.h"
-
#include <string>
#include <guichan/mouseinput.hpp>
-#include <guichan/widgets/label.hpp>
#include "button.h"
#include "gui.h"
+#include "inventorywindow.h"
#include "item_amount.h"
#include "itemcontainer.h"
#include "scrollarea.h"
@@ -48,29 +46,38 @@ InventoryWindow::InventoryWindow():
setResizable(true);
setCloseButton(true);
setMinWidth(240);
- setMinHeight(172);
// If you adjust these defaults, don't forget to adjust the trade window's.
setDefaultSize(115, 25, 322, 172);
mUseButton = new Button("Use", "use", this);
mDropButton = new Button("Drop", "drop", this);
- mItems = new ItemContainer(player_node->getInventory());
+ mItems = new ItemContainer(player_node->getInventory(), 2);
mItems->addSelectionListener(this);
mInvenScroll = new ScrollArea(mItems);
mInvenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mItemNameLabel = new gcn::Label("Name:");
- mItemDescriptionLabel = new gcn::Label("Description:");
- mItemEffectLabel = new gcn::Label("Effect:");
- mWeightLabel = new gcn::Label("Weight:");
+ mTotalWeight = toString(player_node->mTotalWeight);
+ mMaxWeight = toString(player_node->mMaxWeight);
+
+ mItemName = "Name:";
+ mItemNameLabel = new TextBox();
+ mItemDescription = "Description:";
+ mItemDescriptionLabel = new TextBox();
+ mItemEffect = "Effect:";
+ mItemEffectLabel = new TextBox();
+ mWeight = "Total Weight: " + mTotalWeight + " g - " +
+ "Maximum Weight: " + mMaxWeight + " g";
+ mWeightLabel = new TextBox();
mWeightLabel->setPosition(8, 8);
- mInvenScroll->setPosition(8,
- mWeightLabel->getY() + mWeightLabel->getHeight() + 5);
- mInvenSlotLabel = new gcn::Label("Slots used:");
- mInvenSlotLabel->setPosition(mWeightLabel->getX()
- + mWeightLabel->getWidth() + 100, 8);
+ mSlots = "Slots: " +
+ toString(player_node->getInventory()->getNumberOfSlotsUsed()) +
+ "/" + toString(player_node->getInventory()->getInventorySize());
+ mSlotsLabel = new TextBox();
+ mItemEffectLabel = new TextBox();
+
+ draw();
add(mUseButton);
add(mDropButton);
@@ -79,7 +86,7 @@ InventoryWindow::InventoryWindow():
add(mItemDescriptionLabel);
add(mItemEffectLabel);
add(mWeightLabel);
- add(mInvenSlotLabel);
+ add(mSlotsLabel);
mUseButton->setSize(60, mUseButton->getHeight());
@@ -94,16 +101,22 @@ void InventoryWindow::logic()
// redesign of InventoryWindow and ItemContainer probably.
updateButtons();
- // Update weight information
- mWeightLabel->setCaption(
- "Weight: " + toString(player_node->mTotalWeight) +
- "/" + toString(player_node->mMaxWeight));
-
- // Update number of items in inventory
- mInvenSlotLabel->setCaption(
- "Slots used: "
- + toString(player_node->getInventory()->getNumberOfSlotsUsed())
- + "/" + toString(player_node->getInventory()->getInventorySize()));
+ if ((mMaxWeight != toString(player_node->mMaxWeight)) ||
+ mTotalWeight != toString(player_node->mTotalWeight))
+ {
+ mTotalWeight = toString(player_node->mTotalWeight);
+ mMaxWeight = toString(player_node->mMaxWeight);
+
+ // Adjust widgets
+ mWeight = "Total Weight: " + mTotalWeight + " g - " +
+ "Maximum Weight: " + mMaxWeight + " g";
+
+ mSlots = "Slots: " +
+ toString(player_node->getInventory()->getNumberOfSlotsUsed()) +
+ "/" + toString(player_node->getInventory()->getInventorySize());
+
+ draw();
+ }
}
void InventoryWindow::action(const gcn::ActionEvent &event)
@@ -145,21 +158,25 @@ void InventoryWindow::valueChanged(const gcn::SelectionEvent &event)
// Update name, effect and description
if (!item)
{
- mItemNameLabel->setCaption("Name:");
- mItemEffectLabel->setCaption("Effect:");
- mItemDescriptionLabel->setCaption("Description:");
+ mItemName = "Name:";
+ mItemNameLabel->setTextWrapped(mItemName);
+ mItemEffect = "Effect:";
+ mItemEffectLabel->setTextWrapped(mItemEffect);
+ mItemDescription = "Description:";
+ mItemDescriptionLabel->setTextWrapped(mItemDescription);
}
else
{
const ItemInfo& itemInfo = item->getInfo();
- std::string SomeText;
- SomeText = "Name: " + itemInfo.getName();
- mItemNameLabel->setCaption(SomeText);
- SomeText = "Effect: " + itemInfo.getEffect();
- mItemEffectLabel->setCaption(SomeText);
- SomeText = "Description: " + itemInfo.getDescription();
- mItemDescriptionLabel->setCaption(SomeText);
+ mItemName = "Name: " + itemInfo.getName();
+ mItemNameLabel->setTextWrapped(mItemName);
+ mItemEffect = "Effect: " + itemInfo.getEffect();
+ mItemEffectLabel->setTextWrapped(mItemEffect);
+ mItemDescription = "Description: " + itemInfo.getDescription();
+ mItemDescriptionLabel->setTextWrapped(mItemDescription);
}
+
+ draw();
}
void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
@@ -181,37 +198,60 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
}
}
-void InventoryWindow::widgetResized(const gcn::Event &event)
+void InventoryWindow::draw()
{
- Window::widgetResized(event);
-
const gcn::Rectangle &area = getChildrenArea();
const int width = area.width;
const int height = area.height;
- // Adjust widgets
+ // Update weight information
+ mWeightLabel->setTextWrapped(mWeight);
+ mWeightLabel->setMinWidth(width - 16);
+
mUseButton->setPosition(8, height - 8 - mUseButton->getHeight());
mDropButton->setPosition(8 + mUseButton->getWidth() + 5,
mUseButton->getY());
+ mItemNameLabel->setMinWidth(width - 16);
+ mItemNameLabel->setTextWrapped(mItemName);
mItemNameLabel->setDimension(gcn::Rectangle(8,
- mUseButton->getY() - 5 - mItemNameLabel->getHeight(),
+ mUseButton->getY() - 5 - (mItemNameLabel->getNumberOfRows()*15),
width - 16,
- mItemNameLabel->getHeight()));
+ (mItemNameLabel->getNumberOfRows()*15)));
+ mItemEffectLabel->setMinWidth(width - 16);
+ mItemEffectLabel->setTextWrapped(mItemEffect);
mItemEffectLabel->setDimension(gcn::Rectangle(8,
- mItemNameLabel->getY() - 5 - mItemEffectLabel->getHeight(),
+ mItemNameLabel->getY() - 5 - (mItemEffectLabel->getNumberOfRows()*15),
width - 16,
- mItemEffectLabel->getHeight()));
+ (mItemEffectLabel->getNumberOfRows()*15)));
+ mItemDescriptionLabel->setMinWidth(width - 16);
+ mItemDescriptionLabel->setTextWrapped(mItemDescription);
mItemDescriptionLabel->setDimension(gcn::Rectangle(8,
- mItemEffectLabel->getY() - 5 - mItemDescriptionLabel->getHeight(),
+ mItemEffectLabel->getY() - 5 - (mItemDescriptionLabel->getNumberOfRows()*15),
width - 16,
- mItemDescriptionLabel->getHeight()));
+ (mItemDescriptionLabel->getNumberOfRows()*15)));
+ mSlotsLabel->setMinWidth(width - 16);
+ mSlotsLabel->setTextWrapped(mSlots);
+ mSlotsLabel->setDimension(gcn::Rectangle(8,
+ mItemDescriptionLabel->getY() - 5 - (mSlotsLabel->getNumberOfRows()*15),
+ width - 16,
+ (mSlotsLabel->getNumberOfRows()*15)));
mInvenScroll->setSize(width - 16,
- mItemDescriptionLabel->getY() - mWeightLabel->getHeight() - 18);
+ mSlotsLabel->getY() - (mWeightLabel->getNumberOfRows()*15) - 18);
+ mInvenScroll->setPosition(8, (mWeightLabel->getNumberOfRows()*15) + 10);
+
+ setMinHeight(130 + (mSlotsLabel->getNumberOfRows()*15) +
+ (mWeightLabel->getNumberOfRows()*15) +
+ (mItemDescriptionLabel->getNumberOfRows()*15) +
+ (mItemEffectLabel->getNumberOfRows()*15) +
+ (mItemNameLabel->getNumberOfRows()*15));
+}
- mWeightLabel->setWidth(width - 16);
- mInvenSlotLabel->setWidth(width - 16);
+void InventoryWindow::widgetResized(const gcn::Event &event)
+{
+ Window::widgetResized(event);
+ draw();
}
void InventoryWindow::updateButtons()
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index b1e3ede3..2e589471 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -25,6 +25,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/selectionlistener.hpp>
+#include "textbox.h"
#include "window.h"
#include "../guichanfwd.h"
@@ -69,6 +70,11 @@ class InventoryWindow : public Window, gcn::ActionListener,
void mouseClicked(gcn::MouseEvent &event);
/**
+ * Updates window drawing.
+ */
+ void draw();
+
+ /**
* Called whenever the widget changes size.
*/
void widgetResized(const gcn::Event &event);
@@ -78,13 +84,20 @@ class InventoryWindow : public Window, gcn::ActionListener,
ItemContainer *mItems;
+ std::string mItemName;
+ std::string mItemDescription;
+ std::string mItemEffect;
+ std::string mWeight;
+ std::string mTotalWeight;
+ std::string mMaxWeight;
+ std::string mSlots;
gcn::Button *mUseButton, *mDropButton;
gcn::ScrollArea *mInvenScroll;
- gcn::Label *mItemNameLabel;
- gcn::Label *mItemDescriptionLabel;
- gcn::Label *mItemEffectLabel;
- gcn::Label *mWeightLabel;
- gcn::Label *mInvenSlotLabel;
+ TextBox *mItemNameLabel;
+ TextBox *mItemDescriptionLabel;
+ TextBox *mItemEffectLabel;
+ TextBox *mWeightLabel;
+ TextBox *mSlotsLabel;
};
extern InventoryWindow *inventoryWindow;
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 2e8941e8..4ce8ac6c 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "item_amount.h"
-
#include "button.h"
#include "inttextbox.h"
+#include "item_amount.h"
#include "slider.h"
#include "trade.h"
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 9115b1fb..9e17f3da 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -28,6 +28,7 @@
#include "../inventory.h"
#include "../item.h"
#include "../itemshortcut.h"
+#include "../localplayer.h"
#include "../log.h"
#include "../resources/image.h"
@@ -41,10 +42,11 @@ const int ItemContainer::gridHeight = 42; // item icon height + 10
static const int NO_ITEM = -1;
-ItemContainer::ItemContainer(Inventory *inventory):
+ItemContainer::ItemContainer(Inventory *inventory, int offset):
mInventory(inventory),
mSelectedItemIndex(NO_ITEM),
- mLastSelectedItemId(NO_ITEM)
+ mLastSelectedItemId(NO_ITEM),
+ mOffset(offset)
{
ResourceManager *resman = ResourceManager::getInstance();
@@ -86,10 +88,11 @@ void ItemContainer::draw(gcn::Graphics *graphics)
}
/*
- * eAthena seems to start inventory from the 3rd slot. Still a mystery to
- * us why, make sure not to copy this oddity to our own server.
+ * mOffset is used to compensate for some weirdness that eAthena inherited from
+ * Ragnarok Online. Inventory slots and cart slots are +2 from their actual index,
+ * while storage slots are +1.
*/
- for (int i = 2; i < INVENTORY_SIZE; i++)
+ for (int i = mOffset; i < mInventory->getSize(); i++)
{
Item *item = mInventory->getItem(i);
@@ -178,18 +181,19 @@ void ItemContainer::refindSelectedItem()
mLastSelectedItemId = mSelectedItemIndex = NO_ITEM;
}
-
void ItemContainer::setSelectedItemIndex(int index)
{
int newSelectedItemIndex;
- // mMaxItems is broken because of eAthena's odd inventory layout and the client's refusal
- // to handle it properly, so we work around the issue right here.
- if (index < 0 || index > mMaxItems + 1 || mInventory->getItem(index) == NULL)
+ /*
+ * mOffset is used to compensate for some weirdness that eAthena inherited from
+ * Ragnarok Online. Inventory slots and cart slots are +2 from their actual index,
+ * while storage slots are +1.
+ */
+ if (index < 0 || index > mMaxItems + mOffset || mInventory->getItem(index) == NULL)
newSelectedItemIndex = NO_ITEM;
else
newSelectedItemIndex = index;
-
if (mSelectedItemIndex != newSelectedItemIndex)
{
mSelectedItemIndex = newSelectedItemIndex;
@@ -224,7 +228,7 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event)
int columns = getWidth() / gridWidth;
int mx = event.getX();
int my = event.getY();
- int index = mx / gridWidth + ((my / gridHeight) * columns) + 2;
+ int index = mx / gridWidth + ((my / gridHeight) * columns) + mOffset;
itemShortcut->setItemSelected(-1);
setSelectedItemIndex(index);
diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h
index 34545df8..8927b001 100644
--- a/src/gui/itemcontainer.h
+++ b/src/gui/itemcontainer.h
@@ -22,11 +22,13 @@
#ifndef _TMW_ITEMCONTAINER_H__
#define _TMW_ITEMCONTAINER_H__
+#include <list>
+
#include <guichan/mouselistener.hpp>
#include <guichan/widget.hpp>
#include <guichan/widgetlistener.hpp>
-#include <list>
+#include "../guichanfwd.h"
class Image;
class Inventory;
@@ -41,14 +43,15 @@ namespace gcn {
*
* \ingroup GUI
*/
-class ItemContainer : public gcn::Widget, public gcn::MouseListener,
- public gcn::WidgetListener
+class ItemContainer : public gcn::Widget,
+ public gcn::MouseListener,
+ public gcn::WidgetListener
{
public:
/**
* Constructor. Initializes the graphic.
*/
- ItemContainer(Inventory *inventory);
+ ItemContainer(Inventory *inventory, int offset);
/**
* Destructor.
@@ -105,6 +108,7 @@ class ItemContainer : public gcn::Widget, public gcn::MouseListener,
private:
/**
+
* Sets the currently selected item. Invalid (e.g., negative) indices set `no item'.
*/
void setSelectedItemIndex(int index);
@@ -127,9 +131,10 @@ class ItemContainer : public gcn::Widget, public gcn::MouseListener,
Inventory *mInventory;
Image *mSelImg;
int mSelectedItemIndex;
- int mLastSelectedItemId; // last selected item ID. If we lose the item, find again by ID.
+ int mLastSelectedItemId; // last selected item ID. If we lose the item, find again by ID.
int mMaxItems;
+ int mOffset;
std::list<gcn::SelectionListener*> mListeners;
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
new file mode 100644
index 00000000..055cbe44
--- /dev/null
+++ b/src/gui/itempopup.cpp
@@ -0,0 +1,113 @@
+/*
+ * The Legend of Mazzeroth
+ * Copyright (C) 2008, The Legend of Mazzeroth Development Team
+ *
+ * This file is part of The Legend of Mazzeroth based on original code
+ * from The Mana World.
+ *
+ * The Legend of Mazzeroth 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 Legend of Mazzeroth 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 Legend of Mazzeroth; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <guichan/widgets/label.hpp>
+
+#include "gui.h"
+#include "itempopup.h"
+
+#include "widgets/layout.h"
+
+#include "../resources/image.h"
+#include "../resources/iteminfo.h"
+#include "../resources/resourcemanager.h"
+#include "../utils/gettext.h"
+#include "../utils/strprintf.h"
+
+ItemPopup::ItemPopup()
+{
+
+ setResizable(false);
+ setTitleBarHeight(0);
+
+ // Item Name
+ mItemName = new gcn::Label("Label");
+ mItemName->setFont(gui->getFont());
+ mItemName->setPosition(2, 2);
+ mItemName->setWidth(getWidth() - 4);
+
+ // Item Description
+ mItemDesc = new TextBox();
+ mItemDesc->setEditable(false);
+ mItemDescScroll = new ScrollArea(mItemDesc);
+
+ mItemDescScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mItemDescScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mItemDescScroll->setDimension(gcn::Rectangle(0, 0, 196, 14));
+ mItemDescScroll->setOpaque(false);
+ mItemDescScroll->setPosition(2, 15);
+
+ // Item Effect
+ mItemEffect = new TextBox();
+ mItemEffect->setEditable(false);
+ mItemEffectScroll = new ScrollArea(mItemEffect);
+
+ mItemEffectScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mItemEffectScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mItemEffectScroll->setDimension(gcn::Rectangle(0, 0, 196, 14));
+ mItemEffectScroll->setOpaque(false);
+ mItemEffectScroll->setPosition(2, 35);
+
+ add(mItemName);
+ add(mItemDescScroll);
+ add(mItemEffectScroll);
+
+ setLocationRelativeTo(getParent());
+
+ // LEEOR / TODO: This causes an exception error.
+ //moveToBottom(getParent());
+
+ mItemDesc->setTextWrapped( "" );
+ mItemEffect->setTextWrapped( "" );
+}
+
+void ItemPopup::setItem(Item *item)
+{
+
+ ItemInfo const *info = item ? &item->getInfo() : NULL;
+
+ mItemName->setCaption(info->getName());
+ mItemDesc->setTextWrapped( info->getDescription() );
+ mItemEffect->setTextWrapped( info->getEffect() );
+
+ int numRowsDesc = mItemDesc->getNumberOfRows();
+ int numRowsEffect = mItemEffect->getNumberOfRows();
+
+ if(info->getEffect() == "")
+ {
+ setContentSize(200, (numRowsDesc * 14) + 30);
+ } else {
+ setContentSize(200, (numRowsDesc * 14) + (numRowsEffect*14) + 30);
+ }
+
+ mItemDescScroll->setDimension(gcn::Rectangle(2, 0, 196, numRowsDesc * 14));
+
+ mItemEffectScroll->setDimension(gcn::Rectangle(2, 0, 196, numRowsEffect * 14));
+
+ mItemDescScroll->setPosition(2, 20);
+ mItemEffectScroll->setPosition(2, (numRowsDesc * 15) + 25);
+}
+
+unsigned int ItemPopup::getNumRows()
+{
+ return mItemDesc->getNumberOfRows(), mItemEffect->getNumberOfRows();
+}
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
new file mode 100644
index 00000000..0082ec2c
--- /dev/null
+++ b/src/gui/itempopup.h
@@ -0,0 +1,51 @@
+/*
+*
+ * The Legend of Mazzeroth
+ * Copyright (C) 2008, The Legend of Mazzeroth Development Team
+ *
+ * This file is part of The Legend of Mazzeroth based on original code
+ * from The Mana World.
+ *
+ * The Legend of Mazzeroth 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 Legend of Mazzeroth 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 Legend of Mazzeroth; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LOM_ITEMPOPUP_H__
+#define _LOM_ITEMPOPUP_H__
+
+#include "scrollarea.h"
+#include "textbox.h"
+#include "window.h"
+
+#include "../item.h"
+
+class ItemPopup : public Window
+ {
+ public:
+
+ ItemPopup();
+
+ void setItem(Item *item);
+ unsigned int getNumRows();
+
+ private:
+ gcn::Label *mItemName;
+ TextBox *mItemDesc;
+ TextBox *mItemEffect;
+ ScrollArea *mItemDescScroll;
+ ScrollArea *mItemEffectScroll;
+
+ };
+
+#endif
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp
index 2ea5d584..de5e1956 100644
--- a/src/gui/itemshortcutcontainer.cpp
+++ b/src/gui/itemshortcutcontainer.cpp
@@ -21,12 +21,12 @@
#include "itemshortcutcontainer.h"
-#include "../localplayer.h"
#include "../graphics.h"
#include "../inventory.h"
#include "../item.h"
#include "../itemshortcut.h"
#include "../keyboardconfig.h"
+#include "../localplayer.h"
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
@@ -96,6 +96,8 @@ ItemShortcutContainer::draw(gcn::Graphics *graphics)
player_node->getInventory()->findItem(itemShortcut->getItem(i));
if (item) {
// Draw item icon.
+ const std::string label =
+ item->isEquipped() ? "Eq." : toString(item->getQuantity());
Image* image = item->getImage();
if (image) {
const std::string label =
diff --git a/src/gui/itemshortcutcontainer.h b/src/gui/itemshortcutcontainer.h
index 76ca870c..a8daca0b 100644
--- a/src/gui/itemshortcutcontainer.h
+++ b/src/gui/itemshortcutcontainer.h
@@ -26,6 +26,8 @@
#include <guichan/widget.hpp>
#include <guichan/widgetlistener.hpp>
+#include "../guichanfwd.h"
+
class Image;
class Item;
diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp
index e7364411..5a4dfacd 100644
--- a/src/gui/itemshortcutwindow.cpp
+++ b/src/gui/itemshortcutwindow.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "itemshortcutwindow.h"
-
#include "itemshortcutcontainer.h"
+#include "itemshortcutwindow.h"
#include "scrollarea.h"
static const int SCROLL_PADDING = 0;
diff --git a/src/gui/itemshortcutwindow.h b/src/gui/itemshortcutwindow.h
index 017df5ec..587f15c8 100644
--- a/src/gui/itemshortcutwindow.h
+++ b/src/gui/itemshortcutwindow.h
@@ -24,6 +24,8 @@
#include "window.h"
+#include "../guichanfwd.h"
+
class ItemShortcutContainer;
class ScrollArea;
diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp
index 28bb82e9..4dca66a0 100644
--- a/src/gui/listbox.cpp
+++ b/src/gui/listbox.cpp
@@ -19,13 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "listbox.h"
-
#include <guichan/font.hpp>
#include <guichan/graphics.hpp>
#include <guichan/listmodel.hpp>
#include <guichan/mouseinput.hpp>
+#include "listbox.h"
+
ListBox::ListBox(gcn::ListModel *listModel):
gcn::ListBox(listModel)
{
diff --git a/src/gui/listbox.h b/src/gui/listbox.h
index 1d627b3b..30eb4c79 100644
--- a/src/gui/listbox.h
+++ b/src/gui/listbox.h
@@ -24,6 +24,8 @@
#include <guichan/widgets/listbox.hpp>
+#include "../guichanfwd.h"
+
class SelectionListener;
/**
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 06a5f9f0..fa47af32 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -19,80 +19,125 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "login.h"
-
#include <string>
+#include <vector>
#include <guichan/widgets/label.hpp>
-#include "../main.h"
-#include "../logindata.h"
-
#include "button.h"
#include "checkbox.h"
+#include "login.h"
#include "ok_dialog.h"
#include "passwordfield.h"
#include "textfield.h"
+#include "../main.h"
+#include "../logindata.h"
+#include "../configuration.h"
+
+#include "../utils/tostring.h"
+
+static const int MAX_SERVER_LIST_SIZE = 5;
+static const int LOGIN_DIALOG_WIDTH = 220;
+static const int LOGIN_DIALOG_HEIGHT = 140;
+static const int FIELD_WIDTH = LOGIN_DIALOG_WIDTH - 70;
+
LoginDialog::LoginDialog(LoginData *loginData):
Window("Login"), mLoginData(loginData)
{
gcn::Label *userLabel = new gcn::Label("Name:");
gcn::Label *passLabel = new gcn::Label("Password:");
gcn::Label *serverLabel = new gcn::Label("Server:");
+ gcn::Label *portLabel = new gcn::Label("Port:");
+ gcn::Label *dropdownLabel = new gcn::Label("Recent:");
+ std::vector<std::string> dfltServer;
+ dfltServer.push_back("www.aethyra.org");
+ dfltServer.push_back("www.aethyra.org");
+ std::vector<std::string> dfltPort;
+ dfltPort.push_back("21001");
+ dfltPort.push_back("22001");
+ mServerList = new DropDownList("MostRecent00", dfltServer, dfltPort,
+ MAX_SERVER_LIST_SIZE);
+ mServerListBox = new gcn::ListBox(mServerList);
+ mServerScrollArea = new ScrollArea();
+
mUserField = new TextField(mLoginData->username);
mPassField = new PasswordField(mLoginData->password);
- mServerField = new TextField(mLoginData->hostname);
+ mServerField = new TextField(mServerList->getServerAt(0));
+ mPortField = new TextField(mServerList->getPortAt(0));
+ mServerDropDown = new DropDown(mServerList,
+ mServerScrollArea,
+ mServerListBox);
+
mKeepCheck = new CheckBox("Keep", mLoginData->remember);
mOkButton = new Button("OK", "ok", this);
mCancelButton = new Button("Cancel", "cancel", this);
mRegisterButton = new Button("Register", "register", this);
- const int width = 220;
- const int height = 100;
-
- setContentSize(width, height);
-
- userLabel->setPosition(5, 5);
- passLabel->setPosition(5, 14 + userLabel->getHeight());
- serverLabel->setPosition(
- 5, 23 + userLabel->getHeight() + passLabel->getHeight());
- mUserField->setPosition(65, 5);
- mPassField->setPosition(65, 14 + userLabel->getHeight());
- mServerField->setPosition(
- 65, 23 + userLabel->getHeight() + passLabel->getHeight());
- mUserField->setWidth(width - 70);
- mPassField->setWidth(width - 70);
- mServerField->setWidth(width - 70);
- mKeepCheck->setPosition(4, 77);
+ setContentSize(LOGIN_DIALOG_WIDTH, LOGIN_DIALOG_HEIGHT);
+
+ const int USER_TOP = 5;
+ userLabel->setPosition(5, USER_TOP);
+ mUserField->setPosition(65, USER_TOP);
+ mUserField->setWidth(FIELD_WIDTH);
+
+ const int PASS_TOP = 9 + USER_TOP + userLabel->getHeight();
+ passLabel->setPosition(5, PASS_TOP);
+ mPassField->setPosition(65, PASS_TOP);
+ mPassField->setWidth(FIELD_WIDTH);
+
+ const int SERVER_TOP = 9 + PASS_TOP + passLabel->getHeight();
+ serverLabel->setPosition(5, SERVER_TOP);
+ mServerField->setPosition(65, SERVER_TOP);
+ mServerField->setWidth(FIELD_WIDTH);
+
+ const int PORT_TOP = 9 + SERVER_TOP + serverLabel->getHeight();
+ portLabel->setPosition(5, PORT_TOP);
+ mPortField->setPosition(65, PORT_TOP);
+ mPortField->setWidth(FIELD_WIDTH);
+
+ const int DROP_DOWN_TOP = 9 + PORT_TOP + serverLabel->getHeight();
+ dropdownLabel->setPosition(5, DROP_DOWN_TOP);
+ mServerDropDown->setPosition(65, DROP_DOWN_TOP);
+ mServerDropDown->setWidth(FIELD_WIDTH);
+
+ const int REST_TOP = LOGIN_DIALOG_HEIGHT - mCancelButton->getHeight() - 5;
+
+ mKeepCheck->setPosition(4, REST_TOP);
mCancelButton->setPosition(
- width - mCancelButton->getWidth() - 5,
- height - mCancelButton->getHeight() - 5);
+ LOGIN_DIALOG_WIDTH - mCancelButton->getWidth() - 5, REST_TOP);
mOkButton->setPosition(
- mCancelButton->getX() - mOkButton->getWidth() - 5,
- height - mOkButton->getHeight() - 5);
+ mCancelButton->getX() - mOkButton->getWidth() - 5, REST_TOP);
mRegisterButton->setPosition(
- mKeepCheck->getX() + mKeepCheck->getWidth() + 10,
- height - mRegisterButton->getHeight() - 5);
+ mKeepCheck->getX() + mKeepCheck->getWidth() + 10, REST_TOP);
mUserField->setActionEventId("ok");
mPassField->setActionEventId("ok");
mServerField->setActionEventId("ok");
+ mServerDropDown->setActionEventId("changeSelection");
mUserField->addKeyListener(this);
mPassField->addKeyListener(this);
mServerField->addKeyListener(this);
+ mPortField->addKeyListener(this);
+ mServerDropDown->addKeyListener(this);
mUserField->addActionListener(this);
mPassField->addActionListener(this);
mServerField->addActionListener(this);
+ mPortField->addActionListener(this);
+ mServerDropDown->addActionListener(this);
mKeepCheck->addActionListener(this);
add(userLabel);
add(passLabel);
add(serverLabel);
+ add(portLabel);
+ add(dropdownLabel);
add(mUserField);
add(mPassField);
add(mServerField);
+ add(mPortField);
+ add(mServerDropDown);
add(mKeepCheck);
add(mOkButton);
add(mCancelButton);
@@ -112,6 +157,9 @@ LoginDialog::LoginDialog(LoginData *loginData):
LoginDialog::~LoginDialog()
{
+ delete mServerList;
+ delete mServerListBox;
+ delete mServerScrollArea;
}
void
@@ -120,6 +168,7 @@ LoginDialog::action(const gcn::ActionEvent &event)
if (event.getId() == "ok" && canSubmit())
{
mLoginData->hostname = mServerField->getText();
+ mLoginData->port = getUShort(mPortField->getText());
mLoginData->username = mUserField->getText();
mLoginData->password = mPassField->getText();
mLoginData->remember = mKeepCheck->isSelected();
@@ -127,9 +176,15 @@ LoginDialog::action(const gcn::ActionEvent &event)
mOkButton->setEnabled(false);
mRegisterButton->setEnabled(false);
-
+ mServerList->save(mServerField->getText(), mPortField->getText());
state = ACCOUNT_STATE;
}
+ else if (event.getId() == "changeSelection")
+ {
+ int selected = mServerListBox->getSelected();
+ mServerField->setText(mServerList->getServerAt(selected));
+ mPortField->setText(mServerList->getPortAt(selected));
+ }
else if (event.getId() == "cancel")
{
state = EXIT_STATE;
@@ -138,6 +193,14 @@ LoginDialog::action(const gcn::ActionEvent &event)
{
// Transfer these fields on to the register dialog
mLoginData->hostname = mServerField->getText();
+ if (isUShort(mPortField->getText()))
+ {
+ mLoginData->port = getUShort(mPortField->getText());
+ }
+ else
+ {
+ mLoginData->port = 6901;
+ }
mLoginData->username = mUserField->getText();
mLoginData->password = mPassField->getText();
@@ -157,5 +220,147 @@ LoginDialog::canSubmit()
return !mUserField->getText().empty() &&
!mPassField->getText().empty() &&
!mServerField->getText().empty() &&
+ isUShort(mPortField->getText()) &&
state == LOGIN_STATE;
}
+
+bool
+LoginDialog::isUShort(const std::string &str)
+{
+ if (str == "")
+ {
+ return false;
+ }
+ unsigned long l = 0;
+ for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end();
+ strPtr != strEnd; ++strPtr)
+ {
+ if (*strPtr < '0' || *strPtr > '9')
+ {
+ return false;
+ }
+ l = l * 10 + (*strPtr - '0'); // *strPtr - '0' will never be negative
+ if (l > 65535)
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+unsigned short
+LoginDialog::getUShort(const std::string &str)
+{
+ unsigned long l = 0;
+ for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end();
+ strPtr != strEnd; ++strPtr)
+ {
+ l = l * 10 + (*strPtr - '0');
+ }
+ return static_cast<unsigned short>(l);
+}
+
+/**
+ * LoginDialog::DropDownList
+ */
+
+void
+LoginDialog::DropDownList::saveEntry(const std::string &server,
+ const std::string &port, int &saved)
+{
+ if (saved < MAX_SERVER_LIST_SIZE && server != "")
+ {
+ config.setValue(mConfigPrefix + "Server" + toString(saved), server);
+ config.setValue(mConfigPrefix + "Port" + toString(saved), port);
+ ++saved;
+ }
+}
+
+LoginDialog::DropDownList::DropDownList(std::string prefix,
+ std::vector<std::string> dflt,
+ std::vector<std::string> dfltPort,
+ int maxEntries) :
+ mConfigPrefix(prefix),
+ mMaxEntries(maxEntries)
+{
+ for (int i = 0; i < maxEntries; ++i)
+ {
+ std::string server = config.getValue(mConfigPrefix + "Server" +
+ toString(i), "");
+ if (server == "") // Just in case had original config entries
+ {
+ server = config.getValue(mConfigPrefix + "ServerList" +
+ toString(i), "");
+ }
+ std::string port = config.getValue(mConfigPrefix + "Port" +
+ toString(i), dfltPort.front());
+
+ if (server != "")
+ {
+ mServers.push_back(server);
+ mPorts.push_back(port);
+ }
+ }
+ if (mServers.size() == 0)
+ {
+ mServers.assign(dflt.begin(), dflt.end());
+ mPorts.assign(dfltPort.begin(), dfltPort.end());
+ }
+}
+
+void
+LoginDialog::DropDownList::save(const std::string &server,
+ const std::string &port)
+{
+ int position = 0;
+ saveEntry(server, port, position);
+ for (std::vector<std::string>::const_iterator sPtr = mServers.begin(),
+ sEnd = mServers.end(),
+ pPtr = mPorts.begin(),
+ pEnd = mPorts.end();
+ sPtr != sEnd && pPtr != pEnd;
+ ++sPtr, ++pPtr)
+ {
+ if (*sPtr != server || *pPtr != port)
+ {
+ saveEntry(*sPtr, *pPtr, position);
+ }
+ }
+}
+
+int
+LoginDialog::DropDownList::getNumberOfElements()
+{
+ return mServers.size();
+}
+
+std::string
+LoginDialog::DropDownList::getElementAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return "";
+ }
+ return getServerAt(i) + ":" + getPortAt(i);
+}
+
+std::string
+LoginDialog::DropDownList::getServerAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return "";
+ }
+ return mServers.at(i);
+}
+
+
+std::string
+LoginDialog::DropDownList::getPortAt(int i)
+{
+ if (i < 0 || i >= getNumberOfElements())
+ {
+ return "";
+ }
+ return mPorts.at(i);
+}
diff --git a/src/gui/login.h b/src/gui/login.h
index 4760817c..3b911424 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -23,10 +23,17 @@
#define _TMW_LOGIN_H
#include <iosfwd>
+#include <string>
+#include <vector>
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
+#include "scrollarea.h"
#include "window.h"
+
+#include "widgets/dropdown.h"
+
#include "../guichanfwd.h"
class LoginData;
@@ -70,15 +77,66 @@ class LoginDialog : public Window, public gcn::ActionListener,
bool
canSubmit();
+ /**
+ * Function to decide whether string is an unsigned short or not
+ *
+ * @param str the string to parse
+ *
+ * @return true is str is an unsigned short, false otherwise
+ */
+ static bool
+ isUShort(const std::string &str);
+
+ /**
+ * Converts string to an unsigned short (undefined if invalid)
+ *
+ * @param str the string to parse
+ *
+ * @return the value str represents
+ */
+ static unsigned short
+ getUShort(const std::string &str);
+
+ DropDown *mServerDropDown;
gcn::TextField *mUserField;
gcn::TextField *mPassField;
gcn::TextField *mServerField;
+ gcn::TextField *mPortField;
gcn::CheckBox *mKeepCheck;
gcn::Button *mOkButton;
gcn::Button *mCancelButton;
gcn::Button *mRegisterButton;
LoginData *mLoginData;
+
+ /**
+ * Helper class to keep a list of all the recent entries for the
+ * dropdown
+ */
+ class DropDownList : public gcn::ListModel
+ {
+ private:
+ std::vector<std::string> mServers;
+ std::vector<std::string> mPorts;
+ std::string mConfigPrefix;
+ int mMaxEntries;
+ void saveEntry(const std::string &server,
+ const std::string &port, int &saved);
+ public:
+ DropDownList(std::string prefix,
+ std::vector<std::string> dfltServer,
+ std::vector<std::string> dfltPort,
+ int maxEntries);
+ void save(const std::string &server, const std::string &port);
+ int getNumberOfElements();
+ std::string getElementAt(int i);
+ std::string getServerAt(int i);
+ std::string getPortAt(int i);
+ };
+ DropDownList *mServerList;
+ gcn::ListBox *mServerListBox;
+ ScrollArea *mServerScrollArea;
+
};
#endif
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index 3c3e4ab8..79281631 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -19,21 +19,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "menuwindow.h"
-
#include <string>
#include <guichan/actionlistener.hpp>
#include "button.h"
+#include "menuwindow.h"
#include "windowcontainer.h"
-extern Window *setupWindow;
-extern Window *inventoryWindow;
+extern Window *chatWindow;
extern Window *equipmentWindow;
+extern Window *inventoryWindow;
+extern Window *itemShortcutWindow;
+extern Window *setupWindow;
extern Window *skillDialog;
extern Window *statusWindow;
-extern Window *itemShortcutWindow;
namespace {
struct MenuWindowListener : public gcn::ActionListener
@@ -56,6 +56,7 @@ MenuWindow::MenuWindow():
// Buttons
const char *buttonNames[] =
{
+ "Chat",
"Status",
"Equipment",
"Inventory",
@@ -89,7 +90,11 @@ void MenuWindowListener::action(const gcn::ActionEvent &event)
{
Window *window = NULL;
- if (event.getId() == "Status")
+ if (event.getId() == "Chat")
+ {
+ window = chatWindow;
+ }
+ else if (event.getId() == "Status")
{
window = statusWindow;
}
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index f07cb417..8339e478 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -30,11 +30,11 @@
Minimap::Minimap():
Window("Map"),
- mMapImage(NULL)
+ mMapImage(NULL),
+ mProportion(0.5)
{
+ setCloseButton(true);
setWindowName("MiniMap");
- setDefaultSize(5, 25, 100, 100);
- loadWindowState();
}
Minimap::~Minimap()
@@ -51,7 +51,21 @@ void Minimap::setMapImage(Image *img)
mMapImage = img;
if (mMapImage)
+ {
+ int offsetX = getPadding();
+ int offsetY = getTitleBarHeight();
mMapImage->setAlpha(0.7);
+ setDefaultSize(offsetX, offsetY,
+ mMapImage->getWidth() < (100 + offsetX) ?
+ mMapImage->getWidth() : (100 + offsetX),
+ mMapImage->getHeight() < (100 + offsetY) ?
+ mMapImage->getHeight() : (100 + offsetY));
+ loadWindowState();
+ }
+ else
+ {
+ setVisible(false);
+ }
}
void Minimap::draw(gcn::Graphics *graphics)
@@ -68,9 +82,10 @@ void Minimap::draw(gcn::Graphics *graphics)
if (mMapImage->getWidth() > a.width ||
mMapImage->getHeight() > a.height)
{
- mapOriginX += (a.width - player_node->mX) / 2;
- mapOriginY += (a.height - player_node->mY) / 2;
+ mapOriginX += ((a.width) / 2) - (player_node->mX * mProportion);
+ mapOriginY += ((a.height) / 2) - (player_node->mY * mProportion);
}
+
static_cast<Graphics*>(graphics)->
drawImage(mMapImage, mapOriginX, mapOriginY);
}
@@ -106,10 +121,11 @@ void Minimap::draw(gcn::Graphics *graphics)
continue;
}
- const int offset = (dotSize - 1) / 2;
+ const int offset = (int) ((dotSize - 1) * mProportion);
+
graphics->fillRectangle(gcn::Rectangle(
- being->mX / 2 + mapOriginX - offset,
- being->mY / 2 + mapOriginY - offset,
+ (int) (being->mX * mProportion) + mapOriginX - offset,
+ (int) (being->mY * mProportion) + mapOriginY - offset,
dotSize, dotSize));
}
}
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index f91dc22d..7897ebdb 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -24,6 +24,8 @@
#include "window.h"
+#include "../guichanfwd.h"
+
class Image;
/**
@@ -50,12 +52,18 @@ class Minimap : public Window
void setMapImage(Image *img);
/**
+ * Sets the map proportion (1 means 1 tile to one pixel, .5 means 2 tiles to 1 pixel, etc.)
+ */
+ void setProportion(float proportion) { mProportion = proportion; }
+
+ /**
* Draws the minimap.
*/
void draw(gcn::Graphics *graphics);
private:
Image *mMapImage;
+ float mProportion;
};
extern Minimap *minimap;
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index baae14a7..59dca0e1 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -19,16 +19,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "ministatus.h"
-
#include <guichan/widgets/label.hpp>
#include "gui.h"
+#include "ministatus.h"
#include "progressbar.h"
-#include "../localplayer.h"
#include "../configuration.h"
#include "../graphics.h"
+#include "../localplayer.h"
#include "../utils/tostring.h"
@@ -97,11 +96,6 @@ void MiniStatusWindow::update()
mHpBar->setProgress((float) player_node->mHp / player_node->mMaxHp);
mMpBar->setProgress((float) player_node->mMp / player_node->mMaxMp);
- if (player_node->MATK <= 0)
- mMpBar->setColor(100, 100, 100); // grey, to indicate that we lack magic
- else
- mMpBar->setColor(26, 102, 230); // blue, to indicate that we have magic
-
mXpBar->setProgress(
(float) player_node->getXp() / player_node->mXpForNextLevel);
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index 34c9cce1..b53de828 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -19,12 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "npc_text.h"
-
#include <string>
-#include "scrollarea.h"
-#include "button.h"
+#include "npc_text.h"
#include "textbox.h"
#include "../npc.h"
@@ -60,7 +57,11 @@ NpcTextDialog::NpcTextDialog():
void NpcTextDialog::setText(const std::string &text)
{
+ const gcn::Rectangle &area = getChildrenArea();
+ const int width = area.width;
+
mText = text;
+ mTextBox->setMinWidth(width - 30);
mTextBox->setTextWrapped(mText);
}
@@ -77,6 +78,9 @@ void NpcTextDialog::widgetResized(const gcn::Event &event)
const int width = area.width;
const int height = area.height;
+ mTextBox->setMinWidth(width - 30);
+ mTextBox->setTextWrapped(mText);
+
scrollArea->setDimension(gcn::Rectangle(
5, 5, width - 10, height - 15 - okButton->getHeight()));
okButton->setPosition(
diff --git a/src/gui/npc_text.h b/src/gui/npc_text.h
index 76161f88..b647b9a1 100644
--- a/src/gui/npc_text.h
+++ b/src/gui/npc_text.h
@@ -23,10 +23,15 @@
#define _TMW_NPC_TEXT_H
#include <iosfwd>
+
#include <guichan/actionlistener.hpp>
+#include "button.h"
+#include "scrollarea.h"
#include "window.h"
+#include "../guichanfwd.h"
+
class TextBox;
/**
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index cdd38312..c17cd4aa 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -19,13 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "npclistdialog.h"
-
#include <sstream>
-#include "button.h"
-#include "scrollarea.h"
#include "listbox.h"
+#include "npclistdialog.h"
#include "../npc.h"
diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h
index f548dbba..099d03c0 100644
--- a/src/gui/npclistdialog.h
+++ b/src/gui/npclistdialog.h
@@ -28,6 +28,8 @@
#include <guichan/actionlistener.hpp>
#include <guichan/listmodel.hpp>
+#include "button.h"
+#include "scrollarea.h"
#include "window.h"
#include "../guichanfwd.h"
diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp
index d43c8e69..421c873e 100644
--- a/src/gui/ok_dialog.cpp
+++ b/src/gui/ok_dialog.cpp
@@ -20,33 +20,52 @@
*/
#include "ok_dialog.h"
-#include "textbox.h"
-#include "button.h"
-#include "scrollarea.h"
+
+#include <guichan/font.hpp>
OkDialog::OkDialog(const std::string &title, const std::string &msg,
Window *parent):
Window(title, true, parent)
{
- TextBox *textBox = new TextBox();
- textBox->setEditable(false);
+ mTextBox = new TextBox();
+ mTextBox->setEditable(false);
+ mTextBox->setOpaque(false);
+
+ mTextArea = new ScrollArea(mTextBox);
+ okButton = new Button("Ok", "ok", this);
+
+ mTextArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mTextArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mTextArea->setOpaque(false);
- gcn::ScrollArea *scrollArea = new ScrollArea(textBox);
- gcn::Button *okButton = new Button("Ok", "ok", this);
+ mTextBox->setMinWidth(260);
+ mTextBox->setTextWrapped(msg);
- setContentSize(260, 175);
- scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- scrollArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
- scrollArea->setDimension(gcn::Rectangle(
- 5, 5, 250, 160 - okButton->getHeight()));
+ int numRows = mTextBox->getNumberOfRows();
- textBox->setTextWrapped(msg);
+ if (numRows > 1)
+ {
+ // 15 == height of each line of text (based on font heights)
+ // 14 == row top + bottom graphic pixel heights
+ setContentSize(mTextBox->getMinWidth() + 15, 15 + (numRows * 15) + okButton->getHeight());
+ mTextArea->setDimension(gcn::Rectangle(4, 5, mTextBox->getMinWidth() + 5,
+ 3 + (numRows * 14)));
+ }
+ else
+ {
+ int width = getFont()->getWidth(title);
+ if (width < getFont()->getWidth(msg))
+ width = getFont()->getWidth(msg);
+ if (width < okButton->getWidth())
+ width = okButton->getWidth();
+ setContentSize(width + 15, 30 + okButton->getHeight());
+ mTextArea->setDimension(gcn::Rectangle(4, 5, width + 5, 17));
+ }
- okButton->setPosition(
- 260 - 5 - okButton->getWidth(),
- 175 - 5 - okButton->getHeight());
+ okButton->setPosition((mTextBox->getMinWidth() - okButton->getWidth()) / 2,
+ (numRows * 14) + okButton->getHeight() - 8);
- add(scrollArea);
+ add(mTextArea);
add(okButton);
setLocationRelativeTo(getParent());
@@ -54,6 +73,11 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
okButton->requestFocus();
}
+unsigned int OkDialog::getNumRows()
+{
+ return mTextBox->getNumberOfRows();
+}
+
void OkDialog::action(const gcn::ActionEvent &event)
{
// Proxy button events to our listeners
diff --git a/src/gui/ok_dialog.h b/src/gui/ok_dialog.h
index cba12d72..a06ddd7c 100644
--- a/src/gui/ok_dialog.h
+++ b/src/gui/ok_dialog.h
@@ -24,8 +24,13 @@
#include <guichan/actionlistener.hpp>
+#include "button.h"
+#include "scrollarea.h"
+#include "textbox.h"
#include "window.h"
+#include "../guichanfwd.h"
+
/**
* An 'Ok' button dialog.
*
@@ -41,10 +46,17 @@ class OkDialog : public Window, public gcn::ActionListener {
OkDialog(const std::string &title, const std::string &msg,
Window *parent = NULL);
+ unsigned int getNumRows();
+
/**
* Called when receiving actions from the widgets.
*/
void action(const gcn::ActionEvent &event);
+
+ private:
+ TextBox *mTextBox;
+ ScrollArea *mTextArea;
+ gcn::Button *okButton;
};
#endif
diff --git a/src/gui/passwordfield.h b/src/gui/passwordfield.h
index 8a14b72a..9aa6ab49 100644
--- a/src/gui/passwordfield.h
+++ b/src/gui/passwordfield.h
@@ -24,6 +24,8 @@
#include "textfield.h"
+#include "../guichanfwd.h"
+
/**
* A password field.
*
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index b6b7663a..79c5676f 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -23,8 +23,8 @@
#include "playerbox.h"
-#include "../player.h"
#include "../graphics.h"
+#include "../player.h"
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
diff --git a/src/gui/playerbox.h b/src/gui/playerbox.h
index 78eeee91..7aec87bf 100644
--- a/src/gui/playerbox.h
+++ b/src/gui/playerbox.h
@@ -24,6 +24,8 @@
#include <guichan/widgets/scrollarea.hpp>
+#include "../guichanfwd.h"
+
class ImageRect;
class Player;
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 8b73abfe..c0feb68d 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "popupmenu.h"
-
#include <cassert>
#include <iostream>
@@ -29,6 +27,7 @@
#include "browserbox.h"
#include "inventorywindow.h"
#include "item_amount.h"
+#include "popupmenu.h"
#include "windowcontainer.h"
#include "../being.h"
@@ -38,8 +37,11 @@
#include "../npc.h"
#include "../player_relations.h"
-#include "../resources/iteminfo.h"
+#include "../net/messageout.h"
+#include "../net/protocol.h"
+
#include "../resources/itemdb.h"
+#include "../resources/iteminfo.h"
extern std::string tradePartnerName;
@@ -68,49 +70,53 @@ void PopupMenu::showPopup(int x, int y, Being *being)
switch (mBeing->getType())
{
- case Being::PLAYER:
- {
- // Players can be traded with. Later also attack, follow and
- // add as buddy will be options in this menu.
- const std::string &name = mBeing->getName();
- mBrowserBox->addRow("@@trade|Trade With " + name + "@@");
- mBrowserBox->addRow("@@attack|Attack " + name + "@@");
-
- mBrowserBox->addRow("##3---");
-
- switch (player_relations.getRelation(name)) {
- case PlayerRelation::NEUTRAL:
- mBrowserBox->addRow("@@friend|Befriend " + name + "@@");
-
- case PlayerRelation::FRIEND:
- mBrowserBox->addRow("@@disregard|Disregard " + name + "@@");
- mBrowserBox->addRow("@@ignore|Ignore " + name + "@@");
- break;
-
- case PlayerRelation::DISREGARDED:
- mBrowserBox->addRow("@@unignore|Un-Ignore " + name + "@@");
- mBrowserBox->addRow("@@ignore|Completely ignore " + name + "@@");
- break;
-
- case PlayerRelation::IGNORED:
- mBrowserBox->addRow("@@unignore|Un-Ignore " + name + "@@");
- break;
- }
-
- //mBrowserBox->addRow("@@follow|Follow " + name + "@@");
- //mBrowserBox->addRow("@@buddy|Add " + name + " to Buddy List@@");
- }
- break;
-
- case Being::NPC:
- // NPCs can be talked to (single option, candidate for removal
- // unless more options would be added)
- mBrowserBox->addRow("@@talk|Talk To NPC@@");
- break;
-
- default:
- /* Other beings aren't interesting... */
- break;
+ case Being::PLAYER:
+ {
+ // Players can be traded with. Later also attack, follow and
+ // add as buddy will be options in this menu.
+ const std::string &name = mBeing->getName();
+ mBrowserBox->addRow("@@trade|Trade With " + name + "@@");
+ mBrowserBox->addRow("@@attack|Attack " + name + "@@");
+
+ mBrowserBox->addRow("##3---");
+
+ switch (player_relations.getRelation(name)) {
+ case PlayerRelation::NEUTRAL:
+ mBrowserBox->addRow("@@friend|Befriend " + name + "@@");
+
+ case PlayerRelation::FRIEND:
+ mBrowserBox->addRow("@@disregard|Disregard " + name + "@@");
+ mBrowserBox->addRow("@@ignore|Ignore " + name + "@@");
+ break;
+
+ case PlayerRelation::DISREGARDED:
+ mBrowserBox->addRow("@@unignore|Un-Ignore " + name + "@@");
+ mBrowserBox->addRow("@@ignore|Completely ignore " + name + "@@");
+ break;
+
+ case PlayerRelation::IGNORED:
+ mBrowserBox->addRow("@@unignore|Un-Ignore " + name + "@@");
+ break;
+ }
+
+ //mBrowserBox->addRow("@@follow|Follow " + name + "@@");
+ //mBrowserBox->addRow("@@buddy|Add " + name + " to Buddy List@@");
+
+ mBrowserBox->addRow("##3---");
+ mBrowserBox->addRow("@@party-invite|Invite " + name +
+ " to party@@");
+ }
+ break;
+
+ case Being::NPC:
+ // NPCs can be talked to (single option, candidate for removal
+ // unless more options would be added)
+ mBrowserBox->addRow("@@talk|Talk To NPC@@");
+ break;
+
+ default:
+ /* Other beings aren't interesting... */
+ break;
}
//browserBox->addRow("@@look|Look To@@");
@@ -140,56 +146,56 @@ void PopupMenu::handleLink(const std::string& link)
{
// Talk To action
if (link == "talk" &&
- mBeing != NULL &&
- mBeing->getType() == Being::NPC &&
- current_npc == 0)
+ mBeing != NULL &&
+ mBeing->getType() == Being::NPC &&
+ current_npc == 0)
{
- dynamic_cast<NPC*>(mBeing)->talk();
+ dynamic_cast<NPC*>(mBeing)->talk();
}
// Trade action
else if (link == "trade" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_node->trade(mBeing);
- tradePartnerName = mBeing->getName();
+ player_node->trade(mBeing);
+ tradePartnerName = mBeing->getName();
}
// Attack action
else if (link == "attack" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_node->attack(mBeing, true);
+ player_node->attack(mBeing, true);
}
else if (link == "unignore" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_relations.setRelation(mBeing->getName(), PlayerRelation::NEUTRAL);
+ player_relations.setRelation(mBeing->getName(), PlayerRelation::NEUTRAL);
}
else if (link == "ignore" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_relations.setRelation(mBeing->getName(), PlayerRelation::IGNORED);
+ player_relations.setRelation(mBeing->getName(), PlayerRelation::IGNORED);
}
else if (link == "disregard" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_relations.setRelation(mBeing->getName(), PlayerRelation::DISREGARDED);
+ player_relations.setRelation(mBeing->getName(), PlayerRelation::DISREGARDED);
}
else if (link == "friend" &&
- mBeing != NULL &&
- mBeing->getType() == Being::PLAYER)
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
{
- player_relations.setRelation(mBeing->getName(), PlayerRelation::FRIEND);
+ player_relations.setRelation(mBeing->getName(), PlayerRelation::FRIEND);
}
/*
@@ -202,16 +208,16 @@ void PopupMenu::handleLink(const std::string& link)
// Add Buddy action
else if ((link == "buddy") && mBeing != NULL && mBeing->isPlayer())
{
- if (!buddyWindow->isVisible())
- buddyWindow->setVisible(true);
+ if (!buddyWindow->isVisible())
+ buddyWindow->setVisible(true);
- buddyWindow->addBuddy(mBeing->getName());
+ buddyWindow->addBuddy(mBeing->getName());
}*/
// Pick Up Floor Item action
else if ((link == "pickup") && mFloorItem != NULL)
{
- player_node->pickUp(mFloorItem);
+ player_node->pickUp(mFloorItem);
}
// Look To action
@@ -221,39 +227,47 @@ void PopupMenu::handleLink(const std::string& link)
else if (link == "use")
{
- assert(mItem);
- if (mItem->isEquipment())
- {
- if (mItem->isEquipped())
- {
- player_node->unequipItem(mItem);
- }
- else
- {
- player_node->equipItem(mItem);
- }
- }
- else
- {
- player_node->useItem(mItem);
- }
+ assert(mItem);
+ if (mItem->isEquipment())
+ {
+ if (mItem->isEquipped())
+ {
+ player_node->unequipItem(mItem);
+ }
+ else
+ {
+ player_node->equipItem(mItem);
+ }
+ }
+ else
+ {
+ player_node->useItem(mItem);
+ }
}
else if (link == "drop")
{
- new ItemAmountWindow(AMOUNT_ITEM_DROP, inventoryWindow, mItem);
+ new ItemAmountWindow(AMOUNT_ITEM_DROP, inventoryWindow, mItem);
}
else if (link == "description")
{
- // do nothing for now, I need to write
- // a window for the description first
+ // do nothing for now, I need to write
+ // a window for the description first
+ }
+ else if (link == "party-invite" &&
+ mBeing != NULL &&
+ mBeing->getType() == Being::PLAYER)
+ {
+ MessageOut outMsg(player_node->getNetwork());
+ outMsg.writeInt16(CMSG_PARTY_INVITE);
+ outMsg.writeInt32(mBeing->getId());
}
// Unknown actions
else
{
- std::cout << link << std::endl;
+ std::cout << link << std::endl;
}
setVisible(false);
@@ -271,13 +285,13 @@ void PopupMenu::showPopup(int x, int y, Item *item)
if (item->isEquipment())
{
- if (item->isEquipped())
- mBrowserBox->addRow("@@use|Unequip@@");
- else
- mBrowserBox->addRow("@@use|Equip@@");
+ if (item->isEquipped())
+ mBrowserBox->addRow("@@use|Unequip@@");
+ else
+ mBrowserBox->addRow("@@use|Equip@@");
}
else
- mBrowserBox->addRow("@@use|Use@@");
+ mBrowserBox->addRow("@@use|Use@@");
mBrowserBox->addRow("@@drop|Drop@@");
mBrowserBox->addRow("@@description|Description@@");
@@ -291,9 +305,9 @@ void PopupMenu::showPopup(int x, int y)
{
setContentSize(mBrowserBox->getWidth() + 8, mBrowserBox->getHeight() + 8);
if (windowContainer->getWidth() < (x + getWidth() + 5))
- x = windowContainer->getWidth() - getWidth();
+ x = windowContainer->getWidth() - getWidth();
if (windowContainer->getHeight() < (y + getHeight() + 5))
- y = windowContainer->getHeight() - getHeight();
+ y = windowContainer->getHeight() - getHeight();
setPosition(x, y);
setVisible(true);
requestMoveToTop();
diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h
index 2d10e6eb..3cf949b3 100644
--- a/src/gui/popupmenu.h
+++ b/src/gui/popupmenu.h
@@ -22,15 +22,14 @@
#ifndef _TMW_POPUP_MENU_H
#define _TMW_POPUP_MENU_H
-#include "window.h"
#include "linkhandler.h"
+#include "window.h"
class Being;
class BrowserBox;
class FloorItem;
class Item;
-
/**
* Window showing popup menu.
*/
diff --git a/src/gui/progressbar.h b/src/gui/progressbar.h
index 70cfa15c..a20c901f 100644
--- a/src/gui/progressbar.h
+++ b/src/gui/progressbar.h
@@ -26,8 +26,9 @@
#include <SDL_types.h>
-class ImageRect;
+#include "../guichanfwd.h"
+class ImageRect;
/**
* A progress bar.
diff --git a/src/gui/radiobutton.h b/src/gui/radiobutton.h
index 6506444f..8fb6d832 100644
--- a/src/gui/radiobutton.h
+++ b/src/gui/radiobutton.h
@@ -24,8 +24,9 @@
#include <guichan/widgets/radiobutton.hpp>
-class Image;
+#include "../guichanfwd.h"
+class Image;
/*
* Guichan based RadioButton with custom look
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 2a97a3e5..ec6a9756 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "register.h"
-
#include <string>
#include <sstream>
@@ -34,10 +32,13 @@
#include "button.h"
#include "checkbox.h"
#include "login.h"
+#include "ok_dialog.h"
#include "passwordfield.h"
#include "radiobutton.h"
+#include "register.h"
#include "textfield.h"
-#include "ok_dialog.h"
+
+#include "../utils/tostring.h"
void
WrongDataNoticeListener::setTarget(gcn::TextField *textField)
@@ -63,53 +64,65 @@ RegisterDialog::RegisterDialog(LoginData *loginData):
gcn::Label *passwordLabel = new gcn::Label("Password:");
gcn::Label *confirmLabel = new gcn::Label("Confirm:");
gcn::Label *serverLabel = new gcn::Label("Server:");
+ gcn::Label *portLabel = new gcn::Label("Port:");
+
mUserField = new TextField(loginData->username);
mPasswordField = new PasswordField(loginData->password);
mConfirmField = new PasswordField();
mServerField = new TextField(loginData->hostname);
+ mPortField = new TextField(toString(loginData->port));
mMaleButton = new RadioButton("Male", "sex", true);
mFemaleButton = new RadioButton("Female", "sex", false);
mRegisterButton = new Button("Register", "register", this);
mCancelButton = new Button("Cancel", "cancel", this);
- const int width = 220;
- const int height = 150;
- setContentSize(width, height);
-
- mUserField->setPosition(65, 5);
- mUserField->setWidth(width - 70);
- mPasswordField->setPosition(
- 65, mUserField->getY() + mUserField->getHeight() + 7);
- mPasswordField->setWidth(mUserField->getWidth());
- mConfirmField->setPosition(
- 65, mPasswordField->getY() + mPasswordField->getHeight() + 7);
- mConfirmField->setWidth(mUserField->getWidth());
- mServerField->setPosition(
- 65, 23 + mConfirmField->getY() + mConfirmField->getHeight() + 7);
- mServerField->setWidth(mUserField->getWidth());
-
- userLabel->setPosition(5, mUserField->getY() + 1);
- passwordLabel->setPosition(5, mPasswordField->getY() + 1);
- confirmLabel->setPosition(5, mConfirmField->getY() + 1);
- serverLabel->setPosition(5, mServerField->getY() + 1);
-
- mMaleButton->setPosition(
- 70, mConfirmField->getY() + mConfirmField->getHeight() + 7);
- mFemaleButton->setPosition(
- 70 + 10 + mMaleButton->getWidth(),
- mMaleButton->getY());
+ const int WIDTH = 220;
+ const int HEIGHT = 170;
+ const int FIELD_WIDTH = WIDTH - 70;
+
+ setContentSize(WIDTH, HEIGHT);
+
+ const int USER_TOP = 5;
+ userLabel->setPosition(5, USER_TOP);
+ mUserField->setPosition(65, USER_TOP);
+ mUserField->setWidth(FIELD_WIDTH);
+
+ const int PASS_TOP = 9 + USER_TOP + userLabel->getHeight();
+ passwordLabel->setPosition(5, PASS_TOP);
+ mPasswordField->setPosition(65, PASS_TOP);
+ mPasswordField->setWidth(FIELD_WIDTH);
+
+ const int CONFIRM_TOP = 9 + PASS_TOP + passwordLabel->getHeight();
+ confirmLabel->setPosition(5, CONFIRM_TOP);
+ mConfirmField->setPosition(65, CONFIRM_TOP);
+ mConfirmField->setWidth(FIELD_WIDTH);
+
+ const int SEX_TOP = 9 + CONFIRM_TOP + confirmLabel->getHeight();
+ mMaleButton->setPosition(70, SEX_TOP);
+ mFemaleButton->setPosition(80 + mMaleButton->getWidth(), SEX_TOP);
+
+ const int SERVER_TOP = 9 + SEX_TOP + mMaleButton->getHeight() + 5;
+ serverLabel->setPosition(5, SERVER_TOP);
+ mServerField->setPosition(65, SERVER_TOP);
+ mServerField->setWidth(FIELD_WIDTH);
+
+ const int PORT_TOP = 9 + SERVER_TOP + serverLabel->getHeight();
+ portLabel->setPosition(5, PORT_TOP);
+ mPortField->setPosition(65, PORT_TOP);
+ mPortField->setWidth(FIELD_WIDTH);
mCancelButton->setPosition(
- width - mCancelButton->getWidth() - 5,
- height - mCancelButton->getHeight() - 5);
+ WIDTH - mCancelButton->getWidth() - 5,
+ HEIGHT - mCancelButton->getHeight() - 5);
mRegisterButton->setPosition(
mCancelButton->getX() - mRegisterButton->getWidth() - 5,
- height - mRegisterButton->getHeight() - 5);
+ HEIGHT - mRegisterButton->getHeight() - 5);
mUserField->addKeyListener(this);
mPasswordField->addKeyListener(this);
mConfirmField->addKeyListener(this);
mServerField->addKeyListener(this);
+ mPortField->addKeyListener(this);
/* TODO:
* This is a quick and dirty way to respond to the ENTER key, regardless of
@@ -120,19 +133,26 @@ RegisterDialog::RegisterDialog(LoginData *loginData):
mPasswordField->setActionEventId("register");
mConfirmField->setActionEventId("register");
mServerField->setActionEventId("register");
+ mPortField->setActionEventId("register");
+
mUserField->addActionListener(this);
mPasswordField->addActionListener(this);
mConfirmField->addActionListener(this);
mServerField->addActionListener(this);
+ mPortField->addActionListener(this);
add(userLabel);
add(passwordLabel);
- add(serverLabel);
add(confirmLabel);
+ add(serverLabel);
+ add(portLabel);
+
add(mUserField);
add(mPasswordField);
add(mConfirmField);
add(mServerField);
+ add(mPortField);
+
add(mMaleButton);
add(mFemaleButton);
add(mRegisterButton);
@@ -230,7 +250,7 @@ RegisterDialog::action(const gcn::ActionEvent &event)
mRegisterButton->setEnabled(false);
mLoginData->hostname = mServerField->getText();
- mLoginData->port = (short) config.getValue("port", 0);
+ mLoginData->port = getUShort(mPortField->getText());
mLoginData->username = mUserField->getText();
mLoginData->password = mPasswordField->getText();
mLoginData->username += mFemaleButton->isSelected() ? "_F" : "_M";
@@ -254,5 +274,42 @@ RegisterDialog::canSubmit()
!mPasswordField->getText().empty() &&
!mConfirmField->getText().empty() &&
!mServerField->getText().empty() &&
+ isUShort(mPortField->getText()) &&
state == REGISTER_STATE;
}
+
+bool
+RegisterDialog::isUShort(const std::string &str)
+{
+ if (str == "")
+ {
+ return false;
+ }
+ unsigned long l = 0;
+ for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end();
+ strPtr != strEnd; ++strPtr)
+ {
+ if (*strPtr < '0' || *strPtr > '9')
+ {
+ return false;
+ }
+ l = l * 10 + (*strPtr - '0'); // *strPtr - '0' will never be negative
+ if (l > 65535)
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+unsigned short
+RegisterDialog::getUShort(const std::string &str)
+{
+ unsigned long l = 0;
+ for (std::string::const_iterator strPtr = str.begin(), strEnd = str.end();
+ strPtr != strEnd; ++strPtr)
+ {
+ l = l * 10 + (*strPtr - '0');
+ }
+ return static_cast<unsigned short>(l);
+}
diff --git a/src/gui/register.h b/src/gui/register.h
index 771962cc..87a11bb9 100644
--- a/src/gui/register.h
+++ b/src/gui/register.h
@@ -23,10 +23,12 @@
#define _TMW_REGISTER_H
#include <iosfwd>
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
#include "window.h"
+
#include "../guichanfwd.h"
class LoginData;
@@ -85,10 +87,31 @@ class RegisterDialog : public Window, public gcn::ActionListener,
bool
canSubmit();
+ /**
+ * Function to decide whether string is an unsigned short or not
+ *
+ * @param str the string to parse
+ *
+ * @return true if str is an unsigned short, false otherwise
+ */
+ static bool
+ isUShort(const std::string &str);
+
+ /**
+ * Converts string to an unsigned short (undefined if invalid)
+ *
+ * @param str the string to parse
+ *
+ * @return the value str represents
+ */
+ static unsigned short
+ getUShort(const std::string &str);
+
gcn::TextField *mUserField;
gcn::TextField *mPasswordField;
gcn::TextField *mConfirmField;
gcn::TextField *mServerField;
+ gcn::TextField *mPortField;
gcn::Button *mRegisterButton;
gcn::Button *mCancelButton;
diff --git a/src/gui/scrollarea.h b/src/gui/scrollarea.h
index d21dae11..ebe2c77b 100644
--- a/src/gui/scrollarea.h
+++ b/src/gui/scrollarea.h
@@ -24,6 +24,8 @@
#include <guichan/widgets/scrollarea.hpp>
+#include "../guichanfwd.h"
+
class Image;
class ImageRect;
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 6df1cbf6..63af1aaa 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "sell.h"
-
#include <cassert>
#include <guichan/widgets/label.hpp>
@@ -28,17 +26,18 @@
#include "button.h"
#include "shoplistbox.h"
#include "scrollarea.h"
+#include "sell.h"
#include "shop.h"
#include "slider.h"
#include "../item.h"
#include "../npc.h"
-#include "../resources/iteminfo.h"
-
#include "../net/messageout.h"
#include "../net/protocol.h"
+#include "../resources/iteminfo.h"
+
#include "../utils/tostring.h"
SellDialog::SellDialog(Network *network):
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 4fae514f..2c22a426 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -20,41 +20,42 @@
*/
#include <algorithm>
-
-#include "setup.h"
+#include <iostream>
#include "button.h"
+#include "setup.h"
#include "setup_audio.h"
+#include "setup_colours.h"
#include "setup_joystick.h"
-#include "setup_video.h"
#include "setup_keyboard.h"
#include "setup_players.h"
+#include "setup_video.h"
#include "tabbedcontainer.h"
#include "../utils/dtor.h"
-#include <iostream>
-extern Window *statusWindow;
-extern Window *minimap;
extern Window *chatWindow;
-extern Window *inventoryWindow;
extern Window *equipmentWindow;
extern Window *helpWindow;
+extern Window *inventoryWindow;
+extern Window *minimap;
extern Window *skillDialog;
+extern Window *statusWindow;
Setup::Setup():
Window("Setup")
{
setCloseButton(true);
int width = 310;
- int height = 265;
+ int height = 310;
setContentSize(width, height);
const char *buttonNames[] = {
"Apply", "Cancel", "Reset Windows", 0
};
int x = width;
- for (const char **curBtn = buttonNames; *curBtn; ++curBtn) {
+ for (const char **curBtn = buttonNames; *curBtn; ++curBtn)
+ {
Button *btn = new Button(*curBtn, *curBtn, this);
x -= btn->getWidth() + 5;
btn->setPosition(x, height - btn->getHeight() - 5);
@@ -65,7 +66,7 @@ Setup::Setup():
btn->setEnabled(statusWindow != NULL);
}
- TabbedContainer *panel = new TabbedContainer();
+ TabbedContainer *panel = new TabbedContainer(width, 5, 20, 45, 5, 3);
panel->setDimension(gcn::Rectangle(5, 5, width, height - 40));
panel->setOpaque(false);
@@ -87,6 +88,10 @@ Setup::Setup():
panel->addTab(tab, "Keyboard");
mTabs.push_back(tab);
+ tab = new Setup_Colours();
+ panel->addTab(tab, "Colours");
+ mTabs.push_back(tab);
+
tab = new Setup_Players();
panel->addTab(tab, "Players");
mTabs.push_back(tab);
@@ -98,7 +103,7 @@ Setup::Setup():
Setup::~Setup()
{
- for_each(mTabs.begin(), mTabs.end(), make_dtor(mTabs));
+ delete_all(mTabs);
}
void Setup::action(const gcn::ActionEvent &event)
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 5268f725..fd200f4c 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -28,6 +28,8 @@
#include "window.h"
+#include "../guichanfwd.h"
+
class SetupTab;
/**
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp
index a027e133..70b34a31 100644
--- a/src/gui/setup_audio.cpp
+++ b/src/gui/setup_audio.cpp
@@ -19,12 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "setup_audio.h"
-
#include <guichan/widgets/label.hpp>
#include "checkbox.h"
#include "ok_dialog.h"
+#include "setup_audio.h"
#include "slider.h"
#include "../configuration.h"
diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h
index eaa55de6..9835a8fb 100644
--- a/src/gui/setup_audio.h
+++ b/src/gui/setup_audio.h
@@ -22,10 +22,10 @@
#ifndef _TMW_GUI_SETUP_AUDIO_H
#define _TMW_GUI_SETUP_AUDIO_H
-#include "setuptab.h"
-
#include <guichan/actionlistener.hpp>
+#include "setuptab.h"
+
#include "../guichanfwd.h"
class Setup_Audio : public SetupTab, public gcn::ActionListener
diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colours.cpp
new file mode 100644
index 00000000..0becd48f
--- /dev/null
+++ b/src/gui/setup_colours.cpp
@@ -0,0 +1,207 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include <vector>
+
+#include <guichan/listmodel.hpp>
+#include <guichan/widgets/label.hpp>
+#include <guichan/widgets/slider.hpp>
+
+#include "colour.h"
+#include "scrollarea.h"
+#include "setup_colours.h"
+#include "slider.h"
+
+#include "../configuration.h"
+
+Setup_Colours::Setup_Colours() :
+ mColourLabel("Colour:"),
+ mSelected(-1)
+{
+ mColourBox = new gcn::ListBox(textColour);
+ mScroll = new ScrollArea(mColourBox);
+
+ mColourLabel.setX(5);
+ mColourLabel.setY(5);
+
+ mColourBox->setDimension(gcn::Rectangle(0, 10 + mColourLabel.getHeight(),
+ 80,
+ 115 - mColourLabel.getHeight()));
+ mScroll->setDimension(gcn::Rectangle(5, 10 + mColourLabel.getHeight(),
+ 100, 115 - mColourLabel.getHeight()));
+ mColourBox->setSelected(-1);
+ mColourBox->setActionEventId("colour_box");
+ mColourBox->addActionListener(this);
+
+ setOpaque(false);
+
+ add(&mColourLabel);
+ add(mScroll);
+
+ setupPlacer(140, mLabel1, mSlider1, mText1, "R", "1");
+ setupPlacer(165, mLabel2, mSlider2, mText2, "G", "2");
+ setupPlacer(190, mLabel3, mSlider3, mText3, "B", "3");
+
+}
+
+Setup_Colours::~Setup_Colours()
+{
+ delete mLabel1;
+ delete mSlider1;
+ delete mText1;
+
+ delete mLabel2;
+ delete mSlider2;
+ delete mText2;
+
+ delete mLabel3;
+ delete mSlider3;
+ delete mText3;
+
+ delete mScroll;
+}
+
+void Setup_Colours::action(const gcn::ActionEvent &event)
+{
+ if (event.getId() == "colour_box")
+ {
+ mSelected = mColourBox->getSelected();
+ int col = textColour->getColourAt(mSelected);
+ setEntry(mSlider1, mText1, col >> 16);
+ setEntry(mSlider2, mText2, (col >> 8) & 0xff);
+ setEntry(mSlider3, mText3, col & 0xff);
+ return;
+ }
+
+ if (event.getId() == "slider1")
+ {
+ char buffer[30];
+ std::sprintf(buffer, "%d", static_cast<int>(mSlider1->getValue()));
+ mText1->setText(buffer);
+ updateColour();
+ return;
+ }
+
+ if (event.getId() == "slider2")
+ {
+ char buffer[30];
+ std::sprintf(buffer, "%d", static_cast<int>(mSlider2->getValue()));
+ mText2->setText(buffer);
+ updateColour();
+ return;
+ }
+
+ if (event.getId() == "slider3")
+ {
+ char buffer[30];
+ std::sprintf(buffer, "%d", static_cast<int>(mSlider3->getValue()));
+ mText3->setText(buffer);
+ updateColour();
+ return;
+ }
+}
+
+void Setup_Colours::setEntry(Slider *s, TextField *t, int value)
+{
+ s->setValue(value);
+ char buffer[100];
+ sprintf(buffer, "%d", value);
+ t->setText(buffer);
+}
+
+void Setup_Colours::apply()
+{
+ textColour->commit();
+}
+
+void Setup_Colours::cancel()
+{
+ textColour->rollback();
+ int col = textColour->getColourAt(mSelected);
+ setEntry(mSlider1, mText1, col >> 16);
+ setEntry(mSlider2, mText2, (col >> 8) & 0xff);
+ setEntry(mSlider3, mText3, col & 0xff);
+}
+
+void Setup_Colours::setupPlacer(int v, gcn::Label *&l, Slider *&s,
+ TextField *&t, std::string lbl,
+ std::string sfx)
+{
+ l = new gcn::Label(lbl + ":");
+ l->setX(5);
+ l->setY(v - l->getHeight() / 2);
+
+ s = new Slider(0, 255);
+ s->setHeight(10);
+ s->setX(25);
+ s->setY(v - s->getHeight() / 2);
+ s->setWidth(128);
+ s->setScale(0, 255);
+
+ t = new TextField();
+ t->setX(165);
+ t->setY(v - t->getHeight() / 2);
+ t->setWidth(40);
+ t->setNumeric(true);
+ t->setRange(0, 255);
+ t->addListener(this);
+
+ s->setActionEventId("slider" + sfx);
+ s->addActionListener(this);
+
+ add(l);
+ add(s);
+ add(t);
+}
+
+void Setup_Colours::listen(const TextField *tf)
+{
+ if (tf == mText1)
+ {
+ mSlider1->setValue(tf->getValue());
+ updateColour();
+ return;
+ }
+ if (tf == mText2)
+ {
+ mSlider2->setValue(tf->getValue());
+ updateColour();
+ return;
+ }
+ if (tf == mText3)
+ {
+ mSlider3->setValue(tf->getValue());
+ updateColour();
+ return;
+ }
+}
+
+void Setup_Colours::updateColour()
+{
+ if (mSelected == -1)
+ {
+ return;
+ }
+ int rgb = static_cast<int>(mSlider1->getValue()) << 16 |
+ static_cast<int>(mSlider2->getValue()) << 8 |
+ static_cast<int>(mSlider3->getValue());
+ textColour->setColourAt(mSelected, rgb);
+}
diff --git a/src/gui/setup_colours.h b/src/gui/setup_colours.h
new file mode 100644
index 00000000..3bd87848
--- /dev/null
+++ b/src/gui/setup_colours.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef _SETUP_COLOURS_H
+#define _SETUP_COLOURS_H
+
+#include <string>
+#include <vector>
+
+#include <guichan/actionlistener.hpp>
+#include <guichan/widgets/label.hpp>
+#include <guichan/widgets/listbox.hpp>
+
+#include "scrollarea.h"
+#include "setuptab.h"
+#include "slider.h"
+#include "textfield.h"
+
+#include "../guichanfwd.h"
+
+class Setup_Colours : public SetupTab, public gcn::ActionListener,
+ public TextFieldListener
+{
+ public:
+ Setup_Colours();
+ ~Setup_Colours();
+ void apply();
+ void cancel();
+ void action(const gcn::ActionEvent &event);
+
+ void listen(const TextField *tf);
+ private:
+ gcn::ListBox *mColourBox;
+ gcn::Label mColourLabel;
+ ScrollArea *mScroll;
+ int mSelected;
+
+ gcn::Label *mLabel1;
+ Slider *mSlider1;
+ TextField *mText1;
+ int mValue1;
+
+ gcn::Label *mLabel2;
+ Slider *mSlider2;
+ TextField *mText2;
+ int mValue2;
+
+ gcn::Label *mLabel3;
+ Slider *mSlider3;
+ TextField *mText3;
+ int mValue3;
+
+ void setupPlacer(int v, gcn::Label *&l, Slider *&s, TextField *&t,
+ std::string lbl, std::string sfx);
+ void setEntry(Slider *s, TextField *t, int value);
+ void updateColour();
+};
+#endif
diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp
index c59068f7..723d0597 100644
--- a/src/gui/setup_joystick.cpp
+++ b/src/gui/setup_joystick.cpp
@@ -19,12 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "setup_joystick.h"
-
#include <guichan/widgets/label.hpp>
#include "button.h"
#include "checkbox.h"
+#include "setup_joystick.h"
+
#include "../configuration.h"
#include "../joystick.h"
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index 0b7ebe98..d2973a89 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -22,10 +22,10 @@
#ifndef _TMW_GUI_SETUP_JOYSTICK_H
#define _TMW_GUI_SETUP_JOYSTICK_H
-#include "setuptab.h"
-
#include <guichan/actionlistener.hpp>
+#include "setuptab.h"
+
#include "../guichanfwd.h"
class Setup_Joystick : public SetupTab, public gcn::ActionListener
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index c6247487..007fcb52 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "setup_keyboard.h"
+#include <SDL_keyboard.h>
#include <guichan/widgets/label.hpp>
#include <guichan/listmodel.hpp>
@@ -28,14 +28,13 @@
#include "listbox.h"
#include "ok_dialog.h"
#include "scrollarea.h"
+#include "setup_keyboard.h"
#include "../configuration.h"
#include "../keyboardconfig.h"
#include "../utils/tostring.h"
-#include <SDL_keyboard.h>
-
/**
* The list model for key function list.
*
diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_keyboard.h
index 50fa76fb..937790af 100644
--- a/src/gui/setup_keyboard.h
+++ b/src/gui/setup_keyboard.h
@@ -22,14 +22,14 @@
#ifndef _TMW_GUI_SETUP_KEYBOARD_H
#define _TMW_GUI_SETUP_KEYBOARD_H
-#include "setuptab.h"
-#include "button.h"
-#include "../guichanfwd.h"
+#include <string>
#include <guichan/actionlistener.hpp>
+#include "button.h"
+#include "setuptab.h"
-#include <string>
+#include "../guichanfwd.h"
class Setup_Keyboard : public SetupTab, public gcn::ActionListener
{
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp
index 7dcbb5dc..d07a9685 100644
--- a/src/gui/setup_players.cpp
+++ b/src/gui/setup_players.cpp
@@ -19,19 +19,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "setup_players.h"
-
#include <vector>
+
#include <guichan/widgets/dropdown.hpp>
#include <guichan/widgets/label.hpp>
#include "button.h"
#include "checkbox.h"
#include "ok_dialog.h"
+#include "setup_players.h"
-#include "../player_relations.h"
#include "../configuration.h"
#include "../log.h"
+#include "../player_relations.h"
#include "../sound.h"
#define COLUMNS_NR 2 // name plus listbox
@@ -46,7 +46,7 @@
#define WIDGET_AT(row, column) (((row) * COLUMNS_NR) + column)
-static std::string table_titles[COLUMNS_NR] = {"name", "relation"};
+static std::string table_titles[COLUMNS_NR] = {" name", "relation "};
static const std::string RELATION_NAMES[PlayerRelation::RELATIONS_NR] = {
"neutral", "friend", "disregarded", "ignored"
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index b04023ab..b693a952 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -22,15 +22,14 @@
#ifndef _TMW_GUI_SETUP_PLAYERS_H
#define _TMW_GUI_SETUP_PLAYERS_H
-#include "setuptab.h"
+#include <guichan/actionlistener.hpp>
-#include "scrollarea.h"
#include "button.h"
+#include "scrollarea.h"
+#include "setuptab.h"
#include "table.h"
-#include <guichan/actionlistener.hpp>
#include "../guichanfwd.h"
-
#include "../player_relations.h"
class PlayerTableModel;
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 5db2c262..15841615 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -19,11 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "setup_video.h"
-
+#include <SDL.h>
#include <string>
#include <vector>
-#include <SDL.h>
#include <guichan/key.hpp>
#include <guichan/listmodel.hpp>
@@ -34,6 +32,7 @@
#include "listbox.h"
#include "ok_dialog.h"
#include "scrollarea.h"
+#include "setup_video.h"
#include "slider.h"
#include "textfield.h"
@@ -104,6 +103,8 @@ Setup_Video::Setup_Video():
mFullScreenEnabled(config.getValue("screen", 0)),
mOpenGLEnabled(config.getValue("opengl", 0)),
mCustomCursorEnabled(config.getValue("customcursor", 1)),
+ mParticleEffectsEnabled(config.getValue("particleeffects", 1)),
+ mSpeechBubbleEnabled(config.getValue("speechbubble", 1)),
mOpacity(config.getValue("guialpha", 0.8)),
mFps((int)config.getValue("fpslimit", 60)),
mModeListModel(new ModeListModel()),
@@ -111,6 +112,8 @@ Setup_Video::Setup_Video():
mFsCheckBox(new CheckBox("Full screen", mFullScreenEnabled)),
mOpenGLCheckBox(new CheckBox("OpenGL", mOpenGLEnabled)),
mCustomCursorCheckBox(new CheckBox("Custom cursor", mCustomCursorEnabled)),
+ mParticleEffectsCheckBox(new CheckBox("Particle effects", mParticleEffectsEnabled)),
+ mSpeechBubbleCheckBox(new CheckBox("Speech bubbles", mSpeechBubbleEnabled)),
mAlphaSlider(new Slider(0.2, 1.0)),
mFpsCheckBox(new CheckBox("FPS Limit: ")),
mFpsSlider(new Slider(10, 200)),
@@ -138,16 +141,18 @@ Setup_Video::Setup_Video():
mOpenGLCheckBox->setEnabled(false);
#endif
- mModeList->setDimension(gcn::Rectangle(0, 0, 60, 50));
- scrollArea->setDimension(gcn::Rectangle(10, 10, 90, 50));
+ mModeList->setDimension(gcn::Rectangle(0, 0, 60, 70));
+ scrollArea->setDimension(gcn::Rectangle(10, 10, 90, 70));
mFsCheckBox->setPosition(110, 10);
mOpenGLCheckBox->setPosition(110, 30);
+ mParticleEffectsCheckBox->setPosition(175, 30);
mCustomCursorCheckBox->setPosition(110, 50);
- mAlphaSlider->setDimension(gcn::Rectangle(10, 80, 100, 10));
+ mSpeechBubbleCheckBox->setPosition(110, 70);
+ mAlphaSlider->setDimension(gcn::Rectangle(10, 100, 75, 10));
alphaLabel->setPosition(20 + mAlphaSlider->getWidth(),
mAlphaSlider->getY());
- mFpsCheckBox->setPosition(90, 100);
- mFpsSlider->setDimension(gcn::Rectangle(10, 100, 75, 10));
+ mFpsCheckBox->setPosition(90, 120);
+ mFpsSlider->setDimension(gcn::Rectangle(10, 120, 75, 10));
mFpsField->setPosition(100 + mFpsCheckBox->getWidth(), 100);
mFpsField->setWidth(30);
@@ -161,6 +166,8 @@ Setup_Video::Setup_Video():
mFpsCheckBox->setSelected(mFps > 0);
mCustomCursorCheckBox->setActionEventId("customcursor");
+ mParticleEffectsCheckBox->setActionEventId("particleeffects");
+ mSpeechBubbleCheckBox->setActionEventId("speechbubble");
mAlphaSlider->setActionEventId("guialpha");
mFpsCheckBox->setActionEventId("fpslimitcheckbox");
mFpsSlider->setActionEventId("fpslimitslider");
@@ -174,6 +181,8 @@ Setup_Video::Setup_Video():
mParticleDetailField->setActionEventId("particledetailfield");
mCustomCursorCheckBox->addActionListener(this);
+ mParticleEffectsCheckBox->addActionListener(this);
+ mSpeechBubbleCheckBox->addActionListener(this);
mAlphaSlider->addActionListener(this);
mFpsCheckBox->addActionListener(this);
mFpsSlider->addActionListener(this);
@@ -187,26 +196,26 @@ Setup_Video::Setup_Video():
mParticleDetailSlider->addActionListener(this);
mParticleDetailField->addKeyListener(this);
- mScrollRadiusSlider->setDimension(gcn::Rectangle(10, 120, 75, 10));
+ mScrollRadiusSlider->setDimension(gcn::Rectangle(10, 140, 75, 10));
gcn::Label *scrollRadiusLabel = new gcn::Label("Scroll radius");
- scrollRadiusLabel->setPosition(90, 120);
- mScrollRadiusField->setPosition(mFpsField->getX(), 120);
+ scrollRadiusLabel->setPosition(90, 140);
+ mScrollRadiusField->setPosition(mFpsField->getX(), 140);
mScrollRadiusField->setWidth(30);
mScrollRadiusField->setText(toString(mOriginalScrollRadius));
mScrollRadiusSlider->setValue(mOriginalScrollRadius);
- mScrollLazinessSlider->setDimension(gcn::Rectangle(10, 140, 75, 10));
+ mScrollLazinessSlider->setDimension(gcn::Rectangle(10, 160, 75, 10));
gcn::Label *scrollLazinessLabel = new gcn::Label("Scroll laziness");
- scrollLazinessLabel->setPosition(90, 140);
- mScrollLazinessField->setPosition(mFpsField->getX(), 140);
+ scrollLazinessLabel->setPosition(90, 160);
+ mScrollLazinessField->setPosition(mFpsField->getX(), 160);
mScrollLazinessField->setWidth(30);
mScrollLazinessField->setText(toString(mOriginalScrollLaziness));
mScrollLazinessSlider->setValue(mOriginalScrollLaziness);
- mOverlayDetailSlider->setDimension(gcn::Rectangle(10, 160, 75, 10));
+ mOverlayDetailSlider->setDimension(gcn::Rectangle(10, 180, 75, 10));
gcn::Label *overlayDetailLabel = new gcn::Label("Ambient FX");
- overlayDetailLabel->setPosition(90, 160);
- mOverlayDetailField->setPosition(180, 160);
+ overlayDetailLabel->setPosition(90, 180);
+ mOverlayDetailField->setPosition(180, 180);
mOverlayDetailField->setWidth(30);
switch (mOverlayDetail)
{
@@ -222,10 +231,10 @@ Setup_Video::Setup_Video():
}
mOverlayDetailSlider->setValue(mOverlayDetail);
- mParticleDetailSlider->setDimension(gcn::Rectangle(10, 180, 75, 10));
+ mParticleDetailSlider->setDimension(gcn::Rectangle(10, 200, 75, 10));
gcn::Label *particleDetailLabel = new gcn::Label("Particle Detail");
- particleDetailLabel->setPosition(90, 180);
- mParticleDetailField->setPosition(180, 180);
+ particleDetailLabel->setPosition(90, 200);
+ mParticleDetailField->setPosition(180, 200);
mParticleDetailField->setWidth(60);
switch (mParticleDetail)
{
@@ -248,6 +257,8 @@ Setup_Video::Setup_Video():
add(mFsCheckBox);
add(mOpenGLCheckBox);
add(mCustomCursorCheckBox);
+ add(mParticleEffectsCheckBox);
+ add(mSpeechBubbleCheckBox);
add(mAlphaSlider);
add(alphaLabel);
add(mFpsCheckBox);
@@ -328,6 +339,8 @@ void Setup_Video::apply()
// We sync old and new values at apply time
mFullScreenEnabled = config.getValue("screen", 0);
mCustomCursorEnabled = config.getValue("customcursor", 1);
+ mParticleEffectsEnabled = config.getValue("particleeffects", 1);
+ mSpeechBubbleEnabled = config.getValue("speechbubble", 1);
mOpacity = config.getValue("guialpha", 0.8);
mOverlayDetail = (int)config.getValue("OverlayDetail", 2);
mOpenGLEnabled = config.getValue("opengl", 0);
@@ -370,6 +383,8 @@ void Setup_Video::cancel()
config.setValue("screen", mFullScreenEnabled ? 1 : 0);
config.setValue("customcursor", mCustomCursorEnabled ? 1 : 0);
+ config.setValue("particleeffects", mParticleEffectsEnabled ? 1 : 0);
+ config.setValue("speechbubble", mSpeechBubbleEnabled ? 1 : 0);
config.setValue("guialpha", mOpacity);
config.setValue("opengl", mOpenGLEnabled ? 1 : 0);
}
@@ -385,6 +400,18 @@ void Setup_Video::action(const gcn::ActionEvent &event)
config.setValue("customcursor",
mCustomCursorCheckBox->isSelected() ? 1 : 0);
}
+ else if (event.getId() == "particleeffects")
+ {
+ config.setValue("particleeffects",
+ mParticleEffectsCheckBox->isSelected() ? 1 : 0);
+ new OkDialog("Particle effect settings changed",
+ "Restart your client or change maps for the change to take effect.");
+ }
+ else if (event.getId() == "speechbubble")
+ {
+ config.setValue("speechbubble",
+ mSpeechBubbleCheckBox->isSelected() ? 1 : 0);
+ }
else if (event.getId() == "fpslimitslider")
{
mFps = (int) mFpsSlider->getValue();
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 355a321e..4103c5ef 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -22,11 +22,11 @@
#ifndef _TMW_GUI_SETUP_VIDEO_H
#define _TMW_GUI_SETUP_VIDEO_H
-#include "setuptab.h"
-
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
+#include "setuptab.h"
+
#include "../guichanfwd.h"
class Setup_Video : public SetupTab, public gcn::ActionListener,
@@ -49,6 +49,8 @@ class Setup_Video : public SetupTab, public gcn::ActionListener,
bool mFullScreenEnabled;
bool mOpenGLEnabled;
bool mCustomCursorEnabled;
+ bool mParticleEffectsEnabled;
+ bool mSpeechBubbleEnabled;
double mOpacity;
int mFps;
@@ -58,6 +60,8 @@ class Setup_Video : public SetupTab, public gcn::ActionListener,
gcn::CheckBox *mFsCheckBox;
gcn::CheckBox *mOpenGLCheckBox;
gcn::CheckBox *mCustomCursorCheckBox;
+ gcn::CheckBox *mParticleEffectsCheckBox;
+ gcn::CheckBox *mSpeechBubbleCheckBox;
gcn::Slider *mAlphaSlider;
gcn::CheckBox *mFpsCheckBox;
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index 085e93ce..a4478a62 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -23,8 +23,6 @@
#include "../utils/dtor.h"
-#include <algorithm>
-
ShopItems::~ShopItems()
{
clear();
@@ -59,7 +57,7 @@ ShopItem* ShopItems::at(int i) const
void ShopItems::clear()
{
- std::for_each(mShopItems.begin(), mShopItems.end(), make_dtor(mShopItems));
+ delete_all(mShopItems);
mShopItems.clear();
}
diff --git a/src/gui/shop.h b/src/gui/shop.h
index 915ddd15..97b8d173 100644
--- a/src/gui/shop.h
+++ b/src/gui/shop.h
@@ -27,10 +27,11 @@
#include <guichan/listmodel.hpp>
-#include "../resources/image.h"
-
+#include "../guichanfwd.h"
#include "../shopitem.h"
+#include "../resources/image.h"
+
class ShopItems : public gcn::ListModel
{
public:
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index bce6a48c..e31eee58 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -19,14 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "shoplistbox.h"
-
+#include <guichan/basiccontainer.hpp>
#include <guichan/font.hpp>
#include <guichan/graphics.hpp>
+#include <guichan/imagefont.hpp>
#include <guichan/listmodel.hpp>
#include <guichan/mouseinput.hpp>
-#include <guichan/imagefont.hpp>
-#include <guichan/basiccontainer.hpp>
+
+#include "shoplistbox.h"
#include "../graphics.h"
diff --git a/src/gui/shoplistbox.h b/src/gui/shoplistbox.h
index 75f514ab..e856c076 100644
--- a/src/gui/shoplistbox.h
+++ b/src/gui/shoplistbox.h
@@ -25,6 +25,8 @@
#include "listbox.h"
#include "shop.h"
+#include "../guichanfwd.h"
+
/**
* A list box, meant to be used inside a scroll area. Same as the Guichan list
* box except this one doesn't have a background, instead completely relying
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index a7b598eb..8e61dea4 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -23,18 +23,16 @@
#include <guichan/widgets/label.hpp>
-#include "skill.h"
-
#include "button.h"
#include "listbox.h"
-#include "scrollarea.h"
+#include "skill.h"
#include "windowcontainer.h"
#include "../localplayer.h"
+#include "../log.h"
#include "../utils/dtor.h"
#include "../utils/xml.h"
-#include "../log.h"
#define SKILLS_FILE "skills.xml"
@@ -79,7 +77,7 @@ public:
virtual void
update(void)
{
- static const SkillInfo fakeSkillInfo = { "Mystery Skill", false };
+ static const SkillInfo fakeSkillInfo = { "???", false };
mEntriesNr = mDialog->getSkills().size();
resize();
@@ -130,7 +128,7 @@ SkillDialog::SkillDialog():
setDefaultSize(windowContainer->getWidth() - 255, 25, 240, 240);
// mSkillListBox = new ListBox(this);
- ScrollArea *skillScrollArea = new ScrollArea(&mTable);
+ skillScrollArea = new ScrollArea(&mTable);
mPointsLabel = new gcn::Label("Skill Points:");
mIncButton = new Button("Up", "inc", this);
mUseButton = new Button("Use", "use", this);
diff --git a/src/gui/skill.h b/src/gui/skill.h
index bbd950cb..2095e098 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -24,9 +24,11 @@
#include <vector>
-#include <guichan/listmodel.hpp>
#include <guichan/actionlistener.hpp>
+#include <guichan/listmodel.hpp>
+#include "scrollarea.h"
+#include "table.h"
#include "window.h"
#include "table.h"
@@ -72,6 +74,7 @@ class SkillDialog : public Window, public gcn::ActionListener
private:
GuiTable mTable;//gcn::ListBox *mSkillListBox;
+ ScrollArea *skillScrollArea;
SkillGuiTableModel *mTableModel;
gcn::Label *mPointsLabel;
gcn::Button *mIncButton;
diff --git a/src/gui/slider.h b/src/gui/slider.h
index 3b796425..36bfe698 100644
--- a/src/gui/slider.h
+++ b/src/gui/slider.h
@@ -24,8 +24,9 @@
#include <guichan/widgets/slider.hpp>
-class Image;
+#include "../guichanfwd.h"
+class Image;
/**
* Slider widget. Same as the Guichan slider but with custom look.
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
new file mode 100644
index 00000000..6af16496
--- /dev/null
+++ b/src/gui/speechbubble.cpp
@@ -0,0 +1,93 @@
+/*
+ * The Legend of Mazzeroth
+ * Copyright (C) 2008, The Legend of Mazzeroth Development Team
+ *
+ * This file is part of The Legend of Mazzeroth based on original code
+ * from The Mana World.
+ *
+ * The Legend of Mazzeroth 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 Legend of Mazzeroth 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 Legend of Mazzeroth; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <guichan/font.hpp>
+
+#include "speechbubble.h"
+
+#include "../resources/image.h"
+#include "../resources/resourcemanager.h"
+
+// TODO: Fix windows so that they can each load their own skins without the
+// other windows overriding another window's skin.
+SpeechBubble::SpeechBubble():
+ Window("Message", false, NULL, "graphics/gui/speechbubble.xml")
+{
+ mSpeechBox = new TextBox();
+ mSpeechBox->setEditable(false);
+ mSpeechBox->setOpaque(false);
+
+ mSpeechArea = new ScrollArea(mSpeechBox);
+
+ // Height == Top Graphic (14px) + 1 Row of Text (15px) + Bottom Graphic (17px)
+ setContentSize(140, 46);
+ setTitleBarHeight(5);
+
+ mSpeechArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mSpeechArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ mSpeechArea->setDimension(gcn::Rectangle(4, 15, 130, 28));
+ mSpeechArea->setOpaque(false);
+
+ add(mSpeechArea);
+
+ setLocationRelativeTo(getParent());
+
+ // LEEOR / TODO: This causes an exception error.
+ //moveToBottom(getParent());
+
+ mSpeechBox->setTextWrapped( "" );
+}
+
+void SpeechBubble::setText(std::string mText)
+{
+ while (mText[0] == ' ')
+ {
+ mText = mText.substr(1, mText.size());
+ }
+
+ mSpeechBox->setMinWidth(140);
+ mSpeechBox->setTextWrapped( mText );
+
+ int numRows = mSpeechBox->getNumberOfRows();
+
+ if (numRows > 1)
+ {
+ // 15 == height of each line of text (based on font heights)
+ // 14 == speechbubble Top + Bottom graphic pixel heights
+ setContentSize(mSpeechBox->getMinWidth() + 15, 15 + (numRows * 15));
+ mSpeechArea->setDimension(gcn::Rectangle(4, 15, mSpeechBox->getMinWidth() + 5,
+ 3 +(numRows * 14)));
+ }
+ else
+ {
+ int width = getFont()->getWidth(this->getCaption());
+ if (width < getFont()->getWidth(mText))
+ width = getFont()->getWidth(mText);
+ setContentSize(width + 15, 30);
+ mSpeechArea->setDimension(gcn::Rectangle(4, 15, width + 5, 17));
+ }
+}
+
+unsigned int SpeechBubble::getNumRows()
+{
+ return mSpeechBox->getNumberOfRows();
+}
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
new file mode 100644
index 00000000..9b8eab70
--- /dev/null
+++ b/src/gui/speechbubble.h
@@ -0,0 +1,45 @@
+/*
+ * The Legend of Mazzeroth
+ * Copyright (C) 2008, The Legend of Mazzeroth Development Team
+ *
+ * This file is part of The Legend of Mazzeroth based on original code
+ * from The Mana World.
+ *
+ * The Legend of Mazzeroth 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 Legend of Mazzeroth 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 Legend of Mazzeroth; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LOM_SPEECHBUBBLE_H__
+#define _LOM_SPEECHBUBBLE_H__
+
+#include "scrollarea.h"
+#include "textbox.h"
+#include "window.h"
+
+class SpeechBubble : public Window
+{
+ public:
+
+ SpeechBubble();
+
+ void setText(std::string mText);
+ void setLocation(int x, int y);
+ unsigned int getNumRows();
+
+ private:
+ TextBox *mSpeechBox;
+ ScrollArea *mSpeechArea;
+};
+
+#endif
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 1a257ae8..fbcc01d6 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -19,12 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "status.h"
-
#include <guichan/widgets/label.hpp>
#include "button.h"
#include "progressbar.h"
+#include "status.h"
#include "windowcontainer.h"
#include "../localplayer.h"
@@ -36,7 +35,6 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mPlayer(player)
{
setWindowName("Status");
- setResizable(true);
setCloseButton(true);
setDefaultSize((windowContainer->getWidth() - 365) / 2,
(windowContainer->getHeight() - 255) / 2, 365, 275);
diff --git a/src/gui/tabbedcontainer.cpp b/src/gui/tabbedcontainer.cpp
index fba4e846..8e95aa7c 100644
--- a/src/gui/tabbedcontainer.cpp
+++ b/src/gui/tabbedcontainer.cpp
@@ -21,18 +21,23 @@
#include <algorithm>
-#include "tabbedcontainer.h"
-
#include "button.h"
+#include "tabbedcontainer.h"
-#include "../utils/tostring.h"
#include "../utils/dtor.h"
+#include "../utils/tostring.h"
-#define TABWIDTH 60
-#define TABHEIGHT 20
-
-TabbedContainer::TabbedContainer():
- mActiveContent(0)
+TabbedContainer::TabbedContainer(int width, int padX, int buttonHeight,
+ int height, int padY, int buttonsPerRow):
+ mActiveContent(0),
+ mWidth(width),
+ mPadX(padX),
+ mButtonHeight(buttonHeight),
+ mHeight(height),
+ mPadY(padY),
+ mButtonsPerRow(buttonsPerRow),
+
+ mButtonWidth((width - (buttonsPerRow - 1) * padX) / buttonsPerRow - padX)
{
}
@@ -50,13 +55,14 @@ void TabbedContainer::addTab(gcn::Widget *widget, const std::string &caption)
Button *tab = new Button(caption, toString(tabNumber), this);
- tab->setSize(TABWIDTH, TABHEIGHT);
- add(tab, TABWIDTH * tabNumber, 0);
+ tab->setSize(mButtonWidth, mButtonHeight);
+ add(tab, (mButtonWidth + mPadX) * (tabNumber % mButtonsPerRow),
+ (mButtonHeight + mPadY) * (tabNumber / mButtonsPerRow));
mTabs[caption] = tab;
mContents.push_back(widget);
- widget->setPosition(0, TABHEIGHT);
+ widget->setPosition(0, mHeight);
// If this is the first tab in this container, make it visible
if (!mActiveContent) {
@@ -81,7 +87,7 @@ void TabbedContainer::logic()
if (mActiveContent) {
mActiveContent->setSize(
getWidth() - 2 * mActiveContent->getFrameSize(),
- getHeight() - TABHEIGHT - 2 * mActiveContent->getFrameSize());
+ getHeight() - mHeight - 2 * mActiveContent->getFrameSize());
}
Container::logic();
diff --git a/src/gui/tabbedcontainer.h b/src/gui/tabbedcontainer.h
index babf68a2..2fc41247 100644
--- a/src/gui/tabbedcontainer.h
+++ b/src/gui/tabbedcontainer.h
@@ -23,8 +23,8 @@
#define _TMW_TABPANE_H
#include <iosfwd>
-#include <vector>
#include <map>
+#include <vector>
#include <guichan/actionlistener.hpp>
@@ -35,7 +35,8 @@
class TabbedContainer : public gcn::Container, public gcn::ActionListener
{
public:
- TabbedContainer();
+ TabbedContainer(int width, int padX, int buttonHeight,
+ int height, int padY, int buttonsPerRow);
~TabbedContainer();
void addTab(gcn::Widget *widget, const std::string &caption);
@@ -60,6 +61,14 @@ class TabbedContainer : public gcn::Container, public gcn::ActionListener
std::map<gcn::Widget*, std::string> mWidgets;
gcn::Widget *mActiveContent;
+
+ int mWidth; /**< The total width of all buttons */
+ int mPadX; /**< The horizontal gap between buttons */
+ int mButtonHeight; /**< The height of each button */
+ int mHeight; /**< Height of the panel */
+ int mPadY; /**< The vertical gap between buttons */
+ int mButtonsPerRow; /**< The number of buttons on each row */
+ int mButtonWidth; /**< The width of each button */
};
#endif
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index bddfbfed..e4d7812e 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -19,12 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <guichan/graphics.hpp>
-#include <guichan/actionlistener.hpp>
-#include "table.h"
#include <cassert>
+#include <guichan/graphics.hpp>
+#include <guichan/actionlistener.hpp>
+#include "table.h"
class GuiTableActionListener : public gcn::ActionListener
{
@@ -102,6 +102,7 @@ GuiTable::setModel(TableModel *new_model)
mModel->removeListener(this);
}
+
mModel = new_model;
installActionListeners();
diff --git a/src/gui/table.h b/src/gui/table.h
index cef82d5d..b4c607ae 100644
--- a/src/gui/table.h
+++ b/src/gui/table.h
@@ -31,6 +31,7 @@
#include <guichan/widget.hpp>
#include "table_model.h"
+
#include "../guichanfwd.h"
class GuiTableActionListener;
diff --git a/src/gui/table_model.cpp b/src/gui/table_model.cpp
index 57da29d9..e1afef96 100644
--- a/src/gui/table_model.cpp
+++ b/src/gui/table_model.cpp
@@ -19,8 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <guichan/widget.hpp>
#include <cstdlib>
+
+#include <guichan/widget.hpp>
+
#include "table_model.h"
void
diff --git a/src/gui/table_model.h b/src/gui/table_model.h
index 4be4e60e..a52a7561 100644
--- a/src/gui/table_model.h
+++ b/src/gui/table_model.h
@@ -22,9 +22,11 @@
#ifndef TMW_TABLE_MODEL_H_
#define TMW_TABLE_MODEL_H_
-#include <guichan/gui.hpp>
#include <set>
#include <vector>
+
+#include <guichan/gui.hpp>
+
#include "../guichanfwd.h"
class TableModelListener
diff --git a/src/gui/textbox.cpp b/src/gui/textbox.cpp
index 619265ec..d7b589fa 100644
--- a/src/gui/textbox.cpp
+++ b/src/gui/textbox.cpp
@@ -19,13 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "textbox.h"
-
#include <sstream>
#include <guichan/basiccontainer.hpp>
#include <guichan/font.hpp>
+#include "textbox.h"
+
TextBox::TextBox():
gcn::TextBox()
{
@@ -43,6 +43,8 @@ void TextBox::setTextWrapped(const std::string &text)
std::stringstream wrappedStream;
std::string::size_type newlinePos, lastNewlinePos = 0;
+ int minWidth = 0;
+ int xpos;
do
{
@@ -57,7 +59,7 @@ void TextBox::setTextWrapped(const std::string &text)
std::string line =
text.substr(lastNewlinePos, newlinePos - lastNewlinePos);
std::string::size_type spacePos, lastSpacePos = 0;
- int xpos = 0;
+ xpos = 0;
do
{
@@ -73,7 +75,7 @@ void TextBox::setTextWrapped(const std::string &text)
int width = getFont()->getWidth(word);
- if (xpos != 0 && xpos + width < getWidth())
+ if (xpos != 0 && xpos + width + getFont()->getWidth(" ") <= mMinWidth)
{
xpos += width + getFont()->getWidth(" ");
wrappedStream << " " << word;
@@ -85,10 +87,30 @@ void TextBox::setTextWrapped(const std::string &text)
}
else
{
+ if (xpos > minWidth)
+ {
+ minWidth = xpos;
+ }
+ // The window wasn't big enough. Resize it and try again.
+ if (minWidth > mMinWidth)
+ {
+ mMinWidth = minWidth;
+ wrappedStream.clear();
+ wrappedStream.str("");
+ spacePos = 0;
+ lastNewlinePos = 0;
+ newlinePos = text.find("\n", lastNewlinePos);
+ line = text.substr(lastNewlinePos, newlinePos -
+ lastNewlinePos);
+ width = 0;
+ break;
+ }
+ else
+ {
+ wrappedStream << "\n" << word;
+ }
xpos = width;
- wrappedStream << "\n" << word;
}
-
lastSpacePos = spacePos + 1;
}
while (spacePos != line.size());
@@ -97,10 +119,15 @@ void TextBox::setTextWrapped(const std::string &text)
{
wrappedStream << "\n";
}
-
lastNewlinePos = newlinePos + 1;
}
while (newlinePos != text.size());
+ if (xpos > minWidth)
+ {
+ minWidth = xpos;
+ }
+ mMinWidth = minWidth;
+
gcn::TextBox::setText(wrappedStream.str());
}
diff --git a/src/gui/textbox.h b/src/gui/textbox.h
index 2060e377..a0f0f947 100644
--- a/src/gui/textbox.h
+++ b/src/gui/textbox.h
@@ -24,6 +24,8 @@
#include <guichan/widgets/textbox.hpp>
+#include "../guichanfwd.h"
+
/**
* A text box, meant to be used inside a scroll area. Same as the Guichan text
* box except this one doesn't have a background or border, instead completely
@@ -42,6 +44,19 @@ class TextBox : public gcn::TextBox {
* Sets the text after wrapping it to the current width of the widget.
*/
void setTextWrapped(const std::string &text);
+
+ /**
+ * Get the minimum text width for the text box.
+ */
+ int getMinWidth() { return mMinWidth; }
+
+ /**
+ * Set the minimum text width for the text box.
+ */
+ void setMinWidth(int width) { mMinWidth = width; }
+
+ private:
+ int mMinWidth;
};
#endif
diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp
index ea82ba77..bd016a8d 100644
--- a/src/gui/textfield.cpp
+++ b/src/gui/textfield.cpp
@@ -23,6 +23,8 @@
#include <guichan/font.hpp>
+#include <guichan/sdl/sdlinput.hpp>
+
#include "textfield.h"
#include "../graphics.h"
@@ -36,7 +38,9 @@ int TextField::instances = 0;
ImageRect TextField::skin;
TextField::TextField(const std::string& text):
- gcn::TextField(text)
+ gcn::TextField(text),
+ mNumeric(false),
+ mListener(0)
{
setFrameSize(2);
@@ -100,3 +104,67 @@ void TextField::drawFrame(gcn::Graphics *graphics)
static_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, skin);
}
+
+void TextField::setNumeric(bool numeric)
+{
+ mNumeric = numeric;
+ if (!numeric)
+ {
+ return;
+ }
+ const char *text = mText.c_str();
+ for (const char *textPtr = text; *textPtr; ++textPtr)
+ {
+ if (*textPtr < '0' || *textPtr > '9')
+ {
+ setText(mText.substr(0, textPtr - text));
+ return;
+ }
+ }
+}
+
+void TextField::keyPressed(gcn::KeyEvent &keyEvent)
+{
+ if (mNumeric)
+ {
+ while (true)
+ {
+ const gcn::Key &key = keyEvent.getKey();
+ if (key.isNumber())
+ {
+ break;
+ }
+ int value = key.getValue();
+ if (value == SDLK_LEFT || value == SDLK_RIGHT ||
+ value == SDLK_HOME || value == SDLK_END ||
+ value == SDLK_BACKSPACE || value == SDLK_DELETE)
+ {
+ break;
+ }
+ return;
+ }
+ }
+ gcn::TextField::keyPressed(keyEvent);
+ if (mListener)
+ {
+ mListener->listen(this);
+ }
+}
+
+int TextField::getValue() const
+{
+ if (!mNumeric)
+ {
+ return 0;
+ }
+ int value = atoi(mText.c_str());
+ if (value < mMinimum)
+ {
+ return mMinimum;
+ }
+ if (value > mMaximum)
+ {
+ return mMaximum;
+ }
+ return value;
+}
diff --git a/src/gui/textfield.h b/src/gui/textfield.h
index 60a50c69..6def784d 100644
--- a/src/gui/textfield.h
+++ b/src/gui/textfield.h
@@ -24,8 +24,18 @@
#include <guichan/widgets/textfield.hpp>
+#include "../guichanfwd.h"
+
class ImageRect;
+class TextField;
+
+class TextFieldListener
+{
+ public:
+ virtual void listen(const TextField *value) = 0;
+};
+
/**
* A text field.
*
@@ -53,9 +63,48 @@ class TextField : public gcn::TextField {
*/
void drawFrame(gcn::Graphics *graphics);
+ /**
+ * Determine whether the field should be numeric or not
+ */
+ void setNumeric(bool numeric);
+
+ /**
+ * Set the range on the field if it is numeric
+ */
+ void setRange(int min, int max) {mMinimum = min; mMaximum = max; }
+
+ /**
+ * Restrict keyboard input if numeric
+ */
+ void keyPressed(gcn::KeyEvent &keyEvent);
+
+ /**
+ * Set the minimum value for a range
+ */
+ void setMinimum(int min) {mMinimum = min; }
+
+ /**
+ * Set the maximum value for a range
+ */
+ void setMaximum(int max) {mMaximum = max; }
+
+ /**
+ * Return the value for a numeric field
+ */
+ int getValue() const;
+
+ /**
+ * Add a listener
+ */
+ void addListener(TextFieldListener *listener) {mListener = listener; }
+
private:
static int instances;
static ImageRect skin;
+ bool mNumeric;
+ int mMinimum;
+ int mMaximum;
+ TextFieldListener *mListener;
};
#endif
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 9cb0d34f..8c02ab01 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "trade.h"
-
#include <sstream>
#include <guichan/widgets/label.hpp>
@@ -32,9 +30,11 @@
#include "itemcontainer.h"
#include "scrollarea.h"
#include "textfield.h"
+#include "trade.h"
#include "../inventory.h"
#include "../item.h"
+#include "../localplayer.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
@@ -46,8 +46,8 @@
TradeWindow::TradeWindow(Network *network):
Window("Trade: You"),
mNetwork(network),
- mMyInventory(new Inventory()),
- mPartnerInventory(new Inventory())
+ mMyInventory(new Inventory(INVENTORY_SIZE)),
+ mPartnerInventory(new Inventory(INVENTORY_SIZE))
{
setWindowName("Trade");
setDefaultSize(115, 197, 332, 209);
@@ -57,14 +57,14 @@ TradeWindow::TradeWindow(Network *network):
mCancelButton = new Button("Cancel", "cancel", this);
mTradeButton = new Button("Trade", "trade", this);
- mMyItemContainer = new ItemContainer(mMyInventory.get());
+ mMyItemContainer = new ItemContainer(mMyInventory.get(), 2);
mMyItemContainer->addSelectionListener(this);
mMyItemContainer->setPosition(2, 2);
mMyScroll = new ScrollArea(mMyItemContainer);
mMyScroll->setPosition(8, 8);
- mPartnerItemContainer = new ItemContainer(mPartnerInventory.get());
+ mPartnerItemContainer = new ItemContainer(mPartnerInventory.get(), 2);
mPartnerItemContainer->addSelectionListener(this);
mPartnerItemContainer->setPosition(2, 58);
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 7f7d45fc..36d00bec 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "updatewindow.h"
-
#include <iostream>
#include <SDL.h>
#include <SDL_thread.h>
@@ -32,6 +30,7 @@
#include "button.h"
#include "progressbar.h"
#include "scrollarea.h"
+#include "updatewindow.h"
// Curl should be included after Guichan to avoid Windows redefinitions
#include <curl/curl.h>
@@ -40,10 +39,10 @@
#include "../log.h"
#include "../main.h"
-#include "../utils/tostring.h"
-
#include "../resources/resourcemanager.h"
+#include "../utils/tostring.h"
+
/**
* Calculates the Alder-32 checksum for the given file.
*/
@@ -113,7 +112,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mBrowserBox = new BrowserBox();
mScrollArea = new ScrollArea(mBrowserBox);
mLabel = new gcn::Label("Connecting...");
- mProgressBar = new ProgressBar(0.0, w - 10, 20, 37, 70, 200);
+ mProgressBar = new ProgressBar(0.0, w - 10, 20, 168, 116, 31);
mCancelButton = new Button("Cancel", "cancel", this);
mPlayButton = new Button("Play", "play", this);
diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h
index a7dfe2cb..9cd3405e 100644
--- a/src/gui/updatewindow.h
+++ b/src/gui/updatewindow.h
@@ -23,6 +23,7 @@
#define _UPDATERWINDOW_H
#include <guichan/actionlistener.hpp>
+
#include <string>
#include <vector>
diff --git a/src/gui/vbox.h b/src/gui/vbox.h
index 2072ab24..4538338f 100644
--- a/src/gui/vbox.h
+++ b/src/gui/vbox.h
@@ -24,6 +24,8 @@
#include "box.h"
+#include "../guichanfwd.h"
+
class VBox : public Box
{
public:
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 37e7bcce..e50903b6 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -19,18 +19,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "viewport.h"
+#include <cassert>
#include <guichan/sdl/sdlinput.hpp>
#include "gui.h"
#include "popupmenu.h"
+#include "viewport.h"
-#include "../simpleanimation.h"
#include "../beingmanager.h"
#include "../configuration.h"
#include "../flooritemmanager.h"
#include "../graphics.h"
+#include "../keyboardconfig.h"
#include "../localplayer.h"
#include "../map.h"
#include "../monster.h"
@@ -38,14 +39,14 @@
#include "../textmanager.h"
#include "../resources/animation.h"
-#include "../resources/monsterinfo.h"
-#include "../resources/resourcemanager.h"
#include "../resources/image.h"
#include "../resources/imageset.h"
+#include "../resources/monsterinfo.h"
+#include "../resources/resourcemanager.h"
#include "../utils/tostring.h"
-#include <cassert>
+extern volatile int tick_time;
extern volatile int tick_time;
@@ -71,64 +72,11 @@ Viewport::Viewport():
config.addListener("ScrollRadius", this);
mPopupMenu = new PopupMenu();
-
- // Load target cursors
- loadTargetCursor("graphics/gui/target-cursor-blue-s.png", 44, 35,
- false, Being::TC_SMALL);
- loadTargetCursor("graphics/gui/target-cursor-red-s.png", 44, 35,
- true, Being::TC_SMALL);
- loadTargetCursor("graphics/gui/target-cursor-blue-m.png", 62, 44,
- false, Being::TC_MEDIUM);
- loadTargetCursor("graphics/gui/target-cursor-red-m.png", 62, 44,
- true, Being::TC_MEDIUM);
- loadTargetCursor("graphics/gui/target-cursor-blue-l.png", 82, 60,
- false, Being::TC_LARGE);
- loadTargetCursor("graphics/gui/target-cursor-red-l.png", 82, 60,
- true, Being::TC_LARGE);
-}
-
-void
-Viewport::loadTargetCursor(std::string filename, int width, int height,
- bool outRange, Being::TargetCursorSize size)
-{
- assert(size > -1);
- assert(size < 3);
-
- ImageSet* currentImageSet;
- SimpleAnimation* currentCursor;
-
- ResourceManager *resman = ResourceManager::getInstance();
-
- currentImageSet = resman->getImageSet(filename, width, height);
- Animation *anim = new Animation();
- for (unsigned int i = 0; i < currentImageSet->size(); ++i)
- {
- anim->addFrame(currentImageSet->get(i), 75, 0, 0);
- }
- currentCursor = new SimpleAnimation(anim);
-
- if (outRange)
- {
- mOutRangeImages[size] = currentImageSet;
- mTargetCursorOutRange[size] = currentCursor;
- }
- else {
- mInRangeImages[size] = currentImageSet;
- mTargetCursorInRange[size] = currentCursor;
- }
}
Viewport::~Viewport()
{
delete mPopupMenu;
-
- for (int i = Being::TC_SMALL; i < Being::NUM_TC; i++)
- {
- delete mTargetCursorInRange[i];
- delete mTargetCursorOutRange[i];
- mInRangeImages[i]->decRef();
- mOutRangeImages[i]->decRef();
- }
}
void
@@ -224,34 +172,29 @@ Viewport::draw(gcn::Graphics *gcnGraphics)
if (mMap)
{
mMap->draw(graphics, (int) mPixelViewX, (int) mPixelViewY);
- drawTargetCursor(graphics); // TODO: Draw the cursor with the sprite
- }
- // 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);
+ // Find a path from the player to the mouse, and draw it. This is for debug
+ // purposes.
+ if (mShowDebugPath)
+ {
+ // Get the current mouse position
+ int mouseX, mouseY;
+ SDL_GetMouseState(&mouseX, &mouseY);
- int mouseTileX = mouseX / 32 + mTileViewX;
- int mouseTileY = mouseY / 32 + mTileViewY;
+ int mouseTileX = mouseX / 32 + mTileViewX;
+ int mouseTileY = mouseY / 32 + mTileViewY;
- Path debugPath = mMap->findPath(
- player_node->mX, player_node->mY,
- mouseTileX, mouseTileY);
+ Path debugPath = mMap->findPath(player_node->mX, player_node->mY, mouseTileX, mouseTileY);
- graphics->setColor(gcn::Color(255, 0, 0));
- for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++)
- {
- int squareX = i->x * 32 - (int) mPixelViewX + 12;
- int squareY = i->y * 32 - (int) mPixelViewY + 12;
+ graphics->setColor(gcn::Color(255, 0, 0));
+ for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++)
+ {
+ int squareX = i->x * 32 - (int) mPixelViewX + 12;
+ int squareY = i->y * 32 - (int) mPixelViewY + 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);
+ 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);
+ }
}
}
@@ -272,8 +215,7 @@ Viewport::draw(gcn::Graphics *gcnGraphics)
WindowContainer::draw(gcnGraphics);
}
-void
-Viewport::logic()
+void Viewport::logic()
{
WindowContainer::logic();
@@ -290,49 +232,9 @@ Viewport::logic()
mouseY / 32 + mTileViewY);
mWalkTime = player_node->mWalkTime;
}
-
- for (int i = 0; i < 3; i++)
- {
- mTargetCursorInRange[i]->update(10);
- mTargetCursorOutRange[i]->update(10);
- }
-}
-
-void
-Viewport::drawTargetCursor(Graphics *graphics)
-{
- // Draw target marker if needed
- Being *target = player_node->getTarget();
- if (target)
- {
- // Calculate target circle position
-
- // Find whether target is in range
- int rangeX = abs(target->mX - player_node->mX);
- int rangeY = abs(target->mY - player_node->mY);
- int attackRange = player_node->getAttackRange();
-
- // Get the correct target cursors graphic
- Being::TargetCursorSize cursorSize = target->getTargetCursorSize();
- Image* targetCursor;
- if (rangeX > attackRange || rangeY > attackRange)
- {
- targetCursor = mTargetCursorOutRange[cursorSize]->getCurrentImage();
- }
- else {
- targetCursor = mTargetCursorInRange[cursorSize]->getCurrentImage();
- }
-
- // Draw the target cursor at the correct position
- int posX = target->getPixelX() + 16 - targetCursor->getWidth() / 2 - (int) mPixelViewX;
- int posY = target->getPixelY() + 16 - targetCursor->getHeight() / 2 - (int) mPixelViewY;
-
- graphics->drawImage(targetCursor, posX, posY);
- }
}
-void
-Viewport::mousePressed(gcn::MouseEvent &event)
+void Viewport::mousePressed(gcn::MouseEvent &event)
{
// Check if we are alive and kickin'
if (!mMap || !player_node || player_node->mAction == Being::DEAD)
@@ -344,8 +246,10 @@ Viewport::mousePressed(gcn::MouseEvent &event)
mPlayerFollowMouse = false;
- int tilex = event.getX() / 32 + mTileViewX;
- int tiley = event.getY() / 32 + mTileViewY;
+ const int tilex = event.getX() / 32 + mTileViewX;
+ const int tiley = event.getY() / 32 + mTileViewY;
+ const int x = (int)((float) event.getX() + mPixelViewX);
+ const int y = (int)((float) event.getY() + mPixelViewY);
// Right click might open a popup
if (event.getButton() == gcn::MouseEvent::RIGHT)
@@ -353,11 +257,11 @@ Viewport::mousePressed(gcn::MouseEvent &event)
Being *being;
FloorItem *floorItem;
- if ((being = beingManager->findBeing(tilex, tiley)) &&
- being != player_node)
+ if ((being = beingManager->findBeingByPixel(x, y)) &&
+ being != player_node)
{
- mPopupMenu->showPopup(event.getX(), event.getY(), being);
- return;
+ mPopupMenu->showPopup(event.getX(), event.getY(), being);
+ return;
}
else if((floorItem = floorItemManager->findByCoordinates(tilex, tiley)))
{
@@ -378,11 +282,9 @@ Viewport::mousePressed(gcn::MouseEvent &event)
{
Being *being;
FloorItem *item;
-
+
// Interact with some being
-// if ((being = beingManager->findBeing(tilex, tiley))
- int x = (int)((float) event.getX() + mPixelViewX);
- int y = (int)((float) event.getY() + mPixelViewY);
+// if ((being = beingManager->findBeing(tilex, tiley)))
if ((being = beingManager->findBeingByPixel(x, y)))
{
switch (being->getType())
@@ -396,59 +298,47 @@ Viewport::mousePressed(gcn::MouseEvent &event)
if (being->mAction == Being::DEAD)
break;
- if (player_node->withinAttackRange(being))
+ if (player_node->withinAttackRange(being) || keyboard.isKeyActive(keyboard.KEY_ATTACK))
{
- player_node->attack(being, true);
+ player_node->setGotoTarget(being);
+ player_node->attack(being, !keyboard.isKeyActive(keyboard.KEY_TARGET));
}
else
{
- Uint8 *keys = SDL_GetKeyState(NULL);
- if (!(keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]))
- {
- player_node->stopAttack();
- player_node->setGotoTarget(being);
- }
+ player_node->setDestination(tilex, tiley);
}
break;
default:
break;
- }
+ }
}
// Pick up some item
else if ((item = floorItemManager->findByCoordinates(tilex, tiley)))
{
- player_node->pickUp(item);
+ player_node->pickUp(item);
}
// Just walk around
else
{
- // XXX XXX XXX REALLY UGLY!
- Uint8 *keys = SDL_GetKeyState(NULL);
- if (!(keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]))
- {
- player_node->setDestination(tilex, tiley);
- player_node->stopAttack();
- }
+ player_node->stopAttack();
+ player_node->setDestination(tilex, tiley);
mPlayerFollowMouse = true;
}
}
else if (event.getButton() == gcn::MouseEvent::MIDDLE)
{
// Find the being nearest to the clicked position
- Being *target = beingManager->findNearestLivingBeing(
- tilex, tiley,
- 20, Being::MONSTER);
-
+ Being *target = beingManager->findBeingByPixel(x, y);
+
if (target)
{
- player_node->setTarget(target);
+ player_node->setTarget(target);
}
}
}
-void
-Viewport::mouseDragged(gcn::MouseEvent &event)
+void Viewport::mouseDragged(gcn::MouseEvent &event)
{
if (!mMap || !player_node)
return;
@@ -461,20 +351,17 @@ Viewport::mouseDragged(gcn::MouseEvent &event)
}
}
-void
-Viewport::mouseReleased(gcn::MouseEvent &event)
+void Viewport::mouseReleased(gcn::MouseEvent &event)
{
mPlayerFollowMouse = false;
}
-void
-Viewport::showPopup(int x, int y, Item *item)
+void Viewport::showPopup(int x, int y, Item *item)
{
mPopupMenu->showPopup(x, y, item);
}
-void
-Viewport::optionChanged(const std::string &name)
+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
index 707ad33b..3120de91 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -26,8 +26,9 @@
#include "windowcontainer.h"
-#include "../configlistener.h"
#include "../being.h"
+#include "../configlistener.h"
+#include "../guichanfwd.h"
class Map;
class FloorItem;
@@ -35,7 +36,6 @@ class ImageSet;
class Item;
class PopupMenu;
class Graphics;
-class SimpleAnimation;
/**
* The viewport on the map. Displays the current map and handles mouse input
@@ -115,16 +115,16 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
optionChanged(const std::string &name);
/**
- * Returns camera x offset in tiles.
+ * Returns camera x offset in pixels.
*/
int
- getCameraX() { return mTileViewX; }
+ getCameraX() const { return (int) mPixelViewX; }
/**
- * Returns camera y offset in tiles.
+ * Returns camera y offset in pixels.
*/
int
- getCameraY() { return mTileViewY; }
+ getCameraY() const { return (int) mPixelViewY; }
/**
* Changes viewpoint by relative pixel coordinates.
@@ -133,26 +133,6 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
scrollBy(float x, float y) { mPixelViewX += x; mPixelViewY += y; }
private:
- /**
- * Helper function for loading target cursors
- */
- void
- loadTargetCursor(std::string filename, int width, int height,
- bool outRange, Being::TargetCursorSize size);
-
- /**
- * Draws range based target cursor
- */
- void
- drawTargetCursor(Graphics *graphics);
-
- /**
- * Draws target name
- */
- void
- drawTargetName(Graphics *graphics);
-
-
Map *mMap; /**< The current map. */
int mScrollRadius;
@@ -165,18 +145,6 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int mTileViewY; /**< Current viewpoint in tiles. */
bool mShowDebugPath; /**< Show a path from player to pointer. */
- /** Images of in range target cursor. */
- ImageSet *mInRangeImages[Being::NUM_TC];
-
- /** Images of out of range target cursor. */
- ImageSet *mOutRangeImages[Being::NUM_TC];
-
- /** Animated in range target cursor. */
- SimpleAnimation *mTargetCursorInRange[Being::NUM_TC];
-
- /** Animated out of range target cursor. */
- SimpleAnimation *mTargetCursorOutRange[Being::NUM_TC];
-
bool mPlayerFollowMouse;
int mWalkTime;
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
new file mode 100644
index 00000000..88a12d68
--- /dev/null
+++ b/src/gui/widgets/dropdown.cpp
@@ -0,0 +1,167 @@
+/*
+ * 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
+ */
+
+#include <algorithm>
+
+#include "dropdown.h"
+
+#include "../../graphics.h"
+
+#include "../../resources/image.h"
+#include "../../resources/resourcemanager.h"
+
+#include "../../utils/dtor.h"
+
+int DropDown::instances = 0;
+Image *DropDown::buttons[2][2];
+ImageRect DropDown::skin;
+
+DropDown::DropDown(gcn::ListModel *listModel,
+ gcn::ScrollArea *scrollArea,
+ gcn::ListBox *listBox):
+ gcn::DropDown::DropDown(listModel,
+ scrollArea, listBox)
+{
+ setFrameSize(2);
+
+ // Initialize graphics
+ if (instances == 0)
+ {
+ // Load the background skin
+ ResourceManager *resman = ResourceManager::getInstance();
+
+ // Get the button skin
+ buttons[1][0] =
+ resman->getImage("graphics/gui/vscroll_up_default.png");
+ buttons[0][0] =
+ resman->getImage("graphics/gui/vscroll_down_default.png");
+ buttons[1][1] =
+ resman->getImage("graphics/gui/vscroll_up_pressed.png");
+ buttons[0][1] =
+ resman->getImage("graphics/gui/vscroll_down_pressed.png");
+
+ // get the border skin
+ Image *boxBorder = resman->getImage("graphics/gui/deepbox.png");
+ int gridx[4] = {0, 3, 28, 31};
+ int gridy[4] = {0, 3, 28, 31};
+ int a = 0, x, y;
+
+ for (y = 0; y < 3; y++) {
+ for (x = 0; x < 3; x++) {
+ skin.grid[a] = boxBorder->getSubImage(
+ gridx[x], gridy[y],
+ gridx[x + 1] - gridx[x] + 1,
+ gridy[y + 1] - gridy[y] + 1);
+ a++;
+ }
+ }
+
+ boxBorder->decRef();
+ }
+
+ instances++;
+}
+
+DropDown::~DropDown()
+{
+ instances--;
+ // Free images memory
+ if (instances == 0)
+ {
+ buttons[0][0]->decRef();
+ buttons[0][1]->decRef();
+ buttons[1][0]->decRef();
+ buttons[1][1]->decRef();
+
+ for_each(skin.grid, skin.grid + 9, dtor<Image*>());
+ }
+}
+
+void DropDown::draw(gcn::Graphics* graphics)
+{
+ int h;
+
+ if (mDroppedDown)
+ {
+ h = mFoldedUpHeight;
+ }
+ else
+ {
+ h = getHeight();
+ }
+
+ int alpha = getBaseColor().a;
+ gcn::Color faceColor = getBaseColor();
+ faceColor.a = alpha;
+ gcn::Color highlightColor = faceColor + 0x303030;
+ highlightColor.a = alpha;
+ gcn::Color shadowColor = faceColor - 0x303030;
+ shadowColor.a = alpha;
+
+
+ graphics->setColor(getBackgroundColor());
+ graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), h));
+
+ graphics->setColor(getForegroundColor());
+ graphics->setFont(getFont());
+
+ if (mListBox->getListModel() && mListBox->getSelected() >= 0)
+ {
+ graphics->drawText(mListBox->getListModel()->getElementAt(mListBox->getSelected()), 1, 0);
+ }
+
+ if (isFocused())
+ {
+ graphics->setColor(highlightColor);
+ graphics->drawRectangle(gcn::Rectangle(0, 0, getWidth() - h, h));
+ }
+
+ drawButton(graphics);
+
+ if (mDroppedDown)
+ {
+ drawChildren(graphics);
+
+ // Draw two lines separating the ListBox with se selected
+ // element view.
+ graphics->setColor(highlightColor);
+ graphics->drawLine(0, h, getWidth(), h);
+ graphics->setColor(shadowColor);
+ graphics->drawLine(0, h + 1, getWidth(), h + 1);
+ }
+}
+
+void DropDown::drawFrame(gcn::Graphics *graphics)
+{
+ const int bs = getFrameSize();
+ const int w = getWidth() + bs * 2;
+ const int h = getHeight() + bs * 2;
+
+ static_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, skin);
+}
+
+void DropDown::drawButton(gcn::Graphics *graphics)
+{
+ int height = mDroppedDown ? mFoldedUpHeight : getHeight();
+
+ static_cast<Graphics*>(graphics)->
+ drawImage(buttons[mDroppedDown][mPushed], getWidth() - height + 2, 1);
+}
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
new file mode 100644
index 00000000..25ae05f8
--- /dev/null
+++ b/src/gui/widgets/dropdown.h
@@ -0,0 +1,86 @@
+/*
+ * 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
+ */
+
+#ifndef DROPDOWN_H
+#define DROPDOWN_H
+
+#include <iosfwd>
+
+#include <guichan/widgets/dropdown.hpp>
+
+#include "../listbox.h"
+#include "../scrollarea.h"
+
+#include "../../guichanfwd.h"
+
+class Image;
+class ImageRect;
+
+ /**
+ * A drop down box from which you can select different values. It is one of
+ * the most complicated Widgets you will find in Guichan. For drawing the
+ * DroppedDown box it uses one ScrollArea and one ListBox. It also uses an
+ * internal FocusHandler to handle the focus of the internal ScollArea and
+ * ListBox. DropDown uses a ListModel to handle the list. To be able to use
+ * DropDown you must give DropDown an implemented ListModel which represents
+ * your list.
+ */
+class DropDown : public gcn::DropDown
+{
+ public:
+ /**
+ * Contructor.
+ *
+ * @param listModel the ListModel to use.
+ * @param scrollArea the ScrollArea to use.
+ * @param listBox the listBox to use.
+ * @see ListModel, ScrollArea, ListBox.
+ */
+ DropDown(gcn::ListModel *listModel = NULL,
+ gcn::ScrollArea *scrollArea = NULL,
+ gcn::ListBox *listBox = NULL);
+
+ /**
+ * Destructor.
+ */
+ ~DropDown();
+
+ void draw(gcn::Graphics* graphics);
+
+ void drawFrame(gcn::Graphics* graphics);
+
+
+ protected:
+ /**
+ * Draws the button with the little down arrow.
+ *
+ * @param graphics a Graphics object to draw with.
+ */
+ void drawButton(gcn::Graphics *graphics);
+
+ // Add own Images.
+ static int instances;
+ static Image *buttons[2][2];
+ static ImageRect skin;
+};
+
+#endif // end DROPDOWN_H
+
diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp
index c3b537db..87527f0a 100644
--- a/src/gui/widgets/resizegrip.cpp
+++ b/src/gui/widgets/resizegrip.cpp
@@ -19,10 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "resizegrip.h"
-
#include <guichan/graphics.hpp>
+#include "resizegrip.h"
+
#include "../../graphics.h"
#include "../../resources/image.h"
@@ -31,13 +31,13 @@
Image *ResizeGrip::gripImage = 0;
int ResizeGrip::mInstances = 0;
-ResizeGrip::ResizeGrip()
+ResizeGrip::ResizeGrip(std::string image)
{
if (mInstances == 0)
{
// Load the grip image
ResourceManager *resman = ResourceManager::getInstance();
- gripImage = resman->getImage("graphics/gui/resize.png");
+ gripImage = resman->getImage(image);
}
mInstances++;
diff --git a/src/gui/widgets/resizegrip.h b/src/gui/widgets/resizegrip.h
index f57eda94..acb934d2 100644
--- a/src/gui/widgets/resizegrip.h
+++ b/src/gui/widgets/resizegrip.h
@@ -24,6 +24,8 @@
#include <guichan/widget.hpp>
+#include "../../guichanfwd.h"
+
class Image;
/**
@@ -39,7 +41,7 @@ class ResizeGrip : public gcn::Widget
/**
* Constructor.
*/
- ResizeGrip();
+ ResizeGrip(std::string image = "graphics/gui/resize.png");
/**
* Destructor.
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 58544f7e..30456a81 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -20,16 +20,17 @@
*/
#include <algorithm>
+#include <cassert>
#include <climits>
#include <cassert>
#include <guichan/exception.hpp>
-#include <guichan/widgets/icon.hpp>
-#include "window.h"
+#include <guichan/widgets/icon.hpp>
#include "gui.h"
#include "gccontainer.h"
+#include "window.h"
#include "windowcontainer.h"
#include "widgets/resizegrip.h"
@@ -42,24 +43,28 @@
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
+#include "../utils/xml.h"
+
ConfigListener *Window::windowConfigListener = 0;
WindowContainer *Window::windowContainer = 0;
int Window::instances = 0;
int Window::mouseResize = 0;
-ImageRect Window::border;
+//ImageRect Window::border;
Image *Window::closeImage = NULL;
+bool Window::mAlphaChanged = false;
class WindowConfigListener : public ConfigListener
{
void optionChanged(const std::string &)
{
- for_each(Window::border.grid, Window::border.grid + 9,
- std::bind2nd(std::mem_fun(&Image::setAlpha),
- config.getValue("guialpha", 0.8)));
+ Window::mAlphaChanged = true;
+// for_each(Window::border.grid, Window::border.grid + 9,
+// std::bind2nd(std::mem_fun(&Image::setAlpha),
+// config.getValue("guialpha", 0.8)));
}
};
-Window::Window(const std::string& caption, bool modal, Window *parent):
+Window::Window(const std::string& caption, bool modal, Window *parent, const std::string& skin):
gcn::Window(caption),
mGrip(0),
mParent(parent),
@@ -71,7 +76,8 @@ Window::Window(const std::string& caption, bool modal, Window *parent):
mMinWinWidth(100),
mMinWinHeight(40),
mMaxWinWidth(INT_MAX),
- mMaxWinHeight(INT_MAX)
+ mMaxWinHeight(INT_MAX),
+ mSkin(skin)
{
logger->log("Window::Window(\"%s\")", caption.c_str());
@@ -79,23 +85,13 @@ Window::Window(const std::string& caption, bool modal, Window *parent):
throw GCN_EXCEPTION("Window::Window. no windowContainer set");
}
+ // Loads the skin
+ loadSkin(mSkin);
+
+ setGuiAlpha();
+
if (instances == 0)
{
- // Load static resources
- ResourceManager *resman = ResourceManager::getInstance();
- Image *dBorders = resman->getImage("graphics/gui/vscroll_grey.png");
- border.grid[0] = dBorders->getSubImage(0, 0, 4, 4);
- border.grid[1] = dBorders->getSubImage(4, 0, 3, 4);
- border.grid[2] = dBorders->getSubImage(7, 0, 4, 4);
- border.grid[3] = dBorders->getSubImage(0, 4, 4, 10);
- border.grid[4] = resman->getImage("graphics/gui/bg_quad_dis.png");
- border.grid[5] = dBorders->getSubImage(7, 4, 4, 10);
- border.grid[6] = dBorders->getSubImage(0, 15, 4, 4);
- border.grid[7] = dBorders->getSubImage(4, 15, 3, 4);
- border.grid[8] = dBorders->getSubImage(7, 15, 4, 4);
- dBorders->decRef();
- closeImage = resman->getImage("graphics/gui/close_button.png");
-
windowConfigListener = new WindowConfigListener();
// Send GUI alpha changed for initialization
windowConfigListener->optionChanged("guialpha");
@@ -147,22 +143,19 @@ Window::~Window()
instances--;
+ // Clean up static resources
+ for( int i = 0; i < 9; i++ )
+ {
+ delete border.grid[i];
+ border.grid[i] = NULL;
+ }
+
if (instances == 0)
{
config.removeListener("guialpha", windowConfigListener);
delete windowConfigListener;
windowConfigListener = NULL;
- // Clean up static resources
- delete border.grid[0];
- delete border.grid[1];
- delete border.grid[2];
- delete border.grid[3];
- border.grid[4]->decRef();
- delete border.grid[5];
- delete border.grid[6];
- delete border.grid[7];
- delete border.grid[8];
closeImage->decRef();
}
@@ -537,3 +530,185 @@ int Window::getResizeHandles(gcn::MouseEvent &event)
return resizeHandles;
}
+
+void Window::setGuiAlpha()
+{
+ //logger->log("Window::setGuiAlpha: Alpha Value %f", config.getValue("guialpha", 0.8));
+ for(int i = 0; i < 9; i++)
+ {
+ //logger->log("Window::setGuiAlpha: Border Image (%i)", i);
+ border.grid[i]->setAlpha(config.getValue("guialpha", 0.8));
+ }
+
+ mAlphaChanged = false;
+}
+
+void Window::loadSkin(const std::string filename)
+{
+ const std::string windowId = Window::getId();
+
+ ResourceManager *resman = ResourceManager::getInstance();
+
+ logger->log("Loading Window Skin '%s'.", filename.c_str());
+ logger->log("Loading Window ID '%s'.", windowId.c_str());
+
+
+ if(filename == "")
+ logger->error("Window::loadSkin(): Invalid File Name.");
+
+ // TODO:
+ // If there is an error loading the specified file, we should try to revert
+ // to a 'default' skin file. Only if the 'default' skin file can't be loaded
+ // should we have a terminating error.
+ XML::Document doc(filename);
+ xmlNodePtr rootNode = doc.rootNode();
+
+ if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "skinset"))
+ {
+ logger->error("Widget Skinning error");
+ }
+
+ std::string skinSetImage;
+ skinSetImage = XML::getProperty(rootNode, "image", "");
+ Image *dBorders = NULL;
+ if(skinSetImage != "")
+ {
+ logger->log("Window::loadSkin(): <skinset> defines '%s' as a skin image.", skinSetImage.c_str());
+ dBorders = resman->getImage("graphics/gui/" + skinSetImage);//"graphics/gui/speech_bubble.png");
+ }
+ else
+ {
+ logger->error("Window::loadSkin(): Skinset does not define an image!");
+ }
+
+ //iterate <widget>'s
+ for_each_xml_child_node(widgetNode, rootNode)
+ {
+ if (!xmlStrEqual(widgetNode->name, BAD_CAST "widget"))
+ continue;
+
+ std::string widgetType;
+ widgetType = XML::getProperty(widgetNode, "type", "unknown");
+ if (widgetType == "Window")
+ {
+ // Iterate through <part>'s
+ // LEEOR / TODO:
+ // We need to make provisions to load in a CloseButton image. For now it
+ // can just be hard-coded.
+ for_each_xml_child_node(partNode, widgetNode)
+ {
+ if (!xmlStrEqual(partNode->name, BAD_CAST "part"))
+ {
+ continue;
+ }
+
+ std::string partType;
+ partType = XML::getProperty(partNode, "type", "unknown");
+ // TOP ROW
+ if(partType == "top-left-corner")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[0] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "top-edge")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[1] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "top-right-corner")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[2] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+
+ // MIDDLE ROW
+ else if(partType == "left-edge")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[3] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "bg-quad")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[4] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "right-edge")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[5] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+
+ // BOTTOM ROW
+ else if(partType == "bottom-left-corner")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[6] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "bottom-edge")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[7] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+ else if(partType == "bottom-right-corner")
+ {
+ const int xPos = XML::getProperty(partNode, "xpos", 0);
+ const int yPos = XML::getProperty(partNode, "ypos", 0);
+ const int width = XML::getProperty(partNode, "width", 1);
+ const int height = XML::getProperty(partNode, "height", 1);
+
+ border.grid[8] = dBorders->getSubImage(xPos, yPos, width, height);
+ }
+
+ // Part is of an uknown type.
+ else
+ {
+ logger->log("Window::loadSkin(): Unknown Part Type '%s'", partType.c_str());
+ }
+ }
+ }
+ // Widget is of an uknown type.
+ else
+ {
+ logger->log("Window::loadSkin(): Unknown Widget Type '%s'", widgetType.c_str());
+ }
+ }
+ dBorders->decRef();
+
+ logger->log("Finished loading Window Skin.");
+
+ // Hard-coded for now until we update the above code to look for window buttons.
+ closeImage = resman->getImage("graphics/gui/close_button.png");
+}
+
diff --git a/src/gui/window.h b/src/gui/window.h
index 984c6f06..9380fc88 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -22,17 +22,17 @@
#ifndef _TMW_WINDOW_H__
#define _TMW_WINDOW_H__
-#include <guichan/widgets/window.hpp>
#include <guichan/widgetlistener.hpp>
+#include <guichan/widgets/window.hpp>
+
+#include "../graphics.h"
#include "../guichanfwd.h"
class ConfigListener;
class GCContainer;
-class ImageRect;
class ResizeGrip;
class WindowContainer;
-class Image;
/**
* A window. This window can be dragged around and has a title bar. Windows are
@@ -54,9 +54,10 @@ class Window : public gcn::Window, gcn::WidgetListener
* @param parent The parent window. This is the window standing above
* this one in the window hiearchy. When reordering,
* a window will never go below its parent window.
+ * @param skin The location where the window's skin XML can be found.
*/
Window(const std::string &caption = "Window", bool modal = false,
- Window *parent = NULL);
+ Window *parent = NULL, const std::string &skin = "graphics/gui/gui.xml");
/**
* Destructor.
@@ -235,6 +236,11 @@ class Window : public gcn::Window, gcn::WidgetListener
*/
virtual void resetToDefaultSize();
+ /**
+ * Loads a window skin
+ */
+ void loadSkin(const std::string filename);
+
enum ResizeHandles
{
TOP = 0x01,
@@ -253,6 +259,8 @@ class Window : public gcn::Window, gcn::WidgetListener
*/
int getResizeHandles(gcn::MouseEvent &event);
+ void setGuiAlpha();
+
GCContainer *mChrome; /**< Contained container */
ResizeGrip *mGrip; /**< Resize grip */
Window *mParent; /**< The parent window */
@@ -261,6 +269,7 @@ class Window : public gcn::Window, gcn::WidgetListener
bool mModal; /**< Window is modal */
bool mCloseButton; /**< Window has a close button */
bool mSticky; /**< Window resists minimization */
+ static bool mAlphaChanged; /**< Whether the alpha percent was changed */
int mMinWinWidth; /**< Minimum window width */
int mMinWinHeight; /**< Minimum window height */
int mMaxWinWidth; /**< Maximum window width */
@@ -269,6 +278,7 @@ class Window : public gcn::Window, gcn::WidgetListener
int mDefaultY; /**< Default window Y position */
int mDefaultWidth; /**< Default window width */
int mDefaultHeight; /**< Default window height */
+ std::string mSkin; /**< Name of the skin to use */
/** The window container windows add themselves to. */
static WindowContainer *windowContainer;
@@ -280,7 +290,7 @@ class Window : public gcn::Window, gcn::WidgetListener
static int mouseResize; /**< Active resize handles */
static int instances; /**< Number of Window instances */
- static ImageRect border; /**< The window border and background */
+ ImageRect border; /**< The window border and background */
static Image *closeImage; /**< Close Button Image */
/**
diff --git a/src/gui/windowcontainer.cpp b/src/gui/windowcontainer.cpp
index f92e8388..d8535f73 100644
--- a/src/gui/windowcontainer.cpp
+++ b/src/gui/windowcontainer.cpp
@@ -19,15 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
#include "windowcontainer.h"
#include "../utils/dtor.h"
void WindowContainer::logic()
{
- for_each(mDeathList.begin(), mDeathList.end(), make_dtor(mDeathList));
+ delete_all(mDeathList);
mDeathList.clear();
gcn::Container::logic();
diff --git a/src/gui/windowcontainer.h b/src/gui/windowcontainer.h
index 88a13d31..d783fefd 100644
--- a/src/gui/windowcontainer.h
+++ b/src/gui/windowcontainer.h
@@ -24,6 +24,8 @@
#include <guichan/widgets/container.hpp>
+#include "../guichanfwd.h"
+
/**
* A window container. This container adds functionality for more convenient
* widget (windows in particular) destruction.
diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp
index 65780345..6d74801e 100644
--- a/src/imageparticle.cpp
+++ b/src/imageparticle.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "imageparticle.h"
-
#include "graphics.h"
+#include "imageparticle.h"
#include "resources/image.h"
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 58c75f2c..da9aed02 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -19,11 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "inventory.h"
-
#include <algorithm>
#include <cassert>
+#include "inventory.h"
#include "item.h"
#include "log.h"
@@ -34,15 +33,16 @@ struct SlotUsed : public std::unary_function<Item*, bool>
}
};
-Inventory::Inventory()
+Inventory::Inventory(int size):
+ mSize(size)
{
- mItems = new Item*[INVENTORY_SIZE];
- std::fill_n(mItems, INVENTORY_SIZE, (Item*) 0);
+ mItems = new Item*[mSize];
+ std::fill_n(mItems, mSize, (Item*) 0);
}
Inventory::~Inventory()
{
- for (int i = 0; i < INVENTORY_SIZE; i++)
+ for (int i = 0; i < mSize; i++)
delete mItems[i];
delete [] mItems;
@@ -58,7 +58,7 @@ Item* Inventory::getItem(int index) const
Item* Inventory::findItem(int itemId) const
{
- for (int i = 0; i < INVENTORY_SIZE; i++)
+ for (int i = 0; i < mSize; i++)
{
if (mItems[i] && mItems[i]->getId() == itemId)
return mItems[i];
@@ -73,19 +73,11 @@ void Inventory::addItem(int id, int quantity, bool equipment)
void Inventory::setItem(int index, int id, int quantity, bool equipment)
{
- if (index < 0 || index >= INVENTORY_SIZE) {
+ if (index < 0 || index >= mSize) {
logger->log("Warning: invalid inventory index: %d", index);
return;
}
- /* TODO: Check where to reenable this code.
- // Dont stack equipment other than arrows.
- if (equipment && !(id == 1199 || id == 529))
- mItems[index].setQuantity(quantity);
- else
- mItems[index].increaseQuantity(quantity);
- */
-
if (!mItems[index] && id > 0) {
Item *item = new Item(id, quantity, equipment);
item->setInvIndex(index);
@@ -101,14 +93,14 @@ void Inventory::setItem(int index, int id, int quantity, bool equipment)
void Inventory::clear()
{
- for (int i = 0; i < INVENTORY_SIZE; i++) {
+ for (int i = 0; i < mSize; i++) {
removeItemAt(i);
}
}
void Inventory::removeItem(int id)
{
- for (int i = 0; i < INVENTORY_SIZE; i++) {
+ for (int i = 0; i < mSize; i++) {
if (mItems[i] && mItems[i]->getId() == id) {
removeItemAt(i);
}
@@ -123,7 +115,7 @@ void Inventory::removeItemAt(int index)
bool Inventory::contains(Item *item) const
{
- for (int i = 0; i < INVENTORY_SIZE; i++) {
+ for (int i = 0; i < mSize; i++) {
if (mItems[i] && mItems[i]->getId() == item->getId()) {
return true;
}
@@ -134,19 +126,19 @@ bool Inventory::contains(Item *item) const
int Inventory::getFreeSlot() const
{
- Item **i = std::find_if(mItems + 2, mItems + INVENTORY_SIZE,
+ Item **i = std::find_if(mItems + 2, mItems + mSize,
std::not1(SlotUsed()));
- return (i == mItems + INVENTORY_SIZE) ? -1 : (i - mItems);
+ return (i == mItems + mSize) ? -1 : (i - mItems);
}
int Inventory::getNumberOfSlotsUsed() const
{
- return count_if(mItems, mItems + INVENTORY_SIZE, SlotUsed());
+ return count_if(mItems, mItems + mSize, SlotUsed());
}
int Inventory::getLastUsedSlot() const
{
- for (int i = INVENTORY_SIZE - 1; i >= 0; i--) {
+ for (int i = mSize - 1; i >= 0; i--) {
if (SlotUsed()(mItems[i])) {
return i;
}
diff --git a/src/inventory.h b/src/inventory.h
index 2fbbbf4c..91bb7d04 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -32,7 +32,7 @@ class Inventory
/**
* Constructor.
*/
- Inventory();
+ Inventory(int size);
/**
* Destructor.
@@ -40,6 +40,11 @@ class Inventory
~Inventory();
/**
+ * Returns the size that this instance is configured for
+ */
+ int getSize() { return mSize; }
+
+ /**
* Returns the item at the specified index.
*/
Item* getItem(int index) const;
@@ -104,6 +109,7 @@ class Inventory
protected:
Item **mItems; /**< The holder of items */
+ int mSize; /**< The max number of inventory items */
};
#endif
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp
index babe3dfb..cfe46238 100644
--- a/src/itemshortcut.cpp
+++ b/src/itemshortcut.cpp
@@ -19,11 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "itemshortcut.h"
-
#include "configuration.h"
#include "inventory.h"
#include "item.h"
+#include "itemshortcut.h"
#include "localplayer.h"
#include "utils/tostring.h"
diff --git a/src/joystick.cpp b/src/joystick.cpp
index b05e9b5f..4cee4464 100644
--- a/src/joystick.cpp
+++ b/src/joystick.cpp
@@ -19,9 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "joystick.h"
+#include <cassert>
#include "configuration.h"
+#include "joystick.h"
#include "log.h"
#include <cassert>
diff --git a/src/joystick.h b/src/joystick.h
index ee029915..2baf3e61 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -30,7 +30,9 @@ class Joystick
/**
* Number of buttons we can handle.
*/
- enum { MAX_BUTTONS = 6 };
+ enum {
+ MAX_BUTTONS = 6
+ };
/**
* Directions, to be used as bitmask values.
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index 19cbb945..f67c9534 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -19,12 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "keyboardconfig.h"
+#include <guichan/sdl/sdlinput.hpp>
+
#include "configuration.h"
+#include "keyboardconfig.h"
#include "log.h"
-#include <guichan/sdl/sdlinput.hpp>
-
#include "gui/setup_keyboard.h"
struct KeyData
@@ -42,8 +42,10 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = {
{"keyMoveRight", SDLK_RIGHT, "Move Right"},
{"keyAttack", SDLK_LCTRL, "Attack"},
{"keySmilie", SDLK_LALT, "Smilie"},
- {"keyTarget", SDLK_LSHIFT, "Target"},
+ {"keyTalk", SDLK_t, "Talk"},
+ {"keyTarget", SDLK_LSHIFT, "Stop Attack"},
{"keyTargetClosest", SDLK_a, "Target Closest"},
+ {"keyTargetNPC", SDLK_n, "Target NPC"},
{"keyTargetPlayer", SDLK_q, "Target Player"},
{"keyPickup", SDLK_z, "Pickup"},
{"keyHideWindows", SDLK_h, "Hide Windows"},
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index 9c5fe943..158252d4 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -24,10 +24,10 @@
#include <string>
-#include "gui/setup_keyboard.h"
-
#include <guichan/sdl/sdlinput.hpp>
+#include "gui/setup_keyboard.h"
+
/**
* Each key represents a key function. Such as 'Move up', 'Attack' etc.
*/
@@ -150,8 +150,10 @@ class KeyboardConfig
KEY_MOVE_RIGHT,
KEY_ATTACK,
KEY_SMILIE,
+ KEY_TALK,
KEY_TARGET,
KEY_TARGET_CLOSEST,
+ KEY_TARGET_NPC,
KEY_TARGET_PLAYER,
KEY_PICKUP,
KEY_HIDE_WINDOWS,
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 3550b092..292f70e0 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -18,15 +18,16 @@
* 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 "localplayer.h"
+#include <cassert>
#include "equipment.h"
#include "floor_item.h"
#include "game.h"
#include "inventory.h"
#include "item.h"
+#include "localplayer.h"
#include "main.h"
+#include "monster.h"
#include "particle.h"
#include "sound.h"
#include "monster.h"
@@ -36,6 +37,9 @@
#include "net/messageout.h"
#include "net/protocol.h"
+#include "resources/imageset.h"
+#include "resources/resourcemanager.h"
+
#include "utils/tostring.h"
LocalPlayer *player_node = NULL;
@@ -48,20 +52,44 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
mTrading(false), mGoingToTarget(false),
- mLastAction(-1),
- mWalkingDir(0), mDestX(0), mDestY(0),
- mInventory(new Inventory)
+ mTargetTime(-1), mLastAction(-1),
+ mLastTarget(-1), mWalkingDir(0),
+ mDestX(0), mDestY(0),
+ mInventory(new Inventory(INVENTORY_SIZE)),
+ mStorage(new Inventory(STORAGE_SIZE))
{
+ initTargetCursor();
}
LocalPlayer::~LocalPlayer()
{
delete mInventory;
+ delete mStorage;
+
+ for (int i = Being::TC_SMALL; i < Being::NUM_TC; i++)
+ {
+ delete mTargetCursorInRange[i];
+ delete mTargetCursorOutRange[i];
+ mInRangeImages[i]->decRef();
+ mOutRangeImages[i]->decRef();
+ }
}
void LocalPlayer::logic()
{
switch (mAction) {
+ case STAND:
+ break;
+
+ case SIT:
+ break;
+
+ case DEAD:
+ break;
+
+ case HURT:
+ break;
+
case WALK:
mFrame = (get_elapsed_time(mWalkTime) * 6) / mWalkSpeed;
if (mFrame >= 6) {
@@ -79,7 +107,6 @@ void LocalPlayer::logic()
mFrame = (get_elapsed_time(mWalkTime) * frames) / mAttackSpeed;
if (mFrame >= frames) {
nextStep();
- attack();
}
break;
}
@@ -88,6 +115,35 @@ void LocalPlayer::logic()
if (get_elapsed_time(mLastAction) >= 1000) {
mLastAction = -1;
}
+ // Targeting allowed 4 times a second
+ if (get_elapsed_time(mLastTarget) >= 250) {
+ mLastTarget = -1;
+ }
+ // Remove target if its been on a being for more than a minute
+ if (get_elapsed_time(mTargetTime) >= 60000)
+ {
+ mTargetTime = -1;
+ setTarget(NULL);
+ mLastTarget = -1;
+ }
+
+ if (mTarget)
+ {
+ if (mTarget->mAction == DEAD)
+ {
+ stopAttack();
+ }
+ if (mKeepAttacking && mTarget)
+ {
+ attack(mTarget, true);
+ }
+
+ for (int i = Being::TC_SMALL; i < Being::NUM_TC; i++)
+ {
+ player_node->mTargetCursorInRange[i]->update(10);
+ player_node->mTargetCursorOutRange[i]->update(10);
+ }
+ }
Being::logic();
}
@@ -228,9 +284,19 @@ void LocalPlayer::walk(unsigned char dir)
void LocalPlayer::setTarget(Being *target)
{
- if (target == mTarget)
- {
+ if (mLastTarget != -1 || target == this)
return;
+ mLastTarget = tick_time;
+
+ if ((target == NULL) || target == mTarget)
+ {
+ target = NULL;
+ mKeepAttacking = false;
+ mTargetTime = -1;
+ }
+ if (target)
+ {
+ mTargetTime = tick_time;
}
if (mTarget && mTarget->getType() == Being::MONSTER)
{
@@ -375,25 +441,25 @@ bool LocalPlayer::tradeRequestOk() const
void LocalPlayer::attack(Being *target, bool keep)
{
- // Can only attack when standing still
- if (mAction != STAND)
+ mKeepAttacking = keep;
+
+ if (!target)
return;
- if (keep && target)
+ if ((mTarget != target) || !mTarget)
{
+ mLastTarget = -1;
setTarget(target);
}
- else if (mTarget)
- {
- target = mTarget;
- }
-
- if (!target)
- return;
int dist_x = target->mX - mX;
int dist_y = target->mY - mY;
+ // Must be standing and be within attack range to continue
+ if ((mAction != STAND) || (mAttackRange < abs(dist_x)) ||
+ (mAttackRange < abs(dist_y)))
+ return;
+
if (abs(dist_y) >= abs(dist_x))
{
if (dist_y > 0)
@@ -412,8 +478,10 @@ void LocalPlayer::attack(Being *target, bool keep)
// Implement charging attacks here
mLastAttackTime = 0;
- setAction(ATTACK);
mWalkTime = tick_time;
+ mTargetTime = tick_time;
+
+ setAction(ATTACK);
if (mEquippedWeapon)
{
@@ -428,11 +496,22 @@ void LocalPlayer::attack(Being *target, bool keep)
outMsg.writeInt16(0x0089);
outMsg.writeInt32(target->getId());
outMsg.writeInt8(0);
+
+ if (!keep)
+ {
+ stopAttack();
+ }
}
void LocalPlayer::stopAttack()
{
+ if (mTarget)
+ {
+ setAction(STAND);
+ mLastTarget = -1;
+ }
setTarget(NULL);
+ mLastTarget = -1;
}
Being* LocalPlayer::getTarget() const
@@ -475,7 +554,90 @@ bool LocalPlayer::withinAttackRange(Being *target)
void LocalPlayer::setGotoTarget(Being *target)
{
+ mLastTarget = -1;
setTarget(target);
mGoingToTarget = true;
setDestination(target->mX, target->mY);
}
+
+void LocalPlayer::initTargetCursor()
+{
+ // Load target cursors
+ loadTargetCursor("graphics/gui/target-cursor-blue-s.png", 44, 35,
+ false, TC_SMALL);
+ loadTargetCursor("graphics/gui/target-cursor-red-s.png", 44, 35,
+ true, TC_SMALL);
+ loadTargetCursor("graphics/gui/target-cursor-blue-m.png", 62, 44,
+ false, TC_MEDIUM);
+ loadTargetCursor("graphics/gui/target-cursor-red-m.png", 62, 44,
+ true, TC_MEDIUM);
+ loadTargetCursor("graphics/gui/target-cursor-blue-l.png", 82, 60,
+ false, TC_LARGE);
+ loadTargetCursor("graphics/gui/target-cursor-red-l.png", 82, 60,
+ true, TC_LARGE);
+}
+
+void LocalPlayer::loadTargetCursor(std::string filename, int width, int height,
+ bool outRange, TargetCursorSize size)
+{
+ assert(size > -1);
+ assert(size < 3);
+
+ ImageSet* currentImageSet;
+ SimpleAnimation* currentCursor;
+
+ ResourceManager *resman = ResourceManager::getInstance();
+
+ currentImageSet = resman->getImageSet(filename, width, height);
+ Animation *anim = new Animation();
+ for (unsigned int i = 0; i < currentImageSet->size(); ++i)
+ {
+ anim->addFrame(currentImageSet->get(i), 75, 0, 0);
+ }
+ currentCursor = new SimpleAnimation(anim);
+
+ if (outRange)
+ {
+ mOutRangeImages[size] = currentImageSet;
+ mTargetCursorOutRange[size] = currentCursor;
+ }
+ else
+ {
+ mInRangeImages[size] = currentImageSet;
+ mTargetCursorInRange[size] = currentCursor;
+ }
+}
+
+void LocalPlayer::drawTargetCursor(Graphics *graphics, int scrollX, int scrollY)
+{
+
+ // Draw target marker if needed
+ if (mTarget)
+ {
+ // Calculate target circle position
+
+ // Find whether target is in range
+ int rangeX = abs(mTarget->mX - mX);
+ int rangeY = abs(mTarget->mY - mY);
+ int attackRange = getAttackRange();
+
+ // Get the correct target cursors graphic
+ TargetCursorSize cursorSize = mTarget->getTargetCursorSize();
+
+ if (rangeX > attackRange || rangeY > attackRange)
+ {
+ mTarget->mTargetCursor = mTargetCursorOutRange[cursorSize]->getCurrentImage();
+ }
+ else
+ {
+ mTarget->mTargetCursor = mTargetCursorInRange[cursorSize]->getCurrentImage();
+ }
+
+ // Draw the target cursor at the correct position
+ int posX = mTarget->getPixelX() + 16 - mTarget->mTargetCursor->getWidth() / 2 - scrollX;
+ int posY = mTarget->getPixelY() + 16 - mTarget->mTargetCursor->getHeight() / 2 - scrollY;
+
+ graphics->drawImage(mTarget->mTargetCursor, posX, posY);
+ }
+ return;
+}
diff --git a/src/localplayer.h b/src/localplayer.h
index 34f10a4a..ad59d138 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -23,11 +23,16 @@
#define _TMW_LOCALPLAYER_H
#include "player.h"
+#include "simpleanimation.h"
// TODO move into some sane place...
#define MAX_SLOT 2
+#define INVENTORY_SIZE 102
+#define STORAGE_SIZE 301
+
class FloorItem;
+class ImageSet;
class Inventory;
class Item;
class Network;
@@ -69,6 +74,11 @@ class LocalPlayer : public Player
Inventory* getInventory() const { return mInventory; }
/**
+ * Returns the player's storage
+ */
+ Inventory* getStorage() const { return mStorage; }
+
+ /**
* Equips an item.
*/
void equipItem(Item *item);
@@ -164,6 +174,12 @@ class LocalPlayer : public Player
void revive();
/**
+ * Accessors for mInStorage
+ */
+ bool getInStorage() { return mInStorage; }
+ void setInStorage(bool inStorage) { mInStorage = inStorage; }
+
+ /**
* Sets the amount of XP. Shows XP gaining effect if the player is on
* a map.
*/
@@ -198,6 +214,14 @@ class LocalPlayer : public Player
float mLastAttackTime; /**< Used to synchronize the charge dialog */
+ void drawTargetCursor(Graphics *graphics, int offsetX, int offsetY);
+
+ /** Animated in range target cursor. */
+ SimpleAnimation *mTargetCursorInRange[NUM_TC];
+
+ /** Animated out of range target cursor. */
+ SimpleAnimation *mTargetCursorOutRange[NUM_TC];
+
protected:
void walk(unsigned char dir);
@@ -208,13 +232,33 @@ class LocalPlayer : public Player
FloorItem *mPickUpTarget;
bool mTrading;
+ bool mInStorage; /**< Whether storage is currently accessible */
bool mGoingToTarget;
+ bool mKeepAttacking;/** Whether or not to continue to attack */
+ int mTargetTime; /** How long the being has been targeted **/
int mLastAction; /**< Time stamp of the last action, -1 if none. */
+ int mLastTarget; /** Time stamp of last targeting 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. */
Inventory *mInventory;
+ Inventory *mStorage;
+
+ /**
+ * Helper function for loading target cursors
+ */
+ void loadTargetCursor(std::string filename, int width, int height,
+ bool outRange, Being::TargetCursorSize size);
+
+ /** Images of in range target cursor. */
+ ImageSet *mInRangeImages[NUM_TC];
+
+ /** Images of out of range target cursor. */
+ ImageSet *mOutRangeImages[NUM_TC];
+
+ // Load the target cursors into memory
+ void initTargetCursor();
};
extern LocalPlayer *player_node;
diff --git a/src/main.cpp b/src/main.cpp
index e246b6a9..4049aa78 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,46 +19,41 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "main.h"
-
#include <getopt.h>
#include <iostream>
#include <physfs.h>
+#include <SDL_image.h>
#include <unistd.h>
#include <vector>
-#include <SDL_image.h>
#include <guichan/actionlistener.hpp>
+
#include <guichan/sdl/sdlinput.hpp>
+
#include <guichan/widgets/label.hpp>
#include <libxml/parser.h>
-#ifndef WIN32
-#include <cerrno>
-#include <sys/stat.h>
-#endif
-#if defined __APPLE__
-#include <CoreFoundation/CFBundle.h>
-#endif
-
#include "configuration.h"
-#include "keyboardconfig.h"
-#include "player_relations.h"
#include "game.h"
#include "graphics.h"
#include "itemshortcut.h"
-#include "lockedarray.h"
+#include "keyboardconfig.h"
#include "localplayer.h"
+#include "lockedarray.h"
#include "log.h"
#include "logindata.h"
+#include "main.h"
#ifdef USE_OPENGL
#include "openglgraphics.h"
#endif
+#include "player_relations.h"
+#include "serverinfo.h"
#include "sound.h"
#include "gui/char_server.h"
#include "gui/char_select.h"
+#include "gui/colour.h"
#include "gui/gui.h"
#include "gui/login.h"
#include "gui/ok_dialog.h"
@@ -67,6 +62,7 @@
#include "gui/setup.h"
#include "gui/updatewindow.h"
#include "gui/textfield.h"
+#include "gui/updatewindow.h"
#include "net/charserverhandler.h"
#include "net/loginhandler.h"
@@ -74,6 +70,7 @@
#include "net/messageout.h"
#include "net/network.h"
+#include "resources/colordb.h"
#include "resources/image.h"
#include "resources/itemdb.h"
#include "resources/monsterdb.h"
@@ -83,8 +80,20 @@
#include "utils/dtor.h"
#include "utils/tostring.h"
+#ifdef __APPLE__
+#include <CoreFoundation/CFBundle.h>
+#endif
+
+#ifdef __MINGW32__
+#include <windows.h>
+#define usleep(usec) (Sleep ((usec) / 1000), 0)
+#endif
+
#ifdef WIN32
#include <SDL_syswm.h>
+#else
+#include <cerrno>
+#include <sys/stat.h>
#endif
namespace {
@@ -123,6 +132,7 @@ CharServerHandler charServerHandler;
LoginData loginData;
LockedArray<LocalPlayer*> charInfo(MAX_SLOT + 1);
+Colour *textColour;
// This anonymous namespace hides whatever is inside from other modules.
namespace {
@@ -168,10 +178,12 @@ struct Options
*/
void setUpdatesDir()
{
+ std::stringstream updates;
+
// If updatesHost is currently empty, fill it from config file
if (updateHost.empty()) {
updateHost =
- config.getValue("updatehost", "http://updates.themanaworld.org");
+ config.getValue("updatehost", "http://www.aethyra.org/updates");
}
// Remove any trailing slash at the end of the update host
@@ -183,8 +195,9 @@ void setUpdatesDir()
pos = updateHost.find("://");
if (pos != updateHost.npos) {
if (pos + 3 < updateHost.length()) {
- updatesDir =
- "updates/" + updateHost.substr(pos + 3);
+ updates << "updates/" << updateHost.substr(pos + 3)
+ << "/" << loginData.port;
+ updatesDir = updates.str();
} else {
logger->log("Error: Invalid update host: %s", updateHost.c_str());
errorMessage = "Invalid update host: " + updateHost;
@@ -192,7 +205,8 @@ void setUpdatesDir()
}
} else {
logger->log("Warning: no protocol was specified for the update host");
- updatesDir = "updates/" + updateHost;
+ updates << "updates/" << updateHost << "/" << loginData.port;
+ updatesDir = updates.str();
}
ResourceManager *resman = ResourceManager::getInstance();
@@ -213,18 +227,18 @@ void setUpdatesDir()
*/
void init_engine(const Options &options)
{
- homeDir = std::string(PHYSFS_getUserDir()) + "/.tmw";
+ homeDir = std::string(PHYSFS_getUserDir()) + "/.aethyra";
#if defined WIN32
if (!CreateDirectory(homeDir.c_str(), 0) &&
GetLastError() != ERROR_ALREADY_EXISTS)
#elif defined __APPLE__
- // Use Application Directory instead of .tmw
- homeDir = std::string(PHYSFS_getUserDir()) +
- "/Library/Application Support/The Mana World";
+ // Use Application Directory instead of .aethyra
+ homeDir = std::string(PHYSFS_getUserDir()) +
+ "/Library/Application Support/Aethyra";
if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
(errno != EEXIST))
#else
- // Checking if /home/user/.tmw folder exists.
+ // Checking if /home/user/.Aethyra folder exists.
if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
(errno != EEXIST))
#endif
@@ -236,12 +250,12 @@ void init_engine(const Options &options)
}
// Set log file
- logger->setLogFile(homeDir + std::string("/tmw.log"));
+ logger->setLogFile(homeDir + std::string("/aethyra.log"));
#ifdef PACKAGE_VERSION
- logger->log("Starting The Mana World Version %s", PACKAGE_VERSION);
+ logger->log("Starting Aethyra Version %s", PACKAGE_VERSION);
#else
- logger->log("Starting The Mana World - Version not defined");
+ logger->log("Starting Aethyra - Version not defined");
#endif
// Initialize SDL
@@ -286,13 +300,13 @@ void init_engine(const Options &options)
strncat(path, "/data", PATH_MAX - 1);
resman->addToSearchPath(path, true);
#else
- resman->addToSearchPath(TMW_DATADIR "data", true);
+ resman->addToSearchPath(AETHYRA_DATADIR "data", true);
#endif
// Fill configuration with defaults
logger->log("Initializing configuration...");
- config.setValue("host", "server.themanaworld.org");
- config.setValue("port", 6901);
+ config.setValue("host", "www.aethyra.org");
+ config.setValue("port", 21001);
config.setValue("hwaccel", 0);
#if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL
config.setValue("opengl", 1);
@@ -306,34 +320,34 @@ void init_engine(const Options &options)
config.setValue("sfxVolume", 100);
config.setValue("musicVolume", 60);
config.setValue("fpslimit", 60);
- config.setValue("updatehost", "http://updates.themanaworld.org");
+ config.setValue("updatehost", "http://www.aethyra.org/updates");
config.setValue("customcursor", 1);
config.setValue("ChatLogLength", 128);
// Checking if the configuration file exists... otherwise creates it with
// default options !
- FILE *tmwFile = 0;
+ FILE *aethyraFile = 0;
std::string configPath = options.configPath;
if (configPath.empty())
configPath = homeDir + "/config.xml";
- tmwFile = fopen(configPath.c_str(), "r");
+ aethyraFile = fopen(configPath.c_str(), "r");
// If we can't read it, it doesn't exist !
- if (tmwFile == NULL) {
+ if (aethyraFile == NULL) {
// We reopen the file in write mode and we create it
- tmwFile = fopen(configPath.c_str(), "wt");
+ aethyraFile = fopen(configPath.c_str(), "wt");
}
- if (tmwFile == NULL) {
+ if (aethyraFile == NULL) {
std::cout << "Can't create " << configPath << ". "
"Using Defaults." << std::endl;
} else {
- fclose(tmwFile);
+ fclose(aethyraFile);
config.init(configPath);
}
- SDL_WM_SetCaption("The Mana World", NULL);
+ SDL_WM_SetCaption("Aethyra", NULL);
#ifdef WIN32
static SDL_SysWMinfo pInfo;
SDL_GetWMInfo(&pInfo);
@@ -343,7 +357,7 @@ void init_engine(const Options &options)
SetClassLong(pInfo.window, GCL_HICON, (LONG) icon);
}
#else
- SDL_Surface *icon = IMG_Load(TMW_DATADIR "data/icons/tmw.png");
+ SDL_Surface *icon = IMG_Load(AETHYRA_DATADIR "data/icons/aethyra.png");
if (icon)
{
SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
@@ -429,6 +443,7 @@ void exit_engine()
sound.close();
// Unload XML databases
+ ColorDB::unload();
ItemDB::unload();
MonsterDB::unload();
NPCDB::unload();
@@ -440,26 +455,28 @@ void exit_engine()
void printHelp()
{
std::cout
- << "tmw" << std::endl << std::endl
+ << "aethyra" << std::endl << std::endl
<< "Options: " << std::endl
- << " -h --help : Display this help" << std::endl
- << " -v --version : Display the version" << std::endl
- << " -u --skipupdate : Skip the update process" << std::endl
+ << " -C --configfile : Configuration file to use" << std::endl
<< " -d --data : Directory to load game data from" << std::endl
- << " -U --username : Login with this username" << std::endl
- << " -P --password : Login with this password" << std::endl
- << " -D --default : Bypass the login process with default settings" << std::endl
+ << " -D --default : Bypass the login process with default "
+ "settings" << std::endl
+ << " -h --help : Display this help" << std::endl
+ << " -H --updatehost : Use this update host" << std::endl
<< " -p --playername : Login with this player" << std::endl
- << " -C --configfile : Configuration file to use" << std::endl
- << " -H --updatehost : Use this update host" << std::endl;
+ << " -P --password : Login with this password" << std::endl
+ << " -u --skipupdate : Skip the update downloads" << std::endl
+ << " -U --username : Login with this username" << std::endl
+ << " -v --version : Display the version" << std::endl;
}
void printVersion()
{
#ifdef PACKAGE_VERSION
- std::cout << "The Mana World version " << PACKAGE_VERSION << std::endl;
+ std::cout << "Aethyra version " << PACKAGE_VERSION <<
+ std::endl;
#else
- std::cout << "The Mana World version " <<
+ std::cout << "Aethyra version " <<
"(local build?, PACKAGE_VERSION is not defined)" << std::endl;
#endif
}
@@ -469,16 +486,16 @@ void parseOptions(int argc, char *argv[], Options &options)
const char *optstring = "hvud:U:P:Dp:C:H:";
const struct option long_options[] = {
- { "help", no_argument, 0, 'h' },
- { "version", no_argument, 0, 'v' },
- { "skipupdate", no_argument, 0, 'u' },
+ { "configfile", required_argument, 0, 'C' },
{ "data", required_argument, 0, 'd' },
- { "username", required_argument, 0, 'U' },
- { "password", required_argument, 0, 'P' },
{ "default", no_argument, 0, 'D' },
{ "playername", required_argument, 0, 'p' },
- { "configfile", required_argument, 0, 'C' },
+ { "password", required_argument, 0, 'P' },
+ { "help", no_argument, 0, 'h' },
{ "updatehost", required_argument, 0, 'H' },
+ { "skipupdate", no_argument, 0, 'u' },
+ { "username", required_argument, 0, 'U' },
+ { "version", no_argument, 0, 'v' },
{ 0 }
};
@@ -490,36 +507,36 @@ void parseOptions(int argc, char *argv[], Options &options)
break;
switch (result) {
- default: // Unknown option
- case 'h':
- options.printHelp = true;
- break;
- case 'v':
- options.printVersion = true;
- break;
- case 'u':
- options.skipUpdate = true;
+ case 'C':
+ options.configPath = optarg;
break;
case 'd':
options.dataPath = optarg;
break;
- case 'U':
- options.username = optarg;
- break;
- case 'P':
- options.password = optarg;
- break;
case 'D':
options.chooseDefault = true;
break;
+ default: // Unknown option
+ case 'h':
+ options.printHelp = true;
+ break;
+ case 'H':
+ options.updateHost = optarg;
+ break;
case 'p':
options.playername = optarg;
break;
- case 'C':
- options.configPath = optarg;
+ case 'P':
+ options.password = optarg;
break;
- case 'H':
- options.updateHost = optarg;
+ case 'u':
+ options.skipUpdate = true;
+ break;
+ case 'U':
+ options.username = optarg;
+ break;
+ case 'v':
+ options.printVersion = true;
break;
}
}
@@ -597,6 +614,18 @@ void accountLogin(Network *network, LoginData *loginData)
config.setValue("remember", loginData->remember);
}
+inline int MIN(int x, int y)
+{
+ return x < y ? x : y;
+}
+
+void positionDialog(Window *dialog, int screenWidth, int screenHeight)
+{
+ dialog->setPosition(
+ MIN(screenWidth * 5 / 8, screenWidth - dialog->getWidth()),
+ MIN(screenHeight * 5 / 8, screenHeight - dialog->getHeight()));
+}
+
void charLogin(Network *network, LoginData *loginData)
{
logger->log("Trying to connect to char server...");
@@ -716,13 +745,39 @@ int main(int argc, char *argv[])
if (!options.password.empty()) {
loginData.password = options.password;
}
- loginData.hostname = config.getValue("host", "server.themanaworld.org");
- loginData.port = (short)config.getValue("port", 0);
+ loginData.hostname = config.getValue("host", "www.aethyra.org");
+ loginData.port = (short)config.getValue("port", 21001);
loginData.remember = config.getValue("remember", 0);
loginData.registerLogin = false;
SDLNet_Init();
Network *network = new Network();
+
+ // Set the most appropriate wallpaper, based on screen width
+ int screenWidth = (int) config.getValue("screenwidth", defaultScreenWidth);
+ int screenHeight = static_cast<int>(config.getValue("screenheight",
+ defaultScreenHeight));
+ std::string wallpaperName;
+
+ if (screenWidth <= 800)
+ wallpaperName = "graphics/images/login_wallpaper.png";
+ else if (screenWidth <= 1024)
+ wallpaperName = "graphics/images/login_wallpaper_1024x768.png";
+ else if (screenWidth <= 1280)
+ wallpaperName = "graphics/images/login_wallpaper_1280x960.png";
+ else if (screenWidth <= 1440)
+ wallpaperName = "graphics/images/login_wallpaper_1440x1080.png";
+ else
+ wallpaperName = "graphics/images/login_wallpaper_1600x1200.png";
+
+ login_wallpaper = ResourceManager::getInstance()-> getImage(wallpaperName);
+
+ if (!login_wallpaper)
+ logger->log("Couldn't load %s as wallpaper", wallpaperName.c_str());
+
+ // Needs to be created in main, as the updater uses it
+ textColour = new Colour();
+
while (state != EXIT_STATE)
{
// Handle SDL events
@@ -758,16 +813,6 @@ int main(int argc, char *argv[])
}
}
- if (!login_wallpaper)
- {
- login_wallpaper = ResourceManager::getInstance()->
- getImage("graphics/images/login_wallpaper.png");
- if (!login_wallpaper)
- {
- logger->error("Couldn't load login_wallpaper.png");
- }
- }
-
if (progressBar->isVisible())
{
progressBar->setProgress(progressBar->getProgress() + 0.005f);
@@ -796,7 +841,7 @@ int main(int argc, char *argv[])
// Reload the wallpaper in case that it was updated
login_wallpaper->decRef();
login_wallpaper = ResourceManager::getInstance()->
- getImage("graphics/images/login_wallpaper.png");
+ getImage(wallpaperName);
break;
// Those states don't cause a network disconnect
@@ -835,6 +880,7 @@ int main(int argc, char *argv[])
false);
// Load XML databases
+ ColorDB::load();
ItemDB::load();
MonsterDB::load();
NPCDB::load();
@@ -849,33 +895,48 @@ int main(int argc, char *argv[])
state = ACCOUNT_STATE;
} else {
currentDialog = new LoginDialog(&loginData);
+ positionDialog(currentDialog, screenWidth,
+ screenHeight);
}
break;
case REGISTER_STATE:
logger->log("State: REGISTER");
currentDialog = new RegisterDialog(&loginData);
+ positionDialog(currentDialog, screenWidth, screenHeight);
break;
case CHAR_SERVER_STATE:
logger->log("State: CHAR_SERVER");
+
+ if (n_server == 1)
+ {
+ SERVER_INFO *si = *server_info;
+ loginData.hostname = iptostring(si->address);
+ loginData.port = si->port;
+ loginData.updateHost = si->updateHost;
+ state = UPDATE_STATE;
+ }
+ else
{
int nextState = (options.skipUpdate) ?
LOADDATA_STATE : UPDATE_STATE;
currentDialog = new ServerSelectDialog(&loginData,
- nextState);
- }
- if (options.chooseDefault || options.playername != "") {
- ((ServerSelectDialog*) currentDialog)->action(
- gcn::ActionEvent(NULL, "ok"));
+ nextState);
+ positionDialog(currentDialog, screenWidth,
+ screenHeight);
+ if (options.chooseDefault || options.playername != "")
+ {
+ ((ServerSelectDialog*) currentDialog)->action(
+ gcn::ActionEvent(NULL, "ok"));
+ }
}
break;
-
case CHAR_SELECT_STATE:
logger->log("State: CHAR_SELECT");
currentDialog = new CharSelectDialog(network, &charInfo,
1 - loginData.sex);
-
+ positionDialog(currentDialog, screenWidth, screenHeight);
if (((CharSelectDialog*) currentDialog)->
selectByName(options.playername))
options.chooseDefault = true;
@@ -923,13 +984,21 @@ int main(int argc, char *argv[])
setUpdatesDir();
logger->log("State: UPDATE");
- currentDialog = new UpdaterWindow(updateHost,
- homeDir + "/" + updatesDir);
+
+ if (options.skipUpdate) {
+ state = LOADDATA_STATE;
+ } else {
+ currentDialog = new UpdaterWindow(updateHost,
+ homeDir + "/" + updatesDir);
+ positionDialog(currentDialog, screenWidth,
+ screenHeight);
+ }
break;
case ERROR_STATE:
logger->log("State: ERROR");
currentDialog = new OkDialog("Error", errorMessage);
+ positionDialog(currentDialog, screenWidth, screenHeight);
currentDialog->addActionListener(&errorListener);
currentDialog = NULL; // OkDialog deletes itself
network->disconnect();
@@ -965,8 +1034,15 @@ int main(int argc, char *argv[])
break;
}
}
+ /*
+ * This loop can really stress the CPU, for no reason since it's
+ * just constantly redrawing the wallpaper. Added the following
+ * usleep to limit it to 20 FPS during the login sequence
+ */
+ usleep(50000);
}
+ delete textColour;
#ifdef PACKAGE_VERSION
delete versionLabel;
#endif
diff --git a/src/main.h b/src/main.h
index 3070804f..a0fe65cb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -30,8 +30,8 @@
#include "winver.h"
#endif
-#ifndef TMW_DATADIR
-#define TMW_DATADIR ""
+#ifndef AETHYRA_DATADIR
+#define AETHYRA_DATADIR ""
#endif
/*
diff --git a/src/map.cpp b/src/map.cpp
index 928a0154..02b046fb 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -19,22 +19,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "map.h"
-
-#include <algorithm>
#include <queue>
#include "beingmanager.h"
#include "configuration.h"
#include "game.h"
#include "graphics.h"
+#include "localplayer.h"
+#include "map.h"
#include "particle.h"
#include "sprite.h"
#include "tileset.h"
-#include "resources/resourcemanager.h"
#include "resources/ambientoverlay.h"
#include "resources/image.h"
+#include "resources/resourcemanager.h"
#include "utils/dtor.h"
#include "utils/tostring.h"
@@ -111,6 +110,7 @@ void MapLayer::draw(Graphics *graphics,
// If drawing the fringe layer, make sure all sprites above this row of
// tiles have been drawn
if (mIsFringeLayer) {
+ player_node->drawTargetCursor(graphics, scrollX, scrollY);
while (si != sprites.end() && (*si)->getPixelY() <= y * 32 - 32) {
(*si)->draw(graphics, -scrollX, -scrollY);
si++;
@@ -153,9 +153,9 @@ Map::~Map()
{
// delete metadata, layers, tilesets and overlays
delete[] mMetaTiles;
- for_each(mLayers.begin(), mLayers.end(), make_dtor(mLayers));
- for_each(mTilesets.begin(), mTilesets.end(), make_dtor(mTilesets));
- for_each(mOverlays.begin(), mOverlays.end(), make_dtor(mOverlays));
+ delete_all(mLayers);
+ delete_all(mTilesets);
+ delete_all(mOverlays);
}
void Map::initializeOverlays()
@@ -218,7 +218,8 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY)
mSprites.sort(spriteCompare);
Layers::const_iterator layeri = mLayers.begin();
- for (; layeri != mLayers.end(); ++layeri) {
+ for (; layeri != mLayers.end(); ++layeri)
+ {
(*layeri)->draw(graphics,
startX, startY, endX, endY,
scrollX, scrollY,
@@ -285,7 +286,7 @@ Tileset* Map::getTilesetWithGid(int gid) const
containsGid.gid = gid;
Tilesets::const_iterator i = find_if(mTilesets.begin(), mTilesets.end(),
- containsGid);
+ containsGid);
return (i == mTilesets.end()) ? NULL : *i;
}
@@ -294,7 +295,7 @@ void Map::setWalk(int x, int y, bool walkable)
{
mMetaTiles[x + y * mWidth].walkable = walkable;
}
-
+
bool Map::occupied(int x, int y) const
{
Beings &beings = beingManager->getAll();
@@ -312,7 +313,7 @@ bool Map::occupied(int x, int y) const
bool Map::tileCollides(int x, int y) const
{
- return !(contains(x, y) && mMetaTiles[x + y * mWidth].walkable);
+ return !(contains(x, y) && mMetaTiles[x + y * mWidth].walkable);
}
bool Map::contains(int x, int y) const
@@ -414,13 +415,6 @@ Path Map::findPath(int startX, int startY, int destX, int destY)
// 14 for moving diagonal (sqrt(200) = 14.1421...)
int Gcost = curr.tile->Gcost + ((dx == 0 || dy == 0) ? 10 : 14);
- // 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 > 200)
@@ -509,11 +503,14 @@ void Map::addParticleEffect(const std::string &effectFile, int x, int y)
void Map::initializeParticleEffects(Particle* particleEngine)
{
- for (std::list<ParticleEffectData>::iterator i = particleEffects.begin();
- i != particleEffects.end();
- i++
- )
+ if (config.getValue("particleeffects", 1))
{
- particleEngine->addEffect(i->file, i->x, i->y);
+ for (std::list<ParticleEffectData>::iterator i = particleEffects.begin();
+ i != particleEffects.end();
+ i++
+ )
+ {
+ particleEngine->addEffect(i->file, i->x, i->y);
+ }
}
}
diff --git a/src/monster.cpp b/src/monster.cpp
index 8666fe26..04624b8c 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -19,14 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "monster.h"
-
#include "animatedsprite.h"
#include "game.h"
-#include "sound.h"
+#include "localplayer.h"
+#include "monster.h"
#include "particle.h"
+#include "sound.h"
#include "text.h"
-#include "localplayer.h"
#include "gui/gui.h"
@@ -46,6 +45,7 @@ Monster::Monster(Uint32 id, Uint16 job, Map *map):
// Setup Monster sprites
int c = BASE_SPRITE;
const std::list<std::string> &sprites = info.getSprites();
+
for (std::list<std::string>::const_iterator i = sprites.begin();
i != sprites.end();
i++)
@@ -63,26 +63,28 @@ Monster::Monster(Uint32 id, Uint16 job, Map *map):
mSprites[c] = AnimatedSprite::load("graphics/sprites/error.xml");
}
- const std::list<std::string> &particleEffects = info.getParticleEffects();
- for ( std::list<std::string>::const_iterator i = particleEffects.begin();
- i != particleEffects.end();
- i++
- )
+ if (mParticleEffects)
{
- controlParticle(particleEngine->addEffect((*i), 0, 0));
+ const std::list<std::string> &particleEffects = info.getParticleEffects();
+ for ( std::list<std::string>::const_iterator i = particleEffects.begin();
+ i != particleEffects.end(); i++
+ )
+ {
+ controlParticle(particleEngine->addEffect((*i), 0, 0));
+ }
}
}
-Monster::~Monster()
+Monster::~Monster()
{
if (mText)
{
- player_node->setTarget(0);
+ delete mText;
+ player_node->setTarget(NULL);
}
}
-void
-Monster::logic()
+void Monster::logic()
{
if (mAction != STAND)
{
@@ -97,16 +99,16 @@ Monster::logic()
Being::logic();
}
-Being::Type
-Monster::getType() const
+Being::Type Monster::getType() const
{
return MONSTER;
}
-void
-Monster::setAction(Uint8 action)
+void Monster::setAction(Action action)
{
SpriteAction currentAction = ACTION_INVALID;
+ int rotation = 0;
+ std::string particleEffect;
switch (action)
{
@@ -120,13 +122,34 @@ Monster::setAction(Uint8 action)
case ATTACK:
currentAction = ACTION_ATTACK;
mSprites[BASE_SPRITE]->reset();
+
+ //attack particle effect
+ particleEffect = getInfo().getAttackParticleEffect();
+ if (particleEffect != "" && mParticleEffects)
+ {
+ switch (mDirection)
+ {
+ case DOWN: rotation = 0; break;
+ case LEFT: rotation = 90; break;
+ case UP: rotation = 180; break;
+ case RIGHT: rotation = 270; break;
+ default: break;
+ }
+ Particle *p;
+ p = particleEngine->addEffect(
+ particleEffect, 0, 0, rotation);
+ controlParticle(p);
+ }
break;
case STAND:
- currentAction = ACTION_STAND;
- break;
+ currentAction = ACTION_STAND;
+ break;
case HURT:
- // Not implemented yet
- break;
+ // Not implemented yet
+ break;
+ case SIT:
+ // Also not implemented yet
+ break;
}
if (currentAction != ACTION_INVALID)
@@ -142,8 +165,7 @@ Monster::setAction(Uint8 action)
}
}
-void
-Monster::handleAttack(Being *victim, int damage)
+void Monster::handleAttack(Being *victim, int damage)
{
Being::handleAttack(victim, damage);
@@ -152,34 +174,34 @@ Monster::handleAttack(Being *victim, int damage)
MONSTER_EVENT_HIT : MONSTER_EVENT_MISS));
}
-void
-Monster::takeDamage(int amount)
+void Monster::takeDamage(int amount)
{
if (amount > 0) sound.playSfx(getInfo().getSound(MONSTER_EVENT_HURT));
Being::takeDamage(amount);
}
-Being::TargetCursorSize
-Monster::getTargetCursorSize() const
+Being::TargetCursorSize Monster::getTargetCursorSize() const
{
return getInfo().getTargetCursorSize();
}
-const MonsterInfo&
-Monster::getInfo() const
+const MonsterInfo& Monster::getInfo() const
{
return MonsterDB::get(mJob - 1002);
}
void Monster::showName(bool show)
{
- delete mText;
+ if (mText)
+ {
+ delete mText;
+ }
if (show)
{
mText = new Text(getInfo().getName(), mPx + NAME_X_OFFSET,
mPy + NAME_Y_OFFSET - getHeight(),
gcn::Graphics::CENTER,
- speechFont, gcn::Color(255, 32, 32));
+ mobNameFont, gcn::Color(255, 32, 32));
}
else
{
diff --git a/src/monster.h b/src/monster.h
index c8f0a8f7..cb8f7f18 100644
--- a/src/monster.h
+++ b/src/monster.h
@@ -36,7 +36,7 @@ class Monster : public Being
virtual void logic();
- virtual void setAction(Uint8 action);
+ virtual void setAction(Action action);
virtual Type getType() const;
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index 086b4280..3c022af6 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -19,24 +19,24 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "beinghandler.h"
-
+#include <iostream>
#include <SDL_types.h>
+#include "beinghandler.h"
#include "messagein.h"
#include "protocol.h"
#include "../being.h"
#include "../beingmanager.h"
+#include "../effectmanager.h"
#include "../game.h"
#include "../localplayer.h"
#include "../log.h"
#include "../main.h"
+#include "../npc.h"
#include "../particle.h"
-#include "../sound.h"
-#include <iostream>
#include "../player_relations.h"
-#include "../npc.h"
+#include "../sound.h"
const int EMOTION_TIME = 150; /**< Duration of emotion icon */
@@ -72,6 +72,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
Uint16 headTop, headMid, headBottom;
Uint16 shoes, gloves, cape, misc1, misc2;
Uint16 weapon, shield;
+ Uint16 gmstatus;
Sint16 param1;
Sint8 type;
Being *srcBeing, *dstBeing;
@@ -128,8 +129,8 @@ void BeingHandler::handleMessage(MessageIn *msg)
headTop = msg->readInt16();
headMid = msg->readInt16();
hairColor = msg->readInt16();
- shoes = msg->readInt16(); // clothes color - "abused" as shoes
- gloves = msg->readInt16(); // head dir - "abused" as gloves
+ shoes = msg->readInt16();
+ gloves = msg->readInt16();
msg->readInt16(); // guild
msg->readInt16(); // unknown
msg->readInt16(); // unknown
@@ -201,22 +202,17 @@ void BeingHandler::handleMessage(MessageIn *msg)
if (!dstBeing)
break;
+ // If this is player's current target, clear it.
if (dstBeing == player_node->getTarget())
- {
player_node->stopAttack();
- }
if (dstBeing == current_npc)
current_npc = NULL;
if (msg->readInt8() == 1)
- {
dstBeing->setAction(Being::DEAD);
- }
else
- {
beingManager->destroyBeing(dstBeing);
- }
break;
@@ -234,28 +230,26 @@ void BeingHandler::handleMessage(MessageIn *msg)
switch (type)
{
case 0x0a: // Critical Damage
- if (dstBeing) {
- dstBeing->controlParticle(particleEngine->addEffect(
- "graphics/particles/crit.particle.xml", 0, 0));
- }
+ if (dstBeing)
+ dstBeing->showCrit();
case 0x00: // Damage
- if (dstBeing) {
+ if (dstBeing)
dstBeing->takeDamage(param1);
- }
- if (srcBeing) {
+ if (srcBeing)
srcBeing->handleAttack(dstBeing, param1);
- }
break;
case 0x02: // Sit
- if (srcBeing) {
+ if (srcBeing)
+ {
srcBeing->mFrame = 0;
srcBeing->setAction(Being::SIT);
}
break;
case 0x03: // Stand up
- if (srcBeing) {
+ if (srcBeing)
+ {
srcBeing->mFrame = 0;
srcBeing->setAction(Being::STAND);
}
@@ -269,8 +263,10 @@ void BeingHandler::handleMessage(MessageIn *msg)
break;
int effectType = msg->readInt32();
+ Being* being = beingManager->findBeing(id);
- beingManager->findBeing(id)->triggerEffect(effectType);
+ effectManager->trigger(effectType, (int) being->getPixelX(),
+ (int) being->getPixelY());
break;
}
@@ -403,8 +399,8 @@ void BeingHandler::handleMessage(MessageIn *msg)
headTop = msg->readInt16();
headMid = msg->readInt16();
hairColor = msg->readInt16();
- msg->readInt16(); // clothes color - Aethyra-"abused" as shoes, we ignore it
- msg->readInt16(); // head dir - Aethyra-"abused" as gloves, we ignore it
+ shoes = msg->readInt16();
+ gloves = msg->readInt16();
msg->readInt32(); // guild
msg->readInt32(); // emblem
msg->readInt16(); // manner
@@ -417,6 +413,10 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->setSprite(Being::BOTTOMCLOTHES_SPRITE, headBottom);
dstBeing->setSprite(Being::TOPCLOTHES_SPRITE, headMid);
dstBeing->setSprite(Being::HAT_SPRITE, headTop);
+ dstBeing->setSprite(Being::SHOE_SPRITE, shoes);
+ // Compensation for the unpatched TMW server
+ if (gloves > 10)
+ dstBeing->setSprite(Being::GLOVES_SPRITE, gloves);
dstBeing->setSprite(Being::CAPE_SPRITE, cape);
dstBeing->setSprite(Being::MISC1_SPRITE, misc1);
dstBeing->setSprite(Being::MISC2_SPRITE, misc2);
@@ -437,18 +437,22 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->setDirection(dir);
}
- msg->readInt16(); // GM status
+ gmstatus = msg->readInt16();
+ if (gmstatus & 0x80)
+ dstBeing->setGM();
if (msg->getId() == SMSG_PLAYER_UPDATE_1)
{
- switch (msg->readInt8()) {
-
- case 1: dstBeing->setAction(Being::DEAD);
- break;
-
- case 2: dstBeing->setAction(Being::SIT);
- break;
-
+ switch (msg->readInt8())
+ {
+ case 1:
+ if (dstBeing->getType() != Being::NPC)
+ dstBeing->setAction(Being::DEAD);
+ break;
+
+ case 2:
+ dstBeing->setAction(Being::SIT);
+ break;
}
}
else if (msg->getId() == SMSG_PLAYER_MOVE)
@@ -465,16 +469,16 @@ void BeingHandler::handleMessage(MessageIn *msg)
case SMSG_PLAYER_STOP:
/*
- * Instruction from server to stop walking at x, y.
- *
- * Some people like having this enabled. Others absolutely
- * despise it. So I'm setting to so that it only affects the
- * local player if the person has set a key "EnableSync" to "1"
- * in their config.xml file.
- *
- * This packet will be honored for all other beings, regardless
- * of the config setting.
- */
+ * Instruction from server to stop walking at x, y.
+ *
+ * Some people like having this enabled. Others absolutely
+ * despise it. So I'm setting to so that it only affects the
+ * local player if the person has set a key "EnableSync" to "1"
+ * in their config.xml file.
+ *
+ * This packet will be honored for all other beings, regardless
+ * of the config setting.
+ */
id = msg->readInt32();
if (mSync || id != player_node->getId()) {
@@ -492,11 +496,11 @@ void BeingHandler::handleMessage(MessageIn *msg)
case SMSG_PLAYER_MOVE_TO_ATTACK:
/*
- * This is an *advisory* message, telling the client that
- * it needs to move the character before attacking
- * a target (out of range, obstruction in line of fire).
- * We can safely ignore this...
- */
+ * This is an *advisory* message, telling the client that
+ * it needs to move the character before attacking
+ * a target (out of range, obstruction in line of fire).
+ * We can safely ignore this...
+ */
break;
case 0x0119:
diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h
index 5e22a670..9e736751 100644
--- a/src/net/beinghandler.h
+++ b/src/net/beinghandler.h
@@ -27,7 +27,7 @@
class BeingHandler : public MessageHandler
{
public:
- BeingHandler(bool);
+ BeingHandler(bool enableSync);
void handleMessage(MessageIn *msg);
diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp
index 16cfdc06..b2fe99b9 100644
--- a/src/net/buysellhandler.cpp
+++ b/src/net/buysellhandler.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "buysellhandler.h"
-
#include <SDL_types.h>
+#include "buysellhandler.h"
#include "messagein.h"
#include "protocol.h"
@@ -37,8 +36,8 @@
#include "../gui/sell.h"
extern BuyDialog *buyDialog;
-extern SellDialog *sellDialog;
extern Window *buySellDialog;
+extern SellDialog *sellDialog;
BuySellHandler::BuySellHandler()
{
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 9fb67ea5..281923f8 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -20,19 +20,24 @@
*/
#include "charserverhandler.h"
-
#include "messagein.h"
#include "network.h"
#include "protocol.h"
+#include "../extensions.h"
#include "../game.h"
#include "../localplayer.h"
#include "../log.h"
#include "../logindata.h"
#include "../main.h"
-#include "../gui/ok_dialog.h"
#include "../gui/char_select.h"
+#include "../gui/ok_dialog.h"
+
+/*
+ * Yeah, this is a global. Get over it.
+ */
+struct EXTENSIONS extensions;
CharServerHandler::CharServerHandler():
mCharCreateDialog(0)
@@ -54,6 +59,7 @@ CharServerHandler::CharServerHandler():
void CharServerHandler::handleMessage(MessageIn *msg)
{
int slot;
+ int flags;
LocalPlayer *tempPlayer;
logger->log("CharServerHandler: Packet ID: %x, Length: %d",
@@ -61,8 +67,13 @@ void CharServerHandler::handleMessage(MessageIn *msg)
switch (msg->getId())
{
case 0x006b:
- // Skip length word and an additional mysterious 20 bytes
- msg->skip(2 + 20);
+ msg->skip(2); // Length word
+ flags = msg->readInt32(); // Aethyra extensions flags
+ logger->log("Server flags are: %x", flags);
+ extensions.aethyra_inventory = (bool)(flags & 0x01);
+ extensions.aethyra_spells = (bool)(flags & 0x02);
+ extensions.aethyra_misc = (bool)(flags & 0x04);
+ msg->skip(16); // Unused
// Derive number of characters from message length
n_character = (msg->getLength() - 24) / 106;
diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp
index d852798d..b73b86b4 100644
--- a/src/net/chathandler.cpp
+++ b/src/net/chathandler.cpp
@@ -19,11 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "chathandler.h"
-
#include <SDL_types.h>
#include <string>
+#include "chathandler.h"
#include "messagein.h"
#include "protocol.h"
diff --git a/src/net/equipmenthandler.cpp b/src/net/equipmenthandler.cpp
index 580cef6b..2e0cc562 100644
--- a/src/net/equipmenthandler.cpp
+++ b/src/net/equipmenthandler.cpp
@@ -20,7 +20,6 @@
*/
#include "equipmenthandler.h"
-
#include "messagein.h"
#include "protocol.h"
@@ -107,7 +106,10 @@ void EquipmentHandler::handleMessage(MessageIn *msg)
break;
}
- // Unequip any existing equipped item in this position
+ /*
+ * An item may occupy more than 1 slot. If so, it's
+ * only shown as equipped on the *first* slot.
+ */
mask = 1;
position = 0;
while (!(equipPoint & mask)) {
@@ -115,7 +117,10 @@ void EquipmentHandler::handleMessage(MessageIn *msg)
position++;
}
logger->log("Position %i", position);
- item = player_node->getInventory()->getItem(player_node->mEquipment->getEquipment(position));
+
+ item = player_node->getInventory()->getItem(player_node->mEquipment->getEquipment(position));
+
+ // Unequip any existing equipped item in this position
if (item) {
item->setEquipped(false);
}
@@ -152,24 +157,11 @@ void EquipmentHandler::handleMessage(MessageIn *msg)
item->setEquipped(false);
- switch (item->getId()) {
- case 529:
- case 1199:
- player_node->mEquipment->setArrows(0);
- break;
- case 521:
- case 522:
- case 530:
- case 536:
- case 1200:
- case 1201:
- player_node->setSprite(Being::WEAPON_SPRITE, 0);
- // TODO: Why this break? Shouldn't a weapon be
- // unequipped in inventory too?
- break;
- default:
- player_node->mEquipment->removeEquipment(position);
- break;
+ if (equipPoint & 0x8000) { // Arrows
+ player_node->mEquipment->setArrows(0);
+ }
+ else {
+ player_node->mEquipment->removeEquipment(position);
}
logger->log("Unequipping: %i %i(%i) %i",
index, equipPoint, type, position);
@@ -186,12 +178,12 @@ void EquipmentHandler::handleMessage(MessageIn *msg)
break;
item = inventory->getItem(index);
- if (!item)
- break;
- item->setEquipped(true);
- player_node->mEquipment->setArrows(index);
- logger->log("Arrows equipped: %i", index);
+ if (item) {
+ item->setEquipped(true);
+ player_node->mEquipment->setArrows(index);
+ logger->log("Arrows equipped: %i", index);
+ }
break;
}
}
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp
index 9ddbd62f..12b7d5ef 100644
--- a/src/net/inventoryhandler.cpp
+++ b/src/net/inventoryhandler.cpp
@@ -19,22 +19,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "inventoryhandler.h"
-
#include <SDL_types.h>
+#include "inventoryhandler.h"
#include "messagein.h"
#include "protocol.h"
-#include "../resources/iteminfo.h"
+#include "../inventory.h"
#include "../item.h"
#include "../itemshortcut.h"
#include "../localplayer.h"
#include "../log.h"
-#include "../inventory.h"
#include "../gui/chat.h"
+#include "../resources/iteminfo.h"
+
#include "../utils/tostring.h"
InventoryHandler::InventoryHandler()
@@ -45,6 +45,12 @@ InventoryHandler::InventoryHandler()
SMSG_PLAYER_INVENTORY_REMOVE,
SMSG_PLAYER_INVENTORY_USE,
SMSG_ITEM_USE_RESPONSE,
+ SMSG_PLAYER_STORAGE_ITEMS,
+ SMSG_PLAYER_STORAGE_EQUIP,
+ SMSG_PLAYER_STORAGE_STATUS,
+ SMSG_PLAYER_STORAGE_ADD,
+ SMSG_PLAYER_STORAGE_REMOVE,
+ SMSG_PLAYER_STORAGE_CLOSE,
0
};
handledMessages = _messages;
@@ -53,35 +59,69 @@ InventoryHandler::InventoryHandler()
void InventoryHandler::handleMessage(MessageIn *msg)
{
Sint32 number;
- Sint16 index, amount, itemId, equipType;
+ Sint16 index, amount, itemId, equipType, arrow;
+ Sint16 identified, cards[4], itemType;
Inventory *inventory = player_node->getInventory();
+ Inventory *storage = player_node->getStorage();
switch (msg->getId())
{
case SMSG_PLAYER_INVENTORY:
- // Only called on map load / warp. First reset all items
- // to not load them twice on map change.
- inventory->clear();
+ case SMSG_PLAYER_STORAGE_ITEMS:
+ case SMSG_PLAYER_STORAGE_EQUIP:
+ switch (msg->getId()) {
+ case SMSG_PLAYER_INVENTORY:
+ // Clear inventory - this will be a complete refresh
+ inventory->clear();
+ break;
+ case SMSG_PLAYER_STORAGE_ITEMS:
+ /*
+ * This packet will always be followed by a
+ * SMSG_PLAYER_STORAGE_EQUIP packet. The two packets
+ * together comprise a complete refresh of storage, so
+ * clear storage here
+ */
+ storage->clear();
+ logger->log("Received SMSG_PLAYER_STORAGE_ITEMS");
+ break;
+ default:
+ logger->log("Received SMSG_PLAYER_STORAGE_EQUIP");
+ break;
+ }
msg->readInt16(); // length
number = (msg->getLength() - 4) / 18;
- for (int loop = 0; loop < number; loop++)
- {
+ for (int loop = 0; loop < number; loop++) {
index = msg->readInt16();
itemId = msg->readInt16();
- msg->readInt8(); // type
- msg->readInt8(); // identify flag
- amount = msg->readInt16();
- msg->skip(2); // unknown
- msg->skip(8); // card (4 shorts)
-
- inventory->setItem(index, itemId, amount, false);
-
- // Trick because arrows are not considered equipment
- if (itemId == 1199 || itemId == 529)
- {
- if (Item *item = inventory->getItem(index))
- item->setEquipment(true);
+ itemType = msg->readInt8();
+ identified = msg->readInt8();
+ if (msg->getId() == SMSG_PLAYER_STORAGE_EQUIP) {
+ amount = 1;
+ msg->readInt16(); // Equip Point?
+ } else {
+ amount = msg->readInt16();
+ }
+ arrow = msg->readInt16();
+ if (msg->getId() == SMSG_PLAYER_STORAGE_EQUIP) {
+ msg->readInt8(); // Attribute (broken)
+ msg->readInt8(); // Refine level
+ }
+ for (int i = 0; i < 4; i++)
+ cards[i] = msg->readInt16();
+
+ if (msg->getId() == SMSG_PLAYER_INVENTORY) {
+ inventory->setItem(index, itemId, amount, false);
+
+ // Trick because arrows are not considered equipment
+ if (arrow & 0x8000) {
+ if (Item *item = inventory->getItem(index))
+ item->setEquipment(true);
+ }
+ } else {
+ logger->log("Index:%d, ID:%d, Type:%d, Identified:%d, Qty:%d, Cards:%d, %d, %d, %d",
+ index, itemId, itemType, identified, amount, cards[0], cards[1], cards[2], cards[3]);
+ storage->setItem(index, itemId, amount, false);
}
}
break;
@@ -90,12 +130,13 @@ void InventoryHandler::handleMessage(MessageIn *msg)
index = msg->readInt16();
amount = msg->readInt16();
itemId = msg->readInt16();
- msg->readInt8(); // identify flag
+ identified = msg->readInt8();
msg->readInt8(); // attribute
msg->readInt8(); // refine
- msg->skip(8); // card
+ for (int i = 0; i < 4; i++)
+ cards[i] = msg->readInt16();
equipType = msg->readInt16();
- msg->readInt8(); // type
+ itemType = msg->readInt8();
if (msg->readInt8() > 0) {
chatWindow->chatLog("Unable to pick up item", BY_SERVER);
@@ -147,5 +188,38 @@ void InventoryHandler::handleMessage(MessageIn *msg)
item->setQuantity(amount);
}
break;
+
+ case SMSG_PLAYER_STORAGE_STATUS:
+ /*
+ * Basic slots used vs total slots info
+ * We don't really need this information, but this is
+ * the closest we get to an "Open Storage" packet
+ * from the server. It always comes after the two
+ * SMSG_PLAYER_STORAGE_... packets that update
+ * storage contents.
+ */
+ logger->log("Received SMSG_PLAYER_STORAGE_STATUS");
+ player_node->setInStorage(true);
+ break;
+
+ case SMSG_PLAYER_STORAGE_ADD:
+ /*
+ * Move an item into storage
+ */
+ break;
+
+ case SMSG_PLAYER_STORAGE_REMOVE:
+ /*
+ * Move an item out of storage
+ */
+ break;
+
+ case SMSG_PLAYER_STORAGE_CLOSE:
+ /*
+ * Storage access has been closed
+ */
+ player_node->setInStorage(false);
+ logger->log("Received SMSG_PLAYER_STORAGE_CLOSE");
+ break;
}
}
diff --git a/src/net/itemhandler.cpp b/src/net/itemhandler.cpp
index 487b98bf..9cf85ce7 100644
--- a/src/net/itemhandler.cpp
+++ b/src/net/itemhandler.cpp
@@ -20,7 +20,6 @@
*/
#include "itemhandler.h"
-
#include "messagein.h"
#include "protocol.h"
diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp
index 169503da..2b98e4e4 100644
--- a/src/net/loginhandler.cpp
+++ b/src/net/loginhandler.cpp
@@ -20,7 +20,6 @@
*/
#include "loginhandler.h"
-
#include "messagein.h"
#include "network.h"
#include "protocol.h"
@@ -35,7 +34,7 @@ extern SERVER_INFO **server_info;
LoginHandler::LoginHandler()
{
static const Uint16 _messages[] = {
- SMSG_UPDATE_HOST,
+ 0x0063,
0x0069,
0x006a,
0
@@ -87,7 +86,7 @@ void LoginHandler::handleMessage(MessageIn *msg)
iptostring(server_info[i]->address),
server_info[i]->port);
}
- state = CHAR_SERVER_STATE;
+ state = CHAR_SERVER_STATE;
break;
case 0x006a:
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index 8a952cd5..047434b4 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -22,6 +22,8 @@
#ifndef _TMW_NET_LOGINHANDLER_H
#define _TMW_NET_LOGINHANDLER_H
+#include <string>
+
#include "messagehandler.h"
#include <string>
diff --git a/src/net/maploginhandler.cpp b/src/net/maploginhandler.cpp
index b1000c12..bc08d5d6 100644
--- a/src/net/maploginhandler.cpp
+++ b/src/net/maploginhandler.cpp
@@ -20,7 +20,6 @@
*/
#include "maploginhandler.h"
-
#include "messagein.h"
#include "protocol.h"
diff --git a/src/net/messagehandler.cpp b/src/net/messagehandler.cpp
index 29e34a29..7a41e1ad 100644
--- a/src/net/messagehandler.cpp
+++ b/src/net/messagehandler.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "messagehandler.h"
-
#include <cassert>
+#include "messagehandler.h"
#include "network.h"
MessageHandler::MessageHandler():
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 8e31fded..345e02fc 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -19,17 +19,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "messagein.h"
-
#include <cassert>
#include <SDL.h>
#include <SDL_endian.h>
+#include "messagein.h"
+
#define MAKEWORD(low,high) \
((unsigned short)(((unsigned char)(low)) | \
((unsigned short)((unsigned char)(high))) << 8))
-
MessageIn::MessageIn(const char *data, unsigned int length):
mData(data),
mLength(length),
diff --git a/src/net/messagein.h b/src/net/messagein.h
index da80df9e..81db6cdc 100644
--- a/src/net/messagein.h
+++ b/src/net/messagein.h
@@ -22,8 +22,8 @@
#ifndef _TMW_MESSAGEIN_
#define _TMW_MESSAGEIN_
-#include <string>
#include <SDL_types.h>
+#include <string>
/**
* Used for parsing an incoming message.
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index 96678f19..6aa25411 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -20,13 +20,12 @@
*/
#include <cstring>
-#include <string>
#include <SDL.h>
#include <SDL_endian.h>
-
-#include "network.h"
+#include <string>
#include "messageout.h"
+#include "network.h"
MessageOut::MessageOut(Network *network):
mNetwork(network),
diff --git a/src/net/network.cpp b/src/net/network.cpp
index e8b5e949..c9f8d1bd 100644
--- a/src/net/network.cpp
+++ b/src/net/network.cpp
@@ -19,15 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "network.h"
+#include <sstream>
#include "messagehandler.h"
#include "messagein.h"
+#include "network.h"
#include "../log.h"
-#include <sstream>
-
/** Warning: buffers and other variables are shared,
so there can be only one connection active at a time */
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index b633835c..4f3c4354 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -19,16 +19,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "npchandler.h"
-
#include "messagein.h"
+#include "npchandler.h"
#include "protocol.h"
#include "../beingmanager.h"
+#include "../localplayer.h"
#include "../npc.h"
-#include "../gui/npclistdialog.h"
#include "../gui/npc_text.h"
+#include "../gui/npclistdialog.h"
extern NpcListDialog *npcListDialog;
extern NpcTextDialog *npcTextDialog;
@@ -54,6 +54,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
case SMSG_NPC_CHOICE:
msg->readInt16(); // length
id = msg->readInt32();
+ player_node->setAction(LocalPlayer::STAND);
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcListDialog->parseItems(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(true);
@@ -62,15 +63,15 @@ void NPCHandler::handleMessage(MessageIn *msg)
case SMSG_NPC_MESSAGE:
msg->readInt16(); // length
id = msg->readInt32();
+ player_node->setAction(LocalPlayer::STAND);
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcTextDialog->addText(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);
break;
- case SMSG_NPC_CLOSE:
+ case SMSG_NPC_CLOSE:
id = msg->readInt32();
- dynamic_cast<NPC*>(beingManager->findBeing(id));
if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id)))
current_npc = NULL;
break;
diff --git a/src/net/partyhandler.cpp b/src/net/partyhandler.cpp
new file mode 100644
index 00000000..9b5f3080
--- /dev/null
+++ b/src/net/partyhandler.cpp
@@ -0,0 +1,124 @@
+/*
+ * 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
+ */
+
+#include <guichan/actionlistener.hpp>
+
+#include "partyhandler.h"
+#include "protocol.h"
+#include "messagein.h"
+
+#include "../gui/chat.h"
+#include "../gui/confirm_dialog.h"
+
+#include "../beingmanager.h"
+#include "../game.h"
+#include "../party.h"
+
+PartyHandler::PartyHandler(Party *party) : mParty(party)
+{
+ static const Uint16 _messages[] = {
+ SMSG_PARTY_CREATE,
+ SMSG_PARTY_INFO,
+ SMSG_PARTY_INVITE,
+ SMSG_PARTY_INVITED,
+ SMSG_PARTY_SETTINGS,
+ SMSG_PARTY_MEMBER_INFO,
+ SMSG_PARTY_LEAVE,
+ SMSG_PARTY_UPDATE_HP,
+ SMSG_PARTY_UPDATE_COORDS,
+ SMSG_PARTY_MESSAGE,
+ 0
+ };
+ handledMessages = _messages;
+}
+
+void
+PartyHandler::handleMessage(MessageIn *msg)
+{
+ switch (msg->getId())
+ {
+ case SMSG_PARTY_CREATE:
+ mParty->createResponse(msg->readInt8());
+ break;
+ case SMSG_PARTY_INFO:
+ break;
+ case SMSG_PARTY_INVITE:
+ {
+ std::string nick = msg->readString(24);
+ int status = msg->readInt8();
+ mParty->inviteResponse(nick, status);
+ break;
+ }
+ case SMSG_PARTY_INVITED:
+ {
+ int id = msg->readInt32();
+ Being *being = beingManager->findBeing(id);
+ if (being == NULL)
+ {
+ break;
+ }
+ std::string nick;
+ int gender = 0;
+ std::string partyName = "";
+ if (being->getType() != Being::PLAYER)
+ {
+ nick = "";
+ }
+ else
+ {
+ nick = being->getName();
+ gender = being->getGender();
+ partyName = msg->readString(24);
+ }
+ mParty->invitedAsk(nick, gender, partyName);
+ break;
+ }
+ case SMSG_PARTY_SETTINGS:
+ break;
+ case SMSG_PARTY_MEMBER_INFO:
+ break;
+ case SMSG_PARTY_LEAVE:
+ {
+ /*int id = */msg->readInt32();
+ std::string nick = msg->readString(24);
+ /*int fail = */msg->readInt8();
+ mParty->leftResponse(nick);
+ break;
+ }
+ case SMSG_PARTY_UPDATE_HP:
+ break;
+ case SMSG_PARTY_UPDATE_COORDS:
+ break;
+ case SMSG_PARTY_MESSAGE:
+ { // new block to enable local variables
+ int msgLength = msg->readInt16() - 8;
+ if (msgLength <= 0)
+ {
+ return;
+ }
+ int id = msg->readInt32();
+ Being *being = beingManager->findBeing(id);
+ std::string chatMsg = msg->readString(msgLength);
+ mParty->receiveChat(being, chatMsg);
+ }
+ break;
+ }
+}
diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h
new file mode 100644
index 00000000..daabc52f
--- /dev/null
+++ b/src/net/partyhandler.h
@@ -0,0 +1,39 @@
+/*
+ * 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
+ */
+
+#ifndef _TMW_NET_PARTYHANDLER_H
+#define _TMW_NET_PARTYHANDLER_H
+
+#include "messagehandler.h"
+
+class Party;
+
+class PartyHandler : public MessageHandler
+{
+ public:
+ PartyHandler(Party *party);
+
+ void handleMessage(MessageIn *msg);
+ private:
+ Party *mParty;
+};
+
+#endif
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp
index 50546b1e..a4a2dcc9 100644
--- a/src/net/playerhandler.cpp
+++ b/src/net/playerhandler.cpp
@@ -19,16 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "playerhandler.h"
-
#include "messagein.h"
+#include "playerhandler.h"
#include "protocol.h"
#include "../engine.h"
#include "../localplayer.h"
#include "../log.h"
#include "../npc.h"
-#include "../utils/tostring.h"
#include "../gui/buy.h"
#include "../gui/chat.h"
@@ -40,6 +38,8 @@
#include "../gui/skill.h"
#include "../gui/viewport.h"
+#include "../utils/tostring.h"
+
// TODO Move somewhere else
OkDialog *weightNotice = NULL;
OkDialog *deathNotice = NULL;
@@ -51,7 +51,7 @@ extern SellDialog *sellDialog;
extern Window *buySellDialog;
static const int MAP_TELEPORT_SCROLL_DISTANCE = 8; /* Max. distance we are willing to scroll after a teleport;
- ** everything beyond will reset the port hard. */
+ * everything beyond will reset the port hard. */
/**
* Listener used for handling the overweigth message.
@@ -110,10 +110,11 @@ void PlayerHandler::handleMessage(MessageIn *msg)
switch (msg->getId())
{
case SMSG_WALK_RESPONSE:
- // It is assumed by the client any request to walk actually
- // succeeds on the server. The plan is to have a correction
- // message when the server senses the client has the wrong
- // idea.
+ /*
+ * This client assumes that all walk messages succeed,
+ * and that the server will send a correction notice
+ * otherwise.
+ */
break;
case SMSG_PLAYER_WARP:
@@ -132,6 +133,7 @@ void PlayerHandler::handleMessage(MessageIn *msg)
player_node->stopAttack();
nearby = (engine->getCurrentMapName() == mapPath);
+
// Switch the actual map, deleting the previous one if necessary
engine->changeMap(mapPath);
@@ -143,7 +145,8 @@ void PlayerHandler::handleMessage(MessageIn *msg)
/* Scroll if neccessary */
if (!nearby
|| (abs(x - player_node->mX) > MAP_TELEPORT_SCROLL_DISTANCE)
- || (abs(y - player_node->mY) > MAP_TELEPORT_SCROLL_DISTANCE)) {
+ || (abs(y - player_node->mY) > MAP_TELEPORT_SCROLL_DISTANCE))
+ {
scrollOffsetX = (x - player_node->mX) * 32;
scrollOffsetY = (y - player_node->mY) * 32;
}
@@ -173,6 +176,9 @@ void PlayerHandler::handleMessage(MessageIn *msg)
case 0x0006: player_node->mMaxHp = value; break;
case 0x0007: player_node->mMp = value; break;
case 0x0008: player_node->mMaxMp = value; break;
+ case 0x0009:
+ player_node->mStatsPointsToAttribute = value;
+ break;
case 0x000b: player_node->mLevel = value; break;
case 0x000c:
player_node->mSkillPoint = value;
@@ -193,10 +199,6 @@ void PlayerHandler::handleMessage(MessageIn *msg)
player_node->mTotalWeight = value;
break;
case 0x0019: player_node->mMaxWeight = value; break;
- case 0x0037: player_node->mJobLevel = value; break;
- case 0x0009:
- player_node->mStatsPointsToAttribute = value;
- break;
case 0x0029: player_node->ATK = value; break;
case 0x002b: player_node->MATK = value; break;
case 0x002d: player_node->DEF = value; break;
@@ -205,12 +207,44 @@ void PlayerHandler::handleMessage(MessageIn *msg)
case 0x0031: player_node->HIT = value; break;
case 0x0032: player_node->FLEE = value; break;
case 0x0035: player_node->mAttackSpeed = value; break;
+ case 0x0037: player_node->mJobLevel = value; break;
}
if (player_node->mHp == 0 && deathNotice == NULL)
{
- deathNotice = new OkDialog("Message",
- "You're now dead, press ok to restart");
+ static char const *const deadMsg[] =
+ {
+ "You are dead.",
+ "We regret to inform you that your character was killed in battle.",
+ "You are not that alive anymore.",
+ "The cold hands of the grim reaper are grabbing for your soul.",
+ "Game Over!",
+ "Insert coin to continue",
+ "No, kids. Your character did not really die. It... err... went to a better place.",
+ "Your plan of breaking your enemies weapon by bashing it with your throat failed.",
+ "I guess this did not run too well.",
+ "Do you want your possessions identified?", // Nethack reference
+ "Sadly, no trace of you was ever found...", // Secret of Mana reference
+ "Annihilated.", // Final Fantasy VI reference
+ "Looks like you got your head handed to you.", //Earthbound reference
+ "You screwed up again, dump your body down the tubes and get you another one.", // Leisure Suit Larry 1 Reference
+ "You're not dead yet. You're just resting.", // Monty Python reference from a couple of skits
+ "You are no more.", // Monty Python reference from the dead parrot sketch starting now
+ "You have ceased to be.",
+ "You've expired and gone to meet your maker.",
+ "You're a stiff.",
+ "Bereft of life, you rest in peace.",
+ "If you weren't so animated, you'd be pushing up the daisies.",
+ "Your metabolic processes are now history.",
+ "You're off the twig.",
+ "You've kicked the bucket.",
+ "You've shuffled off your mortal coil, run down the curtain and joined the bleedin' choir invisibile.",
+ "You are an ex-player.",
+ "You're pining for the fjords." // Monty Python reference from the dead parrot sketch
+ };
+ std::string message(deadMsg[rand()%27]);
+
+ deathNotice = new OkDialog("Message", message);
deathNotice->addActionListener(&deathListener);
player_node->setAction(Being::DEAD);
}
@@ -293,7 +327,7 @@ void PlayerHandler::handleMessage(MessageIn *msg)
}
break;
- // Updates stats and status points
+ // Updates stats and status points
case SMSG_PLAYER_STAT_UPDATE_5:
player_node->mStatsPointsToAttribute = msg->readInt16();
player_node->mAttr[LocalPlayer::STR] = msg->readInt8();
@@ -361,18 +395,5 @@ void PlayerHandler::handleMessage(MessageIn *msg)
}
}
break;
-
- //Stop walking
- //case 0x0088: // Disabled because giving some problems
- //if (being = beingManager->findBeing(readInt32(2))) {
- // if (being->getId() != player_node->getId()) {
- // being->action = STAND;
- // being->mFrame = 0;
- // set_coordinates(being->coordinates,
- // readWord(6), readWord(8),
- // get_direction(being->coordinates));
- // }
- //}
- //break;
}
}
diff --git a/src/net/protocol.h b/src/net/protocol.h
index d7bdd041..783283ba 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -22,8 +22,11 @@
#ifndef _TMW_PROTOCOL_
#define _TMW_PROTOCOL_
-// Packets from server to client
+/*********************************
+ * Packets from server to client *
+ *********************************/
#define SMSG_LOGIN_SUCCESS 0x0073 /**< Contains starting location */
+#define SMSG_SERVER_PING 0x007f /**< Contains server tick */
#define SMSG_UPDATE_HOST 0x0063 /**< Custom update host packet */
#define SMSG_PLAYER_UPDATE_1 0x01d8
#define SMSG_PLAYER_UPDATE_2 0x01d9
@@ -66,6 +69,7 @@
#define SMSG_BEING_ACTION 0x008a /**< Attack, sit, stand up, ... */
#define SMSG_BEING_CHAT 0x008d /**< A being talks */
#define SMSG_BEING_NAME_RESPONSE 0x0095 /**< Has to be requested */
+
#define SMSG_NPC_MESSAGE 0x00b4
#define SMSG_NPC_NEXT 0x00b5
#define SMSG_NPC_CLOSE 0x00b6
@@ -75,11 +79,13 @@
#define SMSG_NPC_SELL 0x00c7
#define SMSG_NPC_BUY_RESPONSE 0x00ca
#define SMSG_NPC_SELL_RESPONSE 0x00cb
+
#define SMSG_PLAYER_CHAT 0x008e /**< Player talks */
#define SMSG_WHISPER 0x0097 /**< Whisper Recieved */
#define SMSG_WHISPER_RESPONSE 0x0098
#define SMSG_GM_CHAT 0x009a /**< GM announce */
#define SMSG_WALK_RESPONSE 0x0087
+
#define SMSG_TRADE_REQUEST 0x00e5 /**< Receiving a request to trade */
#define SMSG_TRADE_RESPONSE 0x00e7
#define SMSG_TRADE_ITEM_ADD 0x00e9
@@ -88,7 +94,27 @@
#define SMSG_TRADE_CANCEL 0x00ee
#define SMSG_TRADE_COMPLETE 0x00f0
-// Packets from client to server
+#define SMSG_PARTY_CREATE 0x00fa
+#define SMSG_PARTY_INFO 0x00fb
+#define SMSG_PARTY_INVITE 0x00fd
+#define SMSG_PARTY_INVITED 0x00fe
+#define SMSG_PARTY_SETTINGS 0x0102
+#define SMSG_PARTY_MEMBER_INFO 0x0104
+#define SMSG_PARTY_LEAVE 0x0105
+#define SMSG_PARTY_UPDATE_HP 0x0106
+#define SMSG_PARTY_UPDATE_COORDS 0x0107
+#define SMSG_PARTY_MESSAGE 0x0109
+
+#define SMSG_PLAYER_STORAGE_ITEMS 0x01f0 /**< Item list for storage */
+#define SMSG_PLAYER_STORAGE_EQUIP 0x00a6 /**< Equipment list for storage */
+#define SMSG_PLAYER_STORAGE_STATUS 0x00f2 /**< Slots used and total slots */
+#define SMSG_PLAYER_STORAGE_ADD 0x00f4 /**< Add item/equip to storage */
+#define SMSG_PLAYER_STORAGE_REMOVE 0x00f6 /**< Remove item/equip from storage */
+#define SMSG_PLAYER_STORAGE_CLOSE 0x00f8 /**< Storage access closed */
+
+/**********************************
+ * Packets from client to server *
+ **********************************/
#define CMSG_CLIENT_PING 0x007e /**< Send to server with tick */
#define CMSG_TRADE_RESPONSE 0x00e6
#define CMSG_ITEM_PICKUP 0x009f
@@ -97,6 +123,8 @@
#define CMSG_NPC_BUY_SELL_REQUEST 0x00c5
#define CMSG_CHAT_MESSAGE 0x008c
#define CMSG_CHAT_WHISPER 0x0096
+#define CMSG_CHAT_ANNOUNCE 0x0099
+#define CMSG_CHAT_WHO 0x00c1
#define CMSG_NPC_LIST_CHOICE 0x00b8
#define CMSG_NPC_NEXT_REQUEST 0x00b9
#define CMSG_NPC_SELL_REQUEST 0x00c9
@@ -113,6 +141,17 @@
#define CMSG_PLAYER_EQUIP 0x00a9
#define CMSG_PLAYER_UNEQUIP 0x00ab
+#define CMSG_PARTY_CREATE 0x00f9
+#define CMSG_PARTY_INVITE 0x00fc
+#define CMSG_PARTY_INVITED 0x00ff
+#define CMSG_PARTY_LEAVE 0x0100 /** Undocumented */
+#define CMSG_PARTY_SETTINGS 0x0101
+#define CMSG_PARTY_MESSAGE 0x0108
+
+#define CMSG_MOVE_TO_STORAGE 0x00f3 /** Move item to storage */
+#define CSMG_MOVE_FROM_STORAGE 0x00f5 /** Remove item from storage */
+#define CMSG_CLOSE_STORAGE 0x00f7 /** Request storage close */
+
/** Encodes coords and direction in 3 bytes data */
void set_coordinates(char *data, unsigned short x, unsigned short y, unsigned char direction);
diff --git a/src/net/skillhandler.cpp b/src/net/skillhandler.cpp
index 2bb5d9dc..b9a232fb 100644
--- a/src/net/skillhandler.cpp
+++ b/src/net/skillhandler.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "skillhandler.h"
-
#include "messagein.h"
#include "protocol.h"
+#include "skillhandler.h"
#include "../log.h"
diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp
index 955aeff1..746e1d06 100644
--- a/src/net/tradehandler.cpp
+++ b/src/net/tradehandler.cpp
@@ -19,10 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "tradehandler.h"
-
#include "messagein.h"
#include "protocol.h"
+#include "tradehandler.h"
#include "../inventory.h"
#include "../item.h"
@@ -188,11 +187,11 @@ void TradeHandler::handleMessage(MessageIn *msg)
BY_SERVER);
break;
case 2:
- // Add item failed - player has no free slot
- chatWindow->chatLog("Failed adding item. Trade "
- "partner has no free slot.",
- BY_SERVER);
- break;
+ // Add item failed - player has no free slot
+ chatWindow->chatLog("Failed adding item. Trade "
+ "partner has no free slot.",
+ BY_SERVER);
+ break;
default:
chatWindow->chatLog("Failed adding item for "
"unknown reason.", BY_SERVER);
diff --git a/src/npc.cpp b/src/npc.cpp
index 66048005..8dbbf83c 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -19,15 +19,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "npc.h"
-
#include "animatedsprite.h"
#include "graphics.h"
+#include "localplayer.h"
+#include "npc.h"
#include "particle.h"
#include "text.h"
#include "net/messageout.h"
#include "net/protocol.h"
+
#include "resources/npcdb.h"
#include "gui/gui.h"
@@ -38,7 +39,7 @@ static const int NAME_X_OFFSET = 15;
static const int NAME_Y_OFFSET = 30;
NPC::NPC(Uint32 id, Uint16 job, Map *map, Network *network):
- Being(id, job, map), mNetwork(network)
+ Player(id, job, map), mNetwork(network)
{
NPCInfo info = NPCDB::get(job);
@@ -56,28 +57,52 @@ NPC::NPC(Uint32 id, Uint16 job, Map *map, Network *network):
c++;
}
- // Setup particle effects
- for (std::list<std::string>::const_iterator i = info.particles.begin();
- i != info.particles.end();
- i++)
+ if (mParticleEffects)
{
- Particle *p = particleEngine->addEffect(*i, 0, 0);
- this->controlParticle(p);
+ //setup particle effects
+ for (std::list<std::string>::const_iterator i = info.particles.begin();
+ i != info.particles.end();
+ i++)
+ {
+ Particle *p = particleEngine->addEffect(*i, 0, 0);
+ this->controlParticle(p);
+ }
}
mName = 0;
}
NPC::~NPC()
{
- delete mName;
+ if (mName)
+ {
+ delete mName;
+ player_node->setTarget(NULL);
+ }
}
void NPC::setName(const std::string &name)
{
- delete mName;
- mName = new Text(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
- gcn::Graphics::CENTER, speechFont,
+ if (mName)
+ {
+ delete mName;
+ }
+ std::string displayName = name.substr(0, name.find('#', 0));
+
+ mName = new Text(displayName, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
+ gcn::Graphics::CENTER, npcNameFont,
gcn::Color(200, 200, 255));
+ Being::setName(displayName + " (NPC)");
+}
+
+void NPC::setGender(int gender)
+{
+ Being::setGender(gender);
+}
+
+void NPC::setSprite(int slot, int id, std::string color)
+{
+ // Fix this later should it not be adequate enough.
+ Being::setSprite(slot, id, color);
}
Being::Type
diff --git a/src/npc.h b/src/npc.h
index 5eb9036d..a37e8c66 100644
--- a/src/npc.h
+++ b/src/npc.h
@@ -22,13 +22,13 @@
#ifndef _TMW_NPC_H
#define _TMW_NPC_H
-#include "being.h"
+#include "player.h"
class Network;
class Graphics;
class Text;
-class NPC : public Being
+class NPC : public Player
{
public:
NPC(Uint32 id, Uint16 job, Map *map, Network *network);
@@ -36,6 +36,8 @@ class NPC : public Being
~NPC();
void setName(const std::string &name);
+ void setGender(int gender);
+ void setSprite(int slot, int id, std::string color);
virtual Type
getType() const;
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index d8d7a807..b3a8db4b 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -19,33 +19,32 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "main.h"
-
-#ifdef USE_OPENGL
+#include <cstring>
+#include <SDL.h>
-#ifndef GL_TEXTURE_RECTANGLE_ARB
-#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
-#endif
+#include <guichan/exception.hpp>
+#include <guichan/image.hpp>
+#include "log.h"
+#include "main.h"
#include "openglgraphics.h"
-#include <cstring>
-#include <SDL.h>
+#include "resources/image.h"
#ifdef __APPLE__
#include <OpenGL/OpenGL.h>
#endif
-#include <guichan/exception.hpp>
-#include <guichan/image.hpp>
-
-#include "log.h"
+#ifdef USE_OPENGL
-#include "resources/image.h"
+#ifndef GL_TEXTURE_RECTANGLE_ARB
+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#endif
OpenGLGraphics::OpenGLGraphics():
- mAlpha(false), mTexture(false), mColorAlpha(false)
+ mAlpha(false), mTexture(false), mColorAlpha(false),
+ mSync(false)
{
}
@@ -53,6 +52,11 @@ OpenGLGraphics::~OpenGLGraphics()
{
}
+void OpenGLGraphics::setSync(bool sync)
+{
+ mSync = sync;
+}
+
bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
{
logger->log("Setting video mode %dx%d %s",
@@ -76,6 +80,10 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
#ifdef __APPLE__
// long VBL = 1;
// CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &VBL);
+ if (mSync) {
+ const GLint VBL = 1;
+ CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &VBL);
+ }
#endif
// Setup OpenGL
diff --git a/src/openglgraphics.h b/src/openglgraphics.h
index 7d39e306..ea30e019 100644
--- a/src/openglgraphics.h
+++ b/src/openglgraphics.h
@@ -31,6 +31,13 @@ class OpenGLGraphics : public Graphics
~OpenGLGraphics();
+ /**
+ * Sets whether vertical refresh syncing is enabled. Takes effect after
+ * the next call to setVideoMode(). Only implemented on MacOS for now.
+ */
+ void setSync(bool sync);
+ bool getSync() const { return mSync; }
+
bool setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel);
bool drawImage(Image *image,
@@ -72,6 +79,7 @@ class OpenGLGraphics : public Graphics
private:
bool mAlpha, mTexture;
bool mColorAlpha;
+ bool mSync;
};
#endif
diff --git a/src/particle.cpp b/src/particle.cpp
index d4266df2..f1896ae2 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -22,13 +22,12 @@
#include <algorithm>
#include <cmath>
-#include "particle.h"
-
#include "animationparticle.h"
#include "configuration.h"
#include "imageparticle.h"
#include "log.h"
#include "map.h"
+#include "particle.h"
#include "particleemitter.h"
#include "textparticle.h"
@@ -224,7 +223,7 @@ Particle::update()
Particle*
Particle::addEffect(const std::string &particleEffectFile,
- int pixelX, int pixelY)
+ int pixelX, int pixelY, int rotation)
{
Particle *newParticle = NULL;
@@ -288,7 +287,7 @@ Particle::addEffect(const std::string &particleEffectFile,
continue;
ParticleEmitter *newEmitter;
- newEmitter = new ParticleEmitter(emitterNode, newParticle, mMap);
+ newEmitter = new ParticleEmitter(emitterNode, newParticle, mMap, rotation);
newParticle->addEmitter(newEmitter);
}
@@ -358,11 +357,9 @@ Particle::~Particle()
void
Particle::clear()
{
- std::for_each(mChildEmitters.begin(), mChildEmitters.end(),
- make_dtor(mChildEmitters));
+ delete_all(mChildEmitters);
mChildEmitters.clear();
- std::for_each(mChildParticles.begin(), mChildParticles.end(),
- make_dtor(mChildParticles));
+ delete_all(mChildParticles);
mChildParticles.clear();
}
diff --git a/src/particle.h b/src/particle.h
index 6c00eadd..0a53f5af 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -107,7 +107,7 @@ class Particle : public Sprite
*/
Particle*
addEffect(const std::string &particleEffectFile,
- int pixelX, int pixelY);
+ int pixelX, int pixelY, int rotation = 0);
/**
* Creates a standalone text particle.
@@ -316,7 +316,7 @@ class Particle : public Sprite
// follow-point particles
Particle *mTarget; /**< The particle that attracts this particle*/
- float mAcceleration; /**< Acceleration towards the target particle in pixels per game-tick²*/
+ float mAcceleration; /**< Acceleration towards the target particle in pixels per game-tick�*/
float mInvDieDistance; /**< Distance in pixels from the target particle that causes the destruction of the particle*/
float mMomentum; /**< How much speed the particle retains after each game tick*/
};
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 5ae1aae5..03fe4672 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -19,24 +19,23 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "particleemitter.h"
-
#include "animationparticle.h"
#include "imageparticle.h"
#include "log.h"
#include "particle.h"
+#include "particleemitter.h"
#include "resources/animation.h"
#include "resources/image.h"
-#include "resources/resourcemanager.h"
#include "resources/imageset.h"
+#include "resources/resourcemanager.h"
#include <cmath>
#define SIN45 0.707106781f
#define DEG_RAD_FACTOR 0.017453293f
-ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map):
+ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map, int rotation):
mOutputPauseLeft(0),
mParticleImage(0)
{
@@ -102,7 +101,9 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *
else if (name == "horizontal-angle")
{
mParticleAngleHorizontal = readParticleEmitterProp(propertyNode, 0.0f);
+ mParticleAngleHorizontal.minVal += rotation;
mParticleAngleHorizontal.minVal *= DEG_RAD_FACTOR;
+ mParticleAngleHorizontal.maxVal += rotation;
mParticleAngleHorizontal.maxVal *= DEG_RAD_FACTOR;
mParticleAngleHorizontal.changeAmplitude *= DEG_RAD_FACTOR;
}
@@ -310,19 +311,19 @@ ParticleEmitter::readParticleEmitterProp(xmlNodePtr propertyNode, T def)
retval.set((T) XML::getFloatProperty(propertyNode, "min", (double) def),
(T) XML::getFloatProperty(propertyNode, "max", (double) def));
- std::string change = XML::getProperty(propertyNode, "change-func", "none");
- T amplitude = (T) XML::getFloatProperty(propertyNode, "change-amplitude", 0.0);
- int period = XML::getProperty(propertyNode, "change-period", 0);
- int phase = XML::getProperty(propertyNode, "change-phase", 0);
- if (change == "saw" || change == "sawtooth") {
- retval.setFunction(FUNC_SAW, amplitude, period, phase);
- } else if (change == "sine" || change == "sinewave") {
- retval.setFunction(FUNC_SINE, amplitude, period, phase);
- } else if (change == "triangle") {
- retval.setFunction(FUNC_TRIANGLE, amplitude, period, phase);
- } else if (change == "square"){
- retval.setFunction(FUNC_SQUARE, amplitude, period, phase);
- }
+ std::string change = XML::getProperty(propertyNode, "change-func", "none");
+ T amplitude = (T) XML::getFloatProperty(propertyNode, "change-amplitude", 0.0);
+ int period = XML::getProperty(propertyNode, "change-period", 0);
+ int phase = XML::getProperty(propertyNode, "change-phase", 0);
+ if (change == "saw" || change == "sawtooth") {
+ retval.setFunction(FUNC_SAW, amplitude, period, phase);
+ } else if (change == "sine" || change == "sinewave") {
+ retval.setFunction(FUNC_SINE, amplitude, period, phase);
+ } else if (change == "triangle") {
+ retval.setFunction(FUNC_TRIANGLE, amplitude, period, phase);
+ } else if (change == "square"){
+ retval.setFunction(FUNC_SQUARE, amplitude, period, phase);
+ }
return retval;
}
diff --git a/src/particleemitter.h b/src/particleemitter.h
index ad0e33f8..809a6ded 100644
--- a/src/particleemitter.h
+++ b/src/particleemitter.h
@@ -44,7 +44,7 @@ class ParticleEmitter
/**
* Constructor.
*/
- ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map);
+ ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *map, int rotation = 0);
/**
* Copy Constructor (necessary for reference counting of particle images)
diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h
index 70a04aee..f9c329a9 100644
--- a/src/particleemitterprop.h
+++ b/src/particleemitterprop.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <cstdlib>
#include <cmath>
+#include <cstdlib>
/**
* Returns a random numeric value that is larger than or equal min and smaller
diff --git a/src/party.cpp b/src/party.cpp
new file mode 100644
index 00000000..3df2eedc
--- /dev/null
+++ b/src/party.cpp
@@ -0,0 +1,216 @@
+/*
+ * 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
+ */
+
+#include "beingmanager.h"
+#include "game.h"
+#include "localplayer.h"
+#include "party.h"
+
+#include "gui/chat.h"
+#include "gui/confirm_dialog.h"
+
+#include "net/messageout.h"
+#include "net/protocol.h"
+
+Party::Party(ChatWindow *chat, Network *network) :
+ mChat(chat), mNetwork(network), mInviteListener(network, &mInParty)
+{
+}
+
+void Party::respond(const std::string &command, const std::string &args)
+{
+ if (command == "new" || command == "create")
+ {
+ create(args);
+ return;
+ }
+ if (command == "leave")
+ {
+ leave(args);
+ return;
+ }
+ if (command == "settings")
+ {
+ mChat->chatLog("Not yet implemented!", BY_SERVER);
+ return;
+ /*
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_PARTY_SETTINGS);
+ outMsg.writeInt16(0); // Experience
+ outMsg.writeInt16(0); // Item
+ */
+ }
+ mChat->chatLog("Party command not known.", BY_SERVER);
+}
+
+void Party::create(const std::string &party)
+{
+ if (party == "")
+ {
+ mChat->chatLog("Party name is missing.", BY_SERVER);
+ return;
+ }
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_PARTY_CREATE);
+ outMsg.writeString(party.substr(0, 23), 24);
+ mCreating = true;
+}
+
+void Party::leave(const std::string &args)
+{
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_PARTY_LEAVE);
+ mChat->chatLog("Left party.", BY_SERVER);
+ mInParty = false;
+}
+
+void Party::createResponse(bool ok)
+{
+ if (ok)
+ {
+ mChat->chatLog("Party successfully created.", BY_SERVER);
+ mInParty = true;
+ }
+ else
+ {
+ mChat->chatLog("Could not create party.", BY_SERVER);
+ }
+}
+
+void Party::inviteResponse(const std::string &nick, int status)
+{
+ switch (status)
+ {
+ case 0:
+ mChat->chatLog(nick + " is already a member of a party.",
+ BY_SERVER);
+ break;
+ case 1:
+ mChat->chatLog(nick + " refused your invitation.", BY_SERVER);
+ break;
+ case 2:
+ mChat->chatLog(nick + " is now a member of your party.",
+ BY_SERVER);
+ break;
+ }
+}
+
+void Party::invitedAsk(const std::string &nick, int gender,
+ const std::string &partyName)
+{
+ mPartyName = partyName; /* Quick and nasty - needs redoing */
+ if (nick == "")
+ {
+ mChat->chatLog("Something\'s wrong!", BY_SERVER);
+ return;
+ }
+ mCreating = false;
+ ConfirmDialog *dlg = new ConfirmDialog("Invite to party",
+ nick + " invites you to join " +
+ (gender == 0 ? "his" : "her") +
+ " party, " + partyName +
+ ", do you accept?");
+ dlg->addActionListener(&mInviteListener);
+}
+
+void Party::InviteListener::action(const gcn::ActionEvent &event)
+{
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_PARTY_INVITED);
+ outMsg.writeInt32(player_node->getId());
+ bool accept = event.getId() == "yes";
+ outMsg.writeInt32(accept ? 1 : 0);
+ *mInParty = *mInParty || accept;
+}
+
+void Party::leftResponse(const std::string &nick)
+{
+ mChat->chatLog(nick + " has left your party.", BY_SERVER);
+}
+
+void Party::receiveChat(Being *being, const std::string &msg)
+{
+ if (being == NULL)
+ {
+ return;
+ }
+ if (being->getType() != Being::PLAYER)
+ {
+ mChat->chatLog("Something\'s wrong!", BY_SERVER);
+ return;
+ }
+ being->setSpeech(msg, SPEECH_TIME);
+ mChat->chatLog(being->getName() + " : " + msg, BY_PARTY);
+}
+
+void Party::help()
+{
+ mChat->chatLog("/party <command> <params>: Party commands.", BY_SERVER);
+}
+
+void Party::help(const std::string &msg)
+{
+ if (msg == "")
+ {
+ mChat->chatLog("Command: /party <command> <args>", BY_SERVER);
+ mChat->chatLog("where <command> can be one of:", BY_SERVER);
+ mChat->chatLog(" /new", BY_SERVER);
+ mChat->chatLog(" /create", BY_SERVER);
+ mChat->chatLog(" /prefix", BY_SERVER);
+ mChat->chatLog(" /leave", BY_SERVER);
+ mChat->chatLog("This command implements the partying function.",
+ BY_SERVER);
+ mChat->chatLog("Type /help party <command> for further help.",
+ BY_SERVER);
+ return;
+ }
+ if (msg == "new" || msg == "create")
+ {
+ mChat->chatLog("Command: /party new <party-name>", BY_SERVER);
+ mChat->chatLog("Command: /party create <party-name>", BY_SERVER);
+ mChat->chatLog("These commands create a new party <party-name.",
+ BY_SERVER);
+ return;
+ }
+ if (msg == "prefix")
+ {
+ mChat->chatLog("Command: /party prefix <prefix-char>", BY_SERVER);
+ mChat->chatLog("This command sets the party prefix character.",
+ BY_SERVER);
+ mChat->chatLog("Any message preceded by <prefix-char> is sent to "
+ "the party instead of everyone.", BY_SERVER);
+ mChat->chatLog("Command: /party prefix", BY_SERVER);
+ mChat->chatLog("This command reports the current party prefix "
+ "character.", BY_SERVER);
+ return;
+ }
+ //if (msg == "settings")
+ //if (msg == "info")
+ if (msg == "leave")
+ {
+ mChat->chatLog("Command: /party leave", BY_SERVER);
+ mChat->chatLog("This command causes the player to leave the party.",
+ BY_SERVER);
+ return;
+ }
+ mChat->chatLog("Unknown /party command.", BY_SERVER);
+ mChat->chatLog("Type /help party for a list of options.", BY_SERVER);
+}
diff --git a/src/party.h b/src/party.h
new file mode 100644
index 00000000..0e1afc3c
--- /dev/null
+++ b/src/party.h
@@ -0,0 +1,73 @@
+/*
+ * 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
+ */
+
+#ifndef _TMW_PARTY_H
+#define _TMW_PARTY_H
+
+#include <string>
+
+#include <guichan/actionlistener.hpp>
+
+class PartyHandler;
+class Being;
+class ChatWindow;
+class Network;
+
+class Party
+{
+ public:
+ Party(ChatWindow *chat, Network *network);
+ void respond(const std::string &command, const std::string &args);
+
+ void create(const std::string &party);
+ void leave(const std::string &args);
+
+ void createResponse(bool ok);
+ void inviteResponse(const std::string &nick, int status);
+ void invitedAsk(const std::string &nick, int gender,
+ const std::string &partyName);
+ void leftResponse(const std::string &nick);
+ void receiveChat(Being *being, const std::string &msg);
+
+ void help();
+ void help(const std::string &msg);
+ private:
+ ChatWindow *mChat;
+ std::string mPartyName;
+ Network *mNetwork;
+ bool mInParty;
+ bool mCreating; /**< Used to give an appropriate response to
+ failure */
+ PartyHandler *handler;
+
+ class InviteListener : public gcn::ActionListener
+ {
+ public:
+ InviteListener(Network *network, bool *inParty) :
+ mNetwork(network), mInParty(inParty) {};
+ void action(const gcn::ActionEvent &event);
+ Network *mNetwork;
+ private:
+ bool *mInParty;
+ };
+ InviteListener mInviteListener;
+};
+#endif
diff --git a/src/player.cpp b/src/player.cpp
index f43e54d5..e6244bb5 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -19,21 +19,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "player.h"
+#include <iostream>
#include "animatedsprite.h"
#include "game.h"
#include "graphics.h"
#include "log.h"
+#include "player.h"
+
+#include "gui/gui.h"
#include "resources/itemdb.h"
#include "resources/iteminfo.h"
#include "utils/strprintf.h"
-#include "gui/gui.h"
-#include <iostream>
-
static const int NAME_X_OFFSET = 15;
static const int NAME_Y_OFFSET = 30;
@@ -41,6 +41,7 @@ Player::Player(int id, int job, Map *map):
Being(id, job, map)
{
mName = 0;
+ mIsGM = false;
}
Player::~Player()
@@ -55,9 +56,15 @@ void Player::setName(const std::string &name)
{
if (mName == 0)
{
- mName = new FlashText(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
- gcn::Graphics::CENTER,
- speechFont, gcn::Color(255, 255, 255));
+ if (mIsGM) {
+ mName = new FlashText("(GM) " + name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
+ gcn::Graphics::CENTER,
+ gmNameFont, gcn::Color(255, 255, 255));
+ } else {
+ mName = new FlashText(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
+ gcn::Graphics::CENTER,
+ speechFont, gcn::Color(255, 255, 255));
+ }
Being::setName(name);
}
}
@@ -66,6 +73,18 @@ void
Player::logic()
{
switch (mAction) {
+ case STAND:
+ break;
+
+ case SIT:
+ break;
+
+ case DEAD:
+ break;
+
+ case HURT:
+ break;
+
case WALK:
mFrame = (get_elapsed_time(mWalkTime) * 6) / mWalkSpeed;
if (mFrame >= 6) {
@@ -138,13 +157,13 @@ void Player::setGender(int gender)
void Player::setHairStyle(int style, int color)
{
- style = style < 0 ? mHairStyle : style % getHairStylesNr();
- color = color < 0 ? mHairColor : color % getHairColorsNr();
+ style = style < 0 ? mHairStyle : style % mNumberOfHairstyles;
+ color = color < 0 ? mHairColor : color % ColorDB::size();
if (style == mHairStyle && color == mHairColor) return;
Being::setHairStyle(style, color);
- setSprite(HAIR_SPRITE, style * -1, getHairColor(color));
+ setSprite(HAIR_SPRITE, style * -1, ColorDB::get(color));
setAction(mAction);
}
@@ -194,4 +213,3 @@ void Player::updateCoords()
}
}
-
diff --git a/src/player.h b/src/player.h
index 4676124c..c91ad3c2 100644
--- a/src/player.h
+++ b/src/player.h
@@ -80,7 +80,6 @@ class Player : public Being
protected:
void updateCoords();
-
private:
FlashText *mName;
};
diff --git a/src/player_relations.cpp b/src/player_relations.cpp
index c494dc74..ef00a738 100644
--- a/src/player_relations.cpp
+++ b/src/player_relations.cpp
@@ -19,12 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <algorithm>
+
#include "beingmanager.h"
-#include "player_relations.h"
#include "graphics.h"
-#include "gui/gui.h"
+#include "player_relations.h"
-#include <algorithm>
+#include "gui/gui.h"
#define PLAYER_IGNORE_STRATEGY_NOP "nop"
#define PLAYER_IGNORE_STRATEGY_EMOTE0 "emote0"
diff --git a/src/player_relations.h b/src/player_relations.h
index ec93b4dc..56f3d5a4 100644
--- a/src/player_relations.h
+++ b/src/player_relations.h
@@ -22,13 +22,14 @@
#ifndef TMW_PLAYER_RELATIONS_H_
#define TMW_PLAYER_RELATIONS_H_
-#include "being.h"
-#include "player.h"
-#include "configuration.h"
-#include <string>
+#include <list>
#include <map>
+#include <string>
#include <vector>
-#include <list>
+
+#include "being.h"
+#include "configuration.h"
+#include "player.h"
struct PlayerRelation
{
diff --git a/src/properties.h b/src/properties.h
index 2eafeeca..86fffea3 100644
--- a/src/properties.h
+++ b/src/properties.h
@@ -23,8 +23,8 @@
#define _TMW_PROPERTIES_H_
#include <map>
-#include <string>
#include <sstream>
+#include <string>
/**
* A class holding a set of properties.
diff --git a/src/recorder.cpp b/src/recorder.cpp
new file mode 100644
index 00000000..7bf618c5
--- /dev/null
+++ b/src/recorder.cpp
@@ -0,0 +1,110 @@
+/*
+ * 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
+ */
+
+#include "recorder.h"
+
+#include "gui/buttonbox.h"
+#include "gui/chat.h"
+
+#include "utils/trim.h"
+
+Recorder::Recorder(ChatWindow *chat) : mChat(chat)
+{
+ mButtonBox = new ButtonBox("Recording...", "Stop recording", this);
+ mButtonBox->setY(20);
+}
+
+void Recorder::record(const std::string &msg)
+{
+ if (mStream.is_open())
+ {
+ mStream << msg << std::endl;
+ }
+}
+
+void Recorder::respond(const std::string &msg)
+{
+ std::string msgCopy = msg;
+ trim(msgCopy);
+ if (msgCopy == "")
+ {
+ if (mStream.is_open())
+ {
+ mStream.close();
+ mButtonBox->setVisible(false);
+ /*
+ * Message should go after mStream is closed so that it isn't
+ * recorded.
+ */
+ mChat->chatLog("Finishing recording.", BY_SERVER);
+ }
+ else
+ {
+ mChat->chatLog("Not currently recording.", BY_SERVER);
+ }
+ return;
+ }
+ if (mStream.is_open())
+ {
+ mChat->chatLog("Already recording.", BY_SERVER);
+ }
+ else
+ {
+ /*
+ * Message should go before mStream is opened so that it isn't
+ * recorded.
+ */
+ mChat->chatLog("Starting to record...", BY_SERVER);
+ mStream.open(msg.c_str(), std::ios_base::trunc);
+ if (mStream.is_open())
+ {
+ mButtonBox->setVisible(true);
+ }
+ else
+ {
+ mChat->chatLog("Failed to start recording.", BY_SERVER);
+ }
+ }
+}
+
+void Recorder::help() const
+{
+ mChat->chatLog("/record <filename>: Start recording the chat.", BY_SERVER);
+}
+
+void Recorder::help(const std::string &args) const
+{
+ mChat->chatLog("Command: /record <filename>", BY_SERVER);
+ mChat->chatLog("This command starts recording the chat log to the file "
+ "<filename>.", BY_SERVER);
+ mChat->chatLog("Command: /record", BY_SERVER);
+ mChat->chatLog("This command finishes a recording session.", BY_SERVER);
+}
+
+void Recorder::buttonBoxRespond()
+{
+ respond("");
+}
+
+Recorder::~Recorder()
+{
+ delete mButtonBox;
+}
diff --git a/src/recorder.h b/src/recorder.h
new file mode 100644
index 00000000..9f30184f
--- /dev/null
+++ b/src/recorder.h
@@ -0,0 +1,48 @@
+/*
+ * 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
+ */
+
+#ifndef _TMW_RECORD_H
+#define _TMW_RECORD_H
+
+#include <fstream>
+#include <string>
+
+#include "gui/buttonbox.h"
+
+class ChatWindow;
+
+class Recorder : public ButtonBoxListener
+{
+ public:
+ Recorder(ChatWindow *chat);
+ void record(const std::string &msg);
+ void respond(const std::string &msg);
+ void help() const;
+ void help(const std::string &args) const;
+ void buttonBoxRespond();
+ bool isRecording() const {return mStream;}
+ virtual ~Recorder();
+ private:
+ ChatWindow *mChat;
+ std::ofstream mStream;
+ ButtonBox *mButtonBox;
+};
+#endif
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index ffbbffb2..f40d3109 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -20,22 +20,17 @@
*/
#include "action.h"
-
-#include <algorithm>
-
#include "animation.h"
#include "../utils/dtor.h"
-
Action::Action()
{
}
Action::~Action()
{
- std::for_each(mAnimations.begin(), mAnimations.end(),
- make_dtor(mAnimations));
+ delete_all(mAnimations);
}
Animation*
diff --git a/src/resources/ambientoverlay.cpp b/src/resources/ambientoverlay.cpp
index 9eee57f0..38d8fc46 100644
--- a/src/resources/ambientoverlay.cpp
+++ b/src/resources/ambientoverlay.cpp
@@ -20,7 +20,6 @@
*/
#include "ambientoverlay.h"
-
#include "image.h"
#include "../graphics.h"
diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp
index d2794e61..596c5fac 100644
--- a/src/resources/animation.cpp
+++ b/src/resources/animation.cpp
@@ -19,10 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "animation.h"
-
#include <algorithm>
+#include "animation.h"
+
#include "../utils/dtor.h"
Animation::Animation():
diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp
index c85105c5..1bd98680 100644
--- a/src/resources/buddylist.cpp
+++ b/src/resources/buddylist.cpp
@@ -21,13 +21,13 @@
#include <algorithm>
#include <cstring>
-#include <iostream>
#include <fstream>
+#include <iostream>
#include "buddylist.h"
-#include "../main.h"
#include "../configuration.h"
+#include "../main.h"
BuddyList::BuddyList()
{
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp
new file mode 100644
index 00000000..3d2e15e0
--- /dev/null
+++ b/src/resources/colordb.cpp
@@ -0,0 +1,126 @@
+/*
+ * Aethyra
+ * Copyright 2008 Aethyra Development Team
+ *
+ * This file is part of Aethyra.
+ *
+ * Aethyra 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.
+ *
+ * Aethyra 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 Aethyra; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <cassert>
+#include <libxml/tree.h>
+
+#include "colordb.h"
+
+#include "../log.h"
+
+#include "../utils/dtor.h"
+#include "../utils/xml.h"
+
+#define HAIR_COLOR_FILE "colors.xml"
+#define TMW_COLOR_FILE "hair.xml"
+
+namespace
+{
+ ColorDB::Colors mColors;
+ bool mLoaded = false;
+ std::string mFail = "#ffffff";
+}
+
+void ColorDB::load()
+{
+ if (mLoaded)
+ {
+ return;
+ }
+
+ XML::Document *doc = new XML::Document(HAIR_COLOR_FILE);
+ xmlNodePtr root = doc->rootNode();
+ bool TMWHair = false;
+
+ if (!root || !xmlStrEqual(root->name, BAD_CAST "colors"))
+ {
+ logger->log("Trying TMW's color file, %s.", TMW_COLOR_FILE);
+
+ TMWHair = true;
+
+ delete doc;
+
+ doc = new XML::Document(TMW_COLOR_FILE);
+ root = doc->rootNode();
+ if (!root || !xmlStrEqual(root->name, BAD_CAST "colors"))
+ {
+ logger->log("ColorDB: Failed");
+ mColors[0] = mFail;
+ mLoaded = true;
+
+ delete doc;
+
+ return;
+ }
+ }
+ for_each_xml_child_node(node, root)
+ {
+ if (xmlStrEqual(node->name, BAD_CAST "color"))
+ {
+ int id = XML::getProperty(node, "id", 0);
+
+ if (mColors.find(id) != mColors.end())
+ {
+ logger->log("ColorDB: Redefinition of dye ID %d", id);
+ }
+
+ TMWHair ? mColors[id] = XML::getProperty(node, "value", "#FFFFFF") :
+ mColors[id] = XML::getProperty(node, "dye", "#FFFFFF");
+
+ logger->log("%d %s", id, mColors[id].c_str());
+ }
+ }
+
+ delete doc;
+
+ mLoaded = true;
+}
+
+void ColorDB::unload()
+{
+ logger->log("Unloading color database...");
+
+ mColors.clear();
+ mLoaded = false;
+}
+
+std::string& ColorDB::get(int id)
+{
+ if(!mLoaded)
+ load();
+
+ ColorIterator i = mColors.find(id);
+
+ if (i == mColors.end())
+ {
+ logger->log("ColorDB: Error, unknown dye ID# %d", id);
+ return mFail;
+ }
+ else
+ {
+ return i->second;
+ }
+}
+
+int ColorDB::size()
+{
+ return mColors.size();
+}
diff --git a/src/resources/colordb.h b/src/resources/colordb.h
new file mode 100644
index 00000000..2b750fa3
--- /dev/null
+++ b/src/resources/colordb.h
@@ -0,0 +1,52 @@
+/*
+ * Aethyra
+ * Copyright 2008 Aethyra Development Team
+ *
+ * This file is part of Aethyra.
+ *
+ * Aethyra 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.
+ *
+ * Aethyra 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 Aethyra; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AETHYRA_COLOR_MANAGER_H
+#define _AETHYRA_COLOR_MANAGER_H
+
+#include <map>
+#include <string>
+
+/**
+ * The class that holds the color information.
+ */
+namespace ColorDB
+{
+ /**
+ * Loads the color data from <code>colors.xml</code>.
+ */
+ void load();
+
+ /**
+ * Clear the color data
+ */
+ void unload();
+
+ std::string& get(int id);
+
+ int size();
+
+ // Color DB
+ typedef std::map<int, std::string> Colors;
+ typedef Colors::iterator ColorIterator;
+};
+
+#endif
diff --git a/src/resources/dye.h b/src/resources/dye.h
index 528a1d91..4fb8fd40 100644
--- a/src/resources/dye.h
+++ b/src/resources/dye.h
@@ -22,6 +22,7 @@
#ifndef _TMW_DYE_H
#define _TMW_DYE_H
+#include <string>
#include <vector>
/**
@@ -36,7 +37,7 @@ class Palette
* The string is either a file name or a sequence of hexadecimal RGB
* values separated by ',' and starting with '#'.
*/
- Palette(std::string const &);
+ Palette(std::string const &pallete);
/**
* Gets a pixel color depending on its intensity.
@@ -63,7 +64,7 @@ class Dye
* The parts of string are separated by semi-colons. Each part starts
* by an uppercase letter, followed by a colon and then a palette name.
*/
- Dye(std::string const &);
+ Dye(std::string const &dye);
/**
* Destroys the associated palettes.
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 77d77f96..35b9c254 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -21,9 +21,8 @@
#include <SDL_image.h>
-#include "image.h"
-
#include "dye.h"
+#include "image.h"
#include "../log.h"
diff --git a/src/resources/image.h b/src/resources/image.h
index 3677696f..6eb33ed9 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -22,9 +22,10 @@
#ifndef _TMW_IMAGE_H
#define _TMW_IMAGE_H
+#include <SDL.h>
+
#include "../main.h"
-#include <SDL.h>
#ifdef USE_OPENGL
/* The definition of OpenGL extensions by SDL is giving problems with recent
diff --git a/src/resources/imageloader.cpp b/src/resources/imageloader.cpp
index 29458ba3..a7e813d7 100644
--- a/src/resources/imageloader.cpp
+++ b/src/resources/imageloader.cpp
@@ -21,12 +21,12 @@
#include <cassert>
#include <string>
+
#include <guichan/color.hpp>
#include <guichan/sdl/sdlpixel.hpp>
-#include "imageloader.h"
-
#include "image.h"
+#include "imageloader.h"
#include "resourcemanager.h"
ProxyImage::ProxyImage(SDL_Surface *s):
diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp
index d7398c17..b321439a 100644
--- a/src/resources/imageset.cpp
+++ b/src/resources/imageset.cpp
@@ -19,14 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
+#include "image.h"
#include "imageset.h"
#include "../log.h"
-#include "image.h"
-
#include "../utils/dtor.h"
ImageSet::ImageSet(Image *img, int width, int height)
@@ -44,11 +41,10 @@ ImageSet::ImageSet(Image *img, int width, int height)
ImageSet::~ImageSet()
{
- for_each(mImages.begin(), mImages.end(), make_dtor(mImages));
+ delete_all(mImages);
}
-Image*
-ImageSet::get(size_type i) const
+Image* ImageSet::get(size_type i) const
{
if (i >= mImages.size())
{
diff --git a/src/resources/imageset.h b/src/resources/imageset.h
index 58b7a8ea..26ce99ea 100644
--- a/src/resources/imageset.h
+++ b/src/resources/imageset.h
@@ -28,7 +28,6 @@
class Image;
-
/**
* Stores a set of subimages originating from a single image.
*/
diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp
index d6d8a6c2..36805646 100644
--- a/src/resources/imagewriter.cpp
+++ b/src/resources/imagewriter.cpp
@@ -19,11 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "imagewriter.h"
-
#include <png.h>
-#include <string>
#include <SDL.h>
+#include <string>
+
+#include "imagewriter.h"
#include "../log.h"
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index e6f2fd1f..f4ccc511 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -19,12 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
#include <cassert>
+
#include <libxml/tree.h>
#include "itemdb.h"
-
#include "iteminfo.h"
#include "resourcemanager.h"
@@ -83,7 +82,7 @@ void ItemDB::load()
}
int type = XML::getProperty(node, "type", 0);
- int weight = XML::getProperty(node, "weight", 0);
+ //int weight = XML::getProperty(node, "weight", 0);
int view = XML::getProperty(node, "view", 0);
std::string name = XML::getProperty(node, "name", "");
@@ -101,7 +100,7 @@ void ItemDB::load()
itemInfo->setEffect(effect);
itemInfo->setType(type);
itemInfo->setView(view);
- itemInfo->setWeight(weight);
+ //itemInfo->setWeight(weight);
itemInfo->setWeaponType(weaponType);
for_each_xml_child_node(itemChild, node)
@@ -126,7 +125,7 @@ void ItemDB::load()
CHECK_PARAM(name, "");
CHECK_PARAM(image, "");
CHECK_PARAM(description, "");
- CHECK_PARAM(effect, "");
+ // CHECK_PARAM(effect, "");
// CHECK_PARAM(type, 0);
// CHECK_PARAM(weight, 0);
// CHECK_PARAM(slot, 0);
@@ -144,7 +143,7 @@ void ItemDB::unload()
delete mUnknown;
mUnknown = NULL;
- for_each(mItemInfos.begin(), mItemInfos.end(), make_dtor(mItemInfos));
+ delete_all(mItemInfos);
mItemInfos.clear();
mLoaded = false;
}
@@ -175,7 +174,6 @@ void loadSpriteRef(ItemInfo *itemInfo, xmlNodePtr node)
{
itemInfo->setSprite(filename, 0);
}
-
if (gender == "female" || gender == "unisex")
{
itemInfo->setSprite(filename, 1);
diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h
index 62a1e94c..9b661a60 100644
--- a/src/resources/itemdb.h
+++ b/src/resources/itemdb.h
@@ -22,10 +22,10 @@
#ifndef _TMW_ITEM_MANAGER_H
#define _TMW_ITEM_MANAGER_H
-#include "iteminfo.h"
-
#include <map>
+#include "iteminfo.h"
+
/**
* The namespace that holds the item information.
*/
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index fb2c8ffe..5daeafe6 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "iteminfo.h"
-
#include "itemdb.h"
+#include "iteminfo.h"
const std::string&
ItemInfo::getSprite(int gender) const
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 4c37c239..b4beb558 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -19,14 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "mapreader.h"
-
#include <cassert>
#include <iostream>
#include <zlib.h>
-#include "resourcemanager.h"
#include "image.h"
+#include "mapreader.h"
+#include "resourcemanager.h"
#include "../log.h"
#include "../map.h"
@@ -143,8 +142,7 @@ inflateMemory(unsigned char *in, unsigned int inLength,
return outLength;
}
-Map*
-MapReader::readMap(const std::string &filename)
+Map* MapReader::readMap(const std::string &filename)
{
// Load the file through resource manager
ResourceManager *resman = ResourceManager::getInstance();
@@ -207,14 +205,11 @@ MapReader::readMap(xmlNodePtr node, const std::string &path)
// Take the filename off the path
const std::string pathDir = path.substr(0, path.rfind("/") + 1);
- //xmlChar *prop = xmlGetProp(node, BAD_CAST "version");
- //xmlFree(prop);
-
const int w = XML::getProperty(node, "width", 0);
const int h = XML::getProperty(node, "height", 0);
- const int tw = XML::getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH);
- const int th = XML::getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT);
- Map *map = new Map(w, h, tw, th);
+ const int tilew = XML::getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH);
+ const int tileh = XML::getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT);
+ Map *map = new Map(w, h, tilew, tileh);
for_each_xml_child_node(childNode, node)
{
@@ -238,8 +233,8 @@ MapReader::readMap(xmlNodePtr node, const std::string &path)
// The object group offset is applied to each object individually
const int tileOffsetX = XML::getProperty(childNode, "x", 0);
const int tileOffsetY = XML::getProperty(childNode, "y", 0);
- const int offsetX = tileOffsetX * tw;
- const int offsetY = tileOffsetY * th;
+ const int offsetX = tileOffsetX * tilew;
+ const int offsetY = tileOffsetY * tileh;
for_each_xml_child_node(objectNode, childNode)
{
@@ -289,8 +284,7 @@ MapReader::readMap(xmlNodePtr node, const std::string &path)
return map;
}
-void
-MapReader::readProperties(xmlNodePtr node, Properties* props)
+void MapReader::readProperties(xmlNodePtr node, Properties* props)
{
for_each_xml_child_node(childNode, node)
{
@@ -329,8 +323,8 @@ MapReader::readLayer(xmlNodePtr node, Map *map)
const int offsetY = XML::getProperty(node, "y", 0);
const std::string name = XML::getProperty(node, "name", "");
- const bool isFringeLayer = (name == "Fringe");
- const bool isCollisionLayer = (name == "Collision");
+ const bool isFringeLayer = (name.substr(0,6) == "Fringe");
+ const bool isCollisionLayer = (name.substr(0,9) == "Collision");
MapLayer *layer = 0;
@@ -365,15 +359,15 @@ MapReader::readLayer(xmlNodePtr node, Map *map)
xmlNodePtr dataChild = childNode->xmlChildrenNode;
if (!dataChild)
continue;
-
+
int len = strlen((const char*)dataChild->content) + 1;
unsigned char *charData = new unsigned char[len + 1];
const char *charStart = (const char*)dataChild->content;
unsigned char *charIndex = charData;
-
+
while (*charStart) {
if (*charStart != ' ' && *charStart != '\t' &&
- *charStart != '\n')
+ *charStart != '\n')
{
*charIndex = *charStart;
charIndex++;
@@ -426,10 +420,10 @@ MapReader::readLayer(xmlNodePtr node, Map *map)
}
}
else {
- // Read plain XML map file
- for_each_xml_child_node(childNode2, childNode)
- {
- if (!xmlStrEqual(childNode2->name, BAD_CAST "tile"))
+ // Read plain XML map file
+ for_each_xml_child_node(childNode2, childNode)
+ {
+ if (!xmlStrEqual(childNode2->name, BAD_CAST "tile"))
continue;
const int gid = XML::getProperty(childNode2, "gid", -1);
@@ -443,12 +437,12 @@ MapReader::readLayer(xmlNodePtr node, Map *map)
}
}
}
-
+
if (y < h)
std::cerr << "TOO SMALL!\n";
if (x)
std::cerr << "TOO SMALL!\n";
-
+
// There can be only one data element
break;
}
@@ -459,13 +453,17 @@ MapReader::readTileset(xmlNodePtr node,
const std::string &path,
Map *map)
{
+ int firstGid = XML::getProperty(node, "firstgid", 0);
+ XML::Document* doc = NULL;
+
if (xmlHasProp(node, BAD_CAST "source"))
{
- logger->log("Warning: External tilesets not supported yet.");
- return NULL;
+ std::string filename = XML::getProperty(node, "source", "");
+ doc = new XML::Document(filename);
+ node = doc->rootNode();
+ firstGid += XML::getProperty(node, "firstgid", 0);
}
- const int firstGid = XML::getProperty(node, "firstgid", 0);
const int tw = XML::getProperty(node, "tilewidth", map->getTileWidth());
const int th = XML::getProperty(node, "tileheight", map->getTileHeight());
@@ -479,7 +477,8 @@ MapReader::readTileset(xmlNodePtr node,
if (!source.empty())
{
std::string sourceStr = source;
- sourceStr.erase(0, 3); // Remove "../"
+ while (sourceStr.substr(0, 3) == "../")
+ sourceStr.erase(0, 3); // Remove "../"
ResourceManager *resman = ResourceManager::getInstance();
Image* tilebmp = resman->getImage(sourceStr);
@@ -488,11 +487,11 @@ MapReader::readTileset(xmlNodePtr node,
{
Tileset *set = new Tileset(tilebmp, tw, th, firstGid);
tilebmp->decRef();
+ delete doc;
return set;
}
else {
- logger->log("Warning: Failed to load tileset (%s)",
- source.c_str());
+ logger->log("Warning: Failed to load tileset (%s)", source.c_str());
}
}
@@ -500,5 +499,7 @@ MapReader::readTileset(xmlNodePtr node,
break;
}
+ delete doc;
+
return NULL;
}
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h
index 0142eb45..ef52564e 100644
--- a/src/resources/mapreader.h
+++ b/src/resources/mapreader.h
@@ -26,8 +26,8 @@
#include <libxml/tree.h>
-class Properties;
class Map;
+class Properties;
class Tileset;
/**
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 11b2baf7..4d52b8ad 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -19,10 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
#include "monsterdb.h"
-
#include "resourcemanager.h"
#include "../log.h"
@@ -126,6 +123,12 @@ MonsterDB::load()
}
}
+ if (xmlStrEqual(spriteNode->name, BAD_CAST "attack"))
+ {
+ std::string event = XML::getProperty(spriteNode, "particle-effect", "");
+ currentInfo->addAttackParticleEffect(event);
+ }
+
if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx"))
{
currentInfo->addParticleEffect(
@@ -141,8 +144,7 @@ MonsterDB::load()
void
MonsterDB::unload()
{
- for_each(mMonsterInfos.begin(), mMonsterInfos.end(),
- make_dtor(mMonsterInfos));
+ delete_all(mMonsterInfos);
mMonsterInfos.clear();
mLoaded = false;
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 7661c86b..4a71a122 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
-
#include "monsterinfo.h"
#include "../utils/dtor.h"
@@ -33,8 +31,7 @@ MonsterInfo::MonsterInfo()
MonsterInfo::~MonsterInfo()
{
// kill vectors in mSoundEffects
- for_each (mSounds.begin(), mSounds.end(),
- make_dtor(mSounds));
+ delete_all(mSounds);
mSounds.clear();
}
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h
index 84b131c6..05a78c5a 100644
--- a/src/resources/monsterinfo.h
+++ b/src/resources/monsterinfo.h
@@ -22,14 +22,13 @@
#ifndef _TMW_MONSTERINFO_H_
#define _TMW_MONSTERINFO_H_
+#include <list>
#include <map>
#include <string>
#include <vector>
-#include <list>
#include "../being.h"
-
enum MonsterSoundEvent
{
MONSTER_EVENT_HIT,
@@ -85,11 +84,19 @@ class MonsterInfo
std::string
getSound(MonsterSoundEvent event) const;
+ std::string
+ getAttackParticleEffect() const { return mAttackParticle; }
+
+ void
+ addAttackParticleEffect(const std::string &particleEffect)
+ { mAttackParticle = particleEffect; }
+
const std::list<std::string>&
getParticleEffects() const { return mParticleEffects; }
private:
std::string mName;
+ std::string mAttackParticle;
std::list<std::string> mSprites;
Being::TargetCursorSize mTargetCursorSize;
std::map<MonsterSoundEvent, std::vector<std::string>* > mSounds;
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index 2f8d78d4..3ae58067 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -20,7 +20,6 @@
*/
#include "npcdb.h"
-
#include "resourcemanager.h"
#include "../log.h"
diff --git a/src/resources/npcdb.h b/src/resources/npcdb.h
index 00b4f99b..b4539866 100644
--- a/src/resources/npcdb.h
+++ b/src/resources/npcdb.h
@@ -22,8 +22,8 @@
#ifndef _TMW_NPC_DB_H
#define _TMW_NPC_DB_H
-#include <map>
#include <list>
+#include <map>
#include <string>
struct NPCsprite
diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp
index 449caf55..e9310905 100644
--- a/src/resources/resource.cpp
+++ b/src/resources/resource.cpp
@@ -22,7 +22,6 @@
#include <cassert>
#include "resource.h"
-
#include "resourcemanager.h"
Resource::~Resource()
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 90b29374..510a16bd 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -20,24 +20,22 @@
*/
#include <cassert>
-#include <sstream>
-#include <sys/time.h>
-
#include <physfs.h>
#include <SDL_image.h>
+#include <sstream>
-#include "resourcemanager.h"
+#include <sys/time.h>
#include "dye.h"
#include "image.h"
+#include "imageset.h"
#include "music.h"
+#include "resourcemanager.h"
#include "soundeffect.h"
-#include "imageset.h"
#include "spritedef.h"
#include "../log.h"
-
ResourceManager *ResourceManager::instance = NULL;
ResourceManager::ResourceManager()
@@ -208,7 +206,7 @@ ResourceManager::getPath(const std::string &file)
// get the real path to the file
const char* tmp = PHYSFS_getRealDir(file.c_str());
std::string path;
-
+
// if the file is not in the search path, then its NULL
if (tmp)
{
@@ -217,9 +215,9 @@ ResourceManager::getPath(const std::string &file)
else
{
// if not found in search path return the default path
- path = std::string(TMW_DATADIR) + std::string("data") + "/" + file;
+ path = std::string(AETHYRA_DATADIR) + std::string("data") + "/" + file;
}
-
+
return path;
}
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 66813a9c..c814d752 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -27,11 +27,11 @@
#include <string>
#include <vector>
-class Resource;
class Image;
+class ImageSet;
class Music;
+class Resource;
class SoundEffect;
-class ImageSet;
class SpriteDef;
struct SDL_Surface;
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 289df2e5..b4193fd3 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -21,14 +21,13 @@
#include <set>
-#include "spritedef.h"
-
#include "action.h"
#include "animation.h"
#include "dye.h"
#include "image.h"
#include "imageset.h"
#include "resourcemanager.h"
+#include "spritedef.h"
#include "../log.h"
#include "../utils/xml.h"
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index c7b94d9a..4b712340 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -25,10 +25,10 @@
#include <map>
#include <string>
-#include "resource.h"
-
#include <libxml/tree.h>
+#include "resource.h"
+
class Action;
class ImageSet;
diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp
index e8c26df1..544d02b5 100644
--- a/src/simpleanimation.cpp
+++ b/src/simpleanimation.cpp
@@ -19,15 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "simpleanimation.h"
-
#include "graphics.h"
#include "log.h"
+#include "simpleanimation.h"
#include "resources/image.h"
-#include "resources/resourcemanager.h"
#include "resources/imageset.h"
-
+#include "resources/resourcemanager.h"
SimpleAnimation::SimpleAnimation(xmlNodePtr animationNode):
mAnimationTime(0),
diff --git a/src/sound.cpp b/src/sound.cpp
index 888dcc31..6d440134 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -19,11 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "sound.h"
-
#include <SDL.h>
#include "log.h"
+#include "sound.h"
+
#include "resources/resourcemanager.h"
#include "resources/soundeffect.h"
diff --git a/src/sound.h b/src/sound.h
index 0c2af74b..72180607 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -23,7 +23,6 @@
#define _TMW_SOUND_H
#include <SDL_mixer.h>
-
#include <string>
/** Sound engine
diff --git a/src/text.cpp b/src/text.cpp
index 22228ccb..4d36b8fc 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -1,30 +1,29 @@
-/*
- * 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
- */
-
-#include "text.h"
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#include <cstring>
#include <guichan/font.hpp>
+#include "text.h"
#include "textmanager.h"
int Text::mInstances = 0;
diff --git a/src/text.h b/src/text.h
index 995b9a58..173a5686 100644
--- a/src/text.h
+++ b/src/text.h
@@ -1,28 +1,29 @@
-/*
- * 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
- */
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
-#ifndef _TMW_TEXT_H
-#define _TMW_TEXT_H
+#ifndef _AETHYRA_TEXT_H
+#define _AETHYRA_TEXT_H
#include "graphics.h"
+#include "guichanfwd.h"
#include <list>
@@ -75,17 +76,21 @@ class FlashText : public Text
gcn::Color colour);
/**
- * Flash the text for so many refreshes.
+ * Remove the text from the screen
+ */
+ virtual ~FlashText() {}
+
+ /**
+ * Flash the text for so many refreshes
*/
void flash(int time) {mTime = time; }
/**
- * Draws the text.
+ * Draws the text
*/
virtual void draw(Graphics *graphics, int xOff, int yOff);
private:
- int mTime; /**< Time left for flashing. */
+ int mTime; /**< Time left for flashing */
};
-
-#endif // _TMW_TEXT_H
+#endif
diff --git a/src/textmanager.cpp b/src/textmanager.cpp
index 49ad1824..cb5d0bf2 100644
--- a/src/textmanager.cpp
+++ b/src/textmanager.cpp
@@ -1,29 +1,28 @@
-/*
- * 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
- */
-
-#include "textmanager.h"
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#include <cstring>
#include "text.h"
+#include "textmanager.h"
TextManager *textManager = 0;
diff --git a/src/textmanager.h b/src/textmanager.h
index ec82c61f..5b21ba81 100644
--- a/src/textmanager.h
+++ b/src/textmanager.h
@@ -1,26 +1,26 @@
-/*
- * 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
- */
+/***************************************************************************
+ * Copyright (C) 2008 by Douglas Boffey *
+ * *
+ * DougABoffey@netscape.net *
+ * This program 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed with The Mana Experiment *
+ * 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 this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
-#ifndef _TMW_TEXTMANAGER_H
-#define _TMW_TEXTMANAGER_H
+#ifndef _AETHYRA_TEXTMANAGER_H
+#define _AETHYRA_TEXTMANAGER_H
#include <list>
@@ -72,5 +72,4 @@ class TextManager
};
extern TextManager *textManager;
-
-#endif // _TMW_TEXTMANAGER_H
+#endif
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index 308c043d..ed9d5717 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -19,9 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "textparticle.h"
-
#include "graphics.h"
+#include "textparticle.h"
TextParticle::TextParticle(Map *map, const std::string &text,
int colorR, int colorG, int colorB,
diff --git a/src/textparticle.h b/src/textparticle.h
index 3a0ba674..f662621f 100644
--- a/src/textparticle.h
+++ b/src/textparticle.h
@@ -22,11 +22,10 @@
#ifndef _TEXTPARTICLE_H
#define _TEXTPARTICLE_H
-#include "particle.h"
-
#include <guichan/color.hpp>
#include "guichanfwd.h"
+#include "particle.h"
class TextParticle : public Particle
{
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index 8cea60f9..9d8ba836 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -27,8 +27,8 @@
+----------------------------------------------------------------------+
*/
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include "base64.h"
diff --git a/src/utils/dtor.h b/src/utils/dtor.h
index f7c790c6..514ea9e7 100644
--- a/src/utils/dtor.h
+++ b/src/utils/dtor.h
@@ -22,6 +22,7 @@
#ifndef _TMW_UTILS_DTOR_H
#define _TMW_UTILS_DTOR_H
+#include <algorithm>
#include <functional>
#include <utility>
@@ -44,4 +45,11 @@ inline dtor<typename Cont::value_type> make_dtor(Cont const&)
return dtor<typename Cont::value_type>();
}
+template<typename Container>
+inline void delete_all(Container &c)
+{
+ std::for_each(c.begin(), c.end(), make_dtor(c));
+}
+
+
#endif
diff --git a/src/utils/strprintf.cpp b/src/utils/strprintf.cpp
index c5d7a595..c532dd0d 100644
--- a/src/utils/strprintf.cpp
+++ b/src/utils/strprintf.cpp
@@ -45,3 +45,4 @@ std::string strprintf(char const *format, ...)
delete [] buf2;
return res;
}
+
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 47f1bd04..e511ced3 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -20,7 +20,9 @@
*/
#include "xml.h"
+
#include "../log.h"
+
#include "../resources/resourcemanager.h"
namespace XML
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 5a5c756b..9e691963 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -22,10 +22,10 @@
#ifndef _TMW_XML_H
#define _TMW_XML_H
-#include <libxml/tree.h>
-
#include <string>
+#include <libxml/tree.h>
+
/**
* XML helper functions.
*/
diff --git a/src/vector.cpp b/src/vector.cpp
new file mode 100644
index 00000000..7d5f055a
--- /dev/null
+++ b/src/vector.cpp
@@ -0,0 +1,28 @@
+/*
+ * The Mana World
+ * Copyright 2007 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
+ */
+
+#include "vector.h"
+
+std::ostream& operator <<(std::ostream &os, const Vector &v)
+{
+ os << "Vector(" << v.x << ", " << v.y << ", " << v.z << ")";
+ return os;
+}
diff --git a/src/vector.h b/src/vector.h
index b19f6c64..f32b201a 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -22,6 +22,10 @@
#ifndef _TMW_VECTOR_H_
#define _TMW_VECTOR_H_
+#include <math.h>
+
+#include <iostream>
+
/**
* Vector class. Represents either a 3D point in space, a velocity or a force.
* Provides several convenient operator overloads.
@@ -41,7 +45,7 @@ class Vector
/**
* Constructor.
*/
- Vector(float x, float y, float z):
+ Vector(float x, float y, float z = 0.0f):
x(x),
y(y),
z(z)
@@ -69,11 +73,12 @@ class Vector
/**
* In-place scale vector operator.
*/
- void operator*=(float c)
+ Vector &operator*=(float c)
{
x *= c;
y *= c;
z *= c;
+ return *this;
}
/**
@@ -87,6 +92,17 @@ class Vector
}
/**
+ * In-place scale vector operator.
+ */
+ Vector &operator/=(float c)
+ {
+ x /= c;
+ y /= c;
+ z /= c;
+ return *this;
+ }
+
+ /**
* Add vector operator.
*/
Vector operator+(const Vector &v) const
@@ -99,11 +115,12 @@ class Vector
/**
* In-place add vector operator.
*/
- void operator+=(const Vector &v)
+ Vector &operator+=(const Vector &v)
{
x += v.x;
y += v.y;
z += v.z;
+ return *this;
}
/**
@@ -119,14 +136,55 @@ class Vector
/**
* In-place substract vector operator.
*/
- void operator-=(const Vector &v)
+ Vector &operator-=(const Vector &v)
{
x -= v.x;
y -= v.y;
z -= v.z;
+ return *this;
+ }
+
+ /**
+ * Returns the length of this vector. This method does a relatively
+ * slow square root.
+ */
+ float length() const
+ {
+ return sqrtf(x * x + y * y + z * z);
+ }
+
+ /**
+ * Returns the squared length of this vector. Avoids the square root.
+ */
+ float squaredLength() const
+ {
+ return x * x + y * y + z * z;
+ }
+
+ /**
+ * Returns the manhattan length of this vector.
+ */
+ float manhattanLength() const
+ {
+ return fabsf(x) + fabsf(y) + fabsf(z);
+ }
+
+ /**
+ * Returns a normalized version of this vector. This is a unit vector
+ * running parallel to it.
+ */
+ Vector normalized() const
+ {
+ const float l = length();
+ return Vector(x / l, y / l, z / l);
}
float x, y, z;
};
-#endif
+/**
+ * Appends a string representation of a vector to the output stream.
+ */
+std::ostream& operator <<(std::ostream &os, const Vector &v);
+
+#endif // _TMW_VECTOR_H_
diff --git a/src/winver.h b/src/winver.h
index 4452784e..f56d0c6b 100644
--- a/src/winver.h
+++ b/src/winver.h
@@ -1,6 +1,6 @@
-/* VERSION DEFINITIONS */
-#define VER_MAJOR 0
-#define VER_MINOR 0
-#define VER_RELEASE 26
-#define VER_BUILD 0
-#define PACKAGE_VERSION "0.0.26"
+/* VERSION DEFINITIONS */
+#define VER_MAJOR 0
+#define VER_MINOR 0
+#define VER_RELEASE 27
+#define VER_BUILD 0
+#define PACKAGE_VERSION "0.0.27"
diff --git a/tools/adler32.c b/tools/adler32.c
index 4e851713..cd85d58e 100644
--- a/tools/adler32.c
+++ b/tools/adler32.c
@@ -7,9 +7,9 @@
* Usage: adler32 [file]...
*/
+#include <stdlib.h>
#include <stdio.h>
#include <zlib.h>
-
/**
* Calculates the Adler-32 checksum for the given file.
*/
diff --git a/update.sh b/update.sh
new file mode 100755
index 00000000..28dfeca1
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+#automated script to update aethyra from git
+#author=Blame <blame@aethyra.com>
+#last modified 2008-12-03 Tametomo
+file=~/src/aethyra
+file1=~/src
+# test for the aethyra client folder
+if [ -e $file ]; then
+ #change to the aethyra directory
+ cd $file;
+ #issue the git update command
+ git pull;
+ #issue the autobuild command
+ ./autobuild.sh;
+ echo "Aethyra has been updated"
+ exit 1;
+else
+ #make directory /home/user-name/src
+ mkdir $file1
+ #change to directory /home/user-name/src
+ cd $file1
+ #execute the git command to download the client files
+ git clone git://gitorious.org/tmw/aethyra.git
+ #issue the auto build script to compile the client
+ ./autobuild
+ echo "congratulations on installing aethyra enjoy"
+ exit 1;
+fi