Example #1
0
void cEditor_World :: Function_Save( bool with_dialog /* = 0 */ )
{
	// if denied
	if( with_dialog && !Box_Question( _("Save ") + Trim_Filename( m_overworld->m_description->m_name, 0, 0 ) + " ?" ) )
	{
		return;
	}

	m_overworld->Save();
}
Example #2
0
 void cWaypoint::Set_Destination(std::string str)
 {
     if (waypoint_type == WAYPOINT_NORMAL)
     {
         str = Trim_Filename(str, 0, 0);
     }
     else if (waypoint_type == WAYPOINT_WORLD_LINK && str.find(DATA_DIR "/" GAME_OVERWORLD_DIR "/") != std::string::npos)
     {
         str.erase(0, strlen(DATA_DIR "/" GAME_OVERWORLD_DIR "/"));
     }
     
     destination = str;
 }
Example #3
0
 std::string cWaypoint::Get_Destination(bool with_dir, bool with_end) const
 {
     std::string name = destination;
     
     if (waypoint_type == WAYPOINT_NORMAL)
     {
         pActive_Level->Get_Path(name);
         name = Trim_Filename(name, with_dir, with_end);
     }
     else if (waypoint_type == WAYPOINT_WORLD_LINK)
     {
         if (with_dir && name.find(DATA_DIR "/" GAME_OVERWORLD_DIR "/") == std::string::npos)
         {
             name.insert(0, DATA_DIR "/" GAME_OVERWORLD_DIR "/");
         }
     }
     
     return name;
 }