void CQuadField::Serialize(creg::ISerializer& s) { // no need to alloc quad array, this has already been done in constructor for (int z = 0; z < numQuadsZ; ++z) for (int x = 0; x < numQuadsX; ++x) s.SerializeObjectInstance(&baseQuads[z*numQuadsX+x], Quad::StaticClass()); }
void CGameStateCollector::Serialize(creg::ISerializer& s) { // GetClass() works because readmap and uh both have to exist already s.SerializeObjectInstance(gs, gs->GetClass()); s.SerializeObjectInstance(gu, gu->GetClass()); s.SerializeObjectInstance(game, game->GetClass()); s.SerializeObjectInstance(readmap, readmap->GetClass()); s.SerializeObjectInstance(qf, qf->GetClass()); s.SerializeObjectInstance(featureHandler, featureHandler->GetClass()); s.SerializeObjectInstance(loshandler, loshandler->GetClass()); s.SerializeObjectInstance(radarhandler, radarhandler->GetClass()); s.SerializeObjectInstance(airBaseHandler, airBaseHandler->GetClass()); s.SerializeObjectInstance(&interceptHandler, interceptHandler.GetClass()); s.SerializeObjectInstance(CCategoryHandler::Instance(), CCategoryHandler::Instance()->GetClass()); s.SerializeObjectInstance(uh, uh->GetClass()); s.SerializeObjectInstance(ph, ph->GetClass()); // std::map<std::string, int> unitRestrictions; s.SerializeObjectInstance(&waitCommandsAI, waitCommandsAI.GetClass()); s.SerializeObjectInstance(&wind, wind.GetClass()); s.SerializeObjectInstance(inMapDrawer,inMapDrawer->GetClass()); for (int a=0;a<MAX_TEAMS;a++) s.SerializeObjectInstance(grouphandlers[a], grouphandlers[a]->GetClass()); s.SerializeObjectInstance(globalAI, globalAI->GetClass()); s.SerializeObjectInstance(&CBuilderCAI::reclaimers,CBuilderCAI::reclaimers.GetClass()); // s.Serialize() }
void CGameStateCollector::Serialize(creg::ISerializer& s) { // GetClass() works because readmap and uh both have to exist already s.SerializeObjectInstance(gs, gs->GetClass()); s.SerializeObjectInstance(gu, gu->GetClass()); s.SerializeObjectInstance(game, game->GetClass()); s.SerializeObjectInstance(readmap, readmap->GetClass()); s.SerializeObjectInstance(qf, qf->GetClass()); s.SerializeObjectInstance(featureHandler, featureHandler->GetClass()); s.SerializeObjectInstance(loshandler, loshandler->GetClass()); s.SerializeObjectInstance(radarhandler, radarhandler->GetClass()); s.SerializeObjectInstance(airBaseHandler, airBaseHandler->GetClass()); s.SerializeObjectInstance(&interceptHandler, interceptHandler.GetClass()); s.SerializeObjectInstance(CCategoryHandler::Instance(), CCategoryHandler::Instance()->GetClass()); s.SerializeObjectInstance(uh, uh->GetClass()); s.SerializeObjectInstance(ph, ph->GetClass()); // std::map<std::string, int> unitRestrictions; s.SerializeObjectInstance(&waitCommandsAI, waitCommandsAI.GetClass()); s.SerializeObjectInstance(&wind, wind.GetClass()); s.SerializeObjectInstance(inMapDrawerModel, inMapDrawerModel->GetClass()); for (int a=0; a < teamHandler->ActiveTeams(); a++) { s.SerializeObjectInstance(grouphandlers[a], grouphandlers[a]->GetClass()); } s.SerializeObjectInstance(eoh, eoh->GetClass()); // s.Serialize() }