1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-18 14:45:12 +00:00

multigame support, including dualmode

This commit is contained in:
Zeno Rogue
2019-05-29 01:09:38 +02:00
parent 587652e540
commit 8295251cdc
17 changed files with 492 additions and 126 deletions

View File

@@ -7240,7 +7240,14 @@ void gamescreen(int _darken) {
just_gmatrix = false;
return;
}
if(dual::split([=] () {
dual::in_subscreen([=] () { gamescreen(_darken); });
})) {
calcparam();
return;
}
if((cmode & sm::MAYDARK) && !current_display->sidescreen) {
_darken += 2;
}
@@ -7463,11 +7470,19 @@ auto graphcm = addHook(clearmemory, 0, [] () {
mouseover = centerover.at = lmouseover = NULL;
gmatrix.clear(); gmatrix0.clear();
clearAnimations();
})
+ addHook(hooks_gamedata, 0, [] (gamedata* gd) {
gd->store(mouseover);
gd->store(lmouseover);
gd->store(animations);
gd->store(flashes);
gd->store(fallanims);
});
;
//=== animation
map<cell*, animation> animations[ANIMLAYERS];
array<map<cell*, animation>, ANIMLAYERS> animations;
int revhint(cell *c, int hint) {
if(hint >= 0 && hint < c->type) return c->c.spin(hint);