generated from sigonasr2/CPlusPlusProjectTemplate
Fixed not being able to transition to Chapter 2.
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
8fffc0f458
commit
24291a31d9
@ -527,6 +527,8 @@ public:
|
||||
std::vector<WEATHER_POWER*>MOVESET_XMINION;
|
||||
bool SOUND_IS_MUTED=false;
|
||||
bool END_THE_GAME=false;
|
||||
bool audioFade=false;
|
||||
float audioLevel=0.6;
|
||||
|
||||
|
||||
sound::Wave SONG_MAIN;
|
||||
@ -808,6 +810,7 @@ public:
|
||||
case 0:
|
||||
case 1:{
|
||||
fadeOut();
|
||||
audioFadeOut();
|
||||
}break;
|
||||
case 2:{
|
||||
SOUND_IS_MUTED=!SOUND_IS_MUTED;
|
||||
@ -1017,6 +1020,11 @@ public:
|
||||
PlayCutscene(cutscene::CUTSCENE_4);
|
||||
GAME_STATE=GAMEWORLD;
|
||||
}break;
|
||||
case CUTSCENE_3:{
|
||||
GAME_STATE=CUTSCENE_1;
|
||||
fadeIn();
|
||||
ResetTerminal(STORY_TEXT1);
|
||||
}break;
|
||||
case CUTSCENE_4:{
|
||||
fadeIn();
|
||||
}break;
|
||||
@ -1147,6 +1155,14 @@ public:
|
||||
if (CURRENT_CUTSCENE!=cutscene::NONE) {
|
||||
CUTSCENE_TIMER++;
|
||||
}
|
||||
if (audioFade&&audioLevel>0) {
|
||||
audioLevel-=0.01;
|
||||
engine.SetOutputVolume(audioLevel);
|
||||
} else
|
||||
if (!audioFade&&audioLevel<0.6) {
|
||||
audioLevel+=0.01;
|
||||
engine.SetOutputVolume(audioLevel);
|
||||
}
|
||||
if (fade&&transparency<255) {
|
||||
transparency=std::clamp(transparency+FADE_SPD,0,255);
|
||||
if (transparency==255) {
|
||||
@ -1709,6 +1725,7 @@ public:
|
||||
if (!CUTSCENE_FLAGS[0]) {
|
||||
CUTSCENE_FLAGS[0]=true;
|
||||
DisplayMessageBox(19);
|
||||
GAME_FLAGS[gameflag::REST_IN_DOME]=true;
|
||||
} else
|
||||
{
|
||||
EndCutscene();
|
||||
@ -1969,7 +1986,7 @@ public:
|
||||
}
|
||||
}break;
|
||||
}
|
||||
if (IN_BATTLE_ENCOUNTER||(!CUTSCENE_ACTIVE&&PLAYER_HP!=PLAYER_MAXHP)) {
|
||||
if (IN_BATTLE_ENCOUNTER||(GAME_STATE==GAMEWORLD&&!CUTSCENE_ACTIVE&&PLAYER_HP!=PLAYER_MAXHP)) {
|
||||
DrawStringDecal({4+1,(float)(HEIGHT-10-GetTextSize("HP:").y+1)},"HP: "+std::to_string(PLAYER_HP),BLACK);
|
||||
DrawStringDecal({4,(float)(HEIGHT-10-GetTextSize("HP:").y)},"HP: "+std::to_string(PLAYER_HP));
|
||||
DrawHealthbar({2,HEIGHT-10},WIDTH/2,(float)PLAYER_HP/PLAYER_MAXHP,BLACK);
|
||||
@ -2160,6 +2177,13 @@ public:
|
||||
fade=false;
|
||||
}
|
||||
|
||||
void audioFadeOut() {
|
||||
audioFade=true;
|
||||
}
|
||||
void audioFadeIn() {
|
||||
audioFade=false;
|
||||
}
|
||||
|
||||
void StopCutscene() {
|
||||
EndCutscene();
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user