| 1997 | // not initialized in editor, but only in game. |
| 1998 | extern char Editor_quickplay_levelname[_MAX_PATH]; |
| 1999 | void QuickStartMission() { |
| 2000 | // create the level script code here, if we really need to. |
| 2001 | ResetGamemode(); |
| 2002 | // this initializes a mini one level mission with no frills. |
| 2003 | Current_mission.cur_level = 1; |
| 2004 | Current_mission.num_levels = 1; |
| 2005 | Current_mission.levels = (tLevelNode *)mem_malloc(sizeof(tLevelNode)); |
| 2006 | memset(Current_mission.levels, 0, sizeof(tLevelNode)); |
| 2007 | Current_level = Current_mission.levels; |
| 2008 | if (Editor_quickplay_levelname[0] != '\0') |
| 2009 | Current_level->filename = mem_strdup(Editor_quickplay_levelname); |
| 2010 | else |
| 2011 | Current_level->filename = NULL; |
| 2012 | // proceed with initialization. |
| 2013 | InitMissionScript(); |
| 2014 | SetGameState(GAMESTATE_LVLSTART); |
| 2015 | } |
| 2016 | // Used by game->editor to free up all extra game mission elements not needed in editor. |
| 2017 | void QuickEndMission() { |
| 2018 | //@@ FreeScriptsForLevel(); |
no test coverage detected