onexit/onenter actions
This commit is contained in:
parent
59604c4a8a
commit
5146a50899
|
@ -120,7 +120,8 @@ int main(int argc, char **argv)
|
||||||
p = games_sw;
|
p = games_sw;
|
||||||
else
|
else
|
||||||
p = game_local_games_path(1);
|
p = game_local_games_path(1);
|
||||||
setup_zip(file, p);
|
if (setup_zip(file, p))
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else if (!strcmp(argv[i], "-quit")) {
|
} else if (!strcmp(argv[i], "-quit")) {
|
||||||
|
@ -136,7 +137,8 @@ int main(int argc, char **argv)
|
||||||
p = games_sw;
|
p = games_sw;
|
||||||
else
|
else
|
||||||
p = game_tmp_path();
|
p = game_tmp_path();
|
||||||
setup_zip(argv[i], p);
|
if (setup_zip(argv[i], p))
|
||||||
|
exit(1);
|
||||||
clean_tmp = 1;
|
clean_tmp = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1114,12 +1114,17 @@ function go(self, where, back)
|
||||||
res = par('^^',res,v);
|
res = par('^^',res,v);
|
||||||
if not back then
|
if not back then
|
||||||
ref(where).__from__ = deref(self.where);
|
ref(where).__from__ = deref(self.where);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
v = call(ref(was), 'onexit', deref(where));
|
||||||
|
res = par('^^',res,v);
|
||||||
|
self.where = deref(where);
|
||||||
|
v = call(ref(where), 'onenter', deref(was));
|
||||||
|
res = par('^^',res,v);
|
||||||
|
|
||||||
if need_scene then -- or isForcedsc(ref(where)) then -- i'am not sure...
|
if need_scene then -- or isForcedsc(ref(where)) then -- i'am not sure...
|
||||||
self.where = deref(where);
|
|
||||||
return par('^^',res,ref(where):scene());
|
return par('^^',res,ref(where):scene());
|
||||||
end
|
end
|
||||||
self.where = deref(where);
|
|
||||||
return res;
|
return res;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Reference in a new issue