annotate UI/UIPopup.cpp @ 1710:0f6cd60ca987

Merge
author Grumpy7
date Tue, 24 Sep 2013 07:32:24 +0200
parents 8251e59fd7c1 a395359afc8f
children 1c072d19e397
rev   line source
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1 #ifdef _MSC_VER
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
3 #endif
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
4
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
5 #include "..\MM7.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
6
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
7 #include "..\Mouse.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
8
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
9 #include "..\Sprites.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
10 #include "..\Vis.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
11 #include "..\Game.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
12 #include "..\GUIWindow.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
13 #include "..\GUIFont.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
14 #include "..\Party.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
15 #include "..\AudioPlayer.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
16 #include "..\LOD.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
17 #include "..\Actor.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
18 #include "..\Viewport.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
19 #include "..\SpriteObject.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
20 #include "..\ObjectList.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
21 #include "..\Chest.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
22 #include "..\PaletteManager.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
23 #include "..\Time.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
24 #include "..\texts.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
25
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
26 #include "..\mm7_data.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
27
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
28 static char static_sub_417BB5_out_string[1200]; // static to a file, not sub actually
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
29
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
30
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
31 //----- (004179BC) --------------------------------------------------------
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
32 void CharacterUI_DrawTooltip(const char *Title, const char *content)
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
33 {
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
34 GUIWindow popup_window; // [sp+Ch] [bp-5Ch]@1
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
35 POINT v6; // [sp+60h] [bp-8h]@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
36
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
37 memset(&popup_window, 0, 0x54u);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
38 popup_window.uFrameWidth = 384;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
39 popup_window.uFrameHeight = 256;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
40 popup_window.uFrameX = 128;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
41 popup_window.uFrameY = pMouse->GetCursorPos(&v6)->y + 30;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
42 popup_window.uFrameHeight = pFontSmallnum->CalcTextHeight(content, &popup_window, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
43 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
44 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
45 popup_window.DrawMessageBox(0);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
46
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
47 popup_window.uFrameX += 12;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
48 popup_window.uFrameWidth -= 24;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
49 popup_window.uFrameY += 12;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
50 popup_window.uFrameHeight -= 12;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
51 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
52 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
53 sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, Title);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
54 popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
55 popup_window.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, content, 0, 0, 0);
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
56 }
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
57
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
58 //----- (004151D9) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
59 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
60 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
61 unsigned int uNumTiles; // [sp+2Ch] [bp-Ch]@6
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
62 unsigned int coord_x; // [sp+2Ch] [bp-Ch]@3
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
63 unsigned int coord_y; // [sp+34h] [bp-4h]@5
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
64
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
65 pRenderer->SetTextureClipRect(uX, uY, uX + uWidth, uY + uHeight);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
66 if ( pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth && pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight)
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
67 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
68 uNumTiles = uWidth / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
69 if ( uWidth % pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth )
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
70 ++uNumTiles;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
71 coord_y = uY;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
72 for ( uint j = 0; j <= uHeight / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight; j++ )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
73 {
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
74 coord_x = uX - pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
75 for ( uint i = uNumTiles + 1; i; --i )
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
76 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
77 coord_x += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth;
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
78 pRenderer->DrawTextureIndexed(coord_x, coord_y, pIcons_LOD->GetTexture(uTextureID_Parchment));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
79 }
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
80 coord_y += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
81 }
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
82 pRenderer->DrawTextureTransparent(uX, uY, pIcons_LOD->GetTexture(uTextureID_5076AC));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
83 pRenderer->DrawTextureTransparent(uX, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B4));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
84 pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY, pIcons_LOD->GetTexture(uTextureID_5076A8));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
85 pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B0));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
86 if ( uWidth > 64 )
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
87 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
88 pRenderer->SetTextureClipRect(uX + 32, uY, uX + uWidth - 32, uY + uHeight);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
89 pRenderer->DrawTextureTransparent(uX + 32, uY, pIcons_LOD->GetTexture(uTextureID_507698));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
90 pRenderer->DrawTextureTransparent(uX + 32, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
91 if ( uWidth > 512 )
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
92 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
93 pRenderer->DrawTextureTransparent(uX + 544, uY, pIcons_LOD->GetTexture(uTextureID_507698));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
94 pRenderer->DrawTextureTransparent(uX + 544, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
95 }
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
96 }
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
97 if ( uHeight > 64 )
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
98 {
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
99 pRenderer->SetTextureClipRect(uX, uY + 32, uX + uWidth, uY + uHeight - 32);
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
100 pRenderer->DrawTextureTransparent(uX, uY + 32, pIcons_LOD->GetTexture(uTextureID_5076A0));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
101 pRenderer->DrawTextureTransparent(uX + uWidth - 10, uY + 32, pIcons_LOD->GetTexture(uTextureID_50769C));
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
102 }
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
103 pRenderer->ResetTextureClipRect();
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
104 }
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
105 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
106
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
107 //----- (0041D895) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
108 void GameUI_DrawItemInfo( struct ItemGen* inspect_item )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
109 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
110 unsigned int v2; // eax@3
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
111 const char *v28; // edi@69
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
112 int v34; // esi@81
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
113 char *pText; // [sp-14h] [bp-28Ch]@110
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
114 char out_text[300]; // [sp+8h] [bp-270h]@40
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
115 char v65[120]; // [sp+134h] [bp-144h]@92
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
116 stru351_summoned_item v67;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
117 int v77; // [sp+200h] [bp-78h]@12
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
118 int v78; // [sp+204h] [bp-74h]@5
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
119 GUIWindow iteminfo_window; // [sp+208h] [bp-70h]@2
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
120 POINT a2; // [sp+25Ch] [bp-1Ch]@2
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
121 int v81; // [sp+264h] [bp-14h]@5
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
122 PlayerSpeech v83; // [sp+26Ch] [bp-Ch]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
123 char* v84;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
124 int v85;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
125 char *Str; // [sp+270h] [bp-8h]@65
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
126
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
127 if (!inspect_item->uItemID)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
128 return;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
129 iteminfo_window.Hint = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
130 iteminfo_window.uFrameWidth = 384;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
131 iteminfo_window.uFrameHeight = 180;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
132 iteminfo_window.uFrameY = 40;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
133 if ( pMouse->GetCursorPos(&a2)->x <= 320 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
134 v2 = pMouse->GetCursorPos(&a2)->x + 30;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
135 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
136 v2 = pMouse->GetCursorPos(&a2)->x - iteminfo_window.uFrameWidth - 30;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
137 iteminfo_window.uFrameX = v2;
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
138 v78 = 100 - pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->uTextureWidth;
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
139 v81 = 144 - pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->uTextureHeight;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
140 if ( v78 > 0 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
141 v78 = v78 / 2;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
142 if ( v81 <= 0 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
143 v81 = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
144 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
145 v81 = v81 / 2;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
146 if ( !pItemsTable->pItems[inspect_item->uItemID].uItemID_Rep_St )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
147 inspect_item->SetIdentified();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
148 v77 = 0;
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
149 if (inspect_item->GetItemEquipType() == EQUIP_GOLD)
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
150 v77 = inspect_item->uSpecEnchantmentType;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
151 if ( uActiveCharacter )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
152 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
153 //try to identify
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
154 if (!inspect_item->IsIdentified())
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
155 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
156 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
157 inspect_item->SetIdentified();
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
158 v83 = SPEECH_9;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
159 if ( !inspect_item->IsIdentified() )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
160 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2);//"Identify Failed"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
161 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
162 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
163 v83 = SPEECH_8;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
164 if ( inspect_item->GetValue() < 100 * (pPlayers[uActiveCharacter]->uLevel + 5) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
165 v83 = SPEECH_7;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
166 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
167 if ( dword_4E455C )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
168 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
169 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
170 dword_4E455C = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
171 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
172 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
173 inspect_item->UpdateTempBonus(pParty->uTimePlayed);
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
174 if (inspect_item->IsBroken())
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
175 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
176 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
177 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
178 v83 = SPEECH_11;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
179 if ( !inspect_item->IsBroken() )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
180 v83 = SPEECH_10;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
181 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
182 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2);//"Repair Failed"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
183 if ( dword_4E455C )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
184 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
185 pPlayers[uActiveCharacter]->PlaySound(v83, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
186 dword_4E455C = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
187 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
188 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
189 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
190 if (inspect_item->IsBroken())
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
191 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
192 iteminfo_window.DrawMessageBox(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
193 pRenderer->SetTextureClipRect(iteminfo_window.uFrameX + 12, iteminfo_window.uFrameY + 12,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
194 iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 12,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
195 iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 12);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
196 iteminfo_window.uFrameWidth -= 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
197 iteminfo_window.uFrameHeight -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
198 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
199 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1;
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
200 pRenderer->DrawTransparentRedShade(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE));
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
201 if ( inspect_item->IsIdentified())
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
202 pText = (char *)inspect_item->GetIdentifiedName();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
203 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
204 pText = pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
205 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pText, 3);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
206 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &iteminfo_window, 0, 0) / 2,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
207 TargetColor(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[32], 3); //"Broken Item"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
208 pRenderer->ResetTextureClipRect();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
209 if ( !areWeLoadingTexture )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
210 {
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
211 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release();
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
212 pIcons_LOD->SyncLoadedFilesCount();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
213 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
214 return;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
215 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
216 if (!inspect_item->IsIdentified())
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
217 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
218 iteminfo_window.DrawMessageBox(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
219 pRenderer->SetTextureClipRect(iteminfo_window.uFrameX + 12, iteminfo_window.uFrameY + 12,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
220 iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 12, iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 12);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
221 iteminfo_window.uFrameWidth -= 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
222 iteminfo_window.uFrameHeight -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
223 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
224 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1;
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
225 pRenderer->DrawTextureTransparent(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE));
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
226 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName, 3);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
227 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[232], &iteminfo_window, 0, 0) / 2,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
228 TargetColor(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[232], 3);//"Not Identified"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
229 pRenderer->ResetTextureClipRect();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
230 if ( !areWeLoadingTexture )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
231 {
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
232 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release();
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
233 pIcons_LOD->SyncLoadedFilesCount();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
234 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
235 return;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
236 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
237 sprintfex(out_text, pGlobalTXT_LocalizationStrings[463], pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName); //"Type: %s"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
238 out_text[100] = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
239 out_text[200] = 0;
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
240 switch (inspect_item->GetItemEquipType())
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
241 {
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
242 case EQUIP_OFF_HAND:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
243 case EQUIP_MAIN_HAND:
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
244 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[LOCSTR_ATTACK],
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
245 (int)inspect_item->GetDamageMod(), pGlobalTXT_LocalizationStrings[53],
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
246 (int)inspect_item->GetDamageDice(), (int)inspect_item->GetDamageRoll()); //"Damage"
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
247 if (inspect_item->GetDamageMod())
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
248 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
249 char mod[16];
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
250 sprintf(mod, "+%d", (int)inspect_item->GetDamageMod());
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
251 strcat(out_text + 100, mod);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
252 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
253 break;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
254
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
255 case EQUIP_BOW:
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
256 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[203], //"Shoot"
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
257 (int)inspect_item->GetDamageMod(), pGlobalTXT_LocalizationStrings[53], //"Damage"
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
258 (int)inspect_item->GetDamageDice(), (int)inspect_item->GetDamageRoll());
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
259 if (inspect_item->GetDamageMod())
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
260 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
261 char mod[16];
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
262 sprintf(mod, "+%d", (int)inspect_item->GetDamageMod());
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
263 strcat(out_text + 100, mod);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
264 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
265 break;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
266
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
267 case EQUIP_ARMOUR:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
268 case EQUIP_SHIELD:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
269 case EQUIP_HELMET:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
270 case EQUIP_BELT:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
271 case EQUIP_CLOAK:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
272 case EQUIP_GAUNTLETS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
273 case EQUIP_BOOTS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
274 case EQUIP_RING:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
275 case EQUIP_AMULET:
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
276 if (inspect_item->GetDamageDice()) //"Armor"
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
277 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11],
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
278 inspect_item->GetDamageDice() + inspect_item->GetDamageMod());
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
279 break;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
280 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
281
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
282 if ( !v77 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
283 {
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
284 if (inspect_item->GetItemEquipType() ==EQUIP_POTION) //this is CORRECT! do not move to switch!
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
285 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
286 if ( inspect_item->uEnchantmentType )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
287 sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
288 }
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
289 else if (inspect_item->GetItemEquipType() == EQUIP_REAGENT)
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
290 sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], inspect_item->GetDamageDice()); //"Power"
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
291 else if ( inspect_item->uEnchantmentType )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
292 sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210], pItemsTable->pEnchantments[inspect_item->uEnchantmentType-1].pBonusStat, inspect_item->m_enchantmentStrength); //"Special"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
293 else if ( inspect_item->uSpecEnchantmentType )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
294 sprintf(out_text + 200, "%s: %s", pGlobalTXT_LocalizationStrings[210], pItemsTable->pSpecialEnchantments[inspect_item->uSpecEnchantmentType-1].pBonusStatement, inspect_item->m_enchantmentStrength);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
295 else if ( inspect_item->uNumCharges )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
296 sprintf(out_text + 200, "%s: %lu", pGlobalTXT_LocalizationStrings[464], inspect_item->uNumCharges); //"Charges"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
297 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
298 iteminfo_window.uFrameWidth -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
299 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
300 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
301 Str = (char *)(3 * (LOBYTE(pFontArrus->uFontHeight) + 8));
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
302 v84 = &out_text[0];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
303 for ( uint i = 1; i <= 3; i++ )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
304 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
305 if ( *v84 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
306 Str += pFontComic->CalcTextHeight(v84, &iteminfo_window, 100, 0) + 3;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
307 v84 += 100;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
308 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
309 v28 = pItemsTable->pItems[inspect_item->uItemID].pDescription;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
310 if ( *v28 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
311 Str += pFontSmallnum->CalcTextHeight(pItemsTable->pItems[inspect_item->uItemID].pDescription, &iteminfo_window, 100, 0);
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
312 iteminfo_window.uFrameHeight = pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(),
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
313 TEXTURE_16BIT_PALETTE)->uTextureHeight + v81 + 54;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
314 if ( (signed int)Str > (signed int)iteminfo_window.uFrameHeight )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
315 iteminfo_window.uFrameHeight = (unsigned int)Str;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
316 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
317 iteminfo_window.uFrameHeight += LOBYTE(pFontComic->uFontHeight);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
318 v85 = 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
319 if ( pFontArrus->uFontHeight )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
320 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
321 iteminfo_window.uFrameWidth -= 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
322 if ( pFontArrus->CalcTextHeight(inspect_item->GetIdentifiedName(), &iteminfo_window, 0, 0) / (signed int)pFontArrus->uFontHeight )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
323 v85 = pFontArrus->uFontHeight;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
324 iteminfo_window.uFrameWidth += 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
325 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
326 iteminfo_window.uFrameWidth += 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
327 iteminfo_window.uFrameHeight += (unsigned int)v85;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
328 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
329 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
330 iteminfo_window.DrawMessageBox(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
331 pRenderer->SetTextureClipRect(iteminfo_window.uFrameX + 12, iteminfo_window.uFrameY + 12,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
332 iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 12, iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 12);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
333 iteminfo_window.uFrameWidth -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
334 iteminfo_window.uFrameHeight -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
335 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
336 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
337 pRenderer->DrawTextureTransparent(iteminfo_window.uFrameX + v78,
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
338 iteminfo_window.uFrameY + (signed int)(iteminfo_window.uFrameHeight - pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->uTextureHeight) / 2,
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
339 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE));
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
340
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
341 v34 = (int)(v85 + 35);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
342 Str = out_text;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
343 for ( uint i = 1; i <= 3; i++ )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
344 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
345 if ( *Str )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
346 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
347 iteminfo_window.DrawText(pFontComic, 100, v34, 0, Str, 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
348 v34 += pFontComic->CalcTextHeight(Str, &iteminfo_window, 100, 0) + 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
349 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
350 Str += 100;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
351 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
352 v28 = pItemsTable->pItems[inspect_item->uItemID].pDescription;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
353 if ( *v28 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
354 iteminfo_window.DrawText(pFontSmallnum, 100, v34, 0, v28, 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
355 iteminfo_window.uFrameX += 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
356 iteminfo_window.uFrameWidth -= 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
357 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), inspect_item->GetIdentifiedName(), 3);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
358 iteminfo_window.uFrameWidth += 24;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
359 iteminfo_window.uFrameX -= 12;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
360 if ( v77 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
361 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
362 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v77);//"Value"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
363 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
364 pRenderer->ResetTextureClipRect();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
365 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
366 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
367 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
368 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
369 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
370 init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
371 strcpy(pTmpBuf.data(), "Duration:");
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
372 Str = (char *)(v67.field_18_expire_year - game_starting_year);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
373 if (v67.field_18_expire_year != 1168 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
374 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
375 sprintf(v65, " %d:yr", v67.field_18_expire_year - game_starting_year);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
376 strcat(pTmpBuf.data(), v65);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
377 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
378 if ( (((v67.field_14_exprie_month || Str) &&
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
379 ((sprintf(v65, " %d:mo", v67.field_14_exprie_month), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
380 || v67.field_C_expire_day)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
381 && ((sprintf(v65, " %d:dy", v67.field_C_expire_day), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str ||
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
382 v67.field_C_expire_day)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
383 || v67.field_8_expire_hour)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
384 && ((sprintf(v65, " %d:hr", v67.field_8_expire_hour), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str ||
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
385 v67.field_C_expire_day || v67.field_8_expire_hour)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
386 || v67.field_4_expire_minute )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
387 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
388 sprintf(v65, " %d:mn", v67.field_4_expire_minute);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
389 strcat(pTmpBuf.data(), v65);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
390 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
391 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - 2 * LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
392 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
393 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], inspect_item->GetValue());
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
394 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
395 if ( BYTE1(inspect_item->uAttributes) & 1 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
396 pText = pGlobalTXT_LocalizationStrings[187]; //"Stolen"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
397 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
398 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
399 if ( !(BYTE1(inspect_item->uAttributes) & 2) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
400 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
401 pRenderer->ResetTextureClipRect();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
402 if ( !areWeLoadingTexture )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
403 {
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
404 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release();
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
405 pIcons_LOD->SyncLoadedFilesCount();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
406 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
407 return;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
408 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
409 pText = pGlobalTXT_LocalizationStrings[651]; //"Hardened"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
410 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
411 LOWORD(inspect_item->uAttributes) = LOWORD(pRenderer->uTargetRMask);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
412 iteminfo_window.DrawText(pFontComic, pFontComic->GetLineWidth(pTmpBuf.data()) + 132,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
413 iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), inspect_item->uAttributes, pText, 0, 0, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
414 pRenderer->ResetTextureClipRect();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
415 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
416 if ( !areWeLoadingTexture )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
417 {
1709
8251e59fd7c1 ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents: 1699
diff changeset
418 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release();
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
419 pIcons_LOD->SyncLoadedFilesCount();
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
420 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
421 return;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
422 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
423 // 4E455C: using guessed type int dword_4E455C;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
424 // 506128: using guessed type int areWeLoadingTexture;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
425
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
426 //----- (0041E360) --------------------------------------------------------
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
427 void MonsterPopup_Draw(unsigned int uActorID, GUIWindow *window)
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
428 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
429 int v8; // eax@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
430 unsigned __int16 v9; // dx@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
431 SpriteFrame *v10; // edi@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
432 unsigned int v18; // ecx@19
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
433 unsigned int v19; // eax@21
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
434 char *v20; // esi@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
435 int v21; // edx@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
436 unsigned __int16 *v22; // ecx@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
437 int v23; // eax@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
438 int v25; // esi@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
439 char *v26; // edx@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
440 unsigned __int8 v27; // sf@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
441 unsigned __int8 v28; // of@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
442 SpellBuff *v40; // eax@60
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
443 int v41; // edi@61
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
444 unsigned int v42; // eax@61
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
445 int v43; // eax@62
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
446 int v44; // eax@63
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
447 signed int v45; // edi@65
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
448 int pTextHeight; // edi@90
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
449 int v73; // [sp-8h] [bp-1F4h]@79
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
450 DDBLTFX Dst; // [sp+Ch] [bp-1E0h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
451 DDSURFACEDESC2 pDesc; // [sp+70h] [bp-17Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
452 RECT v84; // [sp+ECh] [bp-100h]@26
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
453 char *string_name[10]; // [sp+FCh] [bp-F0h]@145
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
454 char *content[11]; // [sp+124h] [bp-C8h]@127
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
455 RenderBillboardTransform_local0 v106; // [sp+150h] [bp-9Ch]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
456 unsigned int v107; // [sp+1A0h] [bp-4Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
457 unsigned __int16 *v108; // [sp+1A4h] [bp-48h]@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
458 unsigned int v109; // [sp+1A8h] [bp-44h]@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
459 LPVOID v110; // [sp+1ACh] [bp-40h]@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
460 int v115; // [sp+1C0h] [bp-2Ch]@3
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
461 bool normal_level; // [sp+1D0h] [bp-1Ch]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
462 bool expert_level; // [sp+1C4h] [bp-28h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
463 bool master_level; // [sp+1C8h] [bp-24h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
464 bool grandmaster_level; // [sp+1B4h] [bp-38h]@3
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
465 char *pText; // [sp+1D4h] [bp-18h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
466 int pTextColorID; // [sp+1E4h] [bp-8h]@18
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
467 int a4; // [sp+1E8h] [bp-4h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
468
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
469 bool monster_full_informations = true;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
470 static Actor pMonsterInfoUI_Doll;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
471 /*if ( !(bMonsterInfoUI_bDollInitialized & 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
472 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
473 bMonsterInfoUI_bDollInitialized |= 1u;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
474 Actor::Actor(&pMonsterInfoUI_Doll);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
475 atexit(nullsub_3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
476 }*/
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
477 v106.uParentBillboardID = -1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
478 v115 = monster_popup_y_offsets[((signed __int16)pActors[uActorID].pMonsterInfo.uID - 1) / 3] - 40;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
479 if ( pActors[uActorID].pMonsterInfo.uID == pMonsterInfoUI_Doll.pMonsterInfo.uID )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
480 v9 = pMonsterInfoUI_Doll.uCurrentActionLength;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
481 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
482 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
483 memcpy(&pMonsterInfoUI_Doll, &pActors[uActorID], sizeof(pMonsterInfoUI_Doll));
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
484 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
485 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
486 v8 = rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
487 v9 = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
488 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
489 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
490
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
491 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
492 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
493 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
494 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_Bored || pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_AtkMelee)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
495 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
496 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Standing;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
497 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
498 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
499 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
500 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
501 //rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
502 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
503 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186) &&
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
504 (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249) && rand() % 30 < 100 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
505 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_AtkMelee;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
506 pMonsterInfoUI_Doll.uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[pActors[uActorID].pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
507 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
508 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
509 v10 = pSpriteFrameTable->GetFrame( pActors[uActorID].pSpriteIDs[pMonsterInfoUI_Doll.uCurrentActionAnimation], pMonsterInfoUI_Doll.uCurrentActionTime);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
510 v106.pTarget = pRenderer->pTargetSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
511 v106.pTargetZ = pRenderer->pActiveZBuffer;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
512 v106.uTargetPitch = pRenderer->uTargetSurfacePitch;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
513 v106.uViewportX = window->uFrameX + 13;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
514 v106.uViewportY = window->uFrameY + 52;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
515 v106.uViewportW = (window->uFrameY + 52) + 128;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
516 v106.uViewportZ = v106.uViewportX + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
517 v106.uScreenSpaceX = (signed int)(v106.uViewportX + 128 + v106.uViewportX) / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
518 v106._screenspace_x_scaler_packedfloat = 65536;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
519 v106._screenspace_y_scaler_packedfloat = 65536;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
520 v106.uScreenSpaceY = v115 + (window->uFrameY + 52) + pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].uHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
521 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
522 v106.sZValue = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
523 v106.uFlags = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
524 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu);
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
525 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, TargetColor(0xE1u, 255, 0x9Bu));
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
526 pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, TargetColor(0xE1u, 255, 0x9Bu));
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
527 pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, TargetColor(0xE1u, 255, 0x9Bu));
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
528 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, TargetColor(0xE1u, 255, 0x9Bu));
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
529 if ( pRenderer->pRenderD3D )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
530 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
531 v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
532 memset(&Dst, 0, 0x64u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
533 Dst.dwSize = 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
534 Dst.dwFillColor = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
535 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
536 pDesc.dwSize = 124;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
537 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->GetSurfaceDesc(&pDesc);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
538 v107 = 0;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
539 uint i = 0;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
540 int dst_x = v106.uScreenSpaceX + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaX - pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferWidth / 2;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
541 int dst_y = v106.uScreenSpaceY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaY - pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
542 uint dst_z = v106.uScreenSpaceX + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaX + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferWidth / 2 - pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
543 uint dst_w = v106.uScreenSpaceY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight - pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
544 if (dst_x < v106.uViewportX)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
545 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
546 v18 = v106.uViewportX - dst_x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
547 dst_x = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
548 v107 = v18;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
549 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
550 if (dst_y < v106.uViewportY)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
551 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
552 v19 = v106.uViewportY - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
553 dst_y = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
554 i = v19;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
555 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
556 if (dst_z > v106.uViewportZ)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
557 dst_z = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
558 if (dst_w > v106.uViewportW)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
559 dst_w = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
560 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
561 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
562 v84.left = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
563 v84.top = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
564 v84.right = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
565 v84.bottom = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
566 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
567 if ( pRenderer->uTargetGBits == 5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
568 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
569 __debugbreak(); // no monster popup for r5g5b5 yet
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
570 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
571 pDesc.dwSize = 124;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
572 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT))
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
573 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
574 v20 = (char *)dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
575 v110 = pDesc.lpSurface;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
576 if (dst_y < dst_w)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
577 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
578 v21 = dst_x;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
579 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
580 auto _v22_2 = v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
581 v23 = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
582 v115 = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
583 while ( 1 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
584 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
585 dst_y = v21;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
586 if ( v21 < dst_z )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
587 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
588 v25 = v107 - v21;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
589 v109 = (int)&v20[v23];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
590 for ( i = v107 - v21; ; v25 = i )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
591 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
592 v108 = (unsigned __int16 *)((pDesc.lPitch >> 1) * pDesc.dwHeight * v109 / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
593 v26 = (char *)v108 + pDesc.dwWidth * (v25 + dst_y++) / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
594 *v22 = *((short *)v110 + (int)v26);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
595 ++v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
596 if ( dst_y >= dst_z )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
597 break;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
598 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
599 v23 = v115;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
600 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
601 v22 = (unsigned __int16 *)((char *)_v22_2 + 2 * pRenderer->uTargetSurfacePitch);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
602 _v22_2 = v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
603 v20 = (char *)(dst_y + 1);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
604 v28 = __OFSUB__(dst_y + 1, dst_w);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
605 v27 = (signed int)(dst_y++ + 1 - dst_w) < 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
606 if ( !(v27 ^ v28) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
607 break;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
608 v21 = dst_x;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
609 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
610 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
611 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
612 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
613 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
614 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
615 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
616 memset(&pDesc, 0, 0x7Cu);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
617 pDesc.dwSize = 124;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
618 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
619 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
620 auto src = (unsigned __int16 *)pDesc.lpSurface;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
621 uint num_top_scanlines_above_frame_y = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
622 for (uint y = dst_y; y < dst_w; ++y)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
623 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
624 auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x];
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
625
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
626 uint src_y = num_top_scanlines_above_frame_y + y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
627 for (uint x = dst_x; x < dst_z; ++x)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
628 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
629 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
630
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
631 uint idx = pDesc.dwHeight * src_y / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight * (pDesc.lPitch / sizeof(short)) +
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
632 pDesc.dwWidth * src_x / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
633 uint b = src[idx] & 0x1F;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
634 *dst++ = b | 2 * (src[idx] & 0xFFE0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
635 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
636 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
637 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
638 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
639 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
640 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
641 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
642 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
643 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0);
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
644 if ( v10->pHwSpriteIDs[0] >= 0 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
645 pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].DrawSprite_sw(&v106, 0);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
646 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
647 //name and profession
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
648 if ( pActors[uActorID].sNPC_ID )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
649 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
650 if (GetNPCData(pActors[uActorID].sNPC_ID)->uProfession)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
651 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], GetNPCData(pActors[uActorID].sNPC_ID)->pName, aNPCProfessionNames[GetNPCData(pActors[uActorID].sNPC_ID)->uProfession]); // "%s the %s" / ^Pi[%s] %s
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
652 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
653 strncpy(pTmpBuf.data(), GetNPCData(pActors[uActorID].sNPC_ID)->pName, 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
654 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
655 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
656 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
657 if ( pActors[uActorID].dword_000334_unique_name )
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
658 strncpy(pTmpBuf.data(), pMonsterStats->pPlaceStrings[pActors[uActorID].dword_000334_unique_name], 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
659 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
660 strncpy(pTmpBuf.data(), pMonsterStats->pInfos[pActors[uActorID].pMonsterInfo.uID].pName, 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
661 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
662 window->DrawTitleText(pFontComic, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
663 //health bar
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
664 Actor::DrawHealthBar(&pActors[uActorID], window);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
665
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
666 normal_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
667 expert_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
668 master_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
669 grandmaster_level = 0;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
670 pMonsterInfoUI_Doll.uCurrentActionTime += pMiscTimer->uTimeElapsed;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
671 v115 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
672 if ( !uActiveCharacter )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
673 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
674 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
675 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
676 int i = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
677 if ( !i )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
678 v45 = 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
679 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
680 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
681 v41 = (unsigned __int8)i & 0x3F;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
682 v42 = SkillToMastery(i) - 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
683 if ( !v42 )//not master
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
684 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
685 if ( v41 + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
686 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
687 v45 = 1;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
688 normal_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
689 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
690 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
691 v45 = 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
692 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
693 else//he is master
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
694 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
695 v43 = v42 - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
696 if ( !v43 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
697 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
698 if ( 2 * v41 + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
699 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
700 v45 = 1;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
701 normal_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
702 expert_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
703 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
704 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
705 v45 = 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
706 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
707 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
708 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
709 v44 = v43 - 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
710 if ( !v44 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
711 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
712 if ( 3 * v41 + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
713 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
714 v45 = 1;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
715 normal_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
716 expert_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
717 master_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
718 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
719 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
720 v45 = 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
721 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
722 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
723 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
724 if ( v44 != 1 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
725 v45 = 1;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
726 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
727 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
728 v45 = 1;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
729 normal_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
730 expert_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
731 master_level = 1;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
732 grandmaster_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
733 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
734 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
735 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
736 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
737 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
738 if ( pActors[uActorID].uAIState != Dead
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
739 && pActors[uActorID].uAIState != Dying
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
740 && !dword_507BF0_is_there_popup_onscreen && i )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
741 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
742 if ( normal_level | expert_level | master_level | grandmaster_level )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
743 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
744 if ( pActors[uActorID].pMonsterInfo.uLevel >= pPlayers[uActiveCharacter]->uLevel - 5 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
745 v73 = SPEECH_105;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
746 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
747 v73 = SPEECH_104;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
748 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
749 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
750 v73 = SPEECH_106;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
751 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)v73, 0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
752 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
753 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
754
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
755 if ( (signed int)SkillToMastery(pParty->pPlayers[uActiveCharacter].GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID)) >= 3 )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
756 v115 = v45;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
757
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
758 if ( monster_full_informations == true )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
759 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
760 normal_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
761 expert_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
762 master_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
763 grandmaster_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
764 v115 = 1;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
765 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
766
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
767 window->DrawText(pFontSmallnum, 12, 196, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[631], 0, 0, 0);//Effects
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
768 if ( !v115 )
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
769 window->DrawText(pFontSmallnum, 28, LOBYTE(pFontSmallnum->uFontHeight) + 193, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[630], 0, 0, 0);//?
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
770 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
771 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
772 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
773 pTextHeight = LOBYTE(pFontSmallnum->uFontHeight) + 193;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
774 for ( uint i = 1; i <= 21; ++i )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
775 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
776 if ( pActors[uActorID].pActorBuffs[i].uExpireTime > 0 )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
777 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
778 switch ( i - 1 )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
779 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
780 case 0:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
781 pTextColorID = 60;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
782 pText = pGlobalTXT_LocalizationStrings[591];//Charmed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
783 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
784 case 1:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
785 pTextColorID = 82;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
786 pText = pGlobalTXT_LocalizationStrings[649];//Summoned
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
787 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
788 case 2:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
789 pTextColorID = 92;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
790 pText = pGlobalTXT_LocalizationStrings[592];//Shrunk
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
791 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
792 case 3:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
793 pTextColorID = 63;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
794 pText = pGlobalTXT_LocalizationStrings[4];//Afraid
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
795 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
796 case 4:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
797 pText = pGlobalTXT_LocalizationStrings[220];//Stoned
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
798 pTextColorID = 81;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
799 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
800 case 5:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
801 pText = pGlobalTXT_LocalizationStrings[162];//Paralyzed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
802 pTextColorID = 81;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
803 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
804 case 6:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
805 pText = pGlobalTXT_LocalizationStrings[593];//Slowed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
806 pTextColorID = 35;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
807 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
808 case 8:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
809 pText = pGlobalTXT_LocalizationStrings[608];//Berserk
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
810 pTextColorID = 62;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
811 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
812 case 7:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
813 case 9:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
814 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
815 pTextColorID = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
816 continue;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
817 case 10:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
818 pTextColorID = 47;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
819 pText = pGlobalTXT_LocalizationStrings[221];//Fate
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
820 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
821 case 11:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
822 pTextColorID = 66;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
823 pText = pGlobalTXT_LocalizationStrings[607];//Enslaved
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
824 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
825 case 12:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
826 pTextColorID = 85;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
827 pText = pGlobalTXT_LocalizationStrings[610];//Day of Protection
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
828 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
829 case 13:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
830 pTextColorID = 86;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
831 pText = pGlobalTXT_LocalizationStrings[609];//Hour of Power
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
832 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
833 case 14:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
834 pTextColorID = 17;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
835 pText = pGlobalTXT_LocalizationStrings[279];//Shield
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
836 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
837 case 15:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
838 pTextColorID = 38;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
839 pText = pGlobalTXT_LocalizationStrings[442];//Stoneskin
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
840 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
841 case 16:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
842 pTextColorID = 46;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
843 pText = pGlobalTXT_LocalizationStrings[443];//Bless
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
844 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
845 case 17:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
846 pTextColorID = 51;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
847 pText = pGlobalTXT_LocalizationStrings[440];//Heroism
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
848 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
849 case 18:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
850 pTextColorID = 5;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
851 pText = pGlobalTXT_LocalizationStrings[441];//Haste
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
852 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
853 case 19:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
854 pTextColorID = 95;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
855 pText = pGlobalTXT_LocalizationStrings[229];//Pain Reflection
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
856 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
857 case 20:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
858 pTextColorID = 73;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
859 pText = pGlobalTXT_LocalizationStrings[228];//Hammerhands
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
860 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
861 default:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
862 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
863 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
864 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
865 if ( pText != "" )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
866 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
867 window->DrawText(pFontSmallnum, 28, pTextHeight, GetSpellColor(pTextColorID), pText, 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
868 pTextHeight = pTextHeight + *(char *)((int)pFontSmallnum + 5) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
869 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
870 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
871 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
872 if ( pText == "" )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
873 window->DrawText(pFontSmallnum, 28, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[153], 0, 0, 0);//Нет
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
874 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
875
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
876 if ( normal_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
877 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
878 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[108], 0, pActors[uActorID].pMonsterInfo.uHP);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
879 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
880 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
881 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[12], 0, pActors[uActorID].pMonsterInfo.uAC);//Armor Class
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
882 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
883 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
884 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
885 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]);//?
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
886 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
887 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
888 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[12], 0, (unsigned int)pGlobalTXT_LocalizationStrings[630]);//?
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
889 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
890 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
891 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
892
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
893 content[0] = pGlobalTXT_LocalizationStrings[87];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
894 content[1] = pGlobalTXT_LocalizationStrings[6];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
895 content[2] = pGlobalTXT_LocalizationStrings[240];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
896 content[3] = pGlobalTXT_LocalizationStrings[70];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
897 content[4] = pGlobalTXT_LocalizationStrings[624];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
898 content[5] = pGlobalTXT_LocalizationStrings[138];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
899 content[6] = pGlobalTXT_LocalizationStrings[214];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
900 content[7] = pGlobalTXT_LocalizationStrings[142];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
901 content[8] = pGlobalTXT_LocalizationStrings[29];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
902 content[9] = pGlobalTXT_LocalizationStrings[133];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
903 content[10] = pGlobalTXT_LocalizationStrings[54];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
904
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
905 if ( expert_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
906 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
907 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, content[pActors[uActorID].pMonsterInfo.uAttack1Type]);//Attack
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
908 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
909 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
910 if ( pActors[uActorID].pMonsterInfo.uAttack1DamageBonus )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
911 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53],
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
912 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides, pActors[uActorID].pMonsterInfo.uAttack1DamageBonus);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
913 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
914 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53],
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
915 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
916 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
917 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
918 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
919 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
920 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
921 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
922 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
923 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
924 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
925 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
926
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
927 if ( !master_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
928 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
929 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[630]);//"Spell" "?"
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
930 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
931 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
932 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
933 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
934 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
935 pText = pGlobalTXT_LocalizationStrings[628];//Spell
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
936 if ( pActors[uActorID].pMonsterInfo.uSpell1ID && pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
937 pText = pGlobalTXT_LocalizationStrings[629];//Spells
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
938 if ( pActors[uActorID].pMonsterInfo.uSpell1ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
939 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
940 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pText, 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell1ID].pShortName);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
941 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
942 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
943 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
944 if ( pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
945 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
946 sprintf(pTmpBuf.data(), "\f%05u\t070%s\n", 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell2ID].pShortName);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
947 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
948 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
949 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
950 if ( !pActors[uActorID].pMonsterInfo.uSpell1ID && !pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
951 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
952 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[153]);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
953 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
954 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
955 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
956 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
957 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
958 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[626], 0, 0, 0);//Immune
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
959 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
960
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
961 string_name[0] = pGlobalTXT_LocalizationStrings[87];//Fire
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
962 string_name[1] = pGlobalTXT_LocalizationStrings[6];//Air
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
963 string_name[2] = pGlobalTXT_LocalizationStrings[240];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
964 string_name[3] = pGlobalTXT_LocalizationStrings[70];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
965 string_name[4] = pGlobalTXT_LocalizationStrings[142];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
966 string_name[5] = pGlobalTXT_LocalizationStrings[214];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
967 string_name[6] = pGlobalTXT_LocalizationStrings[29];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
968 string_name[7] = pGlobalTXT_LocalizationStrings[133];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
969 string_name[8] = pGlobalTXT_LocalizationStrings[54];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
970 string_name[9] = pGlobalTXT_LocalizationStrings[624];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
971
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
972 content[0] = (char *)pActors[uActorID].pMonsterInfo.uResFire;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
973 content[1] = (char *)pActors[uActorID].pMonsterInfo.uResAir;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
974 content[2] = (char *)pActors[uActorID].pMonsterInfo.uResWater;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
975 content[3] = (char *)pActors[uActorID].pMonsterInfo.uResEarth;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
976 content[4] = (char *)pActors[uActorID].pMonsterInfo.uResMind;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
977 content[5] = (char *)pActors[uActorID].pMonsterInfo.uResSpirit;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
978 content[6] = (char *)pActors[uActorID].pMonsterInfo.uResBody;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
979 content[7] = (char *)pActors[uActorID].pMonsterInfo.uResLight;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
980 content[8] = (char *)pActors[uActorID].pMonsterInfo.uResPhysical;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
981 content[9] = (char *)pActors[uActorID].pMonsterInfo.uResDark;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
982
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
983 if ( grandmaster_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
984 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
985 for ( uint i = 0; i < 10; i++ )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
986 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
987 if ( content[i] == (char *)200 )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
988 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
989 pText = pGlobalTXT_LocalizationStrings[625];//Immune
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
990 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
991 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
992 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
993 if ( content[i] )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
994 pText = pGlobalTXT_LocalizationStrings[627];//Resistant
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
995 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
996 pText = pGlobalTXT_LocalizationStrings[153];//None
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
997 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
998 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pText);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
999 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1000 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1001 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1002 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1003 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1004 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1005 for ( uint i = 0; i < 10; ++i )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1006 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1007 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?"
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1008 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1009 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1010 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1011 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1012 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1013 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
1014 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[650], pActors[uActorID].sCurrentHP);//Current Hit Points
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1015 pFontSmallnum->GetLineWidth(pTmpBuf.data());
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
1016 window->DrawTitleText(pFontSmallnum, 0, window->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, 0, pTmpBuf.data(), 3);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1017 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1018 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1019
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1020
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1021 //----- (00417BB5) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1022 const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1023 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1024 //enum PLAYER_SKILL_TYPE v2; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1025 //unsigned int v3; // ebx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1026 int v4; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1027 int v5; // eax@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1028 Player *pPlayer; // ebx@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1029 char v7; // al@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1030 char v8; // cl@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1031 unsigned int v9; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1032 unsigned int v10; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1033 unsigned int v11; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1034 PLAYER_SKILL_TYPE v12; // edi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1035 unsigned int v13; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1036 unsigned int v14; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1037 PLAYER_SKILL_TYPE v15; // esi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1038 int v16; // edi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1039 char v17; // al@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1040 int v18; // ST5C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1041 int v19; // ST4C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1042 int v20; // ST3C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1043 int v21; // ST2C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1044 int v22; // ST1C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1045 char *v23; // esi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1046 unsigned int v24; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1047 unsigned int v25; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1048 unsigned int v26; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1049 unsigned int v27; // ecx@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1050 PLAYER_SKILL_TYPE v28; // ebx@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1051 unsigned int v29; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1052 char a2[1200]; // [sp+Ch] [bp-538h]@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1053 char Source[120]; // [sp+4BCh] [bp-88h]@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1054 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1055 int v34; // [sp+538h] [bp-Ch]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1056 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1057 //enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1058
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1059 //v2 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1060 //v3 = uPlayerID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1061 //v36 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1062 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1063 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1064 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1065 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1066 v35 = (unsigned __int16 *)v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1067 if ( v34 > v4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1068 v35 = (unsigned __int16 *)v34;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1069 if ( (signed int)v33 > (signed int)v35 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1070 v35 = v33;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1071 if ( v5 > (signed int)v35 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1072 v35 = (unsigned __int16 *)v5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1073 pPlayer = &pParty->pPlayers[uPlayerID];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1074 //v33 = &pPlayer->pActiveSkills[uPlayerSkillType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1075 v7 = pPlayer->GetActualSkillLevel(uPlayerSkillType);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1076 v8 = pPlayer->pActiveSkills[uPlayerSkillType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1077 a2[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1078 Source[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1079 if ( (v8 & 0x3F) == (v7 & 0x3F) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1080 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1081 strcpy(a2, "%s\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1082 v24 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1083 sprintf(Source, "\f%05d", v24);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1084 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1085 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1086 v25 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1087 sprintf(Source, "\f%05d", v25);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1088 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1089 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1090 v26 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1091 sprintf(Source, "\f%05d", v26);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1092 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1093 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1094 v27 = pPlayer->classType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1095 v28 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1096 v29 = GetSkillColor(v27, uPlayerSkillType, 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1097 sprintf(Source, "\f%05d", v29);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1098 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1099 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1100
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1101 v23 = static_sub_417BB5_out_string;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1102 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[v28], pGlobalTXT_LocalizationStrings[431], // Normal
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1103 (char *)v35 + 3, v35 + 5, pNormalSkillDesc[v28], pGlobalTXT_LocalizationStrings[433], // Expert
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1104 (char *)v35 + 3, v35 + 5, pExpertSkillDesc[v28], pGlobalTXT_LocalizationStrings[432], // Master
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1105 (char *)v35 + 3, v35 + 5, pMasterSkillDesc[v28], pGlobalTXT_LocalizationStrings[96], // Grand
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1106 (char *)v35 + 3, v35 + 5, pGrandSkillDesc[v28]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1107 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1108 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1109 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1110 strcpy(a2, "%s\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1111 v9 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1112 sprintf(Source, "\f%05d", v9);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1113 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1114 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1115 v10 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1116 sprintf(Source, "\f%05d", v10);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1117 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1118 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1119 v11 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1120 sprintf(Source, "\f%05d", v11);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1121 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1122 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1123 v12 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1124 v13 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1125 sprintf(Source, "\f%05d", v13);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1126 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1127 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1128 v14 = TargetColor(0xFFu, 0xFFu, 0xFFu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1129 sprintf(Source, "\f%05d", v14);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1130 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1131 strcat(a2, "%s: +%d");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1132 v15 = v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1133 v16 = (int)(v35 + 5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1134 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1135 v34 = (int)((char *)v35 + 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1136 v17 = pPlayer->GetActualSkillLevel(uPlayerSkillType);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1137 v18 = *(int *)(pGrandSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1138 v19 = *(int *)(pMasterSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1139 v20 = *(int *)(pExpertSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1140 v21 = *(int *)(pNormalSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1141 v22 = *(int *)(pSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1142 v23 = static_sub_417BB5_out_string;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1143 sprintf(
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1144 static_sub_417BB5_out_string,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1145 a2,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1146 v22,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1147 pGlobalTXT_LocalizationStrings[431],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1148 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1149 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1150 v21,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1151 pGlobalTXT_LocalizationStrings[433],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1152 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1153 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1154 v20,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1155 pGlobalTXT_LocalizationStrings[432],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1156 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1157 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1158 v19,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1159 pGlobalTXT_LocalizationStrings[96],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1160 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1161 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1162 v18,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1163 pGlobalTXT_LocalizationStrings[623],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1164 (v17 & 0x3F) - (*(char *)v33 & 0x3F));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1165 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1166 return v23;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1167 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1168
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1169 //----- (00417FE5) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1170 void CharacterUI_SkillsTab_ShowHint()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1171 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1172 unsigned int v0; // ecx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1173 unsigned int v1; // eax@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1174 GUIButton *i; // esi@6
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1175 const char *v3; // eax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1176 unsigned int pX; // [sp+4h] [bp-8h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1177 unsigned int pY; // [sp+8h] [bp-4h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1178
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1179 pMouse->GetClickPos(&pX, &pY);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1180 v0 = pX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1181 v1 = pY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1182 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1183 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1184 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1185 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1186 if ( i->msg == UIMSG_SkillUp
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1187 && (signed int)v0 >= (signed int)i->uX
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1188 && (signed int)v0 <= (signed int)i->uZ
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1189 && (signed int)v1 >= (signed int)i->uY
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1190 && (signed int)v1 <= (signed int)i->uW )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1191 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1192 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->msg_param);
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1193 CharacterUI_DrawTooltip(pSkillNames[i->msg_param], v3);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1194 v1 = pY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1195 v0 = pX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1196 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1197 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1198 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1199 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1200 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1201 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1202 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1203
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1204 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1205
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1206 //----- (00418083) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1393
diff changeset
1207 void CharacterUI_StatsTab_ShowHint()
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1208 {
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1209 int pStringNum; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1210 signed int pTextColor; // eax@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1211 char *pHourWord; // ecx@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1212 char *pDayWord; // eax@20
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1213 int v15; // ebx@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1214 int v16; // eax@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1215 POINT a2; // [sp+Ch] [bp-24h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1216 int pHour; // [sp+14h] [bp-1Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1217 unsigned int pDay; // [sp+24h] [bp-Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1218
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1219 pMouse->GetCursorPos(&a2);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1220 for ( pStringNum = 0; pStringNum < stat_string_coord.size(); ++pStringNum )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1221 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1222 if (a2.x >= stat_string_coord[pStringNum].x && a2.x <= stat_string_coord[pStringNum].x + stat_string_coord[pStringNum].width )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1223 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1224 if (a2.y >= stat_string_coord[pStringNum].y && a2.y <= stat_string_coord[pStringNum].y + stat_string_coord[pStringNum].height )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1225 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1226 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1227 }
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1228
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1229 switch ( pStringNum )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1230 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1231 case 0:// Attributes
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1232 case 1:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1233 case 2:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1234 case 3:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1235 case 4:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1236 case 5:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1237 case 6:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1238 if ( aAttributeNames[pStringNum] && pAttributeDescriptions[pStringNum] )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1239 CharacterUI_DrawTooltip(aAttributeNames[pStringNum], pAttributeDescriptions[pStringNum]);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1240 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1241 case 7:// Health Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1242 if ( pGlobalTXT_LocalizationStrings[108] && pHealthPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1243 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[108], pHealthPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1244 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1245 case 8:// Spell Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1246 if ( pGlobalTXT_LocalizationStrings[212] && pSpellPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1247 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[212], pSpellPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1248 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1249 case 9:// Armor Class
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1250 if ( pGlobalTXT_LocalizationStrings[12] && pArmourClassAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1251 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[12], pArmourClassAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1252 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1253 case 10:// Player Condition
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1254 strcpy(pTmpBuf2.data(), pPlayerConditionAttributeDescription);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1255 strcat(pTmpBuf2.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1256 extern std::array<unsigned int, 18> pConditionImportancyTable;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1257 for ( uint i = 0; i < 18; ++i )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1258 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1259 if ( pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]] )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1260 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1261 strcat(pTmpBuf2.data(), " \n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1262 pHour = pParty->uTimePlayed - pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1263 pHour = (unsigned int)((pHour * 0.234375) / 60 / 60);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1264 pDay = (unsigned int)pHour / 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1265 pHour %= 24i64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1266 pTextColor = GetConditionDrawColor(pConditionImportancyTable[i]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1267 sprintfex(pTmpBuf.data(), format_4E2DE8, pTextColor, aCharacterConditionNames[pConditionImportancyTable[i]]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1268 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1269 if ( pHour && pHour <= 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1270 pHourWord = pGlobalTXT_LocalizationStrings[109];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1271 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1272 pHourWord = pGlobalTXT_LocalizationStrings[110];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1273 if ( !pDay || (pDayWord = pGlobalTXT_LocalizationStrings[56], pDay > 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1274 pDayWord = pGlobalTXT_LocalizationStrings[57];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1275 sprintfex(pTmpBuf.data(), "%lu %s, %lu %s", pDay, pDayWord, pHour, pHourWord);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1276 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1277 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1278 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1279 if ( pGlobalTXT_LocalizationStrings[47] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1280 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[47], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1281 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1282 case 11:// Fast Spell
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1283 if ( pGlobalTXT_LocalizationStrings[172] && pFastSpellAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1284 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[172], pFastSpellAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1285 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1286 case 12:// Player Age
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1287 if ( pGlobalTXT_LocalizationStrings[5] && pPlayerAgeAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1288 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[5], pPlayerAgeAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1289 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1290 case 13:// Player Level
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1291 if ( pGlobalTXT_LocalizationStrings[131] && pPlayerLevelAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1292 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[131], pPlayerLevelAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1293 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1294 case 14://Experience
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1295 v15 = pPlayers[uActiveCharacter]->uLevel;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1296 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1297 {
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
1298 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience < (unsigned int)GetExperienceRequiredForLevel(v15) )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1299 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1300 ++v15;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1301 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1302 while ( v15 <= 10000 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1303 pTmpBuf[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1304 pTmpBuf2[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1305 if ( v15 > pPlayers[uActiveCharacter]->uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1306 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[147], v15);
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
1307 v16 = GetExperienceRequiredForLevel(v15) - LODWORD(pPlayers[uActiveCharacter]->uExperience);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1308 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[538], v16, v15 + 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1309 strcat(pTmpBuf.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1310 strcat(pTmpBuf.data(), pTmpBuf2.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1311 sprintf(pTmpBuf2.data(), "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1312 if ( pGlobalTXT_LocalizationStrings[83] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1313 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[83], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1314 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1315 case 15:// Attack Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1316 if ( pGlobalTXT_LocalizationStrings[587] && pAttackBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1317 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[587], pAttackBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1318 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1319 case 16:// Attack Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1320 if ( pGlobalTXT_LocalizationStrings[588] && pAttackDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1321 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[588], pAttackDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1322 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1323 case 17:// Missle Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1324 if ( pGlobalTXT_LocalizationStrings[589] && pMissleBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1325 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[589], pMissleBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1326 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1327 case 18:// Missle Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1328 if ( pGlobalTXT_LocalizationStrings[590] && pMissleDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1329 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[590], pMissleDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1330 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1331 case 19:// Fire Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1332 if ( pGlobalTXT_LocalizationStrings[87] && pFireResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1333 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[87], pFireResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1334 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1335 case 20:// Air Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1336 if ( pGlobalTXT_LocalizationStrings[6] && pAirResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1337 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[6], pAirResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1338 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1339 case 21:// Water Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1340 if ( pGlobalTXT_LocalizationStrings[240] && pWaterResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1341 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[240], pWaterResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1342 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1343 case 22:// Earth Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1344 if ( pGlobalTXT_LocalizationStrings[70] && pEarthResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1345 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[70], pEarthResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1346 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1347 case 23:// Mind Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1348 if ( pGlobalTXT_LocalizationStrings[142] && pMindResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1349 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[142], pMindResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1350 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1351 case 24:// Body Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1352 if ( pGlobalTXT_LocalizationStrings[29] && pBodyResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1353 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[29], pBodyResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1354 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1355 case 25: // Skill Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1356 if ( pGlobalTXT_LocalizationStrings[207] && pSkillPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1357 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1358 break;
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1359 case 26: // Class description
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1360 {
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
1361 if (pClassDescriptions[pPlayers[uActiveCharacter]->classType] && pClassNames[pPlayers[uActiveCharacter]->classType])
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
1362 CharacterUI_DrawTooltip(pClassNames[pPlayers[uActiveCharacter]->classType], pClassDescriptions[pPlayers[uActiveCharacter]->classType]);
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1363 }
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1364 break;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1365
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1366 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1367 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1368 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1369 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1370
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1371 //----- (00410B28) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1393
diff changeset
1372 void DrawSpellDescriptionPopup(int spell_index)
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1373 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1374 Player *v1; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1375 SpellInfo *v2; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1376 unsigned int v3; // eax@2
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1377 int v4; // eax@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1378 LONG v5; // ecx@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1379 int v6; // eax@10
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1380 char *v7; // ST44_4@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1381 unsigned __int16 v8; // ax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1382 GUIWindow a1; // [sp+Ch] [bp-68h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1383 int v10; // [sp+60h] [bp-14h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1384 POINT a2; // [sp+64h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1385 int v12; // [sp+6Ch] [bp-8h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1386 int v13; // [sp+70h] [bp-4h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1387
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1388 v1 = pPlayers[uActiveCharacter];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1389 v10 = spell_index;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1390 v2 = &pSpellStats->pInfos[spell_index + 11 * v1->lastOpenedSpellbookPage + 1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1391 if ( pMouse->GetCursorPos(&a2)->y <= 250 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1392 v3 = pMouse->GetCursorPos(&a2)->y + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1393 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1394 v3 = 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1395 a1.uFrameY = v3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1396 a1.uFrameWidth = 328;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1397 a1.uFrameHeight = 68;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1398 a1.uFrameX = 90;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1399 a1.uFrameZ = 417;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1400 a1.uFrameW = v3 + 67;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1401 a1.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1402 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1403 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1404 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1405 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1406 v5 = a2.y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1407 if ( v13 > a2.y )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1408 v5 = v13;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1409 if ( v12 > v5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1410 v5 = v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1411 if ( v4 > v5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1412 v5 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1413 sprintf( pTmpBuf2.data(),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1414 "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s",
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1415 v2->pDescription,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1416 pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1417 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1418 v2->pBasicSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1419 pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1420 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1421 v2->pExpertSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1422 pGlobalTXT_LocalizationStrings[LOCSTR_MASTER],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1423 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1424 v2->pMasterSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1425 pGlobalTXT_LocalizationStrings[LOCSTR_GRAND],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1426 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1427 v2->pGrandmasterSkillDesc);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1428 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1429 a1.uFrameHeight += v6;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1430 if ( (signed int)a1.uFrameHeight < 150 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1431 a1.uFrameHeight = 150;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1432 a1.uFrameWidth = game_viewport_width;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1433 a1.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1434 a1.uFrameWidth -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1435 a1.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1436 v7 = v2->pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1437 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1438 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1439 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1440 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1441 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1442 a1.uFrameWidth = 108;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1443 a1.uFrameZ = a1.uFrameX + 107;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1444 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->lastOpenedSpellbookPage + 12], 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1445 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1446 pSpellDatas[spell_index + 11 * v1->lastOpenedSpellbookPage + 1].mana_per_skill[v1->pActiveSkills[v1->lastOpenedSpellbookPage + PLAYER_SKILL_FIRE]]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1447 // *(&[0].field_12 //temp_fix field_14
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1448 // + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->lastOpenedSpellbookPage + 12]) >> 6)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1449 // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage)));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1450 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1451 dword_507B00_spell_info_to_draw_in_popup = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1452 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1453 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1454
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1455
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1456
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1457
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1458
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1459 //----- (00416D62) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1460 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1461 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1462 signed int pPlayerNum; // eax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1463 char *v2; // eax@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1464 void *v3; // ecx@52
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1465 unsigned int v4; // eax@59
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1466 int v5; // esi@62
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1467 signed int v6; // esi@64
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1468 signed int v7; // esi@69
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1469 ItemGen *v8; // ecx@70
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1470 unsigned int v9; // eax@72
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1471 unsigned int v10; // eax@76
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1472 //char v11; // zf@83
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1473 GUIButton *pButton; // esi@84
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1474 unsigned int v13; // ecx@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1475 char *pStr; // edi@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1476 //signed int pControlID; // eax@92
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1477 int v16; // eax@95
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1478 int v17; // eax@96
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1479 PLAYER_SKILL_TYPE v18; // eax@98
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1480 char *pStr2; // eax@99
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1481 unsigned int v20; // eax@108
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1482 unsigned int pSkillId; // eax@109
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1483 const char *pSkillInfo; // eax@111
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1484 //char *v23; // ebx@112
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1485 char *pHint; // edx@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1486 unsigned int pColor; // eax@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1487 GUIWindow pWindow; // [sp+4h] [bp-74h]@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1488 double v27; // [sp+58h] [bp-20h]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1489 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1490 char *v29; // [sp+68h] [bp-10h]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1491 float v30; // [sp+6Ch] [bp-Ch]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1492 unsigned int pX; // [sp+70h] [bp-8h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1493 unsigned int pY; // [sp+74h] [bp-4h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1494
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1495 if ( pCurrentScreen == SCREEN_VIDEO )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1496 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1497 if ( _this )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1498 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1499 pX = _this->x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1500 pY = _this->y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1501 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1502 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1503 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1504 pMouse->GetClickPos(&pX, &pY);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1505 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1506 if ( pRenderer->bWindowMode )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1507 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1508 GetCursorPos(&Point);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1509 ScreenToClient(hWnd, &Point);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1510 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1511 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1512 back_to_game();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1513 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1514 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1515 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1516
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1517 if ( pParty->pPickedItem.uItemID )//нажатие на портрет перса правой кнопкой мыши с раствором
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1518 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1519 //v1 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1520 //do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1521 for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1522 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1523 if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum]
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1524 && (signed int)pY > 375 && (signed int)pY < 466 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1525 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1526 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1527 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1528 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1529 //++v1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1530 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1531 //while ( v1 < 4 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1532 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1533
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1534 pEventTimer->Pause();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1535
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1536 switch(pCurrentScreen)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1537 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1538 case SCREEN_CASTING:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1539 {
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1540 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1541 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1542 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1543
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1544 case SCREEN_CHEST:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1545 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1546 if ( !pPlayers[uActiveCharacter]->CanAct() )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1547 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1548 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427],//%s не в состоянии %s
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1549 pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//Опознать предметы
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1550 pWindow.Hint = pTmpBuf.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1551 pWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1552 pWindow.uFrameHeight = 180;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1553 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1554 if ( (signed int)pX <= 320 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1555 v10 = pX + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1556 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1557 v10 = pX - 414;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1558 pWindow.uFrameX = v10;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1559 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1560 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1561 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1562 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1563 v9 = pX + pSRZBufferLineOffsets[pY];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1564 if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1565 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1566
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1567 // __debugbreak(); // invalid indexing will result in invalid object ptr
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1568 // v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1569 // + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1570 v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1571 v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1572 GameUI_DrawItemInfo(v8);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1573 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1574 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1575 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1576 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1577 case SCREEN_GAME:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1578 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1579 if (GetCurrentMenuID() > 0)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1580 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1581
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1582 if ( (signed int)pY > (signed int)pViewport->uViewportBR_Y )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1583 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1584 pWindow.ptr_1C = (void *)((signed int)pX / 118);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1585 if ( (signed int)pX / 118 < 4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1586 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1587 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1588 pWindow.uFrameWidth = 400;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1589 pWindow.uFrameHeight = 200;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1590 pWindow.uFrameX = 38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1591 pWindow.uFrameY = 60;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1592 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1593 GameUI_CharacterQuickRecord_Draw(&pWindow, pPlayers[(int)pWindow.ptr_1C + 1]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1594 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1595 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1596 else if ( (signed int)pX > (signed int)pViewport->uViewportBR_X )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1597 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1598 if ( (signed int)pY >= 130 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1599 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1600 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1601 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1602 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1603 pWindow.uFrameWidth = 400;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1604 pWindow.uFrameHeight = 200;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1605 pWindow.uFrameX = 38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1606 pWindow.uFrameY = 60;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1607 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1608 pWindow._41D73D_draw_buff_tooltip();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1609 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1610 else if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1611 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1612 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ))
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1613 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1614 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1615 v3 = (void *)1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1616 GameUI_DrawNPCPopup(v3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1617 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1618 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1619 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1620 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1621 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1622 v3 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1623 GameUI_DrawNPCPopup(v3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1624 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1625 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1626 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1627 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1628 pWindow.Hint = (char *)GameUI_GetMinimapHintText();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1629 pWindow.uFrameWidth = 256;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1630 pWindow.uFrameX = 130;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1631 pWindow.uFrameY = 140;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1632 pWindow.uFrameHeight = 64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1633 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1634 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1635 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1636 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1637 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1638 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1639 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1640 pWindow.uFrameWidth = 320;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1641 pWindow.uFrameHeight = 320;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1642 v4 = pX - 350;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1643 if ( (signed int)pX <= 320 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1644 v4 = pX + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1645 pWindow.uFrameX = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1646 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1647 if ( pRenderer->pRenderD3D )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1648 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1649 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1650 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1651 v6 = (unsigned __int16)v5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1652 if (PID_TYPE(v6) != OBJECT_Item)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1653 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1654 if (PID_TYPE(v6) == OBJECT_Actor)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1655 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1656 if ( pRenderer->uNumSceneBegins )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1657 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1658 pWindow.DrawMessageBox(1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1659 MonsterPopup_Draw(PID_ID(v6), &pWindow);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1660 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1661 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1662 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1663 pRenderer->BeginScene();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1664 pWindow.DrawMessageBox(1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1665 MonsterPopup_Draw(PID_ID(v6), &pWindow);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1666 pRenderer->EndScene();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1667 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1668 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1669 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1670 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1671 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1672 v7 = PID_ID(v6);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1673 if ( ! (pObjectList->pObjects[pSpriteObjects[v7].uObjectDescID].uFlags & 0x10 ) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1674 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1675 v8 = &pSpriteObjects[v7].stru_24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1676 GameUI_DrawItemInfo(v8);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1677 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1678 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1679 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1680 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1681 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1682 case SCREEN_BOOKS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1683 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1684 if ( !dword_506364
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1685 || (signed int)pX < (signed int)pViewport->uViewportTL_X
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1686 || (signed int)pX > (signed int)pViewport->uViewportBR_X
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1687 || (signed int)pY < (signed int)pViewport->uViewportTL_Y
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1688 || (signed int)pY > (signed int)pViewport->uViewportBR_Y
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1689 || (v2 = (char *)sub_444564(), (pWindow.Hint = v2) == 0) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1690 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1691 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1692 v27 = v30 + 6.7553994e15;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1693 v29 = (char *)LODWORD(v27);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1694 pWindow.uFrameWidth = LODWORD(v27);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1695 pWindow.uFrameX = pX + 5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1696 pWindow.uFrameY = pY + 5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1697 pWindow.uFrameHeight = 64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1698 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1699 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1700 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1701 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1702 case SCREEN_CHARACTERS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1703 case SCREEN_E:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1704 case SCREEN_CHEST_INVENTORY:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1705 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1706 if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1707 {
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1708 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1709 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1710 else if ( (signed int)pY >= 345 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1711 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1712 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )//2DEvent - CharacerScreenStats
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1713 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1714 CharacterUI_StatsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1715 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1716 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )//2DEvent - CharacerScreenSkills
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1717 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1718 CharacterUI_SkillsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1719 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1720 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1721 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1722 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103 )//2DEvent - CharacerScreenInventory
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1723 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1724 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1725 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1726 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1727 case SCREEN_SPELL_BOOK:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1728 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1729 if ( dword_507B00_spell_info_to_draw_in_popup )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1730 DrawSpellDescriptionPopup(dword_507B00_spell_info_to_draw_in_popup - 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1731 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1732 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1733 case SCREEN_HOUSE:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1734 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1735 if ( (signed int)pY < 345 && (signed int)pX < 469 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1736 ShowPopupShopItem();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1737 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1738 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1739 case SCREEN_PARTY_CREATION:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1740 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1741 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1742 pStr = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1743 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1744 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1745 if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1746 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1747 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1748 switch ( pButton->msg )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1749 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1750 case UIMSG_0: //stats info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1751 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1752 pStr = aAttributeNames[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1753 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1754 case UIMSG_PlayerCreationClickPlus: //Plus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1755 pStr = pGlobalTXT_LocalizationStrings[670];//Добавить
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1756 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1757 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1758 case UIMSG_PlayerCreationClickMinus: //Minus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1759 pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1760 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1761 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1762 case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1763 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1764 pStr = pSkillNames[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1765 pWindow.Hint = pSkillDesc[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1766 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1767 case UIMSG_PlayerCreationSelectClass: //Available Class Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1768 pWindow.Hint = pClassDescriptions[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1769 pStr = pClassNames[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1770 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1771 case UIMSG_PlayerCreationClickOK: //OK Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1772 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры.
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1773 pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1774 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1775 case UIMSG_PlayerCreationClickReset: //Clear info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1776 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда.
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1777 pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1778 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1779 case UIMSG_PlayerCreation_SelectAttribute: // Character info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1780 pStr = pParty->pPlayers[pButton->msg_param].pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1781 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1782 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1783 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1784 if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1785 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1786 pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1787 pY = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1788 if ( (signed int)pSkillId < 37 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1789 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1790 pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1791 strcpy(pTmpBuf2.data(), pSkillInfo);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1792 pWindow.Hint = pTmpBuf2.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1793 pStr = pSkillNames[pSkillId];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1794 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1795 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1796 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1797 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1798 if ( pWindow.Hint )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1799 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1800 pHint = (char*)pWindow.Hint;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1801 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1802 pWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1803 pWindow.uFrameHeight = 256;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1804 pWindow.uFrameX = 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1805 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1806 pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(pHint, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1807 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1808 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1809 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1810 pWindow.uFrameX += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1811 pWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1812 pWindow.uFrameY += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1813 pWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1814 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1815 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1816 pColor = TargetColor(0xFF, 0xFF, 0x9B);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1817 sprintf(pTmpBuf.data(), format_4E2D80, pColor, pStr);//"\f%05d%s\f00000\n"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1818 pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1819 pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1820 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1821 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1822 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1823 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1824 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1825 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1826 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1827 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1828 dword_507BF0_is_there_popup_onscreen = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1829 viewparams->bRedrawGameUI = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1830 }