mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 08:53:51 +00:00
cleanup (this actor clip stuff is really evil -- I have to agree with Kirben, it's totally unclear why they didn't just use the good old virt screen system...
svn-id: r14890
This commit is contained in:
parent
3511e688ab
commit
91a57ad8f5
@ -133,11 +133,8 @@ void Actor::initActor(int mode) {
|
||||
walkScript = 0;
|
||||
talkScript = 0;
|
||||
|
||||
clipOverride.right = _vm->_actorClipRight;
|
||||
clipOverride.left = _vm->_actorClipLeft;
|
||||
clipOverride.top = _vm->_actorClipTop;
|
||||
clipOverride.bottom = _vm->_actorClipBottom;
|
||||
|
||||
clipOverride = _vm->_actorClipOverride;
|
||||
|
||||
_vm->_classData[number] = (_vm->_version >= 7) ? _vm->_classData[0] : 0;
|
||||
}
|
||||
|
||||
|
@ -82,8 +82,12 @@ public:
|
||||
static void initActorClass(ScummEngine *scumm);
|
||||
|
||||
public:
|
||||
/** The position of the actor inside the virtual screen. */
|
||||
Common::Point _pos;
|
||||
|
||||
/** HE specific: This rect is used to clip actor drawing. */
|
||||
Common::Rect clipOverride;
|
||||
|
||||
int offs_x, offs_y;
|
||||
int top, bottom;
|
||||
uint width;
|
||||
|
@ -740,14 +740,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) {
|
||||
v1.scaleXstep = _mirror ? 1 : -1;
|
||||
|
||||
if (_vm->_heversion >= 71) {
|
||||
if (rect.top < _clipOverride.top)
|
||||
rect.top = _clipOverride.top;
|
||||
if (rect.bottom > _clipOverride.bottom)
|
||||
rect.bottom = _clipOverride.bottom;
|
||||
if (rect.left < _clipOverride.left)
|
||||
rect.left = _clipOverride.left;
|
||||
if (rect.right > _clipOverride.right)
|
||||
rect.right = _clipOverride.right;
|
||||
rect.clip(_clipOverride);
|
||||
}
|
||||
|
||||
if (_actorHitMode) {
|
||||
@ -1021,14 +1014,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) {
|
||||
maxh = _outheight;
|
||||
|
||||
if (_vm->_heversion >= 71) {
|
||||
if (clip.top < _clipOverride.top)
|
||||
clip.top = _clipOverride.top;
|
||||
if (clip.bottom > _clipOverride.bottom)
|
||||
clip.bottom = _clipOverride.bottom;
|
||||
if (clip.left < _clipOverride.left)
|
||||
clip.left = _clipOverride.left;
|
||||
if (clip.right > _clipOverride.right)
|
||||
clip.right = _clipOverride.right;
|
||||
clip.clip(_clipOverride);
|
||||
}
|
||||
|
||||
_vm->markRectAsDirty(kMainVirtScreen, clip, _actorID);
|
||||
|
@ -571,18 +571,18 @@ void ScummEngine_v6he::o6_actorOps() {
|
||||
break;
|
||||
case 30:
|
||||
// _heversion >= 70
|
||||
_actorClipBottom = pop();
|
||||
_actorClipRight = pop();
|
||||
_actorClipTop = pop();
|
||||
_actorClipLeft = pop();
|
||||
_actorClipOverride.bottom = pop();
|
||||
_actorClipOverride.right = pop();
|
||||
_actorClipOverride.top = pop();
|
||||
_actorClipOverride.left = pop();
|
||||
warning("o6_actorOps: stub case %d", b);
|
||||
break;
|
||||
case 64:
|
||||
// _heversion >= 72
|
||||
_actorClipBottom = pop();
|
||||
_actorClipRight = pop();
|
||||
_actorClipTop = pop();
|
||||
_actorClipLeft = pop();
|
||||
_actorClipOverride.bottom = pop();
|
||||
_actorClipOverride.right = pop();
|
||||
_actorClipOverride.top = pop();
|
||||
_actorClipOverride.left = pop();
|
||||
warning("o6_actorOps: stub case %d", b);
|
||||
break;
|
||||
case 76: // SO_COSTUME
|
||||
|
@ -654,10 +654,10 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_2byteFontPtr = 0;
|
||||
_V1_talkingActor = 0;
|
||||
|
||||
_actorClipTop = 0;
|
||||
_actorClipBottom = 479;
|
||||
_actorClipLeft = 0;
|
||||
_actorClipRight = 639;
|
||||
_actorClipOverride.top = 0;
|
||||
_actorClipOverride.bottom = 479;
|
||||
_actorClipOverride.left = 0;
|
||||
_actorClipOverride.right = 639;
|
||||
|
||||
_skipDrawObject = 0;
|
||||
_skipProcessActors = 0;
|
||||
|
@ -849,10 +849,7 @@ public:
|
||||
int16 _queueTalkColor[16];
|
||||
byte _queueTalkString[16][128];
|
||||
|
||||
int _actorClipTop;
|
||||
int _actorClipBottom;
|
||||
int _actorClipLeft;
|
||||
int _actorClipRight;
|
||||
Common::Rect _actorClipOverride;
|
||||
|
||||
bool akos_increaseAnims(const byte *akos, Actor *a);
|
||||
bool akos_increaseAnim(Actor *a, int i, const byte *aksq, const uint16 *akfo, int numakfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user