void Action_ConfigureMultiplayer(void* tag) { int i; MENU_Set(MENU_MULTIPLAYER); engine.mode = DE_MODE_MULTIPLAYER; NET_Init(); PL_ResetPlayersScore(); for(i=0 ; i < MAX_NUM_PLAYERS ; i++) players[i].respawnCounter = numPlayerRespawn[DIFFICULTY_NORMAL]; engine.difficultyLevel = DIFFICULTY_NORMAL; }
void Action_PlayDemo(void* tag) { int i; char* actId = (char*)tag; PL_ResetPlayersScore(); for(i=0 ; i < MAX_NUM_PLAYERS ; i++) players[i].respawnCounter = numPlayerRespawn[DIFFICULTY_NORMAL]; engine.difficultyLevel = DIFFICULTY_NORMAL; dEngine_RequireSceneId(*actId); MENU_Set(MENU_NONE); }
void Action_GoToTutorial(void* tag) { int i; PL_ResetPlayersScore(); for(i=0 ; i < MAX_NUM_PLAYERS ; i++) players[i].respawnCounter = numPlayerRespawn[DIFFICULTY_NORMAL]; if (engine.controlMode == CONTROL_MODE_SWIP) { dEngine_RequireSceneId(14); MENU_Set(MENU_NONE); } else { dEngine_RequireSceneId(15); MENU_Set(MENU_NONE); } }
void Action_startNewGame(void* tag) { int i; uchar difficultyLevel; difficultyLevel = *(char*)tag; MENU_Set(MENU_NONE); dEngine_RequireSceneId(1); //Parameter set the difficulty level engine.mode = DE_MODE_SINGLEPLAYER; PL_ResetPlayersScore(); numPlayers = 1; for(i=0 ; i < MAX_NUM_PLAYERS ; i++) players[i].respawnCounter = numPlayerRespawn[difficultyLevel]; engine.difficultyLevel = difficultyLevel; }
void dEngine_LoadScene(int sceneId) { event_t* ev; COM_StopRecording(); engine.showFingers=0; engine.controlVisible=0; // Reset variables state (only usefull when we are not loading the first level EV_InitForScene(); P_ResetPlayers(); ENE_Reset(); ENPAR_Reset(); DYN_TEXT_Init(); ENE_ReleaseAll(); COM_ResetTouchesBuffer(); numBackgroundEntities=0; engine.sceneId = sceneId; engine.musicStartAt= 0; // Now actually start loading things World_OpenScene(engine.scenes[engine.sceneId].path); MENU_Set(engine.scenes[engine.sceneId].defaultMenuId); COM_StartScene(); ENE_Precache(); if (engine.musicFilename[0] != '\0') { //SND_InitSoundTrack(engine.musicFilename,engine.musicStartAt); //SND_StartSoundTrack(); } CAM_LoadPath(); CAM_StartPlaying(); #ifdef GENERATE_VIDEO Timer_ForceTimeIncrement(16); #endif Timer_resetTime(); //In single player we start right away, in multiplayer the go is given by the netchannel if (engine.mode == DE_MODE_SINGLEPLAYER) Timer_Resume(); VIS_Update(); if (engine.sceneId == 1 && engine.licenseType == LICENSE_LIMITED) { ev = calloc(1, sizeof(event_t)); ev->time = 130000; ev->type = EV_LIMITED_EVENT; EV_AddEvent(ev); } //We are back to main menu, init a few things if (sceneId == 0 ) { numPlayers = 1; PL_ResetPlayersScore(); } }