Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/remove-compatibility-wares into lp:widelands
load_finish() seems to be still needed - some derived classes override it. -- https://code.launchpad.net/~widelands-dev/widelands/remove-compatibility-wares/+merge/210885 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/remove-compatibility-wares. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/buildicon_playercolors into lp:widelands
Jens Beyer (Qcumber-some) has proposed merging lp:~widelands-dev/widelands/buildicon_playercolors into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #536230 in widelands: "building icons in menu are shown without correct playercolor" https://bugs.launchpad.net/widelands/+bug/536230 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/buildicon_playercolors/+merge/211184 This is not a merge-request per se, but more a request to review the code, and to find some way to create the necessary media files. With this branch merged, the game displays the building icons in player color if available. It uses playercolor mask files (menu_pc.png next to their menu.png files). Unfortunately, the mask files for the menu.png files are not available yet. I added a rough playercolor image (a force-resize to the correct 30x30px) for the atlantean coal mine as proof of concept (you can check it ingame, best use a different player than player1 because of the blue player color of player1...) The game can live without player color mask files, as you see (only the atlantean coal mine is there, the other files are missing). But now we need someone who is able to create the correct playercolor mask files where neccesary. Problem is that most animation frames are not of same width and height, but the menu icons are exactly 30x30, so simply force-resizing would probably lead to some undesired display effects. -- https://code.launchpad.net/~widelands-dev/widelands/buildicon_playercolors/+merge/211184 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/buildicon_playercolors into lp:widelands. === modified file 'src/logic/building.cc' --- src/logic/building.cc 2014-03-04 13:24:58 + +++ src/logic/building.cc 2014-03-15 19:51:27 + @@ -21,6 +21,7 @@ #include #include +#include #include @@ -30,6 +31,7 @@ #include "graphic/font_handler.h" #include "graphic/font_handler1.h" #include "graphic/graphic.h" +#include "graphic/image_transformations.h" #include "graphic/rendertarget.h" #include "io/filesystem/filesystem.h" #include "io/filesystem/layered_filesystem.h" @@ -62,6 +64,7 @@ m_tribe (_descr), m_buildable (true), m_buildicon (nullptr), + m_buildiconmask (nullptr), m_size (BaseImmovable::SMALL), m_mine (false), m_port (false), @@ -135,7 +138,9 @@ if (m_buildable || m_enhanced_building) { // get build icon m_buildicon_fname = directory; + m_buildiconmask_fname = directory; m_buildicon_fname += "/menu.png"; + m_buildiconmask_fname += "/menu_pc.png"; // build animation if (Section * const build_s = prof.get_section("build")) { @@ -162,7 +167,9 @@ } else if (m_global) { // get build icon for global buildings (for statistics window) m_buildicon_fname = directory; + m_buildiconmask_fname = directory; m_buildicon_fname += "/menu.png"; + m_buildiconmask_fname += "/menu_pc.png"; } { // parse basic animation data @@ -239,6 +246,13 @@ { if (m_buildicon_fname.size()) m_buildicon = g_gr->images().get(m_buildicon_fname); + if (m_buildiconmask_fname.size()) + { + //TODO remove this when all menu_pc.png files are available + std::ifstream i(m_buildiconmask_fname); + if (i.good()) + m_buildiconmask = g_gr->images().get(m_buildiconmask_fname); + } } /* === modified file 'src/logic/building.h' --- src/logic/building.h 2014-02-22 18:04:02 + +++ src/logic/building.h 2014-03-15 19:51:27 + @@ -92,6 +92,7 @@ */ const Buildcost & returned_wares_enhanced() const {return m_return_enhanced;} const Image* get_buildicon() const {return m_buildicon;} + const Image* get_buildiconmask() const {return m_buildiconmask;} int32_t get_size() const {return m_size;} bool get_ismine() const {return m_mine;} bool get_isport() const {return m_port;} @@ -144,7 +145,9 @@ Buildcost m_enhance_cost; // cost for enhancing Buildcost m_return_enhanced; // Returned ware for dismantling an enhanced building const Image* m_buildicon; // if buildable: picture in the build dialog + const Image* m_buildiconmask; // if buildable: picture in the build dialog std::string m_buildicon_fname; // filename for this icon + std::string m_buildiconmask_fname; // filename for this icon int32_t m_size;// size of the building bool m_mine; bool m_port; === modified file 'src/wui/fieldaction.cc' --- src/wui/fieldaction.cc 2014-03-07 19:12:24 + +++ src/wui/fieldaction.cc 2014-03-15 19:51:27 + @@ -23,6 +23,7 @@ #include "economy/flag.h" #include "economy/road.h" #include "graphic/graphic.h" +#include "graphic/image_transformations.h" #include "i18n.h" #include "logic/attackable.h" #include "logic/cmd_queue.h" @@ -69,7 +70,7 @@ boost::signals2::signal buildmouseout; boost::signals2::signal buildmousein;
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/i18n-20140314 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/i18n-20140314 into lp:widelands. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/i18n-20140314/+merge/211191 Some more small string fixes. -- https://code.launchpad.net/~widelands-dev/widelands/i18n-20140314/+merge/211191 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/i18n-20140314 into lp:widelands. === modified file 'campaigns/emp02.wmf/scripting/texts.lua' --- campaigns/emp02.wmf/scripting/texts.lua 2014-03-12 09:14:19 + +++ campaigns/emp02.wmf/scripting/texts.lua 2014-03-16 06:41:40 + @@ -167,10 +167,7 @@ saledus_2 = { title =_ "Marble on the Mountain", body= saledus(_"Saledus smiles", -_([[Lutius, I’ve got good news for you: ]] .. -[[As I walked to the east, I found a larger mountain.]] .. -[[I am not absolutely sure – a geologist should check if I am right]] .. -[[ – but I believe we could mine marble from some places on the mountain.]]) .. "" .. +_([[Lutius, I’ve got good news for you: As I walked to the east, I found a larger mountain. I am not absolutely sure – a geologist should check if I am right – but I believe we could mine marble from some places on the mountain.]]) .. "" .. _([[It would be a good source for bolstering our supply of quality marble, ]] .. [[beyond the meager quantities available from the quarry. ]] .. [[Perhaps you were right when you said that this island was like paradise.]]) .. "" .. === modified file 'global/militarysites/barracks.empire/conf' --- global/militarysites/barracks.empire/conf 2013-10-29 10:55:20 + +++ global/militarysites/barracks.empire/conf 2014-03-16 06:41:40 + @@ -5,10 +5,10 @@ buildable=no prefer_heroes=false occupied_string= -aggressor_string=_Your Barracks discovered an aggressor. -attack_string=_Your Barracks is under attack. -defeated_enemy_string=_The enemy defeated your soldiers at the Barracks -defeated_you_string=_Your soldiers defeated the enemy at the Barracks +aggressor_string=_Your barracks discovered an aggressor. +attack_string=_Your barracks is under attack. +defeated_enemy_string=_The enemy defeated your soldiers at the barracks. +defeated_you_string=_Your soldiers defeated the enemy at the barracks. [idle] === modified file 'global/militarysites/barrier.barbarians/conf' --- global/militarysites/barrier.barbarians/conf 2013-10-29 10:55:20 + +++ global/militarysites/barrier.barbarians/conf 2014-03-16 06:41:40 + @@ -5,10 +5,10 @@ buildable=no prefer_heroes=true occupied_string= -aggressor_string=_Your Barrier discovered an aggressor. -attack_string=_Your Barrier is under attack. -defeated_enemy_string=_The enemy defeated your soldiers at the Barrier -defeated_you_string=_Your soldiers defeated the enemy at the Barrier +aggressor_string=_Your barrier discovered an aggressor. +attack_string=_Your barrier is under attack. +defeated_enemy_string=_The enemy defeated your soldiers at the barrier. +defeated_you_string=_Your soldiers defeated the enemy at the barrier. [idle] === modified file 'global/militarysites/barrier.empire/conf' --- global/militarysites/barrier.empire/conf 2013-10-29 10:55:20 + +++ global/militarysites/barrier.empire/conf 2014-03-16 06:41:40 + @@ -5,10 +5,10 @@ buildable=no prefer_heroes=true occupied_string= -aggressor_string=_Your Barrier discovered an aggressor. -attack_string=_Your Barrier is under attack. -defeated_enemy_string=_The enemy defeated your soldiers at the Barrier -defeated_you_string=_Your soldiers defeated the enemy at the Barrier +aggressor_string=_Your barrier discovered an aggressor. +attack_string=_Your barrier is under attack. +defeated_enemy_string=_The enemy defeated your soldiers at the barrier. +defeated_you_string=_Your soldiers defeated the enemy at the barrier. [idle] === modified file 'global/militarysites/castle.atlanteans/conf' --- global/militarysites/castle.atlanteans/conf 2013-10-29 10:55:20 + +++ global/militarysites/castle.atlanteans/conf 2014-03-16 06:41:40 + @@ -5,10 +5,10 @@ buildable=no prefer_heroes=true occupied_string= -aggressor_string=_Your Castle discovered an aggressor. -attack_string=_Your Castle is under attack. -defeated_enemy_string=_The enemy defeated your soldiers at the Castle -defeated_you_string=_Your soldiers defeated the enemy at the Castle +aggressor_string=_Your castle discovered an aggressor. +attack_string=_Your castle is under attack. +defeated_enemy_string=_The enemy defeated your soldiers at the castle. +defeated_you_string=_Your soldiers defeated the enemy at the castle. [idle] === modified file 'global/militarysites/castle.empire/conf' --- global/militarysites/castle.empire/conf 2013-10-29 10:55:20 + +++ global/militarysites/castle.empire/conf 2014-03-16 06:41:40 + @@ -5,10 +5,10 @@ buildable=no prefer_heroes=true occupied_string= -aggressor_string=_Your C