SCI: only use xLast/yLast in kDoBresen for sci1middle+ only. qfg1 ega has those selector names, but doesn't use them inside mover objects

svn-id: r50933
This commit is contained in:
Martin Kiewitz 2010-07-16 09:51:57 +00:00
parent 3473e8c6da
commit 5356a61338

View File

@ -267,10 +267,12 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
bdelta = (int16)readSelectorValue(segMan, mover, SELECTOR(b_incr));
axis = (int16)readSelectorValue(segMan, mover, SELECTOR(b_xAxis));
if (SELECTOR(xLast) != -1) {
// Introduced SCI1MIDDLE (it seems) - save last position into mover
writeSelectorValue(segMan, mover, SELECTOR(xLast), x);
writeSelectorValue(segMan, mover, SELECTOR(yLast), y);
if ((getSciVersion() >= SCI_VERSION_1_MIDDLE)) {
if (SELECTOR(xLast) != -1) {
// Introduced SCI1MIDDLE (it seems) - save last position into mover
writeSelectorValue(segMan, mover, SELECTOR(xLast), x);
writeSelectorValue(segMan, mover, SELECTOR(yLast), y);
}
}
//printf("movecnt %d, move speed %d\n", movcnt, max_movcnt);