@@ -20,19 +20,20 @@ namespace OpMon {
2020
2121 player->addOpToOpTeam (new Model::OpMon (" " , uidata->getOp (4 ), 5 , {Model::Attacks::newAtk (" Tackle" ), Model::Attacks::newAtk (" Growl" ), nullptr , nullptr }, Model::Nature::QUIET));
2222
23- // PP textures loading
24- ResourceLoader::load (texturePP[(unsigned int )Side::TO_DOWN], " sprites/chara/pp/pp0.png" );
25- ResourceLoader::load (texturePP[(unsigned int )Side::TO_RIGHT], " sprites/chara/pp/pp1.png" );
26- ResourceLoader::load (texturePP[(unsigned int )Side::TO_LEFT], " sprites/chara/pp/pp2.png" );
27- ResourceLoader::load (texturePP[(unsigned int )Side::TO_UP], " sprites/chara/pp/pp3.png" );
28- ResourceLoader::load (walkingPP[(unsigned int )Side::TO_DOWN], " sprites/chara/pp/mpp0.png" );
29- ResourceLoader::load (walkingPP[(unsigned int )Side::TO_RIGHT], " sprites/chara/pp/mpp1.png" );
30- ResourceLoader::load (walkingPP[(unsigned int )Side::TO_LEFT], " sprites/chara/pp/mpp2.png" );
31- ResourceLoader::load (walkingPP[(unsigned int )Side::TO_UP], " sprites/chara/pp/mpp3.png" );
32- ResourceLoader::load (walkingPP2[(unsigned int )Side::TO_DOWN], " sprites/chara/pp/mpp20.png" );
33- ResourceLoader::load (walkingPP2[(unsigned int )Side::TO_RIGHT], " sprites/chara/pp/mpp21.png" );
34- ResourceLoader::load (walkingPP2[(unsigned int )Side::TO_LEFT], " sprites/chara/pp/mpp22.png" );
35- ResourceLoader::load (walkingPP2[(unsigned int )Side::TO_UP], " sprites/chara/pp/mpp23.png" );
23+ // PP texture and rect loading
24+ ResourceLoader::load (texturePP, " sprites/chara/pp/pp_anim.png" );
25+ texturePPRect[(unsigned int )Side::TO_DOWN] = sf::IntRect (0 , 64 , 32 , 32 );
26+ texturePPRect[(unsigned int )Side::TO_RIGHT] = sf::IntRect (32 , 64 , 32 , 32 );
27+ texturePPRect[(unsigned int )Side::TO_LEFT] = sf::IntRect (64 , 64 , 32 , 32 );
28+ texturePPRect[(unsigned int )Side::TO_UP] = sf::IntRect (96 , 64 , 32 , 32 );
29+ walkingPPRect[(unsigned int )Side::TO_DOWN] = sf::IntRect (0 , 0 , 32 , 32 );
30+ walkingPPRect[(unsigned int )Side::TO_RIGHT] = sf::IntRect (32 , 0 , 32 , 32 );
31+ walkingPPRect[(unsigned int )Side::TO_LEFT] = sf::IntRect (64 , 0 , 32 , 32 );
32+ walkingPPRect[(unsigned int )Side::TO_UP] = sf::IntRect (96 , 0 , 32 , 32 );
33+ walkingPP2Rect[(unsigned int )Side::TO_DOWN] = sf::IntRect (0 , 32 , 32 , 32 );
34+ walkingPP2Rect[(unsigned int )Side::TO_RIGHT] = sf::IntRect (32 , 32 , 32 , 32 );
35+ walkingPP2Rect[(unsigned int )Side::TO_LEFT] = sf::IntRect (64 , 32 , 32 , 32 );
36+ walkingPP2Rect[(unsigned int )Side::TO_UP] = sf::IntRect (96 , 32 , 32 , 32 );
3637
3738 // Characters' textures initialization
3839 ResourceLoader::loadTextureArray (charaTextures[" kid" ], " sprites/chara/kid/kid%d.png" , 12 );
0 commit comments