cSave_Level_Object* cPath::Save_To_Savegame(void) { cSave_Level_Object *save_object = new cSave_Level_Object(); save_object->m_type = m_type; save_object->m_properties.push_back(cSave_Level_Object_Property("posx", int_to_string(static_cast<int>(m_start_pos_x)))); save_object->m_properties.push_back(cSave_Level_Object_Property("posy", int_to_string(static_cast<int>(m_start_pos_y)))); return save_object; }
void cPath_State::Save_To_Savegame(cSave_Level_Object *save_object) { save_object->m_properties.push_back(cSave_Level_Object_Property("new_pos_x", float_to_string(pos_x))); save_object->m_properties.push_back(cSave_Level_Object_Property("new_pos_y", float_to_string(pos_y))); save_object->m_properties.push_back(cSave_Level_Object_Property("current_segment", int_to_string(current_segment))); save_object->m_properties.push_back(cSave_Level_Object_Property("current_segment_pos", float_to_string(current_segment_pos))); save_object->m_properties.push_back(cSave_Level_Object_Property("forward", int_to_string(static_cast<int>(forward)))); }
cSave_Level_Object* cPowerUp::Save_To_Savegame(void) { if (m_active) { return NULL; } cSave_Level_Object* save_object = new cSave_Level_Object(); save_object->m_type = m_type; save_object->m_properties.push_back(cSave_Level_Object_Property("posx", int_to_string(static_cast<int>(m_start_pos_x)))); save_object->m_properties.push_back(cSave_Level_Object_Property("posy", int_to_string(static_cast<int>(m_start_pos_y)))); save_object->m_properties.push_back(cSave_Level_Object_Property("active", int_to_string(m_active))); return save_object; }
cSave_Level_Object* cBaseBox::Save_To_Savegame(void) { if (useable_count == start_useable_count) { return NULL; } cSave_Level_Object* save_object = new cSave_Level_Object(); save_object->m_type = m_type; save_object->m_properties.push_back(cSave_Level_Object_Property("posx", int_to_string(static_cast<int>(m_start_pos_x)))); save_object->m_properties.push_back(cSave_Level_Object_Property("posy", int_to_string(static_cast<int>(m_start_pos_y)))); save_object->m_properties.push_back(cSave_Level_Object_Property("useable_count", int_to_string(useable_count))); return save_object; }
cSave_Level_Object* cFlyon::Save_To_Savegame(void) { cSave_Level_Object* save_object = cEnemy::Save_To_Savegame(); // move_back ( only save if needed ) if (m_move_back) { save_object->m_properties.push_back(cSave_Level_Object_Property("move_back", int_to_string(m_move_back))); } return save_object; }