diff --git a/data/sprites/effects.sprite b/data/sprites/effects.sprite new file mode 100644 index 0000000..c82f1f1 --- /dev/null +++ b/data/sprites/effects.sprite @@ -0,0 +1,13 @@ +{ +"effect_fireball" : { +"texture" : "effects/shot_fireball", +"topx" : 0, +"topy" : 0, +"height" : 32, +"width" : 32, +"number_of_frames" : 4, +"frame_time" : 50, +"originx" : 16, +"originy" : 16 +} +} \ No newline at end of file diff --git a/data/textures/AUTH b/data/textures/AUTH index cbdfa16..898026d 100644 --- a/data/textures/AUTH +++ b/data/textures/AUTH @@ -1,4 +1,6 @@ +effects/ +shot_fireball.png MSavioti (https://opengameart.org/content/firebal-32x32) (CC0 license) textures/ food.png "[LPC] Foods" by bluecarrot16, Daniel Eddeland (daneeklu), Joshua Taylor, Richard Kettering (Jetrel), thekingphoenix, RedVoxel, and Molly "Cougarmint" Willits. See food.png.txt. (CC-BY-SA 3.0/GPL3) gui_back_yellow.png Derived from UI pack by Kenney Vleugels (www.kenney.nl) (CC0 license) diff --git a/data/textures/effects/shot_fireball.png b/data/textures/effects/shot_fireball.png new file mode 100644 index 0000000..4515096 Binary files /dev/null and b/data/textures/effects/shot_fireball.png differ diff --git a/src/saland/GameDraw.cpp b/src/saland/GameDraw.cpp index 40e8fef..a896ffe 100644 --- a/src/saland/GameDraw.cpp +++ b/src/saland/GameDraw.cpp @@ -174,6 +174,8 @@ void DrawMonster(SDL_Renderer* target, sago::SagoSpriteHolder* sHolder, const Mo void DrawProjectile(SDL_Renderer* target, sago::SagoSpriteHolder* sHolder, const Projectile* entity, float time, int offsetX, int offsetY, bool drawCollision) { (void)sHolder; (void)time; + const sago::SagoSprite& mySprite = sHolder->GetSprite("effect_fireball"); + mySprite.Draw(target, time, std::round(entity->X) - offsetX, std::round(entity->Y) - offsetY); DrawCollision(target, entity, offsetX, offsetY, drawCollision); }