comparison mm7_1.cpp @ 437:0a1ea44b4a0a

ui mesages & spellcasting
author Nomad
date Sun, 24 Feb 2013 09:51:42 +0200
parents 8c45cac1c5e1
children 20d96ec810c8
comparison
equal deleted inserted replaced
435:4f451a616d3d 437:0a1ea44b4a0a
1518 for ( result = v4->pControlsHead; result; result = result->pNext ) 1518 for ( result = v4->pControlsHead; result; result = result->pNext )
1519 { 1519 {
1520 if ( result->uHotkey == v3 ) 1520 if ( result->uHotkey == v3 )
1521 { 1521 {
1522 v6 = result->uControlParam; 1522 v6 = result->uControlParam;
1523 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 1523 pMessageQueue_50CBD0->AddMessage((UIMessageType)result->uControlID, v6, 0);
1524 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
1524 { 1525 {
1525 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)result->uControlID; 1526 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)result->uControlID;
1526 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6; 1527 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6;
1527 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 1528 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
1528 ++pMessageQueue_50CBD0->uNumMessages; 1529 ++pMessageQueue_50CBD0->uNumMessages;
1529 } 1530 }*/
1530 return result; 1531 return result;
1531 } 1532 }
1532 } 1533 }
1533 if ( v4->uFrameX || v4->uFrameY || !(v4->uFrameWidth == 640 & v4->uFrameHeight == 480) ) 1534 if ( v4->uFrameX || v4->uFrameY || !(v4->uFrameWidth == 640 & v4->uFrameHeight == 480) )
1534 { 1535 {
2023 } 2024 }
2024 while ( v13 ); 2025 while ( v13 );
2025 } 2026 }
2026 LABEL_26: 2027 LABEL_26:
2027 v11 = v9->uControlParam; 2028 v11 = v9->uControlParam;
2028 if ( (signed int)v2 < 40 ) 2029 /*if ( (signed int)v2 < 40 )
2029 { 2030 {
2030 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID; 2031 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID;
2031 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11; 2032 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11;
2032 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; 2033 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1;
2033 v2 = pMessageQueue_50CBD0->uNumMessages + 1; 2034 v2 = pMessageQueue_50CBD0->uNumMessages + 1;
2034 ++pMessageQueue_50CBD0->uNumMessages; 2035 ++pMessageQueue_50CBD0->uNumMessages;
2035 } 2036 }*/
2037 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1);
2036 goto LABEL_47; 2038 goto LABEL_47;
2037 } 2039 }
2038 if ( v26 != 38 ) 2040 if ( v26 != 38 )
2039 { 2041 {
2040 if ( v26 == 39 ) 2042 if ( v26 == 39 )
2148 } 2150 }
2149 while ( v25 ); 2151 while ( v25 );
2150 } 2152 }
2151 LABEL_56: 2153 LABEL_56:
2152 v21 = v19->uControlParam; 2154 v21 = v19->uControlParam;
2153 if ( (signed int)v2 < 40 ) 2155 /*if ( (signed int)v2 < 40 )
2154 { 2156 {
2155 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID; 2157 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID;
2156 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21; 2158 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21;
2157 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; 2159 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1;
2158 ++pMessageQueue_50CBD0->uNumMessages; 2160 ++pMessageQueue_50CBD0->uNumMessages;
2159 } 2161 }*/
2162 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1);
2160 return 1; 2163 return 1;
2161 } 2164 }
2162 2165
2163 //----- (0041D20D) -------------------------------------------------------- 2166 //----- (0041D20D) --------------------------------------------------------
2164 char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, GUIWindow *edx0, __int64 a3, GUIFont *a2) 2167 char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, GUIWindow *edx0, __int64 a3, GUIFont *a2)
4540 sub_41C0B8_set_status_string(v13); 4543 sub_41C0B8_set_status_string(v13);
4541 uLastPointedObjectID = 1; 4544 uLastPointedObjectID = 1;
4542 return; 4545 return;
4543 } 4546 }
4544 v38 = pButton->uControlParam; 4547 v38 = pButton->uControlParam;
4545 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 4548 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
4546 { 4549 {
4547 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType3; 4550 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType3;
4548 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v38; 4551 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v38;
4549 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 4552 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
4550 ++pMessageQueue_50CBD0->uNumMessages; 4553 ++pMessageQueue_50CBD0->uNumMessages;
4551 } 4554 }*/
4555 pMessageQueue_50CBD0->AddMessage(pMessageType3, v38, 0);
4552 //goto LABEL_131; 4556 //goto LABEL_131;
4553 uLastPointedObjectID = 1; 4557 uLastPointedObjectID = 1;
4554 return; 4558 return;
4555 } 4559 }
4556 } 4560 }
4574 if ( pMessageType2 != 0 ) 4578 if ( pMessageType2 != 0 )
4575 { 4579 {
4576 v36 = pButton->uControlParam; 4580 v36 = pButton->uControlParam;
4577 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 4581 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
4578 { 4582 {
4579 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType2; 4583 pMessageQueue_50CBD0->AddMessage(pMessageType2, v36, 0);
4584 /*pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType2;
4580 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v36; 4585 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v36;
4581 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 4586 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
4582 //goto LABEL_27; 4587 //goto LABEL_27;
4583 ++pMessageQueue_50CBD0->uNumMessages; 4588 ++pMessageQueue_50CBD0->uNumMessages;*/
4584 v13 = pButton->pButtonName; 4589 v13 = pButton->pButtonName;
4585 sub_41C0B8_set_status_string(v13); 4590 sub_41C0B8_set_status_string(v13);
4586 uLastPointedObjectID = 1; 4591 uLastPointedObjectID = 1;
4587 return; 4592 return;
4588 } 4593 }
4665 //LABEL_24: 4670 //LABEL_24:
4666 pMessageType1 = (UIMessageType)pButton->field_1C; 4671 pMessageType1 = (UIMessageType)pButton->field_1C;
4667 if ( pMessageType1 ) 4672 if ( pMessageType1 )
4668 { 4673 {
4669 v12 = pButton->uControlParam; 4674 v12 = pButton->uControlParam;
4670 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 4675 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0);
4676 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
4671 { 4677 {
4672 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; 4678 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1;
4673 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; 4679 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12;
4674 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 4680 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
4675 //LABEL_27: 4681 //LABEL_27:
4676 ++pMessageQueue_50CBD0->uNumMessages; 4682 ++pMessageQueue_50CBD0->uNumMessages;
4677 } 4683 }*/
4678 } 4684 }
4679 //LABEL_28: 4685 //LABEL_28:
4680 v13 = pButton->pButtonName; 4686 v13 = pButton->pButtonName;
4681 //_set_status_and_ret: 4687 //_set_status_and_ret:
4682 sub_41C0B8_set_status_string(v13); 4688 sub_41C0B8_set_status_string(v13);
4701 //{ 4707 //{
4702 pMessageType1 = (UIMessageType)pButton->field_1C; 4708 pMessageType1 = (UIMessageType)pButton->field_1C;
4703 if ( pMessageType1 ) 4709 if ( pMessageType1 )
4704 { 4710 {
4705 v12 = pButton->uControlParam; 4711 v12 = pButton->uControlParam;
4706 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 4712 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0);
4713 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
4707 { 4714 {
4708 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; 4715 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1;
4709 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; 4716 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12;
4710 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 4717 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
4711 ++pMessageQueue_50CBD0->uNumMessages; 4718 ++pMessageQueue_50CBD0->uNumMessages;
4712 } 4719 }*/
4713 } 4720 }
4714 v13 = pButton->pButtonName; 4721 v13 = pButton->pButtonName;
4715 sub_41C0B8_set_status_string(v13); 4722 sub_41C0B8_set_status_string(v13);
4716 uLastPointedObjectID = 1; 4723 uLastPointedObjectID = 1;
4717 return; 4724 return;
5392 sub_4451A8_press_any_key(0, 0, 0); 5399 sub_4451A8_press_any_key(0, 0, 0);
5393 } 5400 }
5394 } 5401 }
5395 return; 5402 return;
5396 } 5403 }
5397 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) 5404 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
5398 return; 5405 return;
5399 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)161; 5406 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)161;
5400 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v18; 5407 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v18;
5401 LABEL_42: 5408 LABEL_42:
5402 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 5409 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
5403 ++pMessageQueue_50CBD0->uNumMessages; 5410 ++pMessageQueue_50CBD0->uNumMessages;
5411 return;*/
5412 pMessageQueue_50CBD0->AddMessage(UIMSG_StartNPCDialogue, v18, 0);
5404 return; 5413 return;
5405 } 5414 }
5406 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 ) 5415 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 )
5407 { 5416 {
5408 pTurnEngine->field_18 |= 8u; 5417 pTurnEngine->field_18 |= 8u;
5409 return; 5418 return;
5410 } 5419 }
5411 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 5420 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
5412 { 5421 {
5413 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)23; 5422 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)23;
5414 goto LABEL_41; 5423 goto LABEL_41;
5415 } 5424 }*/
5425 pMessageQueue_50CBD0->AddMessage(UIMSG_Attack, 0, 0);
5416 } 5426 }
5417 else 5427 else
5418 { 5428 {
5419 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 ) 5429 if ( pParty->bTurnBasedModeOn == 1 && pTurnEngine->field_4 == 3 )
5420 { 5430 {
5421 pParty->uFlags |= 8u; 5431 pParty->uFlags |= 8u;
5422 return; 5432 return;
5423 } 5433 }
5424 if ( uActiveCharacter 5434 if ( uActiveCharacter
5425 && sub_427769_spell(pPlayers[uActiveCharacter]->uQuickSpell) 5435 && sub_427769_spell(pPlayers[uActiveCharacter]->uQuickSpell))
5426 && (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 5436 {
5427 { 5437 pMessageQueue_50CBD0->AddMessage(UIMSG_19, 0, 0);
5438 /*&& (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
5428 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)25; 5439 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)25;
5429 LABEL_41: 5440 LABEL_41:
5430 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; 5441 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
5431 goto LABEL_42; 5442 goto LABEL_42;*/
5432 } 5443 }
5433 } 5444 }
5434 } 5445 }
5435 5446
5436 //----- (004226C2) -------------------------------------------------------- 5447 //----- (004226C2) --------------------------------------------------------