diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index fce5bbd..98dbeb7 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -1282,8 +1282,7 @@ public: } else { USE_TOUCH_CONTROLS=false; } - if (!GetKey(W).bPressed&&!GetKey(A).bPressed&&!GetKey(S).bPressed&&!GetKey(D).bPressed&& - !GetKey(UP).bPressed&&!GetKey(RIGHT).bPressed&&!GetKey(DOWN).bPressed&&!GetKey(LEFT).bPressed) { + if (!UpPressed()&&!DownPressed()&&!LeftPressed()&&!RightPressed()) { ActionButtonPress(); } switch (GAME_STATE) { @@ -3330,12 +3329,14 @@ public: if (CURRENT_MAP==MAP_5) { if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_4]) { GAME_FLAGS[gameflag::COLLECTED_SILICON_4]=true; + updatePlayerState(); GAME_STATE=GAMEWORLD; } } else if (CURRENT_MAP==MAP_4) { if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_3]) { GAME_FLAGS[gameflag::COLLECTED_SILICON_3]=true; + updatePlayerState(); DisplayMessageBox(34); GAME_STATE=GAMEWORLD; } @@ -3343,6 +3344,7 @@ public: if (CURRENT_MAP==MAP_3) { if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_2]) { GAME_FLAGS[gameflag::COLLECTED_SILICON_2]=true; + updatePlayerState(); DisplayMessageBox(29); } else { GAME_STATE=GAMEWORLD; @@ -3352,6 +3354,7 @@ public: } else { if (!GAME_FLAGS[gameflag::COLLECTED_SILICON_1]) { GAME_FLAGS[gameflag::COLLECTED_SILICON_1]=true; + updatePlayerState(); DisplayMessageBox(15); } else { GAME_STATE=GAMEWORLD; @@ -3626,6 +3629,14 @@ public: }break; case THANKS:{ DrawStringDecal({(float)(WIDTH/2-GetTextSize(THANKS_TEXT).x*3/2),(float)(HEIGHT/2-GetTextSize(THANKS_TEXT).y*3/2)},THANKS_TEXT,WHITE,{3,3}); + DrawStringDecal({0,(float)(HEIGHT-GetTextSize("Playtime").y)},"Playtime: ",WHITE,{1,1}); + int hours=frameCount/60/60/60; + int minutes=(frameCount/60/60)%60; + int seconds=(frameCount/60)%60; + DrawStringDecal({0,(float)(HEIGHT-GetTextSize("Playtime: ").y)},"Playtime: ",WHITE,{1,1}); + DrawStringDecal({(float)(GetTextSize("Playtime: ").x),(float)(HEIGHT-GetTextSize("Playtime: ").y)},(hours<10)?"0"+std::to_string(hours)+":":std::to_string(hours)+":",WHITE,{1,1}); + DrawStringDecal({(float)(GetTextSize("Playtime: ").x+24*1),(float)(HEIGHT-GetTextSize("Playtime: ").y)},(minutes<10)?"0"+std::to_string(minutes)+":":std::to_string(minutes)+":",WHITE,{1,1}); + DrawStringDecal({(float)(GetTextSize("Playtime: ").x+24*2),(float)(HEIGHT-GetTextSize("Playtime: ").y)},(seconds<10)?"0"+std::to_string(seconds):std::to_string(seconds),WHITE,{1,1}); GradientFillRectDecal({0,0},{WIDTH/2,HEIGHT/2},{100, 10, 255,ALPHA_SCREEN1},{100, 10, 255,ALPHA_SCREEN1},{100, 10, 255,ALPHA_SCREEN2},{100, 10, 255,ALPHA_SCREEN1}); GradientFillRectDecal({WIDTH/2,0},{WIDTH/2,HEIGHT/2},{100, 10, 255,ALPHA_SCREEN1},{100, 10, 255,ALPHA_SCREEN2},{100, 10, 255,ALPHA_SCREEN1},{100, 10, 255,ALPHA_SCREEN1}); diff --git a/SeasonsOfLoneliness.zip b/SeasonsOfLoneliness.zip new file mode 100644 index 0000000..81af8f8 Binary files /dev/null and b/SeasonsOfLoneliness.zip differ diff --git a/Seasons_of_Loneliness b/Seasons_of_Loneliness index 730f641..daf4238 100755 Binary files a/Seasons_of_Loneliness and b/Seasons_of_Loneliness differ diff --git a/Seasons_of_Loneliness.wasm b/Seasons_of_Loneliness.wasm index 9296327..75c200b 100755 Binary files a/Seasons_of_Loneliness.wasm and b/Seasons_of_Loneliness.wasm differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..d55afb5 --- /dev/null +++ b/index.html @@ -0,0 +1,75 @@ + + + +
+ + + +