diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index b09a732..31a6ed0 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -18,7 +18,7 @@ using namespace olc; #define SKIP_SILICON2 true #define SKIP_CHAPTER2 true #define SKIP_STORYBOOK true -#define SKIP_CHAPTER3 false +#define SKIP_CHAPTER3 true #define STARTING_MAP MAP_1 #define STARTING_STATE CUTSCENE_3 @@ -58,6 +58,7 @@ enum GAMESTATE{ CUTSCENE_5, //Third rover repaired. DISPLAY_BOOK, DISPLAY_BOOK2, + CUTSCENE_6, }; namespace cutscene{ @@ -92,7 +93,9 @@ namespace cutscene{ STORY_REVIEW2, FINAL_REVIEW, CHECK_COORDS_4, + PREPARE_SEQUENCE, LAUNCHPAD_OPEN, + LAUNCHPAD_PREPARE, }; } @@ -133,6 +136,8 @@ namespace gameflag{ NEXT_COORDS2, CHECK_ROVER_4, LITTLESNAKES_KILLED, + COLLECTED_SILICON_4, + CHECK_ROVER_5, }; } @@ -723,7 +728,9 @@ public: GAME_FLAGS[gameflag::CHECK_ROVER_2]=true; } 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) { GAME_FLAGS[gameflag::SLEEP]=true; @@ -1126,6 +1133,11 @@ public: fadeOut(); } }break; + case CUTSCENE_6:{ + if (textInd>=CONSOLE_REF_TEXT.length()) { + fadeOut(); + } + }break; } } @@ -1397,6 +1409,11 @@ public: GAME_STATE=GAMEWORLD; DisplayMessageBox(36); }break; + case CUTSCENE_6:{ + PlayCutscene(cutscene::LAUNCHPAD_OPEN); + fadeIn(); + GAME_STATE=GAMEWORLD; + }break; } switch (CURRENT_CUTSCENE) { case cutscene::TRANSITION_CUTSCENE:{ @@ -1507,6 +1524,12 @@ public: StartCutscene(cutscene::FINAL_REVIEW); fadeIn(); }break; + case cutscene::PREPARE_SEQUENCE:{ + GAME_STATE=CUTSCENE_6; + ResetTerminal(STORY_TEXT7); + fadeIn(); + EndCutscene(); + }break; } } @@ -2618,6 +2641,44 @@ public: } } }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) { @@ -2631,6 +2692,7 @@ public: case CUTSCENE_3: case CUTSCENE_4: case CUTSCENE_5: + case CUTSCENE_6: case GAME_OVER_TERMINAL:{ if (GAME_STATE==CUTSCENE_3&&frameCount%4!=0) {break;} if (textInd=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) { PLAYER_HP=std::clamp(PLAYER_HP+1,0,PLAYER_MAXHP); @@ -2810,6 +2884,7 @@ public: case CUTSCENE_1: case CUTSCENE_4: case CUTSCENE_5: + case CUTSCENE_6: case GAME_OVER_TERMINAL:{ DrawStringDecal({16,16},CUTSCENE_CONSOLE_TEXT,GREEN,{1,1}); if (textInd