fix
This commit is contained in:
parent
c3b90a1d78
commit
284cf7186e
|
@ -3116,7 +3116,7 @@ int game_loop(void)
|
||||||
// game_highlight(ev.x, ev.y, 1);
|
// game_highlight(ev.x, ev.y, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game_theme.gfx_mode != GFX_MODE_DIRECT) {
|
if (game_theme.gfx_mode != GFX_MODE_DIRECT || menu_shown) {
|
||||||
if (old_xref)
|
if (old_xref)
|
||||||
game_highlight(x, y, 1);
|
game_highlight(x, y, 1);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -213,6 +213,10 @@ end)
|
||||||
|
|
||||||
player = stead.inherit(player, function(v)
|
player = stead.inherit(player, function(v)
|
||||||
v.look = function(s)
|
v.look = function(s)
|
||||||
|
if not stead.started then
|
||||||
|
stead.started = true
|
||||||
|
game:start()
|
||||||
|
end
|
||||||
if game._time == 0 then
|
if game._time == 0 then
|
||||||
return stead.goto(here(), false, false, true);
|
return stead.goto(here(), false, false, true);
|
||||||
end
|
end
|
||||||
|
|
|
@ -1561,10 +1561,11 @@ function do_ini(self, load)
|
||||||
stead.initialized = true
|
stead.initialized = true
|
||||||
return stead.par('',v, self._lastdisp); --stead.par('^^',v);
|
return stead.par('',v, self._lastdisp); --stead.par('^^',v);
|
||||||
end
|
end
|
||||||
|
stead.do_ini = do_ini
|
||||||
|
|
||||||
function game_ini(self)
|
function game_ini(self)
|
||||||
local v,vv
|
local v,vv
|
||||||
v = do_ini(self);
|
v = stead.do_ini(self);
|
||||||
vv = iface:title(call(self,'nam'));
|
vv = iface:title(call(self,'nam'));
|
||||||
vv = stead.par('^^', vv, call(self,'dsc'));
|
vv = stead.par('^^', vv, call(self,'dsc'));
|
||||||
if type(init) == 'function' then
|
if type(init) == 'function' then
|
||||||
|
@ -1576,6 +1577,12 @@ function game_ini(self)
|
||||||
return stead.par("^^", vv, v);
|
return stead.par("^^", vv, v);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function game_start(s)
|
||||||
|
if type(start) == 'function' then
|
||||||
|
start() -- start function
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function game(v)
|
function game(v)
|
||||||
if v.nam == nil then
|
if v.nam == nil then
|
||||||
error ("No game name in constructor.", 2);
|
error ("No game name in constructor.", 2);
|
||||||
|
@ -1586,6 +1593,9 @@ function game(v)
|
||||||
if v.ini == nil then
|
if v.ini == nil then
|
||||||
v.ini = game_ini;
|
v.ini = game_ini;
|
||||||
end
|
end
|
||||||
|
if v.start == nil then
|
||||||
|
v.start = game_start
|
||||||
|
end
|
||||||
if v.save == nil then
|
if v.save == nil then
|
||||||
v.save = game_save;
|
v.save = game_save;
|
||||||
end
|
end
|
||||||
|
@ -1789,6 +1799,8 @@ function gamefile(file, forget)
|
||||||
end
|
end
|
||||||
init = function() -- null init function
|
init = function() -- null init function
|
||||||
end
|
end
|
||||||
|
start = function() -- null start function
|
||||||
|
end
|
||||||
for_each_object(function(k, o) -- destroy all objects
|
for_each_object(function(k, o) -- destroy all objects
|
||||||
if o.system_type then
|
if o.system_type then
|
||||||
return
|
return
|
||||||
|
@ -1879,7 +1891,12 @@ function game_load(self, name)
|
||||||
if r then
|
if r then
|
||||||
return nil, false
|
return nil, false
|
||||||
end
|
end
|
||||||
return do_ini(self, true);
|
i, r = stead.do_ini(self, true);
|
||||||
|
if not stead.started then
|
||||||
|
game:start()
|
||||||
|
stead.started = true
|
||||||
|
end
|
||||||
|
return i, r
|
||||||
end
|
end
|
||||||
return nil, false
|
return nil, false
|
||||||
end
|
end
|
||||||
|
@ -2906,6 +2923,7 @@ end
|
||||||
|
|
||||||
stead.init = function(s)
|
stead.init = function(s)
|
||||||
stead.initialized = false
|
stead.initialized = false
|
||||||
|
stead.started = false
|
||||||
stead:objects();
|
stead:objects();
|
||||||
s.functions = {} -- code blocks
|
s.functions = {} -- code blocks
|
||||||
local k,v
|
local k,v
|
||||||
|
|
Loading…
Reference in a new issue