diff --git a/Crawler/Version.h b/Crawler/Version.h index 8a914ced..ae31bbe5 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -35,7 +35,7 @@ SUCH DAMAGE. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 3226 +#define VERSION_BUILD 3232 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Crawler/VisualNovel.cpp b/Crawler/VisualNovel.cpp index 29927f72..c8e5d190 100644 --- a/Crawler/VisualNovel.cpp +++ b/Crawler/VisualNovel.cpp @@ -201,12 +201,27 @@ void VisualNovel::Draw(){ alpha=util::lerp(0,1,1-(transitionTime/maxTransitionTime)); } if(prevBackgroundFilename!=""){ - game->DrawDecal({0,0},GFX["backgrounds/"+prevBackgroundFilename].Decal()); + game->DrawDecal({0,0},GFX["story_background_image_location"_S+prevBackgroundFilename].Decal()); } - game->DrawDecal({0,0},GFX["backgrounds/"+backgroundFilename].Decal(),{1,1},{255,255,255,uint8_t(255*alpha)}); + game->DrawDecal({0,0},GFX["story_background_image_location"_S+backgroundFilename].Decal(),{1,1},{255,255,255,uint8_t(255*alpha)}); }else{ game->FillRectDecal({0,0},game->GetScreenSize()); } + for(int i=leftCharacters.size()-1;i>=0;i--){ + //Start 72 from the bottom. + std::string character=leftCharacters[i]; + Pixel fadeColor=WHITE; + if(character!=actualSpeakerName)fadeColor={128,128,128,255}; + game->DrawDecal(vi2d{0,game->GetScreenSize().y}-vi2d{-i*64,72+168},GFX[GetCharacterImage(character)].Decal(),{1,1},fadeColor); + } + for(int i=rightCharacters.size()-1;i>=0;i--){ + //Start 72 from the bottom. + std::string character=rightCharacters[i]; + Pixel fadeColor=WHITE; + if(character!=actualSpeakerName)fadeColor={128,128,128,255}; + float spriteWidth=GFX[GetCharacterImage(character)].Sprite()->width; + game->DrawRotatedDecal(game->GetScreenSize()-vi2d{i*64+int(spriteWidth)/2,72+168},GFX[GetCharacterImage(character)].Decal(),0,vf2d{spriteWidth/2,0.f},{-1,1},fadeColor); + } if(locationDisplayTime>0){ vi2d textSize=game->GetTextSizeProp(locationDisplayText)*2; game->FillRectDecal(game->GetScreenSize()/2-textSize/2-vi2d{4,4},textSize+vi2d{8,8},BLACK); @@ -226,6 +241,12 @@ void VisualNovel::Draw(){ game->DrawShadowStringPropDecal(dialogDisplayPos-vf2d{10,10},activeText); } } +std::string VisualNovel::GetCharacterImage(std::string name){ + if(name=="You"){ //Assume we are using female player avatar for now! + return "character_image_location"_S+"Player_F.png"; + } + return "character_image_location"_S+name+".png"; +} VisualNovel::VisualNovel(){} diff --git a/Crawler/VisualNovel.h b/Crawler/VisualNovel.h index 9cf33898..a5870317 100644 --- a/Crawler/VisualNovel.h +++ b/Crawler/VisualNovel.h @@ -157,4 +157,5 @@ public: void ExecuteNextCommand(); void Update(); void Draw(); + std::string GetCharacterImage(std::string name); }; \ No newline at end of file diff --git a/Crawler/assets/characters/greg.png b/Crawler/assets/characters/greg.png index 75f80811..705b794d 100644 Binary files a/Crawler/assets/characters/greg.png and b/Crawler/assets/characters/greg.png differ diff --git a/Crawler/assets/characters/player_f.png b/Crawler/assets/characters/player_f.png index 8fb037b7..71b20d09 100644 Binary files a/Crawler/assets/characters/player_f.png and b/Crawler/assets/characters/player_f.png differ diff --git a/Crawler/assets/characters/player_m.png b/Crawler/assets/characters/player_m.png index a2253042..c25812be 100644 Binary files a/Crawler/assets/characters/player_m.png and b/Crawler/assets/characters/player_m.png differ diff --git a/Crawler/assets/characters/sherman.png b/Crawler/assets/characters/sherman.png index 979f53f7..3b8a5e81 100644 Binary files a/Crawler/assets/characters/sherman.png and b/Crawler/assets/characters/sherman.png differ diff --git a/Crawler/assets/config/story/Chapter 1.txt b/Crawler/assets/config/story/Chapter 1.txt index 7fe0c87a..68d6b5a4 100644 --- a/Crawler/assets/config/story/Chapter 1.txt +++ b/Crawler/assets/config/story/Chapter 1.txt @@ -53,7 +53,7 @@ after around half an hour of letting the health potion work the man finally seem How are you feeling. -[?] +[?,Sherman] Better, i guess. @@ -61,7 +61,7 @@ Better, i guess. Can you tell me what happened here? -[?] +[?,Sherman] I... We... No, it happened way to fast.