Mercurial > mm7
comparison UI/Books/UIMapBook.cpp @ 2169:5b27c035a241
small cleaning
author | Ritor1 |
---|---|
date | Mon, 20 Jan 2014 00:02:22 +0600 |
parents | 00bd098f6435 |
children | 42c8807225a2 |
comparison
equal
deleted
inserted
replaced
2168:7cd99cb12911 | 2169:5b27c035a241 |
---|---|
431 v93 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX); | 431 v93 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX); |
432 screenHeight = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].y - pCenterY; | 432 screenHeight = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].y - pCenterY; |
433 v20 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].y - pCenterY; | 433 v20 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].y - pCenterY; |
434 v95 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX; | 434 v95 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX; |
435 | 435 |
436 v88 = (unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 436 v88 = fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom); |
437 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 437 v87 = fixpoint_mul(screenHeight, viewparams->uMapBookMapZoom); |
438 v93 = (unsigned __int16 *)((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16); | 438 v93 = (unsigned __int16 *)(fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)); |
439 screenHeight = (unsigned __int64)(v20 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 439 screenHeight = fixpoint_mul(v20, viewparams->uMapBookMapZoom); |
440 pRenderer->RasterLine2D(screenCenter_X + v88, screenCenterY - v87, | 440 pRenderer->RasterLine2D(screenCenter_X + v88, screenCenterY - v87, |
441 screenCenter_X + ((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16), screenCenterY - screenHeight, black); | 441 screenCenter_X + (fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)), screenCenterY - screenHeight, black); |
442 } | 442 } |
443 } | 443 } |
444 } | 444 } |
445 } | 445 } |
446 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) | 446 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 ) |
450 v26 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].x; | 450 v26 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].x; |
451 v27 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].x - pCenterX); | 451 v27 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].x - pCenterX); |
452 v28 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].y - pCenterY; | 452 v28 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].y - pCenterY; |
453 v29 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].y - pCenterY; | 453 v29 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].y - pCenterY; |
454 | 454 |
455 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 455 v87 = fixpoint_mul((signed int)v27, viewparams->uMapBookMapZoom); |
456 v88 = (unsigned __int64)(v28 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 456 v88 = fixpoint_mul(v28, viewparams->uMapBookMapZoom); |
457 uint i = (unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 457 uint i = fixpoint_mul((v26 - pCenterX), viewparams->uMapBookMapZoom); |
458 v95 = (unsigned __int64)(v29 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; | 458 v95 = fixpoint_mul(v29, viewparams->uMapBookMapZoom); |
459 pRenderer->RasterLine2D(screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)viewparams->uMapBookMapZoom) >> 16), | 459 pRenderer->RasterLine2D(screenCenter_X + (fixpoint_mul((signed int)v27, viewparams->uMapBookMapZoom)), |
460 screenCenterY - v88, screenCenter_X + ((unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16), screenCenterY - v95, teal); | 460 screenCenterY - v88, screenCenter_X + (fixpoint_mul((v26 - pCenterX), viewparams->uMapBookMapZoom)), screenCenterY - v95, teal); |
461 } | 461 } |
462 viewparams->sViewCenterX = pCenterX; | 462 viewparams->sViewCenterX = pCenterX; |
463 } | 463 } |
464 } | 464 } |
465 v47 = ((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X - 3; | 465 v47 = (fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X - 3; |
466 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - pCenterY) * (signed __int64)viewparams->uMapBookMapZoom) >> 16); | 466 v97 = (const void *)(fixpoint_mul((pParty->vPosition.y - pCenterY), viewparams->uMapBookMapZoom)); |
467 v48 = 1; | 467 v48 = 1; |
468 v49 = screenCenterY - (int)v97 - 3; | 468 v49 = screenCenterY - (int)v97 - 3; |
469 if ( v47 >= (signed int)tl_x ) | 469 if ( v47 >= (signed int)tl_x ) |
470 { | 470 { |
471 if ( v47 > (signed int)br_x ) | 471 if ( v47 > (signed int)br_x ) |
472 { | 472 { |
473 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X - 6) > (signed int)br_x ) | 473 if ( (signed int)((fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X - 6) > (signed int)br_x ) |
474 v48 = 0; | 474 v48 = 0; |
475 v47 = br_x; | 475 v47 = br_x; |
476 } | 476 } |
477 } | 477 } |
478 else | 478 else |
479 { | 479 { |
480 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X) < (signed int)tl_x ) | 480 if ( (signed int)((fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X) < (signed int)tl_x ) |
481 v48 = 0; | 481 v48 = 0; |
482 v47 = tl_x; | 482 v47 = tl_x; |
483 } | 483 } |
484 if ( v49 >= (signed int)tl_y ) | 484 if ( v49 >= (signed int)tl_y ) |
485 { | 485 { |
523 { | 523 { |
524 if (pLevelDecorations[i].uFlags & LEVEL_DECORATION_VISIBLE_ON_MAP) | 524 if (pLevelDecorations[i].uFlags & LEVEL_DECORATION_VISIBLE_ON_MAP) |
525 { | 525 { |
526 screenHeight = pLevelDecorations[i].vPosition.y - pCenterY; | 526 screenHeight = pLevelDecorations[i].vPosition.y - pCenterY; |
527 v93 = (unsigned __int16 *)(pLevelDecorations[i].vPosition.x - viewparams->sViewCenterX); | 527 v93 = (unsigned __int16 *)(pLevelDecorations[i].vPosition.x - viewparams->sViewCenterX); |
528 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X; | 528 v54 = (fixpoint_mul((signed int)v93, viewparams->uMapBookMapZoom)) + screenCenter_X; |
529 v97 = (const void *)((unsigned __int64)(screenHeight * (signed __int64)viewparams->uMapBookMapZoom) >> 16); | 529 v97 = (const void *)(fixpoint_mul(screenHeight, viewparams->uMapBookMapZoom)); |
530 v55 = screenCenterY - (int)v97; | 530 v55 = screenCenterY - (int)v97; |
531 //if ( v54 >= pRenderer->raster_clip_x && v54 <= pRenderer->raster_clip_z | 531 //if ( v54 >= pRenderer->raster_clip_x && v54 <= pRenderer->raster_clip_z |
532 // && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w ) | 532 // && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w ) |
533 { | 533 { |
534 if ( viewparams->uMapBookMapZoom > 512 ) | 534 if ( viewparams->uMapBookMapZoom > 512 ) |
537 pRenderer->RasterLine2D(v54, v55 - 1, v54, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu)); | 537 pRenderer->RasterLine2D(v54, v55 - 1, v54, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu)); |
538 pRenderer->RasterLine2D(v54 + 1, v55 - 1, v54 + 1, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu)); | 538 pRenderer->RasterLine2D(v54 + 1, v55 - 1, v54 + 1, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu)); |
539 } | 539 } |
540 else | 540 else |
541 pRenderer->RasterLine2D(v54, screenCenterY - (int)v97, | 541 pRenderer->RasterLine2D(v54, screenCenterY - (int)v97, |
542 ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X, | 542 (fixpoint_mul((signed int)v93, viewparams->uMapBookMapZoom)) + screenCenter_X, |
543 screenCenterY - (int)v97, Color16(0xFFu, 0xFFu, 0xFFu)); | 543 screenCenterY - (int)v97, Color16(0xFFu, 0xFFu, 0xFFu)); |
544 } | 544 } |
545 } | 545 } |
546 } | 546 } |
547 } | 547 } |