1 | Index: scummvm/engines/gob/video.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- scummvm/engines/gob/video.cpp (Revision 28653)
|
---|
4 | +++ scummvm/engines/gob/video.cpp (Arbeitskopie)
|
---|
5 | @@ -94,7 +94,6 @@
|
---|
6 | _splitHeight1 = 200;
|
---|
7 | _splitHeight2 = 0;
|
---|
8 | _splitStart = 0;
|
---|
9 | - _lastRetraceLength = 0;
|
---|
10 |
|
---|
11 | _curSparse = 0;
|
---|
12 | _lastSparse = 0xFFFFFFFF;
|
---|
13 | @@ -162,8 +161,6 @@
|
---|
14 | }
|
---|
15 |
|
---|
16 | void Video::retrace(bool mouse) {
|
---|
17 | - uint32 time = _vm->_util->getTimeKey();
|
---|
18 | -
|
---|
19 | if (mouse)
|
---|
20 | CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0);
|
---|
21 | if (_vm->_global->_primarySurfDesc) {
|
---|
22 | @@ -176,13 +173,12 @@
|
---|
23 | _vm->_height - _splitHeight2, _vm->_width, _splitHeight2);
|
---|
24 | g_system->updateScreen();
|
---|
25 | }
|
---|
26 | -
|
---|
27 | - _lastRetraceLength = _vm->_util->getTimeKey() - time;
|
---|
28 | }
|
---|
29 |
|
---|
30 | void Video::waitRetrace(bool mouse) {
|
---|
31 | + uint32 time = _vm->_util->getTimeKey();
|
---|
32 | retrace(mouse);
|
---|
33 | - _vm->_util->delay(MAX(1, 10 - (int) _lastRetraceLength));
|
---|
34 | + _vm->_util->delay(MAX(1, 10 - (int)(_vm->_util->getTimeKey() - time)));
|
---|
35 | }
|
---|
36 |
|
---|
37 | void Video::sparseRetrace(int max) {
|
---|
38 | Index: scummvm/engines/gob/driver_vga.cpp
|
---|
39 | ===================================================================
|
---|
40 | --- scummvm/engines/gob/driver_vga.cpp (Revision 28653)
|
---|
41 | +++ scummvm/engines/gob/driver_vga.cpp (Arbeitskopie)
|
---|
42 | @@ -113,19 +113,27 @@
|
---|
43 | byte *srcPos = source->getVidMem() + (top * source->getWidth()) + left;
|
---|
44 | byte *destPos = dest->getVidMem() + (y * dest->getWidth()) + x;
|
---|
45 |
|
---|
46 | - while (height--) {
|
---|
47 | - if (transp) {
|
---|
48 | + if (transp)
|
---|
49 | + {
|
---|
50 | + while (height--) {
|
---|
51 | for (int16 i = 0; i < width; ++i) {
|
---|
52 | if (srcPos[i])
|
---|
53 | destPos[i] = srcPos[i];
|
---|
54 | - }
|
---|
55 | - } else
|
---|
56 | - for (int16 i = 0; i < width; ++i)
|
---|
57 | - destPos[i] = srcPos[i];
|
---|
58 | + }
|
---|
59 |
|
---|
60 | - srcPos += source->getWidth();
|
---|
61 | - destPos += dest->getWidth();
|
---|
62 | + srcPos += source->getWidth();
|
---|
63 | + destPos += dest->getWidth();
|
---|
64 | + }
|
---|
65 | }
|
---|
66 | + else
|
---|
67 | + {
|
---|
68 | + while (height--) {
|
---|
69 | + memcpy(destPos, srcPos, width);
|
---|
70 | +
|
---|
71 | + srcPos += source->getWidth();
|
---|
72 | + destPos += dest->getWidth();
|
---|
73 | + }
|
---|
74 | + }
|
---|
75 | }
|
---|
76 |
|
---|
77 | void VGAVideoDriver::drawPackedSprite(byte *sprBuf, int16 width, int16 height,
|
---|
78 | Index: scummvm/engines/gob/video.h
|
---|
79 | ===================================================================
|
---|
80 | --- scummvm/engines/gob/video.h (Revision 28653)
|
---|
81 | +++ scummvm/engines/gob/video.h (Arbeitskopie)
|
---|
82 | @@ -104,7 +104,6 @@
|
---|
83 | int16 _splitHeight1;
|
---|
84 | int16 _splitHeight2;
|
---|
85 | int16 _splitStart;
|
---|
86 | - uint32 _lastRetraceLength;
|
---|
87 |
|
---|
88 | void freeDriver();
|
---|
89 | void initPrimary(int16 mode);
|
---|
90 | Index: scummvm/engines/gob/game_v1.cpp
|
---|
91 | ===================================================================
|
---|
92 | --- scummvm/engines/gob/game_v1.cpp (Revision 28653)
|
---|
93 | +++ scummvm/engines/gob/game_v1.cpp (Arbeitskopie)
|
---|
94 | @@ -345,6 +345,7 @@
|
---|
95 | int16 oldIndex;
|
---|
96 | int16 oldId;
|
---|
97 | uint32 timeKey;
|
---|
98 | + bool firstIteration = true;
|
---|
99 |
|
---|
100 | if (deltaTime >= -1) {
|
---|
101 | _lastCollKey = 0;
|
---|
102 | @@ -357,6 +358,8 @@
|
---|
103 |
|
---|
104 | resIndex = 0;
|
---|
105 |
|
---|
106 | + timeKey = _vm->_util->getTimeKey();
|
---|
107 | +
|
---|
108 | if ((_vm->_draw->_cursorIndex == -1) && (handleMouse != 0) &&
|
---|
109 | (_lastCollKey == 0)) {
|
---|
110 | _lastCollKey = checkMousePoint(1, &_lastCollId, &_lastCollAreaIndex);
|
---|
111 | @@ -374,7 +377,6 @@
|
---|
112 | if (handleMouse != 0)
|
---|
113 | _vm->_draw->animateCursor(-1);
|
---|
114 |
|
---|
115 | - timeKey = _vm->_util->getTimeKey();
|
---|
116 | while (1) {
|
---|
117 | if (_vm->_inter->_terminate) {
|
---|
118 | if (handleMouse)
|
---|
119 | @@ -395,7 +397,7 @@
|
---|
120 | // Additionally, I added a 'deltaTime == -1' check there, since
|
---|
121 | // when this function is called with deltaTime == -1 in inputArea,
|
---|
122 | // and the return value is then discarded.
|
---|
123 | - if (deltaTime < 0) {
|
---|
124 | + if (deltaTime < 0 && !firstIteration) {
|
---|
125 | uint32 curtime = _vm->_util->getTimeKey();
|
---|
126 | if ((deltaTime == -1) || ((curtime + deltaTime) > timeKey)) {
|
---|
127 | if (pResId != 0)
|
---|
128 | @@ -538,7 +540,10 @@
|
---|
129 | if (handleMouse != 0)
|
---|
130 | _vm->_draw->animateCursor(-1);
|
---|
131 |
|
---|
132 | - _vm->_util->delay(10);
|
---|
133 | + if (deltaTime < -10)
|
---|
134 | + _vm->_util->delay(10);
|
---|
135 | +
|
---|
136 | + firstIteration = false;
|
---|
137 | }
|
---|
138 | }
|
---|
139 |
|
---|
140 | @@ -617,7 +622,7 @@
|
---|
141 | int16 var_26;
|
---|
142 | int16 collStackPos;
|
---|
143 | Collision *collPtr;
|
---|
144 | - int16 timeKey;
|
---|
145 | + uint32 timeKey;
|
---|
146 | byte *savedIP;
|
---|
147 |
|
---|
148 | if (_shouldPushColls)
|
---|
149 | @@ -910,9 +915,9 @@
|
---|
150 |
|
---|
151 | _shouldPushColls = 0;
|
---|
152 | _vm->_global->_inter_execPtr = savedIP;
|
---|
153 | +
|
---|
154 | deltaTime = timeVal -
|
---|
155 | - ((_vm->_util->getTimeKey() - timeKey)
|
---|
156 | - - _vm->_video->_lastRetraceLength);
|
---|
157 | + (_vm->_util->getTimeKey() - timeKey);
|
---|
158 |
|
---|
159 | if (deltaTime < 2)
|
---|
160 | deltaTime = 2;
|
---|