generated from sigonasr2/CPlusPlusProjectTemplate
Launchpad prepare sequence
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
88029d14ee
commit
a8c00bd74d
@ -18,7 +18,7 @@ using namespace olc;
|
|||||||
#define SKIP_SILICON2 true
|
#define SKIP_SILICON2 true
|
||||||
#define SKIP_CHAPTER2 true
|
#define SKIP_CHAPTER2 true
|
||||||
#define SKIP_STORYBOOK true
|
#define SKIP_STORYBOOK true
|
||||||
#define SKIP_CHAPTER3 false
|
#define SKIP_CHAPTER3 true
|
||||||
|
|
||||||
#define STARTING_MAP MAP_1
|
#define STARTING_MAP MAP_1
|
||||||
#define STARTING_STATE CUTSCENE_3
|
#define STARTING_STATE CUTSCENE_3
|
||||||
@ -58,6 +58,7 @@ enum GAMESTATE{
|
|||||||
CUTSCENE_5, //Third rover repaired.
|
CUTSCENE_5, //Third rover repaired.
|
||||||
DISPLAY_BOOK,
|
DISPLAY_BOOK,
|
||||||
DISPLAY_BOOK2,
|
DISPLAY_BOOK2,
|
||||||
|
CUTSCENE_6,
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace cutscene{
|
namespace cutscene{
|
||||||
@ -92,7 +93,9 @@ namespace cutscene{
|
|||||||
STORY_REVIEW2,
|
STORY_REVIEW2,
|
||||||
FINAL_REVIEW,
|
FINAL_REVIEW,
|
||||||
CHECK_COORDS_4,
|
CHECK_COORDS_4,
|
||||||
|
PREPARE_SEQUENCE,
|
||||||
LAUNCHPAD_OPEN,
|
LAUNCHPAD_OPEN,
|
||||||
|
LAUNCHPAD_PREPARE,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +136,8 @@ namespace gameflag{
|
|||||||
NEXT_COORDS2,
|
NEXT_COORDS2,
|
||||||
CHECK_ROVER_4,
|
CHECK_ROVER_4,
|
||||||
LITTLESNAKES_KILLED,
|
LITTLESNAKES_KILLED,
|
||||||
|
COLLECTED_SILICON_4,
|
||||||
|
CHECK_ROVER_5,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -723,7 +728,9 @@ public:
|
|||||||
GAME_FLAGS[gameflag::CHECK_ROVER_2]=true;
|
GAME_FLAGS[gameflag::CHECK_ROVER_2]=true;
|
||||||
}
|
}
|
||||||
if (SKIP_CHAPTER3) {
|
if (SKIP_CHAPTER3) {
|
||||||
|
GAME_FLAGS[gameflag::CHECK_ROVER_4]=true;
|
||||||
|
GAME_FLAGS[gameflag::LITTLESNAKES_KILLED]=true;
|
||||||
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_4]=true;
|
||||||
}
|
}
|
||||||
if (SKIP_CHAPTER2||SKIP_BOSS) {
|
if (SKIP_CHAPTER2||SKIP_BOSS) {
|
||||||
GAME_FLAGS[gameflag::SLEEP]=true;
|
GAME_FLAGS[gameflag::SLEEP]=true;
|
||||||
@ -1126,6 +1133,11 @@ public:
|
|||||||
fadeOut();
|
fadeOut();
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case CUTSCENE_6:{
|
||||||
|
if (textInd>=CONSOLE_REF_TEXT.length()) {
|
||||||
|
fadeOut();
|
||||||
|
}
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1397,6 +1409,11 @@ public:
|
|||||||
GAME_STATE=GAMEWORLD;
|
GAME_STATE=GAMEWORLD;
|
||||||
DisplayMessageBox(36);
|
DisplayMessageBox(36);
|
||||||
}break;
|
}break;
|
||||||
|
case CUTSCENE_6:{
|
||||||
|
PlayCutscene(cutscene::LAUNCHPAD_OPEN);
|
||||||
|
fadeIn();
|
||||||
|
GAME_STATE=GAMEWORLD;
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
switch (CURRENT_CUTSCENE) {
|
switch (CURRENT_CUTSCENE) {
|
||||||
case cutscene::TRANSITION_CUTSCENE:{
|
case cutscene::TRANSITION_CUTSCENE:{
|
||||||
@ -1507,6 +1524,12 @@ public:
|
|||||||
StartCutscene(cutscene::FINAL_REVIEW);
|
StartCutscene(cutscene::FINAL_REVIEW);
|
||||||
fadeIn();
|
fadeIn();
|
||||||
}break;
|
}break;
|
||||||
|
case cutscene::PREPARE_SEQUENCE:{
|
||||||
|
GAME_STATE=CUTSCENE_6;
|
||||||
|
ResetTerminal(STORY_TEXT7);
|
||||||
|
fadeIn();
|
||||||
|
EndCutscene();
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2618,6 +2641,44 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case cutscene::PREPARE_SEQUENCE:{
|
||||||
|
if (!messageBoxVisible) {
|
||||||
|
if (!CUTSCENE_FLAGS[0]) {
|
||||||
|
CUTSCENE_FLAGS[0]=true;
|
||||||
|
fadeOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case cutscene::LAUNCHPAD_OPEN:{
|
||||||
|
if (MoveCameraTowardsPoint({30,35})) {
|
||||||
|
if (frameCount%16==0) {
|
||||||
|
PLAYER_COORDS[0]+=0.25;
|
||||||
|
} else
|
||||||
|
if (frameCount%16==4) {
|
||||||
|
PLAYER_COORDS[0]+=0.25;
|
||||||
|
} else
|
||||||
|
if (frameCount%16==8) {
|
||||||
|
PLAYER_COORDS[0]-=0.25;
|
||||||
|
} else
|
||||||
|
if (frameCount%16==12) {
|
||||||
|
PLAYER_COORDS[0]-=0.25;
|
||||||
|
}
|
||||||
|
if (CUTSCENE_TIMER>60*8) {
|
||||||
|
PlayCutscene(cutscene::LAUNCHPAD_PREPARE);
|
||||||
|
CUTSCENE_OBJS[1]=CreateObject({30,35},LAUNCHPAD_DECAL);
|
||||||
|
CUTSCENE_OBJS[2]=CreateObject({30,35},LAUNCHPAD_HALF1_DECAL);
|
||||||
|
CUTSCENE_OBJS[3]=CreateObject({30,35},LAUNCHPAD_HALF2_DECAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case cutscene::LAUNCHPAD_PREPARE:{
|
||||||
|
bool result1,result2;
|
||||||
|
result1=MoveObjectTowardsPoint({29.5,35.28},CUTSCENE_OBJS[2],BOTH,0.001);
|
||||||
|
result2=MoveObjectTowardsPoint({30.5,34.78},CUTSCENE_OBJS[3],BOTH,0.001);
|
||||||
|
if (result1&&result2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GAME_STATE==CUTSCENE_3&&!SOUND_IS_PLAYING) {
|
if (GAME_STATE==CUTSCENE_3&&!SOUND_IS_PLAYING) {
|
||||||
@ -2631,6 +2692,7 @@ public:
|
|||||||
case CUTSCENE_3:
|
case CUTSCENE_3:
|
||||||
case CUTSCENE_4:
|
case CUTSCENE_4:
|
||||||
case CUTSCENE_5:
|
case CUTSCENE_5:
|
||||||
|
case CUTSCENE_6:
|
||||||
case GAME_OVER_TERMINAL:{
|
case GAME_OVER_TERMINAL:{
|
||||||
if (GAME_STATE==CUTSCENE_3&&frameCount%4!=0) {break;}
|
if (GAME_STATE==CUTSCENE_3&&frameCount%4!=0) {break;}
|
||||||
if (textInd<CONSOLE_REF_TEXT.length()) {
|
if (textInd<CONSOLE_REF_TEXT.length()) {
|
||||||
@ -2679,6 +2741,12 @@ public:
|
|||||||
}break;
|
}break;
|
||||||
case COLLECTED_SILICON:{
|
case COLLECTED_SILICON:{
|
||||||
if (!messageBoxVisible) {
|
if (!messageBoxVisible) {
|
||||||
|
if (CURRENT_MAP==MAP_5) {
|
||||||
|
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_4]) {
|
||||||
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_4]=true;
|
||||||
|
GAME_STATE=GAMEWORLD;
|
||||||
|
}
|
||||||
|
} else
|
||||||
if (CURRENT_MAP==MAP_4) {
|
if (CURRENT_MAP==MAP_4) {
|
||||||
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_3]) {
|
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_3]) {
|
||||||
GAME_FLAGS[gameflag::COLLECTED_SILICON_3]=true;
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_3]=true;
|
||||||
@ -2797,6 +2865,12 @@ public:
|
|||||||
DisplayMessageBox(46);
|
DisplayMessageBox(46);
|
||||||
StartCutscene(cutscene::CHECK_COORDS_4);
|
StartCutscene(cutscene::CHECK_COORDS_4);
|
||||||
CUTSCENE_OBJS[0]=CreateObject({PLAYER_COORDS[0],PLAYER_COORDS[1]},PLAYER_DECAL,playerAnim,true);
|
CUTSCENE_OBJS[0]=CreateObject({PLAYER_COORDS[0],PLAYER_COORDS[1]},PLAYER_DECAL,playerAnim,true);
|
||||||
|
} else
|
||||||
|
if (!GAME_FLAGS[gameflag::CHECK_ROVER_5]&&GAME_FLAGS[gameflag::COLLECTED_SILICON_4]&&PLAYER_COORDS[0]>=31&&PLAYER_COORDS[0]<=35&&PLAYER_COORDS[1]>=33&&PLAYER_COORDS[1]<=37) {
|
||||||
|
GAME_FLAGS[gameflag::CHECK_ROVER_5]=true;
|
||||||
|
DisplayMessageBox(49);
|
||||||
|
StartCutscene(cutscene::PREPARE_SEQUENCE);
|
||||||
|
CUTSCENE_OBJS[0]=CreateObject({PLAYER_COORDS[0],PLAYER_COORDS[1]},PLAYER_DECAL,playerAnim,true);
|
||||||
}
|
}
|
||||||
if(WALK_STEPS++>60&&!IN_BATTLE_ENCOUNTER) {
|
if(WALK_STEPS++>60&&!IN_BATTLE_ENCOUNTER) {
|
||||||
PLAYER_HP=std::clamp(PLAYER_HP+1,0,PLAYER_MAXHP);
|
PLAYER_HP=std::clamp(PLAYER_HP+1,0,PLAYER_MAXHP);
|
||||||
@ -2810,6 +2884,7 @@ public:
|
|||||||
case CUTSCENE_1:
|
case CUTSCENE_1:
|
||||||
case CUTSCENE_4:
|
case CUTSCENE_4:
|
||||||
case CUTSCENE_5:
|
case CUTSCENE_5:
|
||||||
|
case CUTSCENE_6:
|
||||||
case GAME_OVER_TERMINAL:{
|
case GAME_OVER_TERMINAL:{
|
||||||
DrawStringDecal({16,16},CUTSCENE_CONSOLE_TEXT,GREEN,{1,1});
|
DrawStringDecal({16,16},CUTSCENE_CONSOLE_TEXT,GREEN,{1,1});
|
||||||
if (textInd<CONSOLE_REF_TEXT.length()) {
|
if (textInd<CONSOLE_REF_TEXT.length()) {
|
||||||
@ -2975,6 +3050,13 @@ public:
|
|||||||
case cutscene::IN_BED:{
|
case cutscene::IN_BED:{
|
||||||
FillRectDecal({0,0},{WIDTH,HEIGHT},Pixel(0,0,0,192));
|
FillRectDecal({0,0},{WIDTH,HEIGHT},Pixel(0,0,0,192));
|
||||||
}break;
|
}break;
|
||||||
|
case cutscene::LAUNCHPAD_OPEN:{
|
||||||
|
DrawDecal({(30-PLAYER_COORDS[0])*32+WIDTH/2,(35-PLAYER_COORDS[1])*32+HEIGHT/2+(6-6*((CUTSCENE_TIMER/240.0)))},LAUNCHPAD_CLOSED_DECAL,{1,1},Pixel(255,255,255,(CUTSCENE_TIMER/480.0)*255));
|
||||||
|
}break;
|
||||||
|
case cutscene::LAUNCHPAD_PREPARE:{
|
||||||
|
int bottomCutoff = (int)(std::clamp(CUTSCENE_TIMER,0,600)/600.0*64);
|
||||||
|
DrawPartialDecal({(30-PLAYER_COORDS[0])*32+WIDTH/2,(36.5-PLAYER_COORDS[1])*32+HEIGHT/2-bottomCutoff},{64,bottomCutoff},Y_Y_DECAL,{0,0},{64,bottomCutoff},Pixel(std::clamp(CUTSCENE_TIMER,0,600)/600.0*255,std::clamp(CUTSCENE_TIMER,0,600)/600.0*255,std::clamp(CUTSCENE_TIMER,0,600)/600.0*255,255));
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
FillRectDecal({0,0},{WIDTH,HEIGHT},Pixel(0,0,0,transparency));
|
FillRectDecal({0,0},{WIDTH,HEIGHT},Pixel(0,0,0,transparency));
|
||||||
//FillRectDecal({WIDTH/2-2,HEIGHT/2-2},{4,4},WHITE);
|
//FillRectDecal({WIDTH/2-2,HEIGHT/2-2},{4,4},WHITE);
|
||||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 7.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 7.6 KiB |
18
data.h
18
data.h
@ -47,6 +47,21 @@ GPSNAV-35 - UNABLE TO LOCATE
|
|||||||
|
|
||||||
Press any key to continue.)";
|
Press any key to continue.)";
|
||||||
|
|
||||||
|
std::string STORY_TEXT7=R"(ERROR CODE -1: Transmission Successful. Awaiting Reply...
|
||||||
|
|
||||||
|
|
||||||
|
GPSNAV-17 - X96.19947Y19.48290Z-959.39100
|
||||||
|
GPSNAV-18 - X96.04916Y19.39924Z-944.39555
|
||||||
|
GPSNAV-22 - X96.94411Y20.00035Z-947.88330
|
||||||
|
GPSNAV-26 - X95.82266Y19.77421Z-957.00837
|
||||||
|
GPSNAV-31 - X95.73999Y21.48399Z-931.17830
|
||||||
|
GPSNAV-33 - X93.13879Y26.55591Z-947.29905
|
||||||
|
GPSNAV-35 - X97.00396Y24.13482Z-950.47210
|
||||||
|
|
||||||
|
Transferring Beacon Signal...
|
||||||
|
|
||||||
|
Press any key to continue.)";
|
||||||
|
|
||||||
std::string STORY_DIALOG[]={R"(
|
std::string STORY_DIALOG[]={R"(
|
||||||
???
|
???
|
||||||
RAIN CYCLE COMMENCING)", //0
|
RAIN CYCLE COMMENCING)", //0
|
||||||
@ -194,6 +209,9 @@ This is it. Once I collect this one we can finally get a powerful enough signal
|
|||||||
R"(
|
R"(
|
||||||
$PLAYER
|
$PLAYER
|
||||||
What? Of course there's more of them.)",//48
|
What? Of course there's more of them.)",//48
|
||||||
|
R"(
|
||||||
|
R.O.V.E.R.
|
||||||
|
Bzt! Initiating tracking location program...)",//49
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user