Mercurial > mm7
comparison mm7_1.cpp @ 782:c47efaf23642
more tidy
author | zipi |
---|---|
date | Sun, 24 Mar 2013 01:45:09 +0000 |
parents | cf2fbac6edc9 |
children | 1e2be0f5eb30 |
comparison
equal
deleted
inserted
replaced
781:d170f23f70d1 | 782:c47efaf23642 |
---|---|
6 | 6 |
7 //#include <defs.h> | 7 //#include <defs.h> |
8 #include <assert.h> | 8 #include <assert.h> |
9 | 9 |
10 #include "MM7.h" | 10 #include "MM7.h" |
11 | |
12 #include "MapInfo.h" | 11 #include "MapInfo.h" |
13 #include "Game.h" | 12 #include "Game.h" |
14 #include "GUIWindow.h" | 13 #include "GUIWindow.h" |
15 #include "GUIFont.h" | 14 #include "GUIFont.h" |
16 #include "GUIButton.h" | 15 #include "GUIButton.h" |
50 #include "StorylineTextTable.h" | 49 #include "StorylineTextTable.h" |
51 #include "Events2D.h" | 50 #include "Events2D.h" |
52 #include "texts.h" | 51 #include "texts.h" |
53 #include "stru351.h" | 52 #include "stru351.h" |
54 #include "UIHouses.h" | 53 #include "UIHouses.h" |
55 | |
56 #include "mm7_data.h" | 54 #include "mm7_data.h" |
57 | |
58 | |
59 | |
60 | 55 |
61 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); | 56 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); |
62 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); | 57 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); |
63 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); | 58 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); |
64 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine); | 59 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine); |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | |
71 | |
72 | 60 |
73 //----- (004453C0) mm6----------------------------------------------------- | 61 //----- (004453C0) mm6----------------------------------------------------- |
74 //----- (004A1760) mm6_chinese--------------------------------------------- | 62 //----- (004A1760) mm6_chinese--------------------------------------------- |
75 int fixpoint_mul(int a1, int a2) | 63 int fixpoint_mul(int a1, int a2) |
76 { | 64 { |
111 // 506980: using guessed type int dword_506980; | 99 // 506980: using guessed type int dword_506980; |
112 // 506984: using guessed type int dword_506984; | 100 // 506984: using guessed type int dword_506984; |
113 // 506988: using guessed type int dword_506988; | 101 // 506988: using guessed type int dword_506988; |
114 // 50698C: using guessed type int dword_50698C; | 102 // 50698C: using guessed type int dword_50698C; |
115 // 507CC0: using guessed type int dword_507CC0; | 103 // 507CC0: using guessed type int dword_507CC0; |
116 | |
117 | |
118 // 50651C: using guessed type int dword_50651C; | 104 // 50651C: using guessed type int dword_50651C; |
119 // 506520: using guessed type int dword_506520; | 105 // 506520: using guessed type int dword_506520; |
120 // 506524: using guessed type int dword_506524; | 106 // 506524: using guessed type int dword_506524; |
121 // 506528: using guessed type int dword_506528; | 107 // 506528: using guessed type int dword_506528; |
122 // 506544: using guessed type int dword_506544; | 108 // 506544: using guessed type int dword_506544; |
123 // 506548: using guessed type int dword_506548; | 109 // 506548: using guessed type int dword_506548; |
124 // 723E80: using guessed type int dword_723E80_award_related[]; | 110 // 723E80: using guessed type int dword_723E80_award_related[]; |
125 // 723E84: using guessed type int dword_723E84[]; | 111 // 723E84: using guessed type int dword_723E84[]; |
126 | |
127 | |
128 | |
129 // 5075E0: using guessed type int pVisibleWindowsIdxs[20]; | 112 // 5075E0: using guessed type int pVisibleWindowsIdxs[20]; |
130 | |
131 | |
132 | |
133 | 113 |
134 //----- (0041CD4F) -------------------------------------------------------- | 114 //----- (0041CD4F) -------------------------------------------------------- |
135 bool __thiscall sub_41CD4F(unsigned int _this) | 115 bool __thiscall sub_41CD4F(unsigned int _this) |
136 { | 116 { |
137 unsigned int v1; // edi@1 | 117 unsigned int v1; // edi@1 |
478 strcat(pTmpBuf, pTmpBuf2); | 458 strcat(pTmpBuf, pTmpBuf2); |
479 } | 459 } |
480 return a1->DrawText(a2, 32, uY, 0, pTmpBuf, 0, 0, 0); | 460 return a1->DrawText(a2, 32, uY, 0, pTmpBuf, 0, 0, 0); |
481 } | 461 } |
482 | 462 |
483 | |
484 | |
485 | |
486 | |
487 | |
488 | |
489 //----- (0041F54A) -------------------------------------------------------- | 463 //----- (0041F54A) -------------------------------------------------------- |
490 void __cdecl LoadActualSkyFrame() | 464 void __cdecl LoadActualSkyFrame() |
491 { | 465 { |
492 if ( pTexture_RestUI_CurrentSkyFrame ) | 466 if ( pTexture_RestUI_CurrentSkyFrame ) |
493 pTexture_RestUI_CurrentSkyFrame->Release(); | 467 pTexture_RestUI_CurrentSkyFrame->Release(); |
542 LoadActualSkyFrame(); | 516 LoadActualSkyFrame(); |
543 } | 517 } |
544 viewparams->bRedrawGameUI = 1; | 518 viewparams->bRedrawGameUI = 1; |
545 } | 519 } |
546 | 520 |
547 | |
548 | |
549 | |
550 //----- (0042038D) -------------------------------------------------------- | 521 //----- (0042038D) -------------------------------------------------------- |
551 void __cdecl sub_42038D() | 522 void __cdecl sub_42038D() |
552 { | 523 { |
553 POINT *v0; // esi@2 | 524 POINT *v0; // esi@2 |
554 int v1; // ecx@2 | 525 int v1; // ecx@2 |
571 v2 = _w->GetDisplayName(); | 542 v2 = _w->GetDisplayName(); |
572 sub_41C0B8_set_status_string(v2); | 543 sub_41C0B8_set_status_string(v2); |
573 } | 544 } |
574 } | 545 } |
575 } | 546 } |
576 | |
577 | 547 |
578 //----- (00420C05) -------------------------------------------------------- | 548 //----- (00420C05) -------------------------------------------------------- |
579 void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal) | 549 void __fastcall party_finds_gold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal) |
580 { | 550 { |
581 unsigned int v2; // edi@1 | 551 unsigned int v2; // edi@1 |
728 } | 698 } |
729 sub_420B13(v4, v3); | 699 sub_420B13(v4, v3); |
730 } | 700 } |
731 } | 701 } |
732 } | 702 } |
733 | |
734 | |
735 | 703 |
736 //----- (004219BE) -------------------------------------------------------- | 704 //----- (004219BE) -------------------------------------------------------- |
737 GUIWindow *stru277::sub_4219BE() | 705 GUIWindow *stru277::sub_4219BE() |
738 { | 706 { |
739 int v1; // esi@1 | 707 int v1; // esi@1 |
767 v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); | 735 v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); |
768 v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); | 736 v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); |
769 v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); | 737 v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); |
770 return v2; | 738 return v2; |
771 } | 739 } |
772 | |
773 | 740 |
774 //----- (00421B2C) -------------------------------------------------------- | 741 //----- (00421B2C) -------------------------------------------------------- |
775 bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem() | 742 bool __cdecl sub_421B2C_PlaceInInventory_or_DropPickedItem() |
776 { | 743 { |
777 unsigned int v0; // eax@2 | 744 unsigned int v0; // eax@2 |
863 v1->Release(); | 830 v1->Release(); |
864 pIcons_LOD->_40F9C5(); | 831 pIcons_LOD->_40F9C5(); |
865 } | 832 } |
866 return 1; | 833 return 1; |
867 } | 834 } |
868 | |
869 | 835 |
870 //----- (00421D00) -------------------------------------------------------- | 836 //----- (00421D00) -------------------------------------------------------- |
871 void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID) | 837 void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID) |
872 { | 838 { |
873 //unsigned int v1; // esi@1 | 839 //unsigned int v1; // esi@1 |
1632 else assert(false); | 1598 else assert(false); |
1633 | 1599 |
1634 uGameUIFontMain = v3; | 1600 uGameUIFontMain = v3; |
1635 uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v5, v4, v6); | 1601 uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v5, v4, v6); |
1636 } | 1602 } |
1637 | |
1638 | |
1639 | 1603 |
1640 //----- (00423AEE) -------------------------------------------------------- | 1604 //----- (00423AEE) -------------------------------------------------------- |
1641 void __cdecl reset_some_strus_flt_2Cs() | 1605 void __cdecl reset_some_strus_flt_2Cs() |
1642 { | 1606 { |
1643 float *v0; // eax@1 | 1607 float *v0; // eax@1 |
2456 } | 2420 } |
2457 memcpy(&array_507D30[result], array_507D30, sizeof(array_507D30[result])); | 2421 memcpy(&array_507D30[result], array_507D30, sizeof(array_507D30[result])); |
2458 return result;*/ | 2422 return result;*/ |
2459 } | 2423 } |
2460 | 2424 |
2461 | |
2462 //----- (00424829) -------------------------------------------------------- | 2425 //----- (00424829) -------------------------------------------------------- |
2463 bool sub_424829(int a1, BspRenderer_stru2 *a2, BspRenderer_stru2 *a3, int a4) | 2426 bool sub_424829(int a1, BspRenderer_stru2 *a2, BspRenderer_stru2 *a3, int a4) |
2464 { | 2427 { |
2465 int v4; // edi@1 | 2428 int v4; // edi@1 |
2466 BspRenderer_stru2 *v5; // ebx@1 | 2429 BspRenderer_stru2 *v5; // ebx@1 |