Ticket #8570: kyra1-intro.diff
File kyra1-intro.diff, 1.6 KB (added by , 18 years ago) |
---|
-
engines/kyra/sequences_v1.cpp
151 151 if (_quitFlag) 152 152 return; 153 153 154 int y1 = 8; 155 int h1 = 175; 156 int y2 = 176; 157 int h2 = 0; 158 int32 start, now; 159 int wait; 160 _screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 2); 161 _screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 2); 154 _screen->copyRegion(0, 91, 0, 8, 320, 104, 6, 2); 155 _screen->copyRegion(0, 0, 0, 112, 320, 64, 6, 2); 156 157 uint32 start = _system->getMillis(); 158 bool doneFlag = false; 159 int oldDistance = 0; 160 162 161 do { 163 start = (int32)_system->getMillis(); 164 if (h1 > 0) { 162 uint32 now = _system->getMillis(); 163 164 // The smallest y2 we ever draw the screen for is 65. 165 int distance = (now - start) / _tickLength; 166 if (distance > 112) { 167 distance = 112; 168 doneFlag = true; 169 } 170 171 if (distance > oldDistance) { 172 int y1 = 8 + distance; 173 int h1 = 168 - distance; 174 int y2 = 176 - distance; 175 int h2 = distance; 176 165 177 _screen->copyRegion(0, y1, 0, 8, 320, h1, 2, 0); 178 if (h2 > 0) 179 _screen->copyRegion(0, 64, 0, y2, 320, h2, 4, 0); 180 _screen->updateScreen(); 166 181 } 167 ++y1;168 --h1;169 if (h2 > 0) {170 _screen->copyRegion(0, 64, 0, y2, 320, h2, 4, 0);171 }172 --y2;173 ++h2;174 _screen->updateScreen();175 now = (int32)_system->getMillis();176 wait = _tickLength - (now - start);177 if (wait > 0) {178 delay(wait);179 }180 } while (y2 >= 64 && !_quitFlag && !_abortIntroFlag);181 182 183 oldDistance = distance; 184 delay(10); 185 } while (!doneFlag && !_quitFlag && !_abortIntroFlag); 186 182 187 if (_quitFlag) 183 188 return; 184 189