/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
audio.loadMusic("music/hub");
// we might want this now, for medals
- audio.loadSound(SND_ITEM, "sound/item.wav");
+ audio.loadSound(SND_ITEM, "sound/item");
graphics.quickSprite("cheatHeader", graphics.loadImage("gfx/main/cheats.png"));
graphics.quickSprite("optionsHeader", graphics.loadImage("gfx/main/options.png"));
Uint32 frameLimit = SDL_GetTicks() + 16;
Uint32 now = SDL_GetTicks();
- int mouseXDelta = 0;
- int mouseYDelta = 0;
-
while (rtn == -1)
{
graphics.updateScreen();
engine.getInput();
config.populate();
+ int mouseXDelta = 0;
+ int mouseYDelta = 0;
+
if (config.isControl(CONTROL::RIGHT))
{
- mouseXDelta = 5;
+ mouseXDelta += 5;
}
if (config.isControl(CONTROL::LEFT))
{
- mouseXDelta = -5;
+ mouseXDelta -= 5;
}
if (config.isControl(CONTROL::DOWN))
{
- mouseYDelta = 5;
+ mouseYDelta += 5;
}
if (config.isControl(CONTROL::UP) || config.isControl(CONTROL::JUMP))
{
- mouseYDelta = -5;
+ mouseYDelta -= 5;
}
if ((mouseXDelta != 0) || (mouseYDelta != 0))
{
- engine.setMouse(engine.getMouseX() + (int)mouseXDelta, engine.getMouseY() + (int)mouseYDelta);
- mouseXDelta = 0;
- mouseYDelta = 0;
+ engine.moveMouse(mouseXDelta, mouseYDelta);
}
hubPoint = (HubLevel*)hubList.getHead();
// Collisions for Panel Buttons
if ((showMIAs) || (showStats))
{
- // SDLK_LCTRL is the "fire" button.
+ // SDL_SCANCODE_LCTRL is the "fire" button.
if (engine.mouseLeft || config.isControl(CONTROL::FIRE))
{
if (Collision::collision(engine.getMouseX(), engine.getMouseY(), 1, 1, 270, 310, 32, 32))