void AGOSEngine_PuzzlePack::startAnOverlayAnim() { VgaSprite *vsp = _vgaSprites; const byte *vcPtrOrg; uint16 a, sprite, file, tmp, zoneNum; int16 x; zoneNum = _variableArray[999]; _vcPtr += 4; a = vcReadNextWord(); _vcPtr += 6; while (vsp->id) vsp++; vsp->windowNum = 4; vsp->priority = 20; vsp->flags = 0; vsp->palette = 0; vsp->image = vcReadVar(vcReadVar(a)); x = vcReadVar(a) - 1300; if (x < 0) { x += 300; vsp->priority = 10; } vsp->y = x / 20 * 32; vsp->x = x % 20 * 32; vsp->id = vcReadVar(a); vsp->zoneNum = zoneNum; sprite = _vgaCurSpriteId; file = _vgaCurZoneNum; _vgaCurZoneNum = vsp->zoneNum; _vgaCurSpriteId = vsp->id; tmp = to16Wrapper(vsp->priority); vcPtrOrg = _vcPtr; _vcPtr = (byte *)&tmp; vc23_setPriority(); _vcPtr = vcPtrOrg; _vgaCurSpriteId = sprite; _vgaCurZoneNum = file; }
void AGOSEngine::vc58_changePriority() { uint16 sprite = _vgaCurSpriteId; uint16 file = _vgaCurZoneNum; const byte *vcPtrOrg; uint16 tmp; _vgaCurZoneNum = vcReadNextWord(); _vgaCurSpriteId = vcReadNextWord(); tmp = to16Wrapper(vcReadNextWord()); vcPtrOrg = _vcPtr; _vcPtr = (byte *)&tmp; vc23_setPriority(); _vcPtr = vcPtrOrg; _vgaCurSpriteId = sprite; _vgaCurZoneNum = file; }