コード例 #1
0
ファイル: ct04.cpp プロジェクト: AReim1982/scummvm
bool SceneScriptCT04::ClickedOnActor(int actorId) {
	if (actorId == 12) {
		if (Game_Flag_Query(169)) {
			if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorTransient, 36, 1, false)) {
				Actor_Voice_Over(290, kActorVoiceOver);
				Actor_Voice_Over(300, kActorVoiceOver);
				Actor_Voice_Over(310, kActorVoiceOver);
			}
		} else {
			Actor_Set_Targetable(kActorTransient, false);
			if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorTransient, 36, 1, false)) {
				Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
				if (!Game_Flag_Query(137)) {
					if (Game_Flag_Query(40)) {
						Actor_Says(kActorMcCoy, 435, 3);
						Actor_Set_Goal_Number(kActorTransient, 2);
					} else {
						Music_Stop(3);
						Actor_Says(kActorMcCoy, 425, 3);
						Actor_Says(kActorTransient, 0, 13);
						sub_401D4C();
						Actor_Set_Goal_Number(kActorTransient, 2);
					}
					Game_Flag_Set(137);
				} else {
					Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
					Actor_Says(kActorMcCoy, 435, 3);
				}
			}
		}
		return true;
	}
	return false;
}
コード例 #2
0
ファイル: nr08.cpp プロジェクト: 86400/scummvm
void ScriptNR08::PlayerWalkedOut() {
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
	Ambient_Sounds_Remove_All_Looping_Sounds(1);
	if (!Game_Flag_Query(547)) {
		Music_Stop(2);
	}
}
コード例 #3
0
ファイル: lucy.cpp プロジェクト: BenCastricum/scummvm
void AIScriptLucy::voightKempTest() {
	Player_Loses_Control();
	Actor_Face_Actor(kActorMcCoy, kActorLucy, 1);
	Actor_Says(kActorMcCoy, 6815, 11);
	Actor_Face_Actor(kActorLucy, kActorMcCoy, 1);
	Actor_Says(kActorLucy, 1060, 16);
	Actor_Says(kActorLucy, 1070, 17);
	Delay(1000);
	Actor_Says(kActorLucy, 1080, 14);
	Actor_Says(kActorMcCoy, 6820, 16);
	Actor_Says(kActorLucy, 1090, 13);
	if (!Game_Flag_Query(378)) {
		Actor_Says(kActorMcCoy, 6825, 13);
	}
	Actor_Says(kActorMcCoy, 6830, 12);
	Actor_Says(kActorLucy, 1100, 14);
	Actor_Says(kActorMcCoy, 6835, 14);
	Actor_Says(kActorLucy, 1110, 15);
	Actor_Says(kActorMcCoy, 6840, 13);
	Delay(1000);
	Actor_Says(kActorMcCoy, 6845, 12);
	Delay(500);
	Actor_Says(kActorMcCoy, 6850, 12);
	Actor_Says(kActorLucy, 1120, 14);
	Actor_Says(kActorMcCoy, 6855, 13);
	Actor_Says(kActorMcCoy, 6860, 13);
	Actor_Says(kActorLucy, 1130, 14);
	Music_Stop(2);
	Player_Gains_Control();
	Voight_Kampff_Activate(6, 40);
	Player_Loses_Control();
	if (Actor_Clue_Query(kActorMcCoy, 271)) {
		Actor_Says(kActorMcCoy, 6865, 13);
		Actor_Says(kActorLucy, 1140, 14);
		Actor_Says(kActorMcCoy, 6865, 14);
		Actor_Says(kActorLucy, 1150, 16);
		Actor_Says(kActorMcCoy, 6870, 14);
		Delay(500);
		Actor_Says(kActorMcCoy, 6875, 13);
		Actor_Says(kActorLucy, 1160, 16);
	} else {
		Actor_Says(kActorMcCoy, 6880, 13);
		Actor_Says(kActorLucy, 1170, 13);
		Actor_Says(kActorLucy, 1180, 16);
		Actor_Says(kActorMcCoy, 6890, 15);
		Actor_Says(kActorLucy, 1190, 15);
		Actor_Says(kActorLucy, 1200, 17);
		Actor_Says(kActorMcCoy, 6885, 13);
		Actor_Says(kActorLucy, 1210, 17);
	}
	Actor_Says(kActorMcCoy, 6895, 15);
	Actor_Says(kActorMcCoy, 6900, 11);
	Actor_Says(kActorLucy, 1220, 16);
	Actor_Says(kActorMcCoy, 6905, 13);
	Actor_Says(kActorLucy, 1230, 17);
	Actor_Says(kActorMcCoy, 6910, 13);
	Delay(2000);
	Player_Gains_Control();
	Actor_Set_Goal_Number(kActorLucy, 312);
}
コード例 #4
0
ファイル: hc03.cpp プロジェクト: 86400/scummvm
bool ScriptHC03::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(0, 607.0f, 0.14f, 9.0f, 0, 1, false, 0)) {
			Game_Flag_Set(387);
			Set_Enter(8, 31);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(0, 628.0f, 2.04f, -123.0f, 0, 1, false, 0)) {
			if (Game_Flag_Query(388)) {
				Game_Flag_Set(319);
				Game_Flag_Reset(479);
				Game_Flag_Set(259);
				Game_Flag_Set(388);
				Music_Stop(2);
				Set_Enter(75, 87);
			} else {
				Scene_Loop_Set_Default(6);
				Scene_Loop_Start_Special(2, 5, 1);
				Game_Flag_Set(388);
			}
		}
		return true;
	}
	return false;
}
コード例 #5
0
ファイル: main.c プロジェクト: iotexpert/Pinball
int main()
{
    char c;    
    int note=0; // current Notes
    int printFlag=0; // if set to 0 it prints the notes when they change
 
    CyGlobalIntEnable; /* Enable global interrupts. */
    CySysTickStart();
    
    Music_Start(0);
 
    UART_Start();
   
    sprintf(buff,"Started\n");
    UART_UartPutString(buff);

    for(;;)
    {
        c = UART_UartGetChar();
        switch(c)
        {
            case 's':
                UART_UartPutString("Start\n");
                Music_PlaySong(0);
            break;
            case 'S':
                UART_UartPutString("Stop\n");
                Music_Stop();
            break;
            case 'p':
                printFlag=0;
                break;
            case 'P':
                printFlag = 1;
            break;
            case 't': // put it back to the default
                Music_SetBPM(0);
            break;
            case 'T':
                Music_SetBPM(60);
            break;
                
            case '1':
                Music_PlaySong(0);
            break;
            case '2':
                Music_PlaySong(1);
            break;
        }
        
        if(note != Music_GetNote() && printFlag)
        {
            note = Music_GetNote();
            sprintf(buff,"Note = %d\n",note);
            UART_UartPutString(buff);
        }
    }
}
コード例 #6
0
ファイル: Game.c プロジェクト: baw959/Video_game_project
// this function will toggle the music playing 
void PressB(void){
  mute ^= 1;
  if (mute){
    Music_Stop();
  }
  else{
    Music_Play();
  }
}
コード例 #7
0
ファイル: clovis.cpp プロジェクト: dreammaster/scummvm
bool AIScriptClovis::ShotAtAndHit() {
	if (!Game_Flag_Query(697)) {
		if (Actor_Query_Goal_Number(kActorClovis) == 515) {
			ADQ_Flush();
			Actor_Set_Goal_Number(kActorClovis, 599);
			shotAnim();
			Actor_Set_Targetable(kActorClovis, false);
			ADQ_Add(kActorMcCoy, 2340, -1);
			Music_Stop(3);
		} else if (Actor_Query_Goal_Number(kActorClovis) == 513 || Actor_Query_Goal_Number(kActorClovis) == 518) {
			ADQ_Flush();
			Actor_Set_Goal_Number(kActorClovis, 599);
			shotAnim();
			Actor_Set_Targetable(kActorClovis, false);
			Music_Stop(3);
		}
}
	return false;
}
コード例 #8
0
ファイル: dr04.cpp プロジェクト: athrxx/scummvm
void SceneScriptDR04::SceneFrameAdvanced(int frame) {
	if (Game_Flag_Query(kFlagDR05ViewExplosion)) {
		Game_Flag_Reset(kFlagDR05ViewExplosion);
		Game_Flag_Reset(kFlagDR05BombWillExplode);
		Scene_Loop_Set_Default(kDR04LoopMainPostExplosion);
		Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true);
		Music_Stop(4);
		Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiPerished);
	} else {
		if (Game_Flag_Query(kFlagDR05BombWillExplode)) {
			Game_Flag_Reset(kFlagDR05BombWillExplode);
			Game_Flag_Set(kFlagDR05BombExploded);
			Scene_Loop_Set_Default(kDR04LoopMainPostExplosion);
			Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true);
			Item_Remove_From_World(kItemBomb);
		}

		switch (frame) {
		case 193:
			Sound_Play(301, 100, 0, 100, 50);
			Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate);
			Player_Loses_Control();
			Actor_Force_Stop_Walking(kActorMcCoy);
			if (farEnoughFromExplosion()) {
				if (Player_Query_Combat_Mode()) {
					Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatHit);
				} else {
					Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit);
				}
			} else {
				Sound_Play_Speech_Line(kActorMcCoy, 9905, 100, 0, 99);
				Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
				Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
			}
			Player_Gains_Control();
			break;

		case 235:
			if (Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiJump
			 && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiLayDown
			 && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiPerished
			) {
				Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
			}
			Scene_Exits_Enable();
			break;

		case 237:
			Overlay_Play("DR04OVER", 0, true, true, 0);
			break;
		}
	}
}
コード例 #9
0
ファイル: ct01.cpp プロジェクト: athrxx/scummvm
void SceneScriptCT01::PlayerWalkedOut() {
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
	if (Game_Flag_Query(kFlagCT01toCT12)) {
		Ambient_Sounds_Remove_Looping_Sound(55, true);
		Ambient_Sounds_Remove_Looping_Sound(56, true);
	} else {
		Ambient_Sounds_Remove_All_Looping_Sounds(1);
	}
	Music_Stop(5);
	if (!Game_Flag_Query(kFlagMcCoyInChinaTown) && Global_Variable_Query(kVariableChapter) == 1) {
		Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
		Ambient_Sounds_Remove_All_Looping_Sounds(1);
		Outtake_Play(kOuttakeTowards3, true, -1);
	}
}
コード例 #10
0
ファイル: ar01.cpp プロジェクト: dreammaster/scummvm
void SceneScriptAR01::PlayerWalkedOut() {
	Actor_Set_Invisible(kActorMcCoy, false);
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
	Ambient_Sounds_Remove_All_Looping_Sounds(1);
	if (!Game_Flag_Query(kFlagMcCoyInHawkersCircle)) {
		Music_Stop(2);
	}
	if (!Game_Flag_Query(kFlagAR01toHC01)
	 && !Game_Flag_Query(kFlagAR01toAR02)
	) {
		Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
		Ambient_Sounds_Remove_All_Looping_Sounds(1);
		Outtake_Play(kOuttakeTowards3, true, -1);
	}
}
コード例 #11
0
ファイル: ma02.cpp プロジェクト: DrItanium/scummvm
bool SceneScriptMA02::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, 1, false, 0)) {
			Music_Stop(10);
			Game_Flag_Set(33);
			Set_Enter(52, 52);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -168.0f, -144.13f, 10.27f, 0, 1, false, 0)) {
			Game_Flag_Set(35);
			Set_Enter(50, 50);
		}
		return true;
	}
	return false;
}
コード例 #12
0
ファイル: main.c プロジェクト: iotexpert/Pinball
int main()
{
    char c;    
    int note=0; // current note
    int printFlag=0; // if set to 0 it prints the notes when they change
 
    CyGlobalIntEnable;
    CySysTickStart();
    Music_Start(0);
    UART_Start();
    UART_UartPutString("Started\n");

    Music_AddSong(1,&scale);
    
    for(;;)
    {
        c = UART_UartGetChar();
        switch(c)
        {
            #ifdef Music_TWOCHANNELS
            case 'b': Music_BuzzOn(300,0);    break; // turn on the buzzer 1
            case 'B': Music_BuzzOff();        break; // turn off the buzzer 1
            case 'n': Music_BuzzOn(200,500);  break; // turn on the buzzer for 500ms
            #endif
            case 'p': printFlag=0;            break; // turn off the note printer
            case 'P': printFlag = 1;          break; // turn on the note printer
            case 't': Music_SetBPM(0);        break; // Put the song back to the default
            case 'T': Music_SetBPM(60);       break; // Put the current song to 60BPM
            case '1': Music_PlaySong(0,0);    break; // Play the 1st Song
            case '2': Music_PlaySong(1,0);    break; // Play the 2nd Song
            case 's':
                UART_UartPutString("Stop\n");
                Music_Stop();
            break;
        }
        
        if(note != Music_GetNote() && printFlag)
        {
            note = Music_GetNote();
            sprintf(buff,"Note = %d\n",note);
            UART_UartPutString(buff);
        }
    }
}
コード例 #13
0
ファイル: nr08.cpp プロジェクト: 86400/scummvm
void ScriptNR08::InitializeScene() {
	if (Actor_Query_Goal_Number(1) == 231) {
		Setup_Scene_Information(-1174.1f, 0.32f, 303.9f, 435);
	} else if (Game_Flag_Query(546)) {
		Scene_Loop_Start_Special(0, 0, 0);
		Scene_Loop_Set_Default(1);
		Setup_Scene_Information(-1102.88f, 0.0f, 107.43f, 0);
		if (Actor_Query_Goal_Number(3) == 210) {
			Music_Stop(1);
		}
	} else if (Game_Flag_Query(439)) {
		Setup_Scene_Information(-724.7f, 0.0f, 384.24f, 1000);
		Game_Flag_Reset(439);
	} else if (Game_Flag_Query(615)) {
		Setup_Scene_Information(-1663.33f, 0.65f, 342.84f, 330);
		Game_Flag_Reset(615);
	}
	Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
	if (Actor_Query_Goal_Number(3) != 210) {
		Scene_Exit_Add_2D_Exit(1, 0, 309, 30, 398, 3);
		Scene_Exit_Add_2D_Exit(2, 520, 330, 556, 386, 0);
	}
	Ambient_Sounds_Add_Looping_Sound(280, 50, 38, 0);
	Ambient_Sounds_Add_Sound(252, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(254, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(255, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(256, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(257, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(258, 3, 60, 14, 14, 60, 90, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(259, 3, 60, 16, 16, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(260, 3, 60, 16, 16, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(261, 3, 60, 16, 16, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(262, 3, 60, 16, 16, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Scene_Loop_Set_Default(1);
}
コード例 #14
0
ファイル: ug05.cpp プロジェクト: 86400/scummvm
void ScriptUG05::PlayerWalkedIn() {
    if (Game_Flag_Query(663)) {
        if (Game_Flag_Query(368)) {
            Music_Stop(2);
            Actor_Put_In_Set(24, 78);
            Actor_Set_At_XYZ(24, 4.22f, -1.37f, -925.0f, 750);
            Actor_Set_Goal_Number(24, 599);
            Actor_Retired_Here(24, 70, 36, 1, -1);
            int v0 = sub_4021B0();
            if (v0 == 3) {
                Actor_Put_In_Set(3, 78);
                Actor_Set_At_XYZ(3, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(3);
            } else if (v0 == 6) {
                Actor_Put_In_Set(6, 78);
                Actor_Set_At_XYZ(6, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(6);
            }
        } else {
            if (!Actor_Query_In_Set(23, 78)) {
                Actor_Put_In_Set(23, 78);
                Actor_Set_At_XYZ(23, 0.0f, -1.37f, -1400.0f, 768);
            }
            if (!Actor_Query_In_Set(24, 78)) {
                ADQ_Flush();
                ADQ_Add(24, 280, 3);
                Actor_Put_In_Set(24, 78);
                Actor_Set_At_XYZ(24, -16.0f, -1.37f, -960.0f, 768);
            }
        }
    }
    if (Game_Flag_Query(360)) {
        if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
            Loop_Actor_Walk_To_XYZ(0, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
        } else {
            Loop_Actor_Travel_Stairs(0, 2, 0, 0);
        }
    }
    if (Game_Flag_Query(663)) {
        Game_Flag_Query(368);
    }
    Game_Flag_Reset(360);
}
コード例 #15
0
ファイル: ug05.cpp プロジェクト: AReim1982/scummvm
void SceneScriptUG05::PlayerWalkedIn() {
	if (Game_Flag_Query(663)) {
		if (Game_Flag_Query(368)) {
			Music_Stop(2);
			Actor_Put_In_Set(kActorOfficerGrayford, 78);
			Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750);
			Actor_Set_Goal_Number(kActorOfficerGrayford, 599);
			Actor_Retired_Here(kActorOfficerGrayford, 70, 36, 1, -1);
			int v0 = sub_4021B0();
			if (v0 == kActorDektora) {
				Actor_Put_In_Set(kActorDektora, 78);
				Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorDektora);
			} else if (v0 == kActorLucy){
				Actor_Put_In_Set(kActorLucy, 78);
				Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorLucy);
			}
		} else {
			if (!Actor_Query_In_Set(kActorOfficerLeary, 78)) {
				Actor_Put_In_Set(kActorOfficerLeary, 78);
				Actor_Set_At_XYZ(kActorOfficerLeary, 0.0f, -1.37f, -1400.0f, 768);
			}
			if (!Actor_Query_In_Set(kActorOfficerGrayford, 78)) {
				ADQ_Flush();
				ADQ_Add(kActorOfficerGrayford, 280, 3);
				Actor_Put_In_Set(kActorOfficerGrayford, 78);
				Actor_Set_At_XYZ(kActorOfficerGrayford, -16.0f, -1.37f, -960.0f, 768);
			}
		}
	}
	if (Game_Flag_Query(360)) {
		if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
		} else {
			Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0);
		}
	}
	if (Game_Flag_Query(663)) {
		Game_Flag_Query(368);
	}
	Game_Flag_Reset(360);
}
コード例 #16
0
ファイル: hc04.cpp プロジェクト: BenCastricum/scummvm
bool SceneScriptHC04::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.14f, -639.0f, 0, 1, false, 0)) {
			Music_Stop(2);
			Game_Flag_Set(107);
			Game_Flag_Reset(479);
			Game_Flag_Set(182);
			Set_Enter(70, kSceneRC03);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.0f, 0.14f, -399.0f, 0, 1, false, 0)) {
			Game_Flag_Set(109);
			Set_Enter(8, kSceneHC02);
		}
		return true;
	}
	return false;
}
コード例 #17
0
ファイル: ar01.cpp プロジェクト: fingolfin/scummvm
void SceneScriptAR01::PlayerWalkedOut() {
	Actor_Set_Invisible(kActorMcCoy, false);
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
	Ambient_Sounds_Remove_All_Looping_Sounds(1);
	if (!Game_Flag_Query(kFlagMcCoyInHawkersCircle)) {
		Music_Stop(2);
	}
	if (!Game_Flag_Query(kFlagAR01toHC01)
	 && !Game_Flag_Query(kFlagAR01toAR02)
	) {
#if BLADERUNNER_ORIGINAL_BUGS
		Outtake_Play(kOuttakeTowards3, true, -1);
#else
		if (!Game_Flag_Query(kFlagMcCoyInTyrellBuilding)) {
			// don't play an extra outtake when going to Tyrell Building
			Outtake_Play(kOuttakeTowards3, true, -1); // Act 1, 2, 3
		}
#endif // BLADERUNNER_ORIGINAL_BUGS
	}
}
コード例 #18
0
ファイル: ar02.cpp プロジェクト: 86400/scummvm
bool ScriptAR02::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(0, -182.0f, 0.0f, -551.0f, 0, 1, false, 0)) {
			Game_Flag_Set(321);
			Async_Actor_Walk_To_XYZ(0, -182.0f, 0.0f, -407.0f, 0, false);
			Set_Enter(0, 0);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(0, -465.0f, 0.0f, -799.0f, 0, 1, false, 0)) {
			Loop_Actor_Walk_To_XYZ(0, -560.0f, 0.0f, -799.0f, 0, 0, false, 0);
			Game_Flag_Set(117);
			Game_Flag_Reset(180);
			Game_Flag_Set(182);
			Music_Stop(3);
			Set_Enter(70, 80);
		}
		return true;
	}
	return false;
}
コード例 #19
0
ファイル: nr08.cpp プロジェクト: 86400/scummvm
void ScriptNR08::SceneFrameAdvanced(int frame) {
	if (!Music_Is_Playing()) {
		sub_4021B4();
	}
	Set_Fade_Color(0, 0, 0);
	if (frame >= 76 && frame < 91) {
		Set_Fade_Density((frame - 76) / 14.0f);
		Music_Stop(3);
		Ambient_Sounds_Play_Sound(566, 27, 0, 99, 0);
	} else if (frame >= 91 && frame < 120) {
		Actor_Set_Invisible(0, true);
		Set_Fade_Density(1.0f);
	} else if (frame >= 120 && frame < 135) {
		Set_Fade_Density((134 - frame) / 14.0f);
		Music_Play(7, 61, 0, 1, -1, 0, 0);
	} else {
		Actor_Set_Invisible(0, false);
		Set_Fade_Density(0.0f);
	}
	if (Game_Flag_Query(651) && !Game_Flag_Query(636)) {
		Game_Flag_Set(636);
		Scene_Exits_Disable();
		Scene_Loop_Set_Default(1);
		Scene_Loop_Start_Special(2, 3, 1);
	}
	if (frame == 95) {
		Actor_Put_In_Set(3, 91);
		Actor_Set_At_Waypoint(3, 33, 0);
		Actor_Change_Animation_Mode(3, 0);
		Actor_Set_Goal_Number(3, 200);
		Scene_Exit_Add_2D_Exit(1, 0, 309, 30, 398, 3);
		Scene_Exit_Add_2D_Exit(2, 520, 330, 556, 386, 0);
	}
	if (frame == 130) {
		Scene_Exits_Enable();
	}
	//return false;
}
コード例 #20
0
ファイル: Music.c プロジェクト: baw959/Video_game_project
// reads next note
void Next_Note(void){
  long noteLength;
//   if (Songs[Song_Sel].Pt[Current_Spot].Slur == 0){
//     Vol = Songs[Song_Sel].Volume;
//   }
  Current_Spot ++;
  if(Current_Spot == Songs[Song_Sel].Length){        // music stops after played one round
    Current_Spot = 0;
    if (Songs[Song_Sel].Repeat == 0){
      Music_Stop();
      return;
    } 
  }
  //Song.Pt = &Notes[Current_Spot];
  
  noteLength = Beat/(Songs[Song_Sel].Pt[Current_Spot].Duration);
  
  // dotted notes add half the value of the note
  if(Songs[Song_Sel].Pt[Current_Spot].Dotted == 1){
    noteLength = noteLength + (noteLength/2);
  }
  Change_Frequency(Songs[Song_Sel].Pt[Current_Spot].Pitch);
  Change_Note_Length(noteLength,Songs[Song_Sel].Pt[Current_Spot].Slur);
}
コード例 #21
0
ファイル: dr04.cpp プロジェクト: athrxx/scummvm
void SceneScriptDR04::PlayerWalkedOut() {
	Music_Stop(2);
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
	Ambient_Sounds_Remove_All_Looping_Sounds(1);
}
コード例 #22
0
ファイル: Music.c プロジェクト: baw959/Video_game_project
// selects a new song in the Songs array
void Change_Song(char newSong){
  Music_Stop();
  Song_Sel = newSong;
  Beat = (Songs[Song_Sel].TimeSig*1000*60)/(Songs[Song_Sel].Tempo);
  Music_Play();
}
コード例 #23
0
ファイル: kp07.cpp プロジェクト: OmerMor/scummvm
void ScriptKP07::PlayerWalkedOut() {
	Music_Stop(3);
}
コード例 #24
0
ファイル: ct07.cpp プロジェクト: AReim1982/scummvm
void SceneScriptCT07::PlayerWalkedOut() {
	Music_Stop(2);
}
コード例 #25
0
ファイル: nr11.cpp プロジェクト: 86400/scummvm
bool ScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) {

	if (Object_Query_Click("CLOTHING02", objectName) || Object_Query_Click("BOX27", objectName) || Object_Query_Click("BOX39", objectName) || Object_Query_Click("BOX44", objectName) || Object_Query_Click("DRESS", objectName) || Object_Query_Click("COATRACK", objectName) || Object_Query_Click("COLUMN3 DETS", objectName) || Object_Query_Click("COLUMN PIPE01", objectName) || Object_Query_Click("RECTANGLE02", objectName) || Object_Query_Click("COLUMN04", objectName) || Object_Query_Click("COATRACK01", objectName) || Object_Query_Click("SHIRT", objectName) || Object_Query_Click("SKIRT 02", objectName) || Object_Query_Click("CLOTHING B 03", objectName) || Object_Query_Click("BUST BUST", objectName)) {
		if (a2) {
			Actor_Set_Goal_Number(1, 211);
			Scene_Exits_Disable();
			sub_4028EC();
			Player_Loses_Control();
			if (!Player_Query_Combat_Mode()) {
				Player_Set_Combat_Mode(true);
			}
			Actor_Set_Goal_Number(0, 230);
			Scene_Loop_Set_Default(3);
			Scene_Loop_Start_Special(2, 2, 1);
		} else if (Actor_Query_Goal_Number(3) == 250) {
			if (!Loop_Actor_Walk_To_XYZ(0, 24.0f, 0.33f, 0.0f, 0, 1, false, 0)) {
				Actor_Face_XYZ(0, -180.0f, 0.0f, -170.0f, true);
				sub_4028EC();
				Actor_Set_Goal_Number(1, 211);
				if (Actor_Query_Friendliness_To_Other(3, 0) < 30) {
					Actor_Set_At_XYZ(3, 0.5f, 0.33f, -162.0f, 0);
					Loop_Actor_Walk_To_XYZ(3, -24.0f, 0.33f, -35.4f, 0, 0, true, 0);
					Actor_Face_Actor(0, 3, true);
					Actor_Change_Animation_Mode(3, 71);
					Delay(500);
					Actor_Change_Animation_Mode(0, 48);
					Delay(2000);
					Actor_Set_Goal_Number(0, 231);
				} else {
					Actor_Says(0, 3840, 18);
					Delay(1000);
					if (Actor_Query_Friendliness_To_Other(3, 0) > 59 && !Global_Variable_Query(45)) {
						Music_Play(21, 35, 0, 3, -1, 0, 0);
					}
					Loop_Actor_Walk_To_XYZ(3, -135.0f, 0.33000001f, -267.0f, 0, 0, false, 0);
					Actor_Face_Actor(3, 0, true);
					Actor_Face_Actor(0, 3, true);
					Actor_Clue_Acquire(0, 107, 1, 3);
					Actor_Says(3, 990, 13);
					Actor_Says(3, 1000, 14);
					Loop_Actor_Walk_To_Actor(3, 0, 108, 0, false);
					Actor_Says(0, 3845, 13);
					Actor_Says(0, 3850, 15);
					Actor_Says(3, 1010, 14);
					Actor_Says(0, 3855, 13);
					Actor_Says(3, 1020, 12);
					Actor_Says(0, 3860, 12);
					Actor_Says_With_Pause(3, 1030, 1.0f, 14);
					Actor_Says(3, 1040, 13);
					Actor_Says(0, 3865, 15);
					Actor_Says_With_Pause(3, 1050, 0.80000001f, 14);
					Actor_Says(3, 1060, 13);
					Actor_Says(0, 3870, 3);
					Actor_Says(3, 1070, 14);
					Actor_Modify_Friendliness_To_Other(3, 0, 5);
					if (Actor_Query_Friendliness_To_Other(3, 0) > 55 && !Global_Variable_Query(45)) {
						Global_Variable_Set(45, 2);
						Actor_Says(3, 1130, 17);
						Actor_Says(0, 6365, 12);
						Actor_Says(3, 1140, 14);
						Actor_Says(0, 6370, 14);
						Actor_Says(3, 1150, 12);
						Actor_Says(3, 1160, 16);
					}
					Actor_Says(3, 1080, 13);
					Actor_Says(0, 3875, 14);
					Actor_Says(3, 1090, 17);
					Music_Stop(4);
					Actor_Set_Goal_Number(3, 260);
					if (Global_Variable_Query(40) == 1) {
						Actor_Set_Goal_Number(1, 236);
					}
					Game_Flag_Set(591);
				}
			} else {
				if (Random_Query(1, 2) == 1) {
					Actor_Says(0, 8575, 14);
				} else {
					Actor_Says(0, 8580, 14);
				}
			}
		}
		return true;
	}
	return false;
}
コード例 #26
0
ファイル: hf04.cpp プロジェクト: fingolfin/scummvm
void SceneScriptHF04::PlayerWalkedOut() {
	Music_Stop(5);
}
コード例 #27
0
ファイル: nr06.cpp プロジェクト: BenCastricum/scummvm
void SceneScriptNR06::PlayerWalkedOut() {
	if (Game_Flag_Query(441)) {
		Music_Stop(2);
	}
}
コード例 #28
0
ファイル: music.c プロジェクト: MajorBootman/cfg-loader
void _Music_Start()
{
	int ret;

	// always init SND, so banner sounds play if music disabled
	ASND_Init();
	ASND_Pause(0);

	if (CFG.music == 0) {
		dbg_printf(gt("Music: Disabled"));
		dbg_printf("\n");
		return;
	} else {
		dbg_printf(gt("Music: Enabled"));
		dbg_printf("\n");
	}
	
	was_playing = false;

	//get a music file
	ret = get_music_file();
	if (ret==0) return;

	if (music_format == FORMAT_MP3) {

		MP3Player_Init();
		MP3Player_Volume(0x80); // of 255
		//ret = MP3Player_PlayBuffer(music_buf, music_size, NULL);
		ret = MP3Player_PlayFile(music_f, mp3_reader, NULL);
		dbg_printf("mp3 play: %s (%d)\n", ret? gt("ERROR"):gt("OK"), ret);
		if (ret) goto err_play;
		usleep(10000); // wait 10ms and verify if playing
		if (!MP3Player_IsPlaying()) {
			err_play:
			printf(gt("Error playing %s"), music_fname);
			printf("\n");
			Music_Stop();
			sleep(1);
		}

	} else {

		music_buf = malloc(music_size);
		if (!music_buf) {
			printf(gt("music file too big (%d) %s"), music_size, music_fname);
			printf("\n");
			sleep(1);
			music_format = 0;
			return;
		}
		//printf("Loading...\n");
		ret = fread(music_buf, music_size, 1, music_f);
		//printf("size: %d %d\n", music_size, ret); sleep(2);
		fclose(music_f);
		music_f = NULL;
		if (ret != 1) {
			printf(gt("error reading: %s (%d)"), music_fname, music_size); printf("\n"); sleep(2);
			free(music_buf);
			music_buf = NULL;
			music_size = 0;
			music_format = 0;
			return;
		}
		MODPlay_Init(&mod);
		ret = MODPlay_SetMOD(&mod, music_buf);
		dbg_printf("mod play: %s (%d)\n", ret?gt("ERROR"):gt("OK"), ret);
		if (ret < 0 ) {
			Music_Stop();
		} else  {
			MODPlay_SetVolume(&mod, 32,32); // fix the volume to 32 (max 64)
			MODPlay_Start(&mod); // Play the MOD
		}
	}
}