preliminary support for 800x480...

...(resolution used for eeePC, Nokia 8x0 and maybe some other mobile
devices) to activate it, run configure with --enable-small-gui
This commit is contained in:
Nils Kneuper 2008-02-14 01:07:01 +00:00
parent 1e4653f20b
commit f6c7a71c7b
5 changed files with 64 additions and 10 deletions

View file

@ -142,11 +142,23 @@ AC_ARG_ENABLE([tinygui],
if test "x$tinygui" = "xyes"
then
CPPFLAGS="$CPPFLAGS -DUSE_TINY_GUI"
CPPFLAGS="$CPPFLAGS -DUSE_TINY_GUI"
fi
AM_CONDITIONAL([TINYGUI], [test "x$tinygui" = "xyes"])
AC_ARG_ENABLE([smallgui],
AS_HELP_STRING([--enable-smallgui], [enable GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0)]),
[smallgui=$enableval],
[smallgui=no])
if test "x$smallgui" = "xyes"
then
CPPFLAGS="$CPPFLAGS -DUSE_SMALL_GUI"
fi
AM_CONDITIONAL([SMALLGUI], [test "x$smallgui" = "xyes"])
AC_ARG_ENABLE([optipng],
AS_HELP_STRING([--enable-optipng],
[run optipng png compression before installing graphics]),

View file

@ -110,15 +110,28 @@
tip_width=495
tip_padding=4
#else
buttons_x=760
buttons_y=330
buttons_padding=20
logo_x=292
logo_y=120
tip_x=100
tip_y=500
tip_width=495
tip_padding=20
#ifdef SMALL_GUI
buttons_x=760
buttons_y=210
buttons_padding=20
logo_x=85
logo_y=20
tip_x=30
#does this option do anything at all?!?
tip_y=500
tip_width=620
tip_padding=20
#else
buttons_x=760
buttons_y=330
buttons_padding=20
logo_x=292
logo_y=120
tip_x=100
tip_y=500
tip_width=495
tip_padding=20
#endif
#endif
lobby_refresh=2000

View file

@ -537,6 +537,17 @@
[/change]
[/partialresolution]
[partialresolution]
id=800x480
inherits=800x600
width=800
height=480
[change]
id=mini-map
rect="=+10,=+7,=-7,+103"
[/change]
[/partialresolution]
[partialresolution]
width=320
height=240

View file

@ -375,6 +375,17 @@ bool game_controller::init_video()
}
#endif
#ifdef USE_SMALL_GUI
if(bpp == 0) {
std::cerr << "800x600x" << DefaultBPP << " not available - attempting 800x480x" << DefaultBPP << "...\n";
resolution.first = 800;
resolution.second = 480;
bpp = video_.modePossible(resolution.first,resolution.second,DefaultBPP,video_flags);
}
#endif
if(bpp == 0) {
//couldn't do 1024x768 or 800x600
@ -1851,6 +1862,10 @@ void game_controller::reset_defines_map()
defines_map_["TINY"] = preproc_define();
#endif
#ifdef USE_SMALL_GUI
defines_map_["SMALL_GUI"] = preproc_define();
#endif
#ifdef HAVE_PYTHON
defines_map_["PYTHON"] = preproc_define();
#endif

View file

@ -33,6 +33,9 @@ class display;
#ifdef USE_TINY_GUI
const int min_allowed_width = 320;
const int min_allowed_height = 240;
#elif define(USE_SMALL_GUI)
const int min_allowed_width = 800;
const int min_allowed_height = 480;
#else
const int min_allowed_width = 800;
const int min_allowed_height = 600;