comparison UI/UICharacter.cpp @ 1980:c1c74df0a33e

changing most of auto types to their actual types
author Grumpy7
date Wed, 30 Oct 2013 00:47:37 -0700
parents 2233efdc8d00
children 33787c8938a5
comparison
equal deleted inserted replaced
1979:92dfa0cafbe3 1980:c1c74df0a33e
477 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0); 477 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0);
478 478
479 int num_skills_drawn = 0; 479 int num_skills_drawn = 0;
480 for (int i = 0; i < skill_list_size; ++i) 480 for (int i = 0; i < skill_list_size; ++i)
481 { 481 {
482 auto skill = (PLAYER_SKILL_TYPE)skill_list[i]; 482 PLAYER_SKILL_TYPE skill = (PLAYER_SKILL_TYPE)skill_list[i];
483 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j) 483 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j)
484 { 484 {
485 auto v8 = pGUIWindow_CurrentMenu->pControlsHead; 485 GUIButton* v8 = pGUIWindow_CurrentMenu->pControlsHead;
486 486
487 for (int v7 = j; v7 > 0; --v7) 487 for (int v7 = j; v7 > 0; --v7)
488 v8 = v8->pNext; 488 v8 = v8->pNext;
489 489
490 auto v9 = v8->field_1C; 490 int v9 = v8->field_1C;
491 if ((short)(v8->field_1C) >= 0) 491 if ((short)(v8->field_1C) >= 0)
492 continue; 492 continue;
493 if ( (v9 & 0x7FFF) != skill ) 493 if ( (v9 & 0x7FFF) != skill )
494 continue; 494 continue;
495 495
496 ++num_skills_drawn; 496 ++num_skills_drawn;
497 y_offset = v8->uY; 497 y_offset = v8->uY;
498 498
499 auto skill_value = player->pActiveSkills[skill]; 499 ushort skill_value = player->pActiveSkills[skill];
500 auto skill_level = skill_value & 0x3F; 500 int skill_level = skill_value & 0x3F;
501 501
502 uint skill_color = 0; 502 uint skill_color = 0;
503 uint skill_mastery_color = 0; 503 uint skill_mastery_color = 0;
504 if (player->uSkillPoints > skill_level) 504 if (player->uSkillPoints > skill_level)
505 skill_color = ui_character_skill_upgradeable_color; 505 skill_color = ui_character_skill_upgradeable_color;
1611 } 1611 }
1612 } 1612 }
1613 1613
1614 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id) 1614 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id)
1615 { 1615 {
1616 auto item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE); 1616 Texture* item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE);
1617 1617
1618 if (item->uAttributes & 0xF0) // enchant animation 1618 if (item->uAttributes & 0xF0) // enchant animation
1619 { 1619 {
1620 Texture *enchantment_texture = nullptr; 1620 Texture *enchantment_texture = nullptr;
1621 switch (item->uAttributes & 0xF0) 1621 switch (item->uAttributes & 0xF0)
1767 } 1767 }
1768 } 1768 }
1769 memset(byte_5111F6.data(), 0, sizeof(byte_5111F6)); 1769 memset(byte_5111F6.data(), 0, sizeof(byte_5111F6));
1770 for (uint i = 0; i < 4; ++i) 1770 for (uint i = 0; i < 4; ++i)
1771 { 1771 {
1772 auto player = &pParty->pPlayers[i]; 1772 Player* player = &pParty->pPlayers[i];
1773 1773
1774 if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6[0] = 1; 1774 if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6[0] = 1;
1775 if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6[1] = 1; 1775 if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6[1] = 1;
1776 if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6[2] = 1; 1776 if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6[2] = 1;
1777 if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6[3] = 1; 1777 if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6[3] = 1;