Mercurial > mm7
comparison mm7_4.cpp @ 296:af7e848d6def
Merge
author | Nomad |
---|---|
date | Tue, 19 Feb 2013 13:31:50 +0200 |
parents | 640a176c030f 0ea5fbd16edb |
children | 0f2541245f65 3dcc9d945eeb |
comparison
equal
deleted
inserted
replaced
295:640a176c030f | 296:af7e848d6def |
---|---|
3087 sprintf(pContainer, "NPC%03d", pParty->pHirelings[(unsigned __int8)v7].uPortraitID); | 3087 sprintf(pContainer, "NPC%03d", pParty->pHirelings[(unsigned __int8)v7].uPortraitID); |
3088 v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 3088 v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
3089 v9 = v23; | 3089 v9 = v23; |
3090 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0)); | 3090 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0)); |
3091 v10 = (unsigned __int8)pTmpBuf[i]; | 3091 v10 = (unsigned __int8)pTmpBuf[i]; |
3092 if ( pParty->pHirelings[v10].bDrawSomeAnim == 1 ) | 3092 if ( pParty->pHirelings[v10].evt_A == 1 ) |
3093 { | 3093 { |
3094 uFrameID = pParty->pHirelings[v10]._anim_current_time; | 3094 uFrameID = pParty->pHirelings[v10].evt_B; |
3095 v11 = pHiredNPCsIconsOffsetsX[v9]; | 3095 v11 = pHiredNPCsIconsOffsetsX[v9]; |
3096 v12 = pHiredNPCsIconsOffsetsY[v9]; | 3096 v12 = pHiredNPCsIconsOffsetsY[v9]; |
3097 v17 = v11; | 3097 v17 = v11; |
3098 v21 = 0; | 3098 v21 = 0; |
3099 if ( (signed int)pIconsFrameTable->uNumIcons <= 0 ) | 3099 if ( (signed int)pIconsFrameTable->uNumIcons <= 0 ) |
5540 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed" | 5540 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed" |
5541 LOWORD(v34) = player->GetStatColor(5); | 5541 LOWORD(v34) = player->GetStatColor(5); |
5542 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0); | 5542 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0); |
5543 v35 = player->GetActualLuck(); | 5543 v35 = player->GetActualLuck(); |
5544 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck" | 5544 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck" |
5545 LOWORD(v36) = player->GetStatColor(6u); | 5545 LOWORD(v36) = player->GetStatColor(6); |
5546 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0); | 5546 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0); |
5547 v37 = player->GetSkillIdxByOrder(0); | 5547 v37 = player->GetSkillIdxByOrder(0); |
5548 pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]); | 5548 pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]); |
5549 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v37]); | 5549 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v37]); |
5550 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0); | 5550 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0); |
9414 v2 = array_5913D8[(unsigned int)((char *)array_5913D8[6] + -(dword_591080 != 0) - 1)]; | 9414 v2 = array_5913D8[(unsigned int)((char *)array_5913D8[6] + -(dword_591080 != 0) - 1)]; |
9415 if ( a1 <= 23 ) | 9415 if ( a1 <= 23 ) |
9416 { | 9416 { |
9417 if ( a1 == 23 ) | 9417 if ( a1 == 23 ) |
9418 { | 9418 { |
9419 v3 = v2->evte; | 9419 v3 = v2->evt_E; |
9420 } | 9420 } |
9421 else | 9421 else |
9422 { | 9422 { |
9423 if ( a1 == 13 ) | 9423 if ( a1 == 13 ) |
9424 { | 9424 { |
9425 ptr_F8B1E8 = (char *)*(&pNPCStats->field_13A64 + 5 * v2->uProfession); | 9425 ptr_F8B1E8 = pNPCStats->pProfessions[v2->uProfession].pJoinText;//(char *)*(&pNPCStats->field_13A64 + 5 * v2->uProfession); |
9426 ptr_F8B1E8 = BuilDialogueString((char *)ptr_F8B1E8, uActiveCharacter - 1, 0, 0, 0, 0); | 9426 ptr_F8B1E8 = BuilDialogueString((char *)ptr_F8B1E8, uActiveCharacter - 1, 0, 0, 0, 0); |
9427 sub_4B40E6(); | 9427 sub_4B40E6(); |
9428 dialogue_show_profession_details = false; | 9428 dialogue_show_profession_details = false; |
9429 goto _return; | 9429 goto _return; |
9430 } | 9430 } |
9431 switch ( a1 ) | 9431 switch ( a1 ) |
9432 { | 9432 { |
9433 case 19: | 9433 case 19: |
9434 v3 = v2->bDrawSomeAnim; | 9434 v3 = v2->evt_A; |
9435 break; | 9435 break; |
9436 case 20: | 9436 case 20: |
9437 v3 = v2->_anim_current_time; | 9437 v3 = v2->evt_B; |
9438 break; | 9438 break; |
9439 case 21: | 9439 case 21: |
9440 v3 = v2->_anim_end_time; | 9440 v3 = v2->evt_C; |
9441 break; | 9441 break; |
9442 default: | 9442 default: |
9443 if ( a1 != 22 ) | 9443 if ( a1 != 22 ) |
9444 goto _return; | 9444 goto _return; |
9445 v3 = v2->evtd; | 9445 v3 = v2->evt_D; |
9446 break; | 9446 break; |
9447 } | 9447 } |
9448 } | 9448 } |
9449 goto LABEL_84; | 9449 goto LABEL_84; |
9450 } | 9450 } |
9451 if ( a1 == 24 ) | 9451 if ( a1 == 24 ) |
9452 { | 9452 { |
9453 v3 = v2->evtf; | 9453 v3 = v2->evt_F; |
9454 LABEL_84: | 9454 LABEL_84: |
9455 if ( v3 < 200 || v3 > 310 ) | 9455 if ( v3 < 200 || v3 > 310 ) |
9456 { | 9456 { |
9457 if ( v3 < 400 || v3 > 410 ) | 9457 if ( v3 < 400 || v3 > 410 ) |
9458 { | 9458 { |
9551 } | 9551 } |
9552 while ( (signed int)v4 < (signed int)pParty->pHirelings ); | 9552 while ( (signed int)v4 < (signed int)pParty->pHirelings ); |
9553 switch ( dword_F8B1D8 ) | 9553 switch ( dword_F8B1D8 ) |
9554 { | 9554 { |
9555 case 19: | 9555 case 19: |
9556 v10 = v2->bDrawSomeAnim; | 9556 v10 = v2->evt_A; |
9557 if ( (signed int)v10 >= 400 && (signed int)v10 <= 416 ) | 9557 if ( (signed int)v10 >= 400 && (signed int)v10 <= 416 ) |
9558 v2->bDrawSomeAnim = 0; | 9558 v2->evt_A = 0; |
9559 break; | 9559 break; |
9560 case 20: | 9560 case 20: |
9561 v9 = v2->_anim_current_time; | 9561 v9 = v2->evt_B; |
9562 if ( v9 >= 400 && v9 <= 416 ) | 9562 if ( v9 >= 400 && v9 <= 416 ) |
9563 v2->_anim_current_time = 0; | 9563 v2->evt_B = 0; |
9564 break; | 9564 break; |
9565 case 21: | 9565 case 21: |
9566 v8 = v2->_anim_end_time; | 9566 v8 = v2->evt_C; |
9567 if ( v8 >= 400 && v8 <= 416 ) | 9567 if ( v8 >= 400 && v8 <= 416 ) |
9568 v2->_anim_end_time = 0; | 9568 v2->evt_C = 0; |
9569 break; | 9569 break; |
9570 case 22: | 9570 case 22: |
9571 v7 = v2->evtd; | 9571 v7 = v2->evt_D; |
9572 if ( v7 >= 400 && v7 <= 416 ) | 9572 if ( v7 >= 400 && v7 <= 416 ) |
9573 v2->evtd = 0; | 9573 v2->evt_D = 0; |
9574 break; | 9574 break; |
9575 case 23: | 9575 case 23: |
9576 v6 = v2->evte; | 9576 v6 = v2->evt_E; |
9577 if ( v6 >= 400 && v6 <= 416 ) | 9577 if ( v6 >= 400 && v6 <= 416 ) |
9578 v2->evte = 0; | 9578 v2->evt_E = 0; |
9579 break; | 9579 break; |
9580 case 24: | 9580 case 24: |
9581 v5 = v2->evtf; | 9581 v5 = v2->evt_F; |
9582 if ( v5 >= 400 ) | 9582 if ( v5 >= 400 ) |
9583 { | 9583 { |
9584 if ( v5 <= 416 ) | 9584 if ( v5 <= 416 ) |
9585 v2->evtf = 0; | 9585 v2->evt_F = 0; |
9586 } | 9586 } |
9587 break; | 9587 break; |
9588 } | 9588 } |
9589 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 9589 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
9590 { | 9590 { |
10226 } | 10226 } |
10227 else | 10227 else |
10228 { | 10228 { |
10229 if ( v17 == 24 ) | 10229 if ( v17 == 24 ) |
10230 { | 10230 { |
10231 v23 = v58->evtf; | 10231 v23 = v58->evt_F; |
10232 LABEL_33: | 10232 LABEL_33: |
10233 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; | 10233 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; |
10234 if ( !v15 ) | 10234 if ( !v15 ) |
10235 { | 10235 { |
10236 v16->uControlParam = 0; | 10236 v16->uControlParam = 0; |
10242 if ( v18 ) | 10242 if ( v18 ) |
10243 { | 10243 { |
10244 v19 = v18 - 6; | 10244 v19 = v18 - 6; |
10245 if ( !v19 ) | 10245 if ( !v19 ) |
10246 { | 10246 { |
10247 v23 = v58->bDrawSomeAnim; | 10247 v23 = v58->evt_A; |
10248 goto LABEL_33; | 10248 goto LABEL_33; |
10249 } | 10249 } |
10250 v20 = v19 - 1; | 10250 v20 = v19 - 1; |
10251 if ( !v20 ) | 10251 if ( !v20 ) |
10252 { | 10252 { |
10253 v15 = (char *)pNPCTopics[v58->_anim_current_time-1].pTopic;//(&dword_721660)[8 * v58->evtb]; | 10253 v15 = (char *)pNPCTopics[v58->evt_B-1].pTopic;//(&dword_721660)[8 * v58->evtb]; |
10254 if ( !v15 ) | 10254 if ( !v15 ) |
10255 { | 10255 { |
10256 v16->uControlParam = 0; | 10256 v16->uControlParam = 0; |
10257 v15 = ""; | 10257 v15 = ""; |
10258 } | 10258 } |
10264 goto LABEL_45; | 10264 goto LABEL_45; |
10265 } | 10265 } |
10266 v21 = v20 - 1; | 10266 v21 = v20 - 1; |
10267 if ( !v21 ) | 10267 if ( !v21 ) |
10268 { | 10268 { |
10269 v23 = v58->_anim_end_time; | 10269 v23 = v58->evt_C; |
10270 goto LABEL_33; | 10270 goto LABEL_33; |
10271 } | 10271 } |
10272 v22 = v21 - 1; | 10272 v22 = v21 - 1; |
10273 if ( !v22 ) | 10273 if ( !v22 ) |
10274 { | 10274 { |
10275 v23 = v58->evtd; | 10275 v23 = v58->evt_D; |
10276 goto LABEL_33; | 10276 goto LABEL_33; |
10277 } | 10277 } |
10278 if ( v22 == 1 ) | 10278 if ( v22 == 1 ) |
10279 { | 10279 { |
10280 v23 = v58->evte; | 10280 v23 = v58->evt_E; |
10281 goto LABEL_33; | 10281 goto LABEL_33; |
10282 } | 10282 } |
10283 LABEL_41: | 10283 LABEL_41: |
10284 v15 = ""; | 10284 v15 = ""; |
10285 goto LABEL_49; | 10285 goto LABEL_49; |
11050 v0 = GetNPCData(uDialogue_SpeakingActorNPC_ID); | 11050 v0 = GetNPCData(uDialogue_SpeakingActorNPC_ID); |
11051 v1 = 0; | 11051 v1 = 0; |
11052 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 11052 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
11053 pDialogueWindow->Release(); | 11053 pDialogueWindow->Release(); |
11054 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 1, 0); | 11054 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 1, 0); |
11055 if ( *(&pNPCStats->field_13A5C + 5 * v0->uProfession) ) | 11055 if ( pNPCStats->pProfessions[v0->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v0->uProfession) ) |
11056 { | 11056 { |
11057 pDialogueWindow->CreateButton(480, 160, 140, 28, 1, 0, 136, 77, 0, pGlobalTXT_LocalizationStrings[407], 0); | 11057 pDialogueWindow->CreateButton(480, 160, 140, 28, 1, 0, 136, 77, 0, pGlobalTXT_LocalizationStrings[407], 0); |
11058 v1 = 1; | 11058 v1 = 1; |
11059 } | 11059 } |
11060 pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0, 136, 76, 0, pGlobalTXT_LocalizationStrings[406], 0);//Нанять | 11060 pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0, 136, 76, 0, pGlobalTXT_LocalizationStrings[406], 0);//Нанять |
11161 0, | 11161 0, |
11162 pGlobalTXT_LocalizationStrings[34], | 11162 pGlobalTXT_LocalizationStrings[34], |
11163 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), | 11163 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), |
11164 0); | 11164 0); |
11165 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); | 11165 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); |
11166 if ( *(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) | 11166 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) |
11167 { | 11167 { |
11168 pDialogueWindow->CreateButton( | 11168 pDialogueWindow->CreateButton( |
11169 0x1E0u, | 11169 0x1E0u, |
11170 0xA0u, | 11170 0xA0u, |
11171 0x8Cu, | 11171 0x8Cu, |
11301 if ( v17->joins ) | 11301 if ( v17->joins ) |
11302 { | 11302 { |
11303 v1 = 1; | 11303 v1 = 1; |
11304 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0xAFu, 0xDu, 0, "", 0); | 11304 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0xAFu, 0xDu, 0, "", 0); |
11305 } | 11305 } |
11306 v5 = (void *)v17->bDrawSomeAnim; | 11306 v5 = (void *)v17->evt_A; |
11307 if ( v5 ) | 11307 if ( v5 ) |
11308 { | 11308 { |
11309 if ( v1 < 4 ) | 11309 if ( v1 < 4 ) |
11310 { | 11310 { |
11311 v6 = sub_4466C4(v5); | 11311 v6 = sub_4466C4(v5); |
11322 0, | 11322 0, |
11323 "", | 11323 "", |
11324 0); | 11324 0); |
11325 } | 11325 } |
11326 } | 11326 } |
11327 v7 = (void *)v17->_anim_current_time; | 11327 v7 = (void *)v17->evt_B; |
11328 if ( v7 ) | 11328 if ( v7 ) |
11329 { | 11329 { |
11330 if ( v1 < 4 ) | 11330 if ( v1 < 4 ) |
11331 { | 11331 { |
11332 v8 = sub_4466C4(v7); | 11332 v8 = sub_4466C4(v7); |
11343 0, | 11343 0, |
11344 "", | 11344 "", |
11345 0); | 11345 0); |
11346 } | 11346 } |
11347 } | 11347 } |
11348 v9 = (void *)v17->_anim_end_time; | 11348 v9 = (void *)v17->evt_C; |
11349 if ( v9 ) | 11349 if ( v9 ) |
11350 { | 11350 { |
11351 if ( v1 < 4 ) | 11351 if ( v1 < 4 ) |
11352 { | 11352 { |
11353 v10 = sub_4466C4(v9); | 11353 v10 = sub_4466C4(v9); |
11364 0, | 11364 0, |
11365 "", | 11365 "", |
11366 0); | 11366 0); |
11367 } | 11367 } |
11368 } | 11368 } |
11369 v11 = (void *)v17->evtd; | 11369 v11 = (void *)v17->evt_D; |
11370 if ( v11 ) | 11370 if ( v11 ) |
11371 { | 11371 { |
11372 if ( v1 < 4 ) | 11372 if ( v1 < 4 ) |
11373 { | 11373 { |
11374 v12 = sub_4466C4(v11); | 11374 v12 = sub_4466C4(v11); |
11385 0, | 11385 0, |
11386 "", | 11386 "", |
11387 0); | 11387 0); |
11388 } | 11388 } |
11389 } | 11389 } |
11390 v13 = (void *)v17->evte; | 11390 v13 = (void *)v17->evt_E; |
11391 if ( v13 ) | 11391 if ( v13 ) |
11392 { | 11392 { |
11393 if ( v1 < 4 ) | 11393 if ( v1 < 4 ) |
11394 { | 11394 { |
11395 v14 = sub_4466C4(v13); | 11395 v14 = sub_4466C4(v13); |
11406 0, | 11406 0, |
11407 "", | 11407 "", |
11408 0); | 11408 0); |
11409 } | 11409 } |
11410 } | 11410 } |
11411 v15 = (void *)v17->evtf; | 11411 v15 = (void *)v17->evt_F; |
11412 if ( v15 ) | 11412 if ( v15 ) |
11413 { | 11413 { |
11414 if ( v1 < 4 ) | 11414 if ( v1 < 4 ) |
11415 { | 11415 { |
11416 v16 = sub_4466C4(v15); | 11416 v16 = sub_4466C4(v15); |
12565 } | 12565 } |
12566 if ( (signed int)newDialogueType > 22 ) | 12566 if ( (signed int)newDialogueType > 22 ) |
12567 { | 12567 { |
12568 if ( newDialogueType == DIALOGUE_23 ) | 12568 if ( newDialogueType == DIALOGUE_23 ) |
12569 { | 12569 { |
12570 v4 = v2->evte; | 12570 v4 = v2->evt_E; |
12571 goto LABEL_74; | 12571 goto LABEL_74; |
12572 } | 12572 } |
12573 if (newDialogueType == DIALOGUE_24) | 12573 if (newDialogueType == DIALOGUE_24) |
12574 { | 12574 { |
12575 v4 = v2->evtf; | 12575 v4 = v2->evt_F; |
12576 goto LABEL_74; | 12576 goto LABEL_74; |
12577 } | 12577 } |
12578 if (newDialogueType != DIALOGUE_76) | 12578 if (newDialogueType != DIALOGUE_76) |
12579 { | 12579 { |
12580 if (newDialogueType == DIALOGUE_PROFESSION_DETAILS) | 12580 if (newDialogueType == DIALOGUE_PROFESSION_DETAILS) |
12689 pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0); | 12689 pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0); |
12690 goto LABEL_87; | 12690 goto LABEL_87; |
12691 } | 12691 } |
12692 if (newDialogueType == DIALOGUE_22) | 12692 if (newDialogueType == DIALOGUE_22) |
12693 { | 12693 { |
12694 v4 = v2->evtd; | 12694 v4 = v2->evt_D; |
12695 goto LABEL_74; | 12695 goto LABEL_74; |
12696 } | 12696 } |
12697 if (newDialogueType == DIALOGUE_9) | 12697 if (newDialogueType == DIALOGUE_9) |
12698 { | 12698 { |
12699 if ( !sub_4BB756(v2->uProfession) ) | 12699 if ( !sub_4BB756(v2->uProfession) ) |
12737 } | 12737 } |
12738 goto LABEL_44; | 12738 goto LABEL_44; |
12739 } | 12739 } |
12740 if (newDialogueType == DIALOGUE_19) | 12740 if (newDialogueType == DIALOGUE_19) |
12741 { | 12741 { |
12742 v4 = v2->bDrawSomeAnim; | 12742 v4 = v2->evt_A; |
12743 goto LABEL_74; | 12743 goto LABEL_74; |
12744 } | 12744 } |
12745 if (newDialogueType == DIALOGUE_20) | 12745 if (newDialogueType == DIALOGUE_20) |
12746 { | 12746 { |
12747 v4 = v2->_anim_current_time; | 12747 v4 = v2->evt_B; |
12748 goto LABEL_74; | 12748 goto LABEL_74; |
12749 } | 12749 } |
12750 if (newDialogueType == DIALOGUE_21) | 12750 if (newDialogueType == DIALOGUE_21) |
12751 { | 12751 { |
12752 v4 = v2->_anim_end_time; | 12752 v4 = v2->evt_C; |
12753 LABEL_74: | 12753 LABEL_74: |
12754 if ( v4 < 200 || v4 > 310 ) | 12754 if ( v4 < 200 || v4 > 310 ) |
12755 { | 12755 { |
12756 if ( v4 < 400 || v4 > 410 ) | 12756 if ( v4 < 400 || v4 > 410 ) |
12757 { | 12757 { |