Changeset 15 for trunk/src/helpers/animate.c
- Timestamp:
- Dec 11, 2000, 8:54:20 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/animate.c
r14 r15 41 41 #define INCL_DOSDEVICES 42 42 #define INCL_DOSDEVIOCTL 43 #define INCL_DOSMISC 43 44 #define INCL_DOSERRORS 44 45 … … 58 59 #include "helpers\animate.h" 59 60 60 #include "helpers\datetime.h"61 61 #include "helpers\winh.h" 62 62 #include "helpers\gpih.h" … … 85 85 * Returns the count of animation steps that were drawn. 86 86 * This is dependent on the speed of the system. 87 * 88 *@@changed V0.9.7 (2000-12-08) [umoeller]: got rid of dtGetULongTime 87 89 */ 88 90 … … 122 124 // 2) since large bitmaps take more time to calculate, 123 125 // the animation won't appear to slow down then 124 ulInitialTime = dtGetULongTime(); 126 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, 127 &ulInitialTime, 128 sizeof(ulInitialTime)); 125 129 ul = 1; 126 130 ulSteps = 1000; … … 137 141 DBM_STRETCH); 138 142 139 ulNowTime = dtGetULongTime(); 143 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, 144 &ulNowTime, 145 sizeof(ulNowTime)); 140 146 141 147 // recalculate ul: rule of three based on the … … 175 181 * been acquired using WinGetScreenPS, 176 182 * ulSteps should be around 40-50. 183 * 184 *@@changed V0.9.7 (2000-12-08) [umoeller]: got rid of dtGetULongTime 177 185 */ 178 186 … … 195 203 ulPhase = 1; 196 204 197 do { 198 ULONG ulFromTime = dtGetULongTime(); 205 do 206 { 207 ULONG ulFromTime, ulTime2; 208 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, 209 &ulFromTime, 210 sizeof(ulFromTime)); 199 211 200 212 if (ulPhase == 1) … … 225 237 rclNow.yTop = (rclScreen.yTop) - rclNow.yBottom; 226 238 227 if (rclNow.yBottom > (rclNow.yTop - LAST_WIDTH) ) { 239 if (rclNow.yBottom > (rclNow.yTop - LAST_WIDTH) ) 240 { 228 241 rclNow.yBottom = (rclScreen.yTop / 2) - LAST_WIDTH; 229 242 rclNow.yTop = (rclScreen.yTop / 2) + LAST_WIDTH; … … 262 275 263 276 // done with "shrinking"? 264 if ( rclNow.xRight < ((rclScreen.xRight / 2) + LAST_WIDTH) ) {277 if ( rclNow.xRight < ((rclScreen.xRight / 2) + LAST_WIDTH) ) 265 278 ulPhase = 2; // exit 266 267 268 } else if (ulPhase == 2){279 } 280 else if (ulPhase == 2) 281 { 269 282 // Phase 2: draw a horizontal white line about 270 283 // where the last rclNow was. This is only … … 290 303 ul = 0; 291 304 292 } else if (ulPhase == 3) { 305 } 306 else if (ulPhase == 3) 307 { 293 308 // Phase 3: make the white line shorter with 294 309 // every iteration by drawing black rectangles … … 324 339 325 340 ul++; 326 if (ul > LAST_STEPS) {341 if (ul > LAST_STEPS) 327 342 ulPhase = 99; 328 }329 343 } 330 344 331 345 ul++; 332 346 333 while (dtGetULongTime() < ulFromTime + WAIT_TIME) { 334 // PSZ p = NULL; // keep compiler happy 335 } 347 DosSleep(WAIT_TIME); 348 349 /* do 350 { 351 DosSleep(0); 352 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, 353 &ulTime2, 354 sizeof(ulTime2)); 355 } while (ulTime2 < ulFromTime + WAIT_TIME); */ 336 356 } while (ulPhase != 99); 337 357
Note:
See TracChangeset
for help on using the changeset viewer.