Mercurial > mm7
diff UI/UiGame.cpp @ 2225:080fd5a5433d
Merge
author | Grumpy7 |
---|---|
date | Wed, 19 Feb 2014 22:30:39 +0100 |
parents | c2eeeb991a87 3f375342de12 |
children | 10c909eb6766 |
line wrap: on
line diff
--- a/UI/UiGame.cpp Wed Feb 19 22:26:10 2014 +0100 +++ b/UI/UiGame.cpp Wed Feb 19 22:30:39 2014 +0100 @@ -308,7 +308,7 @@ } if (sDialogue_SpeakingActorNPC_ID < 0) v9 = 4; - pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 3, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; + pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Dialogue, 3, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3; if (pNPCInfo->Hired() && !pNPCInfo->bHasUsedTheAbility) { if (pNPCInfo->uProfession == 10 || //Healer @@ -686,7 +686,6 @@ { double v3; // st7@1 int v7; // eax@4 - ODMFace *pFace; // eax@6 const char *v14; // eax@8 char *result; // eax@12 unsigned int pMapID; // eax@14 @@ -720,12 +719,11 @@ { for ( uint i = 0; i < (uint)pOutdoor->pBModels[j].uNumFaces; ++i ) { - pFace = &pOutdoor->pBModels[j].pFaces[i]; - if ( pFace->sCogTriggeredID ) + if ( pOutdoor->pBModels[j].pFaces[i].sCogTriggeredID ) { - if ( !(BYTE2(pFace->uAttributes) & 0x10) ) + if ( !(pOutdoor->pBModels[j].pFaces[i].uAttributes & FACE_UNKNOW) ) { - v14 = GetEventHintString(pFace->sCogTriggeredID); + v14 = GetEventHintString(pOutdoor->pBModels[j].pFaces[i].sCogTriggeredID); if ( v14 ) { if ( _stricmp(v14, "") ) @@ -984,7 +982,7 @@ if ( uGameState != GAME_STATE_FINAL_WINDOW ) { - text_y = sub_44100D() != 0 ? 381 : 322; + text_y = _44100D_should_alter_right_panel() != 0 ? 381 : 322; sprintf(pTmpBuf.data(), "\r087%lu", pParty->uNumFoodRations); pPrimaryWindow->DrawText(pFontSmallnum, 0, text_y, uGameUIFontMain, pTmpBuf.data(), 0, 0, uGameUIFontShadow); sprintf(pTmpBuf.data(), "\r028%lu", pParty->uNumGold); @@ -1168,7 +1166,7 @@ pMouse->uPointingObjectID = 0; pMouse->GetClickPos(&pX, &pY); - if ( pX < 0 || pX > 639 || pY < 0 || pY > 479 )//границы окна игры + if ( pX < 0 || pX > window->GetWidth() - 1 || pY < 0 || pY > window->GetHeight() - 1 )//границы окна игры return; if ( pX <= 467 && pY <= 351 )//пределы основной области { @@ -1445,7 +1443,7 @@ } } }//конец пределов основного экрана------------------------ - if ( pX > 467 && pX <=639 && pY <= 479 )//пределы правой области + if ( pX > 467 && pX <= window->GetWidth() - 1 && pY <= window->GetHeight() - 1 )//пределы правой области { if ( pCurrentScreen == SCREEN_GAME ) { @@ -1956,15 +1954,15 @@ for (uint i = 0; i < (uint)pIndoor->pMapOutlines->uNumOutlines; ++i) { BLVMapOutline* pOutline = &pIndoor->pMapOutlines->pOutlines[i]; - BLVFace* pFace1 = pIndoor->pFaces + pOutline->uFace1ID; - BLVFace* pFace2 = pIndoor->pFaces + pOutline->uFace2ID; - if (pFace1->Visible() && pFace2->Visible()) + //BLVFace* pFace1 = &pIndoor->pFaces[pOutline->uFace1ID]; + //BLVFace* pFace2 = &pIndoor->pFaces[pOutline->uFace2ID]; + if (pIndoor->pFaces[pOutline->uFace1ID].Visible() && pIndoor->pFaces[pOutline->uFace2ID].Visible()) { if ( pOutline->uFlags & 1 ) { if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 && - (pFace1->Clickable() || pFace2->Clickable()) && - (pIndoor->pFaceExtras[pFace1->uFaceExtraID].uEventID || pIndoor->pFaceExtras[pFace2->uFaceExtraID].uEventID)) + (pIndoor->pFaces[pOutline->uFace1ID].Clickable() || pIndoor->pFaces[pOutline->uFace2ID].Clickable()) && + (pIndoor->pFaceExtras[pIndoor->pFaces[pOutline->uFace1ID].uFaceExtraID].uEventID || pIndoor->pFaceExtras[pIndoor->pFaces[pOutline->uFace2ID].uFaceExtraID].uEventID)) { if (uNumBlueFacesInBLVMinimap < 49) pBlueFacesInBLVMinimapIDs[uNumBlueFacesInBLVMinimap++] = i; @@ -1982,13 +1980,13 @@ } continue; } - if (pFace1->uAttributes & 0x80 || pFace2->uAttributes & 0x80) + if (pIndoor->pFaces[pOutline->uFace1ID].uAttributes & FACE_UNKNOW4 || pIndoor->pFaces[pOutline->uFace2ID].uAttributes & FACE_UNKNOW4) { pOutline->uFlags = pOutline->uFlags | 1; pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8); if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 && - (pFace1->Clickable() || pFace2->Clickable()) && - (pIndoor->pFaceExtras[pFace1->uFaceExtraID].uEventID || pIndoor->pFaceExtras[pFace2->uFaceExtraID].uEventID)) + (pIndoor->pFaces[pOutline->uFace1ID].Clickable() || pIndoor->pFaces[pOutline->uFace2ID].Clickable()) && + (pIndoor->pFaceExtras[pIndoor->pFaces[pOutline->uFace1ID].uFaceExtraID].uEventID || pIndoor->pFaceExtras[pIndoor->pFaces[pOutline->uFace2ID].uFaceExtraID].uEventID)) { if (uNumBlueFacesInBLVMinimap < 49) pBlueFacesInBLVMinimapIDs[uNumBlueFacesInBLVMinimap++] = i;