diff options
Diffstat (limited to 'src')
141 files changed, 2543 insertions, 697 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 67943d365..059eef64f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -47,7 +47,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) SET(EXTRA_LIBRARIES rt) ENDIF() -SET(FLAGS "${FLAGS} -DUSE_MUMBLE") +SET(FLAGS "${FLAGS} -DUSE_MUMBLE -DUSE_INTERNALGUICHAN") IF (WITH_OPENGL) FIND_PACKAGE(OpenGL REQUIRED) @@ -796,7 +796,6 @@ SET(SRCS_GUICHAN guichan/include/guichan/mouseevent.hpp guichan/include/guichan/mouseinput.hpp guichan/include/guichan/mouselistener.hpp - guichan/include/guichan/platform.hpp guichan/include/guichan/rectangle.hpp guichan/include/guichan/selectionevent.hpp guichan/include/guichan/selectionlistener.hpp diff --git a/src/Makefile.am b/src/Makefile.am index 7d6abb875..ba0fbc800 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -189,7 +189,6 @@ manaplus_SOURCES += guichan/include/guichan/actionevent.hpp \ guichan/include/guichan/mouseevent.hpp \ guichan/include/guichan/mouseinput.hpp \ guichan/include/guichan/mouselistener.hpp \ - guichan/include/guichan/platform.hpp \ guichan/include/guichan/rectangle.hpp \ guichan/include/guichan/selectionevent.hpp \ guichan/include/guichan/selectionlistener.hpp \ diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index cc04e60a1..bc7be23a9 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -211,11 +211,11 @@ impHandler(outfit) impHandler0(mouseClick) { - if (!guiInput) + if (!guiInput || !gui) return false; int mouseX, mouseY; - SDL_GetMouseState(&mouseX, &mouseY); + gui->getMouseState(&mouseX, &mouseY); guiInput->simulateMouseClick(mouseX, mouseY, gcn::MouseEvent::RIGHT); return true; } @@ -388,7 +388,7 @@ impHandler0(heal) { if (actorManager) { - if (inputManager.isActionActive(Input::KEY_MOD)) + if (inputManager.isActionActive(Input::KEY_STOP_ATTACK)) { Being *target = player_node->getTarget(); if (!target || target->getType() != ActorSprite::PLAYER) diff --git a/src/being/being.cpp b/src/being/being.cpp index aa2b875af..f9667ca33 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -134,6 +134,8 @@ Being::Being(const int id, const Type type, const uint16_t subtype, mAttackSpeed(350), mLevel(0), mAttackRange(1), + mLastAttackX(0), + mLastAttackY(0), mGender(GENDER_UNSPECIFIED), mAction(STAND), mSubType(0xFFFF), @@ -760,6 +762,9 @@ void Being::handleAttack(Being *const victim, const int damage, if (this != player_node) setAction(Being::ATTACK, attackId); + mLastAttackX = victim->getTileX(); + mLastAttackY = victim->getTileY(); + if (mType == PLAYER && mEquippedWeapon) fireMissile(victim, mEquippedWeapon->getMissileParticleFile()); else if (mInfo->getAttack(attackId)) @@ -1720,14 +1725,24 @@ void Being::petLogic() return; } } - if (mAction == STAND) + if (mOwner->getCurrentAction() != ATTACK) + { + if (mAction == ATTACK) + setAction(STAND, 0); + } + else + { + if (mAction == STAND || mAction == ATTACK) + setAction(ATTACK, 0); + } + + if (mAction == STAND || mAction == ATTACK) { int directionType = 0; switch (mOwner->getCurrentAction()) { case STAND: case MOVE: - case ATTACK: case HURT: case SPAWN: default: @@ -1739,6 +1754,9 @@ void Being::petLogic() case DEAD: directionType = mInfo->getDeadDirectionType(); break; + case ATTACK: + directionType = mInfo->getAttackDirectionType(); + break; } int newDir = 0; @@ -1773,6 +1791,21 @@ void Being::petLogic() else if (dstY < dstY0) newDir |= UP; break; + + case 4: + { + const int dstX2 = mOwner->getLastAttackX(); + const int dstY2 = mOwner->getLastAttackY(); + if (dstX > dstX2) + newDir |= LEFT; + else if (dstX < dstX2) + newDir |= RIGHT; + if (dstY > dstY2) + newDir |= UP; + else if (dstY < dstY2) + newDir |= DOWN; + break; + } } if (newDir && newDir != getDirection()) setDirection(newDir); @@ -2131,7 +2164,7 @@ void Being::setSprite(const unsigned int slot, const int id, if (id1) { const ItemInfo &info = ItemDB::get(id1); - if (mMap && mType == PLAYER) + if (!isTempSprite && mMap && mType == PLAYER) { const int pet = info.getPet(); if (pet) @@ -2146,7 +2179,7 @@ void Being::setSprite(const unsigned int slot, const int id, const std::string filename = info.getSprite(mGender, mSubType); AnimatedSprite *equipmentSprite = nullptr; - if (mType == PLAYER) + if (!isTempSprite && mType == PLAYER) { const int pet = info.getPet(); if (pet) @@ -3337,6 +3370,10 @@ void Being::fixPetSpawnPos(int &dstX, int &dstY) const break; case ATTACK: + offsetX1 = mInfo->getAttackOffsetX(); + offsetY1 = mInfo->getAttackOffsetY(); + break; + case SPAWN: case HURT: case STAND: diff --git a/src/being/being.h b/src/being/being.h index 7314fe1f1..d3dfe2cc1 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -930,6 +930,12 @@ class Being : public ActorSprite, public ConfigListener int decUsage() { return --mUsageCounter; } + virtual int getLastAttackX() const + { return mLastAttackX; } + + virtual int getLastAttackY() const + { return mLastAttackY; } + protected: /** * Updates name's location. @@ -996,6 +1002,8 @@ class Being : public ActorSprite, public ConfigListener int mLevel; int mAttackRange; + int mLastAttackX; + int mLastAttackY; Gender mGender; Action mAction; /**< Action the being is performing */ uint16_t mSubType; /**< Subtype (graphical view, basically) */ diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 0e6ebe8a4..88a6f6754 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -503,6 +503,12 @@ class LocalPlayer final : public Being, std::string getGameModifiersString(); + int getLastAttackX() const override final + { return mTarget ? mTarget->getTileX() : mLastAttackX; } + + int getLastAttackY() const override final + { return mTarget ? mTarget->getTileY() : mLastAttackY; } + protected: void updateCoords() override final; diff --git a/src/client.cpp b/src/client.cpp index 289b4df0b..4d301ccfe 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -226,6 +226,7 @@ Client::Client(const Options &options) : mRootDir(), mServerName(), mOnlineListUrl(), + mLogFileName(), mCurrentServer(), mGame(nullptr), mCurrentDialog(nullptr), @@ -293,9 +294,10 @@ void Client::gameInit() // Configure logger if (!mOptions.logFileName.empty()) - logger->setLogFile(mOptions.logFileName); + mLogFileName = mOptions.logFileName; else - logger->setLogFile(mLocalDataDir + "/manaplus.log"); + mLogFileName = mLocalDataDir + "/manaplus.log"; + logger->setLogFile(mLogFileName); #ifdef USE_FUZZER Fuzzer::init(); @@ -544,6 +546,7 @@ void Client::initGraphics() #endif #endif + checkConfigVersion(); #if defined(WIN32) || defined(__APPLE__) if (config.getBoolValue("centerwindow")) setEnv("SDL_VIDEO_CENTERED", "1"); @@ -575,7 +578,6 @@ void Client::initGraphics() runCounters = config.getBoolValue("packetcounters"); applyVSync(); graphicsManager.setVideoMode(); - checkConfigVersion(); getConfigDefaults2(config.getDefaultValues()); applyGrabMode(); applyGamma(); @@ -2301,7 +2303,7 @@ void Client::initScreenshotDir() else if (mScreenshotDir.empty()) { mScreenshotDir = decodeBase64String( - config.getStringValue("screenshotDirectory2")); + config.getStringValue("screenshotDirectory3")); if (mScreenshotDir.empty()) { #ifdef __ANDROID__ @@ -2328,7 +2330,7 @@ void Client::initScreenshotDir() configScreenshotSuffix); } } - config.setValue("screenshotDirectory2", + config.setValue("screenshotDirectory3", encodeBase64String(mScreenshotDir)); } } @@ -2359,6 +2361,7 @@ void Client::accountLogin(LoginData *const data) const serverConfig.setValue("remember", remember); } +#ifndef ANDROID void Client::storeSafeParameters() const { bool tmpHwaccel; @@ -2477,6 +2480,7 @@ void Client::storeSafeParameters() const config.setValue("screenheight", height); } } +#endif void Client::initTradeFilter() const { @@ -2796,25 +2800,30 @@ bool Client::isTmw() const return false; } -void Client::resizeVideo(int width, int height, const bool always) +void Client::resizeVideo(int actualWidth, + int actualHeight, + const bool always) { // Keep a minimum size. This isn't adhered to by the actual window, but // it keeps some window positions from getting messed up. - width = std::max(470, width); - height = std::max(320, height); + actualWidth = std::max(470, actualWidth); + actualHeight = std::max(320, actualHeight); if (!mainGraphics) return; - if (!always && mainGraphics->mWidth == width - && mainGraphics->mHeight == height) + if (!always + && mainGraphics->mActualWidth == actualWidth + && mainGraphics->mActualHeight == actualHeight) { return; } - touchManager.resize(width, height); - - if (mainGraphics->resizeScreen(width, height)) + if (mainGraphics->resizeScreen(actualWidth, actualHeight)) { + const int width = mainGraphics->mWidth; + const int height = mainGraphics->mHeight; + touchManager.resize(width, height); + if (gui) gui->videoResized(); @@ -2850,8 +2859,8 @@ void Client::resizeVideo(int width, int height, const bool always) if (gui) gui->draw(); - config.setValue("screenwidth", width); - config.setValue("screenheight", height); + config.setValue("screenwidth", actualWidth); + config.setValue("screenheight", actualHeight); } } @@ -2885,6 +2894,17 @@ void Client::applyKeyRepeat() #endif } +void Client::applyScale() +{ + const int scale = config.getIntValue("scale"); + if (mainGraphics->getScale() == scale) + return; + mainGraphics->setScale(scale); + resizeVideo(mainGraphics->mActualWidth, + mainGraphics->mActualHeight, + true); +} + void Client::setIsMinimized(const bool n) { mIsMinimized = n; @@ -2958,8 +2978,10 @@ void Client::checkConfigVersion() Being::NO_NAME_IN_BUBBLE)); } } + if (version < 6) + config.setValue("blur", false); - config.setValue("cfgver", 5); + config.setValue("cfgver", 6); } Window *Client::openErrorDialog(const std::string &header, diff --git a/src/client.h b/src/client.h index c166b438b..92daff44b 100644 --- a/src/client.h +++ b/src/client.h @@ -272,6 +272,9 @@ public: std::string getSupportUrl() const A_WARN_UNUSED { return mCurrentServer.supportUrl; } + std::string getLogFileName() const A_WARN_UNUSED + { return mLogFileName; } + bool isKeyboardVisible() const; void setGuiAlpha(const float n) @@ -308,7 +311,11 @@ public: void writePacketLimits(const std::string &packetLimitsName) const; - void resizeVideo(int width, int height, const bool always = false); + void resizeVideo(int actualWidth, + int actualHeight, + const bool always); + + void applyScale(); bool limitPackets(const int type) A_WARN_UNUSED; @@ -366,7 +373,9 @@ private: void accountLogin(LoginData *const data) const; +#ifndef ANDROID void storeSafeParameters() const; +#endif void backupConfig() const; @@ -406,6 +415,7 @@ private: std::string mRootDir; std::string mServerName; std::string mOnlineListUrl; + std::string mLogFileName; ServerInfo mCurrentServer; diff --git a/src/commands.cpp b/src/commands.cpp index 07e0414d5..04cd84166 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -58,6 +58,7 @@ #include "net/adminhandler.h" #include "net/beinghandler.h" #include "net/chathandler.h" +#include "net/download.h" #include "net/gamehandler.h" #include "net/guildhandler.h" #include "net/net.h" @@ -96,7 +97,8 @@ extern char **environ; namespace Commands { -static void outString(ChatTab *const tab, const std::string &str, +static void outString(ChatTab *const tab, + const std::string &str, const std::string &def) { if (!tab) @@ -236,7 +238,7 @@ static void outStringNormal(ChatTab *const tab, case ChatTab::TAB_WHISPER: { const WhisperTab *const whisper - = static_cast<WhisperTab *const>(tab); + = static_cast<const WhisperTab *const>(tab); tab->chatLog(player_node->getName(), str); Net::getChatHandler()->privateMessage(whisper->getNick(), str); break; @@ -1268,6 +1270,94 @@ impHandler1(talkPet) Net::getChatHandler()->talk(args, GENERAL_CHANNEL); } + +struct UploadChatInfo +{ + UploadChatInfo() : + tab(nullptr), + upload(nullptr), + text(), + addStr() + { } + + A_DELETE_COPY(UploadChatInfo) + + ChatTab *tab; + Net::Download *upload; + std::string text; + std::string addStr; +}; + +static int uploadUpdate(void *ptr, + DownloadStatus status, + size_t total A_UNUSED, + size_t remaining A_UNUSED) +{ + if (status == DOWNLOAD_STATUS_IDLE || status == DOWNLOAD_STATUS_STARTING) + return 0; + + UploadChatInfo *const info = reinterpret_cast<UploadChatInfo*>(ptr); + if (status == DOWNLOAD_STATUS_COMPLETE) + { + ChatTab *const tab = info->tab; + if (chatWindow && (!tab || chatWindow->isTabPresent(tab))) + { + std::string str = Net::Download::getUploadResponse(); + const int sz = str.size(); + if (sz > 0) + { + if (str[sz - 1] == '\n') + str = str.substr(0, sz - 1); + str.append(info->addStr); + str = strprintf("%s [@@%s |%s@@]", + info->text.c_str(), str.c_str(), str.c_str()); + outStringNormal(tab, str, str); + } + } + } + delete info->upload; + info->upload = nullptr; + delete info; + return 0; +} + +static void uploadFile(const std::string &str, + const std::string &fileName, + const std::string &addStr) +{ + UploadChatInfo *const info = new UploadChatInfo(); + Net::Download *const upload = new Net::Download(info, + "http://sprunge.us", + &uploadUpdate, + false, true); + info->upload = upload; + info->text = str; + info->addStr = addStr; + upload->setFile(fileName); + upload->start(); +} + +impHandler0(uploadConfig) +{ + uploadFile(_("Uploaded config into:"), + config.getFileName(), + "?xml"); +} + +impHandler0(uploadServerConfig) +{ + uploadFile(_("Uploaded server config into:"), + serverConfig.getFileName(), + "?xml"); +} + +impHandler0(uploadLog) +{ + uploadFile(_("Uploaded log into:"), + client->getLogFileName(), + "?txt"); +} + impHandler0(testsdlfont) { #if defined USE_OPENGL && defined DEBUG_SDLFONT @@ -1311,6 +1401,12 @@ impHandler0(testsdlfont) #endif } +impHandler2(dumpMods) +{ + std::string str = "enabled mods: " + serverConfig.getValue("mods", ""); + outStringNormal(tab, str, str); +} + #ifdef USE_OPENGL impHandler2(dumpGL) { diff --git a/src/commands.h b/src/commands.h index a31dfe292..e53d66559 100644 --- a/src/commands.h +++ b/src/commands.h @@ -116,6 +116,7 @@ namespace Commands decHandler(dumpTests); decHandler(dumpOGL); decHandler(dumpGL); + decHandler(dumpMods); decHandler(cacheInfo); decHandler(execute); decHandler(testsdlfont); @@ -129,6 +130,9 @@ namespace Commands decHandler(createItems); decHandler(talkRaw); decHandler(talkPet); + decHandler(uploadConfig); + decHandler(uploadServerConfig); + decHandler(uploadLog); void replaceVars(std::string &str); } // namespace Commands @@ -205,6 +209,7 @@ enum COMMAND_DUMPT, COMMAND_DUMPOGL, COMMAND_DUMPGL, + COMMAND_DUMPMODS, COMMAND_URL, COMMAND_OPEN, COMMAND_EXECUTE, @@ -225,6 +230,9 @@ enum COMMAND_CREATEITEMS, COMMAND_TALKRAW, COMMAND_TALKPET, + COMMAND_UPLOADCONFIG, + COMMAND_UPLOADSERVERCONFIG, + COMMAND_UPLOADLOG, COMMAND_HACK, END_COMMANDS }; @@ -301,6 +309,7 @@ static const CommandInfo commands[] = {"dumpt", &Commands::dumpTests, -1, false}, {"dumpogl", &Commands::dumpOGL, -1, false}, {"dumpgl", &Commands::dumpGL, -1, false}, + {"dumpmods", &Commands::dumpMods, -1, false}, {"url", &Commands::url, -1, true}, {"open", &Commands::open, -1, true}, {"execute", &Commands::execute, -1, true}, @@ -321,6 +330,9 @@ static const CommandInfo commands[] = {"createitems", &Commands::createItems, -1, false}, {"talkraw", &Commands::talkRaw, -1, true}, {"talkpet", &Commands::talkPet, -1, true}, + {"uploadconfig", &Commands::uploadConfig, -1, false}, + {"uploadserverconfig", &Commands::uploadServerConfig, -1, false}, + {"uploadlog", &Commands::uploadLog, -1, false}, {"hack", &Commands::hack, -1, true} }; diff --git a/src/configuration.cpp b/src/configuration.cpp index ca4542155..d4b9f122b 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -202,6 +202,8 @@ const std::string unusedKeys[] = "OutfitAwayIndex", "playerHomes", "remember", + "screenshotDirectory", + "screenshotDirectory2", "" }; diff --git a/src/configuration.h b/src/configuration.h index 322d4c934..daa10f51b 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -343,6 +343,9 @@ class Configuration final : public ConfigurationObject void removeOldKeys(); + std::string getFileName() const A_WARN_UNUSED + { return mFilename; } + private: /** * Clean up the default values member. diff --git a/src/defaults.cpp b/src/defaults.cpp index 9362473fd..c343f9f11 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -152,7 +152,7 @@ DefaultsData* getConfigDefaults() AddDEF("lastCharacter", ""); AddDEF("altfpslimit", 5); AddDEF("updatehost", ""); - AddDEF("screenshotDirectory2", ""); + AddDEF("screenshotDirectory3", ""); AddDEF("useScreenshotDirectorySuffix", true); AddDEF("screenshotDirectorySuffix", ""); AddDEF("EnableSync", false); @@ -345,7 +345,7 @@ DefaultsData* getConfigDefaults() AddDEF("uselonglivesprites", false); AddDEF("uselonglivesounds", true); AddDEF("screenDensity", 0); - AddDEF("cfgver", 4); + AddDEF("cfgver", 6); AddDEF("enableDebugLog", false); AddDEF("doubleClick", true); AddDEF("useDiagonalSpeed", true); @@ -356,6 +356,7 @@ DefaultsData* getConfigDefaults() AddDEF("showmotd", false); AddDEF("playMapAnimations", true); AddDEF("usepets", true); + AddDEF("scale", 1); return configData; } diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 6c102bdc1..237e7bf68 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -77,7 +77,7 @@ bool EventsManager::handleCommonEvents(const SDL_Event &event) return true; #else case SDL_VIDEORESIZE: - client->resizeVideo(event.resize.w, event.resize.h); + client->resizeVideo(event.resize.w, event.resize.h, false); return true; case SDL_ACTIVEEVENT: handleActive(event); diff --git a/src/game.cpp b/src/game.cpp index 91a9038c8..6e4341372 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -524,7 +524,6 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot) } // Search for an unused screenshot name - std::stringstream filenameSuffix; std::stringstream filename; std::fstream testExists; bool found = false; diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 552f5a018..00cceb22f 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -376,9 +376,10 @@ void GraphicsManager::setVideoMode() int width = config.getIntValue("screenwidth"); int height = config.getIntValue("screenheight"); #endif + const int scale = config.getIntValue("scale"); // Try to set the desired video mode - if (!mainGraphics->setVideoMode(width, height, bpp, + if (!mainGraphics->setVideoMode(width, height, scale, bpp, fullscreen, hwaccel, enableResize, noFrame)) { logger->log(strprintf("Couldn't set %dx%dx%d video mode: %s", @@ -396,7 +397,7 @@ void GraphicsManager::setVideoMode() config.setValueInt("screenwidth", oldWidth); config.setValueInt("screenheight", oldHeight); config.setValue("screen", oldFullscreen == 1); - if (!mainGraphics->setVideoMode(oldWidth, oldHeight, bpp, + if (!mainGraphics->setVideoMode(oldWidth, oldHeight, scale, bpp, oldFullscreen, hwaccel, enableResize, noFrame)) { logger->safeError(strprintf("Couldn't restore %dx%dx%d " diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index a8c31469a..dcd4d82ea 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -494,7 +494,7 @@ void Gui::draw() touchManager.draw(); int mouseX, mouseY; - const uint8_t button = SDL_GetMouseState(&mouseX, &mouseY); + const uint8_t button = getMouseState(&mouseX, &mouseY); if ((client->getMouseFocused() || button & SDL_BUTTON(1)) && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F) @@ -787,7 +787,7 @@ MouseEvent *Gui::createMouseEvent(Window *const widget) int mouseY = 0; getAbsolutePosition(widget, x, y); - SDL_GetMouseState(&mouseX, &mouseY); + getMouseState(&mouseX, &mouseY); return new MouseEvent(widget, mShiftPressed, mControlPressed, mAltPressed, mMetaPressed, 0, 0, @@ -939,3 +939,12 @@ void Gui::removeDragged(gcn::Widget *widget) if (mFocusHandler->getDraggedWidget() == widget) mFocusHandler->setDraggedWidget(nullptr); } + +uint32_t Gui::getMouseState(int *const x, int *const y) const +{ + const uint32_t res = SDL_GetMouseState(x, y); + const int scale = mainGraphics->getScale(); + (*x) /= scale; + (*y) /= scale; + return res; +} diff --git a/src/gui/gui.h b/src/gui/gui.h index 7c34fc5cf..033a71282 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -164,6 +164,8 @@ class Gui final : public gcn::Gui int getLastMouseY() const { return mLastMouseY; } + uint32_t getMouseState(int *const x, int *const y) const; + protected: void handleMouseMoved(const gcn::MouseInput &mouseInput); diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 19b37a7d6..193a35dfe 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,13 +26,12 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson + * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson * Copyright (C) 2007-2010 The Mana World Development Team - * Copyright (C) 2011-2014 The ManaPlus Developers * * Js_./ * Per Larsson a.k.a finalman _RqZ{a<^_aa - * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a// + * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a// * _Qhm`] _f "'c 1!5m * Visit: http://guichan.darkbits.org )Qk<P ` _: :+' .' "{[ * .)j(] .d_/ '-( P . S @@ -62,6 +81,8 @@ #include "input/inputmanager.h" +#include "render/graphics.h" + #ifdef USE_SDL2 #include "gui/gui.h" #endif @@ -191,14 +212,19 @@ void SDLInput::pushInput(const SDL_Event &event) #endif case SDL_MOUSEBUTTONDOWN: + { mMouseDown = true; - mouseInput.setX(event.button.x); - mouseInput.setY(event.button.y); + const int scale = mainGraphics->getScale(); + const int x = event.button.x / scale; + const int y = event.button.y / scale; + mouseInput.setX(x); + mouseInput.setY(y); #ifdef ANDROID #ifdef USE_SDL2 - mouseInput.setReal(event.button.x, event.button.y); + mouseInput.setReal(x, y); #else - mouseInput.setReal(event.button.realx, event.button.realy); + mouseInput.setReal(event.button.realx / scale, + event.button.realy / scale); #endif #endif mouseInput.setButton(convertMouseButton(event.button.button)); @@ -214,16 +240,21 @@ void SDLInput::pushInput(const SDL_Event &event) mouseInput.setTimeStamp(SDL_GetTicks()); mMouseInputQueue.push(mouseInput); break; - + } case SDL_MOUSEBUTTONUP: + { mMouseDown = false; - mouseInput.setX(event.button.x); - mouseInput.setY(event.button.y); + const int scale = mainGraphics->getScale(); + const int x = event.button.x / scale; + const int y = event.button.y / scale; + mouseInput.setX(x); + mouseInput.setY(y); #ifdef ANDROID #ifdef USE_SDL2 - mouseInput.setReal(event.button.x, event.button.y); + mouseInput.setReal(x, y); #else - mouseInput.setReal(event.button.realx, event.button.realy); + mouseInput.setReal(event.button.realx / scale, + event.button.realy / scale); #endif #endif mouseInput.setButton(convertMouseButton(event.button.button)); @@ -231,15 +262,20 @@ void SDLInput::pushInput(const SDL_Event &event) mouseInput.setTimeStamp(SDL_GetTicks()); mMouseInputQueue.push(mouseInput); break; - + } case SDL_MOUSEMOTION: - mouseInput.setX(event.motion.x); - mouseInput.setY(event.motion.y); + { + const int scale = mainGraphics->getScale(); + const int x = event.motion.x / scale; + const int y = event.motion.y / scale; + mouseInput.setX(x); + mouseInput.setY(y); #ifdef ANDROID #ifdef USE_SDL2 - mouseInput.setReal(event.motion.x, event.motion.y); + mouseInput.setReal(x, y); #else - mouseInput.setReal(event.motion.realx, event.motion.realy); + mouseInput.setReal(event.motion.realx / scale, + event.motion.realy / scale); #endif #endif mouseInput.setButton(gcn::MouseInput::EMPTY); @@ -247,7 +283,7 @@ void SDLInput::pushInput(const SDL_Event &event) mouseInput.setTimeStamp(SDL_GetTicks()); mMouseInputQueue.push(mouseInput); break; - + } #ifndef USE_SDL2 case SDL_ACTIVEEVENT: /* diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index a957ffa86..b07a57a00 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,13 +26,12 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson + * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson * Copyright (C) 2007-2010 The Mana World Development Team - * Copyright (C) 2011-2014 The ManaPlus Developers * * Js_./ * Per Larsson a.k.a finalman _RqZ{a<^_aa - * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a// + * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a// * _Qhm`] _f "'c 1!5m * Visit: http://guichan.darkbits.org )Qk<P ` _: :+' .' "{[ * .)j(] .d_/ '-( P . S diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h index b80052b30..2b9d694a8 100644 --- a/src/gui/setupactiondata.h +++ b/src/gui/setupactiondata.h @@ -96,7 +96,7 @@ static SetupActionData setupActionData0[] = }, { // TRANSLATORS: input action name - N_("Stop Attack"), + N_("Stop Attack / Modifier key"), Input::KEY_STOP_ATTACK, "", }, @@ -1368,12 +1368,6 @@ static SetupActionData setupActionData6[] = }, { // TRANSLATORS: input action name - N_("Modifier key"), - Input::KEY_MOD, - "", - }, - { - // TRANSLATORS: input action name N_("Show onscreen keyboard"), Input::KEY_SHOW_KEYBOARD, "", diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 933c00040..5206b7424 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -275,7 +275,9 @@ void Viewport::logic() void Viewport::_followMouse() { - const uint8_t button = SDL_GetMouseState(&mMouseX, &mMouseY); + if (!gui) + return; + const uint8_t button = gui->getMouseState(&mMouseX, &mMouseY); // If the left button is dragged if (mPlayerFollowMouse && (button & SDL_BUTTON(1))) { @@ -297,10 +299,10 @@ void Viewport::_followMouse() void Viewport::_drawDebugPath(Graphics *const graphics) { - if (!player_node || !userPalette || !actorManager || !mMap) + if (!player_node || !userPalette || !actorManager || !mMap || !gui) return; - SDL_GetMouseState(&mMouseX, &mMouseY); + gui->getMouseState(&mMouseX, &mMouseY); static Path debugPath; static Vector lastMouseDestination = Vector(0.0F, 0.0F); diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp index 52f56ae69..bd3f042f9 100644 --- a/src/gui/widgets/characterdisplay.cpp +++ b/src/gui/widgets/characterdisplay.cpp @@ -122,9 +122,12 @@ void CharacterDisplay::mouseExited(gcn::MouseEvent &event A_UNUSED) void CharacterDisplay::mouseMoved(gcn::MouseEvent &event A_UNUSED) { + if (!gui) + return; + int mouseX = 0; int mouseY = 0; - SDL_GetMouseState(&mouseX, &mouseY); + gui->getMouseState(&mouseX, &mouseY); const std::string &name = mName->getCaption(); if (!name.empty()) { diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index fa413452f..d080a6072 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -220,8 +220,9 @@ void EmoteShortcutContainer::mouseMoved(gcn::MouseEvent &event) if (static_cast<unsigned>(index) < mEmoteImg.size() && mEmoteImg[index]) { + const EmoteSprite *const sprite = mEmoteImg[index]; mEmotePopup->show(viewport->getMouseX(), viewport->getMouseY(), - mEmoteImg[index]->name); + strprintf("%s, %d", sprite->name.c_str(), sprite->id)); } } diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 6ce8ce102..b9ea91f76 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -326,6 +326,30 @@ void SetupItemTextField::save() } } +void SetupItemTextField::cancel(const std::string &eventName A_UNUSED) +{ + load(); + if (mUseBase64) + mValue = decodeBase64String(mValue); + toWidget(); +} + +void SetupItemTextField::externalUpdated(const std::string &eventName A_UNUSED) +{ + load(); + if (mUseBase64) + mValue = decodeBase64String(mValue); + toWidget(); +} + +void SetupItemTextField::rereadValue() +{ + load(); + if (mUseBase64) + mValue = decodeBase64String(mValue); + toWidget(); +} + void SetupItemTextField::createControls() { load(); diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 91547733f..689f62fdf 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -96,7 +96,7 @@ class SetupItem : public gcn::ActionListener, void fixFirstItemSize(gcn::Widget *const widget); - void rereadValue(); + virtual void rereadValue(); void setValue(const std::string str) { mValue = str; } @@ -214,6 +214,13 @@ class SetupItemTextField final : public SetupItem void apply(const std::string &eventName) override final; + void cancel(const std::string &eventName A_UNUSED) override final; + + void externalUpdated(const std::string &eventName A_UNUSED) + override final; + + void rereadValue() override final; + void save() override final; void setUseBase64(const bool b) diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 70e098cd3..da6c89d1a 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -236,6 +236,16 @@ bool TabbedArea::isTabSelected(const unsigned int index) const return mSelectedTab == mTabs[index].first; } +bool TabbedArea::isTabPresent(const Tab *const tab) const +{ + FOR_EACH (TabContainer::const_iterator, it, mTabs) + { + if ((*it).first == tab || (*it).second == tab) + return true; + } + return false; +} + bool TabbedArea::isTabSelected(const Tab *const tab) const { return mSelectedTab == tab; diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 37950e204..eaac7a6d5 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -104,6 +104,8 @@ class TabbedArea final : public Widget2, bool isTabSelected(const Tab *const tab) const A_WARN_UNUSED; + bool isTabPresent(const Tab *const tab) const A_WARN_UNUSED; + /** * Overload the remove tab function as it's broken in guichan 0.8. */ @@ -206,7 +208,7 @@ class TabbedArea final : public Widget2, gcn::Container* mTabContainer; gcn::Container* mWidgetContainer; std::vector<Tab*> mTabsToDelete; - std::vector<std::pair<Tab*, gcn::Widget*> > mTabs; + TabContainer mTabs; /** * The overall width of all tab. diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp index 9f3c30dec..985baa744 100644 --- a/src/gui/widgets/tabs/setup_other.cpp +++ b/src/gui/widgets/tabs/setup_other.cpp @@ -374,7 +374,7 @@ Setup_Other::Setup_Other(const Widget2 *const widget) : #ifndef WIN32 // TRANSLATORS: settings option new SetupItemTextField(_("Screenshot directory"), "", - "screenshotDirectory2", this, "screenshotDirectory2Event", true, true); + "screenshotDirectory3", this, "screenshotDirectory3Event", true, true); #endif // TRANSLATORS: settings option diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index feebb774a..45ada01df 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -84,7 +84,9 @@ class ModeListModel final : public gcn::ListModel int getIndexOf(const std::string &widthXHeightMode); private: +#ifndef ANDROID void addCustomMode(const std::string &mode); +#endif StringVect mVideoModes; }; @@ -122,14 +124,15 @@ ModeListModel::ModeListModel() : addCustomMode("1280x1024"); addCustomMode("1400x900"); addCustomMode("1500x990"); - addCustomMode(toString(mainGraphics->mWidth).append("x") - .append(toString(mainGraphics->mHeight))); + addCustomMode(toString(mainGraphics->mActualWidth).append("x") + .append(toString(mainGraphics->mActualHeight))); std::sort(mVideoModes.begin(), mVideoModes.end(), &modeSorter); mVideoModes.push_back("custom"); #endif } +#ifndef ANDROID void ModeListModel::addCustomMode(const std::string &mode) { StringVectCIter it = mVideoModes.begin(); @@ -142,6 +145,7 @@ void ModeListModel::addCustomMode(const std::string &mode) } mVideoModes.push_back(mode); } +#endif int ModeListModel::getIndexOf(const std::string &widthXHeightMode) { @@ -243,8 +247,9 @@ Setup_Video::Setup_Video(const Widget2 *const widget) : mFpsCheckBox->setSelected(mFps > 0); // Pre-select the current video mode. - const std::string videoMode = toString(mainGraphics->mWidth).append("x") - .append(toString(mainGraphics->mHeight)); + const std::string videoMode = toString( + mainGraphics->mActualWidth).append("x").append( + toString(mainGraphics->mActualHeight)); mModeList->setSelected(mModeListModel->getIndexOf(videoMode)); mModeList->setActionEventId("videomode"); @@ -428,11 +433,11 @@ void Setup_Video::cancel() config.setValue("screen", mFullScreenEnabled); // Set back to the current video mode. - std::string videoMode = toString(mainGraphics->mWidth).append("x") - .append(toString(mainGraphics->mHeight)); + std::string videoMode = toString(mainGraphics->mActualWidth).append("x") + .append(toString(mainGraphics->mActualHeight)); mModeList->setSelected(mModeListModel->getIndexOf(videoMode)); - config.setValue("screenwidth", mainGraphics->mWidth); - config.setValue("screenheight", mainGraphics->mHeight); + config.setValue("screenwidth", mainGraphics->mActualWidth); + config.setValue("screenheight", mainGraphics->mActualHeight); config.setValue("customcursor", mCustomCursorEnabled); config.setValue("opengl", static_cast<int>(mOpenGLEnabled)); @@ -474,18 +479,19 @@ void Setup_Video::action(const gcn::ActionEvent &event) if (!width || !height) return; - if (width != mainGraphics->mWidth || height != mainGraphics->mHeight) + if (width != mainGraphics->mActualWidth + || height != mainGraphics->mActualHeight) { #if defined(WIN32) || defined(__APPLE__) || defined(ANDROID) if (intToRenderType(config.getIntValue("opengl")) == RENDER_SOFTWARE) { - client->resizeVideo(width, height); + client->resizeVideo(width, height, false); } else { - if (width < mainGraphics->mWidth - || height < mainGraphics->mHeight) + if (width < mainGraphics->mActualWidth + || height < mainGraphics->mActualHeight) { // TRANSLATORS: video settings warning new OkDialog(_("Screen Resolution Changed"), @@ -505,13 +511,13 @@ void Setup_Video::action(const gcn::ActionEvent &event) } #else mainGraphics->setWindowSize(width, height); - client->resizeVideo(width, height); + client->resizeVideo(width, height, false); #endif } config.setValue("oldscreen", config.getBoolValue("screen")); - config.setValue("oldscreenwidth", mainGraphics->mWidth); - config.setValue("oldscreenheight", mainGraphics->mHeight); + config.setValue("oldscreenwidth", mainGraphics->mActualWidth); + config.setValue("oldscreenheight", mainGraphics->mActualHeight); config.setValue("screenwidth", width); config.setValue("screenheight", height); } diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp index 7e565a291..8d79fdaa0 100644 --- a/src/gui/widgets/tabs/setup_visual.cpp +++ b/src/gui/widgets/tabs/setup_visual.cpp @@ -87,7 +87,8 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) : mAmbientFxList(new NamesModel), mParticleList(new SetupItemNames), mParticleTypeList(new NamesModel), - mVSyncList(new NamesModel) + mVSyncList(new NamesModel), + mScaleList(new SetupItemNames) { // TRANSLATORS: settings tab name setName(_("Visual")); @@ -99,6 +100,18 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) : mPreferredFirstItemSize = 150; // TRANSLATORS: settings option + new SetupItemLabel(_("Scale"), "", this); + + for (int f = 1; f <= 7; f ++) + { + // TRANSLATORS: particle details + mScaleList->push_back(toString(f) + "x"); + } + new SetupItemSlider2(_("Scale "), "", "scale", + this, "scaleEvent", 1, 7, + mScaleList, true); + + // TRANSLATORS: settings option new SetupItemLabel(_("Notifications"), "", this); // TRANSLATORS: settings option @@ -204,10 +217,15 @@ Setup_Visual::~Setup_Visual() mParticleTypeList = nullptr; delete mVSyncList; mVSyncList = nullptr; + delete mScaleList; + mScaleList = nullptr; } void Setup_Visual::apply() { SetupTabScroll::apply(); Client::applyGrabMode(); +#ifndef WIN32 + client->applyScale(); +#endif } diff --git a/src/gui/widgets/tabs/setup_visual.h b/src/gui/widgets/tabs/setup_visual.h index 3967fd1de..8aef0d294 100644 --- a/src/gui/widgets/tabs/setup_visual.h +++ b/src/gui/widgets/tabs/setup_visual.h @@ -43,6 +43,7 @@ class Setup_Visual final : public SetupTabScroll SetupItemNames *mParticleList; NamesModel *mParticleTypeList; NamesModel *mVSyncList; + SetupItemNames *mScaleList; }; #endif // GUI_WIDGETS_TABS_SETUP_VISUAL_H diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 07fde23cd..41084c867 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -741,10 +741,13 @@ void TextField::mousePressed(gcn::MouseEvent &mouseEvent) mPopupMenu = new PopupMenu(); mPopupMenu->postInit(); } - int x = 0; - int y = 0; - SDL_GetMouseState(&x, &y); - mPopupMenu->showTextFieldPopup(x, y, this); + if (gui) + { + int x = 0; + int y = 0; + gui->getMouseState(&x, &y); + mPopupMenu->showTextFieldPopup(x, y, this); + } } } else diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index e1afb6e5b..6af18ff06 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1481,53 +1481,59 @@ bool ChatWindow::resortChatLog(std::string line, Own own, if (!channel.empty()) prefix = std::string("##3").append(channel).append("##0"); - if (tradeChatTab) + if (findI(line, mTradeFilter) != std::string::npos) { - if (findI(line, mTradeFilter) != std::string::npos) + if (tradeChatTab) { tradeChatTab->chatLog(prefix + line, own, ignoreRecord, tryRemoveColors); - return false; } + return false; + } - size_t idx2 = line.find(": "); - if (idx2 != std::string::npos) + size_t idx2 = line.find(": "); + if (idx2 != std::string::npos) + { + const size_t idx = line.find(": \302\202"); + if (idx == idx2) { - const size_t idx = line.find(": \302\202"); - if (idx == idx2) + if (line.find(": \302\202\302") != std::string::npos) { - if (line.find(": \302\202\302") != std::string::npos) + if (line.find(": \302\202\302e") != std::string::npos) { - if (line.find(": \302\202\302e") != std::string::npos) - { - const std::string nick = line.substr(0, idx2 - 1); - line = line.substr(idx2 + 6); - localPetEmote(nick, atoi(line.c_str())); - } - // ignore other special message formats. - return false; + const std::string nick = line.substr(0, idx2 - 1); + line = line.substr(idx2 + 6); + localPetEmote(nick, atoi(line.c_str())); } + // ignore other special message formats. + return false; + } - // pet talk message detected - if (line.find(": \302\202\303 ") != std::string::npos) + // pet talk message detected + if (line.find(": \302\202\303 ") != std::string::npos) + { + if (actorManager && idx2 > 1) { - if (actorManager && idx2 > 1) - { - const std::string nick = line.substr(0, idx2 - 1); - line = line.substr(idx2 + 6); - localPetSay(nick, line); - } - - return false; + const std::string nick = line.substr(0, idx2 - 1); + line = line.substr(idx2 + 6); + localPetSay(nick, line); } + return false; + } + + if (tradeChatTab) + { line = line.erase(idx + 2, 2); tradeChatTab->chatLog(prefix + line, own, ignoreRecord, tryRemoveColors); - return false; } + return false; } + } + if (tradeChatTab) + { const size_t idx1 = line.find("@@"); if (idx1 != std::string::npos) { @@ -1905,11 +1911,14 @@ void ChatWindow::draw(gcn::Graphics* graphics) void ChatWindow::updateVisibility() { + if (!gui) + return; + int mouseX = 0; int mouseY = 0; int x = 0; int y = 0; - SDL_GetMouseState(&mouseX, &mouseY); + gui->getMouseState(&mouseX, &mouseY); getAbsolutePosition(x, y); if (mChatInput->isVisible()) { @@ -1943,3 +1952,8 @@ void ChatWindow::addGlobalMessage(const std::string &line) else localChatTab->chatLog(line, BY_GM); } + +bool ChatWindow::isTabPresent(const ChatTab *const tab) const +{ + return mChatTabs->isTabPresent(tab); +} diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index 014eceb5a..c000215f1 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -292,6 +292,8 @@ class ChatWindow final : public Window, void postInit() override final; + bool isTabPresent(const ChatTab *const tab) const A_WARN_UNUSED; + static void localPetSay(const std::string &nick, const std::string &text); diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index f521f4b9b..621f5e537 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -48,8 +48,6 @@ #include <guichan/font.hpp> -#include <SDL_mouse.h> - #include "debug.h" static const int BOX_COUNT = 13; @@ -425,9 +423,6 @@ void EquipmentWindow::mouseMoved(gcn::MouseEvent &event) if (item) { - int mouseX, mouseY; - SDL_GetMouseState(&mouseX, &mouseY); - mItemPopup->setItem(item); mItemPopup->position(x + getX(), y + getY()); } diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index da91b84be..02b30aed7 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -425,7 +425,8 @@ void InventoryWindow::action(const gcn::ActionEvent &event) if (PlayerInfo::isItemProtected(item->getId())) return; - if (inputManager.isActionActive(static_cast<int>(Input::KEY_MOD))) + if (inputManager.isActionActive(static_cast<int>( + Input::KEY_STOP_ATTACK))) { PlayerInfo::dropItem(item, item->getQuantity(), true); } @@ -474,10 +475,11 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event) gui->resetClickCount(); const bool mod = (isStorageActive() && inputManager.isActionActive( - static_cast<int>(Input::KEY_MOD))); + static_cast<int>(Input::KEY_STOP_ATTACK))); const bool mod2 = (tradeWindow && tradeWindow->isWindowVisible() - && inputManager.isActionActive(static_cast<int>(Input::KEY_MOD))); + && inputManager.isActionActive(static_cast<int>( + Input::KEY_STOP_ATTACK))); if (!mod && !mod2 && event.getButton() == gcn::MouseEvent::RIGHT) { diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 2a1ec8314..3006922c3 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -573,7 +573,8 @@ void ServerDialog::downloadServerList() mDownload = nullptr; } - mDownload = new Net::Download(this, listFile, &downloadUpdate); + mDownload = new Net::Download(this, listFile, + &downloadUpdate, false, false); mDownload->setFile(std::string(mDir).append("/").append( branding.getStringValue("onlineServerFile"))); mDownload->start(); diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 584f8e90e..eab1bea1b 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -523,12 +523,12 @@ void UpdaterWindow::download() { mDownload = new Net::Download(this, "http://manaplus.org/update/" + mCurrentFile, - &updateProgress, true); + &updateProgress, true, false); } else { mDownload = new Net::Download(this, std::string(mUpdateHost).append( - "/").append(mCurrentFile), &updateProgress); + "/").append(mCurrentFile), &updateProgress, false, false); } if (mStoreInMemory) diff --git a/src/guichan/actionevent.cpp b/src/guichan/actionevent.cpp index 66e9c4529..2a31bfc8b 100644 --- a/src/guichan/actionevent.cpp +++ b/src/guichan/actionevent.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp index 9fc57672f..239a8544e 100644 --- a/src/guichan/basiccontainer.cpp +++ b/src/guichan/basiccontainer.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/cliprectangle.cpp b/src/guichan/cliprectangle.cpp index 666782eb3..c09990087 100644 --- a/src/guichan/cliprectangle.cpp +++ b/src/guichan/cliprectangle.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/color.cpp b/src/guichan/color.cpp index cda98c8e2..27612876f 100644 --- a/src/guichan/color.cpp +++ b/src/guichan/color.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/event.cpp b/src/guichan/event.cpp index e25c8cce1..f4a03bc19 100644 --- a/src/guichan/event.cpp +++ b/src/guichan/event.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/exception.cpp b/src/guichan/exception.cpp index 9d233c935..b02df93eb 100644 --- a/src/guichan/exception.cpp +++ b/src/guichan/exception.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/focushandler.cpp b/src/guichan/focushandler.cpp index 10a0ff542..3249703a3 100644 --- a/src/guichan/focushandler.cpp +++ b/src/guichan/focushandler.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/font.cpp b/src/guichan/font.cpp index 72c378344..982e1ac8c 100644 --- a/src/guichan/font.cpp +++ b/src/guichan/font.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/graphics.cpp b/src/guichan/graphics.cpp index 26098ecb5..b63c4b58c 100644 --- a/src/guichan/graphics.cpp +++ b/src/guichan/graphics.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/gui.cpp b/src/guichan/gui.cpp index 57d149b8b..fa50812de 100644 --- a/src/guichan/gui.cpp +++ b/src/guichan/gui.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/image.cpp b/src/guichan/image.cpp index 26764630f..d60df27a7 100644 --- a/src/guichan/image.cpp +++ b/src/guichan/image.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/include/guichan/actionevent.hpp b/src/guichan/include/guichan/actionevent.hpp index 02ef089b6..b0f75a039 100644 --- a/src/guichan/include/guichan/actionevent.hpp +++ b/src/guichan/include/guichan/actionevent.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_ACTIONEVENT_HPP #include "guichan/event.hpp" -#include "guichan/platform.hpp" #include <string> @@ -75,10 +93,10 @@ namespace gcn * * @see Widget::addActionListener, Widget::removeActionListener, * Widget::distributeActionEvent - * @author Olof Naessén + * @author Olof Naessén * @since 0.6.0 */ - class GCN_CORE_DECLSPEC ActionEvent final : public Event + class ActionEvent final : public Event { public: /** diff --git a/src/guichan/include/guichan/actionlistener.hpp b/src/guichan/include/guichan/actionlistener.hpp index 7d8ff33a8..0f017873b 100644 --- a/src/guichan/include/guichan/actionlistener.hpp +++ b/src/guichan/include/guichan/actionlistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/actionevent.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -57,10 +75,10 @@ namespace gcn * * @see Widget::addActionListener, Widget::removeActionListener, * ActionEvent - * @author Olof Naessén + * @author Olof Naessén * @author Per Larsson */ - class GCN_CORE_DECLSPEC ActionListener + class ActionListener { public: /** diff --git a/src/guichan/include/guichan/basiccontainer.hpp b/src/guichan/include/guichan/basiccontainer.hpp index a17b7314c..a3fb18528 100644 --- a/src/guichan/include/guichan/basiccontainer.hpp +++ b/src/guichan/include/guichan/basiccontainer.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -49,7 +68,6 @@ #include <vector> #include "guichan/deathlistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -62,8 +80,8 @@ namespace gcn * @see Container * @since 0.6.0 */ - class GCN_CORE_DECLSPEC BasicContainer : public Widget, - public DeathListener + class BasicContainer : public Widget, + public DeathListener { public: BasicContainer() : diff --git a/src/guichan/include/guichan/cliprectangle.hpp b/src/guichan/include/guichan/cliprectangle.hpp index bda344897..148a73d5a 100644 --- a/src/guichan/include/guichan/cliprectangle.hpp +++ b/src/guichan/include/guichan/cliprectangle.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_CLIPRECTANGLE_HPP #include "guichan/rectangle.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -58,7 +76,7 @@ namespace gcn * offsets. The offsets are used for calculations from relative * screen coordinates to actual screen coordinates. */ - class GCN_CORE_DECLSPEC ClipRectangle final : public Rectangle + class ClipRectangle final : public Rectangle { public: /** diff --git a/src/guichan/include/guichan/color.hpp b/src/guichan/include/guichan/color.hpp index 56d72a387..c32adb2e9 100644 --- a/src/guichan/include/guichan/color.hpp +++ b/src/guichan/include/guichan/color.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_COLOR_HPP #define GCN_COLOR_HPP -#include "guichan/platform.hpp" - #include <iostream> #include "localconsts.h" @@ -56,7 +73,7 @@ namespace gcn /** * Represents a color with red, green, blue and alpha components. */ - class GCN_CORE_DECLSPEC Color final + class Color final { public: /** diff --git a/src/guichan/include/guichan/deathlistener.hpp b/src/guichan/include/guichan/deathlistener.hpp index 3e7884021..cc8d11990 100644 --- a/src/guichan/include/guichan/deathlistener.hpp +++ b/src/guichan/include/guichan/deathlistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/event.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -56,10 +74,10 @@ namespace gcn * Interface for listening for death events from widgets. * * @see Widget::addDeathListener, Widget::removeDeathListener - * @author Olof Naessén + * @author Olof Naessén * @since 0.6.0 */ - class GCN_CORE_DECLSPEC DeathListener + class DeathListener { public: /** diff --git a/src/guichan/include/guichan/event.hpp b/src/guichan/include/guichan/event.hpp index fa3220d51..2a1f4ca4b 100644 --- a/src/guichan/include/guichan/event.hpp +++ b/src/guichan/include/guichan/event.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_EVENT_HPP #define GCN_EVENT_HPP -#include "guichan/platform.hpp" - #include "localconsts.h" namespace gcn @@ -57,10 +74,10 @@ namespace gcn * Base class for all events. All events in Guichan should * inherit from this class. * - * @author Olof Naessén + * @author Olof Naessén * @since 0.6.0 */ - class GCN_CORE_DECLSPEC Event + class Event { public: /** diff --git a/src/guichan/include/guichan/exception.hpp b/src/guichan/include/guichan/exception.hpp index 63809196d..a60152c96 100644 --- a/src/guichan/include/guichan/exception.hpp +++ b/src/guichan/include/guichan/exception.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,8 +66,6 @@ #include <string> -#include "guichan/platform.hpp" - #include "localconsts.h" #ifndef __FUNCTION__ @@ -85,7 +102,7 @@ namespace gcn * throw GCN_EXCEPTION("my error message"); * @endcode */ - class GCN_CORE_DECLSPEC Exception final + class Exception final { public: /** diff --git a/src/guichan/include/guichan/focushandler.hpp b/src/guichan/include/guichan/focushandler.hpp index 2eba92d1c..6cd326d33 100644 --- a/src/guichan/include/guichan/focushandler.hpp +++ b/src/guichan/include/guichan/focushandler.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <vector> #include "guichan/event.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -68,7 +86,7 @@ namespace gcn * * @since 0.1.0 */ - class GCN_CORE_DECLSPEC FocusHandler + class FocusHandler { public: /** diff --git a/src/guichan/include/guichan/focuslistener.hpp b/src/guichan/include/guichan/focuslistener.hpp index 32d891800..6b3de5c83 100644 --- a/src/guichan/include/guichan/focuslistener.hpp +++ b/src/guichan/include/guichan/focuslistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/event.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -58,10 +76,10 @@ namespace gcn * Interface for listening for focus events from widgets. * * @see Widget::addFocusListener, Widget::removeFocusListener - * @author Olof Naessén + * @author Olof Naessén * @since 0.7.0 */ - class GCN_CORE_DECLSPEC FocusListener + class FocusListener { public: /** diff --git a/src/guichan/include/guichan/font.hpp b/src/guichan/include/guichan/font.hpp index b4550e4fe..8e8ad18c9 100644 --- a/src/guichan/include/guichan/font.hpp +++ b/src/guichan/include/guichan/font.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_FONT_HPP #include <string> -#include "guichan/platform.hpp" #include "localconsts.h" @@ -59,7 +77,7 @@ namespace gcn * * @see ImageFont */ - class GCN_CORE_DECLSPEC Font + class Font { public: /** diff --git a/src/guichan/include/guichan/graphics.hpp b/src/guichan/include/guichan/graphics.hpp index 831e2601a..dd15827fd 100644 --- a/src/guichan/include/guichan/graphics.hpp +++ b/src/guichan/include/guichan/graphics.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -49,7 +68,6 @@ #include <stack> #include "guichan/cliprectangle.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -92,7 +110,7 @@ namespace gcn * SDLGraphics, Image * @since 0.1.0 */ - class GCN_CORE_DECLSPEC Graphics + class Graphics { public: /** diff --git a/src/guichan/include/guichan/gui.hpp b/src/guichan/include/guichan/gui.hpp index 0aa843653..5aca51f4e 100644 --- a/src/guichan/include/guichan/gui.hpp +++ b/src/guichan/include/guichan/gui.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -51,7 +70,6 @@ #include "guichan/keyevent.hpp" #include "guichan/mouseevent.hpp" #include "guichan/mouseinput.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -94,7 +112,7 @@ namespace gcn * * @see Graphics, Input, Image */ - class GCN_CORE_DECLSPEC Gui + class Gui { public: /** diff --git a/src/guichan/include/guichan/image.hpp b/src/guichan/include/guichan/image.hpp index ec2b37188..c39fe21ab 100644 --- a/src/guichan/include/guichan/image.hpp +++ b/src/guichan/include/guichan/image.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,8 +66,6 @@ #include <string> -#include "guichan/platform.hpp" - #include "localconsts.h" namespace gcn @@ -69,7 +86,7 @@ namespace gcn * OpenGLAllegroImageLoader, OpenGLSDLImageLoader, SDLImageLoader * @since 0.1.0 */ - class GCN_CORE_DECLSPEC Image + class Image { public: /** diff --git a/src/guichan/include/guichan/input.hpp b/src/guichan/include/guichan/input.hpp index 538e78e3c..71a15ce85 100644 --- a/src/guichan/include/guichan/input.hpp +++ b/src/guichan/include/guichan/input.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_INPUT_HPP #define GCN_INPUT_HPP -#include "guichan/platform.hpp" - #include "localconsts.h" namespace gcn @@ -66,7 +83,7 @@ namespace gcn * @see AllegroInput, HGEInput, OpenLayerInput, * SDLInput */ - class GCN_CORE_DECLSPEC Input + class Input { public: /** diff --git a/src/guichan/include/guichan/inputevent.hpp b/src/guichan/include/guichan/inputevent.hpp index 732886de8..30b46676d 100644 --- a/src/guichan/include/guichan/inputevent.hpp +++ b/src/guichan/include/guichan/inputevent.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,17 +65,16 @@ #define GCN_INPUTEVENT_HPP #include "guichan/event.hpp" -#include "guichan/platform.hpp" namespace gcn { /** * Base class for all events concerning input. * - * @author Olof Naessén + * @author Olof Naessén * @since 0.6.0 */ - class GCN_CORE_DECLSPEC InputEvent: public Event + class InputEvent: public Event { public: /** diff --git a/src/guichan/include/guichan/key.hpp b/src/guichan/include/guichan/key.hpp index 086969b65..46b36a179 100644 --- a/src/guichan/include/guichan/key.hpp +++ b/src/guichan/include/guichan/key.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_KEY_HPP #define GCN_KEY_HPP -#include "guichan/platform.hpp" - #include "localconsts.h" // windows.h defines DELETE which breaks this file as we have a constant named @@ -61,7 +78,7 @@ namespace gcn /** * Represents a key or a character. */ - class GCN_CORE_DECLSPEC Key final + class Key final { public: /** diff --git a/src/guichan/include/guichan/keyevent.hpp b/src/guichan/include/guichan/keyevent.hpp index 4ccb1bf8e..b3a91f640 100644 --- a/src/guichan/include/guichan/keyevent.hpp +++ b/src/guichan/include/guichan/keyevent.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,7 +66,6 @@ #include "guichan/inputevent.hpp" #include "guichan/key.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -56,7 +74,7 @@ namespace gcn /** * Represents a key event. */ - class GCN_CORE_DECLSPEC KeyEvent: public InputEvent + class KeyEvent: public InputEvent { public: /** diff --git a/src/guichan/include/guichan/keyinput.hpp b/src/guichan/include/guichan/keyinput.hpp index f38bd4d58..421165d1c 100644 --- a/src/guichan/include/guichan/keyinput.hpp +++ b/src/guichan/include/guichan/keyinput.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_KEYINPUT_HPP #include "guichan/key.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -57,7 +75,7 @@ namespace gcn * * @since 0.1.0 */ - class GCN_CORE_DECLSPEC KeyInput + class KeyInput { public: /** diff --git a/src/guichan/include/guichan/keylistener.hpp b/src/guichan/include/guichan/keylistener.hpp index 68657dd0a..bb676052d 100644 --- a/src/guichan/include/guichan/keylistener.hpp +++ b/src/guichan/include/guichan/keylistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_KEYLISTENER_HPP #include "guichan/keyevent.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -59,7 +77,7 @@ namespace gcn * * @see Widget::addKeyListener, Widget::removeKeyListener */ - class GCN_CORE_DECLSPEC KeyListener + class KeyListener { public: /** diff --git a/src/guichan/include/guichan/listmodel.hpp b/src/guichan/include/guichan/listmodel.hpp index 7e46dae4d..4b98f46fe 100644 --- a/src/guichan/include/guichan/listmodel.hpp +++ b/src/guichan/include/guichan/listmodel.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,8 +66,6 @@ #include <string> -#include "guichan/platform.hpp" - #include "localconsts.h" namespace gcn @@ -60,7 +77,7 @@ namespace gcn * like ListBox, make a derived class from this class that * represents your list. */ - class GCN_CORE_DECLSPEC ListModel + class ListModel { public: /** diff --git a/src/guichan/include/guichan/mouseevent.hpp b/src/guichan/include/guichan/mouseevent.hpp index dd385106a..57af098ab 100644 --- a/src/guichan/include/guichan/mouseevent.hpp +++ b/src/guichan/include/guichan/mouseevent.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_MOUSEEVENT_HPP #include "guichan/inputevent.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -56,10 +74,10 @@ namespace gcn /** * Represents a mouse event. * - * @author Olof Naessén + * @author Olof Naessén * @since 0.6.0 */ - class GCN_CORE_DECLSPEC MouseEvent: public InputEvent + class MouseEvent: public InputEvent { public: /** diff --git a/src/guichan/include/guichan/mouseinput.hpp b/src/guichan/include/guichan/mouseinput.hpp index 5037f786a..018205740 100644 --- a/src/guichan/include/guichan/mouseinput.hpp +++ b/src/guichan/include/guichan/mouseinput.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_MOUSEINPUT_HPP #define GCN_MOUSEINPUT_HPP -#include "guichan/platform.hpp" - #include "localconsts.h" namespace gcn @@ -57,11 +74,11 @@ namespace gcn * bother using this class unless you implement an Input class for * a back end. * - * @author Olof Naessén + * @author Olof Naessén * @author Per Larsson * @since 0.1.0 */ - class GCN_CORE_DECLSPEC MouseInput + class MouseInput { public: /** diff --git a/src/guichan/include/guichan/mouselistener.hpp b/src/guichan/include/guichan/mouselistener.hpp index 18bf5c062..a024d202f 100644 --- a/src/guichan/include/guichan/mouselistener.hpp +++ b/src/guichan/include/guichan/mouselistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_MOUSELISTENER_HPP #include "guichan/mouseevent.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -58,7 +76,7 @@ namespace gcn * @see Widget::addMouseListener, Widget::removeMouseListener * @since 0.1.0 */ - class GCN_CORE_DECLSPEC MouseListener + class MouseListener { public: /** diff --git a/src/guichan/include/guichan/platform.hpp b/src/guichan/include/guichan/platform.hpp deleted file mode 100644 index a1a730d53..000000000 --- a/src/guichan/include/guichan/platform.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* _______ __ __ __ ______ __ __ _______ __ __ - * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ - * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / - * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / - * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / - * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / - * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ - * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers - * - * - * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem - * - * Visit: http://guichan.sourceforge.net - * - * License: (BSD) - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name of Guichan nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef GCN_PLATFORM_HPP -#define GCN_PLATFORM_HPP - -#if defined (__MINGW32__) && defined(GUICHAN_BUILD) -#define GCN_CORE_DECLSPEC __declspec(dllexport) - -#elif defined (__MINGW32__) && defined(GUICHAN_EXTENSION_BUILD) -#define GCN_EXTENSION_DECLSPEC __declspec(dllexport) -#define GCN_CORE_DECLSPEC __declspec(dllimport) - -#elif defined (__MINGW32__) && defined(GUICHAN_DLL_IMPORT) -#define GCN_CORE_DECLSPEC __declspec(dllimport) -#define GCN_EXTENSION_DECLSPEC __declspec(dllimport) - -#elif defined(_MSC_VER) && defined(GUICHAN_BUILD) -#define GCN_CORE_DECLSPEC _declspec(dllexport) - -#elif defined(_MSC_VER) && defined(GUICHAN_EXTENSION_BUILD) -#define GCN_CORE_DECLSPEC _declspec(dllimport) -#define GCN_EXTENSION_DECLSPEC _declspec(dllexport) - -#endif - -#ifndef GCN_CORE_DECLSPEC -#define GCN_CORE_DECLSPEC -#endif - -#ifndef GCN_EXTENSION_DECLSPEC -#define GCN_EXTENSION_DECLSPEC -#endif - -#endif // end GCN_PLATFORM_HPP diff --git a/src/guichan/include/guichan/rectangle.hpp b/src/guichan/include/guichan/rectangle.hpp index de32fbb99..b8503db98 100644 --- a/src/guichan/include/guichan/rectangle.hpp +++ b/src/guichan/include/guichan/rectangle.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -45,8 +64,6 @@ #ifndef GCN_RECTANGLE_HPP #define GCN_RECTANGLE_HPP -#include "guichan/platform.hpp" - #include <iostream> #include "localconsts.h" @@ -58,7 +75,7 @@ namespace gcn * * @since 0.1.0 */ - class GCN_CORE_DECLSPEC Rectangle + class Rectangle { public: /** diff --git a/src/guichan/include/guichan/sdl/sdlpixel.hpp b/src/guichan/include/guichan/sdl/sdlpixel.hpp index ab457bc48..99818d42e 100644 --- a/src/guichan/include/guichan/sdl/sdlpixel.hpp +++ b/src/guichan/include/guichan/sdl/sdlpixel.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/include/guichan/selectionevent.hpp b/src/guichan/include/guichan/selectionevent.hpp index 5880be79e..a4a3da0b3 100644 --- a/src/guichan/include/guichan/selectionevent.hpp +++ b/src/guichan/include/guichan/selectionevent.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -46,7 +65,6 @@ #define GCN_SELECTIONEVENT_HPP #include "guichan/event.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -57,10 +75,10 @@ namespace gcn /** * Represents a selection event. * - * @author Olof Naessén + * @author Olof Naessén * @since 0.8.0 */ - class GCN_CORE_DECLSPEC SelectionEvent final: public Event + class SelectionEvent final: public Event { public: /** diff --git a/src/guichan/include/guichan/selectionlistener.hpp b/src/guichan/include/guichan/selectionlistener.hpp index 298a11e3d..0d7f63bd8 100644 --- a/src/guichan/include/guichan/selectionlistener.hpp +++ b/src/guichan/include/guichan/selectionlistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/selectionevent.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -61,10 +79,10 @@ namespace gcn * ListBox::removeSelectionListener, * DropDown::addSelectionListener, * DropDown::removeSelectionListener - * @author Olof Naessén + * @author Olof Naessén * @since 0.8.0 */ - class GCN_CORE_DECLSPEC SelectionListener + class SelectionListener { public: /** diff --git a/src/guichan/include/guichan/widget.hpp b/src/guichan/include/guichan/widget.hpp index f4d316b25..fe02d3b14 100644 --- a/src/guichan/include/guichan/widget.hpp +++ b/src/guichan/include/guichan/widget.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -76,11 +95,11 @@ namespace gcn * NOTE: Functions begining with underscore "_" should not * be overloaded unless you know what you are doing * - * @author Olof Naessén + * @author Olof Naessén * @author Per Larsson. * @since 0.1.0 */ - class GCN_CORE_DECLSPEC Widget + class Widget { public: /** @@ -1010,7 +1029,7 @@ namespace gcn * Distributes hidden events to all of the widget's listeners. * * @since 0.8.0 - * @author Olof Naessén + * @author Olof Naessén */ void distributeHiddenEvent(); @@ -1018,7 +1037,7 @@ namespace gcn * Distributes shown events to all of the widget's listeners. * * @since 0.8.0 - * @author Olof Naessén + * @author Olof Naessén */ void distributeShownEvent(); diff --git a/src/guichan/include/guichan/widgetlistener.hpp b/src/guichan/include/guichan/widgetlistener.hpp index 65cb7fc1d..eb584b0ed 100644 --- a/src/guichan/include/guichan/widgetlistener.hpp +++ b/src/guichan/include/guichan/widgetlistener.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/event.hpp" -#include "guichan/platform.hpp" #include "localconsts.h" @@ -60,10 +78,10 @@ namespace gcn * invoked. * * @see Widget::addWidgetListener, Widget::removeWidgetListener - * @author Olof Naessén + * @author Olof Naessén * @since 0.8.0 */ - class GCN_CORE_DECLSPEC WidgetListener + class WidgetListener { public: /** diff --git a/src/guichan/include/guichan/widgets/button.hpp b/src/guichan/include/guichan/widgets/button.hpp index 225a3c23f..91c526d4f 100644 --- a/src/guichan/include/guichan/widgets/button.hpp +++ b/src/guichan/include/guichan/widgets/button.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -52,7 +71,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouseevent.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -66,10 +84,10 @@ namespace gcn * * @see ImageButton */ - class GCN_CORE_DECLSPEC Button : public Widget, - public MouseListener, - public KeyListener, - public FocusListener + class Button : public Widget, + public MouseListener, + public KeyListener, + public FocusListener { public: /** diff --git a/src/guichan/include/guichan/widgets/checkbox.hpp b/src/guichan/include/guichan/widgets/checkbox.hpp index f89ac355e..465de566d 100644 --- a/src/guichan/include/guichan/widgets/checkbox.hpp +++ b/src/guichan/include/guichan/widgets/checkbox.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -49,7 +68,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -62,7 +80,7 @@ namespace gcn * If a check box's state changes an action event will be sent to all action * listeners of the check box. */ - class GCN_CORE_DECLSPEC CheckBox : + class CheckBox : public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/container.hpp b/src/guichan/include/guichan/widgets/container.hpp index 21a612379..b6efbf361 100644 --- a/src/guichan/include/guichan/widgets/container.hpp +++ b/src/guichan/include/guichan/widgets/container.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -49,7 +68,6 @@ #include "guichan/basiccontainer.hpp" #include "guichan/graphics.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -61,7 +79,7 @@ namespace gcn * * @see Gui::setTop */ - class GCN_CORE_DECLSPEC Container: public BasicContainer + class Container: public BasicContainer { public: /** diff --git a/src/guichan/include/guichan/widgets/label.hpp b/src/guichan/include/guichan/widgets/label.hpp index 804842a07..a8c2ae7ea 100644 --- a/src/guichan/include/guichan/widgets/label.hpp +++ b/src/guichan/include/guichan/widgets/label.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/graphics.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -56,7 +74,7 @@ namespace gcn /** * Implementation of a label capable of displaying a caption. */ - class GCN_CORE_DECLSPEC Label: public Widget + class Label: public Widget { public: /** diff --git a/src/guichan/include/guichan/widgets/listbox.hpp b/src/guichan/include/guichan/widgets/listbox.hpp index e19427a1e..d28664455 100644 --- a/src/guichan/include/guichan/widgets/listbox.hpp +++ b/src/guichan/include/guichan/widgets/listbox.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -50,7 +69,6 @@ #include "guichan/keylistener.hpp" #include "guichan/listmodel.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -68,7 +86,7 @@ namespace gcn * a mouse click or by using the enter or space key an action event will be * sent to all action listeners of the list box. */ - class GCN_CORE_DECLSPEC ListBox : + class ListBox : public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/radiobutton.hpp b/src/guichan/include/guichan/widgets/radiobutton.hpp index 32ec1fdbf..2a93a82ee 100644 --- a/src/guichan/include/guichan/widgets/radiobutton.hpp +++ b/src/guichan/include/guichan/widgets/radiobutton.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -50,7 +69,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -65,7 +83,7 @@ namespace gcn * If a radio button's state changes an action event will be sent to all action * listeners of the check box. */ - class GCN_CORE_DECLSPEC RadioButton : + class RadioButton : public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/scrollarea.hpp b/src/guichan/include/guichan/widgets/scrollarea.hpp index c0d16456b..30fa64abc 100644 --- a/src/guichan/include/guichan/widgets/scrollarea.hpp +++ b/src/guichan/include/guichan/widgets/scrollarea.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -49,7 +68,6 @@ #include "guichan/basiccontainer.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" namespace gcn { @@ -58,7 +76,7 @@ namespace gcn * A scroll area can be customized to always show scroll bars or to show them only when * necessary. */ - class GCN_CORE_DECLSPEC ScrollArea: + class ScrollArea: public BasicContainer, public MouseListener { diff --git a/src/guichan/include/guichan/widgets/slider.hpp b/src/guichan/include/guichan/widgets/slider.hpp index 28c3af0d0..04f774b21 100644 --- a/src/guichan/include/guichan/widgets/slider.hpp +++ b/src/guichan/include/guichan/widgets/slider.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,7 +66,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -59,7 +77,7 @@ namespace gcn * If the selected value is changed an action event will be sent to all * action listeners of the slider. */ - class GCN_CORE_DECLSPEC Slider : + class Slider : public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/textbox.hpp b/src/guichan/include/guichan/widgets/textbox.hpp index 49b2a5d02..a75b52115 100644 --- a/src/guichan/include/guichan/widgets/textbox.hpp +++ b/src/guichan/include/guichan/widgets/textbox.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -51,7 +70,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" namespace gcn @@ -59,7 +77,7 @@ namespace gcn /** * An implementation of a text box where a user can enter text that contains of many lines. */ - class GCN_CORE_DECLSPEC TextBox: + class TextBox: public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/textfield.hpp b/src/guichan/include/guichan/widgets/textfield.hpp index 7b7528c46..b1293045f 100644 --- a/src/guichan/include/guichan/widgets/textfield.hpp +++ b/src/guichan/include/guichan/widgets/textfield.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -47,7 +66,6 @@ #include "guichan/keylistener.hpp" #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widget.hpp" #include <string> @@ -57,7 +75,7 @@ namespace gcn /** * An implementation of a text field where a user can enter a line of text. */ - class GCN_CORE_DECLSPEC TextField: + class TextField: public Widget, public MouseListener, public KeyListener diff --git a/src/guichan/include/guichan/widgets/window.hpp b/src/guichan/include/guichan/widgets/window.hpp index 5fe1bfb21..bf5dd2e7c 100644 --- a/src/guichan/include/guichan/widgets/window.hpp +++ b/src/guichan/include/guichan/widgets/window.hpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * @@ -48,7 +67,6 @@ #include <string> #include "guichan/mouselistener.hpp" -#include "guichan/platform.hpp" #include "guichan/widgets/container.hpp" namespace gcn @@ -56,8 +74,8 @@ namespace gcn /** * An implementation of a movable window that can contain other widgets. */ - class GCN_CORE_DECLSPEC Window : public Container, - public MouseListener + class Window : public Container, + public MouseListener { public: /** diff --git a/src/guichan/inputevent.cpp b/src/guichan/inputevent.cpp index 51dcbcd83..ac7eea5bd 100644 --- a/src/guichan/inputevent.cpp +++ b/src/guichan/inputevent.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/key.cpp b/src/guichan/key.cpp index 559bfa3be..24d817fdb 100644 --- a/src/guichan/key.cpp +++ b/src/guichan/key.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/keyevent.cpp b/src/guichan/keyevent.cpp index 8fdcc837d..1f325ef1d 100644 --- a/src/guichan/keyevent.cpp +++ b/src/guichan/keyevent.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/keyinput.cpp b/src/guichan/keyinput.cpp index 32c1a7234..a18113c8d 100644 --- a/src/guichan/keyinput.cpp +++ b/src/guichan/keyinput.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/mouseevent.cpp b/src/guichan/mouseevent.cpp index 37ebf65c1..c24be1252 100644 --- a/src/guichan/mouseevent.cpp +++ b/src/guichan/mouseevent.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/mouseinput.cpp b/src/guichan/mouseinput.cpp index e4917c33f..b13708bb7 100644 --- a/src/guichan/mouseinput.cpp +++ b/src/guichan/mouseinput.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/rectangle.cpp b/src/guichan/rectangle.cpp index 4f37e5e19..3aca53a0a 100644 --- a/src/guichan/rectangle.cpp +++ b/src/guichan/rectangle.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/selectionevent.cpp b/src/guichan/selectionevent.cpp index fce001cb7..2606d84ef 100644 --- a/src/guichan/selectionevent.cpp +++ b/src/guichan/selectionevent.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp index 3ccec0730..0cd7883d7 100644 --- a/src/guichan/widget.cpp +++ b/src/guichan/widget.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/button.cpp b/src/guichan/widgets/button.cpp index 96994aded..1226e157a 100644 --- a/src/guichan/widgets/button.cpp +++ b/src/guichan/widgets/button.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/checkbox.cpp b/src/guichan/widgets/checkbox.cpp index 4e2fdbc3a..4b3c7b966 100644 --- a/src/guichan/widgets/checkbox.cpp +++ b/src/guichan/widgets/checkbox.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/container.cpp b/src/guichan/widgets/container.cpp index bd19224aa..7ea07e529 100644 --- a/src/guichan/widgets/container.cpp +++ b/src/guichan/widgets/container.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/label.cpp b/src/guichan/widgets/label.cpp index 16afcb044..92962e907 100644 --- a/src/guichan/widgets/label.cpp +++ b/src/guichan/widgets/label.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/listbox.cpp b/src/guichan/widgets/listbox.cpp index bc4647ef0..9122e8cc8 100644 --- a/src/guichan/widgets/listbox.cpp +++ b/src/guichan/widgets/listbox.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/radiobutton.cpp b/src/guichan/widgets/radiobutton.cpp index 77d672cc0..26ce731ed 100644 --- a/src/guichan/widgets/radiobutton.cpp +++ b/src/guichan/widgets/radiobutton.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/scrollarea.cpp b/src/guichan/widgets/scrollarea.cpp index aae116462..ddc4405e2 100644 --- a/src/guichan/widgets/scrollarea.cpp +++ b/src/guichan/widgets/scrollarea.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp index 4f370545d..849101fd8 100644 --- a/src/guichan/widgets/slider.cpp +++ b/src/guichan/widgets/slider.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/textbox.cpp b/src/guichan/widgets/textbox.cpp index 4f104833f..e3bfd39f5 100644 --- a/src/guichan/widgets/textbox.cpp +++ b/src/guichan/widgets/textbox.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/textfield.cpp b/src/guichan/widgets/textfield.cpp index 64a0209b5..1e4309266 100644 --- a/src/guichan/widgets/textfield.cpp +++ b/src/guichan/widgets/textfield.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/guichan/widgets/window.cpp b/src/guichan/widgets/window.cpp index 3ed6d969f..8865444e0 100644 --- a/src/guichan/widgets/window.cpp +++ b/src/guichan/widgets/window.cpp @@ -1,3 +1,23 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + /* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / @@ -6,12 +26,11 @@ * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * Copyright (C) 2011-2014 The ManaPlus Developers + * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson * * * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem + * Olof Naessén a.k.a jansem/yakslem * * Visit: http://guichan.sourceforge.net * diff --git a/src/input/keyboarddata.h b/src/input/keyboarddata.h index da0d22fee..c250b759e 100644 --- a/src/input/keyboarddata.h +++ b/src/input/keyboarddata.h @@ -1811,9 +1811,9 @@ static const KeyData keyData[Input::KEY_TOTAL] = { Input::KEY_NO_VALUE, 50, COND_GAME | COND_VALIDSPEED | COND_EMODS}, {"keyMod", - INPUT_KEYBOARD, SDLK_LSHIFT, INPUT_UNKNOWN, Input::KEY_NO_VALUE, - Input::GRP_GUI, + INPUT_UNKNOWN, Input::KEY_NO_VALUE, + 0, nullptr, Input::KEY_NO_VALUE, 50, COND_DEFAULT}, diff --git a/src/input/keydata.h b/src/input/keydata.h index 52bc7f6be..a0fb8341b 100644 --- a/src/input/keydata.h +++ b/src/input/keydata.h @@ -319,7 +319,7 @@ namespace Input KEY_AWAY, KEY_RIGHT_CLICK, KEY_CAMERA, - KEY_MOD, + KEY_RESERVED1, KEY_GUI_UP, KEY_GUI_DOWN, KEY_GUI_LEFT, diff --git a/src/localconsts.h b/src/localconsts.h index 92c36d92a..58b469f01 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -33,6 +33,13 @@ #endif #endif +#ifndef DEBUGBUILD +#ifndef USE_INTERNALGUICHAN +#warning using depricated way for linking with guichan. \ + Please removed configure flag --without-internalguichan +#endif +#endif + #if !defined(__GXX_EXPERIMENTAL_CXX0X__) #undef nullptr #define nullptr 0 diff --git a/src/main.h b/src/main.h index a0fbf3c35..976b4e584 100644 --- a/src/main.h +++ b/src/main.h @@ -45,8 +45,8 @@ * different interfaces, which have different implementations for each server. */ -#define SMALL_VERSION "1.4.1.18" -#define CHECK_VERSION "01.04.01.18" +#define SMALL_VERSION "1.4.2.1" +#define CHECK_VERSION "01.04.02.01" #ifdef HAVE_CONFIG_H #include "../config.h" diff --git a/src/net/download.cpp b/src/net/download.cpp index d986fa232..d0c6515fc 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -58,9 +58,11 @@ enum namespace Net { +std::string Download::mUploadResponse = ""; + Download::Download(void *const ptr, const std::string &url, const DownloadUpdate updateFunction, - const bool ignoreError) : + const bool ignoreError, const bool isUpload) : mPtr(ptr), mUrl(url), mOptions(), @@ -71,8 +73,10 @@ Download::Download(void *const ptr, const std::string &url, mThread(nullptr), mCurl(nullptr), mHeaders(nullptr), + mFormPost(nullptr), mError(static_cast<char*>(calloc(CURL_ERROR_SIZE + 1, 1))), - mIgnoreError(ignoreError) + mIgnoreError(ignoreError), + mUpload(isUpload) { if (mError) mError[0] = 0; @@ -80,23 +84,34 @@ Download::Download(void *const ptr, const std::string &url, mOptions.cancel = 0; mOptions.memoryWrite = 0; mOptions.checkAdler = true; - const std::string serverName = client->getServerName(); - if (!serverName.empty()) + if (!mUpload) { - if (mUrl.find("?") == std::string::npos) - mUrl.append("?host="); - else - mUrl.append("&host="); - mUrl.append(serverName); + const std::string serverName = client->getServerName(); + if (!serverName.empty()) + { + if (mUrl.find("?") == std::string::npos) + mUrl.append("?host="); + else + mUrl.append("&host="); + mUrl.append(serverName); + } } } Download::~Download() { + if (mFormPost) + { + curl_formfree(mFormPost); + mFormPost = nullptr; + } + if (mHeaders) + { curl_slist_free_all(mHeaders); + mHeaders = nullptr; + } - mHeaders = nullptr; int status; if (mThread && SDL_GetThreadID(mThread)) SDL_WaitThread(mThread, &status); @@ -211,9 +226,13 @@ int Download::downloadProgress(void *clientp, double dltotal, double dlnow, double ultotal A_UNUSED, double ulnow A_UNUSED) { Download *const d = reinterpret_cast<Download *const>(clientp); + if (!d) return -5; + if (d->mUpload) + return 0; + if (d->mOptions.cancel) { return d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_CANCELLED, @@ -236,8 +255,19 @@ int Download::downloadThread(void *ptr) if (!d) return 0; - const std::string outFilename = !d->mOptions.memoryWrite - ? (d->mFileName + ".part") : ""; + std::string outFilename; + if (d->mUpload) + { + outFilename = d->mFileName; + prepareForm(&d->mFormPost, outFilename); + } + else + { + if (!d->mOptions.memoryWrite) + outFilename = d->mFileName + ".part"; + else + outFilename = ""; + } while (attempts < 3 && !complete && !d->mOptions.cancel) { @@ -249,45 +279,57 @@ int Download::downloadThread(void *ptr) d->mThread = nullptr; return 0; } - d->mCurl = curl_easy_init(); if (d->mCurl && !d->mOptions.cancel) { FILE *file = nullptr; - logger->log("Downloading: %s", d->mUrl.c_str()); - - curl_easy_setopt(d->mCurl, CURLOPT_FOLLOWLOCATION, 1); - curl_easy_setopt(d->mCurl, CURLOPT_HTTPHEADER, d->mHeaders); - if (d->mOptions.memoryWrite) + if (d->mUpload) { - curl_easy_setopt(d->mCurl, CURLOPT_FAILONERROR, 1); + logger->log("Uploading: %s", d->mUrl.c_str()); + curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str()); + curl_easy_setopt(d->mCurl, CURLOPT_HTTPPOST, d->mFormPost); curl_easy_setopt(d->mCurl, CURLOPT_WRITEFUNCTION, - d->mWriteFunction); - curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, d->mPtr); + &Download::writeFunction); + mUploadResponse.clear(); } else { - file = fopen(outFilename.c_str(), "w+b"); - if (file) - curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, file); + logger->log("Downloading: %s", d->mUrl.c_str()); + curl_easy_setopt(d->mCurl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(d->mCurl, CURLOPT_HTTPHEADER, d->mHeaders); + if (d->mOptions.memoryWrite) + { + curl_easy_setopt(d->mCurl, CURLOPT_FAILONERROR, 1); + curl_easy_setopt(d->mCurl, CURLOPT_WRITEFUNCTION, + d->mWriteFunction); + curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, d->mPtr); + } + else + { + file = fopen(outFilename.c_str(), "w+b"); + if (file) + curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, file); + } + curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, + strprintf(PACKAGE_EXTENDED_VERSION, + branding.getStringValue("appName").c_str()).c_str()); + + + curl_easy_setopt(d->mCurl, CURLOPT_ERRORBUFFER, d->mError); + curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str()); + curl_easy_setopt(d->mCurl, CURLOPT_NOPROGRESS, 0); + curl_easy_setopt(d->mCurl, CURLOPT_PROGRESSFUNCTION, + &downloadProgress); + curl_easy_setopt(d->mCurl, CURLOPT_PROGRESSDATA, ptr); + curl_easy_setopt(d->mCurl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(d->mCurl, CURLOPT_CONNECTTIMEOUT, 30); + curl_easy_setopt(d->mCurl, CURLOPT_TIMEOUT, 1800); + addProxy(d->mCurl); + secureCurl(d->mCurl); } - curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, - strprintf(PACKAGE_EXTENDED_VERSION, - branding.getStringValue("appName").c_str()).c_str()); - curl_easy_setopt(d->mCurl, CURLOPT_ERRORBUFFER, d->mError); - curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str()); - curl_easy_setopt(d->mCurl, CURLOPT_NOPROGRESS, 0); - curl_easy_setopt(d->mCurl, CURLOPT_PROGRESSFUNCTION, - &downloadProgress); - curl_easy_setopt(d->mCurl, CURLOPT_PROGRESSDATA, ptr); - curl_easy_setopt(d->mCurl, CURLOPT_NOSIGNAL, 1); - curl_easy_setopt(d->mCurl, CURLOPT_CONNECTTIMEOUT, 30); - curl_easy_setopt(d->mCurl, CURLOPT_TIMEOUT, 1800); - addProxy(d->mCurl); - secureCurl(d->mCurl); if ((res = curl_easy_perform(d->mCurl)) != 0 && !d->mOptions.cancel) @@ -314,15 +356,13 @@ int Download::downloadThread(void *ptr) d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_ERROR, 0, 0); - if (!d->mOptions.memoryWrite) + if (file) { - if (file) - { - fclose(file); - file = nullptr; - } - ::remove(outFilename.c_str()); + fclose(file); + file = nullptr; } + if (!d->mUpload && !d->mOptions.memoryWrite) + ::remove(outFilename.c_str()); attempts++; continue; } @@ -330,58 +370,72 @@ int Download::downloadThread(void *ptr) curl_easy_cleanup(d->mCurl); d->mCurl = nullptr; - if (!d->mOptions.memoryWrite) + if (d->mUpload) { - // Don't check resources.xml checksum - if (d->mOptions.checkAdler) - { - const unsigned long adler = fadler32(file); - - if (d->mAdler != adler) - { - if (file) - { - fclose(file); - file = nullptr; - } - - // Remove the corrupted file - ::remove(d->mFileName.c_str()); - logger->log_r("Checksum for file %s failed: (%lx/%lx)", - d->mFileName.c_str(), - adler, d->mAdler); - attempts++; - continue; // Bail out here to avoid the renaming - } - } if (file) { fclose(file); file = nullptr; } - - // Any existing file with this name is deleted first, otherwise - // the rename will fail on Windows. - if (!d->mOptions.cancel) + // need check first if we read data from server + complete = true; + } + else + { + if (!d->mOptions.memoryWrite) { - ::remove(d->mFileName.c_str()); - Files::renameFile(outFilename, d->mFileName); + // Don't check resources.xml checksum + if (d->mOptions.checkAdler) + { + const unsigned long adler = fadler32(file); - // Check if we can open it and no errors were encountered - // during renaming - file = fopen(d->mFileName.c_str(), "rb"); + if (d->mAdler != adler) + { + if (file) + { + fclose(file); + file = nullptr; + } + + // Remove the corrupted file + ::remove(d->mFileName.c_str()); + logger->log_r("Checksum for file %s failed:" + " (%lx/%lx)", + d->mFileName.c_str(), + adler, d->mAdler); + attempts++; + continue; // Bail out here to avoid the renaming + } + } if (file) { fclose(file); file = nullptr; - complete = true; + } + + // Any existing file with this name is deleted first, + // otherwise the rename will fail on Windows. + if (!d->mOptions.cancel) + { + ::remove(d->mFileName.c_str()); + Files::renameFile(outFilename, d->mFileName); + + // Check if we can open it and no errors were + // encountered during renaming + file = fopen(d->mFileName.c_str(), "rb"); + if (file) + { + fclose(file); + file = nullptr; + complete = true; + } } } - } - else - { - // It's stored in memory, we're done - complete = true; + else + { + // It's stored in memory, we're done + complete = true; + } } } @@ -400,6 +454,8 @@ int Download::downloadThread(void *ptr) attempts++; } + d->mThread = nullptr; + if (d->mOptions.cancel) { // Nothing to do... @@ -413,7 +469,6 @@ int Download::downloadThread(void *ptr) d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_COMPLETE, 0, 0); } - d->mThread = nullptr; return 0; } @@ -481,4 +536,39 @@ void Download::secureCurl(CURL *const curl) #endif } +void Download::prepareForm(curl_httppost **form, const std::string &fileName) +{ + curl_httppost *lastPtr = nullptr; + + std::ifstream file; + file.open(fileName.c_str(), std::ios::in); + if (!file.is_open()) + return; + + char *line = new char[10001]; + std::ostringstream str; + while (file.getline(line, 10000)) + str << line << "\n"; + + delete [] line; + + curl_formadd(form, &lastPtr, + CURLFORM_COPYNAME, "sprunge", + CURLFORM_COPYCONTENTS, str.str().c_str(), + CURLFORM_END); +} + +size_t Download::writeFunction(void *ptr, + size_t size, + size_t nmemb, + void *stream A_UNUSED) +{ + const size_t totalMem = size * nmemb; + char *buf = new char[totalMem + 1]; + memcpy(buf, ptr, totalMem); + buf[totalMem] = 0; + mUploadResponse.append(buf); + return totalMem; +} + } // namespace Net diff --git a/src/net/download.h b/src/net/download.h index 4fe0f67db..bc06f1974 100644 --- a/src/net/download.h +++ b/src/net/download.h @@ -46,6 +46,7 @@ typedef size_t (*WriteFunction)( void *ptr, size_t size, size_t nmemb, struct SDL_Thread; typedef void CURL; +struct curl_httppost; struct curl_slist; namespace Net @@ -55,7 +56,7 @@ class Download final public: Download(void *const ptr, const std::string &url, const DownloadUpdate updateFunction, - const bool ignoreError = false); + const bool ignoreError, const bool isUpload); A_DELETE_COPY(Download) @@ -91,6 +92,12 @@ class Download final void setIgnoreError(const bool n) { mIgnoreError = n; } + static size_t writeFunction(void *ptr, size_t size, + size_t nmemb, void *stream); + + static void prepareForm(curl_httppost **form, + const std::string &fileName); + static unsigned long fadler32(FILE *const file) A_WARN_UNUSED; static void addProxy(CURL *const curl); @@ -99,11 +106,15 @@ class Download final static unsigned long adlerBuffer(char *buffer, int size); + static std::string getUploadResponse() + { return mUploadResponse; } + private: static int downloadThread(void *ptr); static int downloadProgress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); + static std::string mUploadResponse; void *mPtr; std::string mUrl; struct @@ -119,8 +130,10 @@ class Download final SDL_Thread *mThread; CURL *mCurl; curl_slist *mHeaders; + curl_httppost *mFormPost; char *mError; bool mIgnoreError; + bool mUpload; }; } // namespace Net diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp index 7530e0f53..103620a5b 100644 --- a/src/net/sdltcpnet.cpp +++ b/src/net/sdltcpnet.cpp @@ -89,7 +89,9 @@ int TcpNet::resolveHost(IPaddress *const address, const char *const host, TcpNet::Socket TcpNet::open(IPaddress *const ip) { const TcpNet::Socket sock = SDLNet_TCP_Open(ip); -#ifndef __native_client__ +#if !defined(__native_client__) \ + || defined(TCP_THIN_LINEAR_TIMEOUTS) \ + || defined(TCP_THIN_DUPACK) if (sock && ip) { const TCPsocketHack *const hack diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index c88892cc4..6ad1c67d7 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -51,6 +51,8 @@ Graphics::Graphics() : gcn::Graphics(), mWidth(0), mHeight(0), + mActualWidth(0), + mActualHeight(0), mWindow(nullptr), #ifdef USE_SDL2 mRenderer(nullptr), @@ -72,6 +74,7 @@ Graphics::Graphics() : mName("Unknown"), mStartFreeMem(0), mSync(false), + mScale(1), mColor(), mColor2() { @@ -105,21 +108,49 @@ void Graphics::setSync(const bool sync) mSync = sync; } -void Graphics::setMainFlags(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) +void Graphics::setMainFlags(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) { logger->log("graphics backend: %s", getName().c_str()); logger->log("Setting video mode %dx%d %s", w, h, fs ? "fullscreen" : "windowed"); - mWidth = w; - mHeight = h; mBpp = bpp; mFullscreen = fs; mHWAccel = hwaccel; mEnableResize = resize; mNoFrame = noFrame; + mActualWidth = w; + mActualHeight = h; + setScale(scale); +} + +void Graphics::setScale(int scale) +{ + if (isAllowScale()) + { + if (!scale) + scale = 1; + if (mActualWidth / scale < 470 || mActualHeight / scale < 320) + scale = 1; + logger->log("set scale: %d", scale); + mScale = scale; + mWidth = mActualWidth / mScale; + mHeight = mActualHeight / mScale; + } + else + { + mScale = 1; + mWidth = mActualWidth; + mHeight = mActualHeight; + } + mRect.w = mWidth; + mRect.h = mHeight; } int Graphics::getOpenGLFlags() const @@ -161,7 +192,8 @@ bool Graphics::setOpenGLMode() { #ifdef USE_OPENGL SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - if (!(mWindow = graphicsManager.createWindow(mWidth, mHeight, + if (!(mWindow = graphicsManager.createWindow( + mActualWidth, mActualHeight, mBpp, getOpenGLFlags()))) { mRect.w = 0; @@ -173,15 +205,16 @@ bool Graphics::setOpenGLMode() int w1 = 0; int h1 = 0; SDL_GetWindowSize(mWindow, &w1, &h1); - mRect.w = w1; - mRect.h = h1; + mRect.w = w1 / mScale; + mRect.h = h1 / mScale; mGLContext = SDL_GL_CreateContext(mWindow); #else // USE_SDL2 - mRect.w = static_cast<uint16_t>(mWindow->w); - mRect.h = static_cast<uint16_t>(mWindow->h); + mRect.w = static_cast<uint16_t>(mWindow->w / mScale); + mRect.h = static_cast<uint16_t>(mWindow->h / mScale); + #endif // USE_SDL2 #ifdef __APPLE__ @@ -196,7 +229,7 @@ bool Graphics::setOpenGLMode() graphicsManager.logVersion(); // Setup OpenGL - glViewport(0, 0, mWidth, mHeight); + glViewport(0, 0, mActualWidth, mActualHeight); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); int gotDoubleBuffer = 0; SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &gotDoubleBuffer); @@ -374,22 +407,19 @@ bool Graphics::setFullscreen(const bool fs) if (mFullscreen == fs) return true; - return setVideoMode(mWidth, mHeight, mBpp, fs, mHWAccel, - mEnableResize, mNoFrame); + return setVideoMode(mActualWidth, mActualHeight, mScale, mBpp, fs, + mHWAccel, mEnableResize, mNoFrame); } bool Graphics::resizeScreen(const int width, const int height) { - if (mWidth == width && mHeight == height) - return true; - #ifdef USE_SDL2 _endDraw(); - mRect.w = width; - mRect.h = height; - mWidth = width; - mHeight = height; + mRect.w = width / mScale; + mRect.h = height / mScale; + mWidth = width / mScale; + mHeight = height / mScale; #ifdef USE_OPENGL // +++ probably this way will not work in windows/mac @@ -409,14 +439,14 @@ bool Graphics::resizeScreen(const int width, const int height) _endDraw(); - const bool success = setVideoMode(width, height, mBpp, + const bool success = setVideoMode(width, height, mScale, mBpp, mFullscreen, mHWAccel, mEnableResize, mNoFrame); // If it didn't work, try to restore the previous size. If that didn't // work either, bail out (but then we're in deep trouble). if (!success) { - if (!setVideoMode(prevWidth, prevHeight, mBpp, + if (!setVideoMode(prevWidth, prevHeight, mScale, mBpp, mFullscreen, mHWAccel, mEnableResize, mNoFrame)) { return false; diff --git a/src/render/graphics.h b/src/render/graphics.h index 82ef32fea..0cb510195 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -127,9 +127,13 @@ class Graphics : public gcn::Graphics /** * Try to create a window with the given settings. */ - virtual bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) = 0; + virtual bool setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) = 0; /** * Set fullscreen mode. @@ -341,8 +345,18 @@ class Graphics : public gcn::Graphics virtual void completeCache() = 0; + int getScale() const + { return mScale; } + + virtual bool isAllowScale() const + { return false; } + + void setScale(int scale); + int mWidth; int mHeight; + int mActualWidth; + int mActualHeight; protected: /** @@ -350,9 +364,13 @@ class Graphics : public gcn::Graphics */ Graphics(); - void setMainFlags(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + void setMainFlags(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame); int getOpenGLFlags() const A_WARN_UNUSED; @@ -386,6 +404,7 @@ class Graphics : public gcn::Graphics std::string mName; int mStartFreeMem; bool mSync; + int mScale; gcn::Color mColor; gcn::Color mColor2; }; diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index d273e9f65..82bf04dc8 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -120,11 +120,14 @@ void MobileOpenGLGraphics::initArrays() } bool MobileOpenGLGraphics::setVideoMode(const int w, const int h, - const int bpp, const bool fs, - const bool hwaccel, const bool resize, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); return setOpenGLMode(); } @@ -842,10 +845,12 @@ void MobileOpenGLGraphics::_beginDraw() #ifdef ANDROID glOrthof(0.0, static_cast<float>(mRect.w), - static_cast<float>(mRect.h), 0.0, -1.0, 1.0); + static_cast<float>(mRect.h), + 0.0, -1.0, 1.0); #else glOrtho(0.0, static_cast<double>(mRect.w), - static_cast<double>(mRect.h), 0.0, -1.0, 1.0); + static_cast<double>(mRect.h), + 0.0, -1.0, 1.0); #endif glMatrixMode(GL_MODELVIEW); @@ -969,9 +974,10 @@ bool MobileOpenGLGraphics::pushClipArea(gcn::Rectangle area) glTranslatef(static_cast<GLfloat>(transX), static_cast<GLfloat>(transY), 0); } - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); - + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); return result; } @@ -997,8 +1003,10 @@ void MobileOpenGLGraphics::popClipArea() glTranslatef(static_cast<GLfloat>(transX), static_cast<GLfloat>(transY), 0); } - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); } #ifdef ANDROID diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 5b7abd895..e8e1a2116 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -140,11 +140,14 @@ void NormalOpenGLGraphics::initArrays() } bool NormalOpenGLGraphics::setVideoMode(const int w, const int h, - const int bpp, const bool fs, - const bool hwaccel, const bool resize, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); return setOpenGLMode(); } @@ -1103,10 +1106,12 @@ void NormalOpenGLGraphics::_beginDraw() const int h = mRect.h; #ifdef ANDROID - glOrthof(0.0, static_cast<float>(w), static_cast<float>(h), + glOrthof(0.0, static_cast<float>(w), + static_cast<float>(h), 0.0, -1.0, 1.0); #else - glOrtho(0.0, static_cast<double>(w), static_cast<double>(h), + glOrtho(0.0, static_cast<double>(w), + static_cast<double>(h), 0.0, -1.0, 1.0); #endif @@ -1229,8 +1234,10 @@ bool NormalOpenGLGraphics::pushClipArea(gcn::Rectangle area) glTranslatef(static_cast<GLfloat>(transX), static_cast<GLfloat>(transY), 0); } - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); return result; } @@ -1257,8 +1264,10 @@ void NormalOpenGLGraphics::popClipArea() glTranslatef(static_cast<GLfloat>(transX), static_cast<GLfloat>(transY), 0); } - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); } void NormalOpenGLGraphics::drawPoint(int x, int y) diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index 2f1a59976..3ea1e4182 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -83,11 +83,14 @@ void NullOpenGLGraphics::initArrays() } bool NullOpenGLGraphics::setVideoMode(const int w, const int h, - const int bpp, const bool fs, - const bool hwaccel, const bool resize, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); return setOpenGLMode(); } diff --git a/src/render/openglgraphicsdef.hpp b/src/render/openglgraphicsdef.hpp index 9f6d9d319..89f8e63a9 100644 --- a/src/render/openglgraphicsdef.hpp +++ b/src/render/openglgraphicsdef.hpp @@ -21,6 +21,7 @@ */ bool setVideoMode(const int w, const int h, + const int scalle, const int bpp, const bool fs, const bool hwaccel, @@ -141,6 +142,9 @@ void completeCache() override final; + bool isAllowScale() const override final + { return true; } + static void bindTexture(const GLenum target, const GLuint texture); static GLuint mLastImage; diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index c6e8c1f30..bf9334655 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -53,11 +53,15 @@ SafeOpenGLGraphics::~SafeOpenGLGraphics() { } -bool SafeOpenGLGraphics::setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) +bool SafeOpenGLGraphics::setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); return setOpenGLMode(); } @@ -436,7 +440,8 @@ void SafeOpenGLGraphics::_beginDraw() glLoadIdentity(); glOrtho(0.0, static_cast<double>(mRect.w), - static_cast<double>(mRect.h), 0.0, -1.0, 1.0); + static_cast<double>(mRect.h), + 0.0, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -537,9 +542,10 @@ bool SafeOpenGLGraphics::pushClipArea(gcn::Rectangle area) glPushMatrix(); glTranslatef(static_cast<GLfloat>(transX + clipArea.xOffset), static_cast<GLfloat>(transY + clipArea.yOffset), 0); - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); - + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); return result; } @@ -552,8 +558,10 @@ void SafeOpenGLGraphics::popClipArea() glPopMatrix(); const gcn::ClipRectangle &clipArea = mClipStack.top(); - glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height, - clipArea.width, clipArea.height); + glScissor(clipArea.x * mScale, + (mRect.h - clipArea.y - clipArea.height) * mScale, + clipArea.width * mScale, + clipArea.height * mScale); } void SafeOpenGLGraphics::drawPoint(int x, int y) diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp index 96e05c8f6..97f231d08 100644 --- a/src/render/sdl2graphics.cpp +++ b/src/render/sdl2graphics.cpp @@ -718,11 +718,15 @@ void SDLGraphics::drawLine(int x1, int y1, int x2, int y2) SDL_RenderDrawLines(mRenderer, points, 2); } -bool SDLGraphics::setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) -{ - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); +bool SDLGraphics::setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) +{ + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); if (!(mWindow = graphicsManager.createWindow(w, h, bpp, getSoftwareFlags()))) diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h index 5f1e8ac1c..c4e0d74a7 100644 --- a/src/render/sdl2graphics.h +++ b/src/render/sdl2graphics.h @@ -129,6 +129,7 @@ class SDLGraphics final : public Graphics void drawLine(int x1, int y1, int x2, int y2) override final; bool setVideoMode(const int w, const int h, + const int scale, const int bpp, const bool fs, const bool hwaccel, diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index 95c8f08b1..088aba98c 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -1468,11 +1468,14 @@ void SDL2SoftwareGraphics::drawLine(int x1, int y1, int x2, int y2) } bool SDL2SoftwareGraphics::setVideoMode(const int w, const int h, - const int bpp, const bool fs, - const bool hwaccel, const bool resize, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); if (!(mWindow = graphicsManager.createWindow(w, h, bpp, getSoftwareFlags()))) diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h index 295118067..3ac6cb212 100644 --- a/src/render/sdl2softwaregraphics.h +++ b/src/render/sdl2softwaregraphics.h @@ -129,6 +129,7 @@ class SDL2SoftwareGraphics final : public Graphics void drawLine(int x1, int y1, int x2, int y2) override final; bool setVideoMode(const int w, const int h, + const int scale, const int bpp, const bool fs, const bool hwaccel, diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp index 964f2d25a..e0e22cac9 100644 --- a/src/render/sdlgraphics.cpp +++ b/src/render/sdlgraphics.cpp @@ -1465,11 +1465,15 @@ void SDLGraphics::drawLine(int x1, int y1, int x2, int y2) // other cases not implimented } -bool SDLGraphics::setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) +bool SDLGraphics::setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) { - setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame); if (!(mWindow = graphicsManager.createWindow(w, h, bpp, getSoftwareFlags()))) diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h index 53a139612..17b54db92 100644 --- a/src/render/sdlgraphics.h +++ b/src/render/sdlgraphics.h @@ -129,6 +129,7 @@ class SDLGraphics final : public Graphics void drawLine(int x1, int y1, int x2, int y2) override final; bool setVideoMode(const int w, const int h, + const int scale, const int bpp, const bool fs, const bool hwaccel, diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index 3b0c639da..c3e6cb2ee 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -172,6 +172,7 @@ class SurfaceGraphics final : public Graphics { } bool setVideoMode(const int w A_UNUSED, const int h A_UNUSED, + const int scale A_UNUSED, const int bpp A_UNUSED, const bool fs A_UNUSED, const bool hwaccel A_UNUSED, const bool resize A_UNUSED, diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 38c141d63..40ea7af1a 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -70,10 +70,13 @@ BeingInfo::BeingInfo() : mMoveOffsetY(0), mDeadOffsetX(0), mDeadOffsetY(0), + mAttackOffsetX(0), + mAttackOffsetY(0), mThinkTime(50), mDirectionType(1), mSitDirectionType(1), mDeadDirectionType(1), + mAttackDirectionType(1), mStaticMaxHP(false), mTargetSelection(true) { diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index d862f1020..31725d218 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -284,6 +284,18 @@ class BeingInfo final int getDeadOffsetY() const A_WARN_UNUSED { return mDeadOffsetY; } + void setAttackOffsetX(const int n) + { mAttackOffsetX = n; } + + int getAttackOffsetX() const A_WARN_UNUSED + { return mAttackOffsetX; } + + void setAttackOffsetY(const int n) + { mAttackOffsetY = n; } + + int getAttackOffsetY() const A_WARN_UNUSED + { return mAttackOffsetY; } + void setThinkTime(const int n) { mThinkTime = n; } @@ -308,6 +320,12 @@ class BeingInfo final int getDeadDirectionType() const A_WARN_UNUSED { return mDeadDirectionType; } + void setAttackDirectionType(const int n) + { mAttackDirectionType = n; } + + int getAttackDirectionType() const A_WARN_UNUSED + { return mAttackDirectionType; } + void setColorsList(const std::string &name); std::string getColor(const int idx) const A_WARN_UNUSED; @@ -348,10 +366,13 @@ class BeingInfo final int mMoveOffsetY; int mDeadOffsetX; int mDeadOffsetY; + int mAttackOffsetX; + int mAttackOffsetY; int mThinkTime; int mDirectionType; int mSitDirectionType; int mDeadDirectionType; + int mAttackDirectionType; bool mStaticMaxHP; bool mTargetSelection; }; diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 594bcce5d..97ea95aa0 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -49,6 +49,7 @@ void EmoteDB::load() unknownSprite->sprite = AnimatedSprite::load( paths.getStringValue("spriteErrorFile")); unknownSprite->name = "unknown"; + unknownSprite->id = 0; mUnknown.sprites.push_back(unknownSprite); logger->log1("Initializing emote database..."); @@ -122,6 +123,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName) XML::getProperty(spriteNode, "variant", 0)); currentSprite->name = XML::langProperty( spriteNode, "name", ""); + currentSprite->id = id; currentInfo->sprites.push_back(currentSprite); } else if (xmlNameEqual(spriteNode, "particlefx")) @@ -194,6 +196,7 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName) XML::getProperty(spriteNode, "variant", 0)); currentSprite->name = XML::langProperty( spriteNode, "name", ""); + currentSprite->id = id; currentInfo->sprites.push_back(currentSprite); } else if (xmlNameEqual(spriteNode, "particlefx")) diff --git a/src/resources/db/emotedb.h b/src/resources/db/emotedb.h index f00bfbb47..02683a99a 100644 --- a/src/resources/db/emotedb.h +++ b/src/resources/db/emotedb.h @@ -35,12 +35,14 @@ struct EmoteSprite final { EmoteSprite() : sprite(nullptr), + id(0), name() { } A_DELETE_COPY(EmoteSprite) const AnimatedSprite *sprite; + int id; std::string name; }; diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index c9f3bdbeb..7af3c5d09 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -132,6 +132,10 @@ void PETDB::loadXmlFile(const std::string &fileName) "deadOffsetX", 0)); currentInfo->setDeadOffsetY(XML::getProperty(petNode, "deadOffsetY", 1)); + currentInfo->setAttackOffsetX(XML::getProperty(petNode, + "attackOffsetX", currentInfo->getTargetOffsetX())); + currentInfo->setAttackOffsetY(XML::getProperty(petNode, + "attackOffsetY", currentInfo->getTargetOffsetY())); currentInfo->setThinkTime(XML::getProperty(petNode, "thinkTime", 500) / 10); @@ -142,6 +146,8 @@ void PETDB::loadXmlFile(const std::string &fileName) "sitDirectionType", 1)); currentInfo->setDeadDirectionType(XML::getProperty(petNode, "deadDirectionType", 1)); + currentInfo->setAttackDirectionType(XML::getProperty(petNode, + "attackDirectionType", 4)); SpriteDisplay display; for_each_xml_child_node(spriteNode, petNode) diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 6b87e6cdf..4cc7a4574 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -182,7 +182,7 @@ void ResourceManager::cleanUp(Resource *const res) delete res; #ifdef DEBUG_LEAKS - cleanOrpahns(true); + cleanOrphans(true); #endif } diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp index 4e4f3c183..9506332d0 100644 --- a/src/utils/copynpaste.cpp +++ b/src/utils/copynpaste.cpp @@ -441,14 +441,21 @@ static bool runxsel(std::string& text, const char *p1, const char *p2) } close(fd[0]); } + + const char *const xselPath = +#if defined __OpenBSD__ || defined __FreeBSD__ || defined __DragonFly__ + "/usr/local/bin/xsel"; +#else + "/usr/bin/xsel"; +#endif if (p2) { - execl("/usr/bin/xsel", "xsel", p1, p2, + execl(xselPath, "xsel", p1, p2, static_cast<char *>(nullptr)); } else { - execl("/usr/bin/xsel", "xsel", p1, + execl(xselPath, "xsel", p1, static_cast<char *>(nullptr)); } diff --git a/src/utils/process.cpp b/src/utils/process.cpp index bb7488e33..d05c6a11a 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -260,6 +260,12 @@ bool openBrowser(std::string url) { return execFile("/usr/bin/open", "/usr/bin/open", url, ""); } +#elif defined __OpenBSD__ || defined __FreeBSD__ || defined __DragonFly__ +bool openBrowser(std::string url) +{ + return execFile("/usr/local/bin/xdg-open", + "/usr/local/bin/xdg-open", url, ""); +} #elif defined __linux__ || defined __linux bool openBrowser(std::string url) { |