Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/Mouse.cpp Thu Aug 01 09:26:13 2013 +0600 +++ b/Mouse.cpp Thu Aug 01 17:51:16 2013 +0600 @@ -57,36 +57,25 @@ //----- (00469903) -------------------------------------------------------- void Mouse::SetCursorBitmap(const char *pName) { - Mouse *v2; // esi@1 - HCURSOR v3; // eax@10 - //int v4; // ecx@10 - double v5; // st7@11 - float v6; // ST04_4@12 - LONG v7; // eax@14 - LONG v8; // eax@17 - unsigned int v9; // eax@21 - float v10; // [sp+4h] [bp-18h]@11 struct tagPOINT Point; // [sp+14h] [bp-8h]@20 - v2 = this; if ( !this->bInitialized || !pName ) return; if ( _stricmp("MICON2", pName) ) pGame->uFlags2 &= 0xFFFFFFEFu; else pGame->uFlags2 |= 0x10u; - if ( _stricmp(v2->pCurrentCursorName, pName) ) - strcpy(v2->pCurrentCursorName, pName); + if ( _stricmp(this->pCurrentCursorName, pName) ) + strcpy(this->pCurrentCursorName, pName); ClearCursor(); - if ( _strnicmp(pName, "MICON1", 5u) ) + if ( _strnicmp(pName, "MICON1", 5) ) { - v9 = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); - v2->uCursorTextureID = v9; - v2->uCursorTextureID_2 = v9; - v2->AllocCursorSystemMem(); - v2->field_C = 0; - v2->bRedraw = 1; - v2->bActive = 1; + this->uCursorTextureID = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); + this->uCursorTextureID_2 = pIcons_LOD->LoadTexture(pName, TEXTURE_16BIT_PALETTE); + this->AllocCursorSystemMem(); + this->field_C = 0; + this->bRedraw = 1; + this->bActive = 1; if ( !areWeLoadingTexture ) { if (uCursorTextureID != -1) @@ -95,28 +84,17 @@ } return; } - v2->bActive = 0; - v2->field_C = 1; + this->bActive = 0; + this->field_C = 1; if ( !strcmp(pName, "MICON1") ) - { - v3 = LoadCursorA(GetModuleHandleW(nullptr), "Arrow"); - SetClassLongA(hWnd, GCL_HCURSOR, (LONG)v3); - } + SetClassLongA(hWnd, GCL_HCURSOR, (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Arrow")); else if ( !strcmp(pName, "MICON2") ) - { - v7 = (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Target"); - SetClassLongA(hWnd, -12, v7); - } + SetClassLongA(hWnd, -12, (LONG)LoadCursorA(GetModuleHandleW(nullptr), "Target")); else if ( !strcmp(pName, "MICON3") ) - { - v8 = (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT); - SetClassLongA(hWnd, -12, v8); - } -//LABEL_18: - - GetCursorPos(&Point); - ClientToScreen(hWnd,&Point); - SetCursorPos(Point.x, Point.y); + SetClassLongA(hWnd, -12, (LONG)LoadCursorA(0, (LPCSTR)IDC_WAIT)); + GetCursorPos(&Point); + ClientToScreen(hWnd,&Point); + SetCursorPos(Point.x, Point.y); } // 506128: using guessed type int areWeLoadingTexture;