@ -102,6 +102,11 @@ void VisualNovel::Initialize(){
for ( std : : string & arg : arguments ) {
if ( arg = = " story_player_name " _S ) {
graphicsToLoad . insert ( " character_image_location " _S + " Player_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Wizard_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Ranger_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Trapper_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Thief_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Witch_F.png " ) ;
graphicsToLoad . insert ( " character_image_location " _S + " Player_M.png " ) ;
} else {
graphicsToLoad . insert ( " character_image_location " _S + arg + " .png " ) ;
@ -301,7 +306,15 @@ void VisualNovel::Draw(){
}
std : : string VisualNovel : : GetCharacterImage ( std : : u32string name ) {
if ( name = = U " You " ) { //Assume we are using female player avatar for now!
switch ( game - > GetPlayer ( ) - > GetClass ( ) ) {
case Class : : WARRIOR : {
return " character_image_location " _S + " Player_F.png " ;
} break ;
case Class : : WIZARD : {
return " character_image_location " _S + " Wizard_F.png " ;
} break ;
default : return " character_image_location " _S + " Player_F.png " ;
}
}
return " character_image_location " _S + std : : string ( name . begin ( ) , name . end ( ) ) + " .png " ;
}