summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-04-06 15:12:19 +0100
committerDavid Athay <ko2fan@gmail.com>2009-04-06 15:12:19 +0100
commit004b2853d37a18a67c348c29e4500f3ef68337b5 (patch)
tree12254803a546f6082c3d3ff16ad2fa7fbaf177b1
parent4c6c35c638a340fb8dc5f6bad051e5024dfc1d42 (diff)
parentfa5f2c6d2adc4710cf97dfe1316791cf65d551ef (diff)
downloadmana-004b2853d37a18a67c348c29e4500f3ef68337b5.tar.gz
mana-004b2853d37a18a67c348c29e4500f3ef68337b5.tar.bz2
mana-004b2853d37a18a67c348c29e4500f3ef68337b5.tar.xz
mana-004b2853d37a18a67c348c29e4500f3ef68337b5.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
-rw-r--r--.gitignore1
-rw-r--r--CMake/Modules/FindENet.cmake29
-rw-r--r--CMakeLists.txt2
-rw-r--r--data/CMakeLists.txt1
-rw-r--r--data/graphics/gui/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/Makefile.am4
-rw-r--r--src/gui/buysell.cpp2
-rw-r--r--src/gui/itemcontainer.cpp2
-rw-r--r--src/gui/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/palette.cpp2
-rw-r--r--src/gui/palette.h2
-rw-r--r--src/gui/setup_colors.cpp2
13 files changed, 38 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index 13dc006f..d33302e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ stamp-h1
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
+install_manifest.txt
# files created during build
*.o
diff --git a/CMake/Modules/FindENet.cmake b/CMake/Modules/FindENet.cmake
index 90560063..98da51a3 100644
--- a/CMake/Modules/FindENet.cmake
+++ b/CMake/Modules/FindENet.cmake
@@ -10,23 +10,34 @@ IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
SET(ENet_FIND_QUIETLY TRUE)
ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
-FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
- /usr/include
- /usr/local/include
+# for Windows we rely on the environement variables
+# %INCLUDE% and %LIB%; FIND_LIBRARY checks %LIB%
+# automatically on Windows
+IF(WIN32)
+ FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
+ $ENV{INCLUDE}
)
-
-FIND_LIBRARY(ENet_LIBRARY
- NAMES enet
- PATHS /usr/lib /usr/local/lib
+ FIND_LIBRARY(ENet_LIBRARY
+ NAMES enet
+ )
+ELSE()
+ FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
+ /usr/include
+ /usr/local/include
)
+ FIND_LIBRARY(ENet_LIBRARY
+ NAMES enet
+ PATHS /usr/lib /usr/local/lib
+ )
+ENDIF()
IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
SET(ENET_FOUND TRUE)
SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
SET(ENET_LIBRARIES ${ENet_LIBRARY})
-ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+ELSE ()
SET(ENET_FOUND FALSE)
-ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+ENDIF ()
IF (ENET_FOUND)
IF (NOT ENet_FIND_QUIETLY)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf66c6ae..6cefa798 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,8 +12,10 @@ OPTION(WITH_OPENGL "Enable OpenGL support" ON)
IF (WIN32)
SET(PKG_DATADIR ".")
SET(PKG_BINDIR ".")
+ SET(LOCALEDIR ".")
ELSE (WIN32)
SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/tmw)
+ SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
ENDIF (WIN32)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 35b9d4e2..4aa0cdd5 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -4,4 +4,3 @@ ADD_SUBDIRECTORY(fonts)
ADD_SUBDIRECTORY(graphics)
ADD_SUBDIRECTORY(help)
ADD_SUBDIRECTORY(icons)
-ADD_SUBDIRECTORY(fonts)
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
index cca412f2..aec50890 100644
--- a/data/graphics/gui/CMakeLists.txt
+++ b/data/graphics/gui/CMakeLists.txt
@@ -11,7 +11,6 @@ SET (FILES
close_button.png
deepbox.png
default.png
- equip_bg.png
gui.xml
hscroll_left_default.png
hscroll_left_highlight.png
@@ -26,6 +25,7 @@ SET (FILES
resize.png
selection.png
slider.png
+ sticky_button.png
speechbubble.xml
tab.png
tabselected.png
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b67b81e9..e7566b20 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,7 +11,8 @@ FIND_PACKAGE(PNG REQUIRED)
SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
-SET(FLAGS "${FLAGS} -DTMW_DATADIR=\\\"${PKG_DATADIR}/\\\"")
+SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"")
+SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"")
SET(FLAGS_EA "${FLAGS} -DEATHENA_SUPPORT")
SET(FLAGS_TMW "${FLAGS} -DTMWSERV_SUPPORT")
@@ -501,6 +502,8 @@ SET(SRCS_TMW
net/tmwserv/gameserver/internal.h
net/tmwserv/gameserver/player.cpp
net/tmwserv/gameserver/player.h
+ net/tmwserv/adminhandler.cpp
+ net/tmwserv/adminhandler.h
net/tmwserv/beinghandler.cpp
net/tmwserv/beinghandler.h
net/tmwserv/buysellhandler.cpp
@@ -525,6 +528,8 @@ SET(SRCS_TMW
net/tmwserv/loginhandler.h
net/tmwserv/logouthandler.cpp
net/tmwserv/logouthandler.h
+ net/tmwserv/maphandler.cpp
+ net/tmwserv/maphandler.h
net/tmwserv/network.cpp
net/tmwserv/network.h
net/tmwserv/npchandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 5fa55bc0..d84c792e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,6 +33,8 @@ tmw_SOURCES = gui/widgets/avatar.cpp \
gui/button.h \
gui/buy.cpp \
gui/buy.h \
+ gui/buysell.cpp \
+ gui/buysell.h \
gui/char_select.cpp \
gui/char_select.h \
gui/chat.cpp \
@@ -448,8 +450,6 @@ endif
if SERVER_EATHENA
tmw_CXXFLAGS += -DEATHENA_SUPPORT
tmw_SOURCES += \
- gui/buysell.cpp \
- gui/buysell.h \
gui/char_server.cpp \
gui/char_server.h \
gui/skill.cpp \
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp
index 80e2cdfe..16d9d2ee 100644
--- a/src/gui/buysell.cpp
+++ b/src/gui/buysell.cpp
@@ -86,7 +86,7 @@ void BuySellDialog::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "Sell")
{
- Net::getNpcHandler()->buy(current_npc);
+ Net::getNpcHandler()->sell(current_npc);
}
else if (event.getId() == "Cancel")
{
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 4dac0b25..7420cc18 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -131,7 +131,7 @@ void ItemContainer::draw(gcn::Graphics *graphics)
caption = "(Eq)";
if (item->isEquipped())
- g->setColor(guiPalette->getColor(Palette::ITEM_EQUIPED));
+ g->setColor(guiPalette->getColor(Palette::ITEM_EQUIPPED));
g->drawText(caption, itemX + BOX_WIDTH / 2,
itemY + BOX_HEIGHT - 14, gcn::Graphics::CENTER);
}
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp
index f66aa84d..ce9013aa 100644
--- a/src/gui/itemshortcutcontainer.cpp
+++ b/src/gui/itemshortcutcontainer.cpp
@@ -114,7 +114,7 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
g->drawImage(image, itemX, itemY);
if (item->isEquipped())
- g->setColor(guiPalette->getColor(Palette::ITEM_EQUIPED));
+ g->setColor(guiPalette->getColor(Palette::ITEM_EQUIPPED));
g->drawText(caption, itemX + mBoxWidth / 2,
itemY + mBoxHeight - 14, gcn::Graphics::CENTER);
}
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 5526e802..329a4a29 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -90,7 +90,7 @@ Palette::Palette() :
addColor(HIGHLIGHT, 0xebc873, STATIC, _("Highlight"), 'H');
addColor(TAB_HIGHLIGHT, 0xff0000, PULSE, indent + _("Tab Highlight"));
addColor(SHOP_WARNING, 0x910000, STATIC, indent + _("Item too expensive"));
- addColor(ITEM_EQUIPED, 0x000091, STATIC, indent + _("Item is equiped"));
+ addColor(ITEM_EQUIPPED, 0x000091, STATIC, indent + _("Item is equipped"));
addColor(CHAT, 0x000000, STATIC, _("Chat"), 'C');
addColor(GM, 0xff0000, STATIC, indent + _("GM"), 'G');
diff --git a/src/gui/palette.h b/src/gui/palette.h
index 60f4ca8d..222b4256 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -58,7 +58,7 @@ class Palette : public gcn::ListModel
ENTRY(HIGHLIGHT)\
ENTRY(TAB_HIGHLIGHT)\
ENTRY(SHOP_WARNING)\
- ENTRY(ITEM_EQUIPED)\
+ ENTRY(ITEM_EQUIPPED)\
ENTRY(CHAT)\
ENTRY(GM)\
ENTRY(PLAYER)\
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index fdc2416f..77e726f8 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -237,7 +237,7 @@ void Setup_Colors::action(const gcn::ActionEvent &event)
mPreview->addRow(msg);
break;
- case Palette::ITEM_EQUIPED:
+ case Palette::ITEM_EQUIPPED:
mTextPreview->setTextColor(col);
mTextPreview->setOutline(false);
mTextPreview->setShadow(false);