save disabling fixes

This commit is contained in:
p.kosyh 2009-11-13 12:04:46 +00:00
parent 6c5131a54a
commit 35649df04a
4 changed files with 5 additions and 4 deletions

View file

@ -117,5 +117,5 @@ Please, put any theme in the directory:\n'%s'
CANCEL_MENU = <a:/resume>Cancel</a>
DISABLED_SAVE_MENU = \
Sorry, this game disable save.\n
Saving is disabled by game.\n

View file

@ -118,5 +118,5 @@ NOTHEMES_MENU = \
CANCEL_MENU = <a:/resume>Отмена</a>
DISABLED_SAVE_MENU = \
Игра запрещает использовать сохранение.\n
Сохранение запрещено игрой.\n

View file

@ -75,11 +75,12 @@ static void load_menu(void)
{
int i;
*menu_buff = 0;
/*
if (!game_saves_enabled()) {
strcat(menu_buff, DISABLED_SAVE_MENU);
strcat(menu_buff, CANCEL_MENU);
return;
}
} */
sprintf(menu_buff, SELECT_LOAD_MENU);
for (i = 0; i < MAX_SAVE_SLOTS; i ++) {
char tmp[PATH_MAX];

View file

@ -1447,7 +1447,7 @@ function game_save(self, name, file)
end
function game_load(self, name)
if name == nil or not isEnableSave() then
if name == nil then
return nil, false
end
local f, err = loadfile(name);