Mercurial > mm7
comparison mm7_1.cpp @ 587:fb0e105683e9
GameUI_WritePointedObjectStatusString goto clean
author | zipi |
---|---|
date | Wed, 06 Mar 2013 12:23:52 +0000 |
parents | 3c7fca0e01a0 |
children | 829fb49eee05 |
comparison
equal
deleted
inserted
replaced
586:3c7fca0e01a0 | 587:fb0e105683e9 |
---|---|
3190 { | 3190 { |
3191 v78 = 0; | 3191 v78 = 0; |
3192 v74 = 0; | 3192 v74 = 0; |
3193 v69 = 0; | 3193 v69 = 0; |
3194 v66 = pGlobalTXT_LocalizationStrings[630]; | 3194 v66 = pGlobalTXT_LocalizationStrings[630]; |
3195 goto LABEL_123; | |
3196 } | |
3197 a4 = 0; | |
3198 v51 = &v121->pActorBuffs[1]; | |
3199 v222 = 0; | |
3200 v120 = &v121->pActorBuffs[1]; | |
3201 do | |
3202 { | |
3203 if ( (signed __int64)v51->uExpireTime > 0 ) | |
3204 { | |
3205 switch ( (int)v51 ) | |
3206 { | |
3207 case 0u: | |
3208 v124 = 60; | |
3209 a4 = pGlobalTXT_LocalizationStrings[591]; | |
3210 break; | |
3211 case 1u: | |
3212 v124 = 82; | |
3213 a4 = pGlobalTXT_LocalizationStrings[649]; | |
3214 break; | |
3215 case 2u: | |
3216 v124 = 92; | |
3217 a4 = pGlobalTXT_LocalizationStrings[592]; | |
3218 break; | |
3219 case 3u: | |
3220 v124 = 63; | |
3221 a4 = pGlobalTXT_LocalizationStrings[4]; | |
3222 break; | |
3223 case 4u: | |
3224 v52 = pGlobalTXT_LocalizationStrings[220]; | |
3225 goto LABEL_100; | |
3226 case 5u: | |
3227 v52 = pGlobalTXT_LocalizationStrings[162]; | |
3228 LABEL_100: | |
3229 a4 = v52; | |
3230 v124 = 81; | |
3231 break; | |
3232 case 6u: | |
3233 v53 = pGlobalTXT_LocalizationStrings[593]; | |
3234 v124 = 35; | |
3235 goto LABEL_103; | |
3236 case 8u: | |
3237 v53 = pGlobalTXT_LocalizationStrings[608]; | |
3238 v124 = 62; | |
3239 LABEL_103: | |
3240 a4 = v53; | |
3241 break; | |
3242 case 7u: | |
3243 case 9u: | |
3244 a4 = 0; | |
3245 v124 = 0; | |
3246 goto LABEL_119; | |
3247 case 0xAu: | |
3248 v124 = 47; | |
3249 a4 = pGlobalTXT_LocalizationStrings[221]; | |
3250 break; | |
3251 case 0xBu: | |
3252 v124 = 66; | |
3253 a4 = pGlobalTXT_LocalizationStrings[607]; | |
3254 break; | |
3255 case 0xCu: | |
3256 v124 = 85; | |
3257 a4 = pGlobalTXT_LocalizationStrings[610]; | |
3258 break; | |
3259 case 0xDu: | |
3260 v124 = 86; | |
3261 a4 = pGlobalTXT_LocalizationStrings[609]; | |
3262 break; | |
3263 case 0xEu: | |
3264 v124 = 17; | |
3265 a4 = pGlobalTXT_LocalizationStrings[279]; | |
3266 break; | |
3267 case 0xFu: | |
3268 v124 = 38; | |
3269 a4 = pGlobalTXT_LocalizationStrings[442]; | |
3270 break; | |
3271 case 0x10u: | |
3272 v124 = 46; | |
3273 a4 = pGlobalTXT_LocalizationStrings[443]; | |
3274 break; | |
3275 case 0x11u: | |
3276 v124 = 51; | |
3277 a4 = pGlobalTXT_LocalizationStrings[440]; | |
3278 break; | |
3279 case 0x12u: | |
3280 v124 = 5; | |
3281 a4 = pGlobalTXT_LocalizationStrings[441]; | |
3282 break; | |
3283 case 0x13u: | |
3284 v124 = 95; | |
3285 a4 = pGlobalTXT_LocalizationStrings[229]; | |
3286 break; | |
3287 case 0x14u: | |
3288 v124 = 73; | |
3289 a4 = pGlobalTXT_LocalizationStrings[228]; | |
3290 break; | |
3291 default: | |
3292 a4 = 0; | |
3293 break; | |
3294 } | |
3295 if ( a4 ) | |
3296 { | |
3297 v54 = a4; | |
3298 v55 = GetSpellColor(v124); | |
3299 a1->DrawText((GUIFont *)a2, 28, v50, v55, v54, 0, 0, 0); | |
3300 v50 = v50 + BYTE5(a2->pConditions[0]) - 3; | |
3301 v51 = v120; | |
3302 } | |
3303 } | |
3304 LABEL_119: | |
3305 ++v51; | |
3306 v222 = (IDirectDrawSurface *)((char *)v222 + 1); | |
3307 v120 = v51; | |
3308 | |
3309 __debugbreak(); // fix condition | |
3310 } | |
3311 //while ( (signed int)((char *)&v222->lpVtbl + 1) < 22 ); | |
3312 while (true); | |
3313 if ( !a4 ) | |
3314 { | |
3315 v78 = 0; | |
3316 v74 = 0; | |
3317 v69 = 0; | |
3318 v66 = pGlobalTXT_LocalizationStrings[153]; | |
3319 LABEL_123: | |
3320 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78); | 3195 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78); |
3196 } | |
3197 else | |
3198 { | |
3199 a4 = 0; | |
3200 v51 = &v121->pActorBuffs[1]; | |
3201 v222 = 0; | |
3202 v120 = &v121->pActorBuffs[1]; | |
3203 do | |
3204 { | |
3205 if ( (signed __int64)v51->uExpireTime > 0 ) | |
3206 { | |
3207 switch ( (int)v51 ) | |
3208 { | |
3209 case 0u: | |
3210 v124 = 60; | |
3211 a4 = pGlobalTXT_LocalizationStrings[591]; | |
3212 break; | |
3213 case 1u: | |
3214 v124 = 82; | |
3215 a4 = pGlobalTXT_LocalizationStrings[649]; | |
3216 break; | |
3217 case 2u: | |
3218 v124 = 92; | |
3219 a4 = pGlobalTXT_LocalizationStrings[592]; | |
3220 break; | |
3221 case 3u: | |
3222 v124 = 63; | |
3223 a4 = pGlobalTXT_LocalizationStrings[4]; | |
3224 break; | |
3225 case 4u: | |
3226 v52 = pGlobalTXT_LocalizationStrings[220]; | |
3227 a4 = v52; | |
3228 v124 = 81; | |
3229 break; | |
3230 case 5u: | |
3231 v52 = pGlobalTXT_LocalizationStrings[162]; | |
3232 a4 = v52; | |
3233 v124 = 81; | |
3234 break; | |
3235 case 6u: | |
3236 v53 = pGlobalTXT_LocalizationStrings[593]; | |
3237 v124 = 35; | |
3238 a4 = v53; | |
3239 break; | |
3240 case 8u: | |
3241 v53 = pGlobalTXT_LocalizationStrings[608]; | |
3242 v124 = 62; | |
3243 a4 = v53; | |
3244 break; | |
3245 case 7u: | |
3246 case 9u: | |
3247 a4 = 0; | |
3248 v124 = 0; | |
3249 ++v51; | |
3250 v222 = (IDirectDrawSurface *)((char *)v222 + 1); | |
3251 v120 = v51; | |
3252 __debugbreak(); // fix condition | |
3253 continue; | |
3254 case 0xAu: | |
3255 v124 = 47; | |
3256 a4 = pGlobalTXT_LocalizationStrings[221]; | |
3257 break; | |
3258 case 0xBu: | |
3259 v124 = 66; | |
3260 a4 = pGlobalTXT_LocalizationStrings[607]; | |
3261 break; | |
3262 case 0xCu: | |
3263 v124 = 85; | |
3264 a4 = pGlobalTXT_LocalizationStrings[610]; | |
3265 break; | |
3266 case 0xDu: | |
3267 v124 = 86; | |
3268 a4 = pGlobalTXT_LocalizationStrings[609]; | |
3269 break; | |
3270 case 0xEu: | |
3271 v124 = 17; | |
3272 a4 = pGlobalTXT_LocalizationStrings[279]; | |
3273 break; | |
3274 case 0xFu: | |
3275 v124 = 38; | |
3276 a4 = pGlobalTXT_LocalizationStrings[442]; | |
3277 break; | |
3278 case 0x10u: | |
3279 v124 = 46; | |
3280 a4 = pGlobalTXT_LocalizationStrings[443]; | |
3281 break; | |
3282 case 0x11u: | |
3283 v124 = 51; | |
3284 a4 = pGlobalTXT_LocalizationStrings[440]; | |
3285 break; | |
3286 case 0x12u: | |
3287 v124 = 5; | |
3288 a4 = pGlobalTXT_LocalizationStrings[441]; | |
3289 break; | |
3290 case 0x13u: | |
3291 v124 = 95; | |
3292 a4 = pGlobalTXT_LocalizationStrings[229]; | |
3293 break; | |
3294 case 0x14u: | |
3295 v124 = 73; | |
3296 a4 = pGlobalTXT_LocalizationStrings[228]; | |
3297 break; | |
3298 default: | |
3299 a4 = 0; | |
3300 break; | |
3301 } | |
3302 if ( a4 ) | |
3303 { | |
3304 v54 = a4; | |
3305 v55 = GetSpellColor(v124); | |
3306 a1->DrawText((GUIFont *)a2, 28, v50, v55, v54, 0, 0, 0); | |
3307 v50 = v50 + BYTE5(a2->pConditions[0]) - 3; | |
3308 v51 = v120; | |
3309 } | |
3310 } | |
3311 | |
3312 ++v51; | |
3313 v222 = (IDirectDrawSurface *)((char *)v222 + 1); | |
3314 v120 = v51; | |
3315 | |
3316 __debugbreak(); // fix condition | |
3317 } | |
3318 //while ( (signed int)((char *)&v222->lpVtbl + 1) < 22 ); | |
3319 while (true); | |
3320 if ( !a4 ) | |
3321 { | |
3322 v78 = 0; | |
3323 v74 = 0; | |
3324 v69 = 0; | |
3325 v66 = pGlobalTXT_LocalizationStrings[153]; | |
3326 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78); | |
3327 } | |
3321 } | 3328 } |
3322 v56 = pFontSmallnum; | 3329 v56 = pFontSmallnum; |
3323 a4 = (char *)v106.uViewportY; | 3330 a4 = (char *)v106.uViewportY; |
3324 if ( v119 ) | 3331 if ( v119 ) |
3325 { | 3332 { |
3382 { | 3389 { |
3383 v80 = pGlobalTXT_LocalizationStrings[630]; | 3390 v80 = pGlobalTXT_LocalizationStrings[630]; |
3384 v76 = 0; | 3391 v76 = 0; |
3385 v71 = pGlobalTXT_LocalizationStrings[628]; | 3392 v71 = pGlobalTXT_LocalizationStrings[628]; |
3386 v68 = "%s\f%05u\t080%s\n"; | 3393 v68 = "%s\f%05u\t080%s\n"; |
3387 goto LABEL_144; | |
3388 } | |
3389 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[628]; | |
3390 v59 = v121; | |
3391 v114 = v121->pMonsterInfo.uSpell1ID; | |
3392 if ( v114 && v121->pMonsterInfo.uSpell2ID ) | |
3393 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[629]; | |
3394 if ( v114 ) | |
3395 { | |
3396 sprintf(pTmpBuf, "%s\f%05u\t060%s\n", v120, 0, pSpellStats->pInfos[v114].pShortName); | |
3397 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | |
3398 v58 = LOBYTE(v56->uFontHeight); | |
3399 a4 = &a4[v58 - 3]; | |
3400 v59 = v121; | |
3401 } | |
3402 v60 = v59->pMonsterInfo.uSpell2ID; | |
3403 if ( v60 ) | |
3404 { | |
3405 sprintf(pTmpBuf, "\f%05u\t060%s\n", 0, pSpellStats->pInfos[v60].pShortName); | |
3406 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | |
3407 v58 = LOBYTE(v56->uFontHeight); | |
3408 a4 = &a4[v58 - 3]; | |
3409 v59 = v121; | |
3410 } | |
3411 if ( !v59->pMonsterInfo.uSpell1ID && !v59->pMonsterInfo.uSpell2ID ) | |
3412 { | |
3413 v80 = pGlobalTXT_LocalizationStrings[153]; | |
3414 v76 = 0; | |
3415 v71 = pGlobalTXT_LocalizationStrings[628]; | |
3416 v68 = "%s\f%05u\t060%s\n"; | |
3417 LABEL_144: | |
3418 sprintf(pTmpBuf, v68, v71, v76, v80); | 3394 sprintf(pTmpBuf, v68, v71, v76, v80); |
3419 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | 3395 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); |
3420 v58 = LOBYTE(v56->uFontHeight); | 3396 v58 = LOBYTE(v56->uFontHeight); |
3421 a4 = &a4[v58 - 3]; | 3397 a4 = &a4[v58 - 3]; |
3398 } | |
3399 else | |
3400 { | |
3401 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[628]; | |
3402 v59 = v121; | |
3403 v114 = v121->pMonsterInfo.uSpell1ID; | |
3404 if ( v114 && v121->pMonsterInfo.uSpell2ID ) | |
3405 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[629]; | |
3406 if ( v114 ) | |
3407 { | |
3408 sprintf(pTmpBuf, "%s\f%05u\t060%s\n", v120, 0, pSpellStats->pInfos[v114].pShortName); | |
3409 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | |
3410 v58 = LOBYTE(v56->uFontHeight); | |
3411 a4 = &a4[v58 - 3]; | |
3412 v59 = v121; | |
3413 } | |
3414 v60 = v59->pMonsterInfo.uSpell2ID; | |
3415 if ( v60 ) | |
3416 { | |
3417 sprintf(pTmpBuf, "\f%05u\t060%s\n", 0, pSpellStats->pInfos[v60].pShortName); | |
3418 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | |
3419 v58 = LOBYTE(v56->uFontHeight); | |
3420 a4 = &a4[v58 - 3]; | |
3421 v59 = v121; | |
3422 } | |
3423 if ( !v59->pMonsterInfo.uSpell1ID && !v59->pMonsterInfo.uSpell2ID ) | |
3424 { | |
3425 v80 = pGlobalTXT_LocalizationStrings[153]; | |
3426 v76 = 0; | |
3427 v71 = pGlobalTXT_LocalizationStrings[628]; | |
3428 v68 = "%s\f%05u\t060%s\n"; | |
3429 sprintf(pTmpBuf, v68, v71, v76, v80); | |
3430 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | |
3431 v58 = LOBYTE(v56->uFontHeight); | |
3432 a4 = &a4[v58 - 3]; | |
3433 } | |
3422 } | 3434 } |
3423 a4 = &a4[v58 - 3]; | 3435 a4 = &a4[v58 - 3]; |
3424 a1->DrawText(v56, 150, (int)a4, a5, pGlobalTXT_LocalizationStrings[626], 0, 0, 0); | 3436 a1->DrawText(v56, 150, (int)a4, a5, pGlobalTXT_LocalizationStrings[626], 0, 0, 0); |
3425 a4 = &a4[LOBYTE(v56->uFontHeight) - 3]; | 3437 a4 = &a4[LOBYTE(v56->uFontHeight) - 3]; |
3426 v85[0] = pGlobalTXT_LocalizationStrings[87]; | 3438 v85[0] = pGlobalTXT_LocalizationStrings[87]; |
4320 } | 4332 } |
4321 uLastPointedObjectID = pMouse->uPointingObjectID; | 4333 uLastPointedObjectID = pMouse->uPointingObjectID; |
4322 return; | 4334 return; |
4323 } | 4335 } |
4324 v1 = uNumVisibleWindows; | 4336 v1 = uNumVisibleWindows; |
4325 if ( uNumVisibleWindows <= 0 ) | 4337 if ( uNumVisibleWindows > 0 ) |
4326 { | 4338 { |
4327 LABEL_38: | 4339 while ( 1 ) // some other fullscreen ui |
4340 { | |
4341 pWindow = &pWindowList[pVisibleWindowsIdxs[v1] - 1]; | |
4342 if ( (signed int)pX >= (signed int)pWindow->uFrameX | |
4343 && (signed int)pX <= (signed int)pWindow->uFrameZ | |
4344 && (signed int)pY >= (signed int)pWindow->uFrameY | |
4345 && (signed int)pY <= (signed int)pWindow->uFrameW ) | |
4346 { | |
4347 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) | |
4348 { | |
4349 if ( !pButton ) | |
4350 break; | |
4351 if ( pButton->uButtonType == 1 ) | |
4352 { | |
4353 if ( (signed int)pX >= (signed int)pButton->uX | |
4354 && (signed int)pX <= (signed int)pButton->uZ | |
4355 && (signed int)pY >= (signed int)pButton->uY | |
4356 && (signed int)pY <= (signed int)pButton->uW ) | |
4357 { | |
4358 //LABEL_24: | |
4359 pMessageType1 = (UIMessageType)pButton->field_1C; | |
4360 if ( pMessageType1 ) | |
4361 { | |
4362 v12 = pButton->uControlParam; | |
4363 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); | |
4364 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
4365 { | |
4366 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; | |
4367 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; | |
4368 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
4369 //LABEL_27: | |
4370 ++pMessageQueue_50CBD0->uNumMessages; | |
4371 }*/ | |
4372 } | |
4373 //LABEL_28: | |
4374 v13 = pButton->pButtonName; | |
4375 //_set_status_and_ret: | |
4376 sub_41C0B8_set_status_string(v13); | |
4377 //LABEL_131: | |
4378 uLastPointedObjectID = 1; | |
4379 return; | |
4380 } | |
4381 } | |
4382 else | |
4383 { | |
4384 if ( pButton->uButtonType == 2 ) | |
4385 { | |
4386 v45 = pX - pButton->uX; | |
4387 v45 = pY - pButton->uY; | |
4388 if ( (double)(signed int)pButton->uWidth != 0.0 ) | |
4389 { | |
4390 if ( (double)(signed int)pButton->uHeight != 0.0 ) | |
4391 { | |
4392 //UNDEF(v8); | |
4393 //if ( v9 | v10 ) | |
4394 //goto LABEL_24; | |
4395 //{ | |
4396 pMessageType1 = (UIMessageType)pButton->field_1C; | |
4397 if ( pMessageType1 ) | |
4398 { | |
4399 v12 = pButton->uControlParam; | |
4400 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); | |
4401 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
4402 { | |
4403 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; | |
4404 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; | |
4405 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
4406 ++pMessageQueue_50CBD0->uNumMessages; | |
4407 }*/ | |
4408 } | |
4409 v13 = pButton->pButtonName; | |
4410 sub_41C0B8_set_status_string(v13); | |
4411 uLastPointedObjectID = 1; | |
4412 return; | |
4413 //} | |
4414 } | |
4415 } | |
4416 } | |
4417 else // click on skill | |
4418 { | |
4419 if ( pButton->uButtonType == 3 | |
4420 && (signed int)pX >= (signed int)pButton->uX | |
4421 && (signed int)pX <= (signed int)pButton->uZ | |
4422 && (signed int)pY >= (signed int)pButton->uY | |
4423 && (signed int)pY <= (signed int)pButton->uW ) | |
4424 { | |
4425 //LABEL_19: | |
4426 pPlayer = pPlayers[uActiveCharacter]; | |
4427 v5 = LOBYTE(pPlayer->pActiveSkills[pButton->uControlParam]); | |
4428 v6 = pPlayer->uSkillPoints; | |
4429 v7 = (v5 & 0x3F) + 1; | |
4430 if ( v6 < v7 ) | |
4431 { | |
4432 v41 = v7 - v6; | |
4433 v39 = pGlobalTXT_LocalizationStrings[469];// "You need %d more Skill Points to advance here" | |
4434 } | |
4435 else | |
4436 { | |
4437 v41 = v7; | |
4438 v39 = pGlobalTXT_LocalizationStrings[468];// "Clicking here will spend %d Skill Points" | |
4439 } | |
4440 sprintf(Str1, v39, v41); | |
4441 v13 = Str1; | |
4442 //goto _set_status_and_ret; | |
4443 sub_41C0B8_set_status_string(v13); | |
4444 uLastPointedObjectID = 1; | |
4445 return; | |
4446 } | |
4447 } | |
4448 } | |
4449 } | |
4450 } | |
4451 if ( pWindow->uFrameHeight == 480 ) | |
4452 break; | |
4453 --v1; | |
4454 if ( v1 <= 0 ) | |
4455 { | |
4456 break; | |
4457 } | |
4458 } | |
4459 } | |
4460 if ( uNumVisibleWindows <= 0 || (uNumVisibleWindows > 0 && pWindow->uFrameHeight != 480 && v1 <= 0)) | |
4461 { | |
4328 if ( pCurrentScreen == SCREEN_CHEST ) | 4462 if ( pCurrentScreen == SCREEN_CHEST ) |
4329 { | 4463 { |
4330 sub_42038D(); | 4464 sub_42038D(); |
4331 //goto _return; | 4465 //goto _return; |
4332 if ( pMouse->uPointingObjectID == 0 ) | 4466 if ( pMouse->uPointingObjectID == 0 ) |
4534 bForceDrawStatusBar = 1; | 4668 bForceDrawStatusBar = 1; |
4535 } | 4669 } |
4536 } | 4670 } |
4537 uLastPointedObjectID = pMouse->uPointingObjectID; | 4671 uLastPointedObjectID = pMouse->uPointingObjectID; |
4538 return; | 4672 return; |
4539 } | |
4540 while ( 1 ) // some other fullscreen ui | |
4541 { | |
4542 pWindow = &pWindowList[pVisibleWindowsIdxs[v1] - 1]; | |
4543 if ( (signed int)pX >= (signed int)pWindow->uFrameX | |
4544 && (signed int)pX <= (signed int)pWindow->uFrameZ | |
4545 && (signed int)pY >= (signed int)pWindow->uFrameY | |
4546 && (signed int)pY <= (signed int)pWindow->uFrameW ) | |
4547 { | |
4548 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) | |
4549 { | |
4550 if ( !pButton ) | |
4551 break; | |
4552 if ( pButton->uButtonType == 1 ) | |
4553 { | |
4554 if ( (signed int)pX >= (signed int)pButton->uX | |
4555 && (signed int)pX <= (signed int)pButton->uZ | |
4556 && (signed int)pY >= (signed int)pButton->uY | |
4557 && (signed int)pY <= (signed int)pButton->uW ) | |
4558 { | |
4559 //LABEL_24: | |
4560 pMessageType1 = (UIMessageType)pButton->field_1C; | |
4561 if ( pMessageType1 ) | |
4562 { | |
4563 v12 = pButton->uControlParam; | |
4564 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); | |
4565 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
4566 { | |
4567 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; | |
4568 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; | |
4569 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
4570 //LABEL_27: | |
4571 ++pMessageQueue_50CBD0->uNumMessages; | |
4572 }*/ | |
4573 } | |
4574 //LABEL_28: | |
4575 v13 = pButton->pButtonName; | |
4576 //_set_status_and_ret: | |
4577 sub_41C0B8_set_status_string(v13); | |
4578 //LABEL_131: | |
4579 uLastPointedObjectID = 1; | |
4580 return; | |
4581 } | |
4582 } | |
4583 else | |
4584 { | |
4585 if ( pButton->uButtonType == 2 ) | |
4586 { | |
4587 v45 = pX - pButton->uX; | |
4588 v45 = pY - pButton->uY; | |
4589 if ( (double)(signed int)pButton->uWidth != 0.0 ) | |
4590 { | |
4591 if ( (double)(signed int)pButton->uHeight != 0.0 ) | |
4592 { | |
4593 //UNDEF(v8); | |
4594 //if ( v9 | v10 ) | |
4595 //goto LABEL_24; | |
4596 //{ | |
4597 pMessageType1 = (UIMessageType)pButton->field_1C; | |
4598 if ( pMessageType1 ) | |
4599 { | |
4600 v12 = pButton->uControlParam; | |
4601 pMessageQueue_50CBD0->AddMessage(pMessageType1, v12, 0); | |
4602 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | |
4603 { | |
4604 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = pMessageType1; | |
4605 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v12; | |
4606 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
4607 ++pMessageQueue_50CBD0->uNumMessages; | |
4608 }*/ | |
4609 } | |
4610 v13 = pButton->pButtonName; | |
4611 sub_41C0B8_set_status_string(v13); | |
4612 uLastPointedObjectID = 1; | |
4613 return; | |
4614 //} | |
4615 } | |
4616 } | |
4617 } | |
4618 else // click on skill | |
4619 { | |
4620 if ( pButton->uButtonType == 3 | |
4621 && (signed int)pX >= (signed int)pButton->uX | |
4622 && (signed int)pX <= (signed int)pButton->uZ | |
4623 && (signed int)pY >= (signed int)pButton->uY | |
4624 && (signed int)pY <= (signed int)pButton->uW ) | |
4625 { | |
4626 //LABEL_19: | |
4627 pPlayer = pPlayers[uActiveCharacter]; | |
4628 v5 = LOBYTE(pPlayer->pActiveSkills[pButton->uControlParam]); | |
4629 v6 = pPlayer->uSkillPoints; | |
4630 v7 = (v5 & 0x3F) + 1; | |
4631 if ( v6 < v7 ) | |
4632 { | |
4633 v41 = v7 - v6; | |
4634 v39 = pGlobalTXT_LocalizationStrings[469];// "You need %d more Skill Points to advance here" | |
4635 } | |
4636 else | |
4637 { | |
4638 v41 = v7; | |
4639 v39 = pGlobalTXT_LocalizationStrings[468];// "Clicking here will spend %d Skill Points" | |
4640 } | |
4641 sprintf(Str1, v39, v41); | |
4642 v13 = Str1; | |
4643 //goto _set_status_and_ret; | |
4644 sub_41C0B8_set_status_string(v13); | |
4645 uLastPointedObjectID = 1; | |
4646 return; | |
4647 } | |
4648 } | |
4649 } | |
4650 } | |
4651 } | |
4652 if ( pWindow->uFrameHeight == 480 ) | |
4653 break; | |
4654 --v1; | |
4655 if ( v1 <= 0 ) | |
4656 { | |
4657 goto LABEL_38; | |
4658 } | |
4659 } | 4673 } |
4660 } | 4674 } |
4661 | 4675 |
4662 | 4676 |
4663 //----- (00421626) -------------------------------------------------------- | 4677 //----- (00421626) -------------------------------------------------------- |