get rid of extra default-large theme, 800x600 is now default

This commit is contained in:
p.kosyh 2009-11-12 20:23:26 +00:00
parent 2ba36986a6
commit 86debf090d
8 changed files with 45 additions and 22 deletions

View file

@ -124,7 +124,7 @@ int main(int argc, char **argv)
if (opt_theme) if (opt_theme)
game_theme_select(opt_theme); game_theme_select(opt_theme);
if (!curtheme_dir) if (!curtheme_dir)
game_theme_select(FIRST_THEME); game_theme_select(DEFAULT_THEME);
// Initialize SDL // Initialize SDL
if (gfx_init() < 0) if (gfx_init() < 0)

View file

@ -131,16 +131,19 @@ static void save_menu(void)
static void games_menu(void) static void games_menu(void)
{ {
int i; int i, n;
*menu_buff = 0; *menu_buff = 0;
sprintf(menu_buff, SELECT_GAME_MENU); 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]; char tmp[PATH_MAX];
if (!games[i].name[0]) /* empty */
continue;
if (curgame_dir && !strcmp(games[i].dir, curgame_dir)) if (curgame_dir && !strcmp(games[i].dir, curgame_dir))
snprintf(tmp, sizeof(tmp), "<l><a:/resume><b>%s</b></a></l>\n", games[i].name); snprintf(tmp, sizeof(tmp), "<l><a:/resume><b>%s</b></a></l>\n", games[i].name);
else else
snprintf(tmp, sizeof(tmp), "<l><a:%s>%s</a></l>\n", games[i].dir, games[i].name); snprintf(tmp, sizeof(tmp), "<l><a:%s>%s</a></l>\n", games[i].dir, games[i].name);
strcat(menu_buff, tmp); strcat(menu_buff, tmp);
n ++;
} }
if (!games_nr) if (!games_nr)
sprintf(menu_buff, NOGAMES_MENU, GAMES_PATH); sprintf(menu_buff, NOGAMES_MENU, GAMES_PATH);
@ -165,16 +168,19 @@ static void games_menu(void)
static void themes_menu(void) static void themes_menu(void)
{ {
int i; int i, n;
*menu_buff = 0; *menu_buff = 0;
sprintf(menu_buff, SELECT_THEME_MENU); 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]; char tmp[PATH_MAX];
if (!themes[i].name[0]) /* empty */
continue;
if (curtheme_dir && !strcmp(themes[i].dir, curtheme_dir)) if (curtheme_dir && !strcmp(themes[i].dir, curtheme_dir))
snprintf(tmp, sizeof(tmp), "<l><a:/resume><b>%s</b></a></l>\n", themes[i].name); snprintf(tmp, sizeof(tmp), "<l><a:/resume><b>%s</b></a></l>\n", themes[i].name);
else else
snprintf(tmp, sizeof(tmp), "<l><a:%s>%s</a></l>\n", themes[i].dir, themes[i].name); snprintf(tmp, sizeof(tmp), "<l><a:%s>%s</a></l>\n", themes[i].dir, themes[i].name);
strcat(menu_buff, tmp); strcat(menu_buff, tmp);
n ++;
} }
if (!themes_nr) if (!themes_nr)
sprintf(menu_buff, NOTHEMES_MENU, THEMES_PATH); sprintf(menu_buff, NOTHEMES_MENU, THEMES_PATH);

View file

@ -5,7 +5,6 @@
#include "sound.h" #include "sound.h"
#define DEFAULT_THEME "default" #define DEFAULT_THEME "default"
#define FIRST_THEME "default-large"
#ifndef THEMES_PATH #ifndef THEMES_PATH
#define THEMES_PATH "./themes" #define THEMES_PATH "./themes"
#endif #endif

View file

@ -1,4 +1,4 @@
; $Name:Книга (800x600)$ ; $Name:Книга$
scr.w = 800 scr.w = 800
scr.h = 600 scr.h = 600
scr.gfx.bg = book.png scr.gfx.bg = book.png

View file

@ -1,8 +1,9 @@
; $Name: Стандартная (800x600)$ ; $Name:$
scr.w = 800 ; for compat only!
scr.h = 600 ;scr.w = 800
win.h = 568 ;scr.h = 600
inv.h = 568 ;win.h = 568
scr.gfx.h = -1 ;inv.h = 568
menu.button.y = 576 ;scr.gfx.h = -1
;menu.button.y = 576

View file

@ -1,6 +1,8 @@
; $Name: Стандартная (800x480)$ ; $Name: Стандартная$
scr.w = 800 scr.w = 800
scr.h = 480 scr.h = 600
scr.gfx.h = -1
scr.gfx.bg = bg.png scr.gfx.bg = bg.png
scr.col.bg = white scr.col.bg = white
scr.gfx.cursor.x = 1 scr.gfx.cursor.x = 1
@ -9,12 +11,12 @@ scr.gfx.cursor.normal = cursor.png
scr.gfx.cursor.use = cursor-use.png scr.gfx.cursor.use = cursor-use.png
scr.gfx.pad = 16 scr.gfx.pad = 16
scr.gfx.mode = embedded scr.gfx.mode = embedded
win.gfx.h = -1 ;unlim
win.x = 48 win.x = 48
win.y = 8 win.y = 8
win.w = 500 win.w = 500
win.h = 448 win.h = 568
win.fnt.name = sans.ttf win.fnt.name = sans.ttf
win.fnt.size = 16 win.fnt.size = 16
win.gfx.up = aup.png win.gfx.up = aup.png
@ -26,7 +28,8 @@ win.col.alink = #606060
inv.x = 620 inv.x = 620
inv.y = 8 inv.y = 8
inv.w = 132 inv.w = 132
inv.h = 448 inv.h = 568
inv.fnt.name = sans.ttf inv.fnt.name = sans.ttf
inv.fnt.size = 16 inv.fnt.size = 16
inv.gfx.up = aup.png inv.gfx.up = aup.png
@ -47,6 +50,14 @@ menu.fnt.name = sans.ttf
menu.fnt.size = 15 menu.fnt.size = 15
menu.gfx.button = menu.png menu.gfx.button = menu.png
menu.button.x = 776 menu.button.x = 776
menu.button.y = 456 menu.button.y = 576
snd.click = click.wav ; click.ogg snd.click = click.wav ; click.ogg
; 800x480 version
;scr.w = 800
;scr.h = 480
;win.h = 448
;inv.h = 448
;menu.button.y = 456

View file

@ -1,4 +1,4 @@
;$Name:Фэнтези (800x600) ;$Name:Фэнтези
scr.w = 800 scr.w = 800
scr.h = 600 scr.h = 600

View file

@ -1,7 +1,13 @@
; $Name:Старая (800x480) ; $Name:Старая
win.col.fg = black win.col.fg = black
win.col.link = blue win.col.link = blue
win.col.alink = red win.col.alink = red
scr.gfx.mode = fixed scr.gfx.mode = fixed
scr.gfx.h = 200 scr.gfx.h = 200
scr.w = 800
scr.h = 480
win.h = 448
inv.h = 448
menu.button.y = 456