comparison mm7_6.cpp @ 1980:c1c74df0a33e

changing most of auto types to their actual types
author Grumpy7
date Wed, 30 Oct 2013 00:47:37 -0700
parents 0f62a2b8bd0a
children 33787c8938a5
comparison
equal deleted inserted replaced
1979:92dfa0cafbe3 1980:c1c74df0a33e
338 338
339 //v0 = uActiveCharacter; 339 //v0 = uActiveCharacter;
340 //v27 = 6972 * uActiveCharacter; 340 //v27 = 6972 * uActiveCharacter;
341 //v1 = &pParty->pPlayers[uActiveCharacter-1]; 341 //v1 = &pParty->pPlayers[uActiveCharacter-1];
342 //result = pParty->pPlayers[uActiveCharacter-1].CanAct(); 342 //result = pParty->pPlayers[uActiveCharacter-1].CanAct();
343 auto player = &pParty->pPlayers[uActiveCharacter - 1]; 343 Player* player = &pParty->pPlayers[uActiveCharacter - 1];
344 if (!player->CanAct()) 344 if (!player->CanAct())
345 return; 345 return;
346 346
347 CastSpellInfoHelpers::_427D48(); 347 CastSpellInfoHelpers::_427D48();
348 //v3 = 0; 348 //v3 = 0;
361 int laser_weapon_item_id = 0; 361 int laser_weapon_item_id = 0;
362 362
363 int main_hand_idx = player->pEquipment.uMainHand; 363 int main_hand_idx = player->pEquipment.uMainHand;
364 if (main_hand_idx) 364 if (main_hand_idx)
365 { 365 {
366 auto item = &player->pInventoryItemList[main_hand_idx - 1]; 366 ItemGen* item = &player->pInventoryItemList[main_hand_idx - 1];
367 //v5 = (char *)v1 + 36 * v4; 367 //v5 = (char *)v1 + 36 * v4;
368 if (!item->IsBroken()) 368 if (!item->IsBroken())
369 { 369 {
370 //v28b = &v1->pInventoryItems[v4].uItemID; 370 //v28b = &v1->pInventoryItems[v4].uItemID;
371 //v6 = v1->pInventoryItems[v4].uItemID;//*((int *)v5 + 124); 371 //v6 = v1->pInventoryItems[v4].uItemID;//*((int *)v5 + 124);
394 target_pid = stru_50C198.FindClosestActor(5120, 0, 0); 394 target_pid = stru_50C198.FindClosestActor(5120, 0, 0);
395 target_type = PID_TYPE(target_pid); 395 target_type = PID_TYPE(target_pid);
396 target_id = PID_ID(target_pid); 396 target_id = PID_ID(target_pid);
397 } 397 }
398 398
399 auto actor = &pActors[target_id]; 399 Actor* actor = &pActors[target_id];
400 int actor_distance = 0; 400 int actor_distance = 0;
401 if (target_type == OBJECT_Actor) 401 if (target_type == OBJECT_Actor)
402 { 402 {
403 int distance_x = actor->vPosition.x - pParty->vPosition.x, 403 int distance_x = actor->vPosition.x - pParty->vPosition.x,
404 distance_y = actor->vPosition.y - pParty->vPosition.y, 404 distance_y = actor->vPosition.y - pParty->vPosition.y,
990 PartyAction partyAction; // [sp-14h] [bp-1Ch]@20 990 PartyAction partyAction; // [sp-14h] [bp-1Ch]@20
991 InputAction inputAction; // [sp+0h] [bp-8h]@7 991 InputAction inputAction; // [sp+0h] [bp-8h]@7
992 int v24; // [sp+4h] [bp-4h]@87 992 int v24; // [sp+4h] [bp-4h]@87
993 993
994 pGame->pKeyboardInstance->EnterCriticalSection(); 994 pGame->pKeyboardInstance->EnterCriticalSection();
995 auto pKeyboard = pGame->pKeyboardInstance; 995 Keyboard* pKeyboard = pGame->pKeyboardInstance;
996 if (!bAlwaysRun) 996 if (!bAlwaysRun)
997 { 997 {
998 if (pKeyboard->IsShiftHeld()) 998 if (pKeyboard->IsShiftHeld())
999 pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING; 999 pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING;
1000 else 1000 else