Mercurial > mm7
comparison UI/UiGame.cpp @ 2021:b60eaf28bf0c
monster_info_distance_limit
author | Ritor1 |
---|---|
date | Mon, 11 Nov 2013 23:57:02 +0600 |
parents | b123afb8246b |
children | 23ef3589440f |
comparison
equal
deleted
inserted
replaced
2020:b123afb8246b | 2021:b60eaf28bf0c |
---|---|
1161 unsigned int pX; // [sp+D4h] [bp-Ch]@1 | 1161 unsigned int pX; // [sp+D4h] [bp-Ch]@1 |
1162 unsigned int pY; // [sp+D8h] [bp-8h]@1 | 1162 unsigned int pY; // [sp+D8h] [bp-8h]@1 |
1163 unsigned int v45; // [sp+DCh] [bp-4h]@21 | 1163 unsigned int v45; // [sp+DCh] [bp-4h]@21 |
1164 | 1164 |
1165 int interaction_distance_limit = 512; | 1165 int interaction_distance_limit = 512; |
1166 int monster_info_distance_limit = 5120; | |
1166 | 1167 |
1167 pMouse->uPointingObjectID = 0; | 1168 pMouse->uPointingObjectID = 0; |
1168 pMouse->GetClickPos(&pX, &pY); | 1169 pMouse->GetClickPos(&pX, &pY); |
1169 if ( pX < 0 || pX > 639 || pY < 0 || pY > 479 )//границы окна игры | 1170 if ( pX < 0 || pX > 639 || pY < 0 || pY > 479 )//границы окна игры |
1170 return; | 1171 return; |
1207 pFooterString[0] = 0; | 1208 pFooterString[0] = 0; |
1208 bForceDrawFooter = 1; | 1209 bForceDrawFooter = 1; |
1209 uLastPointedObjectID = 0; | 1210 uLastPointedObjectID = 0; |
1210 return; | 1211 return; |
1211 } | 1212 } |
1212 if ( v18 >= (signed int)0x2000000u || pParty->pPickedItem.uItemID ) | 1213 if ( HIWORD(v18) < interaction_distance_limit && !pParty->pPickedItem.uItemID ) |
1213 { | 1214 { |
1214 GameUI_SetFooterString(pSpriteObjects[v19].stru_24.GetDisplayName()); | 1215 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[470], pSpriteObjects[v19].stru_24.GetDisplayName());// "Get %s" |
1215 if ( pMouse->uPointingObjectID == 0 ) | 1216 GameUI_SetFooterString(pTmpBuf.data()); |
1216 { | |
1217 if ( uLastPointedObjectID != 0 ) | |
1218 { | |
1219 pFooterString[0] = 0; | |
1220 bForceDrawFooter = 1; | |
1221 } | |
1222 } | |
1223 uLastPointedObjectID = pMouse->uPointingObjectID; | |
1224 return; | 1217 return; |
1225 } | 1218 } |
1226 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[470], pSpriteObjects[v19].stru_24.GetDisplayName());// "Get %s" | 1219 GameUI_SetFooterString(pSpriteObjects[v19].stru_24.GetDisplayName()); |
1227 GameUI_SetFooterString(pTmpBuf.data()); | |
1228 if ( pMouse->uPointingObjectID == 0 ) | 1220 if ( pMouse->uPointingObjectID == 0 ) |
1229 { | 1221 { |
1230 if ( uLastPointedObjectID != 0 ) | 1222 if ( uLastPointedObjectID != 0 ) |
1231 { | 1223 { |
1232 pFooterString[0] = 0; | 1224 pFooterString[0] = 0; |
1244 if ( pLevelDecorations[v19].IsInteractive() ) | 1236 if ( pLevelDecorations[v19].IsInteractive() ) |
1245 pText = pNPCTopics[stru_5E4C90_MapPersistVars._decor_events[pLevelDecorations[v19]._idx_in_stru123 - 75] + 379].pTopic;//неверно для костра | 1237 pText = pNPCTopics[stru_5E4C90_MapPersistVars._decor_events[pLevelDecorations[v19]._idx_in_stru123 - 75] + 379].pTopic;//неверно для костра |
1246 else | 1238 else |
1247 pText = pDecorationList->pDecorations[pLevelDecorations[v19].uDecorationDescID].field_20; | 1239 pText = pDecorationList->pDecorations[pLevelDecorations[v19].uDecorationDescID].field_20; |
1248 GameUI_SetFooterString(pText); | 1240 GameUI_SetFooterString(pText); |
1249 if ( pMouse->uPointingObjectID == 0 ) | 1241 } |
1250 { | 1242 else |
1251 if ( uLastPointedObjectID != 0 ) | 1243 { |
1252 { | 1244 if ( GetEventHintString(pLevelDecorations[v19].uEventID) ) |
1253 pFooterString[0] = 0; | 1245 GameUI_SetFooterString(GetEventHintString(pLevelDecorations[v19].uEventID)); |
1254 bForceDrawFooter = 1; | 1246 } |
1255 } | |
1256 } | |
1257 uLastPointedObjectID = pMouse->uPointingObjectID; | |
1258 return; | |
1259 } | |
1260 if ( !GetEventHintString(pLevelDecorations[v19].uEventID) ) | |
1261 { | |
1262 if ( pMouse->uPointingObjectID == 0 ) | |
1263 { | |
1264 if ( uLastPointedObjectID != 0 ) | |
1265 { | |
1266 pFooterString[0] = 0; | |
1267 bForceDrawFooter = 1; | |
1268 } | |
1269 } | |
1270 uLastPointedObjectID = pMouse->uPointingObjectID; | |
1271 return; | |
1272 } | |
1273 GameUI_SetFooterString(GetEventHintString(pLevelDecorations[v19].uEventID)); | |
1274 if ( pMouse->uPointingObjectID == 0 ) | 1247 if ( pMouse->uPointingObjectID == 0 ) |
1275 { | 1248 { |
1276 if ( uLastPointedObjectID != 0 ) | 1249 if ( uLastPointedObjectID != 0 ) |
1277 { | 1250 { |
1278 pFooterString[0] = 0; | 1251 pFooterString[0] = 0; |
1340 pFooterString[0] = 0; | 1313 pFooterString[0] = 0; |
1341 bForceDrawFooter = 1; | 1314 bForceDrawFooter = 1; |
1342 uLastPointedObjectID = 0; | 1315 uLastPointedObjectID = 0; |
1343 return; | 1316 return; |
1344 } | 1317 } |
1345 else | 1318 if (PID_TYPE(v18) == OBJECT_Actor && HIWORD(v18) < monster_info_distance_limit ) |
1346 { | 1319 { |
1347 if (PID_TYPE(v18) != OBJECT_Actor) | |
1348 { | |
1349 pMouse->uPointingObjectID = 0; | |
1350 if ( uLastPointedObjectID != 0 ) | |
1351 { | |
1352 pFooterString[0] = 0; | |
1353 bForceDrawFooter = 1; | |
1354 } | |
1355 uLastPointedObjectID = pMouse->uPointingObjectID; | |
1356 return; | |
1357 } | |
1358 if ( v18 >= 335544320 ) | |
1359 { | |
1360 pMouse->uPointingObjectID = 0; | |
1361 if ( pMouse->uPointingObjectID == 0 ) | |
1362 { | |
1363 if ( uLastPointedObjectID != 0 ) | |
1364 { | |
1365 pFooterString[0] = 0; | |
1366 bForceDrawFooter = 1; | |
1367 } | |
1368 } | |
1369 uLastPointedObjectID = pMouse->uPointingObjectID; | |
1370 return; | |
1371 } | |
1372 v28 = pTmpBuf.data(); | |
1373 if ( pActors[v19].dword_000334_unique_name ) | 1320 if ( pActors[v19].dword_000334_unique_name ) |
1374 pText = pMonsterStats->pPlaceStrings[pActors[v19].dword_000334_unique_name]; | 1321 pText = pMonsterStats->pPlaceStrings[pActors[v19].dword_000334_unique_name]; |
1375 else | 1322 else |
1376 pText = pMonsterStats->pInfos[pActors[v19].pMonsterInfo.uID].pName; | 1323 pText = pMonsterStats->pInfos[pActors[v19].pMonsterInfo.uID].pName; |
1377 strncpy(pTmpBuf.data(), pText, 0x7D0u); | 1324 strncpy(pTmpBuf.data(), pText, 2000); |
1378 } | 1325 GameUI_SetFooterString(pTmpBuf.data()); |
1379 GameUI_SetFooterString(v28); | 1326 } |
1380 if ( pMouse->uPointingObjectID == 0 ) | 1327 if ( pMouse->uPointingObjectID == 0 ) |
1381 { | 1328 { |
1382 if ( uLastPointedObjectID != 0 ) | 1329 if ( uLastPointedObjectID != 0 ) |
1383 { | 1330 { |
1384 pFooterString[0] = 0; | 1331 pFooterString[0] = 0; |