diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index 9f76eb3..13329a9 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -554,16 +554,18 @@ public: } void ActionButtonPress() { - switch (GAME_STATE) { - case GAMEWORLD:{ - if (PLAYER_COORDS[0]>=8&&PLAYER_COORDS[0]<12&& - PLAYER_COORDS[1]>=2&&PLAYER_COORDS[1]<6) { - //cout<<"You are standing over plant "<=8&&PLAYER_COORDS[0]<12&& + PLAYER_COORDS[1]>=2&&PLAYER_COORDS[1]<6) { + //cout<<"You are standing over plant "<flipped=true; CUTSCENE_OBJS[0]->x-=MOVE_SPD; } + if (MoveCameraTowardsPoint(GetMapFileCoords(7,11))) { + //Go to next part of cutscene. + } }break; } @@ -1843,6 +1847,38 @@ public: } } } + bool MoveCameraTowardsPoint(vf2d pos,float spd=BATTLE_CAMERA_SCROLL_SPD) { + bool reachedPosition=true; + if (PLAYER_COORDS[0]!=pos.x) { + if (PLAYER_COORDS[0]pos.x) { + PLAYER_COORDS[0]=pos.x; + } + } else { + PLAYER_COORDS[0]-=spd; + if (PLAYER_COORDS[0]pos.y) { + PLAYER_COORDS[1]=pos.y; + } + } else { + PLAYER_COORDS[1]-=spd; + if (PLAYER_COORDS[1]