/** * Load guests from the save game. * @param ldr Input stream to read. */ void Guests::Load(Loader &ldr) { uint32 version = ldr.OpenBlock("GSTS"); if (version == 1) { this->start_voxel.x = ldr.GetWord(); this->start_voxel.y = ldr.GetWord(); this->daily_frac = ldr.GetWord(); this->next_daily_index = ldr.GetWord(); this->free_idx = ldr.GetLong(); uint active_guest_count = ldr.GetLong(); for (uint i = 0; i < active_guest_count; i++) { Guest *g = this->block.Get(ldr.GetWord()); g->Load(ldr); } } else { ldr.SetFailMessage("Incorrect version of Guests block."); } ldr.CloseBlock(); }