World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
См. исходные тексты.
◆ EngineIoc
◆ CharacterUI_DrawTooltip() [1/2]
void CharacterUI_DrawTooltip |
( |
const char * |
title, |
|
|
String & |
content |
|
) |
| |
См. определение в файле UIPopup.cpp строка 51
56 memset(&popup_window, 0, 0x54u);
Перекрестные ссылки GUIFont::CalcTextHeight(), GUIWindow::DrawMessageBox(), GUIWindow::DrawText(), GUIWindow::DrawTitleText(), Mouse::GetCursorPos(), GUIFont::GetHeight(), pFontCreate, pFontLucida, pFontSmallnum, pMouse, StringPrintf(), GUIWindow::uFrameHeight, GUIWindow::uFrameW, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, GUIWindow::uFrameZ, ui_character_tooltip_header_default_color и Point::y.
Используется в CharacterUI_DrawTooltip(), CharacterUI_SkillsTab_ShowHint() и CharacterUI_StatsTab_ShowHint().
◆ CharacterUI_DrawTooltip() [2/2]
void CharacterUI_DrawTooltip |
( |
const char * |
title, |
|
|
const char * |
content |
|
) |
| |
◆ DrawPopupWindow()
void DrawPopupWindow |
( |
unsigned int |
uX, |
|
|
unsigned int |
uY, |
|
|
unsigned int |
uWidth, |
|
|
unsigned int |
uHeight |
|
) |
| |
См. определение в файле UIPopup.cpp строка 89
91 unsigned int uNumTiles;
97 render->SetUIClipRect(uX, uY, uX + uWidth, uY + uHeight);
102 uNumTiles = uWidth / parchment_width;
103 if (uWidth % parchment_width) ++uNumTiles;
105 for (
uint j = 0; j <= uHeight / parchment_height; j++) {
106 coord_x = uX - parchment_width;
107 for (
uint i = uNumTiles + 1; i; --i) {
108 coord_x += parchment_width;
109 render->DrawTextureNew(coord_x / 640.0
f, coord_y / 480.0
f,
112 coord_y += parchment_height;
116 render->DrawTextureAlphaNew(
119 render->DrawTextureAlphaNew(
122 render->DrawTextureAlphaNew(
137 render->DrawTextureAlphaNew(
x / 640.0
f, uY / 480.0
f,
139 render->DrawTextureAlphaNew(
156 render->DrawTextureAlphaNew(uX / 640.0
f,
y / 480.0
f,
158 render->DrawTextureAlphaNew(
164 render->ResetUIClipRect();
Перекрестные ссылки Image::GetHeight(), Image::GetWidth(), messagebox_border_bottom, messagebox_border_left, messagebox_border_right, messagebox_border_top, messagebox_corner_w, messagebox_corner_x, messagebox_corner_y, messagebox_corner_z, parchment и render.
Используется в GUIWindow::DrawMessageBox().
◆ GameUI_DrawItemInfo()
void GameUI_DrawItemInfo |
( |
struct ItemGen * |
inspect_item | ) |
|
См. определение в файле UIPopup.cpp строка 168
187 if (!inspect_item->
uItemID)
return;
189 auto inspect_item_image =
192 iteminfo_window.
sHint.clear();
203 v78 = 100 - inspect_item_image->GetWidth();
204 v81 = 144 - inspect_item_image->GetHeight();
205 if (v78 > 0) v78 = v78 / 2;
266 render->DrawTransparentRedShade(
267 (iteminfo_window.
uFrameX + v78) / 640.0f,
268 (v81 + iteminfo_window.
uFrameY + 30) / 480.0f, inspect_item_image);
281 render->ResetUIClipRect();
283 if (inspect_item_image) {
284 inspect_item_image->Release();
285 inspect_item_image =
nullptr;
302 render->DrawTextureAlphaNew(
303 (iteminfo_window.
uFrameX + v78) / 640.0f,
304 (v81 + iteminfo_window.
uFrameY + 30) / 480.0f, inspect_item_image);
316 render->ResetUIClipRect();
318 if (inspect_item_image) {
319 inspect_item_image->Release();
320 inspect_item_image =
nullptr;
329 strcpy(out_text, str.c_str());
336 sprintf(out_text + 100,
"%s: +%d %s: %dd%d",
345 strcat(out_text + 100, mod);
351 sprintf(out_text + 100,
"%s: +%d %s: %dd%d",
360 strcat(out_text + 100, mod);
414 for (
uint i = 1; i <= 3; i++) {
430 if ((
signed int)Str > (
signed int)iteminfo_window.
uFrameHeight)
461 render->DrawTextureAlphaNew((iteminfo_window.
uFrameX + v78) / 640.0f,
464 inspect_item_image->GetHeight()) /
469 v34 = (int)(v85 + 35);
471 for (
uint i = 1; i <= 3; i++) {
497 render->ResetUIClipRect();
505 String txt4 =
"Duration:";
532 txt4.data(), 0, 0, 0);
540 txt2.data(), 0, 0, 0);
547 render->ResetUIClipRect();
553 int tempatt = (inspect_item->
uAttributes & 0xFFFF0000) | r_mask;
559 render->ResetUIClipRect();
Перекрестные ссылки assets, GUIFont::CalcTextHeight(), Color16(), GUIWindow::DrawMessageBox(), GUIWindow::DrawText(), GUIWindow::DrawTitleText(), dword_4E455C, EQUIP_AMULET, EQUIP_ARMOUR, EQUIP_BELT, EQUIP_BOOTS, EQUIP_BOW, EQUIP_CLOAK, EQUIP_GAUNTLETS, EQUIP_GOLD, EQUIP_HELMET, EQUIP_POTION, EQUIP_REAGENT, EQUIP_RING, EQUIP_SHIELD, EQUIP_SINGLE_HANDED, EQUIP_TWO_HANDED, ItemGen::expirte_time, SummonedItem::field_14_exprie_month, SummonedItem::field_18_expire_year, SummonedItem::field_4_expire_minute, SummonedItem::field_8_expire_hour, SummonedItem::field_C_expire_day, Localization::FormatString(), game_starting_year, GameUI_StatusBar_OnEvent(), Mouse::GetCursorPos(), ItemGen::GetDamageDice(), ItemGen::GetDamageMod(), ItemGen::GetDamageRoll(), ItemGen::GetDisplayName(), GUIFont::GetHeight(), ItemGen::GetIconName(), ItemGen::GetIdentifiedName(), AssetsManager::GetImage_ColorKey(), ItemGen::GetItemEquipType(), GUIFont::GetLineWidth(), Party::GetPlayingTime(), Localization::GetString(), ItemGen::GetValue(), SummonedItem::Initialize(), ItemGen::IsBroken(), ItemGen::IsIdentified(), ITEM_HARDENED, ITEM_STOLEN, ITEM_TEMP_BONUS, localization, ItemGen::m_enchantmentStrength, ItemEnchantment::pBonusStat, ItemSpecialEnchantment::pBonusStatement, ItemsTable::pEnchantments, pFontArrus, pFontComic, pFontSmallnum, ItemsTable::pItems, pItemsTable, pMouse, pParty, pPlayers, ItemsTable::pSpecialEnchantments, render, ItemGen::SetIdentified(), GUIWindow::sHint, ItemGen::special_enchantment, SPEECH_10, SPEECH_11, SPEECH_7, SPEECH_8, SPEECH_9, StringPrintf(), uActiveCharacter, ItemGen::uAttributes, ItemGen::uEnchantmentType, GUIWindow::uFrameHeight, GUIWindow::uFrameW, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, GUIWindow::uFrameZ, ItemGen::uItemID, ItemGen::uNumCharges, ItemGen::UpdateTempBonus() и Point::x.
Используется в Inventory_ItemPopupAndAlchemy(), ShowPopupShopItem() и UI_OnMouseRightClick().
◆ MonsterPopup_Draw()
void MonsterPopup_Draw |
( |
unsigned int |
uActorID, |
|
|
GUIWindow * |
pWindow |
|
) |
| |
См. определение в файле UIPopup.cpp строка 563
564 bool monster_full_informations =
false;
565 static Actor pMonsterInfoUI_Doll;
575 if (
pActors[uActorID].pMonsterInfo.uID ==
579 memcpy(&pMonsterInfoUI_Doll, &
pActors[uActorID],
580 sizeof(pMonsterInfoUI_Doll));
583 v9 = rand() % 256 + 128;
606 [(
signed __int16)pMonsterInfoUI_Doll
607 .uCurrentActionAnimation]]
614 (pWindow->
uFrameY + 52) + 128};
622 render->ResetUIClipRect();
623 render->FillRectFast(doll_rect.
x, doll_rect.
y, 128, 128,
Color16(0, 0, 0));
625 doll_rect.
x - 1, doll_rect.
y - 1, doll_rect.
z + 1, doll_rect.
y - 1,
628 doll_rect.
x - 1, doll_rect.
w + 1, doll_rect.
x - 1, doll_rect.
y - 1,
631 doll_rect.
z + 1, doll_rect.
w + 1, doll_rect.
x - 1, doll_rect.
w + 1,
634 doll_rect.
z + 1, doll_rect.
y - 1, doll_rect.
z + 1, doll_rect.
w + 1,
638 render->DrawMonsterPortrait(doll_rect, Portrait_Sprite, Popup_Y_Offset);
643 if (
pActors[uActorID].sNPC_ID) {
653 if (
pActors[uActorID].dword_000334_unique_name)
667 bool normal_level =
false;
668 bool expert_level =
false;
669 bool master_level =
false;
670 bool grandmaster_level =
false;
671 bool for_effects =
false;
673 int skill_points = 0;
674 unsigned int skill_level = 0;
685 if (skill_level == 0) {
686 if (skill_points + 10 >=
pActors[uActorID].pMonsterInfo.uLevel)
688 }
else if (skill_level == 1) {
689 if (2 * skill_points + 10 >=
690 pActors[uActorID].pMonsterInfo.uLevel) {
694 }
else if (skill_level == 2) {
695 if (3 * skill_points + 10 >=
696 pActors[uActorID].pMonsterInfo.uLevel) {
701 }
else if (skill_level == 3) {
705 grandmaster_level = 1;
715 if (normal_level | expert_level | master_level | grandmaster_level) {
716 if (
pActors[uActorID].pMonsterInfo.uLevel >=
731 if (monster_full_informations ==
true) {
735 grandmaster_level = 1;
740 const char *pText =
nullptr;
741 int pTextColorID = 0;
744 if (!for_effects &&
false) {
751 for (
uint i = 1; i <= 21; ++i) {
752 if (
pActors[uActorID].pActorBuffs[i].Active()) {
841 if (_stricmp(pText,
"")) {
850 if (!_stricmp(pText,
""))
860 pActors[uActorID].pMonsterInfo.uHP);
862 Color16(0xE1u, 255, 0x9Bu), str, 0, 0, 0);
865 pActors[uActorID].pMonsterInfo.uAC);
872 Color16(0xE1u, 255, 0x9Bu), str, 0, 0, 0);
880 Color16(0xE1u, 255, 0x9Bu), txt2, 0, 0, 0);
884 const char *content[11] = {0};
901 content[
pActors[uActorID].pMonsterInfo.uAttack1Type]);
903 Color16(0xE1u, 255, 0x9Bu), txt3, 0, 0, 0);
906 if (
pActors[uActorID].pMonsterInfo.uAttack1DamageBonus)
909 pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls,
910 pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides,
911 pActors[uActorID].pMonsterInfo.uAttack1DamageBonus);
915 pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls,
916 pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides);
922 Color16(0xE1u, 255, 0x9Bu), txt3, 0, 0, 0);
928 Color16(0xE1u, 255, 0x9Bu), txt4, 0, 0, 0);
937 Color16(0xE1u, 255, 0x9Bu), txt5, 0, 0, 0);
941 if (
pActors[uActorID].pMonsterInfo.uSpell1ID &&
942 pActors[uActorID].pMonsterInfo.uSpell2ID)
944 if (
pActors[uActorID].pMonsterInfo.uSpell1ID) {
946 "%s\f%05u\t070%s\n", pText, 0,
950 Color16(0xE1u, 255, 0x9Bu), txt6, 0, 0, 0);
953 if (
pActors[uActorID].pMonsterInfo.uSpell2ID) {
955 "\f%05u\t070%s\n", 0,
959 Color16(0xE1u, 255, 0x9Bu), txt6, 0, 0, 0);
962 if (!
pActors[uActorID].pMonsterInfo.uSpell1ID &&
963 !
pActors[uActorID].pMonsterInfo.uSpell2ID) {
968 Color16(0xE1u, 255, 0x9Bu), txt6, 0, 0, 0);
979 const char *string_name[10] = {0};
991 unsigned char resistances[11] = {0};
992 resistances[0] =
pActors[uActorID].pMonsterInfo.uResFire;
993 resistances[1] =
pActors[uActorID].pMonsterInfo.uResAir;
994 resistances[2] =
pActors[uActorID].pMonsterInfo.uResWater;
995 resistances[3] =
pActors[uActorID].pMonsterInfo.uResEarth;
996 resistances[4] =
pActors[uActorID].pMonsterInfo.uResMind;
997 resistances[5] =
pActors[uActorID].pMonsterInfo.uResSpirit;
998 resistances[6] =
pActors[uActorID].pMonsterInfo.uResBody;
999 resistances[7] =
pActors[uActorID].pMonsterInfo.uResLight;
1000 resistances[8] =
pActors[uActorID].pMonsterInfo.uResPhysical;
1001 resistances[9] =
pActors[uActorID].pMonsterInfo.uResDark;
1003 if (grandmaster_level) {
1004 for (
uint i = 0; i < 10; i++) {
1005 if (resistances[i] == 200) {
1015 StringPrintf(
"%s\f%05u\t070%s\n", string_name[i], 0, pText);
1017 Color16(0xE1u, 255, 0x9Bu), txt7, 0, 0, 0);
1021 for (
uint i = 0; i < 10; ++i) {
1022 auto txt8 =
StringPrintf(
"%s\f%05u\t070%s\n", string_name[i], 0,
1025 Color16(0xE1u, 255, 0x9Bu), txt8, 0, 0, 0);
1034 pActors[uActorID].sCurrentHP);
Перекрестные ссылки ACTOR_BUFF_AFRAID, ACTOR_BUFF_BERSERK, ACTOR_BUFF_BLESS, ACTOR_BUFF_CHARM, ACTOR_BUFF_DAY_OF_PROTECTION, ACTOR_BUFF_ENSLAVED, ACTOR_BUFF_FATE, ACTOR_BUFF_HASTE, ACTOR_BUFF_HEROISM, ACTOR_BUFF_HOUR_OF_POWER, ACTOR_BUFF_MASS_DISTORTION, ACTOR_BUFF_PAIN_HAMMERHANDS, ACTOR_BUFF_PAIN_REFLECTION, ACTOR_BUFF_PARALYZED, ACTOR_BUFF_SHIELD, ACTOR_BUFF_SHRINK, ACTOR_BUFF_SLOWED, ACTOR_BUFF_SOMETHING_THAT_HALVES_AC, ACTOR_BUFF_STONED, ACTOR_BUFF_STONESKIN, ACTOR_BUFF_SUMMONED, ANIM_AtkMelee, ANIM_Bored, ANIM_Standing, Color16(), Dead, Actor::DrawHealthBar(), GUIWindow::DrawText(), GUIWindow::DrawTitleText(), dword_507BF0_is_there_popup_onscreen, Dying, Localization::FormatString(), SpriteFrameTable::GetFrame(), GUIFont::GetHeight(), GUIFont::GetLineWidth(), GetNPCData(), Localization::GetNpcProfessionName(), GetSpellColor(), Localization::GetSpellSchoolName(), Localization::GetString(), localization, monster_popup_y_offsets, pActors, PARTY_BUFF_DETECT_LIFE, pFontComic, pFontSmallnum, SpellStats::pInfos, MonsterStats::pInfos, PLAYER_SKILL_MONSTER_ID, pMiscTimer, Actor::pMonsterInfo, pMonsterStats, NPCData::pName, MonsterInfo::pName, pParty, Party::pPartyBuffs, MonsterStats::pPlaceStrings, pPlayers, Party::pPlayers, SpellInfo::pShortName, pSpellStats, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, render, SPEECH_IDENTIFY_MONSTER_106, SPEECH_IDENTIFY_MONSTER_STRONGER, SPEECH_IDENTIFY_MONSTER_WEAKER, StringPrintf(), uActiveCharacter, Actor::uCurrentActionAnimation, Actor::uCurrentActionLength, Actor::uCurrentActionTime, GUIWindow::uFrameHeight, GUIWindow::uFrameX, GUIWindow::uFrameY, MonsterInfo::uID, NPCData::uProfession, Timer::uTimeElapsed, Rect::w, Rect::x, Rect::y и Rect::z.
Используется в UI_OnMouseRightClick().
◆ CharacterUI_GetSkillDescText()
См. определение в файле UIPopup.cpp строка 1044
1064 char static_sub_417BB5_out_string[1200];
1067 strcpy(a2,
"%s\n\n");
1068 sprintf(Source,
"\f%05d",
1070 uPlayerSkillType, 1));
1072 strcat(a2,
"%s\t%03d:\t%03d%s\t000\n");
1073 sprintf(Source,
"\f%05d",
1075 uPlayerSkillType, 2));
1077 strcat(a2,
"%s\t%03d:\t%03d%s\t000\n");
1078 sprintf(Source,
"\f%05d",
1080 uPlayerSkillType, 3));
1082 strcat(a2,
"%s\t%03d:\t%03d%s\t000\n");
1083 sprintf(Source,
"\f%05d",
1085 uPlayerSkillType, 4));
1087 strcat(a2,
"%s\t%03d:\t%03d%s\t000\n");
1088 if ((
pParty->
pPlayers[uPlayerID].pActiveSkills[uPlayerSkillType] & 0x3F) ==
1089 (
pParty->
pPlayers[uPlayerID].GetActualSkillLevel(uPlayerSkillType) &
1091 sprintf(static_sub_417BB5_out_string, a2,
1104 sprintf(Source,
"\f%05d",
Color16(0xFFu, 0xFFu, 0xFFu));
1106 strcat(a2,
"%s: +%d");
1108 static_sub_417BB5_out_string, a2,
1119 (
pParty->
pPlayers[uPlayerID].GetActualSkillLevel(uPlayerSkillType) &
1124 return String(static_sub_417BB5_out_string);
Перекрестные ссылки Color16(), GUIFont::GetLineWidth(), GetSkillColor(), Localization::GetSkillDescription(), Localization::GetSkillDescriptionExpert(), Localization::GetSkillDescriptionGrand(), Localization::GetSkillDescriptionMaster(), Localization::GetSkillDescriptionNormal(), Localization::GetString(), localization, pFontSmallnum, pParty и Party::pPlayers.
Используется в CharacterUI_SkillsTab_ShowHint() и UI_OnMouseRightClick().
◆ CharacterUI_SkillsTab_ShowHint()
void CharacterUI_SkillsTab_ShowHint |
( |
| ) |
|
См. определение в файле UIPopup.cpp строка 1127
1128 unsigned int pX = 0;
1129 unsigned int pY = 0;
1132 if (pX < 24 || pX > 455 || pY < 18 || pY > 36) {
1135 pX <= pButton->uZ && pY >= pButton->
uY && pY <= pButton->uW) {
Перекрестные ссылки CharacterUI_DrawTooltip(), CharacterUI_GetSkillDescText(), Mouse::GetClickPos(), Localization::GetSkillName(), Localization::GetString(), localization, GUIButton::msg, GUIButton::msg_param, pGUIWindow_CurrentMenu, pMouse, pSkillPointsAttributeDescription, uActiveCharacter, UIMSG_SkillUp, GUIButton::uX, GUIButton::uY и GUIWindow::vButtons.
Используется в UI_OnMouseRightClick().
◆ CharacterUI_StatsTab_ShowHint()
void CharacterUI_StatsTab_ShowHint |
( |
| ) |
|
См. определение в файле UIPopup.cpp строка 1153
1155 signed int pTextColor;
1156 const char *pHourWord;
1157 const char *pDayWord;
1174 switch (pStringNum) {
1206 for (
uint i = 0; i < 18; ++i) {
1211 auto condition_time =
1215 pHour = condition_time.GetHoursOfDay();
1216 pDay = condition_time.GetDays();
1222 if (pHour && pHour <= 1)
1229 str +=
StringPrintf(
"%lu %s, %lu %s", pDay, pDayWord, pHour,
1264 }
while (v15 <= 10000);
1271 LSTR_XP_UNTIL_NEXT_LEVEL,
1274 str1 +=
"\n" + str2;
1286 sprintf(recov,
"\n\nRecovery time: %d", meleerecov);
1303 sprintf(recovm,
"\n\nRecovery time: %d", missrecov);
Перекрестные ссылки CharacterUI_DrawTooltip(), format_4E2DE8, Localization::FormatString(), Localization::GetAttirubteName(), Localization::GetAttributeDescription(), Localization::GetCharacterConditionName(), Localization::GetClassDescription(), Localization::GetClassName(), GetConditionDrawColor(), Mouse::GetCursorPos(), GetExperienceRequiredForLevel(), Party::GetPlayingTime(), Localization::GetString(), localization, pAirResistanceAttributeDescription, pArmourClassAttributeDescription, pAttackBonusAttributeDescription, pAttackDamageAttributeDescription, pBodyResistanceAttributeDescription, pConditionImportancyTable, pEarthResistanceAttributeDescription, pFastSpellAttributeDescription, pFireResistanceAttributeDescription, pHealthPointsAttributeDescription, pMindResistanceAttributeDescription, pMissleBonusAttributeDescription, pMissleDamageAttributeDescription, pMouse, pParty, pPlayerAgeAttributeDescription, pPlayerConditionAttributeDescription, pPlayerExperienceAttributeDescription, pPlayerLevelAttributeDescription, pPlayers, pSkillPointsAttributeDescription, pSpellPointsAttributeDescription, pWaterResistanceAttributeDescription, stat_string_coord, StringPrintf(), uActiveCharacter, Point::x и Point::y.
Используется в UI_OnMouseRightClick().
◆ DrawSpellDescriptionPopup()
void DrawSpellDescriptionPopup |
( |
int |
spell_index | ) |
|
См. определение в файле UIPopup.cpp строка 1372
1392 spell_info_window.
uFrameX = 90;
1393 spell_info_window.
uFrameZ = 417;
1395 spell_info_window.
sHint.clear();
1409 "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%"
1410 "s\t000\n%s\t%03d:\t%03d%s",
1450 .mana_per_skill[skill_level - 1]);
Перекрестные ссылки GUIFont::CalcTextHeight(), Color16(), GUIWindow::DrawMessageBox(), GUIWindow::DrawText(), GUIWindow::DrawTitleText(), dword_507B00_spell_info_to_draw_in_popup, game_viewport_width, Mouse::GetCursorPos(), GUIFont::GetHeight(), GUIFont::GetLineWidth(), Localization::GetSkillName(), Localization::GetString(), localization, SpellInfo::pBasicSkillDesc, SpellInfo::pDescription, SpellInfo::pExpertSkillDesc, pFontArrus, pFontComic, pFontSmallnum, SpellInfo::pGrandmasterSkillDesc, SpellStats::pInfos, SpellInfo::pMasterSkillDesc, pMouse, SpellInfo::pName, pPlayers, pSpellDatas, pSpellStats, GUIWindow::sHint, SkillToMastery(), StringPrintf(), uActiveCharacter, GUIWindow::uFrameHeight, GUIWindow::uFrameW, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, GUIWindow::uFrameZ и Point::y.
Используется в UI_OnMouseRightClick().
◆ UI_OnMouseRightClick()
void UI_OnMouseRightClick |
( |
int |
mouse_x, |
|
|
int |
mouse_y |
|
) |
| |
См. определение в файле UIPopup.cpp строка 1459
1470 unsigned int pX = mouse_x;
1471 unsigned int pY = mouse_y;
1476 if (pt.
x < 1 || pt.
y < 1 || pt.
x > 638 || pt.
y > 478) {
1483 for (
uint i = 0; i < 4; ++i) {
1486 (
signed int)pY > 375 && (
signed int)pY < 466) {
1501 static String hint_reference;
1507 popup_window.
sHint = hint_reference;
1511 if ((
signed int)pX <= 320)
1512 popup_window.
uFrameX = pX + 30;
1514 popup_window.
uFrameX = pX - 414;
1522 int inventoryYCoord = (pY - 34) / 32;
1523 int inventoryXCoord = (pX - 42) / 32;
1524 int invMatrixIndex =
1525 inventoryXCoord + (chestheight * inventoryYCoord);
1527 if (inventoryYCoord >= 0 && inventoryYCoord < chestheight &&
1528 inventoryXCoord >= 0 && inventoryXCoord < chestwidth) {
1530 if (chestindex < 0) {
1531 invMatrixIndex = (-(chestindex + 1));
1536 int itemindex = chestindex - 1;
1550 popup_window.
ptr_1C = (
void *)((
signed int)pX / 118);
1551 if ((
signed int)pX / 118 < 4) {
1552 popup_window.
sHint.clear();
1563 if (pX >= 476 && pX <= 636 && pY >= 240 && pY <= 300) {
1564 popup_window.
sHint.clear();
1571 }
else if ((
int)pX < 485 || (
int)pX > 548 ||
1574 if (!((
signed int)pX < 566 || (
signed int)pX > 629 ||
1575 (
signed int)pY < 156 || (
signed int)pY > 229)) {
1593 popup_window.
sHint.clear();
1596 popup_window.
uFrameX = pX - 350;
1597 if ((
signed int)pX <= 320) popup_window.
uFrameX = pX + 30;
1602 v5 = vis->get_picked_object_zbuf_val();
1613 ->pObjects[
pSpriteObjects[PID_ID((
unsigned __int16)v5)].uObjectDescID].uFlags & 0x10)) {
1631 popup_window.
uFrameX = pX + 5;
1632 popup_window.
uFrameY = pY + 5;
1643 else if ((
signed int)pY >= 345)
1667 if ((
signed int)pY < 345 && (
signed int)pX < 469)
1672 popup_window.
sHint.clear();
1676 (
signed int)pX > (
signed int)pButton->
uX &&
1677 (
signed int)pX < (
signed int)pButton->
uZ &&
1678 (
signed int)pY > (
signed int)pButton->
uY &&
1679 (
signed int)pY < (
signed int)pButton->
uW) {
1680 switch (pButton->
msg) {
1682 popup_window.
sHint =
1709 .GetSkillIdxByOrder(pButton->
msg_param +
1716 .GetSkillIdxByOrder(pButton->
msg_param +
1721 popup_window.
sHint =
1756 static String hint_reference;
1761 .GetSkillIdxByOrder(pButton->
msg -
1764 popup_window.
sHint = hint_reference;
1767 .GetSkillIdxByOrder(pButton->
msg -
1773 if (!popup_window.
sHint.empty()) {
1775 popup_window.
sHint.clear();
1799 Color16(0xFF, 0xFF, 0x9B), pStr);
Перекрестные ссылки GUIWindow::_41D73D_draw_buff_tooltip(), back_to_game(), ViewingParams::bRedrawGameUI, GUIFont::CalcTextHeight(), CharacterUI_GetSkillDescText(), CharacterUI_SkillsTab_ShowHint(), CharacterUI_StatsTab_ShowHint(), Color16(), current_character_screen_window, current_screen_type, GUIWindow::DrawMessageBox(), DrawSpellDescriptionPopup(), GUIWindow::DrawText(), GUIWindow::DrawTitleText(), dword_507B00_spell_info_to_draw_in_popup, dword_507BF0_is_there_popup_onscreen, Localization::FormatString(), GameUI_CharacterQuickRecord_Draw(), GameUI_DrawItemInfo(), GameUI_DrawNPCPopup(), GameUI_GetMinimapHintText(), Localization::GetAttirubteName(), Localization::GetAttributeDescription(), Localization::GetClassDescription(), Localization::GetClassName(), GetCurrentMenuID(), GUIFont::GetHeight(), GUIFont::GetLineWidth(), GetMapBookHintText(), Localization::GetSkillDescription(), Localization::GetSkillName(), Localization::GetString(), Inventory_ItemPopupAndAlchemy(), localization, MapBookOpen, MENU_MAIN, MonsterPopup_Draw(), GUIButton::msg, GUIButton::msg_param, OBJECT_Actor, OBJECT_Item, GUIWindow::par1C, pAudioPlayer, Timer::Pause(), pChestWindow, pEventTimer, pFontArrus, pFontCreate, pFontLucida, pFontSmallnum, pGUIWindow_CurrentMenu, pObjectList, pParty, Party::pPickedItem, pPlayers, Party::pPlayers, pSpriteObjects, GUIWindow::ptr_1C, pViewport, render, Engine_::IocContainer::ResolveVis(), RightClickPortraitXmax, RightClickPortraitXmin, SCREEN_BOOKS, SCREEN_CASTING, SCREEN_CHARACTERS, SCREEN_CHEST, SCREEN_CHEST_INVENTORY, SCREEN_E, SCREEN_GAME, SCREEN_HOUSE, SCREEN_PARTY_CREATION, SCREEN_SPELL_BOOK, SCREEN_VIDEO, GUIWindow::sHint, ShowPopupShopItem(), AudioPlayer::StopChannels(), StringPrintf(), uActiveCharacter, GUIButton::uButtonType, GUIWindow::uFrameHeight, GUIWindow::uFrameW, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, GUIWindow::uFrameZ, UIMSG_0, UIMSG_44, UIMSG_48, UIMSG_PlayerCreation_SelectAttribute, UIMSG_PlayerCreationClickMinus, UIMSG_PlayerCreationClickOK, UIMSG_PlayerCreationClickPlus, UIMSG_PlayerCreationClickReset, UIMSG_PlayerCreationRemoveDownSkill, UIMSG_PlayerCreationSelectActiveSkill, UIMSG_PlayerCreationSelectClass, ItemGen::uItemID, uPlayerCreationUI_SelectedCharacter, Viewport::uViewportBR_X, Viewport::uViewportBR_Y, Viewport::uViewportTL_X, Viewport::uViewportTL_Y, GUIButton::uW, GUIButton::uX, GUIButton::uY, GUIButton::uZ, GUIWindow::vButtons, vChests, viewparams, WINDOW_CharacterWindow_Inventory, WINDOW_CharacterWindow_Skills, WINDOW_CharacterWindow_Stats, Point::x и Point::y.
Используется в GUI_UpdateWindows() и Application::GameWindowHandler::OnMouseRightClick().
◆ Inventory_ItemPopupAndAlchemy()
void Inventory_ItemPopupAndAlchemy |
( |
| ) |
|
См. определение в файле UIPopup.cpp строка 1817
1819 unsigned int potion2_id;
1820 signed int potionID;
1825 unsigned int damage_level;
1829 signed int inventoryXCoord;
1830 int inventoryYCoord;
1841 static int RingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248};
1842 static int RingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
1844 static int glovex = 586;
1845 static int glovey = 88;
1847 static int amuletx = 493;
1848 static int amulety = 91;
1854 inventoryYCoord = (pY - 17) / 32;
1855 inventoryXCoord = (pX - 14) / 32;
1856 int invMatrixIndex =
1857 inventoryXCoord + (14 * inventoryYCoord);
1859 if (pX <= 13 || pX >= 462) {
1870 if (item_pid == -1)
return;
1876 if (mousex < 490 || mousex > 618)
return;
1878 if (mousey < 88 || mousey > 282)
return;
1880 if (mousex >= amuletx && mousex <= (amuletx + slot) &&
1881 mousey >= amulety && mousey <= (amulety + 2 * slot)) {
1887 if (mousex >= glovex && mousex <= (glovex + slot) &&
1888 mousey >= glovey && mousey <= (glovey + 2 * slot)) {
1894 for (
int i = 0; i < 6; ++i) {
1895 if (mousex >= RingsX[i] && mousex <= (RingsX[i] + slot) &&
1896 mousey >= RingsY[i] && mousey <= (RingsY[i] + slot)) {
1930 static String hint_reference;
1936 message_window.
sHint = hint_reference;
1940 message_window.
uFrameX = pX + 30;
1942 message_window.
uFrameX = pX - 414;
1948 int alchemy_skill_points =
1950 int alchemy_skill_level =
1970 if (v31 < 0.0) v31 = 0.0;
2118 if (alchemy_skill_points) {
2123 alchemy_skill_level == 1)
2127 alchemy_skill_level <= 2)
2130 alchemy_skill_level <= 3)
2163 if (damage_level > 0) {
2167 if (damage_level == 1) {
2170 }
else if (damage_level == 2) {
2174 }
else if (damage_level == 3) {
2178 }
else if (damage_level >= 4) {
2191 int rot_x, rot_y, rot_z;
2193 &rot_x, &rot_y, &rot_z);
2208 if (alchemy_skill_points) {
2230 ->pOwnItems[bottle - 1]
Перекрестные ссылки _50C9A8_item_enchantment_timer, Condition_Eradicated, DMGT_FIRE, GUIWindow::DrawMessageBox(), dword_4E455C, EQUIP_ARMOUR, EQUIP_SINGLE_HANDED, EQUIP_WAND, ItemGen::expirte_time, Localization::FormatString(), GameTime::FromSeconds(), GameUI_DrawItemInfo(), GameUI_StatusBar_OnEvent(), Mouse::GetClickPos(), ItemGen::GetDamageDice(), ItemGen::GetItemEquipType(), Party::GetPlayingTime(), Localization::GetString(), ItemGen::IsBroken(), ITEM_ARTIFACT_PUCK, ITEM_AURA_EFFECT_RED, ITEM_BLASTER, ITEM_DEVIL_ICHOR, ITEM_DRAGON_EYE, ITEM_ELVISH_TOADSTOOL, ITEM_ENCHANTMENT_40, ITEM_ENCHANTMENT_OF_FLAME, ITEM_ENCHANTMENT_OF_FROST, ITEM_ENCHANTMENT_OF_POISON, ITEM_ENCHANTMENT_OF_SPARKS, ITEM_FAE_DUST, ITEM_GARNET, ITEM_HARDENED, ITEM_HARPY_FEATHER, ITEM_IDENTIFIED, ITEM_LASER_RIFLE, ITEM_MERCURY, ITEM_METEORITE_FRAGMENT, ITEM_MOONSTONE, ITEM_MUSHROOM, ITEM_OBSIDIAN, ITEM_OOZE_ENDOPLASM_VIAL, ITEM_PHIMA_ROOT, ITEM_POPPYSNAPS, ITEM_POTION_AWAKEN, ITEM_POTION_BODY_RESISTANE, ITEM_POTION_BOTTLE, ITEM_POTION_CATALYST, ITEM_POTION_CURE_DISEASE, ITEM_POTION_CURE_INSANITY, ITEM_POTION_CURE_WEAKNESS, ITEM_POTION_CURE_WOUNDS, ITEM_POTION_FLAMING_POTION, ITEM_POTION_HARDEN_ITEM, ITEM_POTION_HASTE, ITEM_POTION_MAGIC_POTION, ITEM_POTION_MIGHT_BOOST, ITEM_POTION_RECHARGE_ITEM, ITEM_POTION_REJUVENATION, ITEM_POTION_SLAYING_POTION, ITEM_POTION_STONE_TO_FLESH, ITEM_POTION_SWIFT_POTION, ITEM_REAGENT_CRUSHED_ROSE_PETALS, ITEM_REAGENT_PHILOSOPHERS_STONE, ITEM_REAGENT_WIDOWSWEEP_BERRIES, ITEM_SULFUR, ITEM_TROLL_BLOOD, ITEM_TROLL_RUBY, localization, no_rightlick_in_inventory, pAudioPlayer, ItemsTable::pItems, pItemsTable, PLAYER_SKILL_ALCHEMY, AudioPlayer::PlaySound(), pMessageQueue_50CBD0, pMouse, ItemsTable::potion_data, ItemsTable::potion_note, pParty, Party::pPickedItem, pPlayers, pSRZBufferLineOffsets, Mouse::RemoveHoldingItem(), render, ringscreenactive(), Party::sEyelevel, GUIWindow::sHint, SOUND_error, SOUND_fireBall, ItemGen::special_enchantment, SPEECH_17, SPEECH_DO_POTION_FINE, SPRITE_SPELL_FIRE_FIREBALL_IMPACT, Party::sRotationX, Party::sRotationY, SpriteObject::sub_42F7EB_DropItemAt(), uActiveCharacter, ItemGen::uAttributes, ItemGen::uEnchantmentType, GUIWindow::uFrameHeight, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, UIMSG_Escape, ItemGen::uItemID, ItemGen::uMaxCharges, Mouse::uMouseClickX, Mouse::uMouseClickY, ItemGen::uNumCharges, ItemGen::UpdateTempBonus(), VAR_AutoNotes и Party::vPosition.
Используется в UI_OnMouseRightClick().
◆ GetSpellColor()
unsigned int GetSpellColor |
( |
signed int |
a1 | ) |
|
См. определение в файле UIPopup.cpp строка 2255
2256 if (a1 == 0)
return Color16(0, 0, 0);
2257 if (a1 < 12)
return Color16(255, 85, 0);
2258 if (a1 < 23)
return Color16(150, 212, 255);
2259 if (a1 < 34)
return Color16(0, 128, 255);
2260 if (a1 < 45)
return Color16(128, 128, 128);
2261 if (a1 < 56)
return Color16(225, 225, 225);
2262 if (a1 < 67)
return Color16(235, 15, 255);
2263 if (a1 < 78)
return Color16(255, 128, 0);
2264 if (a1 < 89)
return Color16(255, 255, 155);
2266 return Color16(192, 192, 240);
Перекрестные ссылки __debugbreak() и Color16().
Используется в MonsterPopup_Draw().
◆ GetExperienceRequiredForLevel()
unsigned __int64 GetExperienceRequiredForLevel |
( |
int |
level | ) |
|
◆ pMouse
◆ parchment
◆ messagebox_corner_x
Image* messagebox_corner_x = nullptr |
◆ messagebox_corner_y
Image* messagebox_corner_y = nullptr |
◆ messagebox_corner_z
Image* messagebox_corner_z = nullptr |
◆ messagebox_corner_w
Image* messagebox_corner_w = nullptr |
◆ messagebox_border_top
Image* messagebox_border_top = nullptr |
◆ messagebox_border_bottom
Image* messagebox_border_bottom = nullptr |
◆ messagebox_border_left
Image* messagebox_border_left = nullptr |
◆ messagebox_border_right
Image* messagebox_border_right = nullptr |
◆ no_rightlick_in_inventory
int no_rightlick_in_inventory = false |
unsigned __int16 uint16_t
@ UIMSG_PlayerCreationClickPlus
@ ITEM_POTION_HARDEN_ITEM
@ UIMSG_PlayerCreationRemoveDownSkill
void DrawText(GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
char * pPlayerConditionAttributeDescription
unsigned int ui_character_tooltip_header_default_color
NPCData * GetNPCData(signed int npcid)
@ PLAYER_SKILL_MONSTER_ID
unsigned __int8 GetDamageMod()
const char * GetString(unsigned int index) const
const char * GetCharacterConditionName(unsigned int index) const
@ ACTOR_BUFF_PAIN_REFLECTION
unsigned int uTimeElapsed
@ SPEECH_IDENTIFY_MONSTER_STRONGER
GameTime & GetPlayingTime()
struct SpriteFrameTable * pSpriteFrameTable
std::array< unsigned int, 18 > pConditionImportancyTable
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
char * pMindResistanceAttributeDescription
unsigned int uMouseClickY
struct MonsterStats * pMonsterStats
std::array< unsigned int, 480 > pSRZBufferLineOffsets
ITEM_EQUIP_TYPE GetItemEquipType()
GUIWindow * pGUIWindow_CurrentMenu
@ ACTOR_BUFF_DAY_OF_PROTECTION
unsigned int uPlayerCreationUI_SelectedCharacter
void GameUI_DrawNPCPopup(void *_this)
@ ITEM_ENCHANTMENT_OF_FLAME
unsigned int SkillToMastery(unsigned int skill_value)
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
unsigned int game_viewport_width
int field_4_expire_minute
@ UIMSG_PlayerCreationClickOK
@ UIMSG_PlayerCreationClickMinus
Localization * localization
@ ITEM_ENCHANTMENT_OF_POISON
std::array< Player, 4 > pPlayers
void DrawTitleText(GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
unsigned int GetLineWidth(const String &str)
@ ITEM_POTION_BODY_RESISTANE
@ ITEM_POTION_SWIFT_POTION
unsigned __int16 potion_note[50][50]
unsigned int GetHeight() const
char * pSpellPointsAttributeDescription
@ ITEM_POTION_CURE_DISEASE
NZIArray< struct Player *, 5 > pPlayers
const char * GetSkillName(unsigned int index) const
enum CURRENT_SCREEN current_screen_type
char * pFastSpellAttributeDescription
@ ITEM_POTION_MAGIC_POTION
char * pArmourClassAttributeDescription
@ SPEECH_IDENTIFY_MONSTER_WEAKER
std::array< SpellBuff, 20 > pPartyBuffs
std::vector< GUIButton * > vButtons
unsigned int uMouseClickX
MENU_STATE GetCurrentMenuID()
int dword_507B00_spell_info_to_draw_in_popup
@ ITEM_METEORITE_FRAGMENT
@ ITEM_POTION_RECHARGE_ITEM
struct ItemsTable * pItemsTable
enum WindowType current_character_screen_window
void Initialize(GameTime duration)
EGLSurface EGLint EGLint y
ITEM_ENCHANTMENT special_enchantment
@ ITEM_POTION_SLAYING_POTION
static Vis * ResolveVis()
const char * GetSkillDescriptionExpert(unsigned int index) const
const char * GetSkillDescriptionNormal(unsigned int index) const
@ ITEM_POTION_CURE_WEAKNESS
unsigned int uCurrentActionTime
@ ITEM_POTION_STONE_TO_FLESH
const char * format_4E2DE8
@ ACTOR_BUFF_MASS_DISTORTION
const char * GetAttributeDescription(unsigned int index) const
char * pMissleDamageAttributeDescription
char * pHealthPointsAttributeDescription
@ WINDOW_CharacterWindow_Inventory
unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level)
SpriteFrame * GetFrame(unsigned int uSpriteID, unsigned int uTime)
struct ViewingParams * viewparams
void DrawMessageBox(bool inside_game_viewport)
@ ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
char * pPlayerExperienceAttributeDescription
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
std::array< SpellData, 100 > pSpellDatas
unsigned int uFrameHeight
const char * GetSpellSchoolName(unsigned int index) const
int GetConditionDrawColor(unsigned int uConditionIdx)
char * pMissleBonusAttributeDescription
unsigned __int8 GetDamageDice()
unsigned __int8 GetDamageRoll()
void StopChannels(int uStartChannel, int uEndChannel)
std::array< __int16, 4 > RightClickPortraitXmin
const char * GetSkillDescriptionGrand(unsigned int index) const
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
std::array< Actor, 500 > pActors
SpriteFrame * pSpriteSFrames
int field_14_exprie_month
@ ITEM_OOZE_ENDOPLASM_VIAL
const char * GetSkillDescription(unsigned int index) const
@ ITEM_POTION_CURE_WOUNDS
const char * GetClassDescription(unsigned int index) const
@ UIMSG_PlayerCreation_SelectAttribute
void GetClickPos(unsigned int *pX, unsigned int *pY)
@ ITEM_POTION_FLAMING_POTION
char * pAttackDamageAttributeDescription
@ SPEECH_IDENTIFY_MONSTER_106
char * pBodyResistanceAttributeDescription
String GetIdentifiedName()
@ UIMSG_PlayerCreationSelectClass
struct SpellStats * pSpellStats
const char * GetAttirubteName(unsigned int index) const
ItemSpecialEnchantment pSpecialEnchantments[72]
std::vector< Chest > vChests
struct Viewport * pViewport
@ ACTOR_BUFF_HOUR_OF_POWER
@ UIMSG_PlayerCreationClickReset
int dword_507BF0_is_there_popup_onscreen
@ UIMSG_PlayerCreationSelectActiveSkill
std::array< __int16, 4 > RightClickPortraitXmax
GLfloat GLfloat GLfloat v2
@ ITEM_ENCHANTMENT_OF_FROST
unsigned int uActiveCharacter
GLfloat GLfloat GLfloat GLfloat v3
String FormatString(unsigned int index,...) const
void __cdecl __debugbreak(void)
char * pSkillPointsAttributeDescription
char * pPlayerAgeAttributeDescription
static bool sub_42F7EB_DropItemAt(SPRITE_OBJECT_TYPE sprite, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9)
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
const char * GetNpcProfessionName(unsigned int index) const
ItemEnchantment pEnchantments[24]
@ WINDOW_CharacterWindow_Stats
char * pAttackBonusAttributeDescription
@ ITEM_ENCHANTMENT_OF_SPARKS
char * pPlayerLevelAttributeDescription
uint16_t uCurrentActionLength
@ ITEM_POTION_CURE_INSANITY
void UpdateTempBonus(GameTime time)
@ ITEM_POTION_REJUVENATION
char * pWaterResistanceAttributeDescription
char * pFireResistanceAttributeDescription
void _41D73D_draw_buff_tooltip()
AudioPlayer * pAudioPlayer
void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player)
const char * GetClassName(unsigned int index) const
struct GUIMessageQueue * pMessageQueue_50CBD0
@ ITEM_POTION_MIGHT_BOOST
@ SPRITE_SPELL_FIRE_FIREBALL_IMPACT
@ ACTOR_BUFF_PAIN_HAMMERHANDS
int m_enchantmentStrength
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
@ ITEM_REAGENT_CRUSHED_ROSE_PETALS
int _50C9A8_item_enchantment_timer
const char * GetMapBookHintText(int mouse_x, int mouse_y)
unsigned __int16 potion_data[50][50]
uint16_t uCurrentActionAnimation
std::array< char, 88 > monster_popup_y_offsets
struct MonsterInfo pMonsterInfo
String StringPrintf(const char *fmt,...)
char * pAirResistanceAttributeDescription
static void DrawHealthBar(Actor *actor, GUIWindow *window)
@ WINDOW_CharacterWindow_Skills
@ ITEM_REAGENT_WIDOWSWEEP_BERRIES
char * pEarthResistanceAttributeDescription
@ ITEM_REAGENT_PHILOSOPHERS_STONE
struct ObjectList * pObjectList
static GameTime FromSeconds(int seconds)
NZIArray< ItemDesc, 800 > pItems
char * pGrandmasterSkillDesc
const char * GetSkillDescriptionMaster(unsigned int index) const
std::array< stat_coord, 26 > stat_string_coord
String GameUI_GetMinimapHintText()
std::shared_ptr< IRender > render