From 48d54af42e77997292465ed5b346f9c770dd4e23 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 17 Dec 2015 23:14:25 +0000 Subject: [PATCH] Use float for draw angle, instead of int. --- src/battle/bullets.h | 2 +- src/battle/debris.h | 2 +- src/battle/entities.h | 2 +- src/battle/hud.h | 2 +- src/battle/radar.h | 2 +- src/draw/draw.c | 2 +- src/galaxy/galacticMap.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/battle/bullets.h b/src/battle/bullets.h index f0ecaf8..331097e 100644 --- a/src/battle/bullets.h +++ b/src/battle/bullets.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAX_BULLETS_TO_DRAW 512 extern SDL_Texture *getTexture(char *filename); -extern void blitRotated(SDL_Texture *texture, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2); extern void damageFighter(Entity *e, int damage, long flags); extern void playBattleSound(int id, int x, int y); diff --git a/src/battle/debris.h b/src/battle/debris.h index 203f936..4443d5f 100644 --- a/src/battle/debris.h +++ b/src/battle/debris.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAX_DEBRIS_TEXTURES 6 extern float mod(float n, float x); -extern void blitRotated(SDL_Texture *texture, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2); extern SDL_Texture *getTexture(char *filename); extern void addDebrisFire(int x, int y); diff --git a/src/battle/entities.h b/src/battle/entities.h index 5976769..552cc3b 100644 --- a/src/battle/entities.h +++ b/src/battle/entities.h @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../common.h" -extern void blitRotated(SDL_Texture *t, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern void doFighter(void); extern void doCapitalShip(void); extern void addToGrid(Entity *e); diff --git a/src/battle/hud.h b/src/battle/hud.h index 185738b..2e33c20 100644 --- a/src/battle/hud.h +++ b/src/battle/hud.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAX_HUD_MESSAGES 6 extern SDL_Texture *getTexture(char *filename); -extern void blitRotated(SDL_Texture *texture, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern void blit(SDL_Texture *texture, int x, int y, int center); extern float getAngle(int x1, int y1, int x2, int y2); extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...); diff --git a/src/battle/radar.h b/src/battle/radar.h index 4a5998e..3721b13 100644 --- a/src/battle/radar.h +++ b/src/battle/radar.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int getDistance(int x1, int y1, int x2, int y2); extern void blit(SDL_Texture *texture, int x, int y, int center); extern SDL_Texture *getTexture(char *filename); -extern void blitRotated(SDL_Texture *texture, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...); extern App app; diff --git a/src/draw/draw.c b/src/draw/draw.c index 2b4462e..7d6ec68 100644 --- a/src/draw/draw.c +++ b/src/draw/draw.c @@ -86,7 +86,7 @@ void blitScaled(SDL_Texture *texture, int x, int y, int w, int h) SDL_RenderCopy(app.renderer, texture, NULL, &dstRect); } -void blitRotated(SDL_Texture *texture, int x, int y, int angle) +void blitRotated(SDL_Texture *texture, int x, int y, float angle) { SDL_Rect dstRect; diff --git a/src/galaxy/galacticMap.h b/src/galaxy/galacticMap.h index 9446948..d1198dc 100644 --- a/src/galaxy/galacticMap.h +++ b/src/galaxy/galacticMap.h @@ -56,7 +56,7 @@ extern void drawOptions(void); extern void initOptions(void (*returnFromOptions)(void)); extern void drawStats(void); extern void playSound(int id); -extern void blitRotated(SDL_Texture *texture, int x, int y, int angle); +extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern void initStatsDisplay(void); extern void updateStarSystemMissions(void); extern StarSystem *getStarSystem(char *name);