comparison UI/UIPopup.cpp @ 1980:c1c74df0a33e

changing most of auto types to their actual types
author Grumpy7
date Wed, 30 Oct 2013 00:47:37 -0700
parents 02bc0fac639f
children 33787c8938a5
comparison
equal deleted inserted replaced
1979:92dfa0cafbe3 1980:c1c74df0a33e
574 v110 = pDesc.lpSurface; 574 v110 = pDesc.lpSurface;
575 if (dst_y < dst_w) 575 if (dst_y < dst_w)
576 { 576 {
577 v21 = dst_x; 577 v21 = dst_x;
578 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x]; 578 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x];
579 auto _v22_2 = v22; 579 ushort* _v22_2 = v22;
580 v23 = i - dst_y; 580 v23 = i - dst_y;
581 v115 = i - dst_y; 581 v115 = i - dst_y;
582 while ( 1 ) 582 while ( 1 )
583 { 583 {
584 dst_y = v21; 584 dst_y = v21;
614 { 614 {
615 memset(&pDesc, 0, 0x7Cu); 615 memset(&pDesc, 0, 0x7Cu);
616 pDesc.dwSize = 124; 616 pDesc.dwSize = 124;
617 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT) ) 617 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT) )
618 { 618 {
619 auto src = (unsigned __int16 *)pDesc.lpSurface; 619 ushort* src = (unsigned __int16 *)pDesc.lpSurface;
620 uint num_top_scanlines_above_frame_y = i - dst_y; 620 uint num_top_scanlines_above_frame_y = i - dst_y;
621 for (uint y = dst_y; y < dst_w; ++y) 621 for (uint y = dst_y; y < dst_w; ++y)
622 { 622 {
623 auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; 623 ushort* dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x];
624 624
625 uint src_y = num_top_scanlines_above_frame_y + y; 625 uint src_y = num_top_scanlines_above_frame_y + y;
626 for (uint x = dst_x; x < dst_z; ++x) 626 for (uint x = dst_x; x < dst_z; ++x)
627 { 627 {
628 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x 628 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x
1602 1602
1603 pMouse->GetCursorPos(&cursor); 1603 pMouse->GetCursorPos(&cursor);
1604 int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1; 1604 int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1;
1605 if (item_pid == -1) //added here to avoid crash 1605 if (item_pid == -1) //added here to avoid crash
1606 return; 1606 return;
1607 auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; 1607 ItemGen* item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid];
1608 1608
1609 if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря) 1609 if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря)
1610 { 1610 {
1611 GameUI_DrawItemInfo(item); 1611 GameUI_DrawItemInfo(item);
1612 return; 1612 return;