widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09691
Re: [Merge] lp:~widelands-dev/widelands/bug-1658489-epedition-tab into lp:widelands
Reworked that code going to compile/tets/push this now
Diff comments:
>
> === modified file 'src/economy/expedition_bootstrap.h'
> --- src/economy/expedition_bootstrap.h 2017-02-09 19:23:44 +0000
> +++ src/economy/expedition_bootstrap.h 2017-02-12 13:44:05 +0000
> @@ -73,11 +83,18 @@
> // Delete all wares we currently handle.
> void cleanup(EditorGameBase& egbase);
>
> - // Save/Load this into a file. The actual data is stored in the buildingdata
> - // packet, and there in the warehouse data packet. The version parameter is
> - // the version number of the Warehouse packet.
Compared with trunk, I think I merged 'uint16_t version' correctly, did I?
> - void
> - load(Warehouse& warehouse, FileRead& fr, Game& game, MapObjectLoader& mol, uint16_t version);
> + /** Load this from a file.
> + *
> + * The actual data is stored in the buildingdata
> + * packet, and there in the warehouse data packet.
> + */
> + void load(Warehouse& warehouse, FileRead& fr, Game& game, MapObjectLoader& mol, uint16_t version);
> +
> + /** Save this into a file.
> + *
> + * The actual data is stored in the buildingdata
> + * packet, and there in the warehouse data packet.
> + */
> void save(FileWrite& fw, Game& game, MapObjectSaver& mos);
>
> private:
>
> === modified file 'src/graphic/align.h'
> --- src/graphic/align.h 2017-01-25 18:55:59 +0000
> +++ src/graphic/align.h 2017-02-12 13:44:05 +0000
> @@ -24,29 +24,41 @@
>
> namespace UI {
>
> +/**
> + * This Enum is a binary mix of one-dimensional and two-dimensional alignments.
> + *
> + * bits 0,1 values 0,1,2,3 are horizontal
Mhh, checked this, found no ', '?
> + * bits 2,3 values 0,4,8,12 are vertical
> + *
> + * mixed aligenments are results of a binary | operation.
> + *
> + */
> +
> + // TODO(klaus.halfmann): as this is not a real enum all compiler warnings about
> + // incomplete usage are useless.
> +
> enum class Align {
> - kLeft = 0,
> - kHCenter = 1,
> - kRight = 2,
> - kHorizontal = 3,
> -
> - kTop = 0,
> - kVCenter = 4,
> - kBottom = 8,
> - kVertical = 12,
> -
> - kTopLeft = 0,
> - kCenterLeft = Align::kVCenter,
> - kBottomLeft = Align::kBottom,
> -
> - kTopCenter = Align::kHCenter,
> - kCenter = Align::kHCenter | Align::kVCenter,
> - kBottomCenter = Align::kHCenter | Align::kBottom,
> -
> - kTopRight = Align::kRight,
> - kCenterRight = Align::kRight | Align::kVCenter,
> -
> - kBottomRight = Align::kRight | Align::kBottom,
> + kLeft = 0x00,
> + kHCenter = 0x01,
> + kRight = 0x02,
> + kHorizontal = 0x03,
> +
> + kTop = 0x00,
> + kVCenter = 0x04,
> + kBottom = 0x08,
> + kVertical = 0x0C,
> +
> + kTopLeft = kLeft | kTop,
> + kCenterLeft = kLeft | kVCenter,
> + kBottomLeft = kLeft | kBottom,
> +
> + kTopCenter = kHCenter | kTop,
> + kCenter = kHCenter | kVCenter,
> + kBottomCenter = kHCenter | kBottom,
> +
> + kTopRight = kRight | kTop,
> + kCenterRight = kRight | kVCenter,
> + kBottomRight = kRight | kBottom,
> };
>
> inline Align operator&(Align a, Align b) {
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1658489-epedition-tab/+merge/317047
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1658489-epedition-tab.
References