mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
dual:: shmup
This commit is contained in:
parent
7affa0c07f
commit
182df69535
@ -21,6 +21,7 @@ void gamedata_all(gamedata& gd) {
|
||||
gd.store(sightrange_bonus);
|
||||
gd.store(genrange_bonus);
|
||||
gd.store(gamerange_bonus);
|
||||
gd.store(targets);
|
||||
if(GOLDBERG) gd.store(gp::param);
|
||||
callhooks(hooks_gamedata, &gd);
|
||||
}
|
||||
|
18
shmup.cpp
18
shmup.cpp
@ -3767,6 +3767,23 @@ void clearMemory() {
|
||||
for(int i=0; i<MAXPLAYER; i++) pc[i] = NULL;
|
||||
}
|
||||
|
||||
void gamedata(hr::gamedata* gd) {
|
||||
if(shmup::on) {
|
||||
for(int i=0; i<MAXPLAYER; i++) gd->store(pc[i]);
|
||||
gd->store(nextmove);
|
||||
gd->store(curtime);
|
||||
gd->store(nextdragon);
|
||||
gd->store(visibleAt);
|
||||
gd->store(traplist);
|
||||
gd->store(monstersAt);
|
||||
gd->store(active);
|
||||
gd->store(mousetarget);
|
||||
gd->store(lmousetarget);
|
||||
gd->store(nonvirtual);
|
||||
gd->store(additional);
|
||||
}
|
||||
}
|
||||
|
||||
cell *playerpos(int i) {
|
||||
if(!pc[i]) return NULL;
|
||||
return pc[i]->base;
|
||||
@ -3798,6 +3815,7 @@ void addShmupHelp(string& out) {
|
||||
}
|
||||
|
||||
auto hooks = addHook(clearmemory, 0, shmup::clearMemory) +
|
||||
addHook(hooks_gamedata, 0, shmup::gamedata) +
|
||||
addHook(hooks_removecells, 0, [] () {
|
||||
for(mit it = monstersAt.begin(); it != monstersAt.end();) {
|
||||
if(is_cell_removed(it->first)) {
|
||||
|
Loading…
Reference in New Issue
Block a user