Removed mouse warping. Is too jarring.

This commit is contained in:
Steve 2016-02-29 16:05:35 +00:00
parent 9d846fd137
commit 1c270888aa
9 changed files with 0 additions and 27 deletions

View File

@ -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]); 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; battle.stats[STAT_EPIC_KILL_STREAK] = 0;
setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
} }
void doPlayer(void) void doPlayer(void)

View File

@ -35,7 +35,6 @@ extern void playSound(int id);
extern void failMission(void); extern void failMission(void);
extern float getAngle(int x1, int y1, int x2, int y2); 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 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 char *getTranslatedString(char *string);
extern void addECMEffect(Entity *ent); extern void addECMEffect(Entity *ent);

View File

@ -87,8 +87,6 @@ void initChallengeHome(void)
getWidget("ok", "stats")->action = statsOK; getWidget("ok", "stats")->action = statsOK;
setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
endSectionTransition(); endSectionTransition();
} }

View File

@ -32,7 +32,6 @@ extern void endSectionTransition(void);
extern void stopMusic(void); extern void stopMusic(void);
extern void initBattle(void); extern void initBattle(void);
extern void loadMission(char *filename); extern void loadMission(char *filename);
extern void setMouse(int x, int y);
extern void doStars(float dx, float dy); extern void doStars(float dx, float dy);
extern void drawStars(void); extern void drawStars(void);
extern void doWidgets(void); extern void doWidgets(void);

View File

@ -111,8 +111,6 @@ void initGalacticMap(void)
getWidget("ok", "fallen")->action = fallenOK; getWidget("ok", "fallen")->action = fallenOK;
setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
endSectionTransition(); endSectionTransition();
playMusic("music/Pressure.ogg"); playMusic("music/Pressure.ogg");
@ -601,7 +599,6 @@ static void handleKeyboard(void)
break; break;
case SHOW_STAR_SYSTEM: case SHOW_STAR_SYSTEM:
setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
show = SHOW_GALAXY; show = SHOW_GALAXY;
break; break;

View File

@ -57,7 +57,6 @@ extern void blitRotated(SDL_Texture *texture, int x, int y, float angle);
extern void initStatsDisplay(void); extern void initStatsDisplay(void);
extern void updateAllMissions(void); extern void updateAllMissions(void);
extern StarSystem *getStarSystem(char *name); extern StarSystem *getStarSystem(char *name);
extern void setMouse(int x, int y);
extern void showOKDialog(void (*callback)(void), const char *format, ...); extern void showOKDialog(void (*callback)(void), const char *format, ...);
extern char *getTranslatedString(char *string); extern char *getTranslatedString(char *string);

View File

@ -88,8 +88,6 @@ void initTitle(void)
endSectionTransition(); endSectionTransition();
setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
playMusic("music/Rise of spirit.ogg"); playMusic("music/Rise of spirit.ogg");
} }

View File

@ -51,7 +51,6 @@ extern void playMusic(char *filename);
extern void destroyBattle(void); extern void destroyBattle(void);
extern void playSound(int id); extern void playSound(int id);
extern void initEffects(void); extern void initEffects(void);
extern void setMouse(int x, int y);
extern void initChallengeHome(void); extern void initChallengeHome(void);
extern void selectWidget(const char *name, const char *group); extern void selectWidget(const char *name, const char *group);
extern void drawStats(void); extern void drawStats(void);

View File

@ -60,20 +60,6 @@ void doMouseMotion(SDL_MouseMotionEvent *event)
app.mouse.dy = event->yrel; 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) void drawMouse(void)
{ {
int x, y; int x, y;