本文整理汇总了C++中UserClass::SetBGMCode方法的典型用法代码示例。如果您正苦于以下问题:C++ UserClass::SetBGMCode方法的具体用法?C++ UserClass::SetBGMCode怎么用?C++ UserClass::SetBGMCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserClass
的用法示例。
在下文中一共展示了UserClass::SetBGMCode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ModeChange
/*モードチェンジ*/
void TextClass::ModeChange(int &ModeFlag,int &ChangeFlag,UserClass &User){
//インスタンス化
MouseClass* Mouse = MouseClass::GetInstance();
AnimeClass Anime;
static int Count = 0;
const int AtherSelect = -1;
//タイマー
static int Timer = 0;
if( WriteMode != NOTWINDOW ) Timer++;
//モードチェンジ
if( Mouse->GetState(MOUSE::LEFT) == TRUE ){
if( Select == GAME_MENU::SAVE ) ModeFlag = MODE::SAVE;
if( Select == GAME_MENU::LOAD ) ModeFlag = MODE::LOAD;
if( Select == GAME_MENU::BACKLOG ) WriteMode = BACKLOG;
if( Select == GAME_MENU::CONFIG ) ModeFlag = MODE::CONFIG;
if( Select == GAME_MENU::AUTO ) AutoFlag *= -1;
ChangeFlag = TRUE;
}
//ウィンドウ非表示
/*
if( Mouse->GetState( MOUSE::RIGHT) > 0 && WriteMode == NORMAL && Timer > 20 ){
WriteMode = NOTWINDOW;
Timer = 0;
}
*/
//バックログ
if( Mouse->GetWheel() > 0 && WriteMode == NORMAL ) WriteMode = BACKLOG;
//エンディングモードへ
if( WriteMode == END ){ //&& Mouse->GetState(MOUSE::LEFT) > 10 ){
Select = AtherSelect;
WriteMode = NORMAL;
ModeFlag = MODE::END;
//ModeFlag = MODE::OTHER;
//User.SetPage( PAGE::TITLE );
}
//タイトル画面へ
if( WriteMode == TITLE ){
Count++;
DrawBox(0,0,windowX,windowY,GetColor(0,0,0),TRUE);
SetFontSize(100);
ChangeFont("MS 明朝");
DrawString(windowX/3,windowY/3,"- FIN - ",GetColor(255,255,255));
User.SetBGMCode( GAME_BGM::STOP );
if( Count > 200 ){
WriteMode = NORMAL;
ModeFlag = MODE::OTHER;
User.SetPage( PAGE::TITLE );
Count = 0;
}
}
}
示例2: InitGameCount
/*ゲームカウント初期化*/
void TextClass::InitGameCount(UserClass& User){
//ゲームカウント取得
SaveData = User.GetSaveData();
SceneCount = SaveData.SceneCount;
TextCount = SaveData.TextCount;
SerifCount = SaveData.SerifCount;
User.SetBGMCode ( SaveData.BGMCode );
User.SetBackCode( SaveData.BackCode );
User.SetCharacterCode( SaveData.CharCode );
}
示例3: BackCheckControlCode
/*バックログから戻ったときに前の制御コードを取得*/
void TextClass::BackCheckControlCode(UserClass &User){
int TmpSceneCount,TmpTextCount;
bool BGMFlag = FALSE;
bool BackFlag = FALSE;
bool CharFlag = FALSE;
std::string BGMCode;
std::string BackCode;
std::string CharacterCode;
TmpSceneCount = SceneCount;
TmpTextCount = TextCount;
//曲をいったん停止
User.SetBGMCode( GAME_BGM::STOP );
User.SetCharacterCode( GAME_CHAR::NOT );
while( TmpTextCount >= 0 ){
//音楽制御
if( Name[TmpSceneCount][TmpTextCount] == "音楽" && BGMFlag == FALSE){
//BGMコード受け取り
BGMCode = Text[TmpSceneCount][TmpTextCount];
if( BGMCode == "回想" ) User.SetBGMCode( GAME_BGM::KAISOU1 );
if( BGMCode == "出会い" ) User.SetBGMCode( GAME_BGM::DEAI );
if( BGMCode == "別れ" ) User.SetBGMCode( GAME_BGM::WAKARE );
if( BGMCode == "無音" ) User.SetBGMCode( GAME_BGM::STOP );
if( BGMCode == "残響" ) User.SetBGMCode( GAME_BGM::TITLE);
BGMFlag = TRUE;
}
//背景画像制御
if( Name[TmpSceneCount][TmpTextCount] == "背景" && BackFlag == FALSE ){
//背景コード受け取り
BackCode = Text[TmpSceneCount][TmpTextCount];
if( BackCode == "暗闇" ) User.SetBackCode( GAME_BACK::BLACK );
if( BackCode == "川原" ) User.SetBackCode( GAME_BACK::KAWARA );
BackFlag = TRUE;
}
//キャラクタ画像制御
if( Name[TmpSceneCount][TmpTextCount] == "キャラ" && CharFlag == FALSE ){
//キャラクタコード受け取り
CharacterCode = Text[TmpSceneCount][TmpTextCount];
if( CharacterCode == "藍" ) User.SetCharacterCode( GAME_CHAR::AI );
if( CharacterCode == "非表示" ) User.SetCharacterCode( GAME_CHAR::NOT );
CharFlag = TRUE;
}
//カウントを下げる
TmpTextCount--;
//もしテキストカウントが0を下回ったら各コードを初期化
if( TmpTextCount < 0 ){
if( BGMFlag == FALSE ) User.SetBGMCode( GAME_BGM::STOP );
if( BackFlag == FALSE ) User.SetBackCode( GAME_BACK::BLACK );
if( CharFlag == FALSE ) User.SetCharacterCode( GAME_CHAR::NOT );
}
//全てのコードが確認されたら処理を抜ける
if( BGMFlag == TRUE && BackFlag == TRUE && CharFlag == TRUE ) break;
}
}
示例4: CheckCotrolCode
/*制御コードチェック*/
void TextClass::CheckCotrolCode(UserClass &User){
//各種コード受け取り変数
std::string BGMCode;
std::string BackCode;
std::string EventCode;
std::string CharacterCode;
bool EventFlag = FALSE;
do{
EventFlag = FALSE;
//音楽制御
if( Name[SceneCount][TextCount] == "音楽" ){
//BGMコード受け取り
BGMCode = Text[SceneCount][TextCount];
if( BGMCode == "回想" ) User.SetBGMCode( GAME_BGM::KAISOU1 );
if( BGMCode == "出会い" ) User.SetBGMCode( GAME_BGM::DEAI );
if( BGMCode == "別れ" ) User.SetBGMCode( GAME_BGM::WAKARE );
if( BGMCode == "無音" ) User.SetBGMCode( GAME_BGM::STOP );
if( BGMCode == "残響" ) User.SetBGMCode( GAME_BGM::TITLE);
TextCount++;
SerifCount++;
EventFlag = TRUE;
}
//背景画像制御
if( Name[SceneCount][TextCount] == "背景" ){
//背景コード受け取り
BackCode = Text[SceneCount][TextCount];
if( BackCode == "暗闇" ) User.SetBackCode( GAME_BACK::BLACK );
if( BackCode == "川原" ) User.SetBackCode( GAME_BACK::KAWARA );
if( BackCode == "夜空" ) User.SetBackCode( GAME_BACK::YOZORA );
TextCount++;
SerifCount++;
EventFlag = TRUE;
}
//キャラクタ画像制御
if( Name[SceneCount][TextCount] == "キャラ" ){
//キャラクタコード受け取り
CharacterCode = Text[SceneCount][TextCount];
if( CharacterCode == "藍" ) User.SetCharacterCode( GAME_CHAR::AI );
if( CharacterCode == "非表示" ) User.SetCharacterCode( GAME_CHAR::NOT );
TextCount++;
SerifCount++;
EventFlag = TRUE;
}
//時間経過
if( Name[SceneCount][TextCount] == "イベント" ){
EventCode = Text[SceneCount][TextCount];
if( EventCode == "経過" ) OverTime(User);
if( EventCode == "タイトルへ" ) WriteMode = TITLE;
}
//エンド
if( Name[SceneCount][TextCount] == "エンド" ){
TextCount++;
SerifCount++;
WriteMode = END;
}
}while( EventFlag == TRUE );
}
示例5: EyeCatching
/*アイキャッチ*/
void TextClass::EyeCatching(UserClass &User){
MouseClass* Mouse = MouseClass::GetInstance();
const int MinVol = 9000;
const int FadeSpeed = 7;
//static bool SoundBack = FALSE;
static bool FirstFlag = FALSE;
static bool PlayFlag = FALSE;
static bool FadeFlag1 = FALSE;
static bool FadeFlag2 = TRUE;
static int FadeCount = 255;
static int MovieVol;
static int MovieHandle;
static int TmpSoundCode;
//音量取得
MovieVol = User.GetBGMVol() * 4;
//現在のサウンドコードのバックアップ
//if( SoundBack == FALSE ){
// TmpSoundCode = User.GetBGMCode();
// SoundBack = TRUE;
//}
//音楽停止
User.SetBGMCode( GAME_BGM::STOP );
//フェードアウト処理
if( FadeFlag1 == FALSE && FadeFlag2 == TRUE ){
SetDrawBright(FadeCount,FadeCount,FadeCount);
FadeCount -= FadeSpeed;
if( FadeCount <= 0 ) FadeFlag1 = TRUE;
}
//再生前の初期化
if( FirstFlag == FALSE && FadeFlag1 == TRUE ){
SetDrawBright(255,255,255);
MovieHandle = LoadGraph("./resource/movie/eyecatch.ogv");
SetMovieVolumeToGraph( MinVol + MovieVol , MovieHandle );
PlayMovieToGraph( MovieHandle );
FirstFlag = TRUE;
PlayFlag = TRUE;
}
//動画再生
if( PlayFlag == TRUE ){
DrawGraph(0,0,MovieHandle,TRUE);
WaitTimer(17);
}
//再生中か判断
if( GetMovieStateToGraph(MovieHandle) != 1 && FadeFlag1 == TRUE ){
PlayFlag = FALSE;
FirstFlag = FALSE;
FadeFlag1 = FALSE;
FadeFlag2 = FALSE;
}
//フェードイン
if( FadeFlag2 == FALSE ){
SetDrawBright(FadeCount,FadeCount,FadeCount);
FadeCount += FadeSpeed;
if( FadeCount >= 255 ){
FadeFlag2 = TRUE;
//SoundBack = FALSE;
//User.SetBGMCode( TmpSoundCode );
WriteMode = NORMAL;
}
}
//メッセージ描画
//DrawString(300,windowY - windowY / 3 + 50,"アイキャッチだよ、クリックで進むよっ!",GetColor(0,0,0));
//if( Mouse->GetState(MOUSE::LEFT) == 1 ){
// WriteMode = NORMAL;
//}
}