summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-02-20 16:59:56 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-02-20 16:59:56 +0100
commit551675cb8284b03a1e43be9d11eda0bab7b70139 (patch)
treeeed1121d421176f4044e5f38190c767f6b905388
parentae14594cfa804a89a36312e142498eca7f147cc9 (diff)
parentd4a407254cfffbb79087c1248650fbaed5d568d8 (diff)
downloadmana-551675cb8284b03a1e43be9d11eda0bab7b70139.tar.gz
mana-551675cb8284b03a1e43be9d11eda0bab7b70139.tar.bz2
mana-551675cb8284b03a1e43be9d11eda0bab7b70139.tar.xz
mana-551675cb8284b03a1e43be9d11eda0bab7b70139.zip
Merge branch 'master' into lpc2012
Conflicts: src/graphics.h src/gui/setup_video.cpp src/gui/specialswindow.cpp src/gui/viewport.cpp src/gui/widgets/container.cpp src/gui/widgets/container.h
-rw-r--r--.travis.yml8
-rw-r--r--AUTHORS8
-rw-r--r--CMakeLists.txt2
-rw-r--r--COPYING39
-rw-r--r--docs/FAQ.txt88
-rw-r--r--src/client.cpp3
-rw-r--r--src/gui/setup_video.cpp18
-rw-r--r--src/gui/specialswindow.cpp37
-rw-r--r--src/gui/widgets/container.cpp1
-rw-r--r--src/main.cpp3
-rw-r--r--src/net/manaserv/guildhandler.cpp4
-rw-r--r--src/net/manaserv/playerhandler.cpp1
-rw-r--r--src/net/tmwa/chathandler.cpp5
-rw-r--r--src/playerinfo.cpp5
-rw-r--r--src/playerinfo.h5
15 files changed, 88 insertions, 139 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..3894890b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,8 @@
+language: cpp
+compiler:
+ - gcc
+ - clang
+before_install:
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq build-essential libcurl4-openssl-dev libguichan-dev libphysfs-dev libpng12-dev libpthread-stubs0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev libxml2-dev zlib1g-dev libsdl-gfx1.2-dev
+script: cmake . && make
diff --git a/AUTHORS b/AUTHORS
index 88080c8b..946bd03e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -14,7 +14,7 @@ Andrei Karas (4144) <akaras inbox.ru>
Andrej Sinicyn <andrej4000 gmail.com>
Bernd Wachter (Aard) <bwachter-tmw lart.info>
Blue Sans Douze (Blue112) <bluesansdouze gmail.com>
-Bjrn Steinbrink (Doener) <b.steinbrink gmx.de>
+Björn Steinbrink (Doener) <b.steinbrink gmx.de>
Cedric Borgese (moi1392) <cedric.borgese gmail.com>
Chuck Miller (Kage) <shadowmil gmail.com>
Daniel Bradshaw <daniel+commits the-cell.co.uk>
@@ -32,7 +32,7 @@ Guillaume Melquiond (Silene) <guillaume.melquiond gmail.com>
Ira Rice (Tametomo) <irarice gmail.com>
Jan-Fabian Humann (Mra) <malastare gmx.net>
Jared Adams <jaxad0127 gmail.com>
-Jos vila <linux javila.net>
+José Ávila <linux javila.net>
Joshua Langley <joshlangley optusnet.com.au>
Kess Vargavind <vargavind gmail.com>
Kiyoshi Kyokai <kiyoshi.kyokai gmail.com>
@@ -48,7 +48,7 @@ Scott Ellis <quiche_on_a_leash hotmail.co.uk>
Simon Edwardsson <simon crossnet.se>
Stefan Dombrowski <stefan uni-bonn.de>
Steve Cotton <steve s.cotton.clara.co.uk>
-Thorbjrn Lindeijer <thorbjorn lindeijer.nl>
+Thorbjørn Lindeijer <thorbjorn lindeijer.nl>
Maximilian Philipps <Turmfalke2007 web.de>
Yohann Ferreira <yohann ferreira orange fr>
@@ -69,7 +69,7 @@ Matthias Hartmann (German) <hartmann.matthias gmail.com>
Natsuki Sumon (Spanish) <natsuki.sumon gmail.com>
Rodrigo Chaparro (Spanish) <chapa.com hotmail.es>
Sini Ruohomaa (Finnish) <sini.ruohomaa iki.fi>
-Thorbjrn Lindeijer (Dutch) <thorbjorn lindeijer.nl>
+Thorbjørn Lindeijer (Dutch) <thorbjorn lindeijer.nl>
Yohann Ferreira (French) <yohann ferreira orange fr>
== Other contributors ==
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cf65803..20695d1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ FIND_PACKAGE(Gettext)
OPTION(WITH_OPENGL "Enable OpenGL support" ON)
OPTION(ENABLE_NLS "Enable building of tranlations" ON)
OPTION(ENABLE_MANASERV "Enable Manaserv support" ON)
-OPTION(ENABLE_CPP0X "Enable use of C++0x features" ON)
+OPTION(ENABLE_CPP0X "Enable use of C++0x features" OFF)
IF (WIN32)
SET(PKG_DATADIR ".")
diff --git a/COPYING b/COPYING
index 5b6e7c66..d159169d 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
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
-
+ 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.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
diff --git a/docs/FAQ.txt b/docs/FAQ.txt
deleted file mode 100644
index 17860836..00000000
--- a/docs/FAQ.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-F.A.Q.
-------
-
-HELP
-
-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.
-
- 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 us an e-mail at
- themanaworld-devel@lists.sourceforge.net and you're done. That's not enough?
- No, we don't share our phone numbers! ;P
-
-
-GAME
-
-Q: I always get "Unregistered ID" error message, why?
-
-A: Is the first time you login? Have you registered an account? If not use the
- "Register" button. If you already succesfully connected before, but now
- you're getting this message, please get in touch (see "How to get help").
-
-Q: I always get "Wrong password" but I'm sure I typed it right, why?
-
-A: If is the first time you login be sure you're not adding _M at the end of
- your username. Otherwise just get in touch (see "How to get help").
-
-Q: How can I talk to NPCs?
-
-A: Did you read README? Are you really sure? If not go read it and you'll find
- all the known commands. Or just press F1 in game. If you notice the
- README/ingame help is not up to date/wrong, please report it to the
- developers.
-
-Q: I can't recover HP anymore.
-
-A: Check your inventory, if you've got lots of stuff probably you're
- overweight, try to give away some of them. You get overweight when you're
- carrying 50% of your maximum weight.
-
-
-Git
-
-Q: What's Git?
-
-A: It's a system where is stored the latest development version. It's not
- assured that it's stable, but surely it has the latest updates. (Git version
- is updated quite frequently). If you want to check it out, read this guide
-
- http://wiki.themanaworld.org/index.php/Git
-
-
-DEVELOPMENT
-
-Q: When will the next version be released?
-
-A: We don't have scheduled releases, but usually a new release is available
- every few months. Check http://themanaworld.org/ for further info.
-
-
-Q: How can I contribute?
-
-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. Join our irc channel:
-
- #themanaworld @ irc.freenode.net.
-
- There's also a wiki page about how to get involved:
-
- http://wiki.themanaworld.org/index.php/Joining_the_project
-
- - You can donate money. Follow the link on the project page:
-
- http://sourceforge.net/projects/themanaworld/
-
- - You can be a beta tester. Just play The Mana World and report every
- error to the bug tracker or on the forum.
-
- - Play with The Mana World: more players, more fun! Simple as that! ;-)
diff --git a/src/client.cpp b/src/client.cpp
index 8eb9b154..16c43f19 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -102,9 +102,6 @@
*/
static const int MAX_TICK_VALUE = 10000;
-static const int defaultSfxVolume = 100;
-static const int defaultMusicVolume = 60;
-
// TODO: Get rid fo these globals
std::string errorMessage;
LoginData loginData;
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 05bc6c44..5a697160 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -187,16 +187,24 @@ Setup_Video::Setup_Video():
mFpsSlider->addActionListener(this);
// Do the layout
- getLayout().setHAlign(LayoutCell::FILL);
+ ContainerPlacer place = getPlacer(0, 0);
+ place.getCell().setHAlign(LayoutCell::FILL);
+
place(0, 0, scrollArea, 1, 4).setPadding(2).setHAlign(LayoutCell::FILL);
place(1, 0, space, 1, 4);
place(2, 0, mFsCheckBox);
place(2, 1, mOpenGLCheckBox);
place(2, 2, mCustomCursorCheckBox);
- place(2, 3, mDisableSDLTransparencyCheckBox, 4);
- place(2, 4, mFpsCheckBox);
- place(3, 4, mFpsSlider, 2);
- place(5, 4, mFpsLabel);
+
+ place = getPlacer(0, 1);
+ place.getCell().setHAlign(LayoutCell::FILL);
+
+ place(0, 0, space, 3);
+ place(0, 1, mDisableSDLTransparencyCheckBox, 4);
+
+ place(0, 2, mFpsCheckBox);
+ place(1, 2, mFpsSlider, 2);
+ place(3, 2, mFpsLabel);
}
Setup_Video::~Setup_Video()
diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp
index dd287791..ac1f460b 100644
--- a/src/gui/specialswindow.cpp
+++ b/src/gui/specialswindow.cpp
@@ -127,19 +127,20 @@ void SpecialsWindow::draw(gcn::Graphics *graphics)
bool foundNew = false;
unsigned int found = 0; // number of entries in specialData which match mEntries
- for (std::map<int, Special>::iterator i = specialData.begin();
- i != specialData.end();
- i++)
+ for (std::map<int, Special>::iterator it = specialData.begin();
+ it != specialData.end(); ++it)
{
- std::map<int, SpecialEntry *>::iterator e = mEntries.find(i->first);
+ std::map<int, SpecialEntry *>::iterator e = mEntries.find(it->first);
if (e == mEntries.end())
{
// found a new special - abort update and rebuild from scratch
foundNew = true;
break;
- } else {
+ }
+ else
+ {
// update progress bar of special
- e->second->update(i->second.currentMana, i->second.neededMana);
+ e->second->update(it->second.currentMana, it->second.neededMana);
found++;
}
}
@@ -152,28 +153,30 @@ void SpecialsWindow::draw(gcn::Graphics *graphics)
void SpecialsWindow::rebuild(const std::map<int, Special> &specialData)
{
- make_dtor(mEntries);
+ delete_all(mEntries);
+
mEntries.clear();
int vPos = 0; //vertical position of next placed element
- for (std::map<int, Special>::const_iterator i = specialData.begin();
- i != specialData.end();
- i++)
+ for (std::map<int, Special>::const_iterator it = specialData.begin();
+ it != specialData.end(); ++it)
{
- logger->log("Updating special GUI for %d", i->first);
+ logger->log("Updating special GUI for %d", it->first);
- SpecialInfo* info = SpecialDB::get(i->first);
+ SpecialInfo *info = SpecialDB::get(it->first);
if (info)
{
- info->rechargeCurrent = i->second.currentMana;
- info->rechargeNeeded = i->second.neededMana;
+ info->rechargeCurrent = it->second.currentMana;
+ info->rechargeNeeded = it->second.neededMana;
SpecialEntry* entry = new SpecialEntry(info);
entry->setPosition(0, vPos);
vPos += entry->getHeight() + 3;
add(entry);
- mEntries[i->first] = entry;
- } else {
- logger->log("Warning: No info available of special %d", i->first);
+ mEntries[it->first] = entry;
+ }
+ else
+ {
+ logger->log("Warning: No info available of special %d", it->first);
}
}
}
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index 61211ddd..11566a4a 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -55,6 +55,7 @@ ContainerPlacer Container::getPlacer(int x, int y)
return ContainerPlacer(this, &getLayout().at(x, y));
}
+
void Container::updateLayout()
{
const gcn::Rectangle area = getChildrenArea();
diff --git a/src/main.cpp b/src/main.cpp
index b7669f0e..e3225d63 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -150,7 +150,8 @@ static void parseOptions(int argc, char *argv[], Client::Options &options)
options.noOpenGL = true;
break;
case 'T':
- options.chatLogDir = std::string(optarg);
+ options.chatLogDir = optarg;
+ break;
case 'i':
options.screenshotDir = optarg;
break;
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index cd22fcec..19fa03ca 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -105,6 +105,10 @@ void GuildHandler::handleMessage(MessageIn &msg)
{
SERVER_NOTICE(_("Invited player can't join another guild."));
}
+ else // any other failure
+ {
+ SERVER_NOTICE(_("Invite failed."));
+ }
} break;
case CPMSG_GUILD_ACCEPT_RESPONSE:
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index c2c491d5..484e551a 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -248,6 +248,7 @@ void PlayerHandler::handleMessage(MessageIn &msg)
case GPMSG_SPECIAL_STATUS :
{
+ PlayerInfo::clearSpecialStatus();
while (msg.getUnreadLength())
{
// { B specialID, L current, L max, L recharge }
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 9e5e7b19..155263b5 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -181,6 +181,11 @@ void ChatHandler::handleMessage(MessageIn &msg)
| PlayerRelation::SPEECH_FLOAT);
}
+ // This is a sure sign of some special command of manaplus,
+ // none of those are supported at the moment.
+ if (chatMsg.compare(0, 2, "\302\202") == 0)
+ return;
+
trim(chatMsg);
std::string reducedMessage = chatMsg;
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index 692090af..03c48340 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -282,6 +282,11 @@ void setBuySellState(BuySellState buySellState)
// --- Specials ---------------------------------------------------------------
+void clearSpecialStatus()
+{
+ mSpecials.clear();
+}
+
void setSpecialStatus(int id, int current, int max, int recharge)
{
logger->log("SpecialUpdate Skill #%d -- (%d/%d) -> %d", id, current, max,
diff --git a/src/playerinfo.h b/src/playerinfo.h
index d7483cc1..e228ec7e 100644
--- a/src/playerinfo.h
+++ b/src/playerinfo.h
@@ -225,6 +225,11 @@ namespace PlayerInfo
// --- Specials ---------------------------------------------------------------
/**
+ * Removes all specials.
+ */
+ void clearSpecialStatus();
+
+ /**
* Changes the status of the given special.
*/
void setSpecialStatus(int id, int current, int max, int recharge);