mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 06:24:32 +00:00
Fix some things/typos that were overlooked
This commit is contained in:
parent
812dc7dd7f
commit
7b702673fe
6 changed files with 27 additions and 40 deletions
|
@ -1728,19 +1728,6 @@ void DSQ::toggleVersionLabel(bool on)
|
||||||
versionLabel->alpha.interpolateTo(a, 1);
|
versionLabel->alpha.interpolateTo(a, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSQ::toggleInputMode()
|
|
||||||
{
|
|
||||||
switch(inputMode)
|
|
||||||
{
|
|
||||||
case INPUT_MOUSE:
|
|
||||||
setInputMode(INPUT_JOYSTICK);
|
|
||||||
break;
|
|
||||||
case INPUT_JOYSTICK:
|
|
||||||
setInputMode(INPUT_MOUSE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSQ::setInputMode(InputMode mode)
|
void DSQ::setInputMode(InputMode mode)
|
||||||
{
|
{
|
||||||
inputMode = mode;
|
inputMode = mode;
|
||||||
|
@ -1840,11 +1827,6 @@ int DSQ::getEntityTypeIndexByName(std::string s)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSQ::toggleMuffleSound(bool toggle)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSQ::loadModsCallback(const std::string &filename, intptr_t param)
|
void DSQ::loadModsCallback(const std::string &filename, intptr_t param)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2797,17 +2779,13 @@ void DSQ::createSaveSlotPage()
|
||||||
addRenderObject(saveSlots[i], LR_FILEMENU);
|
addRenderObject(saveSlots[i], LR_FILEMENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveSlots[0]->setDirMove(DIR_RIGHT, arrowUp);
|
||||||
if (inputMode == INPUT_JOYSTICK)
|
saveSlots[1]->setDirMove(DIR_RIGHT, arrowUp);
|
||||||
{
|
saveSlots[2]->setDirMove(DIR_RIGHT, arrowDown);
|
||||||
saveSlots[0]->setDirMove(DIR_RIGHT, arrowUp);
|
saveSlots[3]->setDirMove(DIR_RIGHT, cancel);
|
||||||
saveSlots[1]->setDirMove(DIR_RIGHT, arrowUp);
|
arrowDown->setDirMove(DIR_DOWN, cancel);
|
||||||
saveSlots[2]->setDirMove(DIR_RIGHT, arrowDown);
|
cancel->setDirMove(DIR_UP, arrowDown);
|
||||||
saveSlots[3]->setDirMove(DIR_RIGHT, cancel);
|
cancel->setDirMove(DIR_LEFT, saveSlots[3]);
|
||||||
arrowDown->setDirMove(DIR_DOWN, cancel);
|
|
||||||
cancel->setDirMove(DIR_UP, arrowDown);
|
|
||||||
cancel->setDirMove(DIR_LEFT, saveSlots[3]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSQ::nextSaveSlotPage()
|
void DSQ::nextSaveSlotPage()
|
||||||
|
|
|
@ -283,8 +283,6 @@ public:
|
||||||
|
|
||||||
bool modIsSelected;
|
bool modIsSelected;
|
||||||
|
|
||||||
void toggleMuffleSound(bool toggle);
|
|
||||||
void toggleInputMode();
|
|
||||||
void shakeCamera(float mag, float time);
|
void shakeCamera(float mag, float time);
|
||||||
Vector avStart;
|
Vector avStart;
|
||||||
Entity *getEntityByName(const std::string &name);
|
Entity *getEntityByName(const std::string &name);
|
||||||
|
|
|
@ -8230,17 +8230,28 @@ luaFunc(getInputMode)
|
||||||
luaReturnInt(dsq->inputMode);
|
luaReturnInt(dsq->inputMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Joystick *_getJoystick(lua_State *L, int idx = 1)
|
||||||
|
{
|
||||||
|
int source = lua_tointeger(L, idx) - 1;
|
||||||
|
if(source < 0)
|
||||||
|
return core->getJoystick(0); // HACK: FIXME: do something sensible instead
|
||||||
|
|
||||||
|
return core->getJoystickForSourceID(source);
|
||||||
|
}
|
||||||
|
|
||||||
luaFunc(getJoystickAxisLeft)
|
luaFunc(getJoystickAxisLeft)
|
||||||
{
|
{
|
||||||
Vector v;// = core->joystick.position;
|
Vector v;
|
||||||
assert(false); // FIXME
|
if(Joystick *j = _getJoystick(L))
|
||||||
|
v = j->position;
|
||||||
luaReturnVec2(v.x, v.y);
|
luaReturnVec2(v.x, v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(getJoystickAxisRight)
|
luaFunc(getJoystickAxisRight)
|
||||||
{
|
{
|
||||||
Vector v;// = core->joystick.rightStick;
|
Vector v;
|
||||||
assert(false); // FIXME
|
if(Joystick *j = _getJoystick(L))
|
||||||
|
v = j->rightStick;
|
||||||
luaReturnVec2(v.x, v.y);
|
luaReturnVec2(v.x, v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3059,9 +3059,9 @@ void Core::clearActionButtons()
|
||||||
actionStatus.clear();
|
actionStatus.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Joystick *Core::getJoystickForSourceID(unsigned sourceID)
|
Joystick *Core::getJoystickForSourceID(int sourceID)
|
||||||
{
|
{
|
||||||
if(sourceID < (unsigned)actionStatus.size())
|
if(unsigned(sourceID+1) < (unsigned)actionStatus.size())
|
||||||
return getJoystick(actionStatus[sourceID]->getJoystickID());
|
return getJoystick(actionStatus[sourceID+1]->getJoystickID());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -564,7 +564,7 @@ public:
|
||||||
Joystick *getJoystick(int idx); // warning: may return NULL/contain holes
|
Joystick *getJoystick(int idx); // warning: may return NULL/contain holes
|
||||||
// not the actual number of joysticks!
|
// not the actual number of joysticks!
|
||||||
size_t getNumJoysticks() const { return joysticks.size(); }
|
size_t getNumJoysticks() const { return joysticks.size(); }
|
||||||
Joystick *getJoystickForSourceID(unsigned sourceID);
|
Joystick *getJoystickForSourceID(int sourceID);
|
||||||
private:
|
private:
|
||||||
std::vector<Joystick*> joysticks;
|
std::vector<Joystick*> joysticks;
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
#define KEY_G SDL_SCANCODE_G
|
#define KEY_G SDL_SCANCODE_G
|
||||||
#define KEY_H SDL_SCANCODE_H
|
#define KEY_H SDL_SCANCODE_H
|
||||||
#define KEY_I SDL_SCANCODE_I
|
#define KEY_I SDL_SCANCODE_I
|
||||||
#define KEY_J SDL_SCANCODE_K
|
#define KEY_J SDL_SCANCODE_J
|
||||||
#define KEY_K SDL_SCANCODE_K
|
#define KEY_K SDL_SCANCODE_K
|
||||||
#define KEY_L SDL_SCANCODE_L
|
#define KEY_L SDL_SCANCODE_L
|
||||||
#define KEY_M SDL_SCANCODE_M
|
#define KEY_M SDL_SCANCODE_M
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue