FULLPIPE: Implement FullpipeEngine::processArcade()
This commit is contained in:
parent
aad1d556d6
commit
fd8eb9a0e3
2 changed files with 33 additions and 4 deletions
|
@ -275,6 +275,8 @@ void FullpipeEngine::updateCursorCommon() {
|
|||
}
|
||||
|
||||
void FullpipeEngine::initArcadeKeys(const char *varname) {
|
||||
_arcadeKeys.clear();
|
||||
|
||||
GameVar *var = getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("KEYPOS");
|
||||
|
||||
if (!var)
|
||||
|
@ -294,6 +296,37 @@ void FullpipeEngine::initArcadeKeys(const char *varname) {
|
|||
}
|
||||
}
|
||||
|
||||
void FullpipeEngine::processArcade(ExCommand *cmd) {
|
||||
if (!g_fp->_aniMan2)
|
||||
return;
|
||||
|
||||
int idx;
|
||||
|
||||
if (cmd->_sceneClickX <= g_fp->_aniMan2->_ox) {
|
||||
for (idx = _arcadeKeys.size() - 1; idx >= 0; idx--) {
|
||||
if (_arcadeKeys[idx]->x < g_fp->_aniMan2->_ox)
|
||||
break;
|
||||
}
|
||||
|
||||
if (idx < 0)
|
||||
return;
|
||||
} else {
|
||||
for (idx = 0; idx < _arcadeKeys.size(); idx++) {
|
||||
if (_arcadeKeys[idx]->x > g_fp->_aniMan2->_ox)
|
||||
break;
|
||||
}
|
||||
|
||||
if (idx >= _arcadeKeys.size())
|
||||
return;
|
||||
}
|
||||
|
||||
cmd->_sceneClickX = _arcadeKeys[idx]->x;
|
||||
cmd->_sceneClickY = _arcadeKeys[idx]->y;
|
||||
|
||||
cmd->_x = cmd->_sceneClickX - g_fp->_sceneRect.left;
|
||||
cmd->_y = cmd->_sceneClickY - g_fp->_sceneRect.top;
|
||||
}
|
||||
|
||||
void FullpipeEngine::setArcadeOverlay(int picId) {
|
||||
Common::Point point;
|
||||
Common::Point point2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue