int FWScript::o2_unloadMask22() { byte param = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: removeOverlay22(%d)", _line, param); removeOverlay(param, 22); return 0; }
void setupObject(byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4) { g_cine->_objectTable[objIdx].x = param1; g_cine->_objectTable[objIdx].y = param2; g_cine->_objectTable[objIdx].mask = param3; g_cine->_objectTable[objIdx].frame = param4; if (g_cine->getGameType() == Cine::GType_OS) { resetGfxEntityEntry(objIdx); } else { // Future Wars if (removeOverlay(objIdx, 0)) { addOverlay(objIdx, 0); } } }
void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { // Operation Stealth checks object index range, Future Wars doesn't. if (g_cine->getGameType() == Cine::GType_OS && objIdx >= NUM_MAX_OBJECT) return; switch (paramIdx) { case 1: g_cine->_objectTable[objIdx].x = newValue; break; case 2: g_cine->_objectTable[objIdx].y = newValue; break; case 3: g_cine->_objectTable[objIdx].mask = newValue; if (g_cine->getGameType() == Cine::GType_OS) { // Operation Stealth specific resetGfxEntityEntry(objIdx); } else { // Future Wars specific if (removeOverlay(objIdx, 0)) { addOverlay(objIdx, 0); } } break; case 4: g_cine->_objectTable[objIdx].frame = newValue; break; case 5: // TODO: Test if this really breaks the newspaper machine on the airport in Operation Stealth. if (g_cine->getGameType() == Cine::GType_FW && newValue == -1) { g_cine->_objectTable[objIdx].costume = g_cine->_globalVars[0]; } else { g_cine->_objectTable[objIdx].costume = newValue; } break; case 6: g_cine->_objectTable[objIdx].part = newValue; break; } }