diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 63bcd48..1526475 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 58db689..62c8091 100644 --- a/main.cpp +++ b/main.cpp @@ -2665,7 +2665,7 @@ void SeasonI::drawGame(){ DrawDecal({(float)(box.x+4),(float)(box.y+5+8+2)},SPRITES["atbbar_front.png"],{1,1},Pixel(255,255,255,boxAlpha)); } if (member->selectedMove!=nullptr) { - DrawPartialDecal({(float)(box.x+4),(float)(box.y+5+8+2)},SPRITES["atbbar_back.png"],{0,0},{(1-((float)member->channelTimeRemaining/member->selectedMove->channelTime))*SPRITES["atbbar_back.png"]->sprite->width,static_cast(SPRITES["atbbar_back.png"]->sprite->height)},{1,1},Pixel(0,178,0,boxAlpha)); + DrawPartialDecal({(float)(box.x+4),(float)(box.y+5+8+2)},SPRITES["atbbar_back.png"],{0,0},{(1-((member->selectedMove->channelTime==0)?0:((float)member->channelTimeRemaining/member->selectedMove->channelTime)))*SPRITES["atbbar_back.png"]->sprite->width,static_cast(SPRITES["atbbar_back.png"]->sprite->height)},{1,1},Pixel(0,178,0,boxAlpha)); std::string label=member->selectedMove->name; label+=" "; if (member->selectedMove->grade!=0) { @@ -3137,7 +3137,7 @@ void SeasonI::drawGame(){ Entity*obj = BATTLE_ENCOUNTER->objs[i]; if (obj->GetHP()>0&&obj->selectedMove!=nullptr) { vi2d barOffset={-SPRITES["atbbar_front.png"]->sprite->width/2,8}; - DrawPartialDecal(obj->obj->GetPos()+obj->obj->originPoint-cameraPos+barOffset,SPRITES["atbbar_back.png"],{0,0},{(1-((float)obj->channelTimeRemaining/obj->selectedMove->channelTime))*SPRITES["atbbar_back.png"]->sprite->width,static_cast(SPRITES["atbbar_back.png"]->sprite->height)},{1,1},YELLOW*0.8); + DrawPartialDecal(obj->obj->GetPos()+obj->obj->originPoint-cameraPos+barOffset,SPRITES["atbbar_back.png"],{0,0},{(1-((obj->selectedMove->channelTime==0)?0:((float)obj->channelTimeRemaining/obj->selectedMove->channelTime)))*SPRITES["atbbar_back.png"]->sprite->width,static_cast(SPRITES["atbbar_back.png"]->sprite->height)},{1,1},YELLOW*0.8); DrawDecal(obj->obj->GetPos()+obj->obj->originPoint-cameraPos+barOffset,SPRITES["atbbar_front.png"]); std::string label=obj->selectedMove->name; if (obj->selectedMove->grade!=0) { @@ -4432,7 +4432,7 @@ void SeasonI::DrawGameWorld() { accX+=obj->GetScale().x; for (int yy=0;yyspr->sprSize.y;yy++) { accY+=obj->GetScale().y; - Pixel col = data[yy*obj->spr->spr->sprite->width+xx+((obj->frameIndex%obj->spr->frames)*obj->spr->sprSize.x)]; + Pixel col = data[(yy+obj->animationSubIndex*obj->spr->sprSize.y)*obj->spr->spr->sprite->width+xx+((obj->frameIndex%obj->spr->frames)*obj->spr->sprSize.x)]; while (accY>=1) { for (int xxx=0;xxx64) {