mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-11-04 07:43:02 +00:00 
			
		
		
		
	dual:: added some missing gd->store's
This commit is contained in:
		@@ -798,7 +798,9 @@ int readArgs() {
 | 
			
		||||
 | 
			
		||||
#if CAP_COMMANDLINE
 | 
			
		||||
auto hook = 
 | 
			
		||||
  addHook(hooks_args, 100, readArgs);
 | 
			
		||||
  addHook(hooks_args, 100, readArgs)
 | 
			
		||||
+ addHook(hooks_gamedata, 0, [] (gamedata* gd) { gd->store(altmap); gd->store(archimedean_gmatrix); gd->store(current_altmap); });
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if MAXMDIM >= 4
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								bigstuff.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								bigstuff.cpp
									
									
									
									
									
								
							@@ -866,15 +866,17 @@ void setLandSphere(cell *c) {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
eLand euland[max_vec];
 | 
			
		||||
vector<eLand> euland;
 | 
			
		||||
map<int, eLand> euland3;
 | 
			
		||||
map<int, eLand> euland3_hash;
 | 
			
		||||
 | 
			
		||||
eLand& get_euland(int c) {
 | 
			
		||||
  euland.resize(max_vec);
 | 
			
		||||
  return euland[c & (max_vec-1)];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
void clear_euland(eLand first) {
 | 
			
		||||
  euland.resize(max_vec);
 | 
			
		||||
  for(int i=0; i<max_vec; i++) euland[i] = laNone;
 | 
			
		||||
  euland[0] = euland[1] = euland[max_vec-1] = first;
 | 
			
		||||
  euland3.clear();
 | 
			
		||||
@@ -1617,4 +1619,10 @@ void pregen() {
 | 
			
		||||
        currentlands.push_back(l);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
auto ccm_bigstuff = addHook(hooks_gamedata, 0, [] (gamedata* gd) {
 | 
			
		||||
  gd->store(euland);
 | 
			
		||||
  gd->store(euland3);
 | 
			
		||||
  gd->store(euland3_hash);
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -244,7 +244,13 @@ auto ccm_blizzard = addHook(clearmemory, 0, [] () {
 | 
			
		||||
  blizzardcells.clear();
 | 
			
		||||
  bcells.clear();
 | 
			
		||||
  }) + 
 | 
			
		||||
addHook(hooks_removecells, 0, [] () {
 | 
			
		||||
+ addHook(hooks_gamedata, 0, [] (gamedata* gd) {
 | 
			
		||||
  gd->store(arrowtraps);
 | 
			
		||||
  gd->store(blizzardcells);
 | 
			
		||||
  gd->store(bcells);
 | 
			
		||||
  gd->store(blizzard_N);
 | 
			
		||||
  })
 | 
			
		||||
+ addHook(hooks_removecells, 0, [] () {
 | 
			
		||||
  eliminate_if(arrowtraps, is_cell_removed);
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -189,7 +189,8 @@ namespace brownian {
 | 
			
		||||
    vector<cell*> to_remove;
 | 
			
		||||
    for(auto p: futures) if(is_cell_removed(p.first)) to_remove.push_back(p.first);
 | 
			
		||||
    for(auto r: to_remove) futures.erase(r);
 | 
			
		||||
    }) + addHook(clearmemory, 0, [] () { futures.clear(); });
 | 
			
		||||
    }) + addHook(clearmemory, 0, [] () { futures.clear(); })
 | 
			
		||||
    + addHook(hooks_gamedata, 0, [] (gamedata* gd) { gd->store(futures); });
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7476,8 +7476,9 @@ auto graphcm = addHook(clearmemory, 0, [] () {
 | 
			
		||||
  gd->store(animations);
 | 
			
		||||
  gd->store(flashes);
 | 
			
		||||
  gd->store(fallanims);
 | 
			
		||||
  gd->store(radar_transform);
 | 
			
		||||
  gd->store(actual_view_transform);
 | 
			
		||||
  });
 | 
			
		||||
;
 | 
			
		||||
 | 
			
		||||
//=== animation
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3777,7 +3777,7 @@ void clearMemory() {
 | 
			
		||||
 | 
			
		||||
void gamedata(hr::gamedata* gd) { 
 | 
			
		||||
  if(shmup::on) {
 | 
			
		||||
    for(int i=0; i<MAXPLAYER; i++) gd->store(pc[i]);
 | 
			
		||||
    gd->store(pc[0]); // assuming 1 player!
 | 
			
		||||
    gd->store(nextmove);
 | 
			
		||||
    gd->store(curtime);
 | 
			
		||||
    gd->store(nextdragon);
 | 
			
		||||
@@ -3789,6 +3789,9 @@ void gamedata(hr::gamedata* gd) {
 | 
			
		||||
    gd->store(lmousetarget);
 | 
			
		||||
    gd->store(nonvirtual);
 | 
			
		||||
    gd->store(additional);
 | 
			
		||||
    if(WDIM == 3) gd->store(swordmatrix[0]); // assuming 1 player!
 | 
			
		||||
    gd->store(traplist);
 | 
			
		||||
    gd->store(firetraplist);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1386,11 +1386,15 @@ addHook(hooks_gamedata, 0, [] (gamedata* gd) {
 | 
			
		||||
  gd->store(crush_now);
 | 
			
		||||
  gd->store(crush_next);
 | 
			
		||||
  gd->store(rosemap);
 | 
			
		||||
  gd->store(airmap);
 | 
			
		||||
  gd->store(adj_memo);
 | 
			
		||||
  gd->store(pd_from);
 | 
			
		||||
  gd->store(pd_range);
 | 
			
		||||
  gd->store(pathqm);
 | 
			
		||||
  gd->store(reachedfrom);
 | 
			
		||||
  gd->store(gravity_state);
 | 
			
		||||
  gd->store(last_gravity_state);
 | 
			
		||||
  gd->store(shpos);
 | 
			
		||||
  }) +
 | 
			
		||||
addHook(hooks_removecells, 0, [] () {
 | 
			
		||||
  eliminate_if(crush_next, is_cell_removed);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user