comparison UiGame.cpp @ 828:0f56abdcce94

Massive refactors of spells + PID (packed id) macros introduced.
author Nomad
date Wed, 27 Mar 2013 00:27:38 +0200
parents 7bb33867d2cb
children dfd683c4f538
comparison
equal deleted inserted replaced
824:fe4c8b113548 828:0f56abdcce94
583 else 583 else
584 { 584 {
585 v18 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; 585 v18 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
586 } 586 }
587 pMouse->uPointingObjectID = (unsigned __int16)v18; 587 pMouse->uPointingObjectID = (unsigned __int16)v18;
588 v19 = (signed int)(unsigned __int16)v18 >> 3; 588 v19 = (signed)PID_ID(v18);
589 if ( (v18 & 7) == OBJECT_Item ) 589 if (PID_TYPE(v18) == OBJECT_Item)
590 { 590 {
591 v30 = v19; 591 v30 = v19;
592 if ( pObjectList->pObjects[pSpriteObjects[v30].uObjectDescID].uFlags & 0x10 ) 592 if ( pObjectList->pObjects[pSpriteObjects[v30].uObjectDescID].uFlags & 0x10 )
593 //goto LABEL_73; 593 //goto LABEL_73;
594 { 594 {
628 v28 = pTmpBuf; 628 v28 = pTmpBuf;
629 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[470], v31);// "Get %s" 629 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[470], v31);// "Get %s"
630 } 630 }
631 else 631 else
632 { 632 {
633 if ( (v18 & 7) != OBJECT_Actor ) 633 if (PID_TYPE(v18) != OBJECT_Actor)
634 { 634 {
635 if ( (v18 & 7) == OBJECT_Decoration ) 635 if (PID_TYPE(v18) == OBJECT_Decoration)
636 { 636 {
637 v23 = &pLevelDecorations[v19]; 637 v23 = &pLevelDecorations[v19];
638 v24 = v23; 638 v24 = v23;
639 v25 = v23->field_16_event_id; 639 v25 = v23->field_16_event_id;
640 if ( !v25 ) 640 if ( !v25 )
684 } 684 }
685 } 685 }
686 uLastPointedObjectID = pMouse->uPointingObjectID; 686 uLastPointedObjectID = pMouse->uPointingObjectID;
687 return; 687 return;
688 } 688 }
689 if ( (v18 & 7) == OBJECT_BModel) 689 if (PID_TYPE(v18) == OBJECT_BModel)
690 { 690 {
691 if ( v18 < (signed int)0x2000000u ) 691 if ( v18 < (signed int)0x2000000u )
692 { 692 {
693 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) 693 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
694 { 694 {
1440 } 1440 }
1441 if ( pParty->bTurnBasedModeOn == 1 ) 1441 if ( pParty->bTurnBasedModeOn == 1 )
1442 { 1442 {
1443 if ( pTurnEngine->field_4 != 1 ) 1443 if ( pTurnEngine->field_4 != 1 )
1444 { 1444 {
1445 if ( (pTurnEngine->pQueue[0].uPackedID & 7) == OBJECT_Player) 1445 if (PID_TYPE(pTurnEngine->pQueue[0].uPackedID) == OBJECT_Player)
1446 { 1446 {
1447 //v14 = 0; 1447 //v14 = 0;
1448 if ( pTurnEngine->uActorQueueSize > 0 ) 1448 if ( pTurnEngine->uActorQueueSize > 0 )
1449 { 1449 {
1450 //v15 = (char *)pTurnEngine->pQueue; 1450 //v15 = (char *)pTurnEngine->pQueue;
1451 for (uint i = 0; i < pTurnEngine->uActorQueueSize; ++i) 1451 for (uint i = 0; i < pTurnEngine->uActorQueueSize; ++i)
1452 { 1452 {
1453 auto pElem = pTurnEngine->pQueue + i; 1453 auto pElem = pTurnEngine->pQueue + i;
1454 1454
1455 if ( (pElem->uPackedID & 7) != OBJECT_Player) 1455 if (PID_TYPE(pElem->uPackedID) != OBJECT_Player)
1456 break; 1456 break;
1457 v16 = dword_5079D0; 1457 v16 = dword_5079D0;
1458 if ( pParty->uFlags & 0x10 ) 1458 if ( pParty->uFlags & 0x10 )
1459 { 1459 {
1460 v16 = dword_5079CC; 1460 v16 = dword_5079CC;