Mercurial > mm7
comparison mm7_1.cpp @ 585:3ac7059a3f4f
goto clean
some refactoring
author | zipi |
---|---|
date | Wed, 06 Mar 2013 11:39:35 +0000 |
parents | 6a36b1cd767e |
children | 3c7fca0e01a0 |
comparison
equal
deleted
inserted
replaced
584:6a36b1cd767e | 585:3ac7059a3f4f |
---|---|
1316 v6 = (double)(signed int)v2; | 1316 v6 = (double)(signed int)v2; |
1317 v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)v2 * (double)a1->sCurrentHP); | 1317 v10 = (signed __int64)((double)(signed int)v4 / (double)(signed int)v2 * (double)a1->sCurrentHP); |
1318 if ( v5 <= (signed int)(signed __int64)(0.34 * v6) ) | 1318 if ( v5 <= (signed int)(signed __int64)(0.34 * v6) ) |
1319 { | 1319 { |
1320 v7 = uTextureID_mhp_red; | 1320 v7 = uTextureID_mhp_red; |
1321 LABEL_9: | |
1322 v9 = v7; | 1321 v9 = v7; |
1323 goto LABEL_10; | 1322 } |
1324 } | 1323 else if ( v5 <= (signed int)(signed __int64)(v6 * 0.67) ) |
1325 if ( v5 <= (signed int)(signed __int64)(v6 * 0.67) ) | |
1326 { | 1324 { |
1327 v7 = uTextureID_mhp_yel; | 1325 v7 = uTextureID_mhp_yel; |
1328 goto LABEL_9; | 1326 v9 = v7; |
1329 } | 1327 } |
1330 } | 1328 } |
1331 LABEL_10: | |
1332 v8 = a2->uFrameX + (signed int)(a2->uFrameWidth - v4) / 2; | 1329 v8 = a2->uFrameX + (signed int)(a2->uFrameWidth - v4) / 2; |
1333 pRenderer->Clip(v8, a2->uFrameY + 32, v8 + v4, a2->uFrameY + 52); | 1330 pRenderer->Clip(v8, a2->uFrameY + 32, v8 + v4, a2->uFrameY + 52); |
1334 pRenderer->DrawTextureIndexed( | 1331 pRenderer->DrawTextureIndexed( |
1335 v8, | 1332 v8, |
1336 v3->uFrameY + 32, | 1333 v3->uFrameY + 32, |
1381 v15 = (double)(uTextureID_BarGreen != -1 ? pIcons_LOD->pTextures[uTextureID_BarGreen].uTextureHeight : 26); | 1378 v15 = (double)(uTextureID_BarGreen != -1 ? pIcons_LOD->pTextures[uTextureID_BarGreen].uTextureHeight : 26); |
1382 do | 1379 do |
1383 { | 1380 { |
1384 v1 = &pParty->pPlayers[v16]; | 1381 v1 = &pParty->pPlayers[v16]; |
1385 v11 = v1; | 1382 v11 = v1; |
1386 if ( v1->sHealth <= 0 ) | 1383 if ( v1->sHealth > 0 ) |
1387 goto LABEL_24; | 1384 { |
1388 v11 = &pParty->pPlayers[v16]; | 1385 v11 = &pParty->pPlayers[v16]; |
1389 v2 = (double)v1->sHealth; | 1386 v2 = (double)v1->sHealth; |
1390 v3 = v2 / (double)v1->GetMaxHealth(); | 1387 v3 = v2 / (double)v1->GetMaxHealth(); |
1391 if ( v3 <= 0.5 ) | 1388 if( v3 > 0.5 ) |
1392 { | 1389 { |
1393 if ( v3 <= 0.25 ) | 1390 if ( v3 > 1.0 ) |
1394 { | 1391 v3 = 1.0; |
1395 if ( v3 <= 0.0 ) | 1392 v4 = (signed __int64)((1.0 - v3) * v15); |
1396 goto LABEL_24; | 1393 if ( v16 == 2 || v16 == 3 ) |
1397 if ( v16 == 2 || v16 == 3 ) | 1394 v17 = 2; |
1398 v17 = 2; | 1395 else |
1399 else | 1396 v17 = 0; |
1400 v17 = 0; | 1397 pRenderer->Clip( |
1401 pRenderer->Clip( | 1398 v17 + pHealthBarPos[v16], |
1402 v17 + pHealthBarPos[v16], | 1399 v4 + 402, |
1403 (unsigned __int64)(signed __int64)((1.0 - v3) * v15) + 402, | 1400 v17 + pHealthBarPos[v16] + v0->uTextureWidth, |
1404 v17 + pHealthBarPos[v16] + v13->uTextureWidth, | 1401 v0->uTextureHeight + 402); |
1405 v13->uTextureHeight + 402); | 1402 v9 = v0; |
1406 v9 = v13; | 1403 } |
1407 } | 1404 else if ( v3 > 0.25 ) |
1408 else | 1405 { |
1409 { | 1406 if ( v16 == 2 || v16 == 3 ) |
1410 if ( v16 == 2 || v16 == 3 ) | 1407 v17 = 2; |
1411 v17 = 2; | 1408 else |
1412 else | 1409 v17 = 0; |
1413 v17 = 0; | 1410 pRenderer->Clip( |
1414 pRenderer->Clip( | 1411 v17 + pHealthBarPos[v16], |
1415 v17 + pHealthBarPos[v16], | 1412 (unsigned __int64)(signed __int64)((1.0 - v3) * v15) + 402, |
1416 (unsigned __int64)(signed __int64)((1.0 - v3) * v15) + 402, | 1413 v17 + pHealthBarPos[v16] + v14->uTextureWidth, |
1417 v17 + pHealthBarPos[v16] + v14->uTextureWidth, | 1414 v14->uTextureHeight + 402); |
1418 v14->uTextureHeight + 402); | 1415 v9 = v14; |
1419 v9 = v14; | 1416 } |
1420 } | 1417 else if ( v3 > 0.0 ) |
1421 } | 1418 { |
1422 else | 1419 if ( v16 == 2 || v16 == 3 ) |
1423 { | 1420 v17 = 2; |
1424 if ( v3 > 1.0 ) | 1421 else |
1425 v3 = 1.0; | 1422 v17 = 0; |
1426 v4 = (signed __int64)((1.0 - v3) * v15); | 1423 pRenderer->Clip( |
1427 if ( v16 == 2 || v16 == 3 ) | 1424 v17 + pHealthBarPos[v16], |
1428 v17 = 2; | 1425 (unsigned __int64)(signed __int64)((1.0 - v3) * v15) + 402, |
1429 else | 1426 v17 + pHealthBarPos[v16] + v13->uTextureWidth, |
1430 v17 = 0; | 1427 v13->uTextureHeight + 402); |
1431 pRenderer->Clip( | 1428 v9 = v13; |
1432 v17 + pHealthBarPos[v16], | 1429 } |
1433 v4 + 402, | 1430 if( v3 > 0.0 ) |
1434 v17 + pHealthBarPos[v16] + v0->uTextureWidth, | 1431 { |
1435 v0->uTextureHeight + 402); | 1432 pRenderer->DrawTextureIndexed(v17 + pHealthBarPos[v16], 0x192u, v9); |
1436 v9 = v0; | 1433 pRenderer->ResetClip(); |
1437 } | 1434 } |
1438 pRenderer->DrawTextureIndexed(v17 + pHealthBarPos[v16], 0x192u, v9); | 1435 } |
1439 pRenderer->ResetClip(); | |
1440 LABEL_24: | |
1441 v5 = v11; | 1436 v5 = v11; |
1442 v12 = v11->sMana; | 1437 v12 = v11->sMana; |
1443 if ( v12 > 0 ) | 1438 if ( v12 > 0 ) |
1444 { | 1439 { |
1445 v6 = (double)v12; | 1440 v6 = (double)v12; |
1934 return 0; | 1929 return 0; |
1935 v2 = pMessageQueue_50CBD0->uNumMessages; | 1930 v2 = pMessageQueue_50CBD0->uNumMessages; |
1936 while ( 1 ) | 1931 while ( 1 ) |
1937 { | 1932 { |
1938 v3 = pVisibleWindowsIdxs[v27] - 1; | 1933 v3 = pVisibleWindowsIdxs[v27] - 1; |
1939 if ( pWindowList[v3].field_44 == v1 ) | 1934 if ( pWindowList[v3].field_44 != v1 ) |
1940 goto LABEL_47; | 1935 { |
1941 if ( v26 != 34 ) | 1936 if ( v26 != 34 ) |
1942 break; | 1937 { |
1943 if ( pWindowList[v3].field_30 != v1 ) | 1938 if ( v26 == 37 ) |
1944 { | 1939 { |
1945 pMouse->GetClickPos(&uClickX, &uClickY); | 1940 v12 = pWindowList[v3].field_34; |
1946 v4 = pWindowList[v3].pStartingPosActiveItem; | 1941 if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 ) |
1947 v29 = v4 + pWindowList[v3].pNumPresenceButton; | 1942 { |
1948 if ( v4 < v4 + pWindowList[v3].pNumPresenceButton ) | 1943 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; |
1949 { | 1944 pWindowList[v3].pCurrentPosActiveItem -= v12; |
1950 while ( 1 ) | 1945 if ( v8 ) |
1951 { | 1946 { |
1952 v14 = pWindowList[v3].pControlsHead; | 1947 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1); |
1953 if ( v4 > 0 ) | 1948 v2 = pMessageQueue_50CBD0->uNumMessages; |
1954 { | 1949 } |
1955 v15 = v4; | 1950 } |
1956 do | 1951 if ( pWindowList[v3].field_30 != v1 ) |
1957 { | 1952 { |
1958 v14 = v14->pNext; | 1953 --v27; |
1959 --v15; | 1954 if ( v27 < 0 ) |
1960 } | 1955 return 0; |
1961 while ( v15 ); | 1956 continue; |
1962 } | 1957 } |
1963 if ( (signed int)uClickX >= (signed int)v14->uX | 1958 v9 = pWindowList[v3].pControlsHead; |
1964 && (signed int)uClickX <= (signed int)v14->uZ | 1959 v13 = pWindowList[v3].pCurrentPosActiveItem; |
1965 && (signed int)uClickY >= (signed int)v14->uY | 1960 if ( v13 > (signed int)v1 ) |
1966 && (signed int)uClickY <= (signed int)v14->uW ) | 1961 { |
1967 goto LABEL_66; | 1962 do |
1968 ++v4; | 1963 { |
1969 if ( v4 >= v29 ) | 1964 v9 = v9->pNext; |
1970 { | 1965 --v13; |
1971 LABEL_45: | 1966 } |
1972 v1 = 0; | 1967 while ( v13 ); |
1973 goto LABEL_46; | 1968 } |
1974 } | 1969 v11 = v9->uControlParam; |
1975 } | 1970 /*if ( (signed int)v2 < 40 ) |
1976 } | 1971 { |
1977 goto LABEL_46; | 1972 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID; |
1978 } | 1973 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11; |
1979 LABEL_47: | 1974 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; |
1975 v2 = pMessageQueue_50CBD0->uNumMessages + 1; | |
1976 ++pMessageQueue_50CBD0->uNumMessages; | |
1977 }*/ | |
1978 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1); | |
1979 --v27; | |
1980 if ( v27 < 0 ) | |
1981 return 0; | |
1982 continue; | |
1983 } | |
1984 if ( v26 != 38 ) | |
1985 { | |
1986 if ( v26 == 39 ) | |
1987 { | |
1988 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; | |
1989 if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem ) | |
1990 { | |
1991 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; | |
1992 pWindowList[v3].pCurrentPosActiveItem = v7; | |
1993 if ( v8 ) | |
1994 { | |
1995 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1); | |
1996 v2 = pMessageQueue_50CBD0->uNumMessages; | |
1997 } | |
1998 } | |
1999 if ( pWindowList[v3].field_30 != v1 ) | |
2000 { | |
2001 --v27; | |
2002 if ( v27 < 0 ) | |
2003 return 0; | |
2004 continue; | |
2005 } | |
2006 v9 = pWindowList[v3].pControlsHead; | |
2007 v10 = pWindowList[v3].pCurrentPosActiveItem; | |
2008 if ( v10 > (signed int)v1 ) | |
2009 { | |
2010 do | |
2011 { | |
2012 v9 = v9->pNext; | |
2013 --v10; | |
2014 } | |
2015 while ( v10 ); | |
2016 } | |
2017 v11 = v9->uControlParam; | |
2018 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1); | |
2019 --v27; | |
2020 if ( v27 < 0 ) | |
2021 return 0; | |
2022 continue; | |
2023 } | |
2024 if ( v26 == 40 ) | |
2025 { | |
2026 v17 = pWindowList[v3].pStartingPosActiveItem; | |
2027 v18 = pWindowList[v3].pCurrentPosActiveItem; | |
2028 if ( v18 >= pWindowList[v3].pNumPresenceButton + v17 - 1 ) | |
2029 pWindowList[v3].pCurrentPosActiveItem = v17; | |
2030 else | |
2031 pWindowList[v3].pCurrentPosActiveItem = v18 + 1; | |
2032 if ( pWindowList[v3].field_30 != v1 ) | |
2033 return 1; | |
2034 v19 = pWindowList[v3].pControlsHead; | |
2035 v20 = pWindowList[v3].pCurrentPosActiveItem; | |
2036 if ( v20 > (signed int)v1 ) | |
2037 { | |
2038 do | |
2039 { | |
2040 v19 = v19->pNext; | |
2041 --v20; | |
2042 } | |
2043 while ( v20 ); | |
2044 } | |
2045 v21 = v19->uControlParam; | |
2046 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1); | |
2047 return 1; | |
2048 } | |
2049 if ( v26 == 41 ) | |
2050 { | |
2051 pMouse->GetClickPos(&uClickX, &uClickY); | |
2052 v4 = pWindowList[v3].pStartingPosActiveItem; | |
2053 v28 = v4 + pWindowList[v3].pNumPresenceButton; | |
2054 if ( v4 < v4 + pWindowList[v3].pNumPresenceButton ) | |
2055 { | |
2056 while ( 1 ) | |
2057 { | |
2058 v5 = pWindowList[v3].pControlsHead; | |
2059 if ( v4 > 0 ) | |
2060 { | |
2061 v6 = v4; | |
2062 do | |
2063 { | |
2064 v5 = v5->pNext; | |
2065 --v6; | |
2066 } | |
2067 while ( v6 ); | |
2068 } | |
2069 if ( (signed int)uClickX >= (signed int)v5->uX | |
2070 && (signed int)uClickX <= (signed int)v5->uZ | |
2071 && (signed int)uClickY >= (signed int)v5->uY | |
2072 && (signed int)uClickY <= (signed int)v5->uW ) | |
2073 break; | |
2074 ++v4; | |
2075 if ( v4 >= v28 ) | |
2076 { | |
2077 v1 = 0; | |
2078 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2079 --v27; | |
2080 if ( v27 < 0 ) | |
2081 return 0; | |
2082 continue; | |
2083 } | |
2084 } | |
2085 pWindowList[v3].pCurrentPosActiveItem = v4; | |
2086 return 1; | |
2087 } | |
2088 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2089 --v27; | |
2090 if ( v27 < 0 ) | |
2091 return 0; | |
2092 continue; | |
2093 } | |
2094 --v27; | |
2095 if ( v27 < 0 ) | |
2096 return 0; | |
2097 continue; | |
2098 } | |
2099 v22 = pWindowList[v3].pCurrentPosActiveItem; | |
2100 v23 = pWindowList[v3].pStartingPosActiveItem; | |
2101 if ( v22 <= v23 ) | |
2102 v24 = pWindowList[v3].pNumPresenceButton + v23 - 1; | |
2103 else | |
2104 v24 = v22 - 1; | |
2105 v8 = pWindowList[v3].field_30 == v1; | |
2106 pWindowList[v3].pCurrentPosActiveItem = v24; | |
2107 if ( !v8 ) | |
2108 return 1; | |
2109 v19 = pWindowList[v3].pControlsHead; | |
2110 v25 = pWindowList[v3].pCurrentPosActiveItem; | |
2111 if ( v25 > (signed int)v1 ) | |
2112 { | |
2113 do | |
2114 { | |
2115 v19 = v19->pNext; | |
2116 --v25; | |
2117 } | |
2118 while ( v25 ); | |
2119 } | |
2120 v21 = v19->uControlParam; | |
2121 /*if ( (signed int)v2 < 40 ) | |
2122 { | |
2123 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID; | |
2124 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21; | |
2125 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; | |
2126 ++pMessageQueue_50CBD0->uNumMessages; | |
2127 }*/ | |
2128 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1); | |
2129 return 1; | |
2130 } | |
2131 if ( pWindowList[v3].field_30 != v1 ) | |
2132 { | |
2133 pMouse->GetClickPos(&uClickX, &uClickY); | |
2134 v4 = pWindowList[v3].pStartingPosActiveItem; | |
2135 v29 = v4 + pWindowList[v3].pNumPresenceButton; | |
2136 if ( v4 < v4 + pWindowList[v3].pNumPresenceButton ) | |
2137 { | |
2138 while ( 1 ) | |
2139 { | |
2140 v14 = pWindowList[v3].pControlsHead; | |
2141 if ( v4 > 0 ) | |
2142 { | |
2143 v15 = v4; | |
2144 do | |
2145 { | |
2146 v14 = v14->pNext; | |
2147 --v15; | |
2148 } | |
2149 while ( v15 ); | |
2150 } | |
2151 if ( (signed int)uClickX >= (signed int)v14->uX | |
2152 && (signed int)uClickX <= (signed int)v14->uZ | |
2153 && (signed int)uClickY >= (signed int)v14->uY | |
2154 && (signed int)uClickY <= (signed int)v14->uW ) | |
2155 { | |
2156 pWindowList[v3].pCurrentPosActiveItem = v4; | |
2157 return 1; | |
2158 } | |
2159 ++v4; | |
2160 if ( v4 >= v29 ) | |
2161 { | |
2162 v1 = 0; | |
2163 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2164 break; | |
2165 } | |
2166 } | |
2167 } | |
2168 else | |
2169 { | |
2170 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2171 } | |
2172 } | |
2173 } | |
1980 --v27; | 2174 --v27; |
1981 if ( v27 < 0 ) | 2175 if ( v27 < 0 ) |
1982 return 0; | 2176 return 0; |
1983 } | 2177 } |
1984 if ( v26 == 37 ) | 2178 |
1985 { | |
1986 v12 = pWindowList[v3].field_34; | |
1987 if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 ) | |
1988 { | |
1989 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; | |
1990 pWindowList[v3].pCurrentPosActiveItem -= v12; | |
1991 if ( v8 ) | |
1992 { | |
1993 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1); | |
1994 v2 = pMessageQueue_50CBD0->uNumMessages; | |
1995 } | |
1996 } | |
1997 if ( pWindowList[v3].field_30 != v1 ) | |
1998 goto LABEL_47; | |
1999 v9 = pWindowList[v3].pControlsHead; | |
2000 v13 = pWindowList[v3].pCurrentPosActiveItem; | |
2001 if ( v13 > (signed int)v1 ) | |
2002 { | |
2003 do | |
2004 { | |
2005 v9 = v9->pNext; | |
2006 --v13; | |
2007 } | |
2008 while ( v13 ); | |
2009 } | |
2010 LABEL_26: | |
2011 v11 = v9->uControlParam; | |
2012 /*if ( (signed int)v2 < 40 ) | |
2013 { | |
2014 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID; | |
2015 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11; | |
2016 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; | |
2017 v2 = pMessageQueue_50CBD0->uNumMessages + 1; | |
2018 ++pMessageQueue_50CBD0->uNumMessages; | |
2019 }*/ | |
2020 pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1); | |
2021 goto LABEL_47; | |
2022 } | |
2023 if ( v26 != 38 ) | |
2024 { | |
2025 if ( v26 == 39 ) | |
2026 { | |
2027 v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; | |
2028 if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem ) | |
2029 { | |
2030 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; | |
2031 pWindowList[v3].pCurrentPosActiveItem = v7; | |
2032 if ( v8 ) | |
2033 { | |
2034 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1); | |
2035 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2036 } | |
2037 } | |
2038 if ( pWindowList[v3].field_30 != v1 ) | |
2039 goto LABEL_47; | |
2040 v9 = pWindowList[v3].pControlsHead; | |
2041 v10 = pWindowList[v3].pCurrentPosActiveItem; | |
2042 if ( v10 > (signed int)v1 ) | |
2043 { | |
2044 do | |
2045 { | |
2046 v9 = v9->pNext; | |
2047 --v10; | |
2048 } | |
2049 while ( v10 ); | |
2050 } | |
2051 goto LABEL_26; | |
2052 } | |
2053 if ( v26 == 40 ) | |
2054 { | |
2055 v17 = pWindowList[v3].pStartingPosActiveItem; | |
2056 v18 = pWindowList[v3].pCurrentPosActiveItem; | |
2057 if ( v18 >= pWindowList[v3].pNumPresenceButton + v17 - 1 ) | |
2058 pWindowList[v3].pCurrentPosActiveItem = v17; | |
2059 else | |
2060 pWindowList[v3].pCurrentPosActiveItem = v18 + 1; | |
2061 if ( pWindowList[v3].field_30 != v1 ) | |
2062 return 1; | |
2063 v19 = pWindowList[v3].pControlsHead; | |
2064 v20 = pWindowList[v3].pCurrentPosActiveItem; | |
2065 if ( v20 > (signed int)v1 ) | |
2066 { | |
2067 do | |
2068 { | |
2069 v19 = v19->pNext; | |
2070 --v20; | |
2071 } | |
2072 while ( v20 ); | |
2073 } | |
2074 goto LABEL_56; | |
2075 } | |
2076 if ( v26 == 41 ) | |
2077 { | |
2078 pMouse->GetClickPos(&uClickX, &uClickY); | |
2079 v4 = pWindowList[v3].pStartingPosActiveItem; | |
2080 v28 = v4 + pWindowList[v3].pNumPresenceButton; | |
2081 if ( v4 < v4 + pWindowList[v3].pNumPresenceButton ) | |
2082 { | |
2083 while ( 1 ) | |
2084 { | |
2085 v5 = pWindowList[v3].pControlsHead; | |
2086 if ( v4 > 0 ) | |
2087 { | |
2088 v6 = v4; | |
2089 do | |
2090 { | |
2091 v5 = v5->pNext; | |
2092 --v6; | |
2093 } | |
2094 while ( v6 ); | |
2095 } | |
2096 if ( (signed int)uClickX >= (signed int)v5->uX | |
2097 && (signed int)uClickX <= (signed int)v5->uZ | |
2098 && (signed int)uClickY >= (signed int)v5->uY | |
2099 && (signed int)uClickY <= (signed int)v5->uW ) | |
2100 break; | |
2101 ++v4; | |
2102 if ( v4 >= v28 ) | |
2103 goto LABEL_45; | |
2104 } | |
2105 LABEL_66: | |
2106 pWindowList[v3].pCurrentPosActiveItem = v4; | |
2107 return 1; | |
2108 } | |
2109 LABEL_46: | |
2110 v2 = pMessageQueue_50CBD0->uNumMessages; | |
2111 goto LABEL_47; | |
2112 } | |
2113 goto LABEL_47; | |
2114 } | |
2115 v22 = pWindowList[v3].pCurrentPosActiveItem; | |
2116 v23 = pWindowList[v3].pStartingPosActiveItem; | |
2117 if ( v22 <= v23 ) | |
2118 v24 = pWindowList[v3].pNumPresenceButton + v23 - 1; | |
2119 else | |
2120 v24 = v22 - 1; | |
2121 v8 = pWindowList[v3].field_30 == v1; | |
2122 pWindowList[v3].pCurrentPosActiveItem = v24; | |
2123 if ( !v8 ) | |
2124 return 1; | |
2125 v19 = pWindowList[v3].pControlsHead; | |
2126 v25 = pWindowList[v3].pCurrentPosActiveItem; | |
2127 if ( v25 > (signed int)v1 ) | |
2128 { | |
2129 do | |
2130 { | |
2131 v19 = v19->pNext; | |
2132 --v25; | |
2133 } | |
2134 while ( v25 ); | |
2135 } | |
2136 LABEL_56: | |
2137 v21 = v19->uControlParam; | |
2138 /*if ( (signed int)v2 < 40 ) | |
2139 { | |
2140 pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID; | |
2141 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21; | |
2142 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; | |
2143 ++pMessageQueue_50CBD0->uNumMessages; | |
2144 }*/ | |
2145 pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1); | |
2146 return 1; | |
2147 } | 2179 } |
2148 | 2180 |
2149 //----- (0041D20D) -------------------------------------------------------- | 2181 //----- (0041D20D) -------------------------------------------------------- |
2150 char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, GUIWindow *edx0, __int64 a3, GUIFont *a2) | 2182 char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, GUIWindow *edx0, __int64 a3, GUIFont *a2) |
2151 { | 2183 { |