Merge lp:~widelands-dev/widelands/normalize_requirements into lp:widelands

Proposed by SirVer
Status: Merged
Merged at revision: 6659
Proposed branch: lp:~widelands-dev/widelands/normalize_requirements
Merge into: lp:widelands
Diff against target: 103 lines (+7/-28)
5 files modified
src/constants.h (+3/-3)
src/ui_fsmenu/options.cc (+2/-22)
src/wui/stock_menu.cc (+1/-1)
src/wui/waresdisplay.h (+1/-1)
tribes/barbarians/conf (+0/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/normalize_requirements
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+176062@code.launchpad.net

Description of the change

This branch contains three changes:

1) minimum resolution is now 800x600 - we had this as the default for the menus forever now. As of this month I do not own a device that has a smaller default resolution (even my phones show more pixels). So I feel it is time to up the minimal resolution.
2) drop support for 16 bit. I did not change the graphics code, but the options no longer show 16 bit resolutions. 16 bit is slow, not supported for opengl at all and some code expects to be run in 32 bit already - running 16 bit will cost us expensive translations. The times are also over where we were concerned about using twice the ram pre pixel. Defaulting to 32 bit means that we can get rid of some special casing in the longer run.
3) rotate the stock menu/warehous again to be taller then wide. There was general agreement back in the day that this looks better and disturbs less while playing - but we had to support 640x480 resolution and the content didn't fit. Now the menus fit, though the edges of the windows go a little outside of the window at 800x600 - all buttons are clickable and all texts are readable.

To post a comment you must log in.
Revision history for this message
cghislai (charlyghislain) wrote :

Looks good to me. The only window not entirely fitting is the ware statistics menu.

Revision history for this message
SirVer (sirver) wrote :

Thanks for the review. Merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/constants.h'
2--- src/constants.h 2013-07-19 16:13:42 +0000
3+++ src/constants.h 2013-07-21 15:08:25 +0000
4@@ -41,9 +41,9 @@
5 #define XRES 800 ///< Fullscreen Menu Width
6 #define YRES 600 ///< Fullscreen Menu Height
7
8-#define FALLBACK_GRAPHICS_WIDTH 640
9-#define FALLBACK_GRAPHICS_HEIGHT 480
10-#define FALLBACK_GRAPHICS_DEPTH 16
11+#define FALLBACK_GRAPHICS_WIDTH 800
12+#define FALLBACK_GRAPHICS_HEIGHT 600
13+#define FALLBACK_GRAPHICS_DEPTH 32
14
15 /// \name Fonts
16 /// Font constants, defined including size
17
18=== modified file 'src/ui_fsmenu/options.cc'
19--- src/ui_fsmenu/options.cc 2013-07-21 08:25:22 +0000
20+++ src/ui_fsmenu/options.cc 2013-07-21 15:08:25 +0000
21@@ -238,26 +238,6 @@
22 // take a copy to not change real video info structure
23 SDL_PixelFormat fmt = *SDL_GetVideoInfo()->vfmt;
24
25- fmt.BitsPerPixel = 16;
26- for
27- (const SDL_Rect * const * modes = SDL_ListModes(&fmt, SDL_SWSURFACE | SDL_FULLSCREEN);
28- modes && *modes;
29- ++modes)
30- {
31- const SDL_Rect & mode = **modes;
32- if (640 <= mode.w and 480 <= mode.h)
33- {
34- const Resolution this_res = {mode.w, mode.h, fmt.BitsPerPixel};
35- if
36- (m_resolutions.empty()
37- || this_res.xres != m_resolutions.rbegin()->xres
38- || this_res.yres != m_resolutions.rbegin()->yres)
39- {
40- m_resolutions.push_back(this_res);
41- }
42- }
43- }
44-
45 fmt.BitsPerPixel = 32;
46 for
47 (const SDL_Rect * const * modes = SDL_ListModes(&fmt, SDL_SWSURFACE | SDL_FULLSCREEN);
48@@ -265,7 +245,7 @@
49 ++modes)
50 {
51 const SDL_Rect & mode = **modes;
52- if (640 <= mode.w and 480 <= mode.h)
53+ if (800 <= mode.w and 600 <= mode.h)
54 {
55 const Resolution this_res = {mode.w, mode.h, fmt.BitsPerPixel};
56 if
57@@ -653,7 +633,7 @@
58 opt.yres = m_opt_section.get_int
59 ("yres", YRES);
60 opt.depth = m_opt_section.get_int
61- ("depth", 16);
62+ ("depth", 32);
63 opt.inputgrab = m_opt_section.get_bool
64 ("inputgrab", false);
65 opt.fullscreen = m_opt_section.get_bool
66
67=== modified file 'src/wui/stock_menu.cc'
68--- src/wui/stock_menu.cc 2013-02-10 19:36:24 +0000
69+++ src/wui/stock_menu.cc 2013-07-21 15:08:25 +0000
70@@ -37,7 +37,7 @@
71 Stock_Menu::Stock_Menu
72 (Interactive_Player & plr, UI::UniqueWindow::Registry & registry)
73 :
74-UI::UniqueWindow(&plr, "stock_menu", &registry, 640, 480, _("Stock")),
75+UI::UniqueWindow(&plr, "stock_menu", &registry, 480, 640, _("Stock")),
76 m_player(plr)
77 {
78 UI::Tab_Panel * tabs =
79
80=== modified file 'src/wui/waresdisplay.h'
81--- src/wui/waresdisplay.h 2013-07-21 14:36:52 +0000
82+++ src/wui/waresdisplay.h 2013-07-21 15:08:25 +0000
83@@ -52,7 +52,7 @@
84 Widelands::WareWorker type,
85 bool selectable,
86 boost::function<void(Widelands::Ware_Index, bool)> callback_function = 0,
87- bool horizontal = true);
88+ bool horizontal = false);
89
90 bool handle_mousemove
91 (uint8_t state, int32_t x, int32_t y, int32_t xdiff, int32_t ydiff);
92
93=== modified file 'tribes/barbarians/conf'
94--- tribes/barbarians/conf 2013-01-21 18:50:52 +0000
95+++ tribes/barbarians/conf 2013-07-21 15:08:25 +0000
96@@ -10,7 +10,6 @@
97 icon=pics/icon.png
98 # Wares and workers positions in wares window. Columns are separated by ;,
99 # Entries in the columns separated by ,
100-# TODO: cloth is not in this list as it is currently not used
101 wares_order= raw_stone,trunk, blackwood, grout, thatchreed, cloth; fish, meat, water, wheat, pittabread, beer, strongbeer, ration, snack, meal; coal, ironore, iron, goldstone, gold; pick, felling_axe, shovel, hammer, fishing_rod, hunting_spear, scythe, bakingtray, kitchen_tools, fire_tongs; axe, sharpaxe, broadaxe, bronzeaxe, battleaxe, warriorsaxe, helm , mask , warhelmet
102
103 workers_order=carrier, ox, cattlebreeder; stonemason, lumberjack, ranger, builder, lime-burner, ferner, weaver, shipwright; fisher , hunter , gamekeeper, farmer, baker, brewer, master-brewer, innkeeper; geologist,miner, chief-miner, master-miner, burner, smelter; blacksmith, master-blacksmith; soldier, trainer, helmsmith, scout

Subscribers

People subscribed via source and target branches

to status/vote changes: