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

View File

@ -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);

View File

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

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

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

View File

@ -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);

View File

@ -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;