|
|
@ -39,6 +39,7 @@ enum GAMESTATE{ |
|
|
|
GAMEWORLD, |
|
|
|
GAMEWORLD, |
|
|
|
WAITING_FOR_CUTSCENE_3, |
|
|
|
WAITING_FOR_CUTSCENE_3, |
|
|
|
GAME_OVER, |
|
|
|
GAME_OVER, |
|
|
|
|
|
|
|
COLLECTED_SILICON, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
namespace cutscene{ |
|
|
|
namespace cutscene{ |
|
|
@ -80,6 +81,7 @@ namespace gameflag{ |
|
|
|
enum FLAG{ |
|
|
|
enum FLAG{ |
|
|
|
TUTORIAL_WALKED_OFF_FARM, |
|
|
|
TUTORIAL_WALKED_OFF_FARM, |
|
|
|
VISIT_BROKEN_ROVER, |
|
|
|
VISIT_BROKEN_ROVER, |
|
|
|
|
|
|
|
COLLECTED_SILICON_1, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1104,6 +1106,13 @@ public: |
|
|
|
performCropUpdate(8); |
|
|
|
performCropUpdate(8); |
|
|
|
displayPowerInfo(PETAL_STORM); |
|
|
|
displayPowerInfo(PETAL_STORM); |
|
|
|
} else |
|
|
|
} else |
|
|
|
|
|
|
|
if (obj->name.compare("SILICON_PIECE")==0&&collidesWithPlayer(obj)) { |
|
|
|
|
|
|
|
GAME_STATE=COLLECTED_SILICON; |
|
|
|
|
|
|
|
DisplayMessageBox(14); |
|
|
|
|
|
|
|
COLLECTED_ITEMS.push_back({obj->x,obj->y}); |
|
|
|
|
|
|
|
OBJECTS.erase(OBJECTS.begin()+i--); |
|
|
|
|
|
|
|
delete obj; |
|
|
|
|
|
|
|
} else |
|
|
|
if (obj->name.compare("EXIT")==0&&collidesWithPlayer(obj)) { |
|
|
|
if (obj->name.compare("EXIT")==0&&collidesWithPlayer(obj)) { |
|
|
|
fadeOut(); |
|
|
|
fadeOut(); |
|
|
|
PlayCutscene(cutscene::TRANSITION_CUTSCENE); |
|
|
|
PlayCutscene(cutscene::TRANSITION_CUTSCENE); |
|
|
@ -1521,6 +1530,16 @@ public: |
|
|
|
GAME_STATE=CUTSCENE_3; |
|
|
|
GAME_STATE=CUTSCENE_3; |
|
|
|
} |
|
|
|
} |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
|
|
|
|
case COLLECTED_SILICON:{ |
|
|
|
|
|
|
|
if (!messageBoxVisible) { |
|
|
|
|
|
|
|
if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_1]) { |
|
|
|
|
|
|
|
GAME_FLAGS[gameflag::COLLECTED_SILICON_1]=true; |
|
|
|
|
|
|
|
DisplayMessageBox(15); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
GAME_STATE=GAMEWORLD; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (PIXEL_EFFECT_TRANSPARENCY>0) { |
|
|
|
if (PIXEL_EFFECT_TRANSPARENCY>0) { |
|
|
@ -1597,7 +1616,8 @@ public: |
|
|
|
GradientFillRectDecal({WIDTH/2,HEIGHT/2},{WIDTH/2,HEIGHT/2},{20, 28, 22,ALPHA_SCREEN2},{20, 28, 22,ALPHA_SCREEN1},{20, 28, 22,ALPHA_SCREEN1},{20, 28, 22,ALPHA_SCREEN1}); |
|
|
|
GradientFillRectDecal({WIDTH/2,HEIGHT/2},{WIDTH/2,HEIGHT/2},{20, 28, 22,ALPHA_SCREEN2},{20, 28, 22,ALPHA_SCREEN1},{20, 28, 22,ALPHA_SCREEN1},{20, 28, 22,ALPHA_SCREEN1}); |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case CUTSCENE_2: |
|
|
|
case CUTSCENE_2: |
|
|
|
case GAMEWORLD:{ |
|
|
|
case GAMEWORLD: |
|
|
|
|
|
|
|
case COLLECTED_SILICON:{ |
|
|
|
DrawGameWorld(); |
|
|
|
DrawGameWorld(); |
|
|
|
int meterYOffset=2; |
|
|
|
int meterYOffset=2; |
|
|
|
if (CURRENT_CUTSCENE==cutscene::NONE) { |
|
|
|
if (CURRENT_CUTSCENE==cutscene::NONE) { |
|
|
|