FULLPIPE: Implement lift_getButtonIdN()

This commit is contained in:
Eugene Sandulenko 2014-01-26 16:27:32 +02:00
parent 704eca2ddf
commit a32f56f9f2
2 changed files with 58 additions and 0 deletions

View File

@ -273,6 +273,7 @@ public:
int lift_getButtonIdP(int objid);
int lift_getButtonIdH(int objid);
int lift_getButtonIdN(int objid);
void lift_setButton(const char *name, int state);
void lift_sub5(Scene *sc, int qu1, int qu2);
void lift_sub7(Scene *sc, int buttonId);

View File

@ -102,6 +102,63 @@ int FullpipeEngine::lift_getButtonIdH(int objid) {
}
}
int FullpipeEngine::lift_getButtonIdN(int objid) {
switch (objid) {
case ST_LBN_0H:
case ST_LBN_0N:
case ST_LBN_0P:
return ST_LBN_0N;
case ST_LBN_1H:
case ST_LBN_1N:
case ST_LBN_1P:
return ST_LBN_1N;
case ST_LBN_2H:
case ST_LBN_2N:
case ST_LBN_2P:
return ST_LBN_2N;
case ST_LBN_3H:
case ST_LBN_3N:
case ST_LBN_3P:
return ST_LBN_3N;
case ST_LBN_4H:
case ST_LBN_4N:
case ST_LBN_4P:
return ST_LBN_4N;
case ST_LBN_5H:
case ST_LBN_5N:
case ST_LBN_5P:
return ST_LBN_5N;
case ST_LBN_6H:
case ST_LBN_6N:
case ST_LBN_6P:
return ST_LBN_6N;
case ST_LBN_7H:
case ST_LBN_7N:
case ST_LBN_7P:
return ST_LBN_7N;
case ST_LBN_8H:
case ST_LBN_8N:
case ST_LBN_8P:
return ST_LBN_8N;
case ST_LBN_9H:
case ST_LBN_9N:
case ST_LBN_9P:
return ST_LBN_9N;
default:
return 0;
}
}
void FullpipeEngine::lift_setButton(const char *name, int state) {
GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);