Initialize variables (fix valgrind warnings)

svn-id: r14648
This commit is contained in:
Joost Peters 2004-08-20 13:37:50 +00:00
parent 02c5ffb639
commit cdd3397c29
2 changed files with 6 additions and 4 deletions

View File

@ -91,6 +91,8 @@ Mouse::Mouse(OSystem *system, Disk *skyDisk) {
_system = system;
_mouseB = 0;
_currentCursor = 6;
_mouseX = GAME_SCREEN_WIDTH / 2;
_mouseY = GAME_SCREEN_HEIGHT / 2;
_miceData = _skyDisk->loadFile(MICE_FILE, NULL);
@ -193,7 +195,7 @@ void Mouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) {
_mouseX = mouseX;
_mouseY = mouseY;
_logicClick = (_mouseB > 0); // click signal is available for Logic for one gamecycle
if (!Logic::_scriptVariables[MOUSE_STOP]) {

View File

@ -197,11 +197,11 @@ void SkyEngine::handleKey(void) {
void SkyEngine::go() {
if (!_dump_file)
_dump_file = stdout;
initialise();
_sdl_mouse_x = GAME_SCREEN_WIDTH / 2;
_sdl_mouse_y = GAME_SCREEN_HEIGHT / 2;
bool introSkipped = false;
if (!_quickLaunch) {
if (_systemVars.gameVersion > 267) {// don't do intro for floppydemos