| 2125 | } |
| 2126 | |
| 2127 | static void ParsePlayer(const Save::SaveGame* s) |
| 2128 | { |
| 2129 | // Restore current inventory item. |
| 2130 | g_Gui.SetLastInventoryItem(s->last_inv_item()); |
| 2131 | |
| 2132 | ZeroMemory(&Lara, sizeof(LaraInfo)); |
| 2133 | |
| 2134 | // Player |
| 2135 | ZeroMemory(Lara.Inventory.Puzzles, NUM_PUZZLES * sizeof(int)); |
| 2136 | for (int i = 0; i < s->lara()->inventory()->puzzles()->size(); i++) |
| 2137 | Lara.Inventory.Puzzles[i] = s->lara()->inventory()->puzzles()->Get(i); |
| 2138 | |
| 2139 | ZeroMemory(Lara.Inventory.PuzzlesCombo, NUM_PUZZLES * 2 * sizeof(int)); |
| 2140 | for (int i = 0; i < s->lara()->inventory()->puzzles_combo()->size(); i++) |
| 2141 | Lara.Inventory.PuzzlesCombo[i] = s->lara()->inventory()->puzzles_combo()->Get(i); |
| 2142 | |
| 2143 | ZeroMemory(Lara.Inventory.Keys, NUM_KEYS * sizeof(int)); |
| 2144 | for (int i = 0; i < s->lara()->inventory()->keys()->size(); i++) |
| 2145 | Lara.Inventory.Keys[i] = s->lara()->inventory()->keys()->Get(i); |
| 2146 | |
| 2147 | ZeroMemory(Lara.Inventory.KeysCombo, NUM_KEYS * 2 * sizeof(int)); |
| 2148 | for (int i = 0; i < s->lara()->inventory()->keys_combo()->size(); i++) |
| 2149 | Lara.Inventory.KeysCombo[i] = s->lara()->inventory()->keys_combo()->Get(i); |
| 2150 | |
| 2151 | ZeroMemory(Lara.Inventory.Pickups, NUM_PICKUPS * sizeof(int)); |
| 2152 | for (int i = 0; i < s->lara()->inventory()->pickups()->size(); i++) |
| 2153 | Lara.Inventory.Pickups[i] = s->lara()->inventory()->pickups()->Get(i); |
| 2154 | |
| 2155 | ZeroMemory(Lara.Inventory.PickupsCombo, NUM_PICKUPS * 2 * sizeof(int)); |
| 2156 | for (int i = 0; i < s->lara()->inventory()->pickups_combo()->size(); i++) |
| 2157 | Lara.Inventory.PickupsCombo[i] = s->lara()->inventory()->pickups_combo()->Get(i); |
| 2158 | |
| 2159 | ZeroMemory(Lara.Inventory.Examines, NUM_EXAMINES * sizeof(int)); |
| 2160 | for (int i = 0; i < s->lara()->inventory()->examines()->size(); i++) |
| 2161 | Lara.Inventory.Examines[i] = s->lara()->inventory()->examines()->Get(i); |
| 2162 | |
| 2163 | ZeroMemory(Lara.Inventory.ExaminesCombo, NUM_EXAMINES * 2 * sizeof(int)); |
| 2164 | for (int i = 0; i < s->lara()->inventory()->examines_combo()->size(); i++) |
| 2165 | Lara.Inventory.ExaminesCombo[i] = s->lara()->inventory()->examines_combo()->Get(i); |
| 2166 | |
| 2167 | for (int i = 0; i < Lara.Effect.BubbleNodes.size(); i++) |
| 2168 | Lara.Effect.BubbleNodes[i] = s->lara()->effect()->bubble_nodes()->Get(i); |
| 2169 | |
| 2170 | for (int i = 0; i < Lara.Effect.DripNodes.size(); i++) |
| 2171 | Lara.Effect.DripNodes[i] = s->lara()->effect()->drip_nodes()->Get(i); |
| 2172 | |
| 2173 | Lara.Context.CalcJumpVelocity = s->lara()->context()->calc_jump_velocity(); |
| 2174 | Lara.Context.WaterCurrentActive = s->lara()->context()->water_current_active(); |
| 2175 | Lara.Context.WaterCurrentPull.x = s->lara()->context()->water_current_pull()->x(); |
| 2176 | Lara.Context.WaterCurrentPull.y = s->lara()->context()->water_current_pull()->y(); |
| 2177 | Lara.Context.WaterCurrentPull.z = s->lara()->context()->water_current_pull()->z(); |
| 2178 | Lara.Context.InteractedItem = s->lara()->context()->interacted_item_number(); |
| 2179 | Lara.Context.NextCornerPos = ToPose(*s->lara()->context()->next_corner_pose()); |
| 2180 | Lara.Context.ProjectedFloorHeight = s->lara()->context()->projected_floor_height(); |
| 2181 | Lara.Context.TargetOrientation = ToEulerAngles(s->lara()->context()->target_orient()); |
| 2182 | Lara.Context.Vehicle = s->lara()->context()->vehicle_item_number(); |
| 2183 | Lara.Context.WaterSurfaceDist = s->lara()->context()->water_surface_dist(); |
| 2184 | Lara.Control.CanMonkeySwing = s->lara()->control()->can_monkey_swing(); |
no test coverage detected