diff --git a/src/sdl-instead/main.c b/src/sdl-instead/main.c
index bd9cd31..232a25c 100644
--- a/src/sdl-instead/main.c
+++ b/src/sdl-instead/main.c
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
if (opt_theme)
game_theme_select(opt_theme);
if (!curtheme_dir)
- game_theme_select(FIRST_THEME);
+ game_theme_select(DEFAULT_THEME);
// Initialize SDL
if (gfx_init() < 0)
diff --git a/src/sdl-instead/menu.c b/src/sdl-instead/menu.c
index 4f257c8..63f2063 100644
--- a/src/sdl-instead/menu.c
+++ b/src/sdl-instead/menu.c
@@ -131,16 +131,19 @@ static void save_menu(void)
static void games_menu(void)
{
- int i;
+ int i, n;
*menu_buff = 0;
sprintf(menu_buff, SELECT_GAME_MENU);
- for (i = games_menu_from; i < games_nr && i - games_menu_from < MENU_GAMES_MAX; i ++) {
+ for (i = games_menu_from, n = 0; i < games_nr && n < MENU_GAMES_MAX; i ++) {
char tmp[PATH_MAX];
+ if (!games[i].name[0]) /* empty */
+ continue;
if (curgame_dir && !strcmp(games[i].dir, curgame_dir))
snprintf(tmp, sizeof(tmp), "%s\n", games[i].name);
else
snprintf(tmp, sizeof(tmp), "%s\n", games[i].dir, games[i].name);
strcat(menu_buff, tmp);
+ n ++;
}
if (!games_nr)
sprintf(menu_buff, NOGAMES_MENU, GAMES_PATH);
@@ -165,16 +168,19 @@ static void games_menu(void)
static void themes_menu(void)
{
- int i;
+ int i, n;
*menu_buff = 0;
sprintf(menu_buff, SELECT_THEME_MENU);
- for (i = themes_menu_from; i < themes_nr && i - themes_menu_from < MENU_THEMES_MAX; i ++) {
+ for (i = themes_menu_from, n = 0; i < themes_nr && n < MENU_THEMES_MAX; i ++) {
char tmp[PATH_MAX];
+ if (!themes[i].name[0]) /* empty */
+ continue;
if (curtheme_dir && !strcmp(themes[i].dir, curtheme_dir))
snprintf(tmp, sizeof(tmp), "%s\n", themes[i].name);
else
snprintf(tmp, sizeof(tmp), "%s\n", themes[i].dir, themes[i].name);
strcat(menu_buff, tmp);
+ n ++;
}
if (!themes_nr)
sprintf(menu_buff, NOTHEMES_MENU, THEMES_PATH);
diff --git a/src/sdl-instead/themes.h b/src/sdl-instead/themes.h
index b2ce2c4..09c6fcf 100644
--- a/src/sdl-instead/themes.h
+++ b/src/sdl-instead/themes.h
@@ -5,7 +5,6 @@
#include "sound.h"
#define DEFAULT_THEME "default"
-#define FIRST_THEME "default-large"
#ifndef THEMES_PATH
#define THEMES_PATH "./themes"
#endif
diff --git a/themes/book/theme.ini b/themes/book/theme.ini
index e9f7bab..fde5c55 100644
--- a/themes/book/theme.ini
+++ b/themes/book/theme.ini
@@ -1,4 +1,4 @@
-; $Name:Книга (800x600)$
+; $Name:Книга$
scr.w = 800
scr.h = 600
scr.gfx.bg = book.png
diff --git a/themes/default-large/theme.ini b/themes/default-large/theme.ini
index 1db8e63..230fb6c 100644
--- a/themes/default-large/theme.ini
+++ b/themes/default-large/theme.ini
@@ -1,8 +1,9 @@
-; $Name: Стандартная (800x600)$
-scr.w = 800
-scr.h = 600
-win.h = 568
-inv.h = 568
-scr.gfx.h = -1
-menu.button.y = 576
+; $Name:$
+; for compat only!
+;scr.w = 800
+;scr.h = 600
+;win.h = 568
+;inv.h = 568
+;scr.gfx.h = -1
+;menu.button.y = 576
diff --git a/themes/default/theme.ini b/themes/default/theme.ini
index cab67b9..959e397 100644
--- a/themes/default/theme.ini
+++ b/themes/default/theme.ini
@@ -1,6 +1,8 @@
-; $Name: Стандартная (800x480)$
+; $Name: Стандартная$
scr.w = 800
-scr.h = 480
+scr.h = 600
+scr.gfx.h = -1
+
scr.gfx.bg = bg.png
scr.col.bg = white
scr.gfx.cursor.x = 1
@@ -9,12 +11,12 @@ scr.gfx.cursor.normal = cursor.png
scr.gfx.cursor.use = cursor-use.png
scr.gfx.pad = 16
scr.gfx.mode = embedded
-win.gfx.h = -1 ;unlim
win.x = 48
win.y = 8
win.w = 500
-win.h = 448
+win.h = 568
+
win.fnt.name = sans.ttf
win.fnt.size = 16
win.gfx.up = aup.png
@@ -26,7 +28,8 @@ win.col.alink = #606060
inv.x = 620
inv.y = 8
inv.w = 132
-inv.h = 448
+inv.h = 568
+
inv.fnt.name = sans.ttf
inv.fnt.size = 16
inv.gfx.up = aup.png
@@ -47,6 +50,14 @@ menu.fnt.name = sans.ttf
menu.fnt.size = 15
menu.gfx.button = menu.png
menu.button.x = 776
-menu.button.y = 456
+menu.button.y = 576
+
snd.click = click.wav ; click.ogg
+
+; 800x480 version
+;scr.w = 800
+;scr.h = 480
+;win.h = 448
+;inv.h = 448
+;menu.button.y = 456
diff --git a/themes/fantasy/theme.ini b/themes/fantasy/theme.ini
index 6fa28d4..db05607 100644
--- a/themes/fantasy/theme.ini
+++ b/themes/fantasy/theme.ini
@@ -1,4 +1,4 @@
-;$Name:Фэнтези (800x600)
+;$Name:Фэнтези
scr.w = 800
scr.h = 600
diff --git a/themes/original/theme.ini b/themes/original/theme.ini
index 1d7000a..1f3cb65 100644
--- a/themes/original/theme.ini
+++ b/themes/original/theme.ini
@@ -1,7 +1,13 @@
-; $Name:Старая (800x480)
+; $Name:Старая
win.col.fg = black
win.col.link = blue
win.col.alink = red
scr.gfx.mode = fixed
scr.gfx.h = 200
+scr.w = 800
+scr.h = 480
+win.h = 448
+inv.h = 448
+
+menu.button.y = 456