generated from sigonasr2/CPlusPlusProjectTemplate
New assets new story lines begin cutscene implementation
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
f6627f8db7
commit
70aa5b155e
@ -16,7 +16,7 @@ using namespace olc;
|
|||||||
#define SKIP_CHAPTER1 true
|
#define SKIP_CHAPTER1 true
|
||||||
#define SKIP_BOSS true
|
#define SKIP_BOSS true
|
||||||
#define SKIP_SILICON2 true
|
#define SKIP_SILICON2 true
|
||||||
#define SKIP_CHAPTER2 false
|
#define SKIP_CHAPTER2 true
|
||||||
#define SKIP_CHAPTER3 false
|
#define SKIP_CHAPTER3 false
|
||||||
|
|
||||||
#define STARTING_MAP MAP_1
|
#define STARTING_MAP MAP_1
|
||||||
@ -54,6 +54,7 @@ enum GAMESTATE{
|
|||||||
LATER_THAT_NIGHTFADEIN,
|
LATER_THAT_NIGHTFADEIN,
|
||||||
LATER_THAT_NIGHTWAIT,
|
LATER_THAT_NIGHTWAIT,
|
||||||
LATER_THAT_NIGHTFADEOUT,
|
LATER_THAT_NIGHTFADEOUT,
|
||||||
|
CUTSCENE_5, //Third rover repaired.
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace cutscene{
|
namespace cutscene{
|
||||||
@ -83,6 +84,8 @@ namespace cutscene{
|
|||||||
SPAWN_WORMS,
|
SPAWN_WORMS,
|
||||||
CHECK_COORDS_2,
|
CHECK_COORDS_2,
|
||||||
MAP_TRANSITION,
|
MAP_TRANSITION,
|
||||||
|
CHECK_COORDS_3,
|
||||||
|
STORY_REVIEW,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +120,9 @@ namespace gameflag{
|
|||||||
NEXT_COORDS,
|
NEXT_COORDS,
|
||||||
COLLECTED_SILICON_2,
|
COLLECTED_SILICON_2,
|
||||||
CHECK_ROVER_2,
|
CHECK_ROVER_2,
|
||||||
|
COLLECTED_SILICON_3,
|
||||||
|
CHECK_ROVER_3,
|
||||||
|
STORY_REVIEW,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,7 +631,7 @@ public:
|
|||||||
*NADO_DECAL,*SILICON_ROCK_DECAL,*PETAL_STORM_DECAL,*ROVER_DECAL,*X_X_DECAL,
|
*NADO_DECAL,*SILICON_ROCK_DECAL,*PETAL_STORM_DECAL,*ROVER_DECAL,*X_X_DECAL,
|
||||||
*LATER_THAT_NIGHT_DECAL,*SLEEP_DECAL,*SEED_DECAL,*TREE_DECAL,*X_X_UNCHARGED_DECAL,
|
*LATER_THAT_NIGHT_DECAL,*SLEEP_DECAL,*SEED_DECAL,*TREE_DECAL,*X_X_UNCHARGED_DECAL,
|
||||||
*SANDWORM_DECAL,*SNAKE_DECAL,*MOTH_DECAL,*FLASH_FLOOD_DECAL,*SUNNY_DAY_DECAL,*FIRESTORM_DECAL,*SOLARFLARE_DECAL,
|
*SANDWORM_DECAL,*SNAKE_DECAL,*MOTH_DECAL,*FLASH_FLOOD_DECAL,*SUNNY_DAY_DECAL,*FIRESTORM_DECAL,*SOLARFLARE_DECAL,
|
||||||
*HP_REGEN_DECAL,*SLOWED_DECAL, *SPEED_DECAL,*HIDDEN_DECAL;
|
*HP_REGEN_DECAL,*SLOWED_DECAL, *SPEED_DECAL,*HIDDEN_DECAL,*BOOK_DECAL,*BOOK2_DECAL;
|
||||||
std::map<std::string,ObjectLoadInfo*> BASE_OBJECTS;
|
std::map<std::string,ObjectLoadInfo*> BASE_OBJECTS;
|
||||||
std::vector<Encounter> ENCOUNTERS;
|
std::vector<Encounter> ENCOUNTERS;
|
||||||
Encounter ENCOUNTER_SPIDEY_1;
|
Encounter ENCOUNTER_SPIDEY_1;
|
||||||
@ -685,12 +691,14 @@ public:
|
|||||||
GAME_STATE=GAMEWORLD;
|
GAME_STATE=GAMEWORLD;
|
||||||
}
|
}
|
||||||
if (SKIP_CHAPTER2||SKIP_CHAPTER3) {
|
if (SKIP_CHAPTER2||SKIP_CHAPTER3) {
|
||||||
|
//GAME_FLAGS[gameflag::CHECK_ROVER_3]=true;
|
||||||
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_3]=true;
|
||||||
|
GAME_FLAGS[gameflag::CHECK_ROVER_2]=true;
|
||||||
}
|
}
|
||||||
if (SKIP_CHAPTER3) {
|
if (SKIP_CHAPTER3) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (SKIP_BOSS) {
|
if (SKIP_CHAPTER2||SKIP_BOSS) {
|
||||||
GAME_FLAGS[gameflag::SLEEP]=true;
|
GAME_FLAGS[gameflag::SLEEP]=true;
|
||||||
GAME_FLAGS[gameflag::FIRST_ENCOUNTER_X_X]=true;
|
GAME_FLAGS[gameflag::FIRST_ENCOUNTER_X_X]=true;
|
||||||
GAME_FLAGS[gameflag::ANALYSIS_X_X]=true;
|
GAME_FLAGS[gameflag::ANALYSIS_X_X]=true;
|
||||||
@ -698,7 +706,7 @@ public:
|
|||||||
GAME_FLAGS[gameflag::TUTORIAL2_X_X]=true;
|
GAME_FLAGS[gameflag::TUTORIAL2_X_X]=true;
|
||||||
GAME_STATE=GAMEWORLD;
|
GAME_STATE=GAMEWORLD;
|
||||||
}
|
}
|
||||||
if (SKIP_SILICON2) {
|
if (SKIP_CHAPTER2||SKIP_SILICON2) {
|
||||||
GAME_FLAGS[gameflag::CHECK_ROVER]=true;
|
GAME_FLAGS[gameflag::CHECK_ROVER]=true;
|
||||||
GAME_FLAGS[gameflag::NEXT_COORDS]=true;
|
GAME_FLAGS[gameflag::NEXT_COORDS]=true;
|
||||||
GAME_FLAGS[gameflag::COLLECTED_SILICON_2]=true;
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_2]=true;
|
||||||
@ -751,6 +759,8 @@ public:
|
|||||||
SLOWED_DECAL=new Decal(new Sprite("assets/slowed.png"));
|
SLOWED_DECAL=new Decal(new Sprite("assets/slowed.png"));
|
||||||
SPEED_DECAL=new Decal(new Sprite("assets/speedup.png"));
|
SPEED_DECAL=new Decal(new Sprite("assets/speedup.png"));
|
||||||
HIDDEN_DECAL=new Decal(new Sprite("assets/hidden.png"));
|
HIDDEN_DECAL=new Decal(new Sprite("assets/hidden.png"));
|
||||||
|
BOOK_DECAL=new Decal(new Sprite("assets/book.png"));
|
||||||
|
BOOK2_DECAL=new Decal(new Sprite("assets/book2.png"));
|
||||||
|
|
||||||
current_playerAnim->spr=PLAYER_DECAL;
|
current_playerAnim->spr=PLAYER_DECAL;
|
||||||
playerAnim->spr=PLAYER_DECAL;
|
playerAnim->spr=PLAYER_DECAL;
|
||||||
@ -910,8 +920,6 @@ public:
|
|||||||
MOVESET_MEGAMOTH.push_back(POLLINATION);
|
MOVESET_MEGAMOTH.push_back(POLLINATION);
|
||||||
MOVESET_MEGAMOTH.push_back(GUST);
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
MOVESET_MEGAMOTH.push_back(GUST);
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
MOVESET_MEGAMOTH.push_back(GUST);
|
|
||||||
MOVESET_MEGAMOTH.push_back(GUST);
|
|
||||||
|
|
||||||
MOVESET_SANDWORM.push_back(SANDSTORM);
|
MOVESET_SANDWORM.push_back(SANDSTORM);
|
||||||
MOVESET_SANDWORM.push_back(HEAT_WAVE);
|
MOVESET_SANDWORM.push_back(HEAT_WAVE);
|
||||||
@ -1039,7 +1047,14 @@ public:
|
|||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case GAME_OVER_TERMINAL:{
|
case GAME_OVER_TERMINAL:{
|
||||||
|
if (textInd>=CONSOLE_REF_TEXT.length()) {
|
||||||
fadeOut();
|
fadeOut();
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case CUTSCENE_5:{
|
||||||
|
if (textInd>=CONSOLE_REF_TEXT.length()) {
|
||||||
|
fadeOut();
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1306,6 +1321,12 @@ public:
|
|||||||
GAME_STATE=GAMEWORLD;
|
GAME_STATE=GAMEWORLD;
|
||||||
fadeIn();
|
fadeIn();
|
||||||
}break;
|
}break;
|
||||||
|
case CUTSCENE_5:{
|
||||||
|
EndCutscene();
|
||||||
|
fadeIn();
|
||||||
|
GAME_STATE=GAMEWORLD;
|
||||||
|
DisplayMessageBox(36);
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
switch (CURRENT_CUTSCENE) {
|
switch (CURRENT_CUTSCENE) {
|
||||||
case cutscene::TRANSITION_CUTSCENE:{
|
case cutscene::TRANSITION_CUTSCENE:{
|
||||||
@ -1353,18 +1374,19 @@ public:
|
|||||||
updatePlayerState();
|
updatePlayerState();
|
||||||
fadeIn();
|
fadeIn();
|
||||||
EndCutscene();
|
EndCutscene();
|
||||||
|
if (GAME_FLAGS[gameflag::CHECK_ROVER_3]&&!GAME_FLAGS[gameflag::STORY_REVIEW]) {
|
||||||
|
GAME_FLAGS[gameflag::STORY_REVIEW]=true;
|
||||||
|
//20,2
|
||||||
|
StartCutscene(cutscene::STORY_REVIEW);
|
||||||
|
CUTSCENE_OBJS[0]=CreateObject({PLAYER_COORDS[0],PLAYER_COORDS[1]},PLAYER_DECAL,playerAnim,true);
|
||||||
|
CUTSCENE_OBJS[1]=CreateObject({20,2},SLEEP_DECAL,EMPTY_BED_ANIMATION,true);
|
||||||
|
} else
|
||||||
if (GAME_FLAGS[gameflag::REST_IN_DOME]&&!GAME_FLAGS[gameflag::SLEEP]) {
|
if (GAME_FLAGS[gameflag::REST_IN_DOME]&&!GAME_FLAGS[gameflag::SLEEP]) {
|
||||||
GAME_FLAGS[gameflag::SLEEP]=true;
|
GAME_FLAGS[gameflag::SLEEP]=true;
|
||||||
//20,2
|
//20,2
|
||||||
GAME_STATE=LATER_THAT_NIGHTFADEIN;
|
GAME_STATE=LATER_THAT_NIGHTFADEIN;
|
||||||
fadeOutCompleted();
|
fadeOutCompleted();
|
||||||
}
|
} else
|
||||||
if (GAME_FLAGS[gameflag::REST_IN_DOME]&&!GAME_FLAGS[gameflag::SLEEP]) {
|
|
||||||
GAME_FLAGS[gameflag::SLEEP]=true;
|
|
||||||
//20,2
|
|
||||||
GAME_STATE=LATER_THAT_NIGHTFADEIN;
|
|
||||||
fadeOutCompleted();
|
|
||||||
}
|
|
||||||
if (!GAME_FLAGS[gameflag::CHECK_ROVER]&&GAME_FLAGS[gameflag::TUTORIAL2_X_X]) {
|
if (!GAME_FLAGS[gameflag::CHECK_ROVER]&&GAME_FLAGS[gameflag::TUTORIAL2_X_X]) {
|
||||||
GAME_FLAGS[gameflag::CHECK_ROVER]=true;
|
GAME_FLAGS[gameflag::CHECK_ROVER]=true;
|
||||||
DisplayMessageBox(26);
|
DisplayMessageBox(26);
|
||||||
@ -1390,6 +1412,11 @@ public:
|
|||||||
LoadMap(MAP_4);
|
LoadMap(MAP_4);
|
||||||
fadeIn();
|
fadeIn();
|
||||||
}break;
|
}break;
|
||||||
|
case cutscene::CHECK_COORDS_3:{
|
||||||
|
GAME_STATE=CUTSCENE_5;
|
||||||
|
ResetTerminal(STORY_TEXT6);
|
||||||
|
fadeIn();
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2384,6 +2411,24 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case cutscene::CHECK_COORDS_3:{
|
||||||
|
if (!messageBoxVisible) {
|
||||||
|
if (!CUTSCENE_FLAGS[0]) {
|
||||||
|
CUTSCENE_FLAGS[0]=true;
|
||||||
|
fadeOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case cutscene::STORY_REVIEW:{
|
||||||
|
if (!CUTSCENE_FLAGS[0]) {
|
||||||
|
if (MoveObjectTowardsPoint({19,2.5},CUTSCENE_OBJS[0],BOTH)) {
|
||||||
|
CUTSCENE_FLAGS[0]=true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (!CUTSCENE_FLAGS[1]) {
|
||||||
|
DisplayMessageBox(38);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GAME_STATE==CUTSCENE_3&&!SOUND_IS_PLAYING) {
|
if (GAME_STATE==CUTSCENE_3&&!SOUND_IS_PLAYING) {
|
||||||
@ -2396,6 +2441,7 @@ public:
|
|||||||
case CUTSCENE_1:
|
case CUTSCENE_1:
|
||||||
case CUTSCENE_3:
|
case CUTSCENE_3:
|
||||||
case CUTSCENE_4:
|
case CUTSCENE_4:
|
||||||
|
case CUTSCENE_5:
|
||||||
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()) {
|
||||||
@ -2444,6 +2490,13 @@ public:
|
|||||||
}break;
|
}break;
|
||||||
case COLLECTED_SILICON:{
|
case COLLECTED_SILICON:{
|
||||||
if (!messageBoxVisible) {
|
if (!messageBoxVisible) {
|
||||||
|
if (CURRENT_MAP==MAP_4) {
|
||||||
|
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_3]) {
|
||||||
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_3]=true;
|
||||||
|
DisplayMessageBox(34);
|
||||||
|
GAME_STATE=GAMEWORLD;
|
||||||
|
}
|
||||||
|
} else
|
||||||
if (CURRENT_MAP==MAP_3) {
|
if (CURRENT_MAP==MAP_3) {
|
||||||
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_2]) {
|
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_2]) {
|
||||||
GAME_FLAGS[gameflag::COLLECTED_SILICON_2]=true;
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_2]=true;
|
||||||
@ -2543,6 +2596,12 @@ public:
|
|||||||
DisplayMessageBox(31);
|
DisplayMessageBox(31);
|
||||||
StartCutscene(cutscene::CHECK_COORDS_2);
|
StartCutscene(cutscene::CHECK_COORDS_2);
|
||||||
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_3]&&GAME_FLAGS[gameflag::COLLECTED_SILICON_3]&&PLAYER_COORDS[0]>=31&&PLAYER_COORDS[0]<=35&&PLAYER_COORDS[1]>=33&&PLAYER_COORDS[1]<=37) {
|
||||||
|
GAME_FLAGS[gameflag::CHECK_ROVER_3]=true;
|
||||||
|
DisplayMessageBox(35);
|
||||||
|
StartCutscene(cutscene::CHECK_COORDS_3);
|
||||||
|
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);
|
||||||
@ -2555,6 +2614,7 @@ public:
|
|||||||
switch (GAME_STATE) {
|
switch (GAME_STATE) {
|
||||||
case CUTSCENE_1:
|
case CUTSCENE_1:
|
||||||
case CUTSCENE_4:
|
case CUTSCENE_4:
|
||||||
|
case CUTSCENE_5:
|
||||||
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()) {
|
||||||
|
Binary file not shown.
BIN
assets/book.png
Normal file
BIN
assets/book.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
BIN
assets/book2.png
Normal file
BIN
assets/book2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
48
data.h
48
data.h
@ -33,6 +33,18 @@ std::string STORY_TEXT5=R"( lets out their last breath before collapsing for ete
|
|||||||
|
|
||||||
Press any key to continue.)";
|
Press any key to continue.)";
|
||||||
|
|
||||||
|
std::string STORY_TEXT6=R"(ERROR CODE -4: Transmission Failed. Unable to Retrieve Launch Data.
|
||||||
|
|
||||||
|
GPSNAV-17 - FAILED.
|
||||||
|
GPSNAV-18 - FAILED.
|
||||||
|
GPSNAV-22 - FAILED.
|
||||||
|
GPSNAV-26 - FAILED.
|
||||||
|
GPSNAV-31 - FAILED.
|
||||||
|
GPSNAV-33 - UNABLE TO LOCATE
|
||||||
|
GPSNAV-35 - UNABLE TO LOCATE
|
||||||
|
|
||||||
|
Press any key to continue.)";
|
||||||
|
|
||||||
std::string STORY_DIALOG[]={R"(
|
std::string STORY_DIALOG[]={R"(
|
||||||
???
|
???
|
||||||
RAIN CYCLE COMMENCING)", //0
|
RAIN CYCLE COMMENCING)", //0
|
||||||
@ -135,6 +147,42 @@ SIGNS INDICATE TRACES OF SILICON LOCATION ::: EAST)",//32
|
|||||||
R"(
|
R"(
|
||||||
$PLAYER
|
$PLAYER
|
||||||
Hopefully no more ambushes... (Or maybe I'll just jinx myself.))",//33
|
Hopefully no more ambushes... (Or maybe I'll just jinx myself.))",//33
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
Another one down... Back to R.O.V.E.R. then.)",//34
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
Alright, is it finally enough...?)",//35
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
Really not enough huh? Unfortunate... It looks like I have to let it recharge now too. Guess I'll take a break inside the dome.)",//36
|
||||||
|
R"(
|
||||||
|
|
||||||
|
This message left intentionally blank)",//37
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
(It was only a few weeks ago, that I started to realize...))",//38
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
R.O.V.E.R., that hunk of metal sitting outside, was not from this planet. A curious writing on its nameplate had the words "S-VOYAGER 1999" from a group of "Americans")",//39
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
My weather reference books indicate that this group is indeed from a far away source. And the book probably is too. This just confirms it.)",//40
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
I have been living alone here, for at least 400 terra cycles. I haven't considered that other lifeforms would still be alive since all that's here are a bunch of nasty bugs.)",//41
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
That's why... That's why I want to repair R.O.V.E.R. It's my only hope of communication. My only chance to relieve myself of this loneliness.)",//42
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
If I could see these beautiful landscapes, and experience others who have learned and mastered weather powers like mine... That would be the dream.)",//43
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
I studied carefully and learned everything there is to know about how weather works on this planet. The Planet of Hope. My future...)",//44
|
||||||
|
R"(
|
||||||
|
$PLAYER
|
||||||
|
Hopefully R.O.V.E.R. is calibrated now!")",//45
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user