diff --git a/src/battle/player.c b/src/battle/player.c index 4101cbd..3c869c4 100644 --- a/src/battle/player.c +++ b/src/battle/player.c @@ -85,8 +85,6 @@ void initPlayer(void) game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]); battle.stats[STAT_EPIC_KILL_STREAK] = 0; - - setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); } void doPlayer(void) diff --git a/src/battle/player.h b/src/battle/player.h index ec3342c..5036cda 100644 --- a/src/battle/player.h +++ b/src/battle/player.h @@ -35,7 +35,6 @@ extern void playSound(int id); extern void failMission(void); extern float getAngle(int x1, int y1, int x2, int y2); extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2); -extern void setMouse(int x, int y); extern char *getTranslatedString(char *string); extern void addECMEffect(Entity *ent); diff --git a/src/challenges/challengeHome.c b/src/challenges/challengeHome.c index b953bcb..791ab2e 100644 --- a/src/challenges/challengeHome.c +++ b/src/challenges/challengeHome.c @@ -87,8 +87,6 @@ void initChallengeHome(void) getWidget("ok", "stats")->action = statsOK; - setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); - endSectionTransition(); } diff --git a/src/challenges/challengeHome.h b/src/challenges/challengeHome.h index d0a517e..a121d7b 100644 --- a/src/challenges/challengeHome.h +++ b/src/challenges/challengeHome.h @@ -32,7 +32,6 @@ extern void endSectionTransition(void); extern void stopMusic(void); extern void initBattle(void); extern void loadMission(char *filename); -extern void setMouse(int x, int y); extern void doStars(float dx, float dy); extern void drawStars(void); extern void doWidgets(void); diff --git a/src/galaxy/galacticMap.c b/src/galaxy/galacticMap.c index 52966f6..0b37f3d 100644 --- a/src/galaxy/galacticMap.c +++ b/src/galaxy/galacticMap.c @@ -111,8 +111,6 @@ void initGalacticMap(void) getWidget("ok", "fallen")->action = fallenOK; - setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); - endSectionTransition(); playMusic("music/Pressure.ogg"); @@ -601,7 +599,6 @@ static void handleKeyboard(void) break; case SHOW_STAR_SYSTEM: - setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); show = SHOW_GALAXY; break; diff --git a/src/galaxy/galacticMap.h b/src/galaxy/galacticMap.h index 98b262f..0dacbdb 100644 --- a/src/galaxy/galacticMap.h +++ b/src/galaxy/galacticMap.h @@ -57,7 +57,6 @@ extern void blitRotated(SDL_Texture *texture, int x, int y, float angle); extern void initStatsDisplay(void); extern void updateAllMissions(void); extern StarSystem *getStarSystem(char *name); -extern void setMouse(int x, int y); extern void showOKDialog(void (*callback)(void), const char *format, ...); extern char *getTranslatedString(char *string); diff --git a/src/game/title.c b/src/game/title.c index a23f20b..24ee8db 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -88,8 +88,6 @@ void initTitle(void) endSectionTransition(); - setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); - playMusic("music/Rise of spirit.ogg"); } diff --git a/src/game/title.h b/src/game/title.h index 3c84658..59f66bd 100644 --- a/src/game/title.h +++ b/src/game/title.h @@ -51,7 +51,6 @@ extern void playMusic(char *filename); extern void destroyBattle(void); extern void playSound(int id); extern void initEffects(void); -extern void setMouse(int x, int y); extern void initChallengeHome(void); extern void selectWidget(const char *name, const char *group); extern void drawStats(void); diff --git a/src/system/input.c b/src/system/input.c index 5cc0345..3df05b1 100644 --- a/src/system/input.c +++ b/src/system/input.c @@ -60,20 +60,6 @@ void doMouseMotion(SDL_MouseMotionEvent *event) app.mouse.dy = event->yrel; } -void setMouse(int x, int y) -{ - SDL_Event event; - - app.mouse.x = x * app.scaleX; - app.mouse.y = y * app.scaleY; - - SDL_WarpMouseInWindow(app.window, x, y); - - while (SDL_PollEvent(&event)) - { - } -} - void drawMouse(void) { int x, y;