Mercurial > mm7
comparison Mouse.cpp @ 1429:c7489dd19f88
BuildingType_Tavern and CastSpellInfo_PushCastSpellInfo fix
author | Ritor1 |
---|---|
date | Thu, 01 Aug 2013 17:51:16 +0600 |
parents | cc9a3a24d61d |
children | 934074e7fcc1 |
comparison
equal
deleted
inserted
replaced
1428:50d1412cd2c0 | 1429:c7489dd19f88 |
---|---|
55 } | 55 } |
56 | 56 |
57 //----- (00469903) -------------------------------------------------------- | 57 //----- (00469903) -------------------------------------------------------- |
58 void Mouse::SetCursorBitmap(const char *pName) | 58 void Mouse::SetCursorBitmap(const char *pName) |
59 { | 59 { |
60 Mouse *v2; // esi@1 | |
61 HCURSOR v3; // eax@10 | |
62 //int v4; // ecx@10 | |
63 double v5; // st7@11 | |
64 float v6; // ST04_4@12 | |
65 LONG v7; // eax@14 | |
66 LONG v8; // eax@17 | |
67 unsigned int v9; // eax@21 | |
68 float v10; // [sp+4h] [bp-18h]@11 | |
69 struct tagPOINT Point; // [sp+14h] [bp-8h]@20 | 60 struct tagPOINT Point; // [sp+14h] [bp-8h]@20 |
70 | 61 |
71 v2 = this; | |
72 if ( !this->bInitialized || !pName ) | 62 if ( !this->bInitialized || !pName ) |
73 return; | 63 return; |
74 if ( _stricmp("MICON2", pName) ) | 64 if ( _stricmp("MICON2", pName) ) |
75 pGame->uFlags2 &= 0xFFFFFFEFu; | 65 pGame->uFlags2 &= 0xFFFFFFEFu; |
76 else | 66 else |
77 pGame->uFlags2 |= 0x10u; | 67 pGame->uFlags2 |= 0x10u; |
78 if ( _stricmp(v2->pCurrentCursorName, pName) ) | 68 if ( _stricmp(this->pCurrentCursorName, pName) ) |
79 strcpy(v2->pCurrentCursorName, pName); | 69 strcpy(this->pCurrentCursorName, pName); |
80 ClearCursor(); | 70 ClearCursor(); |
81 if ( _strnicmp(pName, "MICON1", 5u) ) | 71 if ( _strnicmp(pName, "MICON1", 5) ) |
82 { | 72 { |
83 v9 = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); | 73 this->uCursorTextureID = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); |
84 v2->uCursorTextureID = v9; | 74 this->uCursorTextureID_2 = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); |
85 v2->uCursorTextureID_2 = v9; | 75 this->AllocCursorSystemMem(); |
86 v2->AllocCursorSystemMem(); | 76 this->field_C = 0; |
87 v2->field_C = 0; | 77 this->bRedraw = 1; |
88 v2->bRedraw = 1; | 78 this->bActive = 1; |
89 v2->bActive = 1; | |
90 if ( !areWeLoadingTexture ) | 79 if ( !areWeLoadingTexture ) |
91 { | 80 { |
92 if (uCursorTextureID != -1) | 81 if (uCursorTextureID != -1) |
93 pIcons_LOD->pTextures[uCursorTextureID].Release(); | 82 pIcons_LOD->pTextures[uCursorTextureID].Release(); |
94 pIcons_LOD->SyncLoadedFilesCount(); | 83 pIcons_LOD->SyncLoadedFilesCount(); |
95 } | 84 } |
96 return; | 85 return; |
97 } | 86 } |
98 v2->bActive = 0; | 87 this->bActive = 0; |
99 v2->field_C = 1; | 88 this->field_C = 1; |
100 if ( !strcmp(pName, "MICON1") ) | 89 if ( !strcmp(pName, "MICON1") ) |
101 { | 90 SetClassLongA(hWnd, GCL_HCURSOR, (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Arrow")); |
102 v3 = LoadCursorA(GetModuleHandleW(nullptr), "Arrow"); | |
103 SetClassLongA(hWnd, GCL_HCURSOR, (LONG)v3); | |
104 } | |
105 else if ( !strcmp(pName, "MICON2") ) | 91 else if ( !strcmp(pName, "MICON2") ) |
106 { | 92 SetClassLongA(hWnd, -12, (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Target")); |
107 v7 = (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Target"); | |
108 SetClassLongA(hWnd, -12, v7); | |
109 } | |
110 else if ( !strcmp(pName, "MICON3") ) | 93 else if ( !strcmp(pName, "MICON3") ) |
111 { | 94 SetClassLongA(hWnd, -12, (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT)); |
112 v8 = (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT); | 95 GetCursorPos(&Point); |
113 SetClassLongA(hWnd, -12, v8); | 96 ClientToScreen(hWnd,&Point); |
114 } | 97 SetCursorPos(Point.x, Point.y); |
115 //LABEL_18: | |
116 | |
117 GetCursorPos(&Point); | |
118 ClientToScreen(hWnd,&Point); | |
119 SetCursorPos(Point.x, Point.y); | |
120 } | 98 } |
121 // 506128: using guessed type int areWeLoadingTexture; | 99 // 506128: using guessed type int areWeLoadingTexture; |
122 | 100 |
123 //----- (00469AE4) -------------------------------------------------------- | 101 //----- (00469AE4) -------------------------------------------------------- |
124 LONG Mouse::_469AE4() | 102 LONG Mouse::_469AE4() |