new_place in fading
This commit is contained in:
parent
cbdfef734e
commit
b7e5b04264
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -6,6 +6,7 @@ instead (1.4.5) unstable; urgency=low
|
|||
* bug fix in txtnb and \;
|
||||
* win.align added to theme;
|
||||
* theme_name added;
|
||||
* now fading first value is new scene flag;
|
||||
|
||||
-- Peter Kosyh <p.kosyh@gmail.com> Thu, 14 Jul 2011 16:18:00 +0400
|
||||
|
||||
|
|
|
@ -1280,7 +1280,7 @@ int check_new_pict(char *pict)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int check_fading(void)
|
||||
static int check_fading(int *new_scene)
|
||||
{
|
||||
int rc;
|
||||
int st;
|
||||
|
@ -1294,7 +1294,9 @@ static int check_fading(void)
|
|||
st = 255;
|
||||
|
||||
instead_clear();
|
||||
return rc?st:0;
|
||||
if (new_scene)
|
||||
*new_scene = rc;
|
||||
return st;
|
||||
}
|
||||
|
||||
static void game_autosave(void)
|
||||
|
@ -1751,6 +1753,7 @@ int game_cmd(char *cmd)
|
|||
img_t oldscreen = NULL;
|
||||
int dd = (DIRECT_MODE);
|
||||
int rc = 0;
|
||||
int new_scene = 0;
|
||||
if (menu_shown)
|
||||
return -1;
|
||||
|
||||
|
@ -1791,7 +1794,7 @@ int game_cmd(char *cmd)
|
|||
goto inv; /* hackish? ok, yes it is... */
|
||||
goto err; /* really nothing to do */
|
||||
}
|
||||
fading = check_fading();
|
||||
fading = check_fading(&new_scene);
|
||||
|
||||
instead_function("instead.get_title", NULL);
|
||||
title = instead_retval(0);
|
||||
|
@ -1939,7 +1942,7 @@ int game_cmd(char *cmd)
|
|||
txt_layout_set(txt_box_layout(el_box(el_scene)), cmdstr);
|
||||
txt_box_set(el_box(el_scene), txt_box_layout(el_box(el_scene)));
|
||||
}
|
||||
if (!fading)
|
||||
if (!new_scene)
|
||||
scroll_to_diff(cmdstr, old_off);
|
||||
FREE(last_cmd);
|
||||
last_cmd = cmdstr;
|
||||
|
|
|
@ -313,25 +313,24 @@ function isFading() --to check fading from sdl gui
|
|||
if not isRoom(h) then
|
||||
return false
|
||||
end
|
||||
r,v = call_value(h, 'fading');
|
||||
if r then
|
||||
r, v = call_value(h, 'fading');
|
||||
if r or r == false then
|
||||
if tonumber(r) and v == nil then
|
||||
return true, tonumber(r)
|
||||
end
|
||||
return true, v
|
||||
return r, v
|
||||
end
|
||||
g,v = call_value(game, 'fading', h);
|
||||
g, v = call_value(game, 'fading', h);
|
||||
if tonumber(g) and v == nil then
|
||||
v = tonumber(g)
|
||||
g = true
|
||||
return true, tonumber(g)
|
||||
end
|
||||
return g and r ~= false, v
|
||||
return g, v
|
||||
end
|
||||
|
||||
instead.get_fading = function()
|
||||
local r, v
|
||||
r, v = isFading()
|
||||
if v == nil then v = game.gui.fading end
|
||||
if v == nil and r then v = game.gui.fading end
|
||||
return r,v
|
||||
end
|
||||
-- vim:ts=4
|
||||
|
|
Loading…
Reference in a new issue